From 15de53a97c577da50f63a710101da491be1fe1a8 Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 10:31:17 +0200 Subject: [PATCH 1/7] Try to fix this --- .gitmodules | 3 - Cargo.toml | 1 + Xargo.toml | 20 - bindgen/libnx.h | 135 +--- bindgen/libnx.rs | 1753 +++++++++++++++++++++++++++++++++++----- bindgen/twili.h | 2 +- bindgen/twili.rs | 34 - build.rs | 39 +- include/switch-nocrc.h | 139 ++++ twili-libnx | 1 - twili/LICENSE | 13 + twili/include/twili.h | 31 + twili/src/twili.c | 256 ++++++ 13 files changed, 2020 insertions(+), 407 deletions(-) delete mode 100644 .gitmodules delete mode 100644 Xargo.toml delete mode 100644 bindgen/twili.rs create mode 100644 include/switch-nocrc.h delete mode 160000 twili-libnx create mode 100644 twili/LICENSE create mode 100644 twili/include/twili.h create mode 100644 twili/src/twili.c diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 693f05e..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "twili-libnx"] - path = twili-libnx - url = https://github.com/misson20000/twili-libnx.git diff --git a/Cargo.toml b/Cargo.toml index 5163274..861d302 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "nx" version = "0.1.0" authors = ["XorTroll", "ischeinkman ", "Switchbrew"] links = "nx" +build = "build.rs" [lib] crate_type = ["rlib"] diff --git a/Xargo.toml b/Xargo.toml deleted file mode 100644 index 987bb76..0000000 --- a/Xargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[dependencies.core] -stage = 0 - -[dependencies.alloc] -stage = 1 - -[dependencies.libc] -stage = 2 -default-features = false -features = ["align", "rustc-dep-of-std"] - -[dependencies.std] -git = "https://github.com/rusty-horizon/horizon-nx-std-squashed" -branch = "switch-squashed" -default-features = false -features = [ - "panic-unwind", - #"backtrace", -] -stage = 3 diff --git a/bindgen/libnx.h b/bindgen/libnx.h index f8ba4dc..8cbf91f 100644 --- a/bindgen/libnx.h +++ b/bindgen/libnx.h @@ -3,137 +3,4 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -// Not direcly including switch.h since new CRC crypto dependencies break bindgen, so skipping CRC header - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef __cplusplus -} -#endif \ No newline at end of file +#include "../include/switch-nocrc.h" \ No newline at end of file diff --git a/bindgen/libnx.rs b/bindgen/libnx.rs index 0cbf3fa..815279f 100644 --- a/bindgen/libnx.rs +++ b/bindgen/libnx.rs @@ -1,21 +1,21 @@ mod ctypes { - pub type c_void = core::ffi::c_void; - pub type c_char = u8; - pub type c_int = i32; - pub type c_long = i64; - pub type c_longlong = i64; - pub type c_schar = i8; - pub type c_short = i16; - pub type c_uchar = u8; - pub type c_uint = u32; - pub type c_ulong = u64; - pub type c_ulonglong = u64; - pub type c_ushort = u16; - pub type size_t = u64; - pub type ssize_t = i64; - pub type c_float = f32; - pub type c_double = f64; -}/* automatically generated by rust-bindgen */ + pub type c_void = core::ffi::c_void; + pub type c_char = u8; + pub type c_int = i32; + pub type c_long = i64; + pub type c_longlong = i64; + pub type c_schar = i8; + pub type c_short = i16; + pub type c_uchar = u8; + pub type c_uint = u32; + pub type c_ulong = u64; + pub type c_ulonglong = u64; + pub type c_ushort = u16; + pub type size_t = u64; + pub type ssize_t = i64; + pub type c_float = f32; + pub type c_double = f64; + }/* automatically generated by rust-bindgen */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -122,7 +122,7 @@ where } } } - # [ repr ( C ) ] # [ derive ( Default ) ] pub struct __IncompleteArrayField < T > ( :: core :: marker :: PhantomData < T > ) ; impl < T > __IncompleteArrayField < T > { # [ inline ] pub fn new ( ) -> Self { __IncompleteArrayField ( :: core :: marker :: PhantomData ) } # [ inline ] pub unsafe fn as_ptr ( & self ) -> * const T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_slice ( & self , len : usize ) -> & [ T ] { :: core :: slice :: from_raw_parts ( self . as_ptr ( ) , len ) } # [ inline ] pub unsafe fn as_mut_slice ( & mut self , len : usize ) -> & mut [ T ] { :: core :: slice :: from_raw_parts_mut ( self . as_mut_ptr ( ) , len ) } } impl < T > :: core :: fmt :: Debug for __IncompleteArrayField < T > { fn fmt ( & self , fmt : & mut :: core :: fmt :: Formatter ) -> :: core :: fmt :: Result { fmt . write_str ( "__IncompleteArrayField" ) } } impl < T > :: core :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } impl < T > :: core :: marker :: Copy for __IncompleteArrayField < T > { } # [ repr ( C ) ] pub struct __BindgenUnionField < T > ( :: core :: marker :: PhantomData < T > ) ; impl < T > __BindgenUnionField < T > { # [ inline ] pub fn new ( ) -> Self { __BindgenUnionField ( :: core :: marker :: PhantomData ) } # [ inline ] pub unsafe fn as_ref ( & self ) -> & T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut ( & mut self ) -> & mut T { :: core :: mem :: transmute ( self ) } } impl < T > :: core :: default :: Default for __BindgenUnionField < T > { # [ inline ] fn default ( ) -> Self { Self :: new ( ) } } impl < T > :: core :: clone :: Clone for __BindgenUnionField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } impl < T > :: core :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: core :: fmt :: Debug for __BindgenUnionField < T > { fn fmt ( & self , fmt : & mut :: core :: fmt :: Formatter ) -> :: core :: fmt :: Result { fmt . write_str ( "__BindgenUnionField" ) } } impl < T > :: core :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: core :: hash :: Hasher > ( & self , _state : & mut H ) { } } impl < T > :: core :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq ( & self , _other : & __BindgenUnionField < T > ) -> bool { true } } impl < T > :: core :: cmp :: Eq for __BindgenUnionField < T > { } pub const _NEWLIB_VERSION_H__ : i32 = 1 ; pub const _NEWLIB_VERSION : & 'static [ u8 ; 6usize ] = b"3.1.0\0" ; pub const __NEWLIB__ : i32 = 3 ; pub const __NEWLIB_MINOR__ : i32 = 1 ; pub const __NEWLIB_PATCHLEVEL__ : i32 = 0 ; pub const _DEFAULT_SOURCE : i32 = 1 ; pub const _POSIX_SOURCE : i32 = 1 ; pub const _POSIX_C_SOURCE : i32 = 200809 ; pub const _ATFILE_SOURCE : i32 = 1 ; pub const __ATFILE_VISIBLE : i32 = 1 ; pub const __BSD_VISIBLE : i32 = 1 ; pub const __GNU_VISIBLE : i32 = 0 ; pub const __ISO_C_VISIBLE : i32 = 2011 ; pub const __LARGEFILE_VISIBLE : i32 = 0 ; pub const __MISC_VISIBLE : i32 = 1 ; pub const __POSIX_VISIBLE : i32 = 200809 ; pub const __SVID_VISIBLE : i32 = 1 ; pub const __XSI_VISIBLE : i32 = 0 ; pub const __SSP_FORTIFY_LEVEL : i32 = 0 ; pub const __have_longlong64 : i32 = 1 ; pub const __have_long64 : i32 = 1 ; pub const ___int8_t_defined : i32 = 1 ; pub const ___int16_t_defined : i32 = 1 ; pub const ___int32_t_defined : i32 = 1 ; pub const ___int64_t_defined : i32 = 1 ; pub const ___int_least8_t_defined : i32 = 1 ; pub const ___int_least16_t_defined : i32 = 1 ; pub const ___int_least32_t_defined : i32 = 1 ; pub const ___int_least64_t_defined : i32 = 1 ; pub const __int20 : i32 = 2 ; pub const __INT8 : & 'static [ u8 ; 3usize ] = b"hh\0" ; pub const __INT16 : & 'static [ u8 ; 2usize ] = b"h\0" ; pub const __INT64 : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __FAST8 : & 'static [ u8 ; 3usize ] = b"hh\0" ; pub const __FAST16 : & 'static [ u8 ; 2usize ] = b"h\0" ; pub const __FAST64 : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __LEAST8 : & 'static [ u8 ; 3usize ] = b"hh\0" ; pub const __LEAST16 : & 'static [ u8 ; 2usize ] = b"h\0" ; pub const __LEAST64 : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __int8_t_defined : i32 = 1 ; pub const __int16_t_defined : i32 = 1 ; pub const __int32_t_defined : i32 = 1 ; pub const __int64_t_defined : i32 = 1 ; pub const __int_least8_t_defined : i32 = 1 ; pub const __int_least16_t_defined : i32 = 1 ; pub const __int_least32_t_defined : i32 = 1 ; pub const __int_least64_t_defined : i32 = 1 ; pub const __int_fast8_t_defined : i32 = 1 ; pub const __int_fast16_t_defined : i32 = 1 ; pub const __int_fast32_t_defined : i32 = 1 ; pub const __int_fast64_t_defined : i32 = 1 ; pub const WINT_MIN : i32 = 0 ; pub const true_ : i32 = 1 ; pub const false_ : i32 = 0 ; pub const __bool_true_false_are_defined : i32 = 1 ; pub const __alignas_is_defined : i32 = 1 ; pub const __alignof_is_defined : i32 = 1 ; pub const NROHEADER_MAGIC : i32 = 810504782 ; pub const NROASSETHEADER_MAGIC : i32 = 1413829441 ; pub const NROASSETHEADER_VERSION : i32 = 0 ; pub const CUR_PROCESS_HANDLE : u32 = 4294934529 ; pub const CUR_THREAD_HANDLE : u32 = 4294934528 ; pub const MAX_WAIT_OBJECTS : i32 = 64 ; pub const __NEWLIB_H__ : i32 = 1 ; pub const _WANT_IO_C99_FORMATS : i32 = 1 ; pub const _WANT_IO_LONG_LONG : i32 = 1 ; pub const _WANT_IO_POS_ARGS : i32 = 1 ; pub const _MB_CAPABLE : i32 = 1 ; pub const _MB_LEN_MAX : i32 = 8 ; pub const HAVE_INITFINI_ARRAY : i32 = 1 ; pub const _ATEXIT_DYNAMIC_ALLOC : i32 = 1 ; pub const _HAVE_LONG_DOUBLE : i32 = 1 ; pub const _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL : i32 = 1 ; pub const _FVWRITE_IN_STREAMIO : i32 = 1 ; pub const _FSEEK_OPTIMIZATION : i32 = 1 ; pub const _UNBUF_STREAM_OPT : i32 = 1 ; pub const __OBSOLETE_MATH_DEFAULT : i32 = 0 ; pub const __OBSOLETE_MATH : i32 = 0 ; pub const MALLOC_ALIGNMENT : i32 = 16 ; pub const __RAND_MAX : u32 = 2147483647 ; pub const SFCI_MAGIC : i32 = 1229145683 ; pub const SFCO_MAGIC : i32 = 1329808979 ; pub const IPC_MAX_BUFFERS : i32 = 8 ; pub const IPC_MAX_OBJECTS : i32 = 8 ; pub const FS_MAX_PATH : i32 = 769 ; pub const FS_SAVEDATA_CURRENT_TITLEID : i32 = 0 ; pub const FS_SAVEDATA_USERID_COMMONSAVE : i32 = 0 ; pub const ACC_USER_LIST_SIZE : i32 = 8 ; pub const AUDREN_TIMER_FREQ_HZ : f64 = 200.0 ; pub const AUDREN_TIMER_PERIOD_MS : f64 = 5.0 ; pub const AUDREN_SAMPLES_PER_FRAME_32KHZ : i32 = 160 ; pub const AUDREN_SAMPLES_PER_FRAME_48KHZ : i32 = 240 ; pub const AUDREN_INPUT_PARAM_ALIGNMENT : i32 = 4096 ; pub const AUDREN_OUTPUT_PARAM_ALIGNMENT : i32 = 16 ; pub const AUDREN_MEMPOOL_ALIGNMENT : i32 = 4096 ; pub const AUDREN_BUFFER_ALIGNMENT : i32 = 64 ; pub const AUDREN_REVISION_1 : i32 = 827737426 ; pub const AUDREN_REVISION_2 : i32 = 844514642 ; pub const AUDREN_REVISION_3 : i32 = 861291858 ; pub const AUDREN_REVISION_4 : i32 = 878069074 ; pub const AUDREN_REVISION_5 : i32 = 894846290 ; pub const AUDREN_REVISION_6 : i32 = 911623506 ; pub const AUDREN_FINAL_MIX_ID : i32 = 0 ; pub const AUDREN_UNUSED_MIX_ID : u32 = 2147483647 ; pub const AUDREN_UNUSED_SPLITTER_ID : u32 = 4294967295 ; pub const AUDREN_DEFAULT_DEVICE_NAME : & 'static [ u8 ; 13usize ] = b"MainAudioOut\0" ; pub const USB_DT_INTERFACE_SIZE : i32 = 9 ; pub const USB_DT_ENDPOINT_SIZE : i32 = 7 ; pub const USB_DT_DEVICE_SIZE : i32 = 18 ; pub const USB_DT_SS_ENDPOINT_COMPANION_SIZE : i32 = 6 ; pub const USB_ENDPOINT_ADDRESS_MASK : i32 = 15 ; pub const USB_ENDPOINT_DIR_MASK : i32 = 128 ; pub const USB_TRANSFER_TYPE_MASK : i32 = 3 ; pub const USBDS_DEFAULT_InterfaceNumber : i32 = 4 ; pub const JOYSTICK_MAX : i32 = 32768 ; pub const JOYSTICK_MIN : i32 = -32768 ; pub const SET_MAX_NAME_SIZE : i32 = 72 ; pub const SPL_RSA_BUFFER_SIZE : i32 = 256 ; pub const BINDER_FIRST_CALL_TRANSACTION : i32 = 1 ; pub const PARCEL_MAX_PAYLOAD : i32 = 1024 ; pub const _NV_IOC_NRBITS : i32 = 8 ; pub const _NV_IOC_TYPEBITS : i32 = 8 ; pub const _NV_IOC_SIZEBITS : i32 = 14 ; pub const _NV_IOC_DIRBITS : i32 = 2 ; pub const _NV_IOC_NRMASK : i32 = 255 ; pub const _NV_IOC_TYPEMASK : i32 = 255 ; pub const _NV_IOC_SIZEMASK : i32 = 16383 ; pub const _NV_IOC_DIRMASK : i32 = 3 ; pub const _NV_IOC_NRSHIFT : i32 = 0 ; pub const _NV_IOC_TYPESHIFT : i32 = 8 ; pub const _NV_IOC_SIZESHIFT : i32 = 16 ; pub const _NV_IOC_DIRSHIFT : i32 = 30 ; pub const _NV_IOC_NONE : i32 = 0 ; pub const _NV_IOC_WRITE : i32 = 1 ; pub const _NV_IOC_READ : i32 = 2 ; pub const GPFIFO_QUEUE_SIZE : i32 = 2048 ; pub const NXLINK_SERVER_PORT : i32 = 28280 ; pub const NXLINK_CLIENT_PORT : i32 = 28771 ; pub const __GNUCLIKE_ASM : i32 = 3 ; pub const __GNUCLIKE___TYPEOF : i32 = 1 ; pub const __GNUCLIKE___OFFSETOF : i32 = 1 ; pub const __GNUCLIKE___SECTION : i32 = 1 ; pub const __GNUCLIKE_CTOR_SECTION_HANDLING : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_CONSTANT_P : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_VARARGS : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_STDARG : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_VAALIST : i32 = 1 ; pub const __GNUC_VA_LIST_COMPATIBILITY : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_NEXT_ARG : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_MEMCPY : i32 = 1 ; pub const __CC_SUPPORTS_INLINE : i32 = 1 ; pub const __CC_SUPPORTS___INLINE : i32 = 1 ; pub const __CC_SUPPORTS___INLINE__ : i32 = 1 ; pub const __CC_SUPPORTS___FUNC__ : i32 = 1 ; pub const __CC_SUPPORTS_WARNING : i32 = 1 ; pub const __CC_SUPPORTS_VARADIC_XXX : i32 = 1 ; pub const __CC_SUPPORTS_DYNAMIC_ARRAY_INIT : i32 = 1 ; pub const __BIT_TYPES_DEFINED__ : i32 = 1 ; pub const _LITTLE_ENDIAN : i32 = 1234 ; pub const _BIG_ENDIAN : i32 = 4321 ; pub const _PDP_ENDIAN : i32 = 3412 ; pub const _BYTE_ORDER : i32 = 1234 ; pub const _QUAD_HIGHWORD : i32 = 1 ; pub const _QUAD_LOWWORD : i32 = 0 ; pub const LITTLE_ENDIAN : i32 = 1234 ; pub const BIG_ENDIAN : i32 = 4321 ; pub const PDP_ENDIAN : i32 = 3412 ; pub const BYTE_ORDER : i32 = 1234 ; pub const FD_SETSIZE : i32 = 64 ; pub const SCHED_OTHER : i32 = 0 ; pub const SCHED_FIFO : i32 = 1 ; pub const SCHED_RR : i32 = 2 ; pub const PTHREAD_SCOPE_PROCESS : i32 = 0 ; pub const PTHREAD_SCOPE_SYSTEM : i32 = 1 ; pub const PTHREAD_INHERIT_SCHED : i32 = 1 ; pub const PTHREAD_EXPLICIT_SCHED : i32 = 2 ; pub const PTHREAD_CREATE_DETACHED : i32 = 0 ; pub const PTHREAD_CREATE_JOINABLE : i32 = 1 ; pub const CONSOLE_COLOR_BOLD : i32 = 1 ; pub const CONSOLE_COLOR_FAINT : i32 = 2 ; pub const CONSOLE_ITALIC : i32 = 4 ; pub const CONSOLE_UNDERLINE : i32 = 8 ; pub const CONSOLE_BLINK_SLOW : i32 = 16 ; pub const CONSOLE_BLINK_FAST : i32 = 32 ; pub const CONSOLE_COLOR_REVERSE : i32 = 64 ; pub const CONSOLE_CONCEAL : i32 = 128 ; pub const CONSOLE_CROSSED_OUT : i32 = 256 ; pub const FSDEV_DIRITER_MAGIC : i32 = 1718838390 ; pub const AES_BLOCK_SIZE : i32 = 16 ; pub const AES_128_KEY_SIZE : i32 = 16 ; pub const AES_128_NUM_ROUNDS : i32 = 10 ; pub const AES_192_KEY_SIZE : i32 = 24 ; pub const AES_192_NUM_ROUNDS : i32 = 12 ; pub const AES_256_KEY_SIZE : i32 = 32 ; pub const AES_256_NUM_ROUNDS : i32 = 14 ; pub const SHA256_HASH_SIZE : i32 = 32 ; pub const SHA256_BLOCK_SIZE : i32 = 64 ; pub const SHA1_HASH_SIZE : i32 = 20 ; pub const SHA1_BLOCK_SIZE : i32 = 64 ; pub type __int8_t = ctypes :: c_schar ; pub type __uint8_t = ctypes :: c_uchar ; pub type __int16_t = ctypes :: c_short ; pub type __uint16_t = ctypes :: c_ushort ; pub type __int32_t = ctypes :: c_int ; pub type __uint32_t = ctypes :: c_uint ; pub type __int64_t = ctypes :: c_long ; pub type __uint64_t = ctypes :: c_ulong ; pub type __int_least8_t = ctypes :: c_schar ; pub type __uint_least8_t = ctypes :: c_uchar ; pub type __int_least16_t = ctypes :: c_short ; pub type __uint_least16_t = ctypes :: c_ushort ; pub type __int_least32_t = ctypes :: c_int ; pub type __uint_least32_t = ctypes :: c_uint ; pub type __int_least64_t = ctypes :: c_long ; pub type __uint_least64_t = ctypes :: c_ulong ; pub type __intmax_t = ctypes :: c_long ; pub type __uintmax_t = ctypes :: c_ulong ; pub type __intptr_t = ctypes :: c_long ; pub type __uintptr_t = ctypes :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; pub type int_least8_t = __int_least8_t ; pub type uint_least8_t = __uint_least8_t ; pub type int_least16_t = __int_least16_t ; pub type uint_least16_t = __uint_least16_t ; pub type int_least32_t = __int_least32_t ; pub type uint_least32_t = __uint_least32_t ; pub type int_least64_t = __int_least64_t ; pub type uint_least64_t = __uint_least64_t ; pub type int_fast8_t = ctypes :: c_schar ; pub type uint_fast8_t = ctypes :: c_uchar ; pub type int_fast16_t = ctypes :: c_short ; pub type uint_fast16_t = ctypes :: c_ushort ; pub type int_fast32_t = ctypes :: c_int ; pub type uint_fast32_t = ctypes :: c_uint ; pub type int_fast64_t = ctypes :: c_long ; pub type uint_fast64_t = ctypes :: c_ulong ; pub type wchar_t = ctypes :: c_uint ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct max_align_t { pub __max_align_ll : ctypes :: c_longlong , pub __bindgen_padding_0 : u64 , pub __max_align_ld : f64 , } # [ test ] fn bindgen_test_layout_max_align_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < max_align_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < max_align_t > ( ) , 16usize , concat ! ( "Alignment of " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max_align_t > ( ) ) ) . __max_align_ll as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __max_align_ll ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max_align_t > ( ) ) ) . __max_align_ld as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __max_align_ld ) ) ) ; } pub type u128 = __uint128_t ; pub type s8 = i8 ; pub type s16 = i16 ; pub type s32 = i32 ; pub type s64 = i64 ; pub type s128 = __int128_t ; pub type vu8 = u8 ; pub type vu16 = u16 ; pub type vu32 = u32 ; pub type vu64 = u64 ; pub type vu128 = u128 ; pub type vs8 = s8 ; pub type vs16 = s16 ; pub type vs32 = s32 ; pub type vs64 = s64 ; pub type vs128 = s128 ; pub type Handle = u32 ; pub type Result = u32 ; pub type ThreadFunc = :: core :: option :: Option < unsafe extern "C" fn ( arg1 : * mut ctypes :: c_void ) > ; pub type VoidFn = :: core :: option :: Option < unsafe extern "C" fn ( ) > ; pub const Module_Kernel : _bindgen_ty_1 = 1 ; pub const Module_Libnx : _bindgen_ty_1 = 345 ; pub const Module_HomebrewAbi : _bindgen_ty_1 = 346 ; pub const Module_HomebrewLoader : _bindgen_ty_1 = 347 ; pub const Module_LibnxNvidia : _bindgen_ty_1 = 348 ; pub const Module_LibnxBinder : _bindgen_ty_1 = 349 ; + # [ repr ( C ) ] # [ derive ( Default ) ] pub struct __IncompleteArrayField < T > ( :: core :: marker :: PhantomData < T > ) ; impl < T > __IncompleteArrayField < T > { # [ inline ] pub fn new ( ) -> Self { __IncompleteArrayField ( :: core :: marker :: PhantomData ) } # [ inline ] pub unsafe fn as_ptr ( & self ) -> * const T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_slice ( & self , len : usize ) -> & [ T ] { :: core :: slice :: from_raw_parts ( self . as_ptr ( ) , len ) } # [ inline ] pub unsafe fn as_mut_slice ( & mut self , len : usize ) -> & mut [ T ] { :: core :: slice :: from_raw_parts_mut ( self . as_mut_ptr ( ) , len ) } } impl < T > :: core :: fmt :: Debug for __IncompleteArrayField < T > { fn fmt ( & self , fmt : & mut :: core :: fmt :: Formatter ) -> :: core :: fmt :: Result { fmt . write_str ( "__IncompleteArrayField" ) } } impl < T > :: core :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } impl < T > :: core :: marker :: Copy for __IncompleteArrayField < T > { } # [ repr ( C ) ] pub struct __BindgenUnionField < T > ( :: core :: marker :: PhantomData < T > ) ; impl < T > __BindgenUnionField < T > { # [ inline ] pub fn new ( ) -> Self { __BindgenUnionField ( :: core :: marker :: PhantomData ) } # [ inline ] pub unsafe fn as_ref ( & self ) -> & T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut ( & mut self ) -> & mut T { :: core :: mem :: transmute ( self ) } } impl < T > :: core :: default :: Default for __BindgenUnionField < T > { # [ inline ] fn default ( ) -> Self { Self :: new ( ) } } impl < T > :: core :: clone :: Clone for __BindgenUnionField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } impl < T > :: core :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: core :: fmt :: Debug for __BindgenUnionField < T > { fn fmt ( & self , fmt : & mut :: core :: fmt :: Formatter ) -> :: core :: fmt :: Result { fmt . write_str ( "__BindgenUnionField" ) } } impl < T > :: core :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: core :: hash :: Hasher > ( & self , _state : & mut H ) { } } impl < T > :: core :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq ( & self , _other : & __BindgenUnionField < T > ) -> bool { true } } impl < T > :: core :: cmp :: Eq for __BindgenUnionField < T > { } pub const _NEWLIB_VERSION_H__ : i32 = 1 ; pub const _NEWLIB_VERSION : & 'static [ u8 ; 6usize ] = b"3.1.0\0" ; pub const __NEWLIB__ : i32 = 3 ; pub const __NEWLIB_MINOR__ : i32 = 1 ; pub const __NEWLIB_PATCHLEVEL__ : i32 = 0 ; pub const _DEFAULT_SOURCE : i32 = 1 ; pub const _POSIX_SOURCE : i32 = 1 ; pub const _POSIX_C_SOURCE : i32 = 200809 ; pub const _ATFILE_SOURCE : i32 = 1 ; pub const __ATFILE_VISIBLE : i32 = 1 ; pub const __BSD_VISIBLE : i32 = 1 ; pub const __GNU_VISIBLE : i32 = 0 ; pub const __ISO_C_VISIBLE : i32 = 2011 ; pub const __LARGEFILE_VISIBLE : i32 = 0 ; pub const __MISC_VISIBLE : i32 = 1 ; pub const __POSIX_VISIBLE : i32 = 200809 ; pub const __SVID_VISIBLE : i32 = 1 ; pub const __XSI_VISIBLE : i32 = 0 ; pub const __SSP_FORTIFY_LEVEL : i32 = 0 ; pub const __have_longlong64 : i32 = 1 ; pub const __have_long64 : i32 = 1 ; pub const ___int8_t_defined : i32 = 1 ; pub const ___int16_t_defined : i32 = 1 ; pub const ___int32_t_defined : i32 = 1 ; pub const ___int64_t_defined : i32 = 1 ; pub const ___int_least8_t_defined : i32 = 1 ; pub const ___int_least16_t_defined : i32 = 1 ; pub const ___int_least32_t_defined : i32 = 1 ; pub const ___int_least64_t_defined : i32 = 1 ; pub const __int20 : i32 = 2 ; pub const __INT8 : & 'static [ u8 ; 3usize ] = b"hh\0" ; pub const __INT16 : & 'static [ u8 ; 2usize ] = b"h\0" ; pub const __INT64 : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __FAST8 : & 'static [ u8 ; 3usize ] = b"hh\0" ; pub const __FAST16 : & 'static [ u8 ; 2usize ] = b"h\0" ; pub const __FAST64 : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __LEAST8 : & 'static [ u8 ; 3usize ] = b"hh\0" ; pub const __LEAST16 : & 'static [ u8 ; 2usize ] = b"h\0" ; pub const __LEAST64 : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __int8_t_defined : i32 = 1 ; pub const __int16_t_defined : i32 = 1 ; pub const __int32_t_defined : i32 = 1 ; pub const __int64_t_defined : i32 = 1 ; pub const __int_least8_t_defined : i32 = 1 ; pub const __int_least16_t_defined : i32 = 1 ; pub const __int_least32_t_defined : i32 = 1 ; pub const __int_least64_t_defined : i32 = 1 ; pub const __int_fast8_t_defined : i32 = 1 ; pub const __int_fast16_t_defined : i32 = 1 ; pub const __int_fast32_t_defined : i32 = 1 ; pub const __int_fast64_t_defined : i32 = 1 ; pub const WINT_MIN : i32 = 0 ; pub const true_ : i32 = 1 ; pub const false_ : i32 = 0 ; pub const __bool_true_false_are_defined : i32 = 1 ; pub const __alignas_is_defined : i32 = 1 ; pub const __alignof_is_defined : i32 = 1 ; pub const NROHEADER_MAGIC : i32 = 810504782 ; pub const NROASSETHEADER_MAGIC : i32 = 1413829441 ; pub const NROASSETHEADER_VERSION : i32 = 0 ; pub const CUR_PROCESS_HANDLE : u32 = 4294934529 ; pub const CUR_THREAD_HANDLE : u32 = 4294934528 ; pub const MAX_WAIT_OBJECTS : i32 = 64 ; pub const __NEWLIB_H__ : i32 = 1 ; pub const _WANT_IO_C99_FORMATS : i32 = 1 ; pub const _WANT_IO_LONG_LONG : i32 = 1 ; pub const _WANT_IO_POS_ARGS : i32 = 1 ; pub const _MB_CAPABLE : i32 = 1 ; pub const _MB_LEN_MAX : i32 = 8 ; pub const HAVE_INITFINI_ARRAY : i32 = 1 ; pub const _ATEXIT_DYNAMIC_ALLOC : i32 = 1 ; pub const _HAVE_LONG_DOUBLE : i32 = 1 ; pub const _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL : i32 = 1 ; pub const _FVWRITE_IN_STREAMIO : i32 = 1 ; pub const _FSEEK_OPTIMIZATION : i32 = 1 ; pub const _UNBUF_STREAM_OPT : i32 = 1 ; pub const __OBSOLETE_MATH_DEFAULT : i32 = 1 ; pub const __OBSOLETE_MATH : i32 = 1 ; pub const __RAND_MAX : u32 = 2147483647 ; pub const SFCI_MAGIC : i32 = 1229145683 ; pub const SFCO_MAGIC : i32 = 1329808979 ; pub const IPC_MAX_BUFFERS : i32 = 8 ; pub const IPC_MAX_OBJECTS : i32 = 8 ; pub const FS_MAX_PATH : i32 = 769 ; pub const FS_SAVEDATA_CURRENT_TITLEID : i32 = 0 ; pub const FS_SAVEDATA_USERID_COMMONSAVE : i32 = 0 ; pub const ACC_USER_LIST_SIZE : i32 = 8 ; pub const AUDREN_TIMER_FREQ_HZ : f64 = 200.0 ; pub const AUDREN_TIMER_PERIOD_MS : f64 = 5.0 ; pub const AUDREN_SAMPLES_PER_FRAME_32KHZ : i32 = 160 ; pub const AUDREN_SAMPLES_PER_FRAME_48KHZ : i32 = 240 ; pub const AUDREN_INPUT_PARAM_ALIGNMENT : i32 = 4096 ; pub const AUDREN_OUTPUT_PARAM_ALIGNMENT : i32 = 16 ; pub const AUDREN_MEMPOOL_ALIGNMENT : i32 = 4096 ; pub const AUDREN_BUFFER_ALIGNMENT : i32 = 64 ; pub const AUDREN_REVISION_1 : i32 = 827737426 ; pub const AUDREN_REVISION_2 : i32 = 844514642 ; pub const AUDREN_REVISION_3 : i32 = 861291858 ; pub const AUDREN_REVISION_4 : i32 = 878069074 ; pub const AUDREN_REVISION_5 : i32 = 894846290 ; pub const AUDREN_REVISION_6 : i32 = 911623506 ; pub const AUDREN_FINAL_MIX_ID : i32 = 0 ; pub const AUDREN_UNUSED_MIX_ID : u32 = 2147483647 ; pub const AUDREN_UNUSED_SPLITTER_ID : u32 = 4294967295 ; pub const AUDREN_DEFAULT_DEVICE_NAME : & 'static [ u8 ; 13usize ] = b"MainAudioOut\0" ; pub const USB_DT_INTERFACE_SIZE : i32 = 9 ; pub const USB_DT_ENDPOINT_SIZE : i32 = 7 ; pub const USB_DT_DEVICE_SIZE : i32 = 18 ; pub const USB_DT_SS_ENDPOINT_COMPANION_SIZE : i32 = 6 ; pub const USB_ENDPOINT_ADDRESS_MASK : i32 = 15 ; pub const USB_ENDPOINT_DIR_MASK : i32 = 128 ; pub const USB_TRANSFER_TYPE_MASK : i32 = 3 ; pub const USBDS_DEFAULT_InterfaceNumber : i32 = 4 ; pub const JOYSTICK_MAX : i32 = 32768 ; pub const JOYSTICK_MIN : i32 = -32768 ; pub const SET_MAX_NAME_SIZE : i32 = 72 ; pub const SET_MAX_NICKNAME_SIZE : i32 = 128 ; pub const SPL_RSA_BUFFER_SIZE : i32 = 256 ; pub const BINDER_FIRST_CALL_TRANSACTION : i32 = 1 ; pub const PARCEL_MAX_PAYLOAD : i32 = 1024 ; pub const _NV_IOC_NRBITS : i32 = 8 ; pub const _NV_IOC_TYPEBITS : i32 = 8 ; pub const _NV_IOC_SIZEBITS : i32 = 14 ; pub const _NV_IOC_DIRBITS : i32 = 2 ; pub const _NV_IOC_NRMASK : i32 = 255 ; pub const _NV_IOC_TYPEMASK : i32 = 255 ; pub const _NV_IOC_SIZEMASK : i32 = 16383 ; pub const _NV_IOC_DIRMASK : i32 = 3 ; pub const _NV_IOC_NRSHIFT : i32 = 0 ; pub const _NV_IOC_TYPESHIFT : i32 = 8 ; pub const _NV_IOC_SIZESHIFT : i32 = 16 ; pub const _NV_IOC_DIRSHIFT : i32 = 30 ; pub const _NV_IOC_NONE : i32 = 0 ; pub const _NV_IOC_WRITE : i32 = 1 ; pub const _NV_IOC_READ : i32 = 2 ; pub const NVGPU_ZBC_TYPE_INVALID : i32 = 0 ; pub const NVGPU_ZBC_TYPE_COLOR : i32 = 1 ; pub const NVGPU_ZBC_TYPE_DEPTH : i32 = 2 ; pub const GPFIFO_QUEUE_SIZE : i32 = 2048 ; pub const NXLINK_SERVER_PORT : i32 = 28280 ; pub const NXLINK_CLIENT_PORT : i32 = 28771 ; pub const __GNUCLIKE_ASM : i32 = 3 ; pub const __GNUCLIKE___TYPEOF : i32 = 1 ; pub const __GNUCLIKE___OFFSETOF : i32 = 1 ; pub const __GNUCLIKE___SECTION : i32 = 1 ; pub const __GNUCLIKE_CTOR_SECTION_HANDLING : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_CONSTANT_P : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_VARARGS : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_STDARG : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_VAALIST : i32 = 1 ; pub const __GNUC_VA_LIST_COMPATIBILITY : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_NEXT_ARG : i32 = 1 ; pub const __GNUCLIKE_BUILTIN_MEMCPY : i32 = 1 ; pub const __CC_SUPPORTS_INLINE : i32 = 1 ; pub const __CC_SUPPORTS___INLINE : i32 = 1 ; pub const __CC_SUPPORTS___INLINE__ : i32 = 1 ; pub const __CC_SUPPORTS___FUNC__ : i32 = 1 ; pub const __CC_SUPPORTS_WARNING : i32 = 1 ; pub const __CC_SUPPORTS_VARADIC_XXX : i32 = 1 ; pub const __CC_SUPPORTS_DYNAMIC_ARRAY_INIT : i32 = 1 ; pub const __BIT_TYPES_DEFINED__ : i32 = 1 ; pub const _LITTLE_ENDIAN : i32 = 1234 ; pub const _BIG_ENDIAN : i32 = 4321 ; pub const _PDP_ENDIAN : i32 = 3412 ; pub const _BYTE_ORDER : i32 = 1234 ; pub const _QUAD_HIGHWORD : i32 = 1 ; pub const _QUAD_LOWWORD : i32 = 0 ; pub const LITTLE_ENDIAN : i32 = 1234 ; pub const BIG_ENDIAN : i32 = 4321 ; pub const PDP_ENDIAN : i32 = 3412 ; pub const BYTE_ORDER : i32 = 1234 ; pub const FD_SETSIZE : i32 = 64 ; pub const SCHED_OTHER : i32 = 0 ; pub const SCHED_FIFO : i32 = 1 ; pub const SCHED_RR : i32 = 2 ; pub const PTHREAD_SCOPE_PROCESS : i32 = 0 ; pub const PTHREAD_SCOPE_SYSTEM : i32 = 1 ; pub const PTHREAD_INHERIT_SCHED : i32 = 1 ; pub const PTHREAD_EXPLICIT_SCHED : i32 = 2 ; pub const PTHREAD_CREATE_DETACHED : i32 = 0 ; pub const PTHREAD_CREATE_JOINABLE : i32 = 1 ; pub const CONSOLE_COLOR_BOLD : i32 = 1 ; pub const CONSOLE_COLOR_FAINT : i32 = 2 ; pub const CONSOLE_ITALIC : i32 = 4 ; pub const CONSOLE_UNDERLINE : i32 = 8 ; pub const CONSOLE_BLINK_SLOW : i32 = 16 ; pub const CONSOLE_BLINK_FAST : i32 = 32 ; pub const CONSOLE_COLOR_REVERSE : i32 = 64 ; pub const CONSOLE_CONCEAL : i32 = 128 ; pub const CONSOLE_CROSSED_OUT : i32 = 256 ; pub const FSDEV_DIRITER_MAGIC : i32 = 1718838390 ; pub const AES_BLOCK_SIZE : i32 = 16 ; pub const AES_128_KEY_SIZE : i32 = 16 ; pub const AES_128_NUM_ROUNDS : i32 = 10 ; pub const AES_192_KEY_SIZE : i32 = 24 ; pub const AES_192_NUM_ROUNDS : i32 = 12 ; pub const AES_256_KEY_SIZE : i32 = 32 ; pub const AES_256_NUM_ROUNDS : i32 = 14 ; pub const SHA256_HASH_SIZE : i32 = 32 ; pub const SHA256_BLOCK_SIZE : i32 = 64 ; pub const SHA1_HASH_SIZE : i32 = 20 ; pub const SHA1_BLOCK_SIZE : i32 = 64 ; pub type __int8_t = ctypes :: c_schar ; pub type __uint8_t = ctypes :: c_uchar ; pub type __int16_t = ctypes :: c_short ; pub type __uint16_t = ctypes :: c_ushort ; pub type __int32_t = ctypes :: c_int ; pub type __uint32_t = ctypes :: c_uint ; pub type __int64_t = ctypes :: c_long ; pub type __uint64_t = ctypes :: c_ulong ; pub type __int_least8_t = ctypes :: c_schar ; pub type __uint_least8_t = ctypes :: c_uchar ; pub type __int_least16_t = ctypes :: c_short ; pub type __uint_least16_t = ctypes :: c_ushort ; pub type __int_least32_t = ctypes :: c_int ; pub type __uint_least32_t = ctypes :: c_uint ; pub type __int_least64_t = ctypes :: c_long ; pub type __uint_least64_t = ctypes :: c_ulong ; pub type __intmax_t = ctypes :: c_long ; pub type __uintmax_t = ctypes :: c_ulong ; pub type __intptr_t = ctypes :: c_long ; pub type __uintptr_t = ctypes :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; pub type int_least8_t = __int_least8_t ; pub type uint_least8_t = __uint_least8_t ; pub type int_least16_t = __int_least16_t ; pub type uint_least16_t = __uint_least16_t ; pub type int_least32_t = __int_least32_t ; pub type uint_least32_t = __uint_least32_t ; pub type int_least64_t = __int_least64_t ; pub type uint_least64_t = __uint_least64_t ; pub type int_fast8_t = ctypes :: c_schar ; pub type uint_fast8_t = ctypes :: c_uchar ; pub type int_fast16_t = ctypes :: c_short ; pub type uint_fast16_t = ctypes :: c_ushort ; pub type int_fast32_t = ctypes :: c_int ; pub type uint_fast32_t = ctypes :: c_uint ; pub type int_fast64_t = ctypes :: c_long ; pub type uint_fast64_t = ctypes :: c_ulong ; pub type wchar_t = ctypes :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct max_align_t { pub __max_align_ll : ctypes :: c_longlong , pub __bindgen_padding_0 : u64 , pub __max_align_ld : f64 , } # [ test ] fn bindgen_test_layout_max_align_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < max_align_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < max_align_t > ( ) , 16usize , concat ! ( "Alignment of " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max_align_t > ( ) ) ) . __max_align_ll as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __max_align_ll ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max_align_t > ( ) ) ) . __max_align_ld as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __max_align_ld ) ) ) ; } pub type u128 = __uint128_t ; pub type s8 = i8 ; pub type s16 = i16 ; pub type s32 = i32 ; pub type s64 = i64 ; pub type s128 = __int128_t ; pub type vu8 = u8 ; pub type vu16 = u16 ; pub type vu32 = u32 ; pub type vu64 = u64 ; pub type vu128 = u128 ; pub type vs8 = s8 ; pub type vs16 = s16 ; pub type vs32 = s32 ; pub type vs64 = s64 ; pub type vs128 = s128 ; pub type Handle = u32 ; pub type Result = u32 ; pub type ThreadFunc = :: core :: option :: Option < unsafe extern "C" fn ( arg1 : * mut ctypes :: c_void ) > ; pub type VoidFn = :: core :: option :: Option < unsafe extern "C" fn ( ) > ; pub const Module_Kernel : _bindgen_ty_1 = 1 ; pub const Module_Libnx : _bindgen_ty_1 = 345 ; pub const Module_HomebrewAbi : _bindgen_ty_1 = 346 ; pub const Module_HomebrewLoader : _bindgen_ty_1 = 347 ; pub const Module_LibnxNvidia : _bindgen_ty_1 = 348 ; pub const Module_LibnxBinder : _bindgen_ty_1 = 349 ; /// Module values pub type _bindgen_ty_1 = u32 ; pub const KernelError_OutOfSessions : _bindgen_ty_2 = 7 ; pub const KernelError_InvalidCapabilityDescriptor : _bindgen_ty_2 = 14 ; pub const KernelError_NotImplemented : _bindgen_ty_2 = 33 ; pub const KernelError_ThreadTerminating : _bindgen_ty_2 = 59 ; pub const KernelError_OutOfDebugEvents : _bindgen_ty_2 = 70 ; pub const KernelError_InvalidSize : _bindgen_ty_2 = 101 ; pub const KernelError_InvalidAddress : _bindgen_ty_2 = 102 ; pub const KernelError_ResourceExhausted : _bindgen_ty_2 = 103 ; pub const KernelError_OutOfMemory : _bindgen_ty_2 = 104 ; pub const KernelError_OutOfHandles : _bindgen_ty_2 = 105 ; pub const KernelError_InvalidMemoryState : _bindgen_ty_2 = 106 ; pub const KernelError_InvalidMemoryPermissions : _bindgen_ty_2 = 108 ; pub const KernelError_InvalidMemoryRange : _bindgen_ty_2 = 110 ; pub const KernelError_InvalidPriority : _bindgen_ty_2 = 112 ; pub const KernelError_InvalidCoreId : _bindgen_ty_2 = 113 ; pub const KernelError_InvalidHandle : _bindgen_ty_2 = 114 ; pub const KernelError_InvalidUserBuffer : _bindgen_ty_2 = 115 ; pub const KernelError_InvalidCombination : _bindgen_ty_2 = 116 ; pub const KernelError_TimedOut : _bindgen_ty_2 = 117 ; pub const KernelError_Cancelled : _bindgen_ty_2 = 118 ; pub const KernelError_OutOfRange : _bindgen_ty_2 = 119 ; pub const KernelError_InvalidEnumValue : _bindgen_ty_2 = 120 ; pub const KernelError_NotFound : _bindgen_ty_2 = 121 ; pub const KernelError_AlreadyExists : _bindgen_ty_2 = 122 ; pub const KernelError_ConnectionClosed : _bindgen_ty_2 = 123 ; pub const KernelError_UnhandledUserInterrupt : _bindgen_ty_2 = 124 ; pub const KernelError_InvalidState : _bindgen_ty_2 = 125 ; pub const KernelError_ReservedValue : _bindgen_ty_2 = 126 ; pub const KernelError_InvalidHwBreakpoint : _bindgen_ty_2 = 127 ; pub const KernelError_FatalUserException : _bindgen_ty_2 = 128 ; pub const KernelError_OwnedByAnotherProcess : _bindgen_ty_2 = 129 ; pub const KernelError_ConnectionRefused : _bindgen_ty_2 = 131 ; pub const KernelError_OutOfResource : _bindgen_ty_2 = 132 ; pub const KernelError_IpcMapFailed : _bindgen_ty_2 = 259 ; pub const KernelError_IpcCmdbufTooSmall : _bindgen_ty_2 = 260 ; pub const KernelError_NotDebugged : _bindgen_ty_2 = 520 ; /// Kernel error codes @@ -485,7 +485,93 @@ where /// Process States. pub type ProcessState = u32 ; pub const DebugThreadParam_DebugThreadParam_ActualPriority : DebugThreadParam = 0 ; pub const DebugThreadParam_DebugThreadParam_State : DebugThreadParam = 1 ; pub const DebugThreadParam_DebugThreadParam_IdealCore : DebugThreadParam = 2 ; pub const DebugThreadParam_DebugThreadParam_CurrentCore : DebugThreadParam = 3 ; pub const DebugThreadParam_DebugThreadParam_CoreMask : DebugThreadParam = 4 ; /// Debug Thread Parameters. - pub type DebugThreadParam = u32 ; extern "C" { + pub type DebugThreadParam = u32 ; + /// < Bitmask of allowed Core IDs. + pub const InfoType_InfoType_CoreMask : InfoType = 0 ; + /// < Bitmask of allowed Thread Priorities. + pub const InfoType_InfoType_PriorityMask : InfoType = 1 ; + /// < Base of the Alias memory region. + pub const InfoType_InfoType_AliasRegionAddress : InfoType = 2 ; + /// < Size of the Alias memory region. + pub const InfoType_InfoType_AliasRegionSize : InfoType = 3 ; + /// < Base of the Heap memory region. + pub const InfoType_InfoType_HeapRegionAddress : InfoType = 4 ; + /// < Size of the Heap memory region. + pub const InfoType_InfoType_HeapRegionSize : InfoType = 5 ; + /// < Total amount of memory available for process. + pub const InfoType_InfoType_TotalMemorySize : InfoType = 6 ; + /// < Amount of memory currently used by process. + pub const InfoType_InfoType_UsedMemorySize : InfoType = 7 ; + /// < Whether current process is being debugged. + pub const InfoType_InfoType_DebuggerAttached : InfoType = 8 ; + /// < Current process's resource limit handle. + pub const InfoType_InfoType_ResourceLimit : InfoType = 9 ; + /// < Number of idle ticks on CPU. + pub const InfoType_InfoType_IdleTickCount : InfoType = 10 ; + /// < 2.0.0+ Random entropy for current process. + pub const InfoType_InfoType_RandomEntropy : InfoType = 11 ; + /// < 2.0.0+ Base of the process's address space. + pub const InfoType_InfoType_AslrRegionAddress : InfoType = 12 ; + /// < 2.0.0+ Size of the process's address space. + pub const InfoType_InfoType_AslrRegionSize : InfoType = 13 ; + /// < 2.0.0+ Base of the Stack memory region. + pub const InfoType_InfoType_StackRegionAddress : InfoType = 14 ; + /// < 2.0.0+ Size of the Stack memory region. + pub const InfoType_InfoType_StackRegionSize : InfoType = 15 ; + /// < 3.0.0+ Total memory allocated for process memory management. + pub const InfoType_InfoType_SystemResourceSizeTotal : InfoType = 16 ; + /// < 3.0.0+ Amount of memory currently used by process memory management. + pub const InfoType_InfoType_SystemResourceSizeUsed : InfoType = 17 ; + /// < 3.0.0+ Title ID for the process. + pub const InfoType_InfoType_TitleId : InfoType = 18 ; + /// < 4.0.0-4.1.0 Min/max initial process IDs. + pub const InfoType_InfoType_InitialProcessIdRange : InfoType = 19 ; + /// < 5.0.0+ Address of the process's exception context (for break). + pub const InfoType_InfoType_UserExceptionContextAddress : InfoType = 20 ; + /// < 6.0.0+ Total amount of memory available for process, excluding that for process memory management. + pub const InfoType_InfoType_TotalNonSystemMemorySize : InfoType = 21 ; + /// < 6.0.0+ Amount of memory used by process, excluding that for process memory management. + pub const InfoType_InfoType_UsedNonSystemMemorySize : InfoType = 22 ; + /// < Number of ticks spent on thread. + pub const InfoType_InfoType_ThreadTickCount : InfoType = 4026531842 ; + /// GetInfo IDs. + pub type InfoType = u32 ; + /// < Total amount of DRAM available to system. + pub const SystemInfoType_SystemInfoType_TotalPhysicalMemorySize : SystemInfoType = 0 ; + /// < Current amount of DRAM used by system. + pub const SystemInfoType_SystemInfoType_UsedPhysicalMemorySize : SystemInfoType = 1 ; + /// < Min/max initial process IDs. + pub const SystemInfoType_SystemInfoType_InitialProcessIdRange : SystemInfoType = 2 ; + /// GetSystemInfo IDs. + pub type SystemInfoType = u32 ; + /// < Tick count on core 0. + pub const TickCountInfo_TickCountInfo_Core0 : TickCountInfo = 0 ; + /// < Tick count on core 1. + pub const TickCountInfo_TickCountInfo_Core1 : TickCountInfo = 1 ; + /// < Tick count on core 2. + pub const TickCountInfo_TickCountInfo_Core2 : TickCountInfo = 2 ; + /// < Tick count on core 3. + pub const TickCountInfo_TickCountInfo_Core3 : TickCountInfo = 3 ; + /// < Tick count on all cores. + pub const TickCountInfo_TickCountInfo_Total : TickCountInfo = 18446744073709551615 ; + /// GetInfo Idle/Thread Tick Count Sub IDs. + pub type TickCountInfo = u64 ; + /// < Lowest initial process ID. + pub const InitialProcessIdRangeInfo_InitialProcessIdRangeInfo_Minimum : InitialProcessIdRangeInfo = 0 ; + /// < Highest initial process ID. + pub const InitialProcessIdRangeInfo_InitialProcessIdRangeInfo_Maximum : InitialProcessIdRangeInfo = 1 ; + /// GetInfo InitialProcessIdRange Sub IDs. + pub type InitialProcessIdRangeInfo = u32 ; + /// < Memory allocated for application usage. + pub const PhysicalMemoryInfo_PhysicalMemoryInfo_Application : PhysicalMemoryInfo = 0 ; + /// < Memory allocated for applet usage. + pub const PhysicalMemoryInfo_PhysicalMemoryInfo_Applet : PhysicalMemoryInfo = 1 ; + /// < Memory allocated for system usage. + pub const PhysicalMemoryInfo_PhysicalMemoryInfo_System : PhysicalMemoryInfo = 2 ; + /// < Memory allocated for unsafe system usage (accessible to devices). + pub const PhysicalMemoryInfo_PhysicalMemoryInfo_SystemUnsafe : PhysicalMemoryInfo = 3 ; + /// GetSystemInfo PhysicalMemory Sub IDs. + pub type PhysicalMemoryInfo = u32 ; extern "C" { /// @brief Set the process heap to a given size. It can both extend and shrink the heap. /// @param[out] out_addr Variable to which write the address of the heap (which is randomized and fixed by the kernel) /// @param[in] size Size of the heap, must be a multiple of 0x2000000 and [2.0.0+] less than 0x18000000. @@ -998,7 +1084,7 @@ where /// @return Result code. /// @note Syscall number 0x79. /// @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. - pub fn svcCreateProcess ( out : * mut Handle , proc_info : * mut ctypes :: c_void , caps : * mut u32 , cap_num : u64 ) -> Result ; } extern "C" { + pub fn svcCreateProcess ( out : * mut Handle , proc_info : * const ctypes :: c_void , caps : * const u32 , cap_num : u64 ) -> Result ; } extern "C" { /// @brief Starts executing a freshly created process. /// @return Result code. /// @note Syscall number 0x7A. @@ -1153,7 +1239,45 @@ where /// @brief Frees up resources used by a shared memory object, unmapping and closing handles, etc. /// @param s Shared memory information structure. /// @return Result code. - pub fn shmemClose ( s : * mut SharedMemory ) -> Result ; } # [ repr ( C ) ] pub struct Event { pub revent : Handle , pub wevent : Handle , pub autoclear : bool , } # [ test ] fn bindgen_test_layout_Event ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Event > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( Event ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Event > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( Event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Event > ( ) ) ) . revent as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Event ) , "::" , stringify ! ( revent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Event > ( ) ) ) . wevent as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( Event ) , "::" , stringify ! ( wevent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Event > ( ) ) ) . autoclear as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Event ) , "::" , stringify ! ( autoclear ) ) ) ; } extern "C" { pub fn eventCreate ( t : * mut Event , autoclear : bool ) -> Result ; } extern "C" { pub fn eventLoadRemote ( t : * mut Event , handle : Handle , autoclear : bool ) ; } extern "C" { pub fn eventClose ( t : * mut Event ) ; } extern "C" { pub fn eventWait ( t : * mut Event , timeout : u64 ) -> Result ; } extern "C" { pub fn eventFire ( t : * mut Event ) -> Result ; } extern "C" { pub fn eventClear ( t : * mut Event ) -> Result ; } + pub fn shmemClose ( s : * mut SharedMemory ) -> Result ; } + /// Kernel-mode event structure. + # [ repr ( C ) ] pub struct Event { + /// < Read-only event handle + pub revent : Handle , + /// < Write-only event handle + pub wevent : Handle , + /// < Autoclear flag + pub autoclear : bool , } # [ test ] fn bindgen_test_layout_Event ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Event > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( Event ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Event > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( Event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Event > ( ) ) ) . revent as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Event ) , "::" , stringify ! ( revent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Event > ( ) ) ) . wevent as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( Event ) , "::" , stringify ! ( wevent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Event > ( ) ) ) . autoclear as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Event ) , "::" , stringify ! ( autoclear ) ) ) ; } extern "C" { + /// @brief Creates a kernel-mode event. +/// @param[out] t Pointer to \ref Event structure. +/// @param[in] autoclear Autoclear flag. +/// @return Result code. +/// @warning This is a privileged operation; in normal circumstances applications shouldn't use this function. + pub fn eventCreate ( t : * mut Event , autoclear : bool ) -> Result ; } extern "C" { + /// @brief Loads a kernel-mode event obtained from IPC. +/// @param[out] t Pointer to \ref Event structure. +/// @param[in] handle Read-only event handle. +/// @param[in] autoclear Autoclear flag. + pub fn eventLoadRemote ( t : * mut Event , handle : Handle , autoclear : bool ) ; } extern "C" { + /// @brief Closes a kernel-mode event. +/// @param[in] t Pointer to \ref Event structure. + pub fn eventClose ( t : * mut Event ) ; } extern "C" { + /// @brief Waits on a kernel-mode event. +/// @param[in] t Pointer to \ref Event structure. +/// @param[in] timeout Timeout in nanoseconds (pass UINT64_MAX to wait indefinitely). +/// @return Result code. + pub fn eventWait ( t : * mut Event , timeout : u64 ) -> Result ; } extern "C" { + /// @brief Signals a kernel-mode event. +/// @param[in] t Pointer to \ref Event structure. +/// @return Result code. +/// @note This function only works for events initialized with \ref eventCreate, it doesn't work with events initialized with \ref eventLoadRemote. +/// @warning This is a privileged operation; in normal circumstances applications shouldn't use this function. + pub fn eventFire ( t : * mut Event ) -> Result ; } extern "C" { + /// @brief Clears a kernel-mode event. +/// @param[in] t Pointer to \ref Event structure. +/// @return Result code. +/// @note This function shouldn't be used on autoclear events. + pub fn eventClear ( t : * mut Event ) -> Result ; } /// User-mode event object. # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct UEvent { pub waitable : Waitable , pub signal : bool , pub auto_clear : bool , } # [ test ] fn bindgen_test_layout_UEvent ( ) { assert_eq ! ( :: core :: mem :: size_of :: < UEvent > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( UEvent ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < UEvent > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( UEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UEvent > ( ) ) ) . waitable as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UEvent ) , "::" , stringify ! ( waitable ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UEvent > ( ) ) ) . signal as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( UEvent ) , "::" , stringify ! ( signal ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UEvent > ( ) ) ) . auto_clear as * const _ as usize } , 33usize , concat ! ( "Offset of field: " , stringify ! ( UEvent ) , "::" , stringify ! ( auto_clear ) ) ) ; } extern "C" { /// @brief Creates a user-mode event. @@ -1519,6 +1643,9 @@ where /// @brief Check whether SM is initialized. /// @return true if initialized. pub fn smHasInitialized ( ) -> bool ; } extern "C" { + /// @brief Gets the Service session used to communicate with SM. +/// @return Pointer to service session used to communicate with SM. + pub fn smGetServiceSession ( ) -> * mut Service ; } extern "C" { /// @brief Encodes a service name as a 64-bit integer. /// @param[in] name Name of the service. /// @return Encoded name. @@ -1526,7 +1653,7 @@ where /// @brief Overrides a service with a custom IPC service handle. /// @param[in] name Name of the service (as 64-bit integer). /// @param[in] handle IPC session handle. - pub fn smAddOverrideHandle ( name : u64 , handle : Handle ) ; } # [ repr ( C ) ] pub struct FsFileSystem { pub s : Service , } # [ test ] fn bindgen_test_layout_FsFileSystem ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsFileSystem > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsFileSystem ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsFileSystem > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsFileSystem ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsFileSystem > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsFileSystem ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsFile { pub s : Service , } # [ test ] fn bindgen_test_layout_FsFile ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsFile > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsFile ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsFile > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsFile ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsFile > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsFile ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsDir { pub s : Service , } # [ test ] fn bindgen_test_layout_FsDir ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsDir > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsDir ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsDir > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsDir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsDir > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsDir ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsStorage { pub s : Service , } # [ test ] fn bindgen_test_layout_FsStorage ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsStorage > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsStorage ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsStorage > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsStorage > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsStorage ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsSaveDataIterator { pub s : Service , } # [ test ] fn bindgen_test_layout_FsSaveDataIterator ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSaveDataIterator > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsSaveDataIterator ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSaveDataIterator > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsSaveDataIterator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataIterator > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataIterator ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsEventNotifier { pub s : Service , } # [ test ] fn bindgen_test_layout_FsEventNotifier ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsEventNotifier > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsEventNotifier ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsEventNotifier > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsEventNotifier ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsEventNotifier > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsEventNotifier ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsDeviceOperator { pub s : Service , } # [ test ] fn bindgen_test_layout_FsDeviceOperator ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsDeviceOperator > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsDeviceOperator ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsDeviceOperator > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsDeviceOperator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsDeviceOperator > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsDeviceOperator ) , "::" , stringify ! ( s ) ) ) ; } + pub fn smAddOverrideHandle ( name : u64 , handle : Handle ) ; } # [ repr ( C ) ] pub struct FsRightsId { pub c : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_FsRightsId ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsRightsId > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( FsRightsId ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsRightsId > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( FsRightsId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsRightsId > ( ) ) ) . c as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsRightsId ) , "::" , stringify ! ( c ) ) ) ; } # [ repr ( C ) ] pub struct FsFileSystem { pub s : Service , } # [ test ] fn bindgen_test_layout_FsFileSystem ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsFileSystem > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsFileSystem ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsFileSystem > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsFileSystem ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsFileSystem > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsFileSystem ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsFile { pub s : Service , } # [ test ] fn bindgen_test_layout_FsFile ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsFile > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsFile ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsFile > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsFile ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsFile > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsFile ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsDir { pub s : Service , } # [ test ] fn bindgen_test_layout_FsDir ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsDir > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsDir ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsDir > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsDir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsDir > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsDir ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsStorage { pub s : Service , } # [ test ] fn bindgen_test_layout_FsStorage ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsStorage > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsStorage ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsStorage > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsStorage > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsStorage ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsSaveDataIterator { pub s : Service , } # [ test ] fn bindgen_test_layout_FsSaveDataIterator ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSaveDataIterator > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsSaveDataIterator ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSaveDataIterator > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsSaveDataIterator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataIterator > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataIterator ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsEventNotifier { pub s : Service , } # [ test ] fn bindgen_test_layout_FsEventNotifier ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsEventNotifier > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsEventNotifier ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsEventNotifier > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsEventNotifier ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsEventNotifier > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsEventNotifier ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct FsDeviceOperator { pub s : Service , } # [ test ] fn bindgen_test_layout_FsDeviceOperator ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsDeviceOperator > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( FsDeviceOperator ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsDeviceOperator > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsDeviceOperator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsDeviceOperator > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsDeviceOperator ) , "::" , stringify ! ( s ) ) ) ; } /// Directory entry. # [ repr ( C ) ] pub struct FsDirectoryEntry { /// < Entry name. @@ -1544,7 +1671,7 @@ where /// < saveID, 0 for SaveData. pub saveID : u64 , /// < See \ref FsSaveDataType. - pub SaveDataType : u8 , + pub saveDataType : u8 , /// < Save data 'rank' or 'precedence'. 0 if this save data is considered the primary save data. 1 if it's considered the secondary save data. pub rank : u8 , /// < Save data index. @@ -1558,11 +1685,49 @@ where /// < 0 for SystemSaveData/SaveData. pub unk_x38 : u64 , } # [ repr ( C , packed ) ] # [ derive ( Copy , Clone ) ] pub union FsSave__bindgen_ty_1 { /// < userID of the user-specific savedata to access, otherwise FS_SAVEDATA_USERID_COMMONSAVE. See account.h. - pub userID : u128 , _bindgen_union_align : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_FsSave__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSave__bindgen_ty_1 > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( FsSave__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSave__bindgen_ty_1 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( FsSave__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave__bindgen_ty_1 > ( ) ) ) . userID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSave__bindgen_ty_1 ) , "::" , stringify ! ( userID ) ) ) ; } # [ test ] fn bindgen_test_layout_FsSave ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSave > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( FsSave ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSave > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( FsSave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . saveID as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( saveID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . SaveDataType as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( SaveDataType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . rank as * const _ as usize } , 33usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( rank ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . index as * const _ as usize } , 34usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . pad_x24 as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( pad_x24 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . unk_x28 as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( unk_x28 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . unk_x30 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( unk_x30 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . unk_x38 as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( unk_x38 ) ) ) ; } # [ repr ( C ) ] pub struct FsSaveDataInfo { pub saveID_unk : u64 , + pub userID : u128 , _bindgen_union_align : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_FsSave__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSave__bindgen_ty_1 > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( FsSave__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSave__bindgen_ty_1 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( FsSave__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave__bindgen_ty_1 > ( ) ) ) . userID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSave__bindgen_ty_1 ) , "::" , stringify ! ( userID ) ) ) ; } # [ test ] fn bindgen_test_layout_FsSave ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSave > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( FsSave ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSave > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( FsSave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . saveID as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( saveID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . saveDataType as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( saveDataType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . rank as * const _ as usize } , 33usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( rank ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . index as * const _ as usize } , 34usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . pad_x24 as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( pad_x24 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . unk_x28 as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( unk_x28 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . unk_x30 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( unk_x30 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSave > ( ) ) ) . unk_x38 as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( FsSave ) , "::" , stringify ! ( unk_x38 ) ) ) ; } + /// SaveDataExtraData Struct + # [ repr ( C ) ] pub struct FsSaveDataExtraData { + /// < Save struct. + pub save : FsSave , + /// < Title id of the owner of this save data. 0 for SystemSaveData. + pub ownerId : u64 , + /// < POSIX timestamp. + pub timestamp : u64 , + /// < Save data flags. See \ref FsSaveDataFlags. + pub flags : u32 , + /// < Normally 0. Possibly unused? + pub unk_x54 : u32 , + /// < Usable save data size. + pub dataSize : u64 , + /// < Journal size of the save data. + pub journalSize : u64 , + /// < Id of the latest commit. + pub commitId : u64 , + /// < Uninitialized. + pub unused : [ u8 ; 400usize ] , } # [ test ] fn bindgen_test_layout_FsSaveDataExtraData ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSaveDataExtraData > ( ) , 512usize , concat ! ( "Size of: " , stringify ! ( FsSaveDataExtraData ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSaveDataExtraData > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( FsSaveDataExtraData ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . save as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( save ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . ownerId as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( ownerId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . timestamp as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . flags as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . unk_x54 as * const _ as usize } , 84usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( unk_x54 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . dataSize as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( dataSize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . journalSize as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( journalSize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . commitId as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( commitId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataExtraData > ( ) ) ) . unused as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataExtraData ) , "::" , stringify ! ( unused ) ) ) ; } + /// SaveCreate Struct + # [ repr ( C ) ] pub struct FsSaveCreate { + /// < Size of the save data. + pub size : u64 , + /// < Journal size of the save data. + pub journalSize : u64 , + /// < Block size of the save data. + pub blockSize : u64 , + /// < Title id of the owner of this save data. 0 for SystemSaveData. + pub ownerId : u64 , + /// < Save data flags. See \ref FsSaveDataFlags. + pub flags : u32 , + /// < See \ref FsSaveDataSpaceId. + pub saveDataSpaceId : u8 , + /// < 0 for SystemSaveData. + pub unk : u8 , + /// < Uninitialized for SystemSaveData. + pub padding : [ u8 ; 26usize ] , } # [ test ] fn bindgen_test_layout_FsSaveCreate ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSaveCreate > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( FsSaveCreate ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSaveCreate > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( FsSaveCreate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . journalSize as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( journalSize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . blockSize as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( blockSize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . ownerId as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( ownerId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . flags as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . saveDataSpaceId as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( saveDataSpaceId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . unk as * const _ as usize } , 37usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( unk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveCreate > ( ) ) ) . padding as * const _ as usize } , 38usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveCreate ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct FsSaveDataInfo { pub saveID_unk : u64 , /// < See \ref FsSaveDataSpaceId. - pub SaveDataSpaceId : u8 , + pub saveDataSpaceId : u8 , /// < See \ref FsSaveDataType. - pub SaveDataType : u8 , + pub saveDataType : u8 , /// < Padding. pub pad : [ u8 ; 6usize ] , /// < See userID for \ref FsSave. @@ -1578,7 +1743,7 @@ where /// < Save data 'rank' or 'precedence'. 0 if this save data is considered the primary save data. 1 if it's considered the secondary save data. pub rank : u8 , /// < Unknown. Usually zeros? - pub unk_x3b : [ u8 ; 37usize ] , } # [ test ] fn bindgen_test_layout_FsSaveDataInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSaveDataInfo > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( FsSaveDataInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSaveDataInfo > ( ) , 16usize , concat ! ( "Alignment of " , stringify ! ( FsSaveDataInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . saveID_unk as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( saveID_unk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . SaveDataSpaceId as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( SaveDataSpaceId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . SaveDataType as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( SaveDataType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . pad as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . userID as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( userID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . saveID as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( saveID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . titleID as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . size as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . index as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . rank as * const _ as usize } , 58usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( rank ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . unk_x3b as * const _ as usize } , 59usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( unk_x3b ) ) ) ; } # [ repr ( C ) ] pub struct FsTimeStampRaw { + pub unk_x3b : [ u8 ; 37usize ] , } # [ test ] fn bindgen_test_layout_FsSaveDataInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsSaveDataInfo > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( FsSaveDataInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsSaveDataInfo > ( ) , 16usize , concat ! ( "Alignment of " , stringify ! ( FsSaveDataInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . saveID_unk as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( saveID_unk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . saveDataSpaceId as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( saveDataSpaceId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . saveDataType as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( saveDataType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . pad as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . userID as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( userID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . saveID as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( saveID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . titleID as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . size as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . index as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . rank as * const _ as usize } , 58usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( rank ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsSaveDataInfo > ( ) ) ) . unk_x3b as * const _ as usize } , 59usize , concat ! ( "Offset of field: " , stringify ! ( FsSaveDataInfo ) , "::" , stringify ! ( unk_x3b ) ) ) ; } # [ repr ( C ) ] pub struct FsTimeStampRaw { /// < POSIX timestamp. pub created : u64 , /// < POSIX timestamp. @@ -1593,26 +1758,54 @@ where pub const FsFileFlags_FS_OPEN_WRITE : FsFileFlags = 2 ; /// < Append file. pub const FsFileFlags_FS_OPEN_APPEND : FsFileFlags = 4 ; pub type FsFileFlags = u32 ; + /// < Creates a ConcatenationFile (dir with archive bit) instead of file. + pub const FsFileCreateFlags_FS_CREATE_BIG_FILE : FsFileCreateFlags = 1 ; pub type FsFileCreateFlags = u32 ; /// < Enable reading directory entries. pub const FsDirectoryFlags_FS_DIROPEN_DIRECTORY : FsDirectoryFlags = 1 ; /// < Enable reading file entries. pub const FsDirectoryFlags_FS_DIROPEN_FILE : FsDirectoryFlags = 2 ; + /// < Causes result entries to not contain filesize information (always 0). + pub const FsDirectoryFlags_FS_DIROPEN_NO_FILE_SIZE : FsDirectoryFlags = 2147483648 ; /// For use with fsFsOpenDirectory. - pub type FsDirectoryFlags = u32 ; pub const FsStorageId_FsStorageId_None : FsStorageId = 0 ; pub const FsStorageId_FsStorageId_Host : FsStorageId = 1 ; pub const FsStorageId_FsStorageId_GameCard : FsStorageId = 2 ; pub const FsStorageId_FsStorageId_NandSystem : FsStorageId = 3 ; pub const FsStorageId_FsStorageId_NandUser : FsStorageId = 4 ; pub const FsStorageId_FsStorageId_SdCard : FsStorageId = 5 ; pub type FsStorageId = u32 ; pub const FsContentStorageId_FS_CONTENTSTORAGEID_NandSystem : FsContentStorageId = 0 ; pub const FsContentStorageId_FS_CONTENTSTORAGEID_NandUser : FsContentStorageId = 1 ; pub const FsContentStorageId_FS_CONTENTSTORAGEID_SdCard : FsContentStorageId = 2 ; pub type FsContentStorageId = u32 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_NandSystem : FsSaveDataSpaceId = 0 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_NandUser : FsSaveDataSpaceId = 1 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_SdCard : FsSaveDataSpaceId = 2 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_TemporaryStorage : FsSaveDataSpaceId = 3 ; + pub type FsDirectoryFlags = u32 ; + /// < No Option. + pub const FsReadOption_FS_READOPTION_NONE : FsReadOption = 0 ; pub type FsReadOption = u32 ; + /// < No option. + pub const FsWriteOption_FS_WRITEOPTION_NONE : FsWriteOption = 0 ; + /// < Forces a flush after write. + pub const FsWriteOption_FS_WRITEOPTION_FLUSH : FsWriteOption = 1 ; pub type FsWriteOption = u32 ; pub const FsStorageId_FsStorageId_None : FsStorageId = 0 ; pub const FsStorageId_FsStorageId_Host : FsStorageId = 1 ; pub const FsStorageId_FsStorageId_GameCard : FsStorageId = 2 ; pub const FsStorageId_FsStorageId_NandSystem : FsStorageId = 3 ; pub const FsStorageId_FsStorageId_NandUser : FsStorageId = 4 ; pub const FsStorageId_FsStorageId_SdCard : FsStorageId = 5 ; pub type FsStorageId = u32 ; pub const FsContentStorageId_FS_CONTENTSTORAGEID_NandSystem : FsContentStorageId = 0 ; pub const FsContentStorageId_FS_CONTENTSTORAGEID_NandUser : FsContentStorageId = 1 ; pub const FsContentStorageId_FS_CONTENTSTORAGEID_SdCard : FsContentStorageId = 2 ; pub type FsContentStorageId = u32 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_NandSystem : FsSaveDataSpaceId = 0 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_NandUser : FsSaveDataSpaceId = 1 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_SdCard : FsSaveDataSpaceId = 2 ; pub const FsSaveDataSpaceId_FsSaveDataSpaceId_TemporaryStorage : FsSaveDataSpaceId = 3 ; /// < Pseudo value for fsOpenSaveDataIterator(). pub const FsSaveDataSpaceId_FsSaveDataSpaceId_All : FsSaveDataSpaceId = -1 ; pub type FsSaveDataSpaceId = i32 ; pub const FsSaveDataType_FsSaveDataType_SystemSaveData : FsSaveDataType = 0 ; pub const FsSaveDataType_FsSaveDataType_SaveData : FsSaveDataType = 1 ; pub const FsSaveDataType_FsSaveDataType_BcatDeliveryCacheStorage : FsSaveDataType = 2 ; pub const FsSaveDataType_FsSaveDataType_DeviceSaveData : FsSaveDataType = 3 ; /// < [3.0.0+] pub const FsSaveDataType_FsSaveDataType_TemporaryStorage : FsSaveDataType = 4 ; /// < [3.0.0+] - pub const FsSaveDataType_FsSaveDataType_CacheStorage : FsSaveDataType = 5 ; pub type FsSaveDataType = u32 ; + pub const FsSaveDataType_FsSaveDataType_CacheStorage : FsSaveDataType = 5 ; pub type FsSaveDataType = u32 ; pub const FsSaveDataFlags_FsSaveDataFlags_SurviveFactoryReset : FsSaveDataFlags = 1 ; pub const FsSaveDataFlags_FsSaveDataFlags_SurviveFactoryResetForRefurbishment : FsSaveDataFlags = 2 ; pub const FsSaveDataFlags_FsSaveDataFlags_SurviveFactoryResetWithoutUserSaveData : FsSaveDataFlags = 4 ; + /// SaveDataFlags + pub type FsSaveDataFlags = u32 ; /// < Causes the cartridge to automatically start on bootup pub const FsGameCardAttribute_FsGameCardAttribute_AutoBoot : FsGameCardAttribute = 1 ; /// < Causes NS to throw an error on attempt to load the cartridge pub const FsGameCardAttribute_FsGameCardAttribute_ForceError : FsGameCardAttribute = 2 ; /// < Indicates that this gamecard is a repair tool. - pub const FsGameCardAttribute_FsGameCardAttribute_Repair : FsGameCardAttribute = 4 ; pub type FsGameCardAttribute = u32 ; # [ repr ( C ) ] pub struct FsGameCardHandle { pub value : u32 , } # [ test ] fn bindgen_test_layout_FsGameCardHandle ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsGameCardHandle > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( FsGameCardHandle ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsGameCardHandle > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsGameCardHandle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsGameCardHandle > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsGameCardHandle ) , "::" , stringify ! ( value ) ) ) ; } extern "C" { pub fn fsInitialize ( ) -> Result ; } extern "C" { pub fn fsExit ( ) ; } extern "C" { pub fn fsGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn fsOpenBisStorage ( out : * mut FsStorage , PartitionId : u32 ) -> Result ; } extern "C" { pub fn fsOpenBisFileSystem ( out : * mut FsFileSystem , PartitionId : u32 , string : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsIsExFatSupported ( out : * mut bool ) -> Result ; } extern "C" { + pub const FsGameCardAttribute_FsGameCardAttribute_Repair : FsGameCardAttribute = 4 ; pub type FsGameCardAttribute = u32 ; pub const FsGameCardPartiton_FsGameCardPartiton_Update : FsGameCardPartiton = 0 ; pub const FsGameCardPartiton_FsGameCardPartiton_Normal : FsGameCardPartiton = 1 ; pub const FsGameCardPartiton_FsGameCardPartiton_Secure : FsGameCardPartiton = 2 ; pub type FsGameCardPartiton = u32 ; # [ repr ( C ) ] pub struct FsGameCardHandle { pub value : u32 , } # [ test ] fn bindgen_test_layout_FsGameCardHandle ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsGameCardHandle > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( FsGameCardHandle ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsGameCardHandle > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsGameCardHandle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsGameCardHandle > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsGameCardHandle ) , "::" , stringify ! ( value ) ) ) ; } # [ repr ( C ) ] pub struct FsRangeInfo { + /// < Contains bitflags describing how data is AES encrypted. + pub aes_ctr_key_type : u32 , + /// < Contains bitflags describing how data is emulated. + pub speed_emulation_type : u32 , pub reserved : [ u32 ; 14usize ] , } # [ test ] fn bindgen_test_layout_FsRangeInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < FsRangeInfo > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( FsRangeInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < FsRangeInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FsRangeInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsRangeInfo > ( ) ) ) . aes_ctr_key_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FsRangeInfo ) , "::" , stringify ! ( aes_ctr_key_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsRangeInfo > ( ) ) ) . speed_emulation_type as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( FsRangeInfo ) , "::" , stringify ! ( speed_emulation_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < FsRangeInfo > ( ) ) ) . reserved as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FsRangeInfo ) , "::" , stringify ! ( reserved ) ) ) ; } + /// < Fill range with zero for supported file/storage. + pub const FsOperationId_FsOperationId_Clear : FsOperationId = 0 ; + /// < Clears signature for supported file/storage. + pub const FsOperationId_FsOperationId_ClearSignature : FsOperationId = 1 ; + /// < Invalidates cache for supported file/storage. + pub const FsOperationId_FsOperationId_InvalidateCache : FsOperationId = 2 ; + /// < Retrieves information on data for supported file/storage. + pub const FsOperationId_FsOperationId_QueryRange : FsOperationId = 3 ; pub type FsOperationId = u32 ; pub const FsBisStorageId_FsBisStorageId_Boot0 : FsBisStorageId = 0 ; pub const FsBisStorageId_FsBisStorageId_Boot1 : FsBisStorageId = 10 ; pub const FsBisStorageId_FsBisStorageId_UserDataRoot : FsBisStorageId = 20 ; pub const FsBisStorageId_FsBisStorageId_BootConfigAndPackage2NormalMain : FsBisStorageId = 21 ; pub const FsBisStorageId_FsBisStorageId_BootConfigAndPackage2NormalSub : FsBisStorageId = 22 ; pub const FsBisStorageId_FsBisStorageId_BootConfigAndPackage2SafeMain : FsBisStorageId = 23 ; pub const FsBisStorageId_FsBisStorageId_BootConfigAndPackage2SafeSub : FsBisStorageId = 24 ; pub const FsBisStorageId_FsBisStorageId_BootConfigAndPackage2RepairMain : FsBisStorageId = 25 ; pub const FsBisStorageId_FsBisStorageId_BootConfigAndPackage2RepairSub : FsBisStorageId = 26 ; pub const FsBisStorageId_FsBisStorageId_CalibrationBinary : FsBisStorageId = 27 ; pub const FsBisStorageId_FsBisStorageId_CalibrationFile : FsBisStorageId = 28 ; pub const FsBisStorageId_FsBisStorageId_SafeMode : FsBisStorageId = 29 ; pub const FsBisStorageId_FsBisStorageId_User : FsBisStorageId = 30 ; pub const FsBisStorageId_FsBisStorageId_System : FsBisStorageId = 31 ; pub const FsBisStorageId_FsBisStorageId_SystemProperEncryption : FsBisStorageId = 32 ; pub const FsBisStorageId_FsBisStorageId_SystemProperPartition : FsBisStorageId = 33 ; pub type FsBisStorageId = u32 ; extern "C" { pub fn fsInitialize ( ) -> Result ; } extern "C" { pub fn fsExit ( ) ; } extern "C" { pub fn fsGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn fsOpenBisStorage ( out : * mut FsStorage , partitionId : FsBisStorageId ) -> Result ; } extern "C" { pub fn fsOpenBisFileSystem ( out : * mut FsFileSystem , partitionId : FsBisStorageId , string : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsCreateSaveDataFileSystemBySystemSaveDataId ( save : * const FsSave , create : * const FsSaveCreate ) -> Result ; } extern "C" { pub fn fsDeleteSaveDataFileSystemBySaveDataSpaceId ( saveDataSpaceId : FsSaveDataSpaceId , saveID : u64 ) -> Result ; } extern "C" { pub fn fsIsExFatSupported ( out : * mut bool ) -> Result ; } extern "C" { pub fn fsOpenGameCardFileSystem ( out : * mut FsFileSystem , handle : * const FsGameCardHandle , partition : FsGameCardPartiton ) -> Result ; } extern "C" { pub fn fsReadSaveDataFileSystemExtraDataBySaveDataSpaceId ( buf : * mut ctypes :: c_void , len : usize , saveDataSpaceId : FsSaveDataSpaceId , saveID : u64 ) -> Result ; } extern "C" { pub fn fsReadSaveDataFileSystemExtraData ( buf : * mut ctypes :: c_void , len : usize , saveID : u64 ) -> Result ; } extern "C" { pub fn fsWriteSaveDataFileSystemExtraData ( buf : * const ctypes :: c_void , len : usize , saveDataSpaceId : FsSaveDataSpaceId , saveID : u64 ) -> Result ; } extern "C" { /// Do not call this directly, see fs_dev.h. - pub fn fsMountSdcard ( out : * mut FsFileSystem ) -> Result ; } extern "C" { pub fn fsMountSaveData ( out : * mut FsFileSystem , inval : u8 , save : * mut FsSave ) -> Result ; } extern "C" { pub fn fsMountSystemSaveData ( out : * mut FsFileSystem , inval : u8 , save : * mut FsSave ) -> Result ; } extern "C" { pub fn fsOpenSaveDataIterator ( out : * mut FsSaveDataIterator , SaveDataSpaceId : s32 ) -> Result ; } extern "C" { pub fn fsOpenDataStorageByCurrentProcess ( out : * mut FsStorage ) -> Result ; } extern "C" { pub fn fsOpenDataStorageByDataId ( out : * mut FsStorage , dataId : u64 , storageId : FsStorageId ) -> Result ; } extern "C" { pub fn fsOpenDeviceOperator ( out : * mut FsDeviceOperator ) -> Result ; } extern "C" { pub fn fsOpenSdCardDetectionEventNotifier ( out : * mut FsEventNotifier ) -> Result ; } extern "C" { + pub fn fsMountSdcard ( out : * mut FsFileSystem ) -> Result ; } extern "C" { pub fn fsMountSaveData ( out : * mut FsFileSystem , inval : u8 , save : * mut FsSave ) -> Result ; } extern "C" { pub fn fsMountSystemSaveData ( out : * mut FsFileSystem , inval : u8 , save : * mut FsSave ) -> Result ; } extern "C" { pub fn fsOpenSaveDataIterator ( out : * mut FsSaveDataIterator , saveDataSpaceId : s32 ) -> Result ; } extern "C" { pub fn fsOpenContentStorageFileSystem ( out : * mut FsFileSystem , content_storage_id : FsContentStorageId ) -> Result ; } extern "C" { pub fn fsOpenDataStorageByCurrentProcess ( out : * mut FsStorage ) -> Result ; } extern "C" { pub fn fsOpenDataStorageByDataId ( out : * mut FsStorage , dataId : u64 , storageId : FsStorageId ) -> Result ; } extern "C" { pub fn fsOpenDeviceOperator ( out : * mut FsDeviceOperator ) -> Result ; } extern "C" { pub fn fsOpenSdCardDetectionEventNotifier ( out : * mut FsEventNotifier ) -> Result ; } extern "C" { + /// Retrieves the rights id corresponding to the content path. Only available on [2.0.0+]. + pub fn fsGetRightsIdByPath ( path : * const ctypes :: c_char , out_rights_id : * mut FsRightsId ) -> Result ; } extern "C" { + /// Retrieves the rights id and key generation corresponding to the content path. Only available on [3.0.0+]. + pub fn fsGetRightsIdAndKeyGenerationByPath ( path : * const ctypes :: c_char , out_key_generation : * mut u8 , out_rights_id : * mut FsRightsId ) -> Result ; } extern "C" { pub fn fsDisableAutoSaveDataCreation ( ) -> Result ; } extern "C" { pub fn fsCreate_SystemSaveDataWithOwner ( saveDataSpaceId : FsSaveDataSpaceId , saveID : u64 , userID : u128 , ownerId : u64 , size : u64 , journalSize : u64 , flags : u32 ) -> Result ; } extern "C" { pub fn fsCreate_SystemSaveData ( saveDataSpaceId : FsSaveDataSpaceId , saveID : u64 , size : u64 , journalSize : u64 , flags : u32 ) -> Result ; } extern "C" { /// Wrapper(s) for fsMountSaveData. /// See FsSave for titleID and userID. pub fn fsMount_SaveData ( out : * mut FsFileSystem , titleID : u64 , userID : u128 ) -> Result ; } extern "C" { @@ -1624,7 +1817,9 @@ where /// same as calling fsOpenFileSystemWithId with 0 as titleId pub fn fsOpenFileSystemWithId ( out : * mut FsFileSystem , titleId : u64 , fsType : FsFileSystemType , contentPath : * const ctypes :: c_char ) -> Result ; } extern "C" { /// works on all firmwares, titleId is ignored on 1.0.0 - pub fn fsFsCreateFile ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , size : usize , flags : ctypes :: c_int ) -> Result ; } extern "C" { pub fn fsFsDeleteFile ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsCreateDirectory ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsDeleteDirectory ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsDeleteDirectoryRecursively ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsRenameFile ( fs : * mut FsFileSystem , path0 : * const ctypes :: c_char , path1 : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsRenameDirectory ( fs : * mut FsFileSystem , path0 : * const ctypes :: c_char , path1 : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsGetEntryType ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut FsEntryType ) -> Result ; } extern "C" { pub fn fsFsOpenFile ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , flags : ctypes :: c_int , out : * mut FsFile ) -> Result ; } extern "C" { pub fn fsFsOpenDirectory ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , flags : ctypes :: c_int , out : * mut FsDir ) -> Result ; } extern "C" { pub fn fsFsCommit ( fs : * mut FsFileSystem ) -> Result ; } extern "C" { pub fn fsFsGetFreeSpace ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsFsGetTotalSpace ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsFsGetFileTimeStampRaw ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut FsTimeStampRaw ) -> Result ; } extern "C" { + pub fn fsOpenFileSystemWithPatch ( out : * mut FsFileSystem , titleId : u64 , fsType : FsFileSystemType ) -> Result ; } extern "C" { + /// 2.0.0+, like OpenFileSystemWithId but without content path. + pub fn fsFsCreateFile ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , size : usize , flags : ctypes :: c_int ) -> Result ; } extern "C" { pub fn fsFsDeleteFile ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsCreateDirectory ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsDeleteDirectory ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsDeleteDirectoryRecursively ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsRenameFile ( fs : * mut FsFileSystem , cur_path : * const ctypes :: c_char , new_path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsRenameDirectory ( fs : * mut FsFileSystem , cur_path : * const ctypes :: c_char , new_path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFsGetEntryType ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut FsEntryType ) -> Result ; } extern "C" { pub fn fsFsOpenFile ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , flags : ctypes :: c_int , out : * mut FsFile ) -> Result ; } extern "C" { pub fn fsFsOpenDirectory ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , flags : ctypes :: c_int , out : * mut FsDir ) -> Result ; } extern "C" { pub fn fsFsCommit ( fs : * mut FsFileSystem ) -> Result ; } extern "C" { pub fn fsFsGetFreeSpace ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsFsGetTotalSpace ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsFsGetFileTimeStampRaw ( fs : * mut FsFileSystem , path : * const ctypes :: c_char , out : * mut FsTimeStampRaw ) -> Result ; } extern "C" { /// 3.0.0+ pub fn fsFsCleanDirectoryRecursively ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { /// 3.0.0+ @@ -1633,9 +1828,15 @@ where pub fn fsFsClose ( fs : * mut FsFileSystem ) ; } extern "C" { /// Uses \ref fsFsQueryEntry to set the archive bit on the specified absolute directory path. /// This will cause HOS to treat the directory as if it were a file containing the directory's concatenated contents. - pub fn fsFsSetArchiveBit ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFileRead ( f : * mut FsFile , off : u64 , buf : * mut ctypes :: c_void , len : usize , out : * mut usize ) -> Result ; } extern "C" { pub fn fsFileWrite ( f : * mut FsFile , off : u64 , buf : * const ctypes :: c_void , len : usize ) -> Result ; } extern "C" { pub fn fsFileFlush ( f : * mut FsFile ) -> Result ; } extern "C" { pub fn fsFileSetSize ( f : * mut FsFile , sz : u64 ) -> Result ; } extern "C" { pub fn fsFileGetSize ( f : * mut FsFile , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsFileClose ( f : * mut FsFile ) ; } extern "C" { pub fn fsDirRead ( d : * mut FsDir , inval : u64 , total_entries : * mut usize , max_entries : usize , buf : * mut FsDirectoryEntry ) -> Result ; } extern "C" { pub fn fsDirGetEntryCount ( d : * mut FsDir , count : * mut u64 ) -> Result ; } extern "C" { pub fn fsDirClose ( d : * mut FsDir ) ; } extern "C" { pub fn fsStorageRead ( s : * mut FsStorage , off : u64 , buf : * mut ctypes :: c_void , len : usize ) -> Result ; } extern "C" { pub fn fsStorageWrite ( s : * mut FsStorage , off : u64 , buf : * const ctypes :: c_void , len : usize ) -> Result ; } extern "C" { pub fn fsStorageFlush ( s : * mut FsStorage ) -> Result ; } extern "C" { pub fn fsStorageSetSize ( s : * mut FsStorage , sz : u64 ) -> Result ; } extern "C" { pub fn fsStorageGetSize ( s : * mut FsStorage , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsStorageClose ( s : * mut FsStorage ) ; } extern "C" { + pub fn fsFsSetArchiveBit ( fs : * mut FsFileSystem , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn fsFileRead ( f : * mut FsFile , off : u64 , buf : * mut ctypes :: c_void , len : usize , option : u32 , out : * mut usize ) -> Result ; } extern "C" { pub fn fsFileWrite ( f : * mut FsFile , off : u64 , buf : * const ctypes :: c_void , len : usize , option : u32 ) -> Result ; } extern "C" { pub fn fsFileFlush ( f : * mut FsFile ) -> Result ; } extern "C" { pub fn fsFileSetSize ( f : * mut FsFile , sz : u64 ) -> Result ; } extern "C" { pub fn fsFileGetSize ( f : * mut FsFile , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsFileOperateRange ( f : * mut FsFile , op_id : FsOperationId , off : u64 , len : usize , out : * mut FsRangeInfo ) -> Result ; } extern "C" { + /// 4.0.0+ + pub fn fsFileClose ( f : * mut FsFile ) ; } extern "C" { pub fn fsDirRead ( d : * mut FsDir , inval : u64 , total_entries : * mut usize , max_entries : usize , buf : * mut FsDirectoryEntry ) -> Result ; } extern "C" { pub fn fsDirGetEntryCount ( d : * mut FsDir , count : * mut u64 ) -> Result ; } extern "C" { pub fn fsDirClose ( d : * mut FsDir ) ; } extern "C" { pub fn fsStorageRead ( s : * mut FsStorage , off : u64 , buf : * mut ctypes :: c_void , len : usize ) -> Result ; } extern "C" { pub fn fsStorageWrite ( s : * mut FsStorage , off : u64 , buf : * const ctypes :: c_void , len : usize ) -> Result ; } extern "C" { pub fn fsStorageFlush ( s : * mut FsStorage ) -> Result ; } extern "C" { pub fn fsStorageSetSize ( s : * mut FsStorage , sz : u64 ) -> Result ; } extern "C" { pub fn fsStorageGetSize ( s : * mut FsStorage , out : * mut u64 ) -> Result ; } extern "C" { pub fn fsStorageOperateRange ( s : * mut FsStorage , op_id : FsOperationId , off : u64 , len : usize , out : * mut FsRangeInfo ) -> Result ; } extern "C" { + /// 4.0.0+ + pub fn fsStorageClose ( s : * mut FsStorage ) ; } extern "C" { /// Read FsSaveDataInfo data into the buf array. - pub fn fsSaveDataIteratorRead ( s : * mut FsSaveDataIterator , buf : * mut FsSaveDataInfo , max_entries : usize , total_entries : * mut usize ) -> Result ; } extern "C" { pub fn fsSaveDataIteratorClose ( s : * mut FsSaveDataIterator ) ; } extern "C" { pub fn fsEventNotifierGetEventHandle ( e : * mut FsEventNotifier , out : * mut Handle ) -> Result ; } extern "C" { pub fn fsEventNotifierClose ( e : * mut FsEventNotifier ) ; } extern "C" { pub fn fsDeviceOperatorIsSdCardInserted ( d : * mut FsDeviceOperator , out : * mut bool ) -> Result ; } extern "C" { pub fn fsDeviceOperatorIsGameCardInserted ( d : * mut FsDeviceOperator , out : * mut bool ) -> Result ; } extern "C" { pub fn fsDeviceOperatorGetGameCardHandle ( d : * mut FsDeviceOperator , out : * mut FsGameCardHandle ) -> Result ; } extern "C" { pub fn fsDeviceOperatorGetGameCardAttribute ( d : * mut FsDeviceOperator , handle : * const FsGameCardHandle , out : * mut u8 ) -> Result ; } extern "C" { pub fn fsDeviceOperatorClose ( d : * mut FsDeviceOperator ) ; } extern "C" { pub fn smManagerInitialize ( ) -> Result ; } extern "C" { pub fn smManagerExit ( ) ; } extern "C" { pub fn smManagerRegisterProcess ( pid : u64 , acid_sac : * const ctypes :: c_void , acid_sac_size : usize , aci0_sac : * const ctypes :: c_void , aci0_sac_size : usize ) -> Result ; } extern "C" { pub fn smManagerUnregisterProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn fsldrInitialize ( ) -> Result ; } extern "C" { pub fn fsldrExit ( ) ; } extern "C" { pub fn fsldrOpenCodeFileSystem ( tid : u64 , path : * const ctypes :: c_char , out : * mut FsFileSystem ) -> Result ; } extern "C" { pub fn fsldrIsArchivedProgram ( pid : u64 , out : * mut bool ) -> Result ; } extern "C" { pub fn fsldrSetCurrentProcess ( ) -> Result ; } extern "C" { pub fn fsprInitialize ( ) -> Result ; } extern "C" { pub fn fsprExit ( ) ; } extern "C" { pub fn fsprRegisterProgram ( pid : u64 , titleID : u64 , storageID : FsStorageId , fs_access_header : * const ctypes :: c_void , fah_size : usize , fs_access_control : * const ctypes :: c_void , fac_size : usize ) -> Result ; } extern "C" { pub fn fsprUnregisterProgram ( pid : u64 ) -> Result ; } extern "C" { pub fn fsprSetCurrentProcess ( ) -> Result ; } extern "C" { pub fn fsprSetEnabledProgramVerification ( enabled : bool ) -> Result ; } # [ repr ( C ) ] pub struct AccountProfile { pub s : Service , } # [ test ] fn bindgen_test_layout_AccountProfile ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AccountProfile > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( AccountProfile ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AccountProfile > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AccountProfile ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfile > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfile ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C , packed ) ] pub struct AccountUserData { pub unk_x0 : u32 , + pub fn fsSaveDataIteratorRead ( s : * mut FsSaveDataIterator , buf : * mut FsSaveDataInfo , max_entries : usize , total_entries : * mut usize ) -> Result ; } extern "C" { pub fn fsSaveDataIteratorClose ( s : * mut FsSaveDataIterator ) ; } extern "C" { pub fn fsEventNotifierGetEventHandle ( e : * mut FsEventNotifier , out : * mut Handle ) -> Result ; } extern "C" { pub fn fsEventNotifierClose ( e : * mut FsEventNotifier ) ; } extern "C" { pub fn fsDeviceOperatorIsSdCardInserted ( d : * mut FsDeviceOperator , out : * mut bool ) -> Result ; } extern "C" { pub fn fsDeviceOperatorIsGameCardInserted ( d : * mut FsDeviceOperator , out : * mut bool ) -> Result ; } extern "C" { pub fn fsDeviceOperatorGetGameCardHandle ( d : * mut FsDeviceOperator , out : * mut FsGameCardHandle ) -> Result ; } extern "C" { pub fn fsDeviceOperatorGetGameCardAttribute ( d : * mut FsDeviceOperator , handle : * const FsGameCardHandle , out : * mut u8 ) -> Result ; } extern "C" { pub fn fsDeviceOperatorClose ( d : * mut FsDeviceOperator ) ; } extern "C" { pub fn smManagerInitialize ( ) -> Result ; } extern "C" { pub fn smManagerExit ( ) ; } extern "C" { pub fn smManagerGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn smManagerRegisterProcess ( pid : u64 , acid_sac : * const ctypes :: c_void , acid_sac_size : usize , aci0_sac : * const ctypes :: c_void , aci0_sac_size : usize ) -> Result ; } extern "C" { pub fn smManagerUnregisterProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn fsldrInitialize ( ) -> Result ; } extern "C" { pub fn fsldrExit ( ) ; } extern "C" { pub fn fsldrGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn fsldrOpenCodeFileSystem ( tid : u64 , path : * const ctypes :: c_char , out : * mut FsFileSystem ) -> Result ; } extern "C" { pub fn fsldrIsArchivedProgram ( pid : u64 , out : * mut bool ) -> Result ; } extern "C" { pub fn fsldrSetCurrentProcess ( ) -> Result ; } extern "C" { pub fn fsprInitialize ( ) -> Result ; } extern "C" { pub fn fsprExit ( ) ; } extern "C" { pub fn fsprGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn fsprRegisterProgram ( pid : u64 , titleID : u64 , storageID : FsStorageId , fs_access_header : * const ctypes :: c_void , fah_size : usize , fs_access_control : * const ctypes :: c_void , fac_size : usize ) -> Result ; } extern "C" { pub fn fsprUnregisterProgram ( pid : u64 ) -> Result ; } extern "C" { pub fn fsprSetCurrentProcess ( ) -> Result ; } extern "C" { pub fn fsprSetEnabledProgramVerification ( enabled : bool ) -> Result ; } + /// Profile + # [ repr ( C ) ] pub struct AccountProfile { pub s : Service , } # [ test ] fn bindgen_test_layout_AccountProfile ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AccountProfile > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( AccountProfile ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AccountProfile > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AccountProfile ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfile > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfile ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C , packed ) ] pub struct AccountUserData { pub unk_x0 : u32 , /// < Icon ID. 0 = Mii, the rest are character icon IDs. pub iconID : u32 , /// < Profile icon background color ID @@ -1647,7 +1848,7 @@ where /// < POSIX UTC timestamp, for the last account edit. pub lastEditTimestamp : u64 , /// < UTF-8 Username. - pub username : [ ctypes :: c_char ; 32usize ] , } # [ test ] fn bindgen_test_layout_AccountProfileBase ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AccountProfileBase > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AccountProfileBase ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AccountProfileBase > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( AccountProfileBase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfileBase > ( ) ) ) . userID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfileBase ) , "::" , stringify ! ( userID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfileBase > ( ) ) ) . lastEditTimestamp as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfileBase ) , "::" , stringify ! ( lastEditTimestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfileBase > ( ) ) ) . username as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfileBase ) , "::" , stringify ! ( username ) ) ) ; } extern "C" { pub fn accountInitialize ( ) -> Result ; } extern "C" { pub fn accountExit ( ) ; } extern "C" { pub fn accountGetService ( ) -> * mut Service ; } extern "C" { + pub username : [ ctypes :: c_char ; 32usize ] , } # [ test ] fn bindgen_test_layout_AccountProfileBase ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AccountProfileBase > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AccountProfileBase ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AccountProfileBase > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( AccountProfileBase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfileBase > ( ) ) ) . userID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfileBase ) , "::" , stringify ! ( userID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfileBase > ( ) ) ) . lastEditTimestamp as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfileBase ) , "::" , stringify ! ( lastEditTimestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AccountProfileBase > ( ) ) ) . username as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AccountProfileBase ) , "::" , stringify ! ( username ) ) ) ; } extern "C" { pub fn accountInitialize ( ) -> Result ; } extern "C" { pub fn accountExit ( ) ; } extern "C" { pub fn accountGetServiceSession ( ) -> * mut Service ; } extern "C" { /// Get the total number of user profiles pub fn accountGetUserCount ( user_count : * mut s32 ) -> Result ; } extern "C" { /// @brief Get a list of all user IDs. The returned list will never be larger than ACC_USER_LIST_SIZE. @@ -1655,9 +1856,8 @@ where /// @param max_userIDs Maximum number of user IDs to return. /// @param actual_total The actual total number of user IDs found. pub fn accountListAllUsers ( userIDs : * mut u128 , max_userIDs : usize , actual_total : * mut usize ) -> Result ; } extern "C" { - /// Get the userID for the currently active user. The output userID is only valid when the output account_selected==1, otherwise no user is currently selected. -/// An user is only selected when the user-account selection applet was used to select an user at least once before. - pub fn accountGetActiveUser ( userID : * mut u128 , account_selected : * mut bool ) -> Result ; } extern "C" { + /// Get the userID for the last opened user. The output userID is only valid when the output account_selected==1. + pub fn accountGetLastOpenedUser ( userID : * mut u128 , account_selected : * mut bool ) -> Result ; } extern "C" { /// Get an AccountProfile for the specified userID. pub fn accountGetProfile ( out : * mut AccountProfile , userID : u128 ) -> Result ; } extern "C" { /// Get \ref AccountUserData and \ref AccountProfileBase for the specified profile, userdata is optional (can be NULL). @@ -1666,7 +1866,8 @@ where pub fn accountProfileGetImageSize ( profile : * mut AccountProfile , image_size : * mut usize ) -> Result ; } extern "C" { /// Load the JPEG profile icon, valid for both Miis and character icons. The output image_size is the same as the one from \ref accountProfileGetImageSize. pub fn accountProfileLoadImage ( profile : * mut AccountProfile , buf : * mut ctypes :: c_void , len : usize , image_size : * mut usize ) -> Result ; } extern "C" { pub fn accountProfileClose ( profile : * mut AccountProfile ) ; } extern "C" { - /// Gets the userID which was selected by the profile-selector applet (if any), prior to launching the currently running Application title. This can only be used once under the current process, under an Application title. + /// Gets the userID which was selected by the profile-selector applet (if any), prior to launching the currently running Application title. +/// This gets the cached PreselectedUser loaded during accountInitialize, when PreselectedUser is available. pub fn accountGetPreselectedUser ( userID : * mut u128 ) -> Result ; } /// < Default, use normal PerformanceConfiguration. pub const ApmCpuBoostMode_ApmCpuBoostMode_Disabled : ApmCpuBoostMode = 0 ; @@ -1675,25 +1876,333 @@ where /// < Use performance configurations 0x9222000B and 0x9222000C. pub const ApmCpuBoostMode_ApmCpuBoostMode_Type2 : ApmCpuBoostMode = 2 ; /// CpuBoostMode. With \ref appletSetCpuBoostMode, only values 0/1 are available. This allows using higher clock rates. - pub type ApmCpuBoostMode = u32 ; extern "C" { pub fn apmInitialize ( ) -> Result ; } extern "C" { pub fn apmExit ( ) ; } extern "C" { pub fn apmSetPerformanceConfiguration ( PerformanceMode : u32 , PerformanceConfiguration : u32 ) -> Result ; } extern "C" { pub fn apmGetPerformanceConfiguration ( PerformanceMode : u32 , PerformanceConfiguration : * mut u32 ) -> Result ; } pub const AppletType_AppletType_None : AppletType = -2 ; pub const AppletType_AppletType_Default : AppletType = -1 ; pub const AppletType_AppletType_Application : AppletType = 0 ; pub const AppletType_AppletType_SystemApplet : AppletType = 1 ; pub const AppletType_AppletType_LibraryApplet : AppletType = 2 ; pub const AppletType_AppletType_OverlayApplet : AppletType = 3 ; pub const AppletType_AppletType_SystemApplication : AppletType = 4 ; pub type AppletType = i32 ; pub const AppletOperationMode_AppletOperationMode_Handheld : AppletOperationMode = 0 ; pub const AppletOperationMode_AppletOperationMode_Docked : AppletOperationMode = 1 ; pub type AppletOperationMode = u32 ; - /// < FocusState changed. + pub type ApmCpuBoostMode = u32 ; extern "C" { pub fn apmInitialize ( ) -> Result ; } extern "C" { pub fn apmExit ( ) ; } extern "C" { pub fn apmGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn apmSetPerformanceConfiguration ( PerformanceMode : u32 , PerformanceConfiguration : u32 ) -> Result ; } extern "C" { pub fn apmGetPerformanceConfiguration ( PerformanceMode : u32 , PerformanceConfiguration : * mut u32 ) -> Result ; } + /// < Applet + pub const PdmPlayEventType_PdmPlayEventType_Applet : PdmPlayEventType = 0 ; + /// < Account + pub const PdmPlayEventType_PdmPlayEventType_Account : PdmPlayEventType = 1 ; + /// < PowerStateChange + pub const PdmPlayEventType_PdmPlayEventType_PowerStateChange : PdmPlayEventType = 2 ; + /// < OperationModeChange + pub const PdmPlayEventType_PdmPlayEventType_OperationModeChange : PdmPlayEventType = 3 ; + /// < Initialize. Used for the very first PlayEvent entry in the log. + pub const PdmPlayEventType_PdmPlayEventType_Initialize : PdmPlayEventType = 4 ; + /// PlayEventType + pub type PdmPlayEventType = u32 ; + /// < "launch" + pub const PdmAppletEventType_PdmAppletEventType_Launch : PdmAppletEventType = 0 ; + /// < "exit" + pub const PdmAppletEventType_PdmAppletEventType_Exit : PdmAppletEventType = 1 ; + /// < "in_focus" + pub const PdmAppletEventType_PdmAppletEventType_InFocus : PdmAppletEventType = 2 ; + /// < "out_of_focus" + pub const PdmAppletEventType_PdmAppletEventType_OutOfFocus : PdmAppletEventType = 3 ; + /// < "out_of_focus" + pub const PdmAppletEventType_PdmAppletEventType_OutOfFocus4 : PdmAppletEventType = 4 ; + /// < "exit" + pub const PdmAppletEventType_PdmAppletEventType_Exit5 : PdmAppletEventType = 5 ; + /// < "exit" + pub const PdmAppletEventType_PdmAppletEventType_Exit6 : PdmAppletEventType = 6 ; + /// AppletEventType + pub type PdmAppletEventType = u32 ; + /// < All pdm:qry commands which require ::PdmPlayEventType_Applet and AppletId = Application will only return the entry when PlayLogPolicy matches this value. + pub const PdmPlayLogPolicy_PdmPlayLogPolicy_All : PdmPlayLogPolicy = 0 ; + /// < The above commands will filter out the entry with this. + pub const PdmPlayLogPolicy_PdmPlayLogPolicy_LogOnly : PdmPlayLogPolicy = 1 ; + /// < The pdm:ntfy commands which handle ::PdmPlayEventType_Applet logging will immediately return 0 when the input param matches this value. + pub const PdmPlayLogPolicy_PdmPlayLogPolicy_None : PdmPlayLogPolicy = 2 ; + /// PlayLogPolicy + pub type PdmPlayLogPolicy = u32 ; + /// ApplicationEvent. +/// Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00:00. +/// See \ref pdmPlayTimestampToPosix. + # [ repr ( C ) ] pub struct PdmApplicationEvent { + /// < Application titleID. + pub titleID : u64 , + /// < Entry index. + pub entryindex : u32 , + /// < See PdmPlayEvent::timestampUser, with the above timestamp format. + pub timestampUser : u32 , + /// < See PdmPlayEvent::timestampNetwork, with the above timestamp format. + pub timestampNetwork : u32 , + /// < \ref PdmAppletEventType + pub eventType : u8 , + /// < Padding. + pub pad : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_PdmApplicationEvent ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmApplicationEvent > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PdmApplicationEvent ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmApplicationEvent > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmApplicationEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationEvent > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationEvent ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationEvent > ( ) ) ) . entryindex as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationEvent ) , "::" , stringify ! ( entryindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationEvent > ( ) ) ) . timestampUser as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationEvent ) , "::" , stringify ! ( timestampUser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationEvent > ( ) ) ) . timestampNetwork as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationEvent ) , "::" , stringify ! ( timestampNetwork ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationEvent > ( ) ) ) . eventType as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationEvent ) , "::" , stringify ! ( eventType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationEvent > ( ) ) ) . pad as * const _ as usize } , 21usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationEvent ) , "::" , stringify ! ( pad ) ) ) ; } + /// PlayStatistics + # [ repr ( C ) ] pub struct PdmPlayStatistics { + /// < Application titleID. + pub titleID : u64 , + /// < Entry index for the first time the title was played. + pub first_entryindex : u32 , + /// < See PdmApplicationEvent::timestampUser. This is for the first time the title was played. + pub first_timestampUser : u32 , + /// < See PdmApplicationEvent::timestampNetwork. This is for the first time the title was played. + pub first_timestampNetwork : u32 , + /// < Entry index for the last time the title was played. + pub last_entryindex : u32 , + /// < See PdmApplicationEvent::timestampUser. This is for the last time the title was played. + pub last_timestampUser : u32 , + /// < See PdmApplicationEvent::timestampNetwork. This is for the last time the title was played. + pub last_timestampNetwork : u32 , + /// < Total play-time in minutes. + pub playtimeMinutes : u32 , + /// < Total times the application title was launched. + pub totalLaunches : u32 , } # [ test ] fn bindgen_test_layout_PdmPlayStatistics ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayStatistics > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( PdmPlayStatistics ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayStatistics > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayStatistics ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . first_entryindex as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( first_entryindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . first_timestampUser as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( first_timestampUser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . first_timestampNetwork as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( first_timestampNetwork ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . last_entryindex as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( last_entryindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . last_timestampUser as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( last_timestampUser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . last_timestampNetwork as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( last_timestampNetwork ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . playtimeMinutes as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( playtimeMinutes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayStatistics > ( ) ) ) . totalLaunches as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayStatistics ) , "::" , stringify ! ( totalLaunches ) ) ) ; } + /// LastPlayTime. +/// This contains data from the last time the title was played. + # [ repr ( C ) ] pub struct PdmLastPlayTime { + /// < Application titleID. + pub titleID : u64 , + /// < See PdmApplicationEvent::timestampUser. + pub timestampUser : u32 , + /// < See PdmApplicationEvent::timestampNetwork. + pub timestampNetwork : u32 , + /// < Total minutes since the title was last played. + pub lastPlayedMinutes : u32 , + /// < Flag indicating whether the above field is set. + pub flag : u8 , + /// < Padding. + pub pad : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_PdmLastPlayTime ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmLastPlayTime > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PdmLastPlayTime ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmLastPlayTime > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmLastPlayTime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmLastPlayTime > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmLastPlayTime ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmLastPlayTime > ( ) ) ) . timestampUser as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PdmLastPlayTime ) , "::" , stringify ! ( timestampUser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmLastPlayTime > ( ) ) ) . timestampNetwork as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PdmLastPlayTime ) , "::" , stringify ! ( timestampNetwork ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmLastPlayTime > ( ) ) ) . lastPlayedMinutes as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmLastPlayTime ) , "::" , stringify ! ( lastPlayedMinutes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmLastPlayTime > ( ) ) ) . flag as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( PdmLastPlayTime ) , "::" , stringify ! ( flag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmLastPlayTime > ( ) ) ) . pad as * const _ as usize } , 21usize , concat ! ( "Offset of field: " , stringify ! ( PdmLastPlayTime ) , "::" , stringify ! ( pad ) ) ) ; } + /// PlayEvent. +/// This is the raw entry struct directly read from FS, without any entry filtering. + # [ repr ( C ) ] pub struct PdmPlayEvent { + /// < titleID/userID stored within here have the u32 low/high swapped in each u64. + pub eventData : PdmPlayEvent__bindgen_ty_1 , + /// < \ref PdmPlayEventType. Controls which struct in the above eventData is used. ::PdmPlayEventType_Initialize doesn't use eventData. + pub playEventType : u8 , + /// < Padding. + pub pad : [ u8 ; 3usize ] , + /// < PosixTime timestamp from StandardUserSystemClock. + pub timestampUser : u64 , + /// < PosixTime timestamp from StandardNetworkSystemClock. + pub timestampNetwork : u64 , + /// < Timestamp in seconds derived from StandardSteadyClock. + pub timestampSteady : u64 , } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1 { pub applet : __BindgenUnionField < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > , pub account : __BindgenUnionField < PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 > , pub powerStateChange : __BindgenUnionField < PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 > , pub operationModeChange : __BindgenUnionField < PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 > , pub data : __BindgenUnionField < [ u8 ; 28usize ] > , pub bindgen_union_field : [ u32 ; 7usize ] , } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 { + /// < titleID. + pub titleID : [ u32 ; 2usize ] , pub unk_x8 : PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 , + /// < \ref AppletId + pub appletId : u8 , + /// < See FsStorageId. + pub storageId : u8 , + /// < \ref PdmPlayLogPolicy + pub logPolicy : u8 , + /// < \ref PdmAppletEventType + pub eventType : u8 , + /// < Unused. + pub unused : [ u8 ; 12usize ] , } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { + /// < For AppletId == ::AppletId_application. + pub application : __BindgenUnionField < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > , + /// < For AppletId != ::AppletId_application. + pub applet : __BindgenUnionField < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 > , pub data : __BindgenUnionField < u32 > , pub bindgen_union_field : u32 , } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { + /// < Title version. + pub version : u32 , } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( version ) ) ) ; } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 { + /// < Set to 0x1 by pdm:ntfy cmd8, indicating that the below field is set to an input param. + pub flag : u8 , + /// < Input value from pdm:ntfy cmd8, see \ref LibAppletMode. + pub mode : u8 , + /// < Padding. + pub pad : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 > ( ) ) ) . flag as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( flag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 > ( ) ) ) . mode as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 > ( ) ) ) . pad as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( pad ) ) ) ; } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . application as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( application ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . applet as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( applet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( data ) ) ) ; } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . unk_x8 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( unk_x8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . appletId as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( appletId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . storageId as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( storageId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . logPolicy as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( logPolicy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . eventType as * const _ as usize } , 15usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( eventType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . unused as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( unused ) ) ) ; } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 { + /// < userID. + pub userID : [ u32 ; 4usize ] , + /// < Application titleID, see below. + pub titleID : [ u32 ; 2usize ] , + /// < 0-1 to be listed by \ref pdmqryQueryAccountEvent, or 2 to include the above titleID. + pub type_ : u8 , } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 > ( ) ) ) . userID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( userID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 > ( ) ) ) . titleID as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 > ( ) ) ) . type_ as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( type_ ) ) ) ; } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 { + /// < Input value from the pdm:ntfy command. + pub value : u8 , + /// < Unused. + pub unused : [ u8 ; 27usize ] , } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 > ( ) ) ) . unused as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_3 ) , "::" , stringify ! ( unused ) ) ) ; } # [ repr ( C ) ] pub struct PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 { + /// < Input value from the pdm:ntfy command. + pub value : u8 , + /// < Unused. + pub unused : [ u8 ; 27usize ] , } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 > ( ) ) ) . value as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 > ( ) ) ) . unused as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1__bindgen_ty_4 ) , "::" , stringify ! ( unused ) ) ) ; } # [ test ] fn bindgen_test_layout_PdmPlayEvent__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent__bindgen_ty_1 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1 > ( ) ) ) . applet as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) , "::" , stringify ! ( applet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1 > ( ) ) ) . account as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) , "::" , stringify ! ( account ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1 > ( ) ) ) . powerStateChange as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) , "::" , stringify ! ( powerStateChange ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1 > ( ) ) ) . operationModeChange as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) , "::" , stringify ! ( operationModeChange ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent__bindgen_ty_1 > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent__bindgen_ty_1 ) , "::" , stringify ! ( data ) ) ) ; } # [ test ] fn bindgen_test_layout_PdmPlayEvent ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmPlayEvent > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( PdmPlayEvent ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmPlayEvent > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmPlayEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent > ( ) ) ) . eventData as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent ) , "::" , stringify ! ( eventData ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent > ( ) ) ) . playEventType as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent ) , "::" , stringify ! ( playEventType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent > ( ) ) ) . pad as * const _ as usize } , 29usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent > ( ) ) ) . timestampUser as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent ) , "::" , stringify ! ( timestampUser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent > ( ) ) ) . timestampNetwork as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent ) , "::" , stringify ! ( timestampNetwork ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmPlayEvent > ( ) ) ) . timestampSteady as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( PdmPlayEvent ) , "::" , stringify ! ( timestampSteady ) ) ) ; } + /// AccountEvent + # [ repr ( C ) ] pub struct PdmAccountEvent { pub __bindgen_anon_1 : PdmAccountEvent__bindgen_ty_1 , + /// < Entry index. + pub entryindex : u32 , + /// < Padding. + pub pad : [ u8 ; 4usize ] , + /// < See PdmPlayEvent::timestampUser. + pub timestampUser : u64 , + /// < See PdmPlayEvent::timestampNetwork. + pub timestampNetwork : u64 , + /// < See PdmPlayEvent::timestampSteady. + pub timestampSteady : u64 , + /// < See PdmPlayEvent::eventData::account::type. + pub type_ : u8 , + /// < Padding. + pub pad_x31 : [ u8 ; 7usize ] , } # [ repr ( C , packed ) ] # [ derive ( Copy , Clone ) ] pub union PdmAccountEvent__bindgen_ty_1 { + /// < userID. + pub userID : u128 , _bindgen_union_align : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_PdmAccountEvent__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmAccountEvent__bindgen_ty_1 > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( PdmAccountEvent__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmAccountEvent__bindgen_ty_1 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( PdmAccountEvent__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent__bindgen_ty_1 > ( ) ) ) . userID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent__bindgen_ty_1 ) , "::" , stringify ! ( userID ) ) ) ; } # [ test ] fn bindgen_test_layout_PdmAccountEvent ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmAccountEvent > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( PdmAccountEvent ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmAccountEvent > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmAccountEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . entryindex as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( entryindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . pad as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . timestampUser as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( timestampUser ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . timestampNetwork as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( timestampNetwork ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . timestampSteady as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( timestampSteady ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . type_ as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountEvent > ( ) ) ) . pad_x31 as * const _ as usize } , 49usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountEvent ) , "::" , stringify ! ( pad_x31 ) ) ) ; } + /// AccountPlayEvent. +/// This is the raw entry struct directly read from FS, without any entry filtering. This is separate from \ref PdmPlayEvent. + # [ repr ( C ) ] pub struct PdmAccountPlayEvent { + /// < Unknown. + pub unk_x0 : [ u8 ; 4usize ] , + /// < titleID, with the u32 low/high words swapped. + pub titleID : [ u32 ; 2usize ] , + /// < Unknown. + pub unk_xc : [ u8 ; 12usize ] , + /// < POSIX timestamp. + pub timestamp0 : u64 , + /// < POSIX timestamp. + pub timestamp1 : u64 , } # [ test ] fn bindgen_test_layout_PdmAccountPlayEvent ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmAccountPlayEvent > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( PdmAccountPlayEvent ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmAccountPlayEvent > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmAccountPlayEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountPlayEvent > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountPlayEvent ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountPlayEvent > ( ) ) ) . titleID as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountPlayEvent ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountPlayEvent > ( ) ) ) . unk_xc as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountPlayEvent ) , "::" , stringify ! ( unk_xc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountPlayEvent > ( ) ) ) . timestamp0 as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountPlayEvent ) , "::" , stringify ! ( timestamp0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmAccountPlayEvent > ( ) ) ) . timestamp1 as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( PdmAccountPlayEvent ) , "::" , stringify ! ( timestamp1 ) ) ) ; } + /// ApplicationPlayStatistics + # [ repr ( C ) ] pub struct PdmApplicationPlayStatistics { + /// < Application titleID. + pub titleID : u64 , + /// < Total play-time in nanoseconds. + pub totalPlayTime : u64 , + /// < Total times the application title was launched. + pub totalLaunches : u64 , } # [ test ] fn bindgen_test_layout_PdmApplicationPlayStatistics ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PdmApplicationPlayStatistics > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PdmApplicationPlayStatistics ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PdmApplicationPlayStatistics > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PdmApplicationPlayStatistics ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationPlayStatistics > ( ) ) ) . titleID as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationPlayStatistics ) , "::" , stringify ! ( titleID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationPlayStatistics > ( ) ) ) . totalPlayTime as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationPlayStatistics ) , "::" , stringify ! ( totalPlayTime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PdmApplicationPlayStatistics > ( ) ) ) . totalLaunches as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PdmApplicationPlayStatistics ) , "::" , stringify ! ( totalLaunches ) ) ) ; } extern "C" { pub fn pdmqryInitialize ( ) -> Result ; } extern "C" { pub fn pdmqryExit ( ) ; } extern "C" { pub fn pdmqryGetServiceSession ( ) -> * mut Service ; } extern "C" { + /// @brief Gets a list of \ref PdmApplicationEvent. +/// @param[in] entryindex Start entry index. +/// @param[out] events Output \ref PdmApplicationEvent array. +/// @param[in] count Max entries in the output array. +/// @param[out] total_out Total output entries. + pub fn pdmqryQueryApplicationEvent ( entryindex : u32 , events : * mut PdmApplicationEvent , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets \ref PdmPlayStatistics for the specified titleID. +/// @param[in] titleID Application titleID. +/// @param[out] stats \ref PdmPlayStatistics + pub fn pdmqryQueryPlayStatisticsByApplicationId ( titleID : u64 , stats : * mut PdmPlayStatistics ) -> Result ; } extern "C" { + /// @brief Gets \ref PdmPlayStatistics for the specified titleID and account userID. +/// @param[in] titleID Application titleID. +/// @param[in] userID Account userID. +/// @param[out] stats \ref PdmPlayStatistics + pub fn pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId ( titleID : u64 , userID : u128 , stats : * mut PdmPlayStatistics ) -> Result ; } extern "C" { + /// @brief Gets \ref PdmLastPlayTime for the specified titles. +/// @param[out] playtimes Output \ref PdmLastPlayTime array. +/// @param[in] titleIDs Input titleIDs array. +/// @param[in] count Total entries in the input/output arrays. +/// @param[out] total_out Total output entries. + pub fn pdmqryQueryLastPlayTime ( playtimes : * mut PdmLastPlayTime , titleIDs : * const u64 , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets a list of \ref PdmPlayEvent. +/// @param[in] entryindex Start entry index. +/// @param[out] events Output \ref PdmPlayEvent array. +/// @param[in] count Max entries in the output array. +/// @param[out] total_out Total output entries. + pub fn pdmqryQueryPlayEvent ( entryindex : u32 , events : * mut PdmPlayEvent , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets range fields which can then be used with the other pdmqry funcs, except for \ref pdmqryQueryAccountPlayEvent. +/// @param[out] total_entries Total entries. +/// @param[out] start_entryindex Start entry index. +/// @param[out] end_entryindex End entry index. + pub fn pdmqryGetAvailablePlayEventRange ( total_entries : * mut u32 , start_entryindex : * mut u32 , end_entryindex : * mut u32 ) -> Result ; } extern "C" { + /// @brief Gets a list of \ref PdmAccountEvent. +/// @param[in] entryindex Start entry index. +/// @param[out] events Output \ref PdmAccountEvent array. +/// @param[in] count Max entries in the output array. +/// @param[out] total_out Total output entries. + pub fn pdmqryQueryAccountEvent ( entryindex : u32 , events : * mut PdmAccountEvent , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets a list of \ref PdmAccountPlayEvent. +/// @note Only available with [4.0.0+]. +/// @param[in] entryindex Start entry index. +/// @param[in] userID Account userID. +/// @param[out] events Output \ref PdmAccountPlayEvent array. +/// @param[in] count Max entries in the output array. +/// @param[out] total_out Total output entries. + pub fn pdmqryQueryAccountPlayEvent ( entryindex : u32 , userID : u128 , events : * mut PdmAccountPlayEvent , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets range fields which can then be used with \ref pdmqryQueryAccountPlayEvent. +/// @param[in] userID Account userID. +/// @param[out] total_entries Total entries. +/// @param[out] start_entryindex Start entry index. +/// @param[out] end_entryindex End entry index. + pub fn pdmqryGetAvailableAccountPlayEventRange ( userID : u128 , total_entries : * mut u32 , start_entryindex : * mut u32 , end_entryindex : * mut u32 ) -> Result ; } extern "C" { + /// @brief Gets a list of titles played by the specified user. +/// @note Only available with [6.0.0+]. +/// @param[in] userID Account userID. +/// @param[out] titleIDs Output titleID array. +/// @param[in] count Max entries in the output array. +/// @param[out] total_out Total output entries. + pub fn pdmqryGetUserPlayedApplications ( userID : u128 , titleIDs : * mut u64 , count : usize , total_out : * mut u32 ) -> Result ; } extern "C" { + /// @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0. +/// @note Only available with [6.0.0+]. +/// @note The Event must be closed by the user once finished with it. +/// @param[out] event_out Output Event with autoclear=false. + pub fn pdmqryGetUserAccountEvent ( event_out : * mut Event ) -> Result ; } # [ repr ( C ) ] pub struct CapsScreenShotAttribute { pub unk_x0 : u32 , pub unk_x4 : [ u8 ; 60usize ] , } # [ test ] fn bindgen_test_layout_CapsScreenShotAttribute ( ) { assert_eq ! ( :: core :: mem :: size_of :: < CapsScreenShotAttribute > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( CapsScreenShotAttribute ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < CapsScreenShotAttribute > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( CapsScreenShotAttribute ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsScreenShotAttribute > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( CapsScreenShotAttribute ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsScreenShotAttribute > ( ) ) ) . unk_x4 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( CapsScreenShotAttribute ) , "::" , stringify ! ( unk_x4 ) ) ) ; } + /// AlbumEntry + # [ repr ( C ) ] pub struct CapsAlbumEntry { pub unk_x0 : [ u8 ; 32usize ] , } # [ test ] fn bindgen_test_layout_CapsAlbumEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < CapsAlbumEntry > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( CapsAlbumEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < CapsAlbumEntry > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( CapsAlbumEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsAlbumEntry > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( CapsAlbumEntry ) , "::" , stringify ! ( unk_x0 ) ) ) ; } + /// ApplicationAlbumEntry + # [ repr ( C ) ] pub struct CapsApplicationAlbumEntry { pub unk_x0 : [ u8 ; 32usize ] , } # [ test ] fn bindgen_test_layout_CapsApplicationAlbumEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < CapsApplicationAlbumEntry > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( CapsApplicationAlbumEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < CapsApplicationAlbumEntry > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( CapsApplicationAlbumEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsApplicationAlbumEntry > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( CapsApplicationAlbumEntry ) , "::" , stringify ! ( unk_x0 ) ) ) ; } + /// < Unknown. + pub const AlbumImageOrientation_AlbumImageOrientation_Unknown0 : AlbumImageOrientation = 0 ; + /// < Unknown. + pub const AlbumImageOrientation_AlbumImageOrientation_Unknown1 : AlbumImageOrientation = 1 ; + /// < Unknown. + pub const AlbumImageOrientation_AlbumImageOrientation_Unknown2 : AlbumImageOrientation = 2 ; + /// < Unknown. + pub const AlbumImageOrientation_AlbumImageOrientation_Unknown3 : AlbumImageOrientation = 3 ; + /// ImageOrientation + pub type AlbumImageOrientation = u32 ; pub const PmLaunchFlag_PmLaunchFlag_None : PmLaunchFlag = 0 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnExit : PmLaunchFlag = 1 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnStart : PmLaunchFlag = 2 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnCrash : PmLaunchFlag = 4 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnDebug : PmLaunchFlag = 8 ; pub const PmLaunchFlag_PmLaunchFlag_StartSuspended : PmLaunchFlag = 16 ; pub const PmLaunchFlag_PmLaunchFlag_DisableAslr : PmLaunchFlag = 32 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnExit : PmLaunchFlag = 1 ; pub const PmLaunchFlag_PmLaunchFlagOld_StartSuspended : PmLaunchFlag = 2 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnCrash : PmLaunchFlag = 4 ; pub const PmLaunchFlag_PmLaunchFlagOld_DisableAslr : PmLaunchFlag = 8 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnDebug : PmLaunchFlag = 16 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnStart : PmLaunchFlag = 32 ; + /// LaunchFlag + pub type PmLaunchFlag = u32 ; pub const PmProcessEvent_PmProcessEvent_None : PmProcessEvent = 0 ; pub const PmProcessEvent_PmProcessEvent_Exit : PmProcessEvent = 1 ; pub const PmProcessEvent_PmProcessEvent_Start : PmProcessEvent = 2 ; pub const PmProcessEvent_PmProcessEvent_Crash : PmProcessEvent = 3 ; pub const PmProcessEvent_PmProcessEvent_DebugStart : PmProcessEvent = 4 ; pub const PmProcessEvent_PmProcessEvent_DebugBreak : PmProcessEvent = 5 ; + /// ProcessEvent + pub type PmProcessEvent = u32 ; + /// ProcessEventInfo + # [ repr ( C ) ] pub struct PmProcessEventInfo { pub event : PmProcessEvent , pub process_id : u64 , } # [ test ] fn bindgen_test_layout_PmProcessEventInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PmProcessEventInfo > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( PmProcessEventInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PmProcessEventInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PmProcessEventInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PmProcessEventInfo > ( ) ) ) . event as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PmProcessEventInfo ) , "::" , stringify ! ( event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PmProcessEventInfo > ( ) ) ) . process_id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PmProcessEventInfo ) , "::" , stringify ! ( process_id ) ) ) ; } + /// < Normal + pub const PmBootMode_PmBootMode_Normal : PmBootMode = 0 ; + /// < Maintenance + pub const PmBootMode_PmBootMode_Maintenance : PmBootMode = 1 ; + /// < SafeMode + pub const PmBootMode_PmBootMode_SafeMode : PmBootMode = 2 ; + /// BootMode + pub type PmBootMode = u32 ; extern "C" { pub fn pmdmntInitialize ( ) -> Result ; } extern "C" { pub fn pmdmntExit ( ) ; } extern "C" { pub fn pmdmntGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pminfoInitialize ( ) -> Result ; } extern "C" { pub fn pminfoExit ( ) ; } extern "C" { pub fn pminfoGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pmshellInitialize ( ) -> Result ; } extern "C" { pub fn pmshellExit ( ) ; } extern "C" { pub fn pmshellGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pmbmInitialize ( ) -> Result ; } extern "C" { pub fn pmbmExit ( ) ; } extern "C" { pub fn pmbmGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pmdmntGetDebugProcesses ( out_count : * mut u32 , out_pids : * mut u64 , max_pids : usize ) -> Result ; } extern "C" { pub fn pmdmntStartProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn pmdmntGetTitlePid ( pid_out : * mut u64 , title_id : u64 ) -> Result ; } extern "C" { pub fn pmdmntEnableDebugForTitleId ( handle_out : * mut Handle , title_id : u64 ) -> Result ; } extern "C" { pub fn pmdmntGetApplicationPid ( pid_out : * mut u64 ) -> Result ; } extern "C" { pub fn pmdmntEnableDebugForApplication ( handle_out : * mut Handle ) -> Result ; } extern "C" { pub fn pmdmntDisableDebug ( ) -> Result ; } extern "C" { pub fn pminfoGetTitleId ( title_id_out : * mut u64 , pid : u64 ) -> Result ; } extern "C" { pub fn pmshellLaunchProcess ( launch_flags : u32 , titleID : u64 , storageID : u64 , pid : * mut u64 ) -> Result ; } extern "C" { pub fn pmshellTerminateProcessByProcessId ( processID : u64 ) -> Result ; } extern "C" { pub fn pmshellTerminateProcessByTitleId ( titleID : u64 ) -> Result ; } extern "C" { pub fn pmshellGetProcessEvent ( out : * mut Event ) -> Result ; } extern "C" { pub fn pmshellGetProcessEventInfo ( out : * mut PmProcessEventInfo ) -> Result ; } extern "C" { pub fn pmshellFinalizeDeadProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn pmshellClearProcessExceptionOccurred ( pid : u64 ) -> Result ; } extern "C" { pub fn pmshellNotifyBootFinished ( ) -> Result ; } extern "C" { pub fn pmshellGetApplicationPid ( pid_out : * mut u64 ) -> Result ; } extern "C" { pub fn pmshellBoostSystemMemoryResourceLimit ( boost_size : u64 ) -> Result ; } extern "C" { pub fn pmshellBoostSystemThreadResourceLimit ( ) -> Result ; } extern "C" { + /// @brief Gets the \ref PmBootMode. +/// @param[out] out \ref PmBootMode + pub fn pmbmGetBootMode ( out : * mut PmBootMode ) -> Result ; } extern "C" { + /// @brief Sets the \ref PmBootMode to ::PmBootMode_Maintenance. + pub fn pmbmSetMaintenanceBoot ( ) -> Result ; } pub const AppletType_AppletType_None : AppletType = -2 ; pub const AppletType_AppletType_Default : AppletType = -1 ; pub const AppletType_AppletType_Application : AppletType = 0 ; pub const AppletType_AppletType_SystemApplet : AppletType = 1 ; pub const AppletType_AppletType_LibraryApplet : AppletType = 2 ; pub const AppletType_AppletType_OverlayApplet : AppletType = 3 ; pub const AppletType_AppletType_SystemApplication : AppletType = 4 ; + /// AppletType + pub type AppletType = i32 ; pub const AppletOperationMode_AppletOperationMode_Handheld : AppletOperationMode = 0 ; pub const AppletOperationMode_AppletOperationMode_Docked : AppletOperationMode = 1 ; + /// OperationMode + pub type AppletOperationMode = u32 ; + /// < ::AppletNotificationMessage_FocusStateChanged pub const AppletHookType_AppletHookType_OnFocusState : AppletHookType = 0 ; - /// < OperationMode changed. + /// < ::AppletNotificationMessage_OperationModeChanged pub const AppletHookType_AppletHookType_OnOperationMode : AppletHookType = 1 ; - /// < PerformanceMode changed. + /// < ::AppletNotificationMessage_PerformanceModeChanged pub const AppletHookType_AppletHookType_OnPerformanceMode : AppletHookType = 2 ; - /// < Exit requested. + /// < ::AppletNotificationMessage_ExitRequested pub const AppletHookType_AppletHookType_OnExitRequest : AppletHookType = 3 ; + /// < ::AppletNotificationMessage_Restart + pub const AppletHookType_AppletHookType_OnRestart : AppletHookType = 4 ; + /// < ::AppletNotificationMessage_CaptureButtonShortPressed + pub const AppletHookType_AppletHookType_OnCaptureButtonShortPressed : AppletHookType = 5 ; + /// < ::AppletNotificationMessage_AlbumImageTaken + pub const AppletHookType_AppletHookType_OnAlbumImageTaken : AppletHookType = 6 ; + /// < ::AppletNotificationMessage_RequestToDisplay + pub const AppletHookType_AppletHookType_RequestToDisplay : AppletHookType = 7 ; /// < Number of applet hook types. - pub const AppletHookType_AppletHookType_Max : AppletHookType = 4 ; + pub const AppletHookType_AppletHookType_Max : AppletHookType = 8 ; /// applet hook types. pub type AppletHookType = u32 ; + /// < Exit requested. + pub const AppletNotificationMessage_AppletNotificationMessage_ExitRequested : AppletNotificationMessage = 4 ; + /// < FocusState changed. + pub const AppletNotificationMessage_AppletNotificationMessage_FocusStateChanged : AppletNotificationMessage = 15 ; + /// < Current applet execution was resumed. + pub const AppletNotificationMessage_AppletNotificationMessage_Restart : AppletNotificationMessage = 16 ; + /// < OperationMode changed. + pub const AppletNotificationMessage_AppletNotificationMessage_OperationModeChanged : AppletNotificationMessage = 30 ; + /// < PerformanceMode changed. + pub const AppletNotificationMessage_AppletNotificationMessage_PerformanceModeChanged : AppletNotificationMessage = 31 ; + /// < Display requested, see \ref appletApproveToDisplay. + pub const AppletNotificationMessage_AppletNotificationMessage_RequestToDisplay : AppletNotificationMessage = 51 ; + /// < Capture button was short-pressed. + pub const AppletNotificationMessage_AppletNotificationMessage_CaptureButtonShortPressed : AppletNotificationMessage = 90 ; + /// < Screenshot was taken. + pub const AppletNotificationMessage_AppletNotificationMessage_AlbumImageTaken : AppletNotificationMessage = 92 ; + /// NotificationMessage, for \ref appletGetMessage. See also \ref AppletHookType. + pub type AppletNotificationMessage = u32 ; /// < Applet is focused. pub const AppletFocusState_AppletFocusState_Focused : AppletFocusState = 1 ; /// < Out of focus - LibraryApplet open. pub const AppletFocusState_AppletFocusState_NotFocusedLibraryApplet : AppletFocusState = 2 ; /// < Out of focus - HOME menu open / console is sleeping. - pub const AppletFocusState_AppletFocusState_NotFocusedHomeSleep : AppletFocusState = 3 ; pub type AppletFocusState = u32 ; + pub const AppletFocusState_AppletFocusState_NotFocusedHomeSleep : AppletFocusState = 3 ; + /// FocusState + pub type AppletFocusState = u32 ; /// < Suspend only when HOME menu is open / console is sleeping (default). pub const AppletFocusHandlingMode_AppletFocusHandlingMode_SuspendHomeSleep : AppletFocusHandlingMode = 0 ; /// < Don't suspend when out of focus. @@ -1703,13 +2212,19 @@ where /// < Always suspend when out of focus, regardless of the reason. pub const AppletFocusHandlingMode_AppletFocusHandlingMode_AlwaysSuspend : AppletFocusHandlingMode = 3 ; /// < Number of focus handling modes. - pub const AppletFocusHandlingMode_AppletFocusHandlingMode_Max : AppletFocusHandlingMode = 4 ; pub type AppletFocusHandlingMode = u32 ; + pub const AppletFocusHandlingMode_AppletFocusHandlingMode_Max : AppletFocusHandlingMode = 4 ; + /// FocusHandlingMode + pub type AppletFocusHandlingMode = u32 ; /// < Application-specific LaunchParameter pub const AppletLaunchParameterKind_AppletLaunchParameterKind_Application : AppletLaunchParameterKind = 1 ; /// < account PreselectedUser pub const AppletLaunchParameterKind_AppletLaunchParameterKind_PreselectedUser : AppletLaunchParameterKind = 2 ; /// < Unknown if used by anything? - pub const AppletLaunchParameterKind_AppletLaunchParameterKind_Unknown : AppletLaunchParameterKind = 3 ; pub type AppletLaunchParameterKind = u32 ; + pub const AppletLaunchParameterKind_AppletLaunchParameterKind_Unknown : AppletLaunchParameterKind = 3 ; + /// LaunchParameterKind + pub type AppletLaunchParameterKind = u32 ; + /// < Application. Not valid for use with LibraryApplets. + pub const AppletId_AppletId_application : AppletId = 1 ; /// < 010000000000100C "overlayDisp" pub const AppletId_AppletId_overlayDisp : AppletId = 2 ; /// < 0100000000001000 "qlaunch" (SystemAppletMenu) @@ -1749,21 +2264,71 @@ where /// < 0100000000001011 "LibAppletAuth" WifiWebAuth applet pub const AppletId_AppletId_wifiWebAuth : AppletId = 25 ; /// < 0100000000001013 "myPage" - pub const AppletId_AppletId_myPage : AppletId = 26 ; pub type AppletId = u32 ; - /// < Foreground + pub const AppletId_AppletId_myPage : AppletId = 26 ; + /// AppletId + pub type AppletId = u32 ; + /// < Foreground. pub const LibAppletMode_LibAppletMode_AllForeground : LibAppletMode = 0 ; - /// < Background + /// < Background. pub const LibAppletMode_LibAppletMode_Background : LibAppletMode = 1 ; - /// < Unknown - pub const LibAppletMode_LibAppletMode_Unknown2 : LibAppletMode = 2 ; - /// < Unknown - pub const LibAppletMode_LibAppletMode_Unknown3 : LibAppletMode = 3 ; + /// < No UI. + pub const LibAppletMode_LibAppletMode_NoUi : LibAppletMode = 2 ; + /// < Background with indirect display, see \ref appletHolderGetIndirectLayerConsumerHandle. + pub const LibAppletMode_LibAppletMode_BackgroundIndirect : LibAppletMode = 3 ; + /// < Foreground except initially hidden. + pub const LibAppletMode_LibAppletMode_AllForegroundInitiallyHidden : LibAppletMode = 4 ; /// LibraryAppletMode pub type LibAppletMode = u32 ; pub const LibAppletExitReason_LibAppletExitReason_Normal : LibAppletExitReason = 0 ; pub const LibAppletExitReason_LibAppletExitReason_Canceled : LibAppletExitReason = 1 ; pub const LibAppletExitReason_LibAppletExitReason_Abnormal : LibAppletExitReason = 2 ; pub const LibAppletExitReason_LibAppletExitReason_Unexpected : LibAppletExitReason = 10 ; /// LibraryAppletExitReason pub type LibAppletExitReason = u32 ; pub const AppletThemeColorType_AppletThemeColorType_Default : AppletThemeColorType = 0 ; pub const AppletThemeColorType_AppletThemeColorType_Unknown1 : AppletThemeColorType = 1 ; pub const AppletThemeColorType_AppletThemeColorType_Unknown2 : AppletThemeColorType = 2 ; pub const AppletThemeColorType_AppletThemeColorType_Unknown3 : AppletThemeColorType = 3 ; /// ThemeColorType pub type AppletThemeColorType = u32 ; + /// < Unknown. + pub const AppletTvPowerStateMatchingMode_AppletTvPowerStateMatchingMode_Unknown0 : AppletTvPowerStateMatchingMode = 0 ; + /// < Unknown. + pub const AppletTvPowerStateMatchingMode_AppletTvPowerStateMatchingMode_Unknown1 : AppletTvPowerStateMatchingMode = 1 ; + /// Mode values for \ref appletSetTvPowerStateMatchingMode. + pub type AppletTvPowerStateMatchingMode = u32 ; + /// < Short-pressing with the HOME-button. + pub const AppletSystemButtonType_AppletSystemButtonType_HomeButtonShortPressing : AppletSystemButtonType = 1 ; + /// < Long-pressing with the HOME-button. + pub const AppletSystemButtonType_AppletSystemButtonType_HomeButtonLongPressing : AppletSystemButtonType = 2 ; + /// < Short-pressing with the Capture-button. + pub const AppletSystemButtonType_AppletSystemButtonType_CaptureButtonShortPressing : AppletSystemButtonType = 6 ; + /// < Long-pressing with the Capture-button. + pub const AppletSystemButtonType_AppletSystemButtonType_CaptureButtonLongPressing : AppletSystemButtonType = 7 ; + /// Type values for \ref appletPerformSystemButtonPressingIfInFocus. + pub type AppletSystemButtonType = u32 ; + /// < Inherit from parent applet. + pub const AppletScreenShotPermission_AppletScreenShotPermission_Inherit : AppletScreenShotPermission = 0 ; + /// < Enable. + pub const AppletScreenShotPermission_AppletScreenShotPermission_Enable : AppletScreenShotPermission = 1 ; + /// < Disable. + pub const AppletScreenShotPermission_AppletScreenShotPermission_Disable : AppletScreenShotPermission = 2 ; + /// Permission values for \ref appletSetScreenShotPermission. + pub type AppletScreenShotPermission = u32 ; + /// < No extension. + pub const AppletIdleTimeDetectionExtension_AppletIdleTimeDetectionExtension_None : AppletIdleTimeDetectionExtension = 0 ; + /// < Extended + pub const AppletIdleTimeDetectionExtension_AppletIdleTimeDetectionExtension_Extended : AppletIdleTimeDetectionExtension = 1 ; + /// < ExtendedUnsafe + pub const AppletIdleTimeDetectionExtension_AppletIdleTimeDetectionExtension_ExtendedUnsafe : AppletIdleTimeDetectionExtension = 2 ; + /// Extension values for \ref appletSetIdleTimeDetectionExtension / \ref appletGetIdleTimeDetectionExtension, for extending user inactivity detection. + pub type AppletIdleTimeDetectionExtension = u32 ; + /// < Unknown. + pub const AppletWirelessPriorityMode_AppletWirelessPriorityMode_Unknown1 : AppletWirelessPriorityMode = 1 ; + /// < Unknown. + pub const AppletWirelessPriorityMode_AppletWirelessPriorityMode_Unknown2 : AppletWirelessPriorityMode = 2 ; + /// Input mode values for \ref appletSetWirelessPriorityMode. + pub type AppletWirelessPriorityMode = u32 ; + /// < LastApplication + pub const AppletCaptureSharedBuffer_AppletCaptureSharedBuffer_LastApplication : AppletCaptureSharedBuffer = 0 ; + /// < LastForeground + pub const AppletCaptureSharedBuffer_AppletCaptureSharedBuffer_LastForeground : AppletCaptureSharedBuffer = 1 ; + /// < CallerApplet + pub const AppletCaptureSharedBuffer_AppletCaptureSharedBuffer_CallerApplet : AppletCaptureSharedBuffer = 2 ; + /// CaptureSharedBuffer for the IDisplayController commands. + pub type AppletCaptureSharedBuffer = u32 ; /// applet hook function. pub type AppletHookFn = :: core :: option :: Option < unsafe extern "C" fn ( hook : AppletHookType , param : * mut ctypes :: c_void ) > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AppletHookCookie { /// < Next cookie. @@ -1772,6 +2337,12 @@ where pub callback : AppletHookFn , /// < Callback parameter. pub param : * mut ctypes :: c_void , } # [ test ] fn bindgen_test_layout_AppletHookCookie ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletHookCookie > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( AppletHookCookie ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletHookCookie > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AppletHookCookie ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHookCookie > ( ) ) ) . next as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletHookCookie ) , "::" , stringify ! ( next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHookCookie > ( ) ) ) . callback as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AppletHookCookie ) , "::" , stringify ! ( callback ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHookCookie > ( ) ) ) . param as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AppletHookCookie ) , "::" , stringify ! ( param ) ) ) ; } + /// LockAccessor + # [ repr ( C ) ] pub struct AppletLockAccessor { + /// < ILockAccessor + pub s : Service , + /// < Event from the GetEvent cmd, with autoclear=false. + pub event : Event , } # [ test ] fn bindgen_test_layout_AppletLockAccessor ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletLockAccessor > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( AppletLockAccessor ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletLockAccessor > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AppletLockAccessor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletLockAccessor > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletLockAccessor ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletLockAccessor > ( ) ) ) . event as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AppletLockAccessor ) , "::" , stringify ! ( event ) ) ) ; } /// applet IStorage # [ repr ( C ) ] pub struct AppletStorage { pub s : Service , pub tmem : TransferMemory , } # [ test ] fn bindgen_test_layout_AppletStorage ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletStorage > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AppletStorage ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletStorage > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AppletStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletStorage > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletStorage ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletStorage > ( ) ) ) . tmem as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AppletStorage ) , "::" , stringify ! ( tmem ) ) ) ; } /// LibraryApplet state. @@ -1790,101 +2361,90 @@ where pub creating_self : bool , /// < Set by \ref appletHolderJoin using the output from cmd GetResult, see \ref LibAppletExitReason. pub exitreason : LibAppletExitReason , } # [ test ] fn bindgen_test_layout_AppletHolder ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletHolder > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AppletHolder ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletHolder > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AppletHolder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . StateChangedEvent as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( StateChangedEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . PopInteractiveOutDataEvent as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( PopInteractiveOutDataEvent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . mode as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . layer_handle as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( layer_handle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . creating_self as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( creating_self ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletHolder > ( ) ) ) . exitreason as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( AppletHolder ) , "::" , stringify ! ( exitreason ) ) ) ; } - /// 'pdm' ApplicationPlayStatistics - # [ repr ( C ) ] pub struct AppletApplicationPlayStatistics { pub unk_x0 : [ u8 ; 8usize ] , } # [ test ] fn bindgen_test_layout_AppletApplicationPlayStatistics ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletApplicationPlayStatistics > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( AppletApplicationPlayStatistics ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletApplicationPlayStatistics > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( AppletApplicationPlayStatistics ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationPlayStatistics > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationPlayStatistics ) , "::" , stringify ! ( unk_x0 ) ) ) ; } + /// LibraryAppletInfo + # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct LibAppletInfo { + /// < \ref AppletId + pub appletId : AppletId , + /// < \ref LibAppletMode + pub mode : LibAppletMode , } # [ test ] fn bindgen_test_layout_LibAppletInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LibAppletInfo > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( LibAppletInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LibAppletInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( LibAppletInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LibAppletInfo > ( ) ) ) . appletId as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LibAppletInfo ) , "::" , stringify ! ( appletId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LibAppletInfo > ( ) ) ) . mode as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( LibAppletInfo ) , "::" , stringify ! ( mode ) ) ) ; } + /// IdentityInfo + # [ repr ( C ) ] pub struct AppletIdentityInfo { + /// < \ref AppletId + pub appletId : AppletId , + /// < Padding. + pub pad : u32 , + /// < titleID, only set with appletId == ::AppletId_application. + pub titleID : u64 , } # [ test ] fn bindgen_test_layout_AppletIdentityInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletIdentityInfo > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AppletIdentityInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletIdentityInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AppletIdentityInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletIdentityInfo > ( ) ) ) . appletId as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletIdentityInfo ) , "::" , stringify ! ( appletId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletIdentityInfo > ( ) ) ) . pad as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AppletIdentityInfo ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletIdentityInfo > ( ) ) ) . titleID as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AppletIdentityInfo ) , "::" , stringify ! ( titleID ) ) ) ; } /// Attributes for launching applications for Quest. - # [ repr ( C ) ] pub struct AppletApplicationAttributeForQuest { pub unk_x0 : u32 , pub unk_x4 : u32 , } # [ test ] fn bindgen_test_layout_AppletApplicationAttributeForQuest ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletApplicationAttributeForQuest > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( AppletApplicationAttributeForQuest ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletApplicationAttributeForQuest > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AppletApplicationAttributeForQuest ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttributeForQuest > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttributeForQuest ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttributeForQuest > ( ) ) ) . unk_x4 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttributeForQuest ) , "::" , stringify ! ( unk_x4 ) ) ) ; } extern "C" { + # [ repr ( C ) ] pub struct AppletApplicationAttributeForQuest { + /// < See AppletApplicationAttribute::unk_x0. + pub unk_x0 : u32 , + /// < See AppletApplicationAttribute::unk_x4. + pub unk_x4 : u32 , + /// < [7.0.0+] See AppletApplicationAttribute::volume. + pub volume : f32 , } # [ test ] fn bindgen_test_layout_AppletApplicationAttributeForQuest ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletApplicationAttributeForQuest > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( AppletApplicationAttributeForQuest ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletApplicationAttributeForQuest > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AppletApplicationAttributeForQuest ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttributeForQuest > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttributeForQuest ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttributeForQuest > ( ) ) ) . unk_x4 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttributeForQuest ) , "::" , stringify ! ( unk_x4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttributeForQuest > ( ) ) ) . volume as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttributeForQuest ) , "::" , stringify ! ( volume ) ) ) ; } + /// ApplicationAttribute + # [ repr ( C ) ] pub struct AppletApplicationAttribute { + /// < Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds. + pub unk_x0 : u32 , + /// < Default is 0 for non-Quest. Only used when non-zero: unknown value in seconds. + pub unk_x4 : u32 , + /// < Audio volume. Must be in the range of 0.0f-1.0f. The default is 1.0f. + pub volume : f32 , + /// < Unused. Default is 0. + pub unused : [ u8 ; 20usize ] , } # [ test ] fn bindgen_test_layout_AppletApplicationAttribute ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AppletApplicationAttribute > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AppletApplicationAttribute ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AppletApplicationAttribute > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AppletApplicationAttribute ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttribute > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttribute ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttribute > ( ) ) ) . unk_x4 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttribute ) , "::" , stringify ! ( unk_x4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttribute > ( ) ) ) . volume as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttribute ) , "::" , stringify ! ( volume ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AppletApplicationAttribute > ( ) ) ) . unused as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AppletApplicationAttribute ) , "::" , stringify ! ( unused ) ) ) ; } extern "C" { /// Initialize applet, called automatically during app startup. pub fn appletInitialize ( ) -> Result ; } extern "C" { - /// Exit applet, called automatically during app startup. - pub fn appletExit ( ) ; } extern "C" { pub fn appletGetAppletResourceUserId ( out : * mut u64 ) -> Result ; } extern "C" { pub fn appletGetAppletType ( ) -> AppletType ; } extern "C" { pub fn appletNotifyRunning ( out : * mut u8 ) ; } extern "C" { pub fn appletCreateManagedDisplayLayer ( out : * mut u64 ) -> Result ; } extern "C" { + /// Exit applet, called automatically during app exit. + pub fn appletExit ( ) ; } extern "C" { + /// Get the cached AppletResourceUserId. + pub fn appletGetAppletResourceUserId ( out : * mut u64 ) -> Result ; } extern "C" { + /// Get the \ref AppletType. + pub fn appletGetAppletType ( ) -> AppletType ; } extern "C" { /// Sets the state field for \ref AppletThemeColorType. pub fn appletSetThemeColorType ( theme : AppletThemeColorType ) ; } extern "C" { /// Gets the state field for \ref AppletThemeColorType. Used internally by \ref libappletArgsCreate. pub fn appletGetThemeColorType ( ) -> AppletThemeColorType ; } extern "C" { - /// @brief Pops a LaunchParameter AppletStorage, the storage will be removed from sysmodule state during this. -/// @param s Output storage. -/// @param kind See \ref AppletLaunchParameterKind. -/// @note Can only be used in Applications. -/// @note See also acc.h \ref accountGetPreselectedUser (wrapper for appletPopLaunchParameter etc). - pub fn appletPopLaunchParameter ( s : * mut AppletStorage , kind : AppletLaunchParameterKind ) -> Result ; } extern "C" { - /// @brief Requests to launch the specified application. -/// @note Only available with AppletType_*Application, or AppletType_LibraryApplet on 5.0.0+. -/// @param[in] titleID Application titleID. Value 0 can be used to relaunch the current application. -/// @param s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0 (or with AppletType_LibraryApplet), this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_Application. - pub fn appletRequestLaunchApplication ( titleID : u64 , s : * mut AppletStorage ) -> Result ; } extern "C" { - /// @brief Requests to launch the specified application, for kiosk systems. -/// @note Only available with AppletType_*Application on 3.0.0+. -/// @param[in] titleID Application titleID -/// @param s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0, this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_Application. -/// @param[in] attr Kiosk application attributes. - pub fn appletRequestLaunchApplicationForQuest ( titleID : u64 , s : * mut AppletStorage , attr : * const AppletApplicationAttributeForQuest ) -> Result ; } extern "C" { pub fn appletGetDesiredLanguage ( LanguageCode : * mut u64 ) -> Result ; } extern "C" { - /// Only available with AppletType_*Application. - pub fn appletSetTerminateResult ( res : Result ) -> Result ; } extern "C" { - /// Set media playback state. -/// If state is set to true, screen dimming and auto sleep is disabled. -/// For *Application, this uses cmd SetMediaPlaybackStateForApplication, otherwise cmd SetMediaPlaybackState is used. - pub fn appletSetMediaPlaybackState ( state : bool ) -> Result ; } extern "C" { - /// Gets whether video recording is supported. -/// See also \ref appletInitializeGamePlayRecording. - pub fn appletIsGamePlayRecordingSupported ( flag : * mut bool ) -> Result ; } extern "C" { - /// Disable/enable video recording. Only available after \ref appletInitializeGamePlayRecording was used. -/// See also \ref appletInitializeGamePlayRecording. - pub fn appletSetGamePlayRecordingState ( state : bool ) -> Result ; } extern "C" { - /// Initializes video recording. This allocates a 0x6000000-byte buffer for the TransferMemory, cleanup is handled automatically during app exit in \ref appletExit. -/// Only available with AppletType_Application on 3.0.0+, hence errors from this can be ignored. -/// Video recording is only fully available system-side with 4.0.0+. -/// Only usable when running under a title which supports video recording. - pub fn appletInitializeGamePlayRecording ( ) -> Result ; } extern "C" { - /// @brief Blocks the usage of the home button. -/// @param val Unknown nanoseconds. Value 0 can be used. -/// @note Can only be used in regularapps. - pub fn appletBeginBlockingHomeButton ( val : s64 ) -> Result ; } extern "C" { pub fn appletEndBlockingHomeButton ( ) -> Result ; } extern "C" { - /// @brief Gets ApplicationPlayStatistics. -/// @note Only available with AppletType_*Application on 5.0.0+. -/// @note This may return no output in some cases. -/// @param stats Output \ref AppletApplicationPlayStatistics array. -/// @param titleIDs Input titleIDs array. -/// @param count Total entries in the input/output arrays. -/// @param out Output s32. - pub fn appletQueryApplicationPlayStatistics ( stats : * mut AppletApplicationPlayStatistics , titleIDs : * const u64 , count : s32 , out : * mut s32 ) -> Result ; } extern "C" { - /// @brief Delay exiting until \ref appletUnlockExit is called, with a 15 second timeout once exit is requested. -/// @note When exit is requested \ref appletMainLoop will return false, hence any main-loop using appletMainLoop will exit. This allows the app to handle cleanup post-main-loop instead of being force-terminated. -/// @note If the above timeout occurs after exit was requested where \ref appletUnlockExit was not called, the process will be forced-terminated. -/// @note \ref appletUnlockExit must be used before main() returns. - pub fn appletLockExit ( ) -> Result ; } extern "C" { - /// Unlocks exiting, see \ref appletLockExit. - pub fn appletUnlockExit ( ) -> Result ; } extern "C" { - /// @brief Controls whether screenshot-capture is allowed. -/// @param val 0 = disable, 1 = enable. - pub fn appletSetScreenShotPermission ( val : s32 ) -> Result ; } extern "C" { pub fn appletSetScreenShotImageOrientation ( val : s32 ) -> Result ; } extern "C" { - /// @brief Gets the current Illuminance from the light sensor. -/// @note Only available with [3.0.0+]. -/// @param fLux Output fLux - pub fn appletGetCurrentIlluminance ( fLux : * mut f32 ) -> Result ; } extern "C" { - /// @brief Gets the current Illuminance from the light sensor. Same as \ref appletGetCurrentIlluminance except for the additional param. -/// @note Only available with [5.0.0+]. -/// @param bOverLimit Output bOverLimit -/// @param fLux Output fLux - pub fn appletGetCurrentIlluminanceEx ( bOverLimit : * mut bool , fLux : * mut f32 ) -> Result ; } extern "C" { - /// @brief Gets whether Illuminance is available. -/// @note Only available with [3.0.0+]. -/// @param out Output flag - pub fn appletIsIlluminanceAvailable ( out : * mut bool ) -> Result ; } extern "C" { - /// @brief Stops forwarding the input to the foreground app, works only in the Overlay applet context. -/// @note You have to call this to receive inputs through the hid service when running as the overlay applet. - pub fn appletBeginToWatchShortHomeButtonMessage ( ) -> Result ; } extern "C" { - /// @brief Forwards input to the foreground app, works only in the Overlay applet context. -/// @note After calling this the overlay applet won't receive any input until \ref appletBeginToWatchShortHomeButtonMessage is called again. - pub fn appletEndToWatchShortHomeButtonMessage ( ) -> Result ; } extern "C" { - /// @brief Get an event that fires when the home button is pressed, doesn't interfere with home menu. This event does not auto clear. -/// @note Doesn't fire for long press. - pub fn appletHomeButtonReaderLockAccessorGetEvent ( out_event : * mut Event ) -> Result ; } extern "C" { + /// @brief Gets the CradleStatus. +/// @param[out] status Output Dock status. + pub fn appletGetCradleStatus ( status : * mut u8 ) -> Result ; } extern "C" { + /// @brief Gets the BootMode which originated from \ref pmbmGetBootMode. +/// @param[out] mode \ref PmBootMode + pub fn appletGetBootMode ( mode : * mut PmBootMode ) -> Result ; } extern "C" { + /// @brief Request to AcquireSleepLock. +/// @note On success, this then uses cmd GetAcquiredSleepLockEvent and waits on that event. + pub fn appletRequestToAcquireSleepLock ( ) -> Result ; } extern "C" { + /// @brief Release the SleepLock. + pub fn appletReleaseSleepLock ( ) -> Result ; } extern "C" { + /// @brief Release the SleepLock transiently. +/// @note On success, this then uses cmd GetAcquiredSleepLockEvent and waits on that event. + pub fn appletReleaseSleepLockTransiently ( ) -> Result ; } extern "C" { /// @brief Pushes a storage to the general channel. Used for sending requests to qlaunch. /// @note This is not usable under an Application, however it is usable under a LibraryApplet. /// @note This uses \ref appletStorageClose automatically. /// @param s Storage object. pub fn appletPushToGeneralChannel ( s : * mut AppletStorage ) -> Result ; } extern "C" { + /// @brief Gets a \ref AppletLockAccessor for HomeButtonReader. +/// @note Similar to using \ref appletGetReaderLockAccessorEx with inval=0. +/// @param a LockAccessor object. + pub fn appletGetHomeButtonReaderLockAccessor ( a : * mut AppletLockAccessor ) -> Result ; } extern "C" { + /// @brief Gets a Reader \ref AppletLockAccessor. +/// @note Only available with [2.0.0+]. +/// @param a LockAccessor object. +/// @param[in] inval Input value, must be 0-3. 0 = HomeButton. + pub fn appletGetReaderLockAccessorEx ( a : * mut AppletLockAccessor , inval : u32 ) -> Result ; } extern "C" { + /// @brief Gets a Writer \ref AppletLockAccessor. +/// @note Only available with [7.0.0+]. On older sysvers, this is only available with AppletType_SystemApplet on [2.0.0+]. +/// @param a LockAccessor object. +/// @param[in] inval Input value, must be 0-3. 0 = HomeButton. + pub fn appletGetWriterLockAccessorEx ( a : * mut AppletLockAccessor , inval : u32 ) -> Result ; } extern "C" { + /// @brief Gets the Dock firmware version. +/// @note Only available with [2.0.0+]. +/// @param[out] out0 First output value. +/// @param[out] out1 Second output value. +/// @param[out] out2 Third output value. +/// @param[out] out3 Fourth output value. + pub fn appletGetCradleFwVersion ( out0 : * mut u32 , out1 : * mut u32 , out2 : * mut u32 , out3 : * mut u32 ) -> Result ; } extern "C" { /// @brief Gets whether VrMode is enabled. /// @note Only available with [3.0.0+]. /// @param out Output flag @@ -1895,14 +2455,286 @@ where /// @note On pre-7.0.0 this uses cmd SetVrModeEnabled internally, while on [7.0.0+] this uses cmds BeginVrModeEx/EndVrModeEx. /// @param flag Flag pub fn appletSetVrModeEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Sets whether the LCD screen backlight is turned off. +/// @note Only available with [4.0.0+]. +/// @param[in] flag Flag + pub fn appletSetLcdBacklightOffEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Gets the ControllerFirmwareUpdateSection flag. +/// @note Only available with [3.0.0+]. +/// @param[out] out Output flag. + pub fn appletIsInControllerFirmwareUpdateSection ( out : * mut bool ) -> Result ; } extern "C" { + /// @brief Gets the DefaultDisplayResolution. +/// @note Only available with [3.0.0+]. +/// @param[out] width Output width. +/// @param[out] height Output height. + pub fn appletGetDefaultDisplayResolution ( width : * mut s32 , height : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets an Event which is signaled when the output from \ref appletGetDefaultDisplayResolution changes. +/// @note Only available with [3.0.0+]. +/// @note The Event must be closed by the user once finished with it. +/// @param[out] out_event Output Event with autoclear=true. + pub fn appletGetDefaultDisplayResolutionChangeEvent ( out_event : * mut Event ) -> Result ; } extern "C" { + /// @brief Gets the HdcpAuthenticationState. +/// @note Only available with [4.0.0+]. +/// @param[out] state Output state. + pub fn appletGetHdcpAuthenticationState ( state : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets an Event which is signaled when the output from \ref appletGetHdcpAuthenticationState changes. +/// @note Only available with [4.0.0+]. +/// @note The Event must be closed by the user once finished with it. +/// @param[out] out_event Output Event with autoclear=true. + pub fn appletGetHdcpAuthenticationStateChangeEvent ( out_event : * mut Event ) -> Result ; } extern "C" { + /// @brief Sets the \ref AppletTvPowerStateMatchingMode. +/// @note Only available with [5.0.0+]. +/// @param[in] mode \ref AppletTvPowerStateMatchingMode + pub fn appletSetTvPowerStateMatchingMode ( mode : AppletTvPowerStateMatchingMode ) -> Result ; } extern "C" { + /// @brief Gets the application titleID for the specified ContentActionName string. +/// @note Only available when the current applet is ::AppletId_starter on [5.1.0+]. +/// @param[out] titleID Application titleID. +/// @param[in] name ContentActionName string. + pub fn appletGetApplicationIdByContentActionName ( titleID : * mut u64 , name : * const ctypes :: c_char ) -> Result ; } extern "C" { /// @brief Sets the \ref ApmCpuBoostMode. /// @note Only available with [7.0.0+] (not fully usable system-side with 6.x). /// @param mode \ref ApmCpuBoostMode. pub fn appletSetCpuBoostMode ( mode : ApmCpuBoostMode ) -> Result ; } extern "C" { + /// @brief Perform SystemButtonPressing with the specified \ref AppletSystemButtonType. +/// @note Only available with [6.0.0+]. +/// @param[in] type \ref AppletSystemButtonType + pub fn appletPerformSystemButtonPressingIfInFocus ( type_ : AppletSystemButtonType ) -> Result ; } extern "C" { + /// @brief Sets whether PerformanceConfigurationChangedNotification is enabled. +/// @note Only available with [7.0.0+]. +/// @param[in] flag Whether to enable the notification. + pub fn appletSetPerformanceConfigurationChangedNotification ( flag : bool ) -> Result ; } extern "C" { /// @brief Gets the current PerformanceConfiguration. /// @note Only available with [7.0.0+]. /// @param PerformanceConfiguration Output PerformanceConfiguration. pub fn appletGetCurrentPerformanceConfiguration ( PerformanceConfiguration : * mut u32 ) -> Result ; } extern "C" { + /// @brief Gets the OperationModeSystemInfo. +/// @note Only available with [7.0.0+]. +/// @param[out] info Output info. + pub fn appletGetOperationModeSystemInfo ( info : * mut u32 ) -> Result ; } extern "C" { + /// @brief Delay exiting until \ref appletUnlockExit is called, with a 15 second timeout once exit is requested. +/// @note When exit is requested \ref appletMainLoop will return false, hence any main-loop using appletMainLoop will exit. This allows the app to handle cleanup post-main-loop instead of being force-terminated. +/// @note If the above timeout occurs after exit was requested where \ref appletUnlockExit was not called, the process will be forced-terminated. +/// @note \ref appletUnlockExit must be used before main() returns. + pub fn appletLockExit ( ) -> Result ; } extern "C" { + /// Unlocks exiting, see \ref appletLockExit. + pub fn appletUnlockExit ( ) -> Result ; } extern "C" { + /// @brief Enter FatalSection. + pub fn appletEnterFatalSection ( ) -> Result ; } extern "C" { + /// @brief Leave FatalSection. + pub fn appletLeaveFatalSection ( ) -> Result ; } extern "C" { + /// @brief Controls whether screenshot-capture is allowed. +/// @param permission \ref AppletScreenShotPermission + pub fn appletSetScreenShotPermission ( permission : AppletScreenShotPermission ) -> Result ; } extern "C" { + /// @brief Sets whether ::AppletNotificationMessage_Restart is enabled. +/// @param[in] flag Whether to enable the notification. + pub fn appletSetRestartMessageEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Sets the \ref AppletIdentityInfo for screenshots. +/// @param[in] info \ref AppletIdentityInfo + pub fn appletSetScreenShotAppletIdentityInfo ( info : * mut AppletIdentityInfo ) -> Result ; } extern "C" { + /// @brief Sets ControllerFirmwareUpdateSection. +/// @note Only available with [3.0.0+]. +/// @note This throws error 0x40280 when the internal state flag already matches the input value. +/// @param[in] flag Flag + pub fn appletSetControllerFirmwareUpdateSection ( flag : bool ) -> Result ; } extern "C" { + /// @brief Sets whether ::AppletNotificationMessage_CaptureButtonShortPressed is enabled. +/// @note Only available with [3.0.0+]. +/// @note When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots. +/// @param[in] flag Whether to enable the notification. + pub fn appletSetRequiresCaptureButtonShortPressedMessage ( flag : bool ) -> Result ; } extern "C" { + /// @brief Sets the Album screenshot ImageOrientation. +/// @note Only available with [3.0.0+]. +/// @param[in] orientation \ref AlbumImageOrientation + pub fn appletSetAlbumImageOrientation ( orientation : AlbumImageOrientation ) -> Result ; } extern "C" { + /// @brief Sets the DesirableKeyboardLayout. +/// @note Only available with [4.0.0+]. +/// @param[in] layout Input layout. + pub fn appletSetDesirableKeyboardLayout ( layout : u32 ) -> Result ; } extern "C" { pub fn appletCreateManagedDisplayLayer ( out : * mut u64 ) -> Result ; } extern "C" { + /// @brief Checks whether SystemBufferSharing is enabled, throwing an error otherwise. +/// @note Only available with [4.0.0+]. Not usable with AppletType_*Application. + pub fn appletIsSystemBufferSharingEnabled ( ) -> Result ; } extern "C" { + /// @brief Gets the System SharedBufferHandle and SharedLayerHandle. +/// @note Only available with [4.0.0+]. Not usable with AppletType_*Application. +/// @param[out] SharedBufferHandle Output System SharedBufferHandle. +/// @param[out] SharedLayerHandle Output System SharedLayerHandle. + pub fn appletGetSystemSharedLayerHandle ( SharedBufferHandle : * mut u64 , SharedLayerHandle : * mut u64 ) -> Result ; } extern "C" { + /// @brief Same as \ref appletGetSystemSharedLayerHandle except this just gets the SharedBufferHandle. +/// @note Only available with [5.0.0+]. Not usable with AppletType_*Application. +/// @param[out] SharedBufferHandle Output System SharedBufferHandle. + pub fn appletGetSystemSharedBufferHandle ( SharedBufferHandle : * mut u64 ) -> Result ; } extern "C" { + /// @brief Sets whether ::AppletNotificationMessage_RequestToDisplay is enabled. +/// @note Sets an internal state flag. When the input flag is 0, this will in additional run the same code as \ref appletApproveToDisplay. +/// @param[in] flag Flag + pub fn appletSetHandlesRequestToDisplay ( flag : bool ) -> Result ; } extern "C" { + /// @brief Approve the display requested by ::AppletNotificationMessage_RequestToDisplay, see also \ref appletSetHandlesRequestToDisplay. + pub fn appletApproveToDisplay ( ) -> Result ; } extern "C" { + /// @brief OverrideAutoSleepTimeAndDimmingTime +/// @param[in] inval0 Unknown input value. +/// @param[in] inval1 Unknown input value. +/// @param[in] inval2 Unknown input value. +/// @param[in] inval3 Unknown input value. + pub fn appletOverrideAutoSleepTimeAndDimmingTime ( inval0 : s32 , inval1 : s32 , inval2 : s32 , inval3 : s32 ) -> Result ; } extern "C" { + /// @brief Sets the IdleTimeDetectionExtension. +/// @param[in] ext \ref AppletIdleTimeDetectionExtension Must be 0-2: 0 = disabled, 1 = Extended, and 2 = ExtendedUnsafe. + pub fn appletSetIdleTimeDetectionExtension ( ext : AppletIdleTimeDetectionExtension ) -> Result ; } extern "C" { + /// @brief Gets the value set by \ref appletSetIdleTimeDetectionExtension. +/// @param[out] ext \ref AppletIdleTimeDetectionExtension + pub fn appletGetIdleTimeDetectionExtension ( ext : * mut AppletIdleTimeDetectionExtension ) -> Result ; } extern "C" { + /// @brief Sets the InputDetectionSourceSet. +/// @param[in] val Input value. + pub fn appletSetInputDetectionSourceSet ( val : u32 ) -> Result ; } extern "C" { + /// @brief Reports that the user is active, for idle detection (screen dimming / auto-sleep). This is equivalent to when the user uses HID input. +/// @note Only available with [2.0.0+]. + pub fn appletReportUserIsActive ( ) -> Result ; } extern "C" { + /// @brief Gets the current Illuminance from the light sensor. +/// @note Only available with [3.0.0+]. +/// @param fLux Output fLux + pub fn appletGetCurrentIlluminance ( fLux : * mut f32 ) -> Result ; } extern "C" { + /// @brief Gets whether Illuminance is available. +/// @note Only available with [3.0.0+]. +/// @param out Output flag + pub fn appletIsIlluminanceAvailable ( out : * mut bool ) -> Result ; } extern "C" { + /// @brief Sets AutoSleepDisabled. +/// @note Only available with [5.0.0+]. +/// @param[in] flag Flag + pub fn appletSetAutoSleepDisabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Gets AutoSleepDisabled. +/// @note Only available with [5.0.0+]. +/// @param[out] out Output flag + pub fn appletIsAutoSleepDisabled ( out : * mut bool ) -> Result ; } extern "C" { + /// @brief Gets the current Illuminance from the light sensor. Same as \ref appletGetCurrentIlluminance except for the additional param. +/// @note Only available with [5.0.0+]. +/// @param bOverLimit Output bOverLimit +/// @param fLux Output fLux + pub fn appletGetCurrentIlluminanceEx ( bOverLimit : * mut bool , fLux : * mut f32 ) -> Result ; } extern "C" { + /// @brief Sets the WirelessPriorityMode. +/// @note Only available with [4.0.0+]. +/// @param[in] mode \ref AppletWirelessPriorityMode + pub fn appletSetWirelessPriorityMode ( mode : AppletWirelessPriorityMode ) -> Result ; } extern "C" { + /// @brief Sets whether ::AppletNotificationMessage_AlbumImageTaken is enabled. +/// @note Only available with [7.0.0+]. +/// @param[in] flag Whether to enable the notification. + pub fn appletSetAlbumImageTakenNotificationEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Gets the total time in nanoseconds that the current process was actively running (not suspended), relative to when \ref appletInitialize was last used. +/// @note Only available with [6.0.0+]. +/// @param[out] activeTime Output nanoseconds value. + pub fn appletGetProgramTotalActiveTime ( activeTime : * mut u64 ) -> Result ; } extern "C" { + /// @brief Sets the Application AlbumUserData. +/// @note Only available with [8.0.0+]. +/// @param[in] buffer Buffer containing arbitrary UserData. +/// @param[in] size Buffer size, must be <=0x400. + pub fn appletSetApplicationAlbumUserData ( buffer : * const ctypes :: c_void , size : usize ) -> Result ; } extern "C" { + /// @brief Gets the AppletResourceUserId of the CallerApplet. +/// @note Only available with [6.0.0+]. +/// @param[out] out AppletResourceUserId + pub fn appletGetAppletResourceUserIdOfCallerApplet ( out : * mut u64 ) -> Result ; } extern "C" { + /// @brief Sets the current applet WindowVisibility. +/// @note Only available with [7.0.0+]. +/// @param[in] flag Flag + pub fn appletSetAppletWindowVisibility ( flag : bool ) -> Result ; } extern "C" { + /// @brief Sets the AppletGpuTimeSlice. +/// @note Only available with [7.0.0+]. +/// @param[in] val Input value, must not be negative. + pub fn appletSetAppletGpuTimeSlice ( val : s64 ) -> Result ; } extern "C" { + /// @brief Sets the ExpectedMasterVolume for MainApplet and LibraryApplet. +/// @note Used by some official apps before/after launching LibraryApplets. Prior to changing the volume, the official app uses \ref appletGetExpectedMasterVolume, with the output being used to restore the volume after LibraryApplet handling. +/// @param[in] mainAppletVolume MainApplet ExpectedMasterVolume. +/// @param[in] libraryAppletVolume LibraryApplet ExpectedMasterVolume. + pub fn appletSetExpectedMasterVolume ( mainAppletVolume : f32 , libraryAppletVolume : f32 ) -> Result ; } extern "C" { + /// @brief Gets the ExpectedMasterVolume for MainApplet and LibraryApplet. +/// @note See also \ref appletSetExpectedMasterVolume. +/// @param[out] mainAppletVolume MainApplet ExpectedMasterVolume. Optional, can be NULL. Used with cmd GetMainAppletExpectedMasterVolume when not NULL. +/// @param[out] libraryAppletVolume LibraryApplet ExpectedMasterVolume. Optional, can be NULL. Used with cmd GetLibraryAppletExpectedMasterVolume when not NULL. + pub fn appletGetExpectedMasterVolume ( mainAppletVolume : * mut f32 , libraryAppletVolume : * mut f32 ) -> Result ; } extern "C" { + /// @brief Change the MainApplet MasterVolume. +/// @param[in] volume MainApplet MasterVolume. +/// @param[in] unk Unknown. + pub fn appletChangeMainAppletMasterVolume ( volume : f32 , unk : u64 ) -> Result ; } extern "C" { + /// @brief Sets the TransparentVolumeRate. +/// @param[in] val Input value. + pub fn appletSetTransparentVolumeRate ( val : f32 ) -> Result ; } extern "C" { + /// @brief Update the LastForeground CaptureImage. + pub fn appletUpdateLastForegroundCaptureImage ( ) -> Result ; } extern "C" { + /// @brief Update the CallerApplet CaptureImage. + pub fn appletUpdateCallerAppletCaptureImage ( ) -> Result ; } extern "C" { + /// @brief Gets the LastForeground CaptureImage. +/// @param[out] buffer Output buffer containing the 1280x720 RGBA8 image. +/// @param[out] size Buffer size, must match 0x384000. +/// @param[out] flag Output flag. + pub fn appletGetLastForegroundCaptureImageEx ( buffer : * mut ctypes :: c_void , size : usize , flag : * mut bool ) -> Result ; } extern "C" { + /// @brief Gets the LastApplication CaptureImage. +/// @param[out] buffer Output buffer containing the 1280x720 RGBA8 image. +/// @param[out] size Buffer size, must match 0x384000. +/// @param[out] flag Output flag. + pub fn appletGetLastApplicationCaptureImageEx ( buffer : * mut ctypes :: c_void , size : usize , flag : * mut bool ) -> Result ; } extern "C" { + /// @brief Gets the CallerApplet CaptureImage. +/// @param[out] buffer Output buffer containing the 1280x720 RGBA8 image. +/// @param[out] size Buffer size, must match 0x384000. +/// @param[out] flag Output flag. + pub fn appletGetCallerAppletCaptureImageEx ( buffer : * mut ctypes :: c_void , size : usize , flag : * mut bool ) -> Result ; } extern "C" { + /// @brief Takes a screenshot of the current applet Layer into the specified CaptureSharedBuffer. +/// @note Only available with [2.0.0+]. +/// @param[in] flag Flag. +/// @param[in] captureBuf \ref AppletCaptureSharedBuffer + pub fn appletTakeScreenShotOfOwnLayer ( flag : bool , captureBuf : AppletCaptureSharedBuffer ) -> Result ; } extern "C" { + /// @brief Copies image data from a CaptureSharedBuffer to another CaptureSharedBuffer. +/// @note Only available with [5.0.0+]. +/// @param[in] dstCaptureBuf Destination \ref AppletCaptureSharedBuffer. +/// @param[in] srcCaptureBuf Source \ref AppletCaptureSharedBuffer. + pub fn appletCopyBetweenCaptureBuffers ( dstCaptureBuf : AppletCaptureSharedBuffer , srcCaptureBuf : AppletCaptureSharedBuffer ) -> Result ; } extern "C" { + /// @brief Clear the input CaptureSharedBuffer with the specified color. +/// @note Only available with [3.0.0+]. +/// @param[in] flag Flag. +/// @param[in] captureBuf \ref AppletCaptureSharedBuffer +/// @param[in] color RGBA8 color. + pub fn appletClearCaptureBuffer ( flag : bool , captureBuf : AppletCaptureSharedBuffer , color : u32 ) -> Result ; } extern "C" { + /// @brief Clear the AppletTransitionBuffer with the specified color. +/// @note Only available with [3.0.0+]. +/// @param[in] color RGBA8 color. + pub fn appletClearAppletTransitionBuffer ( color : u32 ) -> Result ; } extern "C" { + /// @brief Acquire the LastApplication CaptureSharedBuffer. +/// @note Only available with [4.0.0+]. +/// @param[out] flag Output flag. +/// @param[out] id Output ID. + pub fn appletAcquireLastApplicationCaptureSharedBuffer ( flag : * mut bool , id : * mut s32 ) -> Result ; } extern "C" { + /// @brief Release the LastApplication CaptureSharedBuffer. +/// @note Only available with [4.0.0+]. + pub fn appletReleaseLastApplicationCaptureSharedBuffer ( ) -> Result ; } extern "C" { + /// @brief Acquire the LastForeground CaptureSharedBuffer. +/// @note Only available with [4.0.0+]. +/// @param[out] flag Output flag. +/// @param[out] id Output ID. + pub fn appletAcquireLastForegroundCaptureSharedBuffer ( flag : * mut bool , id : * mut s32 ) -> Result ; } extern "C" { + /// @brief Release the LastForeground CaptureSharedBuffer. +/// @note Only available with [4.0.0+]. + pub fn appletReleaseLastForegroundCaptureSharedBuffer ( ) -> Result ; } extern "C" { + /// @brief Acquire the CallerApplet CaptureSharedBuffer. +/// @note Only available with [4.0.0+]. +/// @param[out] flag Output flag. +/// @param[out] id Output ID. + pub fn appletAcquireCallerAppletCaptureSharedBuffer ( flag : * mut bool , id : * mut s32 ) -> Result ; } extern "C" { + /// @brief Release the CallerApplet CaptureSharedBuffer. +/// @note Only available with [4.0.0+]. + pub fn appletReleaseCallerAppletCaptureSharedBuffer ( ) -> Result ; } extern "C" { + /// @brief Takes a screenshot of the current applet Layer into the specified CaptureSharedBuffer. Same as \ref appletTakeScreenShotOfOwnLayer except for the additional immediately param. +/// @note Only available with [6.0.0+]. +/// @param[in] flag0 Flag0. +/// @param[in] immediately Whether the screenshot should be taken immediately. +/// @param[in] captureBuf \ref AppletCaptureSharedBuffer + pub fn appletTakeScreenShotOfOwnLayerEx ( flag0 : bool , immediately : bool , captureBuf : AppletCaptureSharedBuffer ) -> Result ; } extern "C" { + /// @brief Closes a LockAccessor. +/// @param a LockAccessor object. + pub fn appletLockAccessorClose ( a : * mut AppletLockAccessor ) ; } extern "C" { + /// @brief TryLock a LockAccessor. +/// @param a LockAccessor object. +/// @param[out] flag Whether locking was successful, when false this indicates that this func should be called again. + pub fn appletLockAccessorTryLock ( a : * mut AppletLockAccessor , flag : * mut bool ) -> Result ; } extern "C" { + /// @brief Lock a LockAccessor. +/// @note Similar to \ref appletLockAccessorTryLock, except this uses timeout U64_MAX with the eventWait call, and this uses TryLock repeatedly until the output flag value is true. +/// @param a LockAccessor object. + pub fn appletLockAccessorLock ( a : * mut AppletLockAccessor ) -> Result ; } extern "C" { + /// @brief Unlock a LockAccessor. +/// @param a LockAccessor object. + pub fn appletLockAccessorUnlock ( a : * mut AppletLockAccessor ) -> Result ; } extern "C" { /// @brief Creates a LibraryApplet. /// @param h AppletHolder object. /// @param id See \ref AppletId. @@ -1919,7 +2751,7 @@ where /// Returns whether the AppletHolder object was initialized. pub fn appletHolderActive ( h : * mut AppletHolder ) -> bool ; } extern "C" { /// @brief Gets the IndirectLayerConsumerHandle loaded during \ref appletCreateLibraryApplet, on 2.0.0+. -/// @note Only available when \ref LibAppletMode is ::LibAppletMode_Unknown3. +/// @note Only available when \ref LibAppletMode is ::LibAppletMode_BackgroundIndirect. /// @param h AppletHolder object. /// @param out Output IndirectLayerConsumerHandle. pub fn appletHolderGetIndirectLayerConsumerHandle ( h : * mut AppletHolder , out : * mut u64 ) -> Result ; } extern "C" { @@ -1938,6 +2770,11 @@ where /// @brief Gets the \ref LibAppletExitReason set by \ref appletHolderJoin. /// @param h AppletHolder object. pub fn appletHolderGetExitReason ( h : * mut AppletHolder ) -> LibAppletExitReason ; } extern "C" { + /// @brief Sets OutOfFocusApplicationSuspendingEnabled. +/// @note Only available with AppletType_*Application. +/// @param h AppletHolder object. +/// @param[in] flag Flag + pub fn appletHolderSetOutOfFocusApplicationSuspendingEnabled ( h : * mut AppletHolder , flag : bool ) -> Result ; } extern "C" { /// @brief Waits for the PopInteractiveOutDataEvent and StateChangedEvent. /// @return false for error / when StateChangedEvent was signaled, and true when PopInteractiveOutDataEvent was signaled. /// @param h AppletHolder object. @@ -1965,6 +2802,10 @@ where /// @param h AppletHolder object. /// @param s Storage object. pub fn appletHolderPopInteractiveOutData ( h : * mut AppletHolder , s : * mut AppletStorage ) -> Result ; } extern "C" { + /// @brief Gets the \ref LibAppletInfo for the specified LibraryApplet. +/// @param h AppletHolder object. +/// @param[out] info \ref LibAppletInfo + pub fn appletHolderGetLibraryAppletInfo ( h : * mut AppletHolder , info : * mut LibAppletInfo ) -> Result ; } extern "C" { /// @brief Creates a storage. /// @param s Storage object. /// @param size Size of storage. @@ -2019,6 +2860,268 @@ where /// @param addr Output mapped address (optional). /// @param size Output size (optional). pub fn appletStorageMap ( s : * mut AppletStorage , addr : * mut * mut ctypes :: c_void , size : * mut usize ) -> Result ; } extern "C" { + /// @brief Pops a LaunchParameter AppletStorage, the storage will be removed from sysmodule state during this. +/// @param s Output storage. +/// @param kind See \ref AppletLaunchParameterKind. +/// @note Only available with AppletType_*Application. +/// @note See also acc.h \ref accountGetPreselectedUser (wrapper for appletPopLaunchParameter etc). + pub fn appletPopLaunchParameter ( s : * mut AppletStorage , kind : AppletLaunchParameterKind ) -> Result ; } extern "C" { + /// @brief Requests to launch the specified application. +/// @note Only available with AppletType_*Application, or AppletType_LibraryApplet on 5.0.0+. +/// @param[in] titleID Application titleID. Value 0 can be used to relaunch the current application. +/// @param s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0 (or with AppletType_LibraryApplet), this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_Application. + pub fn appletRequestLaunchApplication ( titleID : u64 , s : * mut AppletStorage ) -> Result ; } extern "C" { + /// @brief Requests to launch the specified application, for kiosk systems. +/// @note Only available with AppletType_*Application on 3.0.0+. +/// @note Identical to \ref appletRequestLaunchApplication, except this allows the user to specify the attribute fields instead of the defaults being used. +/// @param[in] titleID Application titleID +/// @param s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0, this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_Application. +/// @param[in] attr Kiosk application attributes. + pub fn appletRequestLaunchApplicationForQuest ( titleID : u64 , s : * mut AppletStorage , attr : * const AppletApplicationAttributeForQuest ) -> Result ; } extern "C" { pub fn appletGetDesiredLanguage ( LanguageCode : * mut u64 ) -> Result ; } extern "C" { + /// Only available with AppletType_*Application. + pub fn appletSetTerminateResult ( res : Result ) -> Result ; } extern "C" { + /// @brief Gets the DisplayVersion for the current host title control.nacp. +/// @note Only available with AppletType_*Application. +/// @param[out] displayVersion Output DisplayVersion string, must be at least 0x10-bytes. This is always NUL-terminated. + pub fn appletGetDisplayVersion ( displayVersion : * mut ctypes :: c_char ) -> Result ; } extern "C" { + /// @brief Blocks the usage of the home button, for short (Home Menu) and long (Overlay) presses. +/// @note Only available with AppletType_*Application. +/// @param val Unknown. Official sw only uses hard-coded value 0 for this. + pub fn appletBeginBlockingHomeButtonShortAndLongPressed ( val : s64 ) -> Result ; } extern "C" { + /// @brief Ends the blocking started by \ref appletBeginBlockingHomeButtonShortAndLongPressed. +/// @note Only available with AppletType_*Application. + pub fn appletEndBlockingHomeButtonShortAndLongPressed ( ) -> Result ; } extern "C" { + /// @brief Blocks the usage of the home button, for short presses (Home Menu). +/// @note Only available with AppletType_*Application. +/// @param val Unknown nanoseconds. Value 0 can be used. + pub fn appletBeginBlockingHomeButton ( val : s64 ) -> Result ; } extern "C" { + /// @brief Ends the blocking started by \ref appletBeginBlockingHomeButton. +/// @note Only available with AppletType_*Application. + pub fn appletEndBlockingHomeButton ( ) -> Result ; } extern "C" { + /// @brief Notify that the app is now running, for the Application logo screen. This throws a fatal-error on failure. +/// @note This will just return when applet-type isn't AppletType_Application, or when this was already used previously. Used automatically by \ref appletInitialize when __nx_applet_auto_notifyrunning is set to true (the default value). + pub fn appletNotifyRunning ( out : * mut bool ) ; } extern "C" { + /// @brief Gets the PseudoDeviceId. This is derived from the output of a ns command, and from data in the host title control.nacp. +/// @note Only available with AppletType_*Application on 2.0.0+. +/// @param[out] out Output PseudoDeviceId. + pub fn appletGetPseudoDeviceId ( out : * mut u128 ) -> Result ; } extern "C" { + /// Set media playback state. +/// If state is set to true, screen dimming and auto sleep is disabled. +/// For *Application, this uses cmd SetMediaPlaybackStateForApplication, otherwise cmd SetMediaPlaybackState is used. + pub fn appletSetMediaPlaybackState ( state : bool ) -> Result ; } extern "C" { + /// Gets whether video recording is supported. +/// See also \ref appletInitializeGamePlayRecording. + pub fn appletIsGamePlayRecordingSupported ( flag : * mut bool ) -> Result ; } extern "C" { + /// Disable/enable video recording. Only available after \ref appletInitializeGamePlayRecording was used. +/// See also \ref appletInitializeGamePlayRecording. + pub fn appletSetGamePlayRecordingState ( state : bool ) -> Result ; } extern "C" { + /// Initializes video recording. This allocates a 0x6000000-byte buffer for the TransferMemory, cleanup is handled automatically during app exit in \ref appletExit. +/// Only available with AppletType_Application on 3.0.0+, hence errors from this can be ignored. +/// Video recording is only fully available system-side with 4.0.0+. +/// Only usable when running under a title which supports video recording. Using this is only needed when the host title control.nacp has VideoCaptureMode set to Enabled, with Automatic appletInitializeGamePlayRecording is not needed. + pub fn appletInitializeGamePlayRecording ( ) -> Result ; } extern "C" { + /// @brief Requests a system shutdown. +/// @note Only available with AppletType_*Application on 3.0.0+. + pub fn appletRequestToShutdown ( ) -> Result ; } extern "C" { + /// @brief Requests a system reboot. +/// @note Only available with AppletType_*Application on 3.0.0+. + pub fn appletRequestToReboot ( ) -> Result ; } extern "C" { + /// @brief Initializes the ApplicationCopyrightFrameBuffer, with dimensions 1280x720 + the tmem for it. This is used as an overlay for screenshots. +/// @note Only available with AppletType_*Application on 5.0.0+. +/// @note Cleanup for this is handled automatically during app exit in \ref appletExit. + pub fn appletInitializeApplicationCopyrightFrameBuffer ( ) -> Result ; } extern "C" { + /// @brief Sets the RGBA8 image for use with \ref appletInitializeApplicationCopyrightFrameBuffer. Overrides the current image, if this was already used previously. +/// @note Only available with AppletType_*Application on 5.0.0+. +/// @note The specified coordinates and width/height must be within the bounds of the framebuffer setup by \ref appletInitializeApplicationCopyrightFrameBuffer. +/// @param[in] buffer Input image buffer. +/// @param[in] size Input image buffer size. +/// @param[in] x X coordinate. Must not be negative. +/// @param[in] y Y coordinate. Must not be negative. +/// @param[in] width Image width. Must be >=1. +/// @param[in] height Image height. Must be >=1. +/// @param[in] mode WindowOriginMode. Should be at least 1. + pub fn appletSetApplicationCopyrightImage ( buffer : * const ctypes :: c_void , size : usize , x : s32 , y : s32 , width : s32 , height : s32 , mode : s32 ) -> Result ; } extern "C" { + /// @brief Sets the visibility for the image set by \ref appletSetApplicationCopyrightImage, in screenshots. +/// @note Only available with AppletType_*Application on 5.0.0+. +/// @param[in] visible Whether the image is visible. The default is true. + pub fn appletSetApplicationCopyrightVisibility ( visible : bool ) -> Result ; } extern "C" { + /// @brief Gets ApplicationPlayStatistics. +/// @note Only available with AppletType_*Application on 5.0.0+. +/// @note The input titleIDs must be allowed via control.nacp with the current host title. The minimum allowed titleID is the titleID for the current-process. +/// @param stats Output \ref PdmApplicationPlayStatistics array. +/// @param titleIDs Input titleIDs array. +/// @param count Total entries in the input/output arrays. +/// @param total_out Total output entries. + pub fn appletQueryApplicationPlayStatistics ( stats : * mut PdmApplicationPlayStatistics , titleIDs : * const u64 , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Same as \ref appletQueryApplicationPlayStatistics except this gets playstats specific to the input userID. +/// @note Only available with AppletType_*Application on 6.0.0+. +/// @param userID userID +/// @param stats Output \ref PdmApplicationPlayStatistics array. +/// @param titleIDs Input titleIDs array. +/// @param count Total entries in the input/output arrays. +/// @param total_out Total output entries. + pub fn appletQueryApplicationPlayStatisticsByUid ( userID : u128 , stats : * mut PdmApplicationPlayStatistics , titleIDs : * const u64 , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets an Event which is signaled for GpuErrorDetected. +/// @note Only available with AppletType_*Application on [8.0.0+]. +/// @note The Event must be closed by the user once finished with it. +/// @note Official sw waits on this Event from a seperate thread, triggering an abort when it's signaled. +/// @param[out] out_event Output Event with autoclear=false. + pub fn appletGetGpuErrorDetectedSystemEvent ( out_event : * mut Event ) -> Result ; } extern "C" { + /// @brief RequestToGetForeground +/// @note Only available with AppletType_SystemApplet. + pub fn appletRequestToGetForeground ( ) -> Result ; } extern "C" { + /// @brief LockForeground +/// @note Only available with AppletType_SystemApplet. + pub fn appletLockForeground ( ) -> Result ; } extern "C" { + /// @brief UnlockForeground +/// @note Only available with AppletType_SystemApplet. + pub fn appletUnlockForeground ( ) -> Result ; } extern "C" { + /// @brief Pops a storage from the general channel. +/// @note Only available with AppletType_SystemApplet. +/// @param[out] s Storage object. + pub fn appletPopFromGeneralChannel ( s : * mut AppletStorage ) -> Result ; } extern "C" { + /// @brief Gets an Event which is signaled when a new storage is available with \ref appletPopFromGeneralChannel. +/// @note Only available with AppletType_SystemApplet. +/// @note The Event must be closed by the user once finished with it. +/// @param[out] out_event Output Event with autoclear=false. + pub fn appletGetPopFromGeneralChannelEvent ( out_event : * mut Event ) -> Result ; } extern "C" { + /// @brief Gets a \ref AppletLockAccessor for HomeButtonWriter. +/// @note Only available with AppletType_SystemApplet. +/// @note Similar to using \ref appletGetWriterLockAccessorEx with inval=0. +/// @param a LockAccessor object. + pub fn appletGetHomeButtonWriterLockAccessor ( a : * mut AppletLockAccessor ) -> Result ; } extern "C" { + /// @brief Start the sequence for entering sleep-mode. +/// @note Only available with AppletType_SystemApplet. +/// @param[in] flag Flag, official sw uses hard-coded value = true. + pub fn appletStartSleepSequence ( flag : bool ) -> Result ; } extern "C" { + /// @brief Start the system-shutdown sequence. +/// @note Only available with AppletType_SystemApplet. + pub fn appletStartShutdownSequence ( ) -> Result ; } extern "C" { + /// @brief Start the system-reboot sequence. +/// @note Only available with AppletType_SystemApplet. + pub fn appletStartRebootSequence ( ) -> Result ; } extern "C" { + /// @brief IsAutoPowerDownRequested. Uses an idle:sys cmd internally. +/// @note Only available with AppletType_SystemApplet on [7.0.0+]. +/// @param[out] out Output flag. + pub fn appletIsAutoPowerDownRequested ( out : * mut bool ) -> Result ; } extern "C" { + /// @brief LoadAndApplyIdlePolicySettings. Uses an idle:sys cmd internally. +/// @note Only available with AppletType_SystemApplet. + pub fn appletLoadAndApplyIdlePolicySettings ( ) -> Result ; } extern "C" { + /// @brief NotifyCecSettingsChanged. Uses an omm cmd internally. +/// @note Only available with AppletType_SystemApplet on [2.0.0+]. + pub fn appletNotifyCecSettingsChanged ( ) -> Result ; } extern "C" { + /// @brief Sets the DefaultHomeButtonLongPressTime. +/// @note Only available with AppletType_SystemApplet on [3.0.0+]. +/// @param[in] val Input value. + pub fn appletSetDefaultHomeButtonLongPressTime ( val : s64 ) -> Result ; } extern "C" { + /// @brief UpdateDefaultDisplayResolution. Uses an omm cmd internally. +/// @note Only available with AppletType_SystemApplet on [3.0.0+]. + pub fn appletUpdateDefaultDisplayResolution ( ) -> Result ; } extern "C" { + /// @brief ShouldSleepOnBoot. Uses an omm cmd internally. +/// @note Only available with AppletType_SystemApplet on [3.0.0+]. +/// @param[out] out Output flag. + pub fn appletShouldSleepOnBoot ( out : * mut bool ) -> Result ; } extern "C" { + /// @brief Gets an Event which is signaled for HdcpAuthenticationFailed. +/// @note Only available with AppletType_SystemApplet on [4.0.0+]. +/// @note The Event must be closed by the user once finished with it. +/// @param[out] out_event Output Event with autoclear=false. + pub fn appletGetHdcpAuthenticationFailedEvent ( out_event : * mut Event ) -> Result ; } extern "C" { + /// @brief Gets the \ref LibAppletInfo for the current LibraryApplet. +/// @note Only available with AppletType_LibraryApplet. +/// @param[out] info \ref LibAppletInfo + pub fn appletGetLibraryAppletInfo ( info : * mut LibAppletInfo ) -> Result ; } extern "C" { + /// @brief Gets the \ref AppletIdentityInfo for the MainApplet. +/// @note Only available with AppletType_LibraryApplet. +/// @param[out] info \ref AppletIdentityInfo + pub fn appletGetMainAppletIdentityInfo ( info : * mut AppletIdentityInfo ) -> Result ; } extern "C" { + /// @brief Gets the \ref AppletIdentityInfo for the CallerApplet. +/// @note Only available with AppletType_LibraryApplet. +/// @param[out] info \ref AppletIdentityInfo + pub fn appletGetCallerAppletIdentityInfo ( info : * mut AppletIdentityInfo ) -> Result ; } extern "C" { + /// @brief Gets an array of \ref AppletIdentityInfo for the CallerStack. +/// @note Only available with AppletType_LibraryApplet on [3.0.0+]. +/// @param[out] stack Output array of \ref AppletIdentityInfo. +/// @param[in] count Size of the stack array. +/// @param[out] total_out Total output entries. + pub fn appletGetCallerAppletIdentityInfoStack ( stack : * mut AppletIdentityInfo , count : s32 , total_out : * mut s32 ) -> Result ; } extern "C" { + /// @brief Gets the \ref AppletIdentityInfo for the NextReturnDestinationApplet. +/// @note Only available with AppletType_LibraryApplet on [4.0.0+]. +/// @param[out] info \ref AppletIdentityInfo + pub fn appletGetNextReturnDestinationAppletIdentityInfo ( info : * mut AppletIdentityInfo ) -> Result ; } extern "C" { + /// @brief Stops forwarding the input to the foreground app. +/// @note Only available with AppletType_OverlayApplet. +/// @note You have to call this to receive inputs through the hid service when running as the overlay applet. + pub fn appletBeginToWatchShortHomeButtonMessage ( ) -> Result ; } extern "C" { + /// @brief Forwards input to the foreground app. +/// @note Only available with AppletType_OverlayApplet. +/// @note After calling this the overlay applet won't receive any input until \ref appletBeginToWatchShortHomeButtonMessage is called again. + pub fn appletEndToWatchShortHomeButtonMessage ( ) -> Result ; } extern "C" { + /// @brief Gets the application titleID for displaying the logo screen during application launch. +/// @note Only available with AppletType_OverlayApplet. +/// @param[out] titleID Output application titleID, 0 when no application is running. + pub fn appletGetApplicationIdForLogo ( titleID : * mut u64 ) -> Result ; } extern "C" { + /// @brief Sets the GpuTimeSliceBoost. +/// @note Only available with AppletType_OverlayApplet. +/// @param[in] val Input value. + pub fn appletSetGpuTimeSliceBoost ( val : u64 ) -> Result ; } extern "C" { + /// @brief Sets AutoSleepTimeAndDimmingTimeEnabled. +/// @note Only available with AppletType_OverlayApplet on [2.0.0+]. +/// @param[in] flag Flag + pub fn appletSetAutoSleepTimeAndDimmingTimeEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief TerminateApplicationAndSetReason +/// @note Only available with AppletType_OverlayApplet on [2.0.0+]. +/// @param[in] reason Result reason. + pub fn appletTerminateApplicationAndSetReason ( reason : Result ) -> Result ; } extern "C" { + /// @brief Sets ScreenShotPermissionGlobally. +/// @note Only available with AppletType_OverlayApplet on [3.0.0+]. +/// @param[in] flag Flag + pub fn appletSetScreenShotPermissionGlobally ( flag : bool ) -> Result ; } extern "C" { + /// @brief Start the system-shutdown sequence. +/// @note Only available with AppletType_OverlayApplet on [6.0.0+]. + pub fn appletStartShutdownSequenceForOverlay ( ) -> Result ; } extern "C" { + /// @brief Start the system-reboot sequence. +/// @note Only available with AppletType_OverlayApplet on [6.0.0+]. + pub fn appletStartRebootSequenceForOverlay ( ) -> Result ; } extern "C" { + /// @brief Sets HandlingHomeButtonShortPressedEnabled. +/// @note Only available with AppletType_OverlayApplet on [8.0.0+]. +/// @param[in] flag Flag + pub fn appletSetHandlingHomeButtonShortPressedEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Reads the ThemeStorage for the current applet. +/// @note Only available with AppletType_SystemApplet, AppletType_LibraryApplet, or AppletType_OverlayApplet, on [7.0.0+]. +/// @note offset(+size) must be <=0x400. +/// @param[out] buffer Output buffer data. +/// @param[in] size Size to read. +/// @param[in] offset Offset within the ThemeStorage. +/// @param[out] transfer_size Actual read size. + pub fn appletReadThemeStorage ( buffer : * mut ctypes :: c_void , size : usize , offset : u64 , transfer_size : * mut usize ) -> Result ; } extern "C" { + /// @brief Writes the ThemeStorage for the current applet. +/// @note Only available with AppletType_SystemApplet, AppletType_LibraryApplet, or AppletType_OverlayApplet, on [7.0.0+]. +/// @note offset(+size) must be <=0x400. +/// @param[in] buffer Input buffer data. +/// @param[in] size Size to write. +/// @param[in] offset Offset within the ThemeStorage. + pub fn appletWriteThemeStorage ( buffer : * const ctypes :: c_void , size : usize , offset : u64 ) -> Result ; } extern "C" { + /// @brief Gets the DisplayLogicalResolution. +/// @note Only available with AppletType_SystemApplet, AppletType_LibraryApplet, or AppletType_OverlayApplet, on [8.0.0+]. +/// @param[out] width Output width. +/// @param[out] height Output height. + pub fn appletGetDisplayLogicalResolution ( width : * mut s32 , height : * mut s32 ) -> Result ; } extern "C" { + /// @brief Sets the DisplayMagnification. This is essentially layer image crop, for everything non-Overlay. +/// @note Only available with AppletType_SystemApplet, AppletType_LibraryApplet, or AppletType_OverlayApplet, on [8.0.0+]. +/// @note x and width are multiplied with the same width value returned by \ref appletGetDisplayLogicalResolution, so these should be in the range 0.0f-1.0f. Likewise for y and height, except these are multipled with the height value. +/// @param[in] x X position. +/// @param[in] y Y position. +/// @param[in] width Width. +/// @param[in] height Height. + pub fn appletSetDisplayMagnification ( x : f32 , y : f32 , width : f32 , height : f32 ) -> Result ; } extern "C" { + /// @brief Sets whether HomeButtonDoubleClick is enabled. +/// @note Only available with AppletType_SystemApplet, AppletType_LibraryApplet, or AppletType_OverlayApplet, on [8.0.0+]. +/// @param[in] flag Flag + pub fn appletSetHomeButtonDoubleClickEnabled ( flag : bool ) -> Result ; } extern "C" { + /// @brief Gets whether HomeButtonDoubleClick is enabled. +/// @note Only available with AppletType_SystemApplet, AppletType_LibraryApplet, or AppletType_OverlayApplet, on [8.0.0+]. +/// @param[out] out Output flag. + pub fn appletGetHomeButtonDoubleClickEnabled ( out : * mut bool ) -> Result ; } extern "C" { /// @brief Gets a notification message. pub fn appletGetMessage ( msg : * mut u32 ) -> Result ; } extern "C" { /// @brief Processes the current applet status using the specified msg. @@ -2086,7 +3189,7 @@ where /// @param timeout Timeout value, use U64_MAX to wait until all finished. pub fn audoutWaitPlayFinish ( released : * mut * mut AudioOutBuffer , released_count : * mut u32 , timeout : u64 ) -> Result ; } extern "C" { /// These return the state associated with the currently active audio output device. - pub fn audoutGetSampleRate ( ) -> u32 ; } extern "C" { pub fn audoutGetChannelCount ( ) -> u32 ; } extern "C" { pub fn audoutGetPcmFormat ( ) -> PcmFormat ; } extern "C" { pub fn audoutGetDeviceState ( ) -> AudioOutState ; } pub const AudioRendererOutputRate_AudioRendererOutputRate_32kHz : AudioRendererOutputRate = 0 ; pub const AudioRendererOutputRate_AudioRendererOutputRate_48kHz : AudioRendererOutputRate = 1 ; pub type AudioRendererOutputRate = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AudioRendererConfig { pub output_rate : AudioRendererOutputRate , pub num_voices : ctypes :: c_int , pub num_effects : ctypes :: c_int , pub num_sinks : ctypes :: c_int , pub num_mix_objs : ctypes :: c_int , pub num_mix_buffers : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_AudioRendererConfig ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererConfig > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( AudioRendererConfig ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererConfig > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererConfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . output_rate as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( output_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_voices as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_voices ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_effects as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_effects ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_sinks as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_sinks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_mix_objs as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_mix_objs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_mix_buffers as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_mix_buffers ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererUpdateDataHeader { pub revision : u32 , pub behavior_sz : u32 , pub mempools_sz : u32 , pub voices_sz : u32 , pub channels_sz : u32 , pub effects_sz : u32 , pub mixes_sz : u32 , pub sinks_sz : u32 , pub perfmgr_sz : u32 , pub _padding : [ u32 ; 6usize ] , pub total_sz : u32 , } # [ test ] fn bindgen_test_layout_AudioRendererUpdateDataHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererUpdateDataHeader > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( AudioRendererUpdateDataHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererUpdateDataHeader > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererUpdateDataHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . revision as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( revision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . behavior_sz as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( behavior_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . mempools_sz as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( mempools_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . voices_sz as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( voices_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . channels_sz as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( channels_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . effects_sz as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( effects_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . mixes_sz as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( mixes_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . sinks_sz as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( sinks_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . perfmgr_sz as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( perfmgr_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . _padding as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( _padding ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . total_sz as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( total_sz ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererBehaviorInfoIn { pub revision : u32 , pub _padding1 : u32 , pub flags : u64 , } # [ test ] fn bindgen_test_layout_AudioRendererBehaviorInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererBehaviorInfoIn > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererBehaviorInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererBehaviorInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererBehaviorInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoIn > ( ) ) ) . revision as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoIn ) , "::" , stringify ! ( revision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoIn > ( ) ) ) . flags as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoIn ) , "::" , stringify ! ( flags ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererBehaviorInfoOut { pub unknown : [ u64 ; 20usize ] , pub _padding1 : [ u64 ; 2usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererBehaviorInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererBehaviorInfoOut > ( ) , 176usize , concat ! ( "Size of: " , stringify ! ( AudioRendererBehaviorInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererBehaviorInfoOut > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererBehaviorInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoOut > ( ) ) ) . unknown as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoOut ) , "::" , stringify ! ( unknown ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoOut > ( ) ) ) . _padding1 as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoOut ) , "::" , stringify ! ( _padding1 ) ) ) ; } pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Invalid : AudioRendererMemPoolState = 0 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_New : AudioRendererMemPoolState = 1 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_RequestDetach : AudioRendererMemPoolState = 2 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Detached : AudioRendererMemPoolState = 3 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_RequestAttach : AudioRendererMemPoolState = 4 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Attached : AudioRendererMemPoolState = 5 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Released : AudioRendererMemPoolState = 6 ; pub type AudioRendererMemPoolState = u32 ; # [ repr ( C ) ] pub struct AudioRendererMemPoolInfoIn { pub address : * const ctypes :: c_void , pub size : u64 , pub state : AudioRendererMemPoolState , pub _padding2 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererMemPoolInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererMemPoolInfoIn > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AudioRendererMemPoolInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererMemPoolInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererMemPoolInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . address as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . state as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererMemPoolInfoOut { pub new_state : AudioRendererMemPoolState , pub _padding2 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererMemPoolInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererMemPoolInfoOut > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererMemPoolInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererMemPoolInfoOut > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererMemPoolInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoOut > ( ) ) ) . new_state as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoOut ) , "::" , stringify ! ( new_state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoOut > ( ) ) ) . _padding2 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoOut ) , "::" , stringify ! ( _padding2 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererChannelInfoIn { pub id : u32 , pub mix : [ f32 ; 24usize ] , pub is_used : bool , pub _padding1 : [ u8 ; 11usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererChannelInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererChannelInfoIn > ( ) , 112usize , concat ! ( "Size of: " , stringify ! ( AudioRendererChannelInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererChannelInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererChannelInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . mix as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( mix ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . is_used as * const _ as usize } , 100usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 101usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererBiquadFilter { pub enable : bool , pub _padding : u8 , pub numerator : [ s16 ; 3usize ] , pub denominator : [ s16 ; 2usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererBiquadFilter ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererBiquadFilter > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( AudioRendererBiquadFilter ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererBiquadFilter > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererBiquadFilter ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . enable as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( enable ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . _padding as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( _padding ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . numerator as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( numerator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . denominator as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( denominator ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererAdpcmParameters { pub coefficients : [ u16 ; 16usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererAdpcmParameters ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererAdpcmParameters > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AudioRendererAdpcmParameters ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererAdpcmParameters > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererAdpcmParameters ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmParameters > ( ) ) ) . coefficients as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmParameters ) , "::" , stringify ! ( coefficients ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererAdpcmContext { pub index : u16 , pub history0 : s16 , pub history1 : s16 , } # [ test ] fn bindgen_test_layout_AudioRendererAdpcmContext ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererAdpcmContext > ( ) , 6usize , concat ! ( "Size of: " , stringify ! ( AudioRendererAdpcmContext ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererAdpcmContext > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererAdpcmContext ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmContext > ( ) ) ) . index as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmContext ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmContext > ( ) ) ) . history0 as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmContext ) , "::" , stringify ! ( history0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmContext > ( ) ) ) . history1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmContext ) , "::" , stringify ! ( history1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererWaveBuf { pub address : * const ctypes :: c_void , pub size : u64 , pub start_sample_offset : s32 , pub end_sample_offset : s32 , pub is_looping : bool , pub end_of_stream : bool , pub sent_to_server : bool , pub _padding1 : [ u8 ; 5usize ] , pub context_addr : * const ctypes :: c_void , pub context_sz : u64 , pub _padding2 : u64 , } # [ test ] fn bindgen_test_layout_AudioRendererWaveBuf ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererWaveBuf > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AudioRendererWaveBuf ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererWaveBuf > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererWaveBuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . address as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . start_sample_offset as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( start_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . end_sample_offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( end_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . is_looping as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( is_looping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . end_of_stream as * const _ as usize } , 25usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( end_of_stream ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . sent_to_server as * const _ as usize } , 26usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( sent_to_server ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . _padding1 as * const _ as usize } , 27usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . context_addr as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( context_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . context_sz as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( context_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . _padding2 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( _padding2 ) ) ) ; } pub const AudioRendererVoicePlayState_AudioRendererVoicePlayState_Started : AudioRendererVoicePlayState = 0 ; pub const AudioRendererVoicePlayState_AudioRendererVoicePlayState_Stopped : AudioRendererVoicePlayState = 1 ; pub const AudioRendererVoicePlayState_AudioRendererVoicePlayState_Paused : AudioRendererVoicePlayState = 2 ; pub type AudioRendererVoicePlayState = u32 ; # [ repr ( C ) ] pub struct AudioRendererVoiceInfoIn { pub id : u32 , pub node_id : u32 , pub is_new : bool , pub is_used : bool , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > , pub sample_rate : u32 , pub priority : u32 , pub sorting_order : u32 , pub channel_count : u32 , pub pitch : f32 , pub volume : f32 , pub biquads : [ AudioRendererBiquadFilter ; 2usize ] , pub wavebuf_count : u32 , pub wavebuf_head : s16 , pub _padding1 : u16 , pub _padding2 : u32 , pub extra_params_ptr : * const ctypes :: c_void , pub extra_params_sz : u64 , pub dest_mix_id : u32 , pub dest_splitter_id : u32 , pub wavebufs : [ AudioRendererWaveBuf ; 4usize ] , pub channel_ids : [ u32 ; 6usize ] , pub _padding3 : [ u8 ; 24usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererVoiceInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererVoiceInfoIn > ( ) , 368usize , concat ! ( "Size of: " , stringify ! ( AudioRendererVoiceInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererVoiceInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererVoiceInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . node_id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( node_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . is_new as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( is_new ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . is_used as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . sample_rate as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( sample_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . priority as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( priority ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . sorting_order as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( sorting_order ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . channel_count as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( channel_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . pitch as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( pitch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . volume as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( volume ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . biquads as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( biquads ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . wavebuf_count as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( wavebuf_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . wavebuf_head as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( wavebuf_head ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 66usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . extra_params_ptr as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( extra_params_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . extra_params_sz as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( extra_params_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . dest_mix_id as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( dest_mix_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . dest_splitter_id as * const _ as usize } , 92usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( dest_splitter_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . wavebufs as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( wavebufs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . channel_ids as * const _ as usize } , 320usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( channel_ids ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . _padding3 as * const _ as usize } , 344usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( _padding3 ) ) ) ; } impl AudioRendererVoiceInfoIn { # [ inline ] pub fn state ( & self ) -> AudioRendererVoicePlayState { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_state ( & mut self , val : AudioRendererVoicePlayState ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 8u8 , val as u64 ) } } # [ inline ] pub fn sample_format ( & self ) -> PcmFormat { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 8usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_sample_format ( & mut self , val : PcmFormat ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 8usize , 8u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( state : AudioRendererVoicePlayState , sample_format : PcmFormat ) -> __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 8u8 , { let state : u32 = unsafe { :: core :: mem :: transmute ( state ) } ; state as u64 } ) ; __bindgen_bitfield_unit . set ( 8usize , 8u8 , { let sample_format : u32 = unsafe { :: core :: mem :: transmute ( sample_format ) } ; sample_format as u64 } ) ; __bindgen_bitfield_unit } } # [ repr ( C ) ] pub struct AudioRendererVoiceInfoOut { pub played_sample_count : u64 , pub num_wavebufs_consumed : u32 , pub voice_drops_count : u32 , } # [ test ] fn bindgen_test_layout_AudioRendererVoiceInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererVoiceInfoOut > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererVoiceInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererVoiceInfoOut > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererVoiceInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoOut > ( ) ) ) . played_sample_count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoOut ) , "::" , stringify ! ( played_sample_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoOut > ( ) ) ) . num_wavebufs_consumed as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoOut ) , "::" , stringify ! ( num_wavebufs_consumed ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoOut > ( ) ) ) . voice_drops_count as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoOut ) , "::" , stringify ! ( voice_drops_count ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererMixInfoIn { pub volume : f32 , pub sample_rate : u32 , pub buffer_count : u32 , pub is_used : bool , pub _padding1 : [ u8 ; 3usize ] , pub mix_id : u32 , pub _padding2 : u32 , pub node_id : u32 , pub _padding3 : [ u32 ; 2usize ] , pub mix : [ [ f32 ; 24usize ] ; 24usize ] , pub dest_mix_id : u32 , pub dest_splitter_id : u32 , pub _padding4 : u32 , } # [ test ] fn bindgen_test_layout_AudioRendererMixInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererMixInfoIn > ( ) , 2352usize , concat ! ( "Size of: " , stringify ! ( AudioRendererMixInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererMixInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererMixInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . volume as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( volume ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . sample_rate as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( sample_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . buffer_count as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( buffer_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . is_used as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . mix_id as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( mix_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . node_id as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( node_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding3 as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . mix as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( mix ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . dest_mix_id as * const _ as usize } , 2340usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( dest_mix_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . dest_splitter_id as * const _ as usize } , 2344usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( dest_splitter_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding4 as * const _ as usize } , 2348usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding4 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererDownMixParameters { pub coefficients : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererDownMixParameters ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererDownMixParameters > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererDownMixParameters ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererDownMixParameters > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererDownMixParameters ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDownMixParameters > ( ) ) ) . coefficients as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDownMixParameters ) , "::" , stringify ! ( coefficients ) ) ) ; } pub const AudioRendererSinkType_AudioRendererSinkType_Invalid : AudioRendererSinkType = 0 ; pub const AudioRendererSinkType_AudioRendererSinkType_Device : AudioRendererSinkType = 1 ; pub const AudioRendererSinkType_AudioRendererSinkType_CircularBuffer : AudioRendererSinkType = 2 ; pub type AudioRendererSinkType = u32 ; # [ repr ( C ) ] pub struct AudioRendererDeviceSinkInfoIn { pub name : [ ctypes :: c_char ; 255usize ] , pub _padding1 : u8 , pub input_count : u32 , pub inputs : [ u8 ; 6usize ] , pub _padding2 : u8 , pub downmix_params_enabled : bool , pub downmix_params : AudioRendererDownMixParameters , } # [ test ] fn bindgen_test_layout_AudioRendererDeviceSinkInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererDeviceSinkInfoIn > ( ) , 284usize , concat ! ( "Size of: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererDeviceSinkInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererDeviceSinkInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 255usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . input_count as * const _ as usize } , 256usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( input_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . inputs as * const _ as usize } , 260usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( inputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 266usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . downmix_params_enabled as * const _ as usize } , 267usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( downmix_params_enabled ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . downmix_params as * const _ as usize } , 268usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( downmix_params ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererCircularBufferSinkInfoIn { pub buffer_ptr : * mut ctypes :: c_void , pub buffer_sz : u32 , pub input_count : u32 , pub sample_count : u32 , pub last_read_offset : u32 , pub sample_format : PcmFormat , pub inputs : [ u8 ; 6usize ] , pub _padding2 : [ u8 ; 6usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererCircularBufferSinkInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererCircularBufferSinkInfoIn > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererCircularBufferSinkInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . buffer_ptr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( buffer_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . buffer_sz as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( buffer_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . input_count as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( input_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . sample_count as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( sample_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . last_read_offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( last_read_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . sample_format as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( sample_format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . inputs as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( inputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 34usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererSinkInfoIn { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub is_used : bool , pub _padding1 : [ u8 ; 2usize ] , pub node_id : u32 , pub _padding2 : [ u64 ; 3usize ] , pub __bindgen_anon_1 : AudioRendererSinkInfoIn__bindgen_ty_1 , } # [ repr ( C ) ] pub struct AudioRendererSinkInfoIn__bindgen_ty_1 { pub device_sink : __BindgenUnionField < AudioRendererDeviceSinkInfoIn > , pub circular_buffer_sink : __BindgenUnionField < AudioRendererCircularBufferSinkInfoIn > , pub bindgen_union_field : [ u64 ; 36usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererSinkInfoIn__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) , 288usize , concat ! ( "Size of: " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) ) ) . device_sink as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) , "::" , stringify ! ( device_sink ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) ) ) . circular_buffer_sink as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) , "::" , stringify ! ( circular_buffer_sink ) ) ) ; } # [ test ] fn bindgen_test_layout_AudioRendererSinkInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererSinkInfoIn > ( ) , 320usize , concat ! ( "Size of: " , stringify ! ( AudioRendererSinkInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererSinkInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererSinkInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . is_used as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . node_id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( node_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; } impl AudioRendererSinkInfoIn { # [ inline ] pub fn type_ ( & self ) -> AudioRendererSinkType { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_type ( & mut self , val : AudioRendererSinkType ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 8u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( type_ : AudioRendererSinkType ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 8u8 , { let type_ : u32 = unsafe { :: core :: mem :: transmute ( type_ ) } ; type_ as u64 } ) ; __bindgen_bitfield_unit } } # [ repr ( C ) ] pub struct AudioRendererSinkInfoOut { pub last_written_offset : u32 , pub unk1 : u32 , pub unk2 : u64 , pub _padding1 : [ u64 ; 2usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererSinkInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererSinkInfoOut > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AudioRendererSinkInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererSinkInfoOut > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererSinkInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . last_written_offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( last_written_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . unk1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( unk1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . unk2 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( unk2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . _padding1 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( _padding1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererPerformanceBufferInfoIn { pub detail_target : u32 , pub _padding1 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererPerformanceBufferInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererPerformanceBufferInfoIn > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererPerformanceBufferInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoIn > ( ) ) ) . detail_target as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) , "::" , stringify ! ( detail_target ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererPerformanceBufferInfoOut { pub written_sz : u32 , pub _padding1 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererPerformanceBufferInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererPerformanceBufferInfoOut > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererPerformanceBufferInfoOut > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoOut > ( ) ) ) . written_sz as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) , "::" , stringify ! ( written_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoOut > ( ) ) ) . _padding1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) , "::" , stringify ! ( _padding1 ) ) ) ; } extern "C" { pub fn audrenInitialize ( config : * const AudioRendererConfig ) -> Result ; } extern "C" { pub fn audrenExit ( ) ; } extern "C" { pub fn audrenWaitFrame ( ) ; } extern "C" { pub fn audrenGetState ( out_state : * mut u32 ) -> Result ; } extern "C" { pub fn audrenRequestUpdateAudioRenderer ( in_param_buf : * const ctypes :: c_void , in_param_buf_size : usize , out_param_buf : * mut ctypes :: c_void , out_param_buf_size : usize , perf_buf : * mut ctypes :: c_void , perf_buf_size : usize ) -> Result ; } extern "C" { pub fn audrenStartAudioRenderer ( ) -> Result ; } extern "C" { pub fn audrenStopAudioRenderer ( ) -> Result ; } extern "C" { pub fn audrenSetAudioRendererRenderingTimeLimit ( percent : ctypes :: c_int ) -> Result ; } extern "C" { pub fn auddevInitialize ( ) -> Result ; } extern "C" { pub fn auddevExit ( ) ; } extern "C" { pub fn auddevListAudioDeviceName ( DeviceNames : * mut AudioDeviceName , max_names : s32 , total_names : * mut s32 ) -> Result ; } extern "C" { pub fn auddevSetAudioDeviceOutputVolume ( DeviceName : * const AudioDeviceName , volume : f32 ) -> Result ; } extern "C" { pub fn auddevGetAudioDeviceOutputVolume ( DeviceName : * const AudioDeviceName , volume : * mut f32 ) -> Result ; } # [ repr ( C ) ] pub struct HwopusDecoder { pub s : Service , pub tmem : TransferMemory , pub multistream : bool , } # [ test ] fn bindgen_test_layout_HwopusDecoder ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HwopusDecoder > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( HwopusDecoder ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HwopusDecoder > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HwopusDecoder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HwopusDecoder > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HwopusDecoder ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HwopusDecoder > ( ) ) ) . tmem as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HwopusDecoder ) , "::" , stringify ! ( tmem ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HwopusDecoder > ( ) ) ) . multistream as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( HwopusDecoder ) , "::" , stringify ! ( multistream ) ) ) ; } + pub fn audoutGetSampleRate ( ) -> u32 ; } extern "C" { pub fn audoutGetChannelCount ( ) -> u32 ; } extern "C" { pub fn audoutGetPcmFormat ( ) -> PcmFormat ; } extern "C" { pub fn audoutGetDeviceState ( ) -> AudioOutState ; } pub const AudioRendererOutputRate_AudioRendererOutputRate_32kHz : AudioRendererOutputRate = 0 ; pub const AudioRendererOutputRate_AudioRendererOutputRate_48kHz : AudioRendererOutputRate = 1 ; pub type AudioRendererOutputRate = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AudioRendererConfig { pub output_rate : AudioRendererOutputRate , pub num_voices : ctypes :: c_int , pub num_effects : ctypes :: c_int , pub num_sinks : ctypes :: c_int , pub num_mix_objs : ctypes :: c_int , pub num_mix_buffers : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_AudioRendererConfig ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererConfig > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( AudioRendererConfig ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererConfig > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererConfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . output_rate as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( output_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_voices as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_voices ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_effects as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_effects ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_sinks as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_sinks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_mix_objs as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_mix_objs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererConfig > ( ) ) ) . num_mix_buffers as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererConfig ) , "::" , stringify ! ( num_mix_buffers ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererUpdateDataHeader { pub revision : u32 , pub behavior_sz : u32 , pub mempools_sz : u32 , pub voices_sz : u32 , pub channels_sz : u32 , pub effects_sz : u32 , pub mixes_sz : u32 , pub sinks_sz : u32 , pub perfmgr_sz : u32 , pub _padding : [ u32 ; 6usize ] , pub total_sz : u32 , } # [ test ] fn bindgen_test_layout_AudioRendererUpdateDataHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererUpdateDataHeader > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( AudioRendererUpdateDataHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererUpdateDataHeader > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererUpdateDataHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . revision as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( revision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . behavior_sz as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( behavior_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . mempools_sz as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( mempools_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . voices_sz as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( voices_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . channels_sz as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( channels_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . effects_sz as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( effects_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . mixes_sz as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( mixes_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . sinks_sz as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( sinks_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . perfmgr_sz as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( perfmgr_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . _padding as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( _padding ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererUpdateDataHeader > ( ) ) ) . total_sz as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererUpdateDataHeader ) , "::" , stringify ! ( total_sz ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererBehaviorInfoIn { pub revision : u32 , pub _padding1 : u32 , pub flags : u64 , } # [ test ] fn bindgen_test_layout_AudioRendererBehaviorInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererBehaviorInfoIn > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererBehaviorInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererBehaviorInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererBehaviorInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoIn > ( ) ) ) . revision as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoIn ) , "::" , stringify ! ( revision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoIn > ( ) ) ) . flags as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoIn ) , "::" , stringify ! ( flags ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererBehaviorInfoOut { pub unknown : [ u64 ; 20usize ] , pub _padding1 : [ u64 ; 2usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererBehaviorInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererBehaviorInfoOut > ( ) , 176usize , concat ! ( "Size of: " , stringify ! ( AudioRendererBehaviorInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererBehaviorInfoOut > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererBehaviorInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoOut > ( ) ) ) . unknown as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoOut ) , "::" , stringify ! ( unknown ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBehaviorInfoOut > ( ) ) ) . _padding1 as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBehaviorInfoOut ) , "::" , stringify ! ( _padding1 ) ) ) ; } pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Invalid : AudioRendererMemPoolState = 0 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_New : AudioRendererMemPoolState = 1 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_RequestDetach : AudioRendererMemPoolState = 2 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Detached : AudioRendererMemPoolState = 3 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_RequestAttach : AudioRendererMemPoolState = 4 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Attached : AudioRendererMemPoolState = 5 ; pub const AudioRendererMemPoolState_AudioRendererMemPoolState_Released : AudioRendererMemPoolState = 6 ; pub type AudioRendererMemPoolState = u32 ; # [ repr ( C ) ] pub struct AudioRendererMemPoolInfoIn { pub address : * const ctypes :: c_void , pub size : u64 , pub state : AudioRendererMemPoolState , pub _padding2 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererMemPoolInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererMemPoolInfoIn > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AudioRendererMemPoolInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererMemPoolInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererMemPoolInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . address as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . state as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererMemPoolInfoOut { pub new_state : AudioRendererMemPoolState , pub _padding2 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererMemPoolInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererMemPoolInfoOut > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererMemPoolInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererMemPoolInfoOut > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererMemPoolInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoOut > ( ) ) ) . new_state as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoOut ) , "::" , stringify ! ( new_state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMemPoolInfoOut > ( ) ) ) . _padding2 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMemPoolInfoOut ) , "::" , stringify ! ( _padding2 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererChannelInfoIn { pub id : u32 , pub mix : [ f32 ; 24usize ] , pub is_used : bool , pub _padding1 : [ u8 ; 11usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererChannelInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererChannelInfoIn > ( ) , 112usize , concat ! ( "Size of: " , stringify ! ( AudioRendererChannelInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererChannelInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererChannelInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . mix as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( mix ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . is_used as * const _ as usize } , 100usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererChannelInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 101usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererChannelInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererBiquadFilter { pub enable : bool , pub _padding : u8 , pub numerator : [ s16 ; 3usize ] , pub denominator : [ s16 ; 2usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererBiquadFilter ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererBiquadFilter > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( AudioRendererBiquadFilter ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererBiquadFilter > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererBiquadFilter ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . enable as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( enable ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . _padding as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( _padding ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . numerator as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( numerator ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererBiquadFilter > ( ) ) ) . denominator as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererBiquadFilter ) , "::" , stringify ! ( denominator ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererAdpcmParameters { pub coefficients : [ u16 ; 16usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererAdpcmParameters ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererAdpcmParameters > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AudioRendererAdpcmParameters ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererAdpcmParameters > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererAdpcmParameters ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmParameters > ( ) ) ) . coefficients as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmParameters ) , "::" , stringify ! ( coefficients ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererAdpcmContext { pub index : u16 , pub history0 : s16 , pub history1 : s16 , } # [ test ] fn bindgen_test_layout_AudioRendererAdpcmContext ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererAdpcmContext > ( ) , 6usize , concat ! ( "Size of: " , stringify ! ( AudioRendererAdpcmContext ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererAdpcmContext > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererAdpcmContext ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmContext > ( ) ) ) . index as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmContext ) , "::" , stringify ! ( index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmContext > ( ) ) ) . history0 as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmContext ) , "::" , stringify ! ( history0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererAdpcmContext > ( ) ) ) . history1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererAdpcmContext ) , "::" , stringify ! ( history1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererWaveBuf { pub address : * const ctypes :: c_void , pub size : u64 , pub start_sample_offset : s32 , pub end_sample_offset : s32 , pub is_looping : bool , pub end_of_stream : bool , pub sent_to_server : bool , pub _padding1 : [ u8 ; 5usize ] , pub context_addr : * const ctypes :: c_void , pub context_sz : u64 , pub _padding2 : u64 , } # [ test ] fn bindgen_test_layout_AudioRendererWaveBuf ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererWaveBuf > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AudioRendererWaveBuf ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererWaveBuf > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererWaveBuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . address as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . start_sample_offset as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( start_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . end_sample_offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( end_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . is_looping as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( is_looping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . end_of_stream as * const _ as usize } , 25usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( end_of_stream ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . sent_to_server as * const _ as usize } , 26usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( sent_to_server ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . _padding1 as * const _ as usize } , 27usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . context_addr as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( context_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . context_sz as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( context_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererWaveBuf > ( ) ) ) . _padding2 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererWaveBuf ) , "::" , stringify ! ( _padding2 ) ) ) ; } pub const AudioRendererVoicePlayState_AudioRendererVoicePlayState_Started : AudioRendererVoicePlayState = 0 ; pub const AudioRendererVoicePlayState_AudioRendererVoicePlayState_Stopped : AudioRendererVoicePlayState = 1 ; pub const AudioRendererVoicePlayState_AudioRendererVoicePlayState_Paused : AudioRendererVoicePlayState = 2 ; pub type AudioRendererVoicePlayState = u32 ; # [ repr ( C ) ] pub struct AudioRendererVoiceInfoIn { pub id : u32 , pub node_id : u32 , pub is_new : bool , pub is_used : bool , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > , pub sample_rate : u32 , pub priority : u32 , pub sorting_order : u32 , pub channel_count : u32 , pub pitch : f32 , pub volume : f32 , pub biquads : [ AudioRendererBiquadFilter ; 2usize ] , pub wavebuf_count : u32 , pub wavebuf_head : s16 , pub _padding1 : u16 , pub _padding2 : u32 , pub extra_params_ptr : * const ctypes :: c_void , pub extra_params_sz : u64 , pub dest_mix_id : u32 , pub dest_splitter_id : u32 , pub wavebufs : [ AudioRendererWaveBuf ; 4usize ] , pub channel_ids : [ u32 ; 6usize ] , pub _padding3 : [ u8 ; 24usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererVoiceInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererVoiceInfoIn > ( ) , 368usize , concat ! ( "Size of: " , stringify ! ( AudioRendererVoiceInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererVoiceInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererVoiceInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . node_id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( node_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . is_new as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( is_new ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . is_used as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . sample_rate as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( sample_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . priority as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( priority ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . sorting_order as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( sorting_order ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . channel_count as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( channel_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . pitch as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( pitch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . volume as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( volume ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . biquads as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( biquads ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . wavebuf_count as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( wavebuf_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . wavebuf_head as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( wavebuf_head ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 66usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . extra_params_ptr as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( extra_params_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . extra_params_sz as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( extra_params_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . dest_mix_id as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( dest_mix_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . dest_splitter_id as * const _ as usize } , 92usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( dest_splitter_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . wavebufs as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( wavebufs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . channel_ids as * const _ as usize } , 320usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( channel_ids ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoIn > ( ) ) ) . _padding3 as * const _ as usize } , 344usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoIn ) , "::" , stringify ! ( _padding3 ) ) ) ; } impl AudioRendererVoiceInfoIn { # [ inline ] pub fn state ( & self ) -> AudioRendererVoicePlayState { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_state ( & mut self , val : AudioRendererVoicePlayState ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 8u8 , val as u64 ) } } # [ inline ] pub fn sample_format ( & self ) -> PcmFormat { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 8usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_sample_format ( & mut self , val : PcmFormat ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 8usize , 8u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( state : AudioRendererVoicePlayState , sample_format : PcmFormat ) -> __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 8u8 , { let state : u32 = unsafe { :: core :: mem :: transmute ( state ) } ; state as u64 } ) ; __bindgen_bitfield_unit . set ( 8usize , 8u8 , { let sample_format : u32 = unsafe { :: core :: mem :: transmute ( sample_format ) } ; sample_format as u64 } ) ; __bindgen_bitfield_unit } } # [ repr ( C ) ] pub struct AudioRendererVoiceInfoOut { pub played_sample_count : u64 , pub num_wavebufs_consumed : u32 , pub voice_drops_count : u32 , } # [ test ] fn bindgen_test_layout_AudioRendererVoiceInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererVoiceInfoOut > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererVoiceInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererVoiceInfoOut > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererVoiceInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoOut > ( ) ) ) . played_sample_count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoOut ) , "::" , stringify ! ( played_sample_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoOut > ( ) ) ) . num_wavebufs_consumed as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoOut ) , "::" , stringify ! ( num_wavebufs_consumed ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererVoiceInfoOut > ( ) ) ) . voice_drops_count as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererVoiceInfoOut ) , "::" , stringify ! ( voice_drops_count ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererMixInfoIn { pub volume : f32 , pub sample_rate : u32 , pub buffer_count : u32 , pub is_used : bool , pub _padding1 : [ u8 ; 3usize ] , pub mix_id : u32 , pub _padding2 : u32 , pub node_id : u32 , pub _padding3 : [ u32 ; 2usize ] , pub mix : [ [ f32 ; 24usize ] ; 24usize ] , pub dest_mix_id : u32 , pub dest_splitter_id : u32 , pub _padding4 : u32 , } # [ test ] fn bindgen_test_layout_AudioRendererMixInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererMixInfoIn > ( ) , 2352usize , concat ! ( "Size of: " , stringify ! ( AudioRendererMixInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererMixInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererMixInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . volume as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( volume ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . sample_rate as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( sample_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . buffer_count as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( buffer_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . is_used as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . mix_id as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( mix_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . node_id as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( node_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding3 as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . mix as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( mix ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . dest_mix_id as * const _ as usize } , 2340usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( dest_mix_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . dest_splitter_id as * const _ as usize } , 2344usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( dest_splitter_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererMixInfoIn > ( ) ) ) . _padding4 as * const _ as usize } , 2348usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererMixInfoIn ) , "::" , stringify ! ( _padding4 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererDownMixParameters { pub coefficients : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererDownMixParameters ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererDownMixParameters > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererDownMixParameters ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererDownMixParameters > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererDownMixParameters ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDownMixParameters > ( ) ) ) . coefficients as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDownMixParameters ) , "::" , stringify ! ( coefficients ) ) ) ; } pub const AudioRendererSinkType_AudioRendererSinkType_Invalid : AudioRendererSinkType = 0 ; pub const AudioRendererSinkType_AudioRendererSinkType_Device : AudioRendererSinkType = 1 ; pub const AudioRendererSinkType_AudioRendererSinkType_CircularBuffer : AudioRendererSinkType = 2 ; pub type AudioRendererSinkType = u32 ; # [ repr ( C ) ] pub struct AudioRendererDeviceSinkInfoIn { pub name : [ ctypes :: c_char ; 255usize ] , pub _padding1 : u8 , pub input_count : u32 , pub inputs : [ u8 ; 6usize ] , pub _padding2 : u8 , pub downmix_params_enabled : bool , pub downmix_params : AudioRendererDownMixParameters , } # [ test ] fn bindgen_test_layout_AudioRendererDeviceSinkInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererDeviceSinkInfoIn > ( ) , 284usize , concat ! ( "Size of: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererDeviceSinkInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererDeviceSinkInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 255usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . input_count as * const _ as usize } , 256usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( input_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . inputs as * const _ as usize } , 260usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( inputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 266usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . downmix_params_enabled as * const _ as usize } , 267usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( downmix_params_enabled ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererDeviceSinkInfoIn > ( ) ) ) . downmix_params as * const _ as usize } , 268usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererDeviceSinkInfoIn ) , "::" , stringify ! ( downmix_params ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererCircularBufferSinkInfoIn { pub buffer_ptr : * mut ctypes :: c_void , pub buffer_sz : u32 , pub input_count : u32 , pub sample_count : u32 , pub last_read_offset : u32 , pub sample_format : PcmFormat , pub inputs : [ u8 ; 6usize ] , pub _padding2 : [ u8 ; 6usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererCircularBufferSinkInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererCircularBufferSinkInfoIn > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererCircularBufferSinkInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . buffer_ptr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( buffer_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . buffer_sz as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( buffer_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . input_count as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( input_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . sample_count as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( sample_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . last_read_offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( last_read_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . sample_format as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( sample_format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . inputs as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( inputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererCircularBufferSinkInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 34usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererCircularBufferSinkInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererSinkInfoIn { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub is_used : bool , pub _padding1 : [ u8 ; 2usize ] , pub node_id : u32 , pub _padding2 : [ u64 ; 3usize ] , pub __bindgen_anon_1 : AudioRendererSinkInfoIn__bindgen_ty_1 , } # [ repr ( C ) ] pub struct AudioRendererSinkInfoIn__bindgen_ty_1 { pub device_sink : __BindgenUnionField < AudioRendererDeviceSinkInfoIn > , pub circular_buffer_sink : __BindgenUnionField < AudioRendererCircularBufferSinkInfoIn > , pub bindgen_union_field : [ u64 ; 36usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererSinkInfoIn__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) , 288usize , concat ! ( "Size of: " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) ) ) . device_sink as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) , "::" , stringify ! ( device_sink ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn__bindgen_ty_1 > ( ) ) ) . circular_buffer_sink as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn__bindgen_ty_1 ) , "::" , stringify ! ( circular_buffer_sink ) ) ) ; } # [ test ] fn bindgen_test_layout_AudioRendererSinkInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererSinkInfoIn > ( ) , 320usize , concat ! ( "Size of: " , stringify ! ( AudioRendererSinkInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererSinkInfoIn > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererSinkInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . is_used as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( is_used ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . node_id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( node_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoIn > ( ) ) ) . _padding2 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoIn ) , "::" , stringify ! ( _padding2 ) ) ) ; } impl AudioRendererSinkInfoIn { # [ inline ] pub fn type_ ( & self ) -> AudioRendererSinkType { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_type ( & mut self , val : AudioRendererSinkType ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 8u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( type_ : AudioRendererSinkType ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 8u8 , { let type_ : u32 = unsafe { :: core :: mem :: transmute ( type_ ) } ; type_ as u64 } ) ; __bindgen_bitfield_unit } } # [ repr ( C ) ] pub struct AudioRendererSinkInfoOut { pub last_written_offset : u32 , pub unk1 : u32 , pub unk2 : u64 , pub _padding1 : [ u64 ; 2usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererSinkInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererSinkInfoOut > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( AudioRendererSinkInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererSinkInfoOut > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererSinkInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . last_written_offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( last_written_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . unk1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( unk1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . unk2 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( unk2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererSinkInfoOut > ( ) ) ) . _padding1 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererSinkInfoOut ) , "::" , stringify ! ( _padding1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererPerformanceBufferInfoIn { pub detail_target : u32 , pub _padding1 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererPerformanceBufferInfoIn ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererPerformanceBufferInfoIn > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererPerformanceBufferInfoIn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoIn > ( ) ) ) . detail_target as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) , "::" , stringify ! ( detail_target ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoIn > ( ) ) ) . _padding1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoIn ) , "::" , stringify ! ( _padding1 ) ) ) ; } # [ repr ( C ) ] pub struct AudioRendererPerformanceBufferInfoOut { pub written_sz : u32 , pub _padding1 : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_AudioRendererPerformanceBufferInfoOut ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioRendererPerformanceBufferInfoOut > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioRendererPerformanceBufferInfoOut > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoOut > ( ) ) ) . written_sz as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) , "::" , stringify ! ( written_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioRendererPerformanceBufferInfoOut > ( ) ) ) . _padding1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( AudioRendererPerformanceBufferInfoOut ) , "::" , stringify ! ( _padding1 ) ) ) ; } extern "C" { pub fn audrenInitialize ( config : * const AudioRendererConfig ) -> Result ; } extern "C" { pub fn audrenExit ( ) ; } extern "C" { pub fn audrenGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn audrenWaitFrame ( ) ; } extern "C" { pub fn audrenGetState ( out_state : * mut u32 ) -> Result ; } extern "C" { pub fn audrenRequestUpdateAudioRenderer ( in_param_buf : * const ctypes :: c_void , in_param_buf_size : usize , out_param_buf : * mut ctypes :: c_void , out_param_buf_size : usize , perf_buf : * mut ctypes :: c_void , perf_buf_size : usize ) -> Result ; } extern "C" { pub fn audrenStartAudioRenderer ( ) -> Result ; } extern "C" { pub fn audrenStopAudioRenderer ( ) -> Result ; } extern "C" { pub fn audrenSetAudioRendererRenderingTimeLimit ( percent : ctypes :: c_int ) -> Result ; } extern "C" { pub fn auddevInitialize ( ) -> Result ; } extern "C" { pub fn auddevExit ( ) ; } extern "C" { pub fn auddevGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn auddevListAudioDeviceName ( DeviceNames : * mut AudioDeviceName , max_names : s32 , total_names : * mut s32 ) -> Result ; } extern "C" { pub fn auddevSetAudioDeviceOutputVolume ( DeviceName : * const AudioDeviceName , volume : f32 ) -> Result ; } extern "C" { pub fn auddevGetAudioDeviceOutputVolume ( DeviceName : * const AudioDeviceName , volume : * mut f32 ) -> Result ; } # [ repr ( C ) ] pub struct HwopusDecoder { pub s : Service , pub tmem : TransferMemory , pub multistream : bool , } # [ test ] fn bindgen_test_layout_HwopusDecoder ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HwopusDecoder > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( HwopusDecoder ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HwopusDecoder > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HwopusDecoder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HwopusDecoder > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HwopusDecoder ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HwopusDecoder > ( ) ) ) . tmem as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HwopusDecoder ) , "::" , stringify ! ( tmem ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HwopusDecoder > ( ) ) ) . multistream as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( HwopusDecoder ) , "::" , stringify ! ( multistream ) ) ) ; } /// This structure is the start of opusin for \ref hwopusDecodeInterleaved, with the actual opus packet following this. /// These fields are big-endian. # [ repr ( C ) ] pub struct HwopusHeader { @@ -2100,12 +3203,14 @@ where /// See libopus multistream docs. pub fn hwopusDecoderMultistreamInitialize ( decoder : * mut HwopusDecoder , SampleRate : s32 , ChannelCount : s32 , TotalStreamCount : s32 , StereoStreamCount : s32 , channel_mapping : * mut u8 ) -> Result ; } extern "C" { /// Decodes opus data. - pub fn hwopusDecodeInterleaved ( decoder : * mut HwopusDecoder , DecodedDataSize : * mut s32 , DecodedSampleCount : * mut s32 , opusin : * const ctypes :: c_void , opusin_size : usize , pcmbuf : * mut s16 , pcmbuf_size : usize ) -> Result ; } extern "C" { pub fn csrngInitialize ( ) -> Result ; } extern "C" { pub fn csrngExit ( ) ; } extern "C" { pub fn csrngGetRandomBytes ( out : * mut ctypes :: c_void , out_size : usize ) -> Result ; } extern "C" { pub fn lblInitialize ( ) -> Result ; } extern "C" { pub fn lblExit ( ) ; } extern "C" { pub fn lblSwitchBacklightOn ( fade_time : u64 ) -> Result ; } extern "C" { pub fn lblSwitchBacklightOff ( fade_time : u64 ) -> Result ; } extern "C" { + pub fn hwopusDecodeInterleaved ( decoder : * mut HwopusDecoder , DecodedDataSize : * mut s32 , DecodedSampleCount : * mut s32 , opusin : * const ctypes :: c_void , opusin_size : usize , pcmbuf : * mut s16 , pcmbuf_size : usize ) -> Result ; } extern "C" { pub fn csrngInitialize ( ) -> Result ; } extern "C" { pub fn csrngExit ( ) ; } extern "C" { pub fn csrngGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn csrngGetRandomBytes ( out : * mut ctypes :: c_void , out_size : usize ) -> Result ; } extern "C" { pub fn lblInitialize ( ) -> Result ; } extern "C" { pub fn lblExit ( ) ; } extern "C" { pub fn lblGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn lblSwitchBacklightOn ( fade_time : u64 ) -> Result ; } extern "C" { pub fn lblSwitchBacklightOff ( fade_time : u64 ) -> Result ; } extern "C" { /// @note The brightness goes from 0 to 1.0. - pub fn lblSetCurrentBrightnessSetting ( brightness : f32 ) -> Result ; } extern "C" { pub fn lblGetCurrentBrightnessSetting ( out_value : * mut f32 ) -> Result ; } extern "C" { pub fn lblEnableAutoBrightnessControl ( ) -> Result ; } extern "C" { pub fn lblDisableAutoBrightnessControl ( ) -> Result ; } extern "C" { pub fn lblIsAutoBrightnessControlEnabled ( out_value : * mut bool ) -> Result ; } pub const I2cDevice_I2cDevice_AudioCodec : I2cDevice = 4 ; pub type I2cDevice = u32 ; # [ repr ( C ) ] pub struct I2cSession { pub s : Service , } # [ test ] fn bindgen_test_layout_I2cSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < I2cSession > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( I2cSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < I2cSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( I2cSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < I2cSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( I2cSession ) , "::" , stringify ! ( s ) ) ) ; } pub const I2cTransactionOption_I2cTransactionOption_Start : I2cTransactionOption = 1 ; pub const I2cTransactionOption_I2cTransactionOption_Stop : I2cTransactionOption = 2 ; pub const I2cTransactionOption_I2cTransactionOption_All : I2cTransactionOption = 3 ; pub type I2cTransactionOption = u32 ; extern "C" { pub fn i2cInitialize ( ) -> Result ; } extern "C" { pub fn i2cExit ( ) ; } extern "C" { pub fn i2cOpenSession ( out : * mut I2cSession , dev : I2cDevice ) -> Result ; } extern "C" { pub fn i2csessionSendAuto ( s : * mut I2cSession , buf : * mut ctypes :: c_void , size : usize , option : I2cTransactionOption ) -> Result ; } extern "C" { pub fn i2csessionClose ( s : * mut I2cSession ) ; } pub const GpioPadName_GpioPadName_AudioCodec : GpioPadName = 1 ; pub const GpioPadName_GpioPadName_ButtonVolUp : GpioPadName = 25 ; pub const GpioPadName_GpioPadName_ButtonVolDown : GpioPadName = 26 ; pub type GpioPadName = u32 ; # [ repr ( C ) ] pub struct GpioPadSession { pub s : Service , } # [ test ] fn bindgen_test_layout_GpioPadSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < GpioPadSession > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( GpioPadSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < GpioPadSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( GpioPadSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < GpioPadSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( GpioPadSession ) , "::" , stringify ! ( s ) ) ) ; } pub const GpioDirection_GpioDirection_Input : GpioDirection = 0 ; pub const GpioDirection_GpioDirection_Output : GpioDirection = 1 ; pub type GpioDirection = u32 ; pub const GpioValue_GpioValue_Low : GpioValue = 0 ; pub const GpioValue_GpioValue_High : GpioValue = 1 ; pub type GpioValue = u32 ; extern "C" { pub fn gpioInitialize ( ) -> Result ; } extern "C" { pub fn gpioExit ( ) ; } extern "C" { pub fn gpioOpenSession ( out : * mut GpioPadSession , name : GpioPadName ) -> Result ; } extern "C" { pub fn gpioPadSetDirection ( p : * mut GpioPadSession , dir : GpioDirection ) -> Result ; } extern "C" { pub fn gpioPadGetDirection ( p : * mut GpioPadSession , out : * mut GpioDirection ) -> Result ; } extern "C" { pub fn gpioPadSetValue ( p : * mut GpioPadSession , val : GpioValue ) -> Result ; } extern "C" { pub fn gpioPadGetValue ( p : * mut GpioPadSession , out : * mut GpioValue ) -> Result ; } extern "C" { pub fn gpioPadClose ( p : * mut GpioPadSession ) ; } pub const BpcSleepButtonState_BpcSleepButtonState_Held : BpcSleepButtonState = 0 ; pub const BpcSleepButtonState_BpcSleepButtonState_Released : BpcSleepButtonState = 1 ; pub type BpcSleepButtonState = u32 ; extern "C" { pub fn bpcInitialize ( ) -> Result ; } extern "C" { pub fn bpcExit ( ) ; } extern "C" { pub fn bpcShutdownSystem ( ) -> Result ; } extern "C" { pub fn bpcRebootSystem ( ) -> Result ; } extern "C" { pub fn bpcGetSleepButtonState ( out : * mut BpcSleepButtonState ) -> Result ; } pub const PcvModule_PcvModule_CpuBus : PcvModule = 0 ; pub const PcvModule_PcvModule_GPU : PcvModule = 1 ; pub const PcvModule_PcvModule_I2S1 : PcvModule = 2 ; pub const PcvModule_PcvModule_I2S2 : PcvModule = 3 ; pub const PcvModule_PcvModule_I2S3 : PcvModule = 4 ; pub const PcvModule_PcvModule_PWM : PcvModule = 5 ; pub const PcvModule_PcvModule_I2C1 : PcvModule = 6 ; pub const PcvModule_PcvModule_I2C2 : PcvModule = 7 ; pub const PcvModule_PcvModule_I2C3 : PcvModule = 8 ; pub const PcvModule_PcvModule_I2C4 : PcvModule = 9 ; pub const PcvModule_PcvModule_I2C5 : PcvModule = 10 ; pub const PcvModule_PcvModule_I2C6 : PcvModule = 11 ; pub const PcvModule_PcvModule_SPI1 : PcvModule = 12 ; pub const PcvModule_PcvModule_SPI2 : PcvModule = 13 ; pub const PcvModule_PcvModule_SPI3 : PcvModule = 14 ; pub const PcvModule_PcvModule_SPI4 : PcvModule = 15 ; pub const PcvModule_PcvModule_DISP1 : PcvModule = 16 ; pub const PcvModule_PcvModule_DISP2 : PcvModule = 17 ; pub const PcvModule_PcvModule_ISP : PcvModule = 18 ; pub const PcvModule_PcvModule_VI : PcvModule = 19 ; pub const PcvModule_PcvModule_SDMMC1 : PcvModule = 20 ; pub const PcvModule_PcvModule_SDMMC2 : PcvModule = 21 ; pub const PcvModule_PcvModule_SDMMC3 : PcvModule = 22 ; pub const PcvModule_PcvModule_SDMMC4 : PcvModule = 23 ; pub const PcvModule_PcvModule_OWR : PcvModule = 24 ; pub const PcvModule_PcvModule_CSITE : PcvModule = 25 ; pub const PcvModule_PcvModule_TSEC : PcvModule = 26 ; pub const PcvModule_PcvModule_MSELECT : PcvModule = 27 ; pub const PcvModule_PcvModule_HDA2CODEC_2X : PcvModule = 28 ; pub const PcvModule_PcvModule_ACTMON : PcvModule = 29 ; pub const PcvModule_PcvModule_I2C_SLOW : PcvModule = 30 ; pub const PcvModule_PcvModule_SOR1 : PcvModule = 31 ; pub const PcvModule_PcvModule_SATA : PcvModule = 32 ; pub const PcvModule_PcvModule_HDA : PcvModule = 33 ; pub const PcvModule_PcvModule_XUSB_CORE_HOST : PcvModule = 34 ; pub const PcvModule_PcvModule_XUSB_FALCON : PcvModule = 35 ; pub const PcvModule_PcvModule_XUSB_FS : PcvModule = 36 ; pub const PcvModule_PcvModule_XUSB_CORE_DEV : PcvModule = 37 ; pub const PcvModule_PcvModule_XUSB_SS_HOSTDEV : PcvModule = 38 ; pub const PcvModule_PcvModule_UARTA : PcvModule = 39 ; pub const PcvModule_PcvModule_UARTB : PcvModule = 40 ; pub const PcvModule_PcvModule_UARTC : PcvModule = 41 ; pub const PcvModule_PcvModule_UARTD : PcvModule = 42 ; pub const PcvModule_PcvModule_HOST1X : PcvModule = 43 ; pub const PcvModule_PcvModule_ENTROPY : PcvModule = 44 ; pub const PcvModule_PcvModule_SOC_THERM : PcvModule = 45 ; pub const PcvModule_PcvModule_VIC : PcvModule = 46 ; pub const PcvModule_PcvModule_NVENC : PcvModule = 47 ; pub const PcvModule_PcvModule_NVJPG : PcvModule = 48 ; pub const PcvModule_PcvModule_NVDEC : PcvModule = 49 ; pub const PcvModule_PcvModule_QSPI : PcvModule = 50 ; pub const PcvModule_PcvModule_VI_I2C : PcvModule = 51 ; pub const PcvModule_PcvModule_TSECB : PcvModule = 52 ; pub const PcvModule_PcvModule_APE : PcvModule = 53 ; pub const PcvModule_PcvModule_ACLK : PcvModule = 54 ; pub const PcvModule_PcvModule_UARTAPE : PcvModule = 55 ; pub const PcvModule_PcvModule_EMC : PcvModule = 56 ; pub const PcvModule_PcvModule_PLLE0_0 : PcvModule = 57 ; pub const PcvModule_PcvModule_PLLE0_1 : PcvModule = 58 ; pub const PcvModule_PcvModule_DSI : PcvModule = 59 ; pub const PcvModule_PcvModule_MAUD : PcvModule = 60 ; pub const PcvModule_PcvModule_DPAUX1 : PcvModule = 61 ; pub const PcvModule_PcvModule_MIPI_CAL : PcvModule = 62 ; pub const PcvModule_PcvModule_UART_FST_MIPI_CAL : PcvModule = 63 ; pub const PcvModule_PcvModule_OSC : PcvModule = 64 ; pub const PcvModule_PcvModule_SCLK : PcvModule = 65 ; pub const PcvModule_PcvModule_SOR_SAFE : PcvModule = 66 ; pub const PcvModule_PcvModule_XUSB_SS : PcvModule = 67 ; pub const PcvModule_PcvModule_XUSB_HOST : PcvModule = 68 ; pub const PcvModule_PcvModule_XUSB_DEV : PcvModule = 69 ; pub const PcvModule_PcvModule_EXTPERIPH1 : PcvModule = 70 ; pub const PcvModule_PcvModule_AHUB : PcvModule = 71 ; pub const PcvModule_PcvModule_HDA2HDMICODEC : PcvModule = 72 ; pub const PcvModule_PcvModule_PLLP5 : PcvModule = 73 ; pub const PcvModule_PcvModule_USBD : PcvModule = 74 ; pub const PcvModule_PcvModule_USB2 : PcvModule = 75 ; pub const PcvModule_PcvModule_PCIE : PcvModule = 76 ; pub const PcvModule_PcvModule_AFI : PcvModule = 77 ; pub const PcvModule_PcvModule_PCIEXCLK : PcvModule = 78 ; pub const PcvModule_PcvModule_PEX_USB_UPHY : PcvModule = 79 ; pub const PcvModule_PcvModule_XUSB_PADCTL : PcvModule = 80 ; pub const PcvModule_PcvModule_APBDMA : PcvModule = 81 ; pub const PcvModule_PcvModule_USB2_TRK : PcvModule = 82 ; pub const PcvModule_PcvModule_PLLE0_2 : PcvModule = 83 ; pub const PcvModule_PcvModule_PLLE0_3 : PcvModule = 84 ; pub const PcvModule_PcvModule_CEC : PcvModule = 85 ; pub const PcvModule_PcvModule_EXTPERIPH2 : PcvModule = 86 ; pub const PcvModule_PcvModule_Count : PcvModule = 87 ; pub type PcvModule = u32 ; pub const PcvModuleId_PcvModuleId_CpuBus : PcvModuleId = 1073741825 ; pub const PcvModuleId_PcvModuleId_GPU : PcvModuleId = 1073741826 ; pub const PcvModuleId_PcvModuleId_I2S1 : PcvModuleId = 1073741827 ; pub const PcvModuleId_PcvModuleId_I2S2 : PcvModuleId = 1073741828 ; pub const PcvModuleId_PcvModuleId_I2S3 : PcvModuleId = 1073741829 ; pub const PcvModuleId_PcvModuleId_PWM : PcvModuleId = 1073741830 ; pub const PcvModuleId_PcvModuleId_I2C1 : PcvModuleId = 33554433 ; pub const PcvModuleId_PcvModuleId_I2C2 : PcvModuleId = 33554434 ; pub const PcvModuleId_PcvModuleId_I2C3 : PcvModuleId = 33554435 ; pub const PcvModuleId_PcvModuleId_I2C4 : PcvModuleId = 33554436 ; pub const PcvModuleId_PcvModuleId_I2C5 : PcvModuleId = 33554437 ; pub const PcvModuleId_PcvModuleId_I2C6 : PcvModuleId = 33554438 ; pub const PcvModuleId_PcvModuleId_SPI1 : PcvModuleId = 117440512 ; pub const PcvModuleId_PcvModuleId_SPI2 : PcvModuleId = 117440513 ; pub const PcvModuleId_PcvModuleId_SPI3 : PcvModuleId = 117440514 ; pub const PcvModuleId_PcvModuleId_SPI4 : PcvModuleId = 117440515 ; pub const PcvModuleId_PcvModuleId_DISP1 : PcvModuleId = 1073741841 ; pub const PcvModuleId_PcvModuleId_DISP2 : PcvModuleId = 1073741842 ; pub const PcvModuleId_PcvModuleId_ISP : PcvModuleId = 1073741843 ; pub const PcvModuleId_PcvModuleId_VI : PcvModuleId = 1073741844 ; pub const PcvModuleId_PcvModuleId_SDMMC1 : PcvModuleId = 1073741845 ; pub const PcvModuleId_PcvModuleId_SDMMC2 : PcvModuleId = 1073741846 ; pub const PcvModuleId_PcvModuleId_SDMMC3 : PcvModuleId = 1073741847 ; pub const PcvModuleId_PcvModuleId_SDMMC4 : PcvModuleId = 1073741848 ; pub const PcvModuleId_PcvModuleId_OWR : PcvModuleId = 1073741849 ; pub const PcvModuleId_PcvModuleId_CSITE : PcvModuleId = 1073741850 ; pub const PcvModuleId_PcvModuleId_TSEC : PcvModuleId = 1073741851 ; pub const PcvModuleId_PcvModuleId_MSELECT : PcvModuleId = 1073741852 ; pub const PcvModuleId_PcvModuleId_HDA2CODEC_2X : PcvModuleId = 1073741853 ; pub const PcvModuleId_PcvModuleId_ACTMON : PcvModuleId = 1073741854 ; pub const PcvModuleId_PcvModuleId_I2C_SLOW : PcvModuleId = 1073741855 ; pub const PcvModuleId_PcvModuleId_SOR1 : PcvModuleId = 1073741856 ; pub const PcvModuleId_PcvModuleId_SATA : PcvModuleId = 1073741857 ; pub const PcvModuleId_PcvModuleId_HDA : PcvModuleId = 1073741858 ; pub const PcvModuleId_PcvModuleId_XUSB_CORE_HOST : PcvModuleId = 1073741859 ; pub const PcvModuleId_PcvModuleId_XUSB_FALCON : PcvModuleId = 1073741860 ; pub const PcvModuleId_PcvModuleId_XUSB_FS : PcvModuleId = 1073741861 ; pub const PcvModuleId_PcvModuleId_XUSB_CORE_DEV : PcvModuleId = 1073741862 ; pub const PcvModuleId_PcvModuleId_XUSB_SS_HOSTDEV : PcvModuleId = 1073741863 ; pub const PcvModuleId_PcvModuleId_UARTA : PcvModuleId = 50331649 ; pub const PcvModuleId_PcvModuleId_UARTB : PcvModuleId = 889193477 ; pub const PcvModuleId_PcvModuleId_UARTC : PcvModuleId = 889193487 ; pub const PcvModuleId_PcvModuleId_UARTD : PcvModuleId = 922746881 ; pub const PcvModuleId_PcvModuleId_HOST1X : PcvModuleId = 1073741868 ; pub const PcvModuleId_PcvModuleId_ENTROPY : PcvModuleId = 1073741869 ; pub const PcvModuleId_PcvModuleId_SOC_THERM : PcvModuleId = 1073741870 ; pub const PcvModuleId_PcvModuleId_VIC : PcvModuleId = 1073741871 ; pub const PcvModuleId_PcvModuleId_NVENC : PcvModuleId = 1073741872 ; pub const PcvModuleId_PcvModuleId_NVJPG : PcvModuleId = 1073741873 ; pub const PcvModuleId_PcvModuleId_NVDEC : PcvModuleId = 1073741874 ; pub const PcvModuleId_PcvModuleId_QSPI : PcvModuleId = 1073741875 ; pub const PcvModuleId_PcvModuleId_VI_I2C : PcvModuleId = 1073741876 ; pub const PcvModuleId_PcvModuleId_TSECB : PcvModuleId = 1073741877 ; pub const PcvModuleId_PcvModuleId_APE : PcvModuleId = 1073741878 ; pub const PcvModuleId_PcvModuleId_ACLK : PcvModuleId = 1073741879 ; pub const PcvModuleId_PcvModuleId_UARTAPE : PcvModuleId = 1073741880 ; pub const PcvModuleId_PcvModuleId_EMC : PcvModuleId = 1073741881 ; pub const PcvModuleId_PcvModuleId_PLLE0_0 : PcvModuleId = 1073741882 ; pub const PcvModuleId_PcvModuleId_PLLE0_1 : PcvModuleId = 1073741883 ; pub const PcvModuleId_PcvModuleId_DSI : PcvModuleId = 1073741884 ; pub const PcvModuleId_PcvModuleId_MAUD : PcvModuleId = 1073741885 ; pub const PcvModuleId_PcvModuleId_DPAUX1 : PcvModuleId = 1073741886 ; pub const PcvModuleId_PcvModuleId_MIPI_CAL : PcvModuleId = 1073741887 ; pub const PcvModuleId_PcvModuleId_UART_FST_MIPI_CAL : PcvModuleId = 1073741888 ; pub const PcvModuleId_PcvModuleId_OSC : PcvModuleId = 1073741889 ; pub const PcvModuleId_PcvModuleId_SCLK : PcvModuleId = 1073741890 ; pub const PcvModuleId_PcvModuleId_SOR_SAFE : PcvModuleId = 1073741891 ; pub const PcvModuleId_PcvModuleId_XUSB_SS : PcvModuleId = 1073741892 ; pub const PcvModuleId_PcvModuleId_XUSB_HOST : PcvModuleId = 1073741893 ; pub const PcvModuleId_PcvModuleId_XUSB_DEV : PcvModuleId = 1073741894 ; pub const PcvModuleId_PcvModuleId_EXTPERIPH1 : PcvModuleId = 1073741895 ; pub const PcvModuleId_PcvModuleId_AHUB : PcvModuleId = 1073741896 ; pub const PcvModuleId_PcvModuleId_HDA2HDMICODEC : PcvModuleId = 1073741897 ; pub const PcvModuleId_PcvModuleId_PLLP5 : PcvModuleId = 1073741898 ; pub const PcvModuleId_PcvModuleId_USBD : PcvModuleId = 1073741899 ; pub const PcvModuleId_PcvModuleId_USB2 : PcvModuleId = 1073741900 ; pub const PcvModuleId_PcvModuleId_PCIE : PcvModuleId = 1073741901 ; pub const PcvModuleId_PcvModuleId_AFI : PcvModuleId = 1073741902 ; pub const PcvModuleId_PcvModuleId_PCIEXCLK : PcvModuleId = 1073741903 ; pub const PcvModuleId_PcvModuleId_PEX_USB_UPHY : PcvModuleId = 1073741904 ; pub const PcvModuleId_PcvModuleId_XUSB_PADCTL : PcvModuleId = 1073741905 ; pub const PcvModuleId_PcvModuleId_APBDMA : PcvModuleId = 1073741906 ; pub const PcvModuleId_PcvModuleId_USB2_TRK : PcvModuleId = 1073741907 ; pub const PcvModuleId_PcvModuleId_PLLE0_2 : PcvModuleId = 1073741908 ; pub const PcvModuleId_PcvModuleId_PLLE0_3 : PcvModuleId = 1073741909 ; pub const PcvModuleId_PcvModuleId_CEC : PcvModuleId = 1073741910 ; pub const PcvModuleId_PcvModuleId_EXTPERIPH2 : PcvModuleId = 1073741911 ; + pub fn lblSetCurrentBrightnessSetting ( brightness : f32 ) -> Result ; } extern "C" { pub fn lblGetCurrentBrightnessSetting ( out_value : * mut f32 ) -> Result ; } extern "C" { pub fn lblEnableAutoBrightnessControl ( ) -> Result ; } extern "C" { pub fn lblDisableAutoBrightnessControl ( ) -> Result ; } extern "C" { pub fn lblIsAutoBrightnessControlEnabled ( out_value : * mut bool ) -> Result ; } pub const I2cDevice_I2cDevice_DebugPad : I2cDevice = 0 ; pub const I2cDevice_I2cDevice_TouchPanel : I2cDevice = 1 ; pub const I2cDevice_I2cDevice_Tmp451 : I2cDevice = 2 ; pub const I2cDevice_I2cDevice_Nct72 : I2cDevice = 3 ; pub const I2cDevice_I2cDevice_Alc5639 : I2cDevice = 4 ; pub const I2cDevice_I2cDevice_Max77620Rtc : I2cDevice = 5 ; pub const I2cDevice_I2cDevice_Max77620Pmic : I2cDevice = 6 ; pub const I2cDevice_I2cDevice_Max77621Cpu : I2cDevice = 7 ; pub const I2cDevice_I2cDevice_Max77621Gpu : I2cDevice = 8 ; pub const I2cDevice_I2cDevice_Bq24193 : I2cDevice = 9 ; pub const I2cDevice_I2cDevice_Max17050 : I2cDevice = 10 ; pub const I2cDevice_I2cDevice_Bm92t30mwv : I2cDevice = 11 ; pub const I2cDevice_I2cDevice_Ina226Vdd15v0Hb : I2cDevice = 12 ; pub const I2cDevice_I2cDevice_Ina226VsysCpuDs : I2cDevice = 13 ; pub const I2cDevice_I2cDevice_Ina226VsysGpuDs : I2cDevice = 14 ; pub const I2cDevice_I2cDevice_Ina226VsysDdrDs : I2cDevice = 15 ; pub const I2cDevice_I2cDevice_Ina226VsysAp : I2cDevice = 16 ; pub const I2cDevice_I2cDevice_Ina226VsysBlDs : I2cDevice = 17 ; pub const I2cDevice_I2cDevice_Bh1730 : I2cDevice = 18 ; pub const I2cDevice_I2cDevice_Ina226VsysCore : I2cDevice = 19 ; pub const I2cDevice_I2cDevice_Ina226Soc1V8 : I2cDevice = 20 ; pub const I2cDevice_I2cDevice_Ina226Lpddr1V8 : I2cDevice = 21 ; pub const I2cDevice_I2cDevice_Ina226Reg1V32 : I2cDevice = 22 ; pub const I2cDevice_I2cDevice_Ina226Vdd3V3Sys : I2cDevice = 23 ; pub const I2cDevice_I2cDevice_HdmiDdc : I2cDevice = 24 ; pub const I2cDevice_I2cDevice_HdmiScdc : I2cDevice = 25 ; pub const I2cDevice_I2cDevice_HdmiHdcp : I2cDevice = 26 ; pub const I2cDevice_I2cDevice_Fan53528 : I2cDevice = 27 ; pub const I2cDevice_I2cDevice_Max77812_3 : I2cDevice = 28 ; pub const I2cDevice_I2cDevice_Max77812_2 : I2cDevice = 29 ; pub const I2cDevice_I2cDevice_Ina226VddDdr0V6 : I2cDevice = 30 ; pub const I2cDevice_I2cDevice_Count : I2cDevice = 31 ; pub type I2cDevice = u32 ; # [ repr ( C ) ] pub struct I2cSession { pub s : Service , } # [ test ] fn bindgen_test_layout_I2cSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < I2cSession > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( I2cSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < I2cSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( I2cSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < I2cSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( I2cSession ) , "::" , stringify ! ( s ) ) ) ; } pub const I2cTransactionOption_I2cTransactionOption_Start : I2cTransactionOption = 1 ; pub const I2cTransactionOption_I2cTransactionOption_Stop : I2cTransactionOption = 2 ; pub const I2cTransactionOption_I2cTransactionOption_All : I2cTransactionOption = 3 ; pub type I2cTransactionOption = u32 ; extern "C" { pub fn i2cInitialize ( ) -> Result ; } extern "C" { pub fn i2cExit ( ) ; } extern "C" { pub fn i2cGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn i2cOpenSession ( out : * mut I2cSession , dev : I2cDevice ) -> Result ; } extern "C" { pub fn i2csessionSendAuto ( s : * mut I2cSession , buf : * const ctypes :: c_void , size : usize , option : I2cTransactionOption ) -> Result ; } extern "C" { pub fn i2csessionReceiveAuto ( s : * mut I2cSession , buf : * mut ctypes :: c_void , size : usize , option : I2cTransactionOption ) -> Result ; } extern "C" { pub fn i2csessionExecuteCommandList ( s : * mut I2cSession , dst : * mut ctypes :: c_void , dst_size : usize , cmd_list : * const ctypes :: c_void , cmd_list_size : usize ) -> Result ; } extern "C" { pub fn i2csessionClose ( s : * mut I2cSession ) ; } pub const GpioPadName_GpioPadName_AudioCodec : GpioPadName = 1 ; pub const GpioPadName_GpioPadName_ButtonVolUp : GpioPadName = 25 ; pub const GpioPadName_GpioPadName_ButtonVolDown : GpioPadName = 26 ; pub type GpioPadName = u32 ; # [ repr ( C ) ] pub struct GpioPadSession { pub s : Service , } # [ test ] fn bindgen_test_layout_GpioPadSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < GpioPadSession > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( GpioPadSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < GpioPadSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( GpioPadSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < GpioPadSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( GpioPadSession ) , "::" , stringify ! ( s ) ) ) ; } pub const GpioDirection_GpioDirection_Input : GpioDirection = 0 ; pub const GpioDirection_GpioDirection_Output : GpioDirection = 1 ; pub type GpioDirection = u32 ; pub const GpioValue_GpioValue_Low : GpioValue = 0 ; pub const GpioValue_GpioValue_High : GpioValue = 1 ; pub type GpioValue = u32 ; extern "C" { pub fn gpioInitialize ( ) -> Result ; } extern "C" { pub fn gpioExit ( ) ; } extern "C" { pub fn gpioGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn gpioOpenSession ( out : * mut GpioPadSession , name : GpioPadName ) -> Result ; } extern "C" { pub fn gpioPadSetDirection ( p : * mut GpioPadSession , dir : GpioDirection ) -> Result ; } extern "C" { pub fn gpioPadGetDirection ( p : * mut GpioPadSession , out : * mut GpioDirection ) -> Result ; } extern "C" { pub fn gpioPadSetValue ( p : * mut GpioPadSession , val : GpioValue ) -> Result ; } extern "C" { pub fn gpioPadGetValue ( p : * mut GpioPadSession , out : * mut GpioValue ) -> Result ; } extern "C" { pub fn gpioPadClose ( p : * mut GpioPadSession ) ; } pub const BpcSleepButtonState_BpcSleepButtonState_Held : BpcSleepButtonState = 0 ; pub const BpcSleepButtonState_BpcSleepButtonState_Released : BpcSleepButtonState = 1 ; pub type BpcSleepButtonState = u32 ; extern "C" { pub fn bpcInitialize ( ) -> Result ; } extern "C" { pub fn bpcExit ( ) ; } extern "C" { pub fn bpcGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn bpcShutdownSystem ( ) -> Result ; } extern "C" { pub fn bpcRebootSystem ( ) -> Result ; } extern "C" { pub fn bpcGetSleepButtonState ( out : * mut BpcSleepButtonState ) -> Result ; } pub const PcvModule_PcvModule_CpuBus : PcvModule = 0 ; pub const PcvModule_PcvModule_GPU : PcvModule = 1 ; pub const PcvModule_PcvModule_I2S1 : PcvModule = 2 ; pub const PcvModule_PcvModule_I2S2 : PcvModule = 3 ; pub const PcvModule_PcvModule_I2S3 : PcvModule = 4 ; pub const PcvModule_PcvModule_PWM : PcvModule = 5 ; pub const PcvModule_PcvModule_I2C1 : PcvModule = 6 ; pub const PcvModule_PcvModule_I2C2 : PcvModule = 7 ; pub const PcvModule_PcvModule_I2C3 : PcvModule = 8 ; pub const PcvModule_PcvModule_I2C4 : PcvModule = 9 ; pub const PcvModule_PcvModule_I2C5 : PcvModule = 10 ; pub const PcvModule_PcvModule_I2C6 : PcvModule = 11 ; pub const PcvModule_PcvModule_SPI1 : PcvModule = 12 ; pub const PcvModule_PcvModule_SPI2 : PcvModule = 13 ; pub const PcvModule_PcvModule_SPI3 : PcvModule = 14 ; pub const PcvModule_PcvModule_SPI4 : PcvModule = 15 ; pub const PcvModule_PcvModule_DISP1 : PcvModule = 16 ; pub const PcvModule_PcvModule_DISP2 : PcvModule = 17 ; pub const PcvModule_PcvModule_ISP : PcvModule = 18 ; pub const PcvModule_PcvModule_VI : PcvModule = 19 ; pub const PcvModule_PcvModule_SDMMC1 : PcvModule = 20 ; pub const PcvModule_PcvModule_SDMMC2 : PcvModule = 21 ; pub const PcvModule_PcvModule_SDMMC3 : PcvModule = 22 ; pub const PcvModule_PcvModule_SDMMC4 : PcvModule = 23 ; pub const PcvModule_PcvModule_OWR : PcvModule = 24 ; pub const PcvModule_PcvModule_CSITE : PcvModule = 25 ; pub const PcvModule_PcvModule_TSEC : PcvModule = 26 ; pub const PcvModule_PcvModule_MSELECT : PcvModule = 27 ; pub const PcvModule_PcvModule_HDA2CODEC_2X : PcvModule = 28 ; pub const PcvModule_PcvModule_ACTMON : PcvModule = 29 ; pub const PcvModule_PcvModule_I2C_SLOW : PcvModule = 30 ; pub const PcvModule_PcvModule_SOR1 : PcvModule = 31 ; pub const PcvModule_PcvModule_SATA : PcvModule = 32 ; pub const PcvModule_PcvModule_HDA : PcvModule = 33 ; pub const PcvModule_PcvModule_XUSB_CORE_HOST : PcvModule = 34 ; pub const PcvModule_PcvModule_XUSB_FALCON : PcvModule = 35 ; pub const PcvModule_PcvModule_XUSB_FS : PcvModule = 36 ; pub const PcvModule_PcvModule_XUSB_CORE_DEV : PcvModule = 37 ; pub const PcvModule_PcvModule_XUSB_SS_HOSTDEV : PcvModule = 38 ; pub const PcvModule_PcvModule_UARTA : PcvModule = 39 ; pub const PcvModule_PcvModule_UARTB : PcvModule = 40 ; pub const PcvModule_PcvModule_UARTC : PcvModule = 41 ; pub const PcvModule_PcvModule_UARTD : PcvModule = 42 ; pub const PcvModule_PcvModule_HOST1X : PcvModule = 43 ; pub const PcvModule_PcvModule_ENTROPY : PcvModule = 44 ; pub const PcvModule_PcvModule_SOC_THERM : PcvModule = 45 ; pub const PcvModule_PcvModule_VIC : PcvModule = 46 ; pub const PcvModule_PcvModule_NVENC : PcvModule = 47 ; pub const PcvModule_PcvModule_NVJPG : PcvModule = 48 ; pub const PcvModule_PcvModule_NVDEC : PcvModule = 49 ; pub const PcvModule_PcvModule_QSPI : PcvModule = 50 ; pub const PcvModule_PcvModule_VI_I2C : PcvModule = 51 ; pub const PcvModule_PcvModule_TSECB : PcvModule = 52 ; pub const PcvModule_PcvModule_APE : PcvModule = 53 ; pub const PcvModule_PcvModule_ACLK : PcvModule = 54 ; pub const PcvModule_PcvModule_UARTAPE : PcvModule = 55 ; pub const PcvModule_PcvModule_EMC : PcvModule = 56 ; pub const PcvModule_PcvModule_PLLE0_0 : PcvModule = 57 ; pub const PcvModule_PcvModule_PLLE0_1 : PcvModule = 58 ; pub const PcvModule_PcvModule_DSI : PcvModule = 59 ; pub const PcvModule_PcvModule_MAUD : PcvModule = 60 ; pub const PcvModule_PcvModule_DPAUX1 : PcvModule = 61 ; pub const PcvModule_PcvModule_MIPI_CAL : PcvModule = 62 ; pub const PcvModule_PcvModule_UART_FST_MIPI_CAL : PcvModule = 63 ; pub const PcvModule_PcvModule_OSC : PcvModule = 64 ; pub const PcvModule_PcvModule_SCLK : PcvModule = 65 ; pub const PcvModule_PcvModule_SOR_SAFE : PcvModule = 66 ; pub const PcvModule_PcvModule_XUSB_SS : PcvModule = 67 ; pub const PcvModule_PcvModule_XUSB_HOST : PcvModule = 68 ; pub const PcvModule_PcvModule_XUSB_DEV : PcvModule = 69 ; pub const PcvModule_PcvModule_EXTPERIPH1 : PcvModule = 70 ; pub const PcvModule_PcvModule_AHUB : PcvModule = 71 ; pub const PcvModule_PcvModule_HDA2HDMICODEC : PcvModule = 72 ; pub const PcvModule_PcvModule_PLLP5 : PcvModule = 73 ; pub const PcvModule_PcvModule_USBD : PcvModule = 74 ; pub const PcvModule_PcvModule_USB2 : PcvModule = 75 ; pub const PcvModule_PcvModule_PCIE : PcvModule = 76 ; pub const PcvModule_PcvModule_AFI : PcvModule = 77 ; pub const PcvModule_PcvModule_PCIEXCLK : PcvModule = 78 ; pub const PcvModule_PcvModule_PEX_USB_UPHY : PcvModule = 79 ; pub const PcvModule_PcvModule_XUSB_PADCTL : PcvModule = 80 ; pub const PcvModule_PcvModule_APBDMA : PcvModule = 81 ; pub const PcvModule_PcvModule_USB2_TRK : PcvModule = 82 ; pub const PcvModule_PcvModule_PLLE0_2 : PcvModule = 83 ; pub const PcvModule_PcvModule_PLLE0_3 : PcvModule = 84 ; pub const PcvModule_PcvModule_CEC : PcvModule = 85 ; pub const PcvModule_PcvModule_EXTPERIPH2 : PcvModule = 86 ; pub const PcvModule_PcvModule_Count : PcvModule = 87 ; pub type PcvModule = u32 ; pub const PcvModuleId_PcvModuleId_CpuBus : PcvModuleId = 1073741825 ; pub const PcvModuleId_PcvModuleId_GPU : PcvModuleId = 1073741826 ; pub const PcvModuleId_PcvModuleId_I2S1 : PcvModuleId = 1073741827 ; pub const PcvModuleId_PcvModuleId_I2S2 : PcvModuleId = 1073741828 ; pub const PcvModuleId_PcvModuleId_I2S3 : PcvModuleId = 1073741829 ; pub const PcvModuleId_PcvModuleId_PWM : PcvModuleId = 1073741830 ; pub const PcvModuleId_PcvModuleId_I2C1 : PcvModuleId = 33554433 ; pub const PcvModuleId_PcvModuleId_I2C2 : PcvModuleId = 33554434 ; pub const PcvModuleId_PcvModuleId_I2C3 : PcvModuleId = 33554435 ; pub const PcvModuleId_PcvModuleId_I2C4 : PcvModuleId = 33554436 ; pub const PcvModuleId_PcvModuleId_I2C5 : PcvModuleId = 33554437 ; pub const PcvModuleId_PcvModuleId_I2C6 : PcvModuleId = 33554438 ; pub const PcvModuleId_PcvModuleId_SPI1 : PcvModuleId = 117440512 ; pub const PcvModuleId_PcvModuleId_SPI2 : PcvModuleId = 117440513 ; pub const PcvModuleId_PcvModuleId_SPI3 : PcvModuleId = 117440514 ; pub const PcvModuleId_PcvModuleId_SPI4 : PcvModuleId = 117440515 ; pub const PcvModuleId_PcvModuleId_DISP1 : PcvModuleId = 1073741841 ; pub const PcvModuleId_PcvModuleId_DISP2 : PcvModuleId = 1073741842 ; pub const PcvModuleId_PcvModuleId_ISP : PcvModuleId = 1073741843 ; pub const PcvModuleId_PcvModuleId_VI : PcvModuleId = 1073741844 ; pub const PcvModuleId_PcvModuleId_SDMMC1 : PcvModuleId = 1073741845 ; pub const PcvModuleId_PcvModuleId_SDMMC2 : PcvModuleId = 1073741846 ; pub const PcvModuleId_PcvModuleId_SDMMC3 : PcvModuleId = 1073741847 ; pub const PcvModuleId_PcvModuleId_SDMMC4 : PcvModuleId = 1073741848 ; pub const PcvModuleId_PcvModuleId_OWR : PcvModuleId = 1073741849 ; pub const PcvModuleId_PcvModuleId_CSITE : PcvModuleId = 1073741850 ; pub const PcvModuleId_PcvModuleId_TSEC : PcvModuleId = 1073741851 ; pub const PcvModuleId_PcvModuleId_MSELECT : PcvModuleId = 1073741852 ; pub const PcvModuleId_PcvModuleId_HDA2CODEC_2X : PcvModuleId = 1073741853 ; pub const PcvModuleId_PcvModuleId_ACTMON : PcvModuleId = 1073741854 ; pub const PcvModuleId_PcvModuleId_I2C_SLOW : PcvModuleId = 1073741855 ; pub const PcvModuleId_PcvModuleId_SOR1 : PcvModuleId = 1073741856 ; pub const PcvModuleId_PcvModuleId_SATA : PcvModuleId = 1073741857 ; pub const PcvModuleId_PcvModuleId_HDA : PcvModuleId = 1073741858 ; pub const PcvModuleId_PcvModuleId_XUSB_CORE_HOST : PcvModuleId = 1073741859 ; pub const PcvModuleId_PcvModuleId_XUSB_FALCON : PcvModuleId = 1073741860 ; pub const PcvModuleId_PcvModuleId_XUSB_FS : PcvModuleId = 1073741861 ; pub const PcvModuleId_PcvModuleId_XUSB_CORE_DEV : PcvModuleId = 1073741862 ; pub const PcvModuleId_PcvModuleId_XUSB_SS_HOSTDEV : PcvModuleId = 1073741863 ; pub const PcvModuleId_PcvModuleId_UARTA : PcvModuleId = 50331649 ; pub const PcvModuleId_PcvModuleId_UARTB : PcvModuleId = 889193477 ; pub const PcvModuleId_PcvModuleId_UARTC : PcvModuleId = 889193487 ; pub const PcvModuleId_PcvModuleId_UARTD : PcvModuleId = 922746881 ; pub const PcvModuleId_PcvModuleId_HOST1X : PcvModuleId = 1073741868 ; pub const PcvModuleId_PcvModuleId_ENTROPY : PcvModuleId = 1073741869 ; pub const PcvModuleId_PcvModuleId_SOC_THERM : PcvModuleId = 1073741870 ; pub const PcvModuleId_PcvModuleId_VIC : PcvModuleId = 1073741871 ; pub const PcvModuleId_PcvModuleId_NVENC : PcvModuleId = 1073741872 ; pub const PcvModuleId_PcvModuleId_NVJPG : PcvModuleId = 1073741873 ; pub const PcvModuleId_PcvModuleId_NVDEC : PcvModuleId = 1073741874 ; pub const PcvModuleId_PcvModuleId_QSPI : PcvModuleId = 1073741875 ; pub const PcvModuleId_PcvModuleId_VI_I2C : PcvModuleId = 1073741876 ; pub const PcvModuleId_PcvModuleId_TSECB : PcvModuleId = 1073741877 ; pub const PcvModuleId_PcvModuleId_APE : PcvModuleId = 1073741878 ; pub const PcvModuleId_PcvModuleId_ACLK : PcvModuleId = 1073741879 ; pub const PcvModuleId_PcvModuleId_UARTAPE : PcvModuleId = 1073741880 ; pub const PcvModuleId_PcvModuleId_EMC : PcvModuleId = 1073741881 ; pub const PcvModuleId_PcvModuleId_PLLE0_0 : PcvModuleId = 1073741882 ; pub const PcvModuleId_PcvModuleId_PLLE0_1 : PcvModuleId = 1073741883 ; pub const PcvModuleId_PcvModuleId_DSI : PcvModuleId = 1073741884 ; pub const PcvModuleId_PcvModuleId_MAUD : PcvModuleId = 1073741885 ; pub const PcvModuleId_PcvModuleId_DPAUX1 : PcvModuleId = 1073741886 ; pub const PcvModuleId_PcvModuleId_MIPI_CAL : PcvModuleId = 1073741887 ; pub const PcvModuleId_PcvModuleId_UART_FST_MIPI_CAL : PcvModuleId = 1073741888 ; pub const PcvModuleId_PcvModuleId_OSC : PcvModuleId = 1073741889 ; pub const PcvModuleId_PcvModuleId_SCLK : PcvModuleId = 1073741890 ; pub const PcvModuleId_PcvModuleId_SOR_SAFE : PcvModuleId = 1073741891 ; pub const PcvModuleId_PcvModuleId_XUSB_SS : PcvModuleId = 1073741892 ; pub const PcvModuleId_PcvModuleId_XUSB_HOST : PcvModuleId = 1073741893 ; pub const PcvModuleId_PcvModuleId_XUSB_DEV : PcvModuleId = 1073741894 ; pub const PcvModuleId_PcvModuleId_EXTPERIPH1 : PcvModuleId = 1073741895 ; pub const PcvModuleId_PcvModuleId_AHUB : PcvModuleId = 1073741896 ; pub const PcvModuleId_PcvModuleId_HDA2HDMICODEC : PcvModuleId = 1073741897 ; pub const PcvModuleId_PcvModuleId_PLLP5 : PcvModuleId = 1073741898 ; pub const PcvModuleId_PcvModuleId_USBD : PcvModuleId = 1073741899 ; pub const PcvModuleId_PcvModuleId_USB2 : PcvModuleId = 1073741900 ; pub const PcvModuleId_PcvModuleId_PCIE : PcvModuleId = 1073741901 ; pub const PcvModuleId_PcvModuleId_AFI : PcvModuleId = 1073741902 ; pub const PcvModuleId_PcvModuleId_PCIEXCLK : PcvModuleId = 1073741903 ; pub const PcvModuleId_PcvModuleId_PEX_USB_UPHY : PcvModuleId = 1073741904 ; pub const PcvModuleId_PcvModuleId_XUSB_PADCTL : PcvModuleId = 1073741905 ; pub const PcvModuleId_PcvModuleId_APBDMA : PcvModuleId = 1073741906 ; pub const PcvModuleId_PcvModuleId_USB2_TRK : PcvModuleId = 1073741907 ; pub const PcvModuleId_PcvModuleId_PLLE0_2 : PcvModuleId = 1073741908 ; pub const PcvModuleId_PcvModuleId_PLLE0_3 : PcvModuleId = 1073741909 ; pub const PcvModuleId_PcvModuleId_CEC : PcvModuleId = 1073741910 ; pub const PcvModuleId_PcvModuleId_EXTPERIPH2 : PcvModuleId = 1073741911 ; /// Module id returned by [8.0.0+] pcv services /// See also: https://switchbrew.org/wiki/PCV_services#Modules - pub type PcvModuleId = u32 ; extern "C" { pub fn pcvInitialize ( ) -> Result ; } extern "C" { pub fn pcvExit ( ) ; } extern "C" { pub fn pcvGetModuleId ( module_id : * mut PcvModuleId , module : PcvModule ) -> Result ; } extern "C" { pub fn pcvGetClockRate ( module : PcvModule , out_hz : * mut u32 ) -> Result ; } extern "C" { pub fn pcvSetClockRate ( module : PcvModule , hz : u32 ) -> Result ; } extern "C" { pub fn pcvSetVoltageEnabled ( state : bool , voltage : u32 ) -> Result ; } extern "C" { pub fn pcvGetVoltageEnabled ( isEnabled : * mut bool , voltage : u32 ) -> Result ; } + pub type PcvModuleId = u32 ; extern "C" { pub fn pcvInitialize ( ) -> Result ; } extern "C" { pub fn pcvExit ( ) ; } extern "C" { pub fn pcvGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pcvGetModuleId ( module_id : * mut PcvModuleId , module : PcvModule ) -> Result ; } extern "C" { pub fn pcvGetClockRate ( module : PcvModule , out_hz : * mut u32 ) -> Result ; } extern "C" { pub fn pcvSetClockRate ( module : PcvModule , hz : u32 ) -> Result ; } extern "C" { pub fn pcvSetVoltageEnabled ( state : bool , voltage : u32 ) -> Result ; } extern "C" { pub fn pcvGetVoltageEnabled ( isEnabled : * mut bool , voltage : u32 ) -> Result ; } # [ repr ( C ) ] pub struct ClkrstSession { pub s : Service , } # [ test ] fn bindgen_test_layout_ClkrstSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ClkrstSession > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( ClkrstSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ClkrstSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ClkrstSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ClkrstSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ClkrstSession ) , "::" , stringify ! ( s ) ) ) ; } extern "C" { pub fn clkrstInitialize ( ) -> Result ; } extern "C" { pub fn clkrstExit ( ) ; } extern "C" { pub fn clkrstGetServiceSession ( ) -> * mut Service ; } extern "C" { + /// Opens a ClkrstSession for the requested PcvModuleId, unk is set to 3 in official sysmodules. + pub fn clkrstOpenSession ( session_out : * mut ClkrstSession , module_id : PcvModuleId , unk : u32 ) -> Result ; } extern "C" { pub fn clkrstCloseSession ( session : * mut ClkrstSession ) ; } extern "C" { pub fn clkrstSetClockRate ( session : * mut ClkrstSession , hz : u32 ) -> Result ; } extern "C" { pub fn clkrstGetClockRate ( session : * mut ClkrstSession , out_hz : * mut u32 ) -> Result ; } /// < No charger pub const ChargerType_ChargerType_None : ChargerType = 0 ; /// < Official charger or dock @@ -2123,7 +3228,7 @@ where /// IPsmSession # [ repr ( C ) ] pub struct PsmSession { pub s : Service , /// < autoclear=false - pub StateChangeEvent : Event , } # [ test ] fn bindgen_test_layout_PsmSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PsmSession > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PsmSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PsmSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PsmSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PsmSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PsmSession ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PsmSession > ( ) ) ) . StateChangeEvent as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PsmSession ) , "::" , stringify ! ( StateChangeEvent ) ) ) ; } extern "C" { pub fn psmInitialize ( ) -> Result ; } extern "C" { pub fn psmExit ( ) ; } extern "C" { pub fn psmGetBatteryChargePercentage ( out : * mut u32 ) -> Result ; } extern "C" { pub fn psmGetChargerType ( out : * mut ChargerType ) -> Result ; } extern "C" { pub fn psmGetBatteryVoltageState ( out : * mut PsmBatteryVoltageState ) -> Result ; } extern "C" { + pub StateChangeEvent : Event , } # [ test ] fn bindgen_test_layout_PsmSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PsmSession > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PsmSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PsmSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PsmSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PsmSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PsmSession ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PsmSession > ( ) ) ) . StateChangeEvent as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PsmSession ) , "::" , stringify ! ( StateChangeEvent ) ) ) ; } extern "C" { pub fn psmInitialize ( ) -> Result ; } extern "C" { pub fn psmExit ( ) ; } extern "C" { pub fn psmGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn psmGetBatteryChargePercentage ( out : * mut u32 ) -> Result ; } extern "C" { pub fn psmGetChargerType ( out : * mut ChargerType ) -> Result ; } extern "C" { pub fn psmGetBatteryVoltageState ( out : * mut PsmBatteryVoltageState ) -> Result ; } extern "C" { /// @brief Wrapper func which opens a PsmSession and handles event setup. /// @note Uses the actual BindStateChangeEvent cmd internally. /// @note The event is not signalled on BatteryChargePercentage changes. @@ -2135,7 +3240,7 @@ where /// Wait on the Event setup by \ref psmBindStateChangeEvent. pub fn psmWaitStateChangeEvent ( s : * mut PsmSession , timeout : u64 ) -> Result ; } extern "C" { /// Cleanup version of \ref psmBindStateChangeEvent. Must be called by the user once the PsmSession is done being used. - pub fn psmUnbindStateChangeEvent ( s : * mut PsmSession ) -> Result ; } extern "C" { pub fn spsmInitialize ( ) -> Result ; } extern "C" { pub fn spsmExit ( ) ; } extern "C" { pub fn spsmShutdown ( reboot : bool ) -> Result ; } extern "C" { pub fn spsmPutErrorState ( ) -> Result ; } pub const FatalType_FatalType_ErrorReportAndErrorScreen : FatalType = 0 ; pub const FatalType_FatalType_ErrorReport : FatalType = 1 ; + pub fn psmUnbindStateChangeEvent ( s : * mut PsmSession ) -> Result ; } extern "C" { pub fn spsmInitialize ( ) -> Result ; } extern "C" { pub fn spsmExit ( ) ; } extern "C" { pub fn spsmGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn spsmShutdown ( reboot : bool ) -> Result ; } extern "C" { pub fn spsmPutErrorState ( ) -> Result ; } pub const FatalType_FatalType_ErrorReportAndErrorScreen : FatalType = 0 ; pub const FatalType_FatalType_ErrorReport : FatalType = 1 ; /// < Only available with 3.0.0+. If specified, FatalType_ErrorReportAndErrorScreen will be used instead on pre-3.0.0. pub const FatalType_FatalType_ErrorScreen : FatalType = 2 ; /// Type of thrown fatal error. @@ -2179,12 +3284,12 @@ where /// < 0 = no DST, 1 = DST. pub DST : u32 , /// < Seconds relative to UTC for this timezone. - pub offset : s32 , } # [ test ] fn bindgen_test_layout_TimeCalendarAdditionalInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < TimeCalendarAdditionalInfo > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( TimeCalendarAdditionalInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < TimeCalendarAdditionalInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( TimeCalendarAdditionalInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . wday as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( wday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . yday as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( yday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . timezoneName as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( timezoneName ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . DST as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( DST ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( offset ) ) ) ; } extern "C" { pub fn timeInitialize ( ) -> Result ; } extern "C" { pub fn timeExit ( ) ; } extern "C" { pub fn timeGetSessionService ( ) -> * mut Service ; } extern "C" { pub fn timeGetCurrentTime ( type_ : TimeType , timestamp : * mut u64 ) -> Result ; } extern "C" { + pub offset : s32 , } # [ test ] fn bindgen_test_layout_TimeCalendarAdditionalInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < TimeCalendarAdditionalInfo > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( TimeCalendarAdditionalInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < TimeCalendarAdditionalInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( TimeCalendarAdditionalInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . wday as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( wday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . yday as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( yday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . timezoneName as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( timezoneName ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . DST as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( DST ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeCalendarAdditionalInfo > ( ) ) ) . offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( TimeCalendarAdditionalInfo ) , "::" , stringify ! ( offset ) ) ) ; } # [ repr ( C ) ] pub struct TimeZoneRule { pub data : [ u8 ; 16384usize ] , } # [ test ] fn bindgen_test_layout_TimeZoneRule ( ) { assert_eq ! ( :: core :: mem :: size_of :: < TimeZoneRule > ( ) , 16384usize , concat ! ( "Size of: " , stringify ! ( TimeZoneRule ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < TimeZoneRule > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( TimeZoneRule ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeZoneRule > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( TimeZoneRule ) , "::" , stringify ! ( data ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct TimeLocationName { pub name : [ ctypes :: c_char ; 36usize ] , } # [ test ] fn bindgen_test_layout_TimeLocationName ( ) { assert_eq ! ( :: core :: mem :: size_of :: < TimeLocationName > ( ) , 36usize , concat ! ( "Size of: " , stringify ! ( TimeLocationName ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < TimeLocationName > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( TimeLocationName ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < TimeLocationName > ( ) ) ) . name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( TimeLocationName ) , "::" , stringify ! ( name ) ) ) ; } extern "C" { pub fn timeInitialize ( ) -> Result ; } extern "C" { pub fn timeExit ( ) ; } extern "C" { pub fn timeGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn timeGetCurrentTime ( type_ : TimeType , timestamp : * mut u64 ) -> Result ; } extern "C" { /// @brief Sets the time for the specified clock. /// @param[in] type Clock to use. /// @param[in] timestamp POSIX UTC timestamp. /// @return Result code. - pub fn timeSetCurrentTime ( type_ : TimeType , timestamp : u64 ) -> Result ; } extern "C" { pub fn timeToCalendarTimeWithMyRule ( timestamp : u64 , caltime : * mut TimeCalendarTime , info : * mut TimeCalendarAdditionalInfo ) -> Result ; } + pub fn timeSetCurrentTime ( type_ : TimeType , timestamp : u64 ) -> Result ; } extern "C" { pub fn timeGetDeviceLocationName ( name : * mut TimeLocationName ) -> Result ; } extern "C" { pub fn timeSetDeviceLocationName ( name : * const TimeLocationName ) -> Result ; } extern "C" { pub fn timeGetTotalLocationNameCount ( total_location_name_count : * mut u32 ) -> Result ; } extern "C" { pub fn timeLoadLocationNameList ( index : u32 , location_name_array : * mut TimeLocationName , location_name_size : usize , location_name_count : * mut u32 ) -> Result ; } extern "C" { pub fn timeLoadTimeZoneRule ( name : * const TimeLocationName , rule : * mut TimeZoneRule ) -> Result ; } extern "C" { pub fn timeToPosixTime ( rule : * const TimeZoneRule , caltime : * const TimeCalendarTime , timestamp_list : * mut u64 , timestamp_list_size : usize , timestamp_count : * mut u32 ) -> Result ; } extern "C" { pub fn timeToPosixTimeWithMyRule ( caltime : * const TimeCalendarTime , timestamp_list : * mut u64 , timestamp_list_size : usize , timestamp_count : * mut u32 ) -> Result ; } extern "C" { pub fn timeToCalendarTime ( rule : * const TimeZoneRule , timestamp : u64 , caltime : * mut TimeCalendarTime , info : * mut TimeCalendarAdditionalInfo ) -> Result ; } extern "C" { pub fn timeToCalendarTimeWithMyRule ( timestamp : u64 , caltime : * mut TimeCalendarTime , info : * mut TimeCalendarAdditionalInfo ) -> Result ; } /// Imported from libusb, with some adjustments. # [ repr ( C , packed ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct usb_endpoint_descriptor { pub bLength : u8 , /// < Must match USB_DT_ENDPOINT. @@ -2273,7 +3378,7 @@ where /// Opens a session with usb:ds. pub fn usbDsInitialize ( ) -> Result ; } extern "C" { /// Closes the usb:ds session. Any interfaces/endpoints which are left open are automatically closed, since otherwise usb-sysmodule won't fully reset usb:ds to defaults. - pub fn usbDsExit ( ) ; } extern "C" { + pub fn usbDsExit ( ) ; } extern "C" { pub fn usbDsGetServiceSession ( ) -> * mut Service ; } extern "C" { /// Helpers pub fn usbDsWaitReady ( timeout : u64 ) -> Result ; } extern "C" { pub fn usbDsParseReportData ( reportdata : * mut UsbDsReportData , urbId : u32 , requestedSize : * mut u32 , transferredSize : * mut u32 ) -> Result ; } extern "C" { /// IDsService @@ -2318,9 +3423,11 @@ where /// < Initialized with the input interface from \ref usbHsAcquireUsbIf, then overwritten with the cmd output. Pre-3.0.0 this only overwrites the first 0x1B8-bytes (data before pathstr). pub inf : UsbHsInterface , } # [ test ] fn bindgen_test_layout_UsbHsClientIfSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < UsbHsClientIfSession > ( ) , 592usize , concat ! ( "Size of: " , stringify ! ( UsbHsClientIfSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < UsbHsClientIfSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( UsbHsClientIfSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientIfSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientIfSession ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientIfSession > ( ) ) ) . event0 as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientIfSession ) , "::" , stringify ! ( event0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientIfSession > ( ) ) ) . eventCtrlXfer as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientIfSession ) , "::" , stringify ! ( eventCtrlXfer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientIfSession > ( ) ) ) . ID as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientIfSession ) , "::" , stringify ! ( ID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientIfSession > ( ) ) ) . inf as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientIfSession ) , "::" , stringify ! ( inf ) ) ) ; } # [ repr ( C ) ] pub struct UsbHsClientEpSession { pub s : Service , /// < [2.0.0+] Signaled when PostBufferAsync finishes. - pub eventXfer : Event , pub desc : usb_endpoint_descriptor , } # [ test ] fn bindgen_test_layout_UsbHsClientEpSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < UsbHsClientEpSession > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( UsbHsClientEpSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < UsbHsClientEpSession > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( UsbHsClientEpSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . eventXfer as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( eventXfer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . desc as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( desc ) ) ) ; } extern "C" { + pub eventXfer : Event , + /// < [3.0.0+] IPC pointer buffer size. + pub ptrbufsize : usize , pub desc : usb_endpoint_descriptor , } # [ test ] fn bindgen_test_layout_UsbHsClientEpSession ( ) { assert_eq ! ( :: core :: mem :: size_of :: < UsbHsClientEpSession > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( UsbHsClientEpSession ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < UsbHsClientEpSession > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( UsbHsClientEpSession ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . eventXfer as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( eventXfer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . ptrbufsize as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( ptrbufsize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < UsbHsClientEpSession > ( ) ) ) . desc as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( UsbHsClientEpSession ) , "::" , stringify ! ( desc ) ) ) ; } extern "C" { /// Initialize/exit usb:hs. - pub fn usbHsInitialize ( ) -> Result ; } extern "C" { pub fn usbHsExit ( ) ; } extern "C" { + pub fn usbHsInitialize ( ) -> Result ; } extern "C" { pub fn usbHsExit ( ) ; } extern "C" { pub fn usbHsGetServiceSession ( ) -> * mut Service ; } extern "C" { /// Returns the Event loaded during init with autoclear=false. /// Signaled when a device was removed. /// When signaled, the user should use \ref usbHsQueryAcquiredInterfaces and cleanup state for all interfaces which are not listed in the output interfaces (none of the IDs match \ref usbHsIfGetID output). @@ -2460,7 +3567,11 @@ where /// < SL on Right Joy-Con pub const HidControllerKeys_KEY_SL_RIGHT : HidControllerKeys = 67108864 ; /// < SR on Right Joy-Con - pub const HidControllerKeys_KEY_SR_RIGHT : HidControllerKeys = 134217728 ; pub const HidControllerKeys_KEY_TOUCH : HidControllerKeys = 268435456 ; pub const HidControllerKeys_KEY_JOYCON_RIGHT : HidControllerKeys = 1 ; pub const HidControllerKeys_KEY_JOYCON_DOWN : HidControllerKeys = 2 ; pub const HidControllerKeys_KEY_JOYCON_UP : HidControllerKeys = 4 ; pub const HidControllerKeys_KEY_JOYCON_LEFT : HidControllerKeys = 8 ; + pub const HidControllerKeys_KEY_SR_RIGHT : HidControllerKeys = 134217728 ; + /// < HOME button, only available for use with HiddbgHdlsState::buttons. + pub const HidControllerKeys_KEY_HOME : HidControllerKeys = 262144 ; + /// < Capture button, only available for use with HiddbgHdlsState::buttons. + pub const HidControllerKeys_KEY_CAPTURE : HidControllerKeys = 524288 ; pub const HidControllerKeys_KEY_TOUCH : HidControllerKeys = 268435456 ; pub const HidControllerKeys_KEY_JOYCON_RIGHT : HidControllerKeys = 1 ; pub const HidControllerKeys_KEY_JOYCON_DOWN : HidControllerKeys = 2 ; pub const HidControllerKeys_KEY_JOYCON_UP : HidControllerKeys = 4 ; pub const HidControllerKeys_KEY_JOYCON_LEFT : HidControllerKeys = 8 ; /// < D-Pad Up or Sticks Up pub const HidControllerKeys_KEY_UP : HidControllerKeys = 2236416 ; /// < D-Pad Down or Sticks Down @@ -2497,7 +3608,11 @@ where /// < RGBA Right Body Color pub rightColorBody : u32 , /// < RGBA Right Buttons Color - pub rightColorButtons : u32 , } # [ test ] fn bindgen_test_layout_HidControllerColors ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerColors > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HidControllerColors ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerColors > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HidControllerColors ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . singleSet as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( singleSet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . singleColorBody as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( singleColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . singleColorButtons as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( singleColorButtons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . splitSet as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( splitSet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . leftColorBody as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( leftColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . leftColorButtons as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( leftColorButtons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . rightColorBody as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( rightColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . rightColorButtons as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( rightColorButtons ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerLayoutHeader { pub timestampTicks : u64 , pub numEntries : u64 , pub latestEntry : u64 , pub maxEntryIndex : u64 , } # [ test ] fn bindgen_test_layout_HidControllerLayoutHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerLayoutHeader > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HidControllerLayoutHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerLayoutHeader > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerLayoutHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . timestampTicks as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( timestampTicks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . numEntries as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( numEntries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . latestEntry as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( latestEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . maxEntryIndex as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( maxEntryIndex ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerInputEntry { pub timestamp : u64 , pub timestamp_2 : u64 , pub buttons : u64 , pub joysticks : [ JoystickPosition ; 2usize ] , pub connectionState : u64 , } # [ test ] fn bindgen_test_layout_HidControllerInputEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerInputEntry > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( HidControllerInputEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerInputEntry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerInputEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . timestamp_2 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( timestamp_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . buttons as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( buttons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . joysticks as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( joysticks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . connectionState as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( connectionState ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerLayout { pub header : HidControllerLayoutHeader , pub entries : [ HidControllerInputEntry ; 17usize ] , } # [ test ] fn bindgen_test_layout_HidControllerLayout ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerLayout > ( ) , 848usize , concat ! ( "Size of: " , stringify ! ( HidControllerLayout ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerLayout > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerLayout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayout > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayout ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayout > ( ) ) ) . entries as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayout ) , "::" , stringify ! ( entries ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerSixAxisHeader { pub timestamp : u64 , pub numEntries : u64 , pub latestEntry : u64 , pub maxEntryIndex : u64 , } # [ test ] fn bindgen_test_layout_HidControllerSixAxisHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerSixAxisHeader > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HidControllerSixAxisHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerSixAxisHeader > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerSixAxisHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . numEntries as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( numEntries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . latestEntry as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( latestEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . maxEntryIndex as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( maxEntryIndex ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerSixAxisEntry { pub timestamp : u64 , pub unk_1 : u64 , pub timestamp_2 : u64 , pub values : SixAxisSensorValues , pub unk_3 : u64 , } # [ test ] fn bindgen_test_layout_HidControllerSixAxisEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerSixAxisEntry > ( ) , 104usize , concat ! ( "Size of: " , stringify ! ( HidControllerSixAxisEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerSixAxisEntry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerSixAxisEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . unk_1 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( unk_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . timestamp_2 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( timestamp_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . values as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( values ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . unk_3 as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( unk_3 ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerSixAxisLayout { pub header : HidControllerSixAxisHeader , pub entries : [ HidControllerSixAxisEntry ; 17usize ] , } # [ test ] fn bindgen_test_layout_HidControllerSixAxisLayout ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerSixAxisLayout > ( ) , 1800usize , concat ! ( "Size of: " , stringify ! ( HidControllerSixAxisLayout ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerSixAxisLayout > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerSixAxisLayout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisLayout > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisLayout ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisLayout > ( ) ) ) . entries as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisLayout ) , "::" , stringify ! ( entries ) ) ) ; } # [ repr ( C ) ] pub struct HidController { pub header : HidControllerHeader , pub layouts : [ HidControllerLayout ; 7usize ] , pub sixaxis : [ HidControllerSixAxisLayout ; 6usize ] , pub unk_1 : [ u8 ; 64usize ] , pub macLeft : HidControllerMAC , pub macRight : HidControllerMAC , pub unk_2 : [ u8 ; 3576usize ] , } # [ test ] fn bindgen_test_layout_HidController ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidController > ( ) , 20480usize , concat ! ( "Size of: " , stringify ! ( HidController ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidController > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidController ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . layouts as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( layouts ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . sixaxis as * const _ as usize } , 5976usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( sixaxis ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . unk_1 as * const _ as usize } , 16776usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( unk_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . macLeft as * const _ as usize } , 16840usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( macLeft ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . macRight as * const _ as usize } , 16872usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( macRight ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . unk_2 as * const _ as usize } , 16904usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( unk_2 ) ) ) ; } # [ repr ( C ) ] pub struct HidSharedMemory { pub header : [ u8 ; 1024usize ] , pub touchscreen : HidTouchScreen , pub mouse : HidMouse , pub keyboard : HidKeyboard , pub unkSection1 : [ u8 ; 1024usize ] , pub unkSection2 : [ u8 ; 1024usize ] , pub unkSection3 : [ u8 ; 1024usize ] , pub unkSection4 : [ u8 ; 1024usize ] , pub unkSection5 : [ u8 ; 512usize ] , pub unkSection6 : [ u8 ; 512usize ] , pub unkSection7 : [ u8 ; 512usize ] , pub unkSection8 : [ u8 ; 2048usize ] , pub controllerSerials : [ u8 ; 16384usize ] , pub controllers : [ HidController ; 10usize ] , pub unkSection9 : [ u8 ; 17920usize ] , } # [ test ] fn bindgen_test_layout_HidSharedMemory ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidSharedMemory > ( ) , 262144usize , concat ! ( "Size of: " , stringify ! ( HidSharedMemory ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidSharedMemory > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidSharedMemory ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . touchscreen as * const _ as usize } , 1024usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( touchscreen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . mouse as * const _ as usize } , 13312usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( mouse ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . keyboard as * const _ as usize } , 14336usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( keyboard ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection1 as * const _ as usize } , 15360usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection2 as * const _ as usize } , 16384usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection3 as * const _ as usize } , 17408usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection4 as * const _ as usize } , 18432usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection5 as * const _ as usize } , 19456usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection5 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection6 as * const _ as usize } , 19968usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection6 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection7 as * const _ as usize } , 20480usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection7 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection8 as * const _ as usize } , 20992usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . controllerSerials as * const _ as usize } , 23040usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( controllerSerials ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . controllers as * const _ as usize } , 39424usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( controllers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection9 as * const _ as usize } , 244224usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection9 ) ) ) ; } # [ repr ( C ) ] pub struct HidVibrationDeviceInfo { pub unk_x0 : u32 , + pub rightColorButtons : u32 , } # [ test ] fn bindgen_test_layout_HidControllerColors ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerColors > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HidControllerColors ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerColors > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HidControllerColors ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . singleSet as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( singleSet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . singleColorBody as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( singleColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . singleColorButtons as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( singleColorButtons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . splitSet as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( splitSet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . leftColorBody as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( leftColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . leftColorButtons as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( leftColorButtons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . rightColorBody as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( rightColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerColors > ( ) ) ) . rightColorButtons as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerColors ) , "::" , stringify ! ( rightColorButtons ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerLayoutHeader { pub timestampTicks : u64 , pub numEntries : u64 , pub latestEntry : u64 , pub maxEntryIndex : u64 , } # [ test ] fn bindgen_test_layout_HidControllerLayoutHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerLayoutHeader > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HidControllerLayoutHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerLayoutHeader > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerLayoutHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . timestampTicks as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( timestampTicks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . numEntries as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( numEntries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . latestEntry as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( latestEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayoutHeader > ( ) ) ) . maxEntryIndex as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayoutHeader ) , "::" , stringify ! ( maxEntryIndex ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerInputEntry { pub timestamp : u64 , pub timestamp_2 : u64 , pub buttons : u64 , pub joysticks : [ JoystickPosition ; 2usize ] , pub connectionState : u64 , } # [ test ] fn bindgen_test_layout_HidControllerInputEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerInputEntry > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( HidControllerInputEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerInputEntry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerInputEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . timestamp_2 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( timestamp_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . buttons as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( buttons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . joysticks as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( joysticks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerInputEntry > ( ) ) ) . connectionState as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerInputEntry ) , "::" , stringify ! ( connectionState ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerLayout { pub header : HidControllerLayoutHeader , pub entries : [ HidControllerInputEntry ; 17usize ] , } # [ test ] fn bindgen_test_layout_HidControllerLayout ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerLayout > ( ) , 848usize , concat ! ( "Size of: " , stringify ! ( HidControllerLayout ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerLayout > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerLayout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayout > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayout ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerLayout > ( ) ) ) . entries as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerLayout ) , "::" , stringify ! ( entries ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerSixAxisHeader { pub timestamp : u64 , pub numEntries : u64 , pub latestEntry : u64 , pub maxEntryIndex : u64 , } # [ test ] fn bindgen_test_layout_HidControllerSixAxisHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerSixAxisHeader > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HidControllerSixAxisHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerSixAxisHeader > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerSixAxisHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . numEntries as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( numEntries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . latestEntry as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( latestEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisHeader > ( ) ) ) . maxEntryIndex as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisHeader ) , "::" , stringify ! ( maxEntryIndex ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerSixAxisEntry { pub timestamp : u64 , pub unk_1 : u64 , pub timestamp_2 : u64 , pub values : SixAxisSensorValues , pub unk_3 : u64 , } # [ test ] fn bindgen_test_layout_HidControllerSixAxisEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerSixAxisEntry > ( ) , 104usize , concat ! ( "Size of: " , stringify ! ( HidControllerSixAxisEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerSixAxisEntry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerSixAxisEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( timestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . unk_1 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( unk_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . timestamp_2 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( timestamp_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . values as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( values ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisEntry > ( ) ) ) . unk_3 as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisEntry ) , "::" , stringify ! ( unk_3 ) ) ) ; } # [ repr ( C ) ] pub struct HidControllerSixAxisLayout { pub header : HidControllerSixAxisHeader , pub entries : [ HidControllerSixAxisEntry ; 17usize ] , } # [ test ] fn bindgen_test_layout_HidControllerSixAxisLayout ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerSixAxisLayout > ( ) , 1800usize , concat ! ( "Size of: " , stringify ! ( HidControllerSixAxisLayout ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerSixAxisLayout > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerSixAxisLayout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisLayout > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisLayout ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerSixAxisLayout > ( ) ) ) . entries as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerSixAxisLayout ) , "::" , stringify ! ( entries ) ) ) ; } + /// Controller flags. + # [ repr ( C ) ] pub struct HidFlags { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > , pub unused : u32 , pub _bitfield_2 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub __bindgen_padding_0 : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_HidFlags ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidFlags > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( HidFlags ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidFlags > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HidFlags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidFlags > ( ) ) ) . unused as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidFlags ) , "::" , stringify ! ( unused ) ) ) ; } impl HidFlags { # [ inline ] pub fn powerInfo ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 6u8 ) as u32 ) } } # [ inline ] pub fn set_powerInfo ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 6u8 , val as u64 ) } } # [ inline ] pub fn bit6 ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 6usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_bit6 ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 6usize , 1u8 , val as u64 ) } } # [ inline ] pub fn bit7 ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 7usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_bit7 ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 7usize , 1u8 , val as u64 ) } } # [ inline ] pub fn bit8 ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 8usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_bit8 ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 8usize , 1u8 , val as u64 ) } } # [ inline ] pub fn unsupportedButtonPressed_NpadSystem ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 9usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_unsupportedButtonPressed_NpadSystem ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 9usize , 1u8 , val as u64 ) } } # [ inline ] pub fn unsupportedButtonPressed_NpadSystemExt ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 10usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_unsupportedButtonPressed_NpadSystemExt ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 10usize , 1u8 , val as u64 ) } } # [ inline ] pub fn abxyButtonOriented ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 11usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_abxyButtonOriented ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 11usize , 1u8 , val as u64 ) } } # [ inline ] pub fn slSrButtonOriented ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 12usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_slSrButtonOriented ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 12usize , 1u8 , val as u64 ) } } # [ inline ] pub fn plusButtonCapability ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 13usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_plusButtonCapability ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 13usize , 1u8 , val as u64 ) } } # [ inline ] pub fn minusButtonCapability ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 14usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_minusButtonCapability ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 14usize , 1u8 , val as u64 ) } } # [ inline ] pub fn directionalButtonsSupported ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 15usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_directionalButtonsSupported ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 15usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( powerInfo : u32 , bit6 : u32 , bit7 : u32 , bit8 : u32 , unsupportedButtonPressed_NpadSystem : u32 , unsupportedButtonPressed_NpadSystemExt : u32 , abxyButtonOriented : u32 , slSrButtonOriented : u32 , plusButtonCapability : u32 , minusButtonCapability : u32 , directionalButtonsSupported : u32 ) -> __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 6u8 , { let powerInfo : u32 = unsafe { :: core :: mem :: transmute ( powerInfo ) } ; powerInfo as u64 } ) ; __bindgen_bitfield_unit . set ( 6usize , 1u8 , { let bit6 : u32 = unsafe { :: core :: mem :: transmute ( bit6 ) } ; bit6 as u64 } ) ; __bindgen_bitfield_unit . set ( 7usize , 1u8 , { let bit7 : u32 = unsafe { :: core :: mem :: transmute ( bit7 ) } ; bit7 as u64 } ) ; __bindgen_bitfield_unit . set ( 8usize , 1u8 , { let bit8 : u32 = unsafe { :: core :: mem :: transmute ( bit8 ) } ; bit8 as u64 } ) ; __bindgen_bitfield_unit . set ( 9usize , 1u8 , { let unsupportedButtonPressed_NpadSystem : u32 = unsafe { :: core :: mem :: transmute ( unsupportedButtonPressed_NpadSystem ) } ; unsupportedButtonPressed_NpadSystem as u64 } ) ; __bindgen_bitfield_unit . set ( 10usize , 1u8 , { let unsupportedButtonPressed_NpadSystemExt : u32 = unsafe { :: core :: mem :: transmute ( unsupportedButtonPressed_NpadSystemExt ) } ; unsupportedButtonPressed_NpadSystemExt as u64 } ) ; __bindgen_bitfield_unit . set ( 11usize , 1u8 , { let abxyButtonOriented : u32 = unsafe { :: core :: mem :: transmute ( abxyButtonOriented ) } ; abxyButtonOriented as u64 } ) ; __bindgen_bitfield_unit . set ( 12usize , 1u8 , { let slSrButtonOriented : u32 = unsafe { :: core :: mem :: transmute ( slSrButtonOriented ) } ; slSrButtonOriented as u64 } ) ; __bindgen_bitfield_unit . set ( 13usize , 1u8 , { let plusButtonCapability : u32 = unsafe { :: core :: mem :: transmute ( plusButtonCapability ) } ; plusButtonCapability as u64 } ) ; __bindgen_bitfield_unit . set ( 14usize , 1u8 , { let minusButtonCapability : u32 = unsafe { :: core :: mem :: transmute ( minusButtonCapability ) } ; minusButtonCapability as u64 } ) ; __bindgen_bitfield_unit . set ( 15usize , 1u8 , { let directionalButtonsSupported : u32 = unsafe { :: core :: mem :: transmute ( directionalButtonsSupported ) } ; directionalButtonsSupported as u64 } ) ; __bindgen_bitfield_unit } # [ inline ] pub fn unintendedHomeButtonInputProtectionDisabled ( & self ) -> u32 { unsafe { :: core :: mem :: transmute ( self . _bitfield_2 . get ( 0usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_unintendedHomeButtonInputProtectionDisabled ( & mut self , val : u32 ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_2 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_2 ( unintendedHomeButtonInputProtectionDisabled : u32 ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let unintendedHomeButtonInputProtectionDisabled : u32 = unsafe { :: core :: mem :: transmute ( unintendedHomeButtonInputProtectionDisabled ) } ; unintendedHomeButtonInputProtectionDisabled as u64 } ) ; __bindgen_bitfield_unit } } # [ repr ( C ) ] pub struct HidControllerMisc { pub deviceType : u32 , pub pad : u32 , pub flags : HidFlags , pub batteryCharge : [ u32 ; 3usize ] , pub unk_1 : [ u8 ; 32usize ] , pub macLeft : HidControllerMAC , pub macRight : HidControllerMAC , } # [ test ] fn bindgen_test_layout_HidControllerMisc ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidControllerMisc > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( HidControllerMisc ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidControllerMisc > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidControllerMisc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . deviceType as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( deviceType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . pad as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . flags as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . batteryCharge as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( batteryCharge ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . unk_1 as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( unk_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . macLeft as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( macLeft ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidControllerMisc > ( ) ) ) . macRight as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( HidControllerMisc ) , "::" , stringify ! ( macRight ) ) ) ; } # [ repr ( C ) ] pub struct HidPowerInfo { pub powerConnected : bool , pub isCharging : bool , + /// < Battery charge, always 0-4. + pub batteryCharge : u32 , } # [ test ] fn bindgen_test_layout_HidPowerInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidPowerInfo > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( HidPowerInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidPowerInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HidPowerInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidPowerInfo > ( ) ) ) . powerConnected as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidPowerInfo ) , "::" , stringify ! ( powerConnected ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidPowerInfo > ( ) ) ) . isCharging as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( HidPowerInfo ) , "::" , stringify ! ( isCharging ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidPowerInfo > ( ) ) ) . batteryCharge as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidPowerInfo ) , "::" , stringify ! ( batteryCharge ) ) ) ; } # [ repr ( C ) ] pub struct HidController { pub header : HidControllerHeader , pub layouts : [ HidControllerLayout ; 7usize ] , pub sixaxis : [ HidControllerSixAxisLayout ; 6usize ] , pub misc : HidControllerMisc , pub unk_2 : [ u8 ; 3576usize ] , } # [ test ] fn bindgen_test_layout_HidController ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidController > ( ) , 20480usize , concat ! ( "Size of: " , stringify ! ( HidController ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidController > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidController ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . layouts as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( layouts ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . sixaxis as * const _ as usize } , 5976usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( sixaxis ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . misc as * const _ as usize } , 16776usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( misc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidController > ( ) ) ) . unk_2 as * const _ as usize } , 16904usize , concat ! ( "Offset of field: " , stringify ! ( HidController ) , "::" , stringify ! ( unk_2 ) ) ) ; } # [ repr ( C ) ] pub struct HidSharedMemory { pub header : [ u8 ; 1024usize ] , pub touchscreen : HidTouchScreen , pub mouse : HidMouse , pub keyboard : HidKeyboard , pub unkSection1 : [ u8 ; 1024usize ] , pub unkSection2 : [ u8 ; 1024usize ] , pub unkSection3 : [ u8 ; 1024usize ] , pub unkSection4 : [ u8 ; 1024usize ] , pub unkSection5 : [ u8 ; 512usize ] , pub unkSection6 : [ u8 ; 512usize ] , pub unkSection7 : [ u8 ; 512usize ] , pub unkSection8 : [ u8 ; 2048usize ] , pub controllerSerials : [ u8 ; 16384usize ] , pub controllers : [ HidController ; 10usize ] , pub unkSection9 : [ u8 ; 17920usize ] , } # [ test ] fn bindgen_test_layout_HidSharedMemory ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidSharedMemory > ( ) , 262144usize , concat ! ( "Size of: " , stringify ! ( HidSharedMemory ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidSharedMemory > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HidSharedMemory ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . touchscreen as * const _ as usize } , 1024usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( touchscreen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . mouse as * const _ as usize } , 13312usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( mouse ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . keyboard as * const _ as usize } , 14336usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( keyboard ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection1 as * const _ as usize } , 15360usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection2 as * const _ as usize } , 16384usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection3 as * const _ as usize } , 17408usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection4 as * const _ as usize } , 18432usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection5 as * const _ as usize } , 19456usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection5 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection6 as * const _ as usize } , 19968usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection6 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection7 as * const _ as usize } , 20480usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection7 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection8 as * const _ as usize } , 20992usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . controllerSerials as * const _ as usize } , 23040usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( controllerSerials ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . controllers as * const _ as usize } , 39424usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( controllers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidSharedMemory > ( ) ) ) . unkSection9 as * const _ as usize } , 244224usize , concat ! ( "Offset of field: " , stringify ! ( HidSharedMemory ) , "::" , stringify ! ( unkSection9 ) ) ) ; } # [ repr ( C ) ] pub struct HidVibrationDeviceInfo { pub unk_x0 : u32 , /// < 0x1 for left-joycon, 0x2 for right-joycon. pub unk_x4 : u32 , } # [ test ] fn bindgen_test_layout_HidVibrationDeviceInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidVibrationDeviceInfo > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( HidVibrationDeviceInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidVibrationDeviceInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HidVibrationDeviceInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidVibrationDeviceInfo > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidVibrationDeviceInfo ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidVibrationDeviceInfo > ( ) ) ) . unk_x4 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidVibrationDeviceInfo ) , "::" , stringify ! ( unk_x4 ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct HidVibrationValue { /// < Low Band amplitude. 1.0f: Max amplitude. @@ -2509,17 +3624,25 @@ where /// < High Band frequency in Hz. pub freq_high : f32 , } # [ test ] fn bindgen_test_layout_HidVibrationValue ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidVibrationValue > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( HidVibrationValue ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidVibrationValue > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HidVibrationValue ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidVibrationValue > ( ) ) ) . amp_low as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidVibrationValue ) , "::" , stringify ! ( amp_low ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidVibrationValue > ( ) ) ) . freq_low as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidVibrationValue ) , "::" , stringify ! ( freq_low ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidVibrationValue > ( ) ) ) . amp_high as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HidVibrationValue ) , "::" , stringify ! ( amp_high ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidVibrationValue > ( ) ) ) . freq_high as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HidVibrationValue ) , "::" , stringify ! ( freq_high ) ) ) ; } extern "C" { /// Initializes hid, called automatically during app startup. - pub fn hidInitialize ( ) -> Result ; } extern "C" { pub fn hidExit ( ) ; } extern "C" { pub fn hidReset ( ) ; } extern "C" { pub fn hidGetSessionService ( ) -> * mut Service ; } extern "C" { pub fn hidGetSharedmemAddr ( ) -> * mut ctypes :: c_void ; } extern "C" { pub fn hidSetControllerLayout ( id : HidControllerID , layoutType : HidControllerLayoutType ) ; } extern "C" { pub fn hidGetControllerLayout ( id : HidControllerID ) -> HidControllerLayoutType ; } extern "C" { + pub fn hidInitialize ( ) -> Result ; } extern "C" { pub fn hidExit ( ) ; } extern "C" { pub fn hidReset ( ) ; } extern "C" { pub fn hidGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn hidGetSharedmemAddr ( ) -> * mut ctypes :: c_void ; } extern "C" { pub fn hidSetControllerLayout ( id : HidControllerID , layoutType : HidControllerLayoutType ) ; } extern "C" { pub fn hidGetControllerLayout ( id : HidControllerID ) -> HidControllerLayoutType ; } extern "C" { /// Gets the \ref HidControllerType for the specified controller. - pub fn hidGetControllerType ( id : HidControllerID ) -> HidControllerType ; } extern "C" { pub fn hidGetControllerColors ( id : HidControllerID , colors : * mut HidControllerColors ) ; } extern "C" { pub fn hidIsControllerConnected ( id : HidControllerID ) -> bool ; } extern "C" { pub fn hidScanInput ( ) ; } extern "C" { pub fn hidKeysHeld ( id : HidControllerID ) -> u64 ; } extern "C" { pub fn hidKeysDown ( id : HidControllerID ) -> u64 ; } extern "C" { pub fn hidKeysUp ( id : HidControllerID ) -> u64 ; } extern "C" { pub fn hidMouseButtonsHeld ( ) -> u64 ; } extern "C" { pub fn hidMouseButtonsDown ( ) -> u64 ; } extern "C" { pub fn hidMouseButtonsUp ( ) -> u64 ; } extern "C" { pub fn hidMouseRead ( pos : * mut MousePosition ) ; } extern "C" { pub fn hidMouseMultiRead ( entries : * mut MousePosition , num_entries : u32 ) -> u32 ; } extern "C" { pub fn hidKeyboardModifierHeld ( modifier : HidKeyboardModifier ) -> bool ; } extern "C" { pub fn hidKeyboardModifierDown ( modifier : HidKeyboardModifier ) -> bool ; } extern "C" { pub fn hidKeyboardModifierUp ( modifier : HidKeyboardModifier ) -> bool ; } extern "C" { pub fn hidKeyboardHeld ( key : HidKeyboardScancode ) -> bool ; } extern "C" { pub fn hidKeyboardDown ( key : HidKeyboardScancode ) -> bool ; } extern "C" { pub fn hidKeyboardUp ( key : HidKeyboardScancode ) -> bool ; } extern "C" { pub fn hidTouchCount ( ) -> u32 ; } extern "C" { pub fn hidTouchRead ( pos : * mut touchPosition , point_id : u32 ) ; } extern "C" { pub fn hidJoystickRead ( pos : * mut JoystickPosition , id : HidControllerID , stick : HidControllerJoystick ) ; } extern "C" { pub fn hidSixAxisSensorValuesRead ( values : * mut SixAxisSensorValues , id : HidControllerID , num_entries : u32 ) -> u32 ; } extern "C" { + pub fn hidGetControllerType ( id : HidControllerID ) -> HidControllerType ; } extern "C" { pub fn hidGetControllerColors ( id : HidControllerID , colors : * mut HidControllerColors ) ; } extern "C" { pub fn hidIsControllerConnected ( id : HidControllerID ) -> bool ; } extern "C" { + /// Gets the DeviceType for the specified controller. + pub fn hidGetControllerDeviceType ( id : HidControllerID ) -> u32 ; } extern "C" { + /// Gets the flags for the specified controller. + pub fn hidGetControllerFlags ( id : HidControllerID , flags : * mut HidFlags ) ; } extern "C" { + /// Gets the \ref HidPowerInfo for the specified controller. info is the output array, where total_info is the number of entries. total_info must be 1 or 2: former for the main battery info, latter for reading left/right Joy-Con PowerInfo. + pub fn hidGetControllerPowerInfo ( id : HidControllerID , info : * mut HidPowerInfo , total_info : usize ) ; } extern "C" { pub fn hidScanInput ( ) ; } extern "C" { pub fn hidKeysHeld ( id : HidControllerID ) -> u64 ; } extern "C" { pub fn hidKeysDown ( id : HidControllerID ) -> u64 ; } extern "C" { pub fn hidKeysUp ( id : HidControllerID ) -> u64 ; } extern "C" { pub fn hidMouseButtonsHeld ( ) -> u64 ; } extern "C" { pub fn hidMouseButtonsDown ( ) -> u64 ; } extern "C" { pub fn hidMouseButtonsUp ( ) -> u64 ; } extern "C" { pub fn hidMouseRead ( pos : * mut MousePosition ) ; } extern "C" { pub fn hidMouseMultiRead ( entries : * mut MousePosition , num_entries : u32 ) -> u32 ; } extern "C" { pub fn hidKeyboardModifierHeld ( modifier : HidKeyboardModifier ) -> bool ; } extern "C" { pub fn hidKeyboardModifierDown ( modifier : HidKeyboardModifier ) -> bool ; } extern "C" { pub fn hidKeyboardModifierUp ( modifier : HidKeyboardModifier ) -> bool ; } extern "C" { pub fn hidKeyboardHeld ( key : HidKeyboardScancode ) -> bool ; } extern "C" { pub fn hidKeyboardDown ( key : HidKeyboardScancode ) -> bool ; } extern "C" { pub fn hidKeyboardUp ( key : HidKeyboardScancode ) -> bool ; } extern "C" { pub fn hidTouchCount ( ) -> u32 ; } extern "C" { pub fn hidTouchRead ( pos : * mut touchPosition , point_id : u32 ) ; } extern "C" { pub fn hidJoystickRead ( pos : * mut JoystickPosition , id : HidControllerID , stick : HidControllerJoystick ) ; } extern "C" { pub fn hidSixAxisSensorValuesRead ( values : * mut SixAxisSensorValues , id : HidControllerID , num_entries : u32 ) -> u32 ; } extern "C" { /// This can be used to check what CONTROLLER_P1_AUTO uses. /// Returns 0 when CONTROLLER_PLAYER_1 is connected, otherwise returns 1 for handheld-mode. pub fn hidGetHandheldMode ( ) -> bool ; } extern "C" { + /// Sets which controller types are supported. This is automatically called with all types in \ref hidInitialize. + pub fn hidSetSupportedNpadStyleSet ( type_ : HidControllerType ) -> Result ; } extern "C" { + /// Gets which controller types are supported. + pub fn hidGetSupportedNpadStyleSet ( type_ : * mut HidControllerType ) -> Result ; } extern "C" { /// This is automatically called with CONTROLLER_PLAYER_{1-8} and CONTROLLER_HANDHELD in \ref hidInitialize. /// count must be <=10. Each entry in buf must be CONTROLLER_PLAYER_{1-8} or CONTROLLER_HANDHELD. pub fn hidSetSupportedNpadIdType ( buf : * mut HidControllerID , count : usize ) -> Result ; } extern "C" { - /// Sets which controller types are supported. This is automatically called with all types in \ref hidInitialize. - pub fn hidSetSupportedNpadStyleSet ( type_ : HidControllerType ) -> Result ; } extern "C" { /// Gets an event with the specified autoclear for the input controller. /// The user *must* close the event when finished with it / before the app exits. /// This is signaled when the \ref hidGetControllerType output is updated for the controller. @@ -2556,7 +3679,148 @@ where /// Starts the SixAxisSensor for the specified handle. pub fn hidStartSixAxisSensor ( SixAxisSensorHandle : u32 ) -> Result ; } extern "C" { /// Stops the SixAxisSensor for the specified handle. - pub fn hidStopSixAxisSensor ( SixAxisSensorHandle : u32 ) -> Result ; } + pub fn hidStopSixAxisSensor ( SixAxisSensorHandle : u32 ) -> Result ; } extern "C" { + /// Starts the SevenSixAxisSensor. Only available on [5.0.0+]. + pub fn hidStartSevenSixAxisSensor ( ) -> Result ; } extern "C" { + /// Stops the SevenSixAxisSensor. Only available on [5.0.0+]. + pub fn hidStopSevenSixAxisSensor ( ) -> Result ; } extern "C" { + /// Initializes the SevenSixAxisSensor. Only available on [5.0.0+]. + pub fn hidInitializeSevenSixAxisSensor ( ) -> Result ; } extern "C" { + /// Finalizes the SevenSixAxisSensor. Also used automatically by \ref hidExit. Only available on [5.0.0+]. + pub fn hidFinalizeSevenSixAxisSensor ( ) -> Result ; } extern "C" { + /// Sets the SevenSixAxisSensor FusionStrength. Only available on [5.0.0+]. + pub fn hidSetSevenSixAxisSensorFusionStrength ( strength : f32 ) -> Result ; } extern "C" { + /// Gets the SevenSixAxisSensor FusionStrength. Only available on [5.0.0+]. + pub fn hidGetSevenSixAxisSensorFusionStrength ( strength : * mut f32 ) -> Result ; } extern "C" { + /// Resets the timestamp for the SevenSixAxisSensor. Only available on [6.0.0+]. + pub fn hidResetSevenSixAxisSensorTimestamp ( ) -> Result ; } + /// HdlsDeviceInfo + # [ repr ( C ) ] pub struct HiddbgHdlsDeviceInfo { + /// < Only one bit can be set. BIT(N*4+0) = Pro-Controller, BIT(N*4+1) = Joy-Con Left, BIT(N*4+2) = Joy-Con Right, BIT(N*4+3) = invalid. Where N is 0-1. BIT(8-10) = Pro-Controller, BIT(11) = Famicom-Controller, BIT(12) = Famicom-Controller II with microphone, BIT(13) = NES-Controller(DeviceType=0x200), BIT(14) = NES-Controller(DeviceType=0x400), BIT(15-16) = invalid, BIT(17) = unknown(DeviceType=0x8000), BIT(18-20) = invalid, BIT(21-23) = unknown(DeviceType=0x80000000). + pub type_ : u32 , + /// < RGBA Single Body Color + pub singleColorBody : u32 , + /// < RGBA Single Buttons Color + pub singleColorButtons : u32 , + /// < Additional type field used with the above type field (only applies to type bit0-bit2 and bit21), if the value doesn't match one of the following a default is used. Type Pro-Controller: value 0x3 indicates that the controller is connected via USB. Type BIT(21): value 0x3 = unknown. When value is 0x2, state is merged with an existing controller (when the type value is compatible with this). Otherwise, it's a dedicated controller. + pub type2 : u8 , + /// < Padding + pub pad : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_HiddbgHdlsDeviceInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgHdlsDeviceInfo > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( HiddbgHdlsDeviceInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgHdlsDeviceInfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HiddbgHdlsDeviceInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsDeviceInfo > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsDeviceInfo ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsDeviceInfo > ( ) ) ) . singleColorBody as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsDeviceInfo ) , "::" , stringify ! ( singleColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsDeviceInfo > ( ) ) ) . singleColorButtons as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsDeviceInfo ) , "::" , stringify ! ( singleColorButtons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsDeviceInfo > ( ) ) ) . type2 as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsDeviceInfo ) , "::" , stringify ! ( type2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsDeviceInfo > ( ) ) ) . pad as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsDeviceInfo ) , "::" , stringify ! ( pad ) ) ) ; } + /// HdlsState + # [ repr ( C ) ] pub struct HiddbgHdlsState { + /// < powerConnected for the main PowerInfo, see \ref HidFlags. + pub powerConnected : u8 , + /// < ORRed with powerConnected to set the value of the first byte for \ref HidFlags. For example, value 1 here will set isCharging for the main PowerInfo. + pub flags : u8 , + /// < Unknown + pub unk_x2 : [ u8 ; 6usize ] , + /// < batteryCharge for the main PowerInfo, see \ref HidPowerInfo. + pub batteryCharge : u32 , + /// < See \ref HidControllerKeys. + pub buttons : u32 , + /// < \ref JoystickPosition + pub joysticks : [ JoystickPosition ; 2usize ] , + /// < Unused for input. Set with output from \ref hiddbgDumpHdlsStates. Not set by \ref hiddbgGetAbstractedPadsState. + pub unk_x20 : u8 , + /// < Padding + pub padding : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_HiddbgHdlsState ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgHdlsState > ( ) , 36usize , concat ! ( "Size of: " , stringify ! ( HiddbgHdlsState ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgHdlsState > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HiddbgHdlsState ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . powerConnected as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( powerConnected ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . flags as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . unk_x2 as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( unk_x2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . batteryCharge as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( batteryCharge ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . buttons as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( buttons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . joysticks as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( joysticks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . unk_x20 as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( unk_x20 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsState > ( ) ) ) . padding as * const _ as usize } , 33usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsState ) , "::" , stringify ! ( padding ) ) ) ; } + /// HdlsNpadAssignmentEntry + # [ repr ( C ) ] pub struct HiddbgHdlsNpadAssignmentEntry { + /// < HdlsHandle + pub HdlsHandle : u64 , + /// < Unknown + pub unk_x8 : u32 , + /// < Unknown + pub unk_xc : u32 , + /// < Unknown + pub unk_x10 : u64 , + /// < Unknown + pub unk_x18 : u8 , + /// < Padding + pub pad : [ u8 ; 7usize ] , } # [ test ] fn bindgen_test_layout_HiddbgHdlsNpadAssignmentEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgHdlsNpadAssignmentEntry > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgHdlsNpadAssignmentEntry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignmentEntry > ( ) ) ) . HdlsHandle as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) , "::" , stringify ! ( HdlsHandle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignmentEntry > ( ) ) ) . unk_x8 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) , "::" , stringify ! ( unk_x8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignmentEntry > ( ) ) ) . unk_xc as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) , "::" , stringify ! ( unk_xc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignmentEntry > ( ) ) ) . unk_x10 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) , "::" , stringify ! ( unk_x10 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignmentEntry > ( ) ) ) . unk_x18 as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) , "::" , stringify ! ( unk_x18 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignmentEntry > ( ) ) ) . pad as * const _ as usize } , 25usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignmentEntry ) , "::" , stringify ! ( pad ) ) ) ; } + /// HdlsNpadAssignment. Same controllers as \ref HiddbgHdlsStateList, with different entry data. + # [ repr ( C ) ] pub struct HiddbgHdlsNpadAssignment { + /// < Total entries for the below entries. + pub total_entries : s32 , + /// < Padding + pub pad : u32 , + /// < \ref HiddbgHdlsNpadAssignmentEntry + pub entries : [ HiddbgHdlsNpadAssignmentEntry ; 16usize ] , } # [ test ] fn bindgen_test_layout_HiddbgHdlsNpadAssignment ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgHdlsNpadAssignment > ( ) , 520usize , concat ! ( "Size of: " , stringify ! ( HiddbgHdlsNpadAssignment ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgHdlsNpadAssignment > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HiddbgHdlsNpadAssignment ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignment > ( ) ) ) . total_entries as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignment ) , "::" , stringify ! ( total_entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignment > ( ) ) ) . pad as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignment ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsNpadAssignment > ( ) ) ) . entries as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsNpadAssignment ) , "::" , stringify ! ( entries ) ) ) ; } + /// HdlsStateListEntry + # [ repr ( C ) ] pub struct HiddbgHdlsStateListEntry { + /// < HdlsHandle + pub HdlsHandle : u64 , + /// < \ref HiddbgHdlsDeviceInfo. With \ref hiddbgApplyHdlsStateList this is only used when creating new devices. + pub device : HiddbgHdlsDeviceInfo , + /// < \ref HiddbgHdlsState + pub state : HiddbgHdlsState , } # [ test ] fn bindgen_test_layout_HiddbgHdlsStateListEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgHdlsStateListEntry > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( HiddbgHdlsStateListEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgHdlsStateListEntry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HiddbgHdlsStateListEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsStateListEntry > ( ) ) ) . HdlsHandle as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsStateListEntry ) , "::" , stringify ! ( HdlsHandle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsStateListEntry > ( ) ) ) . device as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsStateListEntry ) , "::" , stringify ! ( device ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsStateListEntry > ( ) ) ) . state as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsStateListEntry ) , "::" , stringify ! ( state ) ) ) ; } + /// HdlsStateList. This contains a list of all controllers, including non-virtual controllers. + # [ repr ( C ) ] pub struct HiddbgHdlsStateList { + /// < Total entries for the below entries. + pub total_entries : s32 , + /// < Padding + pub pad : u32 , + /// < \ref HiddbgHdlsStateListEntry + pub entries : [ HiddbgHdlsStateListEntry ; 16usize ] , } # [ test ] fn bindgen_test_layout_HiddbgHdlsStateList ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgHdlsStateList > ( ) , 1032usize , concat ! ( "Size of: " , stringify ! ( HiddbgHdlsStateList ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgHdlsStateList > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( HiddbgHdlsStateList ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsStateList > ( ) ) ) . total_entries as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsStateList ) , "::" , stringify ! ( total_entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsStateList > ( ) ) ) . pad as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsStateList ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgHdlsStateList > ( ) ) ) . entries as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgHdlsStateList ) , "::" , stringify ! ( entries ) ) ) ; } + /// AbstractedPadState + # [ repr ( C ) ] pub struct HiddbgAbstractedPadState { + /// < Type. Converted to HiddbgHdlsDeviceInfo::type internally by \ref hiddbgSetAutoPilotVirtualPadState. BIT(0) -> BIT(0), BIT(1) -> BIT(15), BIT(2-3) -> BIT(1-2), BIT(4-5) -> BIT(1-2), BIT(6) -> BIT(3). BIT(7-11) -> BIT(11-15), BIT(12-14) -> BIT(12-14), BIT(15) -> BIT(17), BIT(31) -> BIT(21). + pub type_ : u32 , + /// < Flags. Only bit0 is used by \ref hiddbgSetAutoPilotVirtualPadState: when clear it will skip using the rest of the input and run \ref hiddbgUnsetAutoPilotVirtualPadState internally. + pub flags : u8 , + /// < Padding + pub pad : [ u8 ; 3usize ] , + /// < RGBA Single Body Color + pub singleColorBody : u32 , + /// < RGBA Single Buttons Color + pub singleColorButtons : u32 , + /// < See HiddbgHdlsDeviceInfo::type2. + pub type2 : u8 , + /// < Padding + pub pad2 : [ u8 ; 3usize ] , + /// < State + pub state : HiddbgHdlsState , + /// < Unused with \ref hiddbgSetAutoPilotVirtualPadState. Not set by \ref hiddbgGetAbstractedPadsState. + pub unused : [ u8 ; 96usize ] , } # [ test ] fn bindgen_test_layout_HiddbgAbstractedPadState ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HiddbgAbstractedPadState > ( ) , 152usize , concat ! ( "Size of: " , stringify ! ( HiddbgAbstractedPadState ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HiddbgAbstractedPadState > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( HiddbgAbstractedPadState ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . flags as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . pad as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . singleColorBody as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( singleColorBody ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . singleColorButtons as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( singleColorButtons ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . type2 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( type2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . pad2 as * const _ as usize } , 17usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( pad2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . state as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HiddbgAbstractedPadState > ( ) ) ) . unused as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( HiddbgAbstractedPadState ) , "::" , stringify ! ( unused ) ) ) ; } extern "C" { pub fn hiddbgInitialize ( ) -> Result ; } extern "C" { pub fn hiddbgExit ( ) ; } extern "C" { pub fn hiddbgGetServiceSession ( ) -> * mut Service ; } extern "C" { + /// Writes the input RGB colors to the spi-flash for the specified controller (offset 0x6050 size 0x6). See hidsys.h for UniquePadId. Only available with [3.0.0+]. + pub fn hiddbgUpdateControllerColor ( colorBody : u32 , colorButtons : u32 , UniquePadId : u64 ) -> Result ; } extern "C" { + /// Writes the input RGB colors followed by inval to the spi-flash for the specified controller (offset 0x6050 size 0xD). See hidsys.h for UniquePadId. Only available with [5.0.0+]. + pub fn hiddbgUpdateDesignInfo ( colorBody : u32 , colorButtons : u32 , colorLeftGrip : u32 , colorRightGrip : u32 , inval : u8 , UniquePadId : u64 ) -> Result ; } extern "C" { + /// Reads spi-flash for the specified controller. See hidsys.h for UniquePadId. +/// This doesn't seem to be usable? + pub fn hiddbgReadSerialFlash ( offset : u32 , buffer : * mut ctypes :: c_void , size : usize , UniquePadId : u64 ) -> Result ; } extern "C" { + /// Gets a list of AbstractedPadHandles, where AbstractedPadHandles is the output array with max entries = count. total_entries is total entries written to the output array. Only available with [5.0.0+]. + pub fn hiddbgGetAbstractedPadHandles ( AbstractedPadHandles : * mut u64 , count : s32 , total_entries : * mut s32 ) -> Result ; } extern "C" { + /// Gets the state for the specified AbstractedPadHandle. Only available with [5.0.0+]. + pub fn hiddbgGetAbstractedPadState ( AbstractedPadHandle : u64 , state : * mut HiddbgAbstractedPadState ) -> Result ; } extern "C" { + /// Similar to \ref hiddbgGetAbstractedPadHandles except this also returns the state for each pad in output array states. Only available with [5.0.0+]. + pub fn hiddbgGetAbstractedPadsState ( AbstractedPadHandles : * mut u64 , states : * mut HiddbgAbstractedPadState , count : s32 , total_entries : * mut s32 ) -> Result ; } extern "C" { + /// Sets AutoPilot state for the specified pad. +/// AbstractedVirtualPadId can be any unique value as long as it's within bounds. For example, 0-7 is usable. + pub fn hiddbgSetAutoPilotVirtualPadState ( AbstractedVirtualPadId : s8 , state : * const HiddbgAbstractedPadState ) -> Result ; } extern "C" { + /// Clears AutoPilot state for the specified pad set by \ref hiddbgSetAutoPilotVirtualPadState. + pub fn hiddbgUnsetAutoPilotVirtualPadState ( AbstractedVirtualPadId : s8 ) -> Result ; } extern "C" { + /// Clears AutoPilot state for all pads set by \ref hiddbgSetAutoPilotVirtualPadState. + pub fn hiddbgUnsetAllAutoPilotVirtualPadState ( ) -> Result ; } extern "C" { + /// Initialize Hdls. Hdls is for virtual HID controllers. Only available with [7.0.0+]. + pub fn hiddbgAttachHdlsWorkBuffer ( ) -> Result ; } extern "C" { + /// Exit Hdls, must be called at some point prior to hiddbgExit. Only available with [7.0.0+]. + pub fn hiddbgReleaseHdlsWorkBuffer ( ) -> Result ; } extern "C" { + /// Gets state for \ref HiddbgHdlsNpadAssignment. Only available with [7.0.0+]. + pub fn hiddbgDumpHdlsNpadAssignmentState ( state : * mut HiddbgHdlsNpadAssignment ) -> Result ; } extern "C" { + /// Gets state for \ref HiddbgHdlsStateList. Only available with [7.0.0+]. + pub fn hiddbgDumpHdlsStates ( state : * mut HiddbgHdlsStateList ) -> Result ; } extern "C" { + /// Sets state for \ref HiddbgHdlsNpadAssignment. Only available with [7.0.0+]. + pub fn hiddbgApplyHdlsNpadAssignmentState ( state : * const HiddbgHdlsNpadAssignment , flag : bool ) -> Result ; } extern "C" { + /// Sets state for \ref HiddbgHdlsStateList. Only available with [7.0.0+]. +/// The HiddbgHdlsState will be applied for each HdlsHandle. If a HdlsHandle is not found, code similar to \ref hiddbgAttachHdlsVirtualDevice will run with the \ref HiddbgHdlsDeviceInfo, then it will continue with applying state with the new device. + pub fn hiddbgApplyHdlsStateList ( state : * const HiddbgHdlsStateList ) -> Result ; } extern "C" { + /// Attach a device with the input info, where the output handle is written to HdlsHandle. Only available with [7.0.0+]. + pub fn hiddbgAttachHdlsVirtualDevice ( HdlsHandle : * mut u64 , info : * const HiddbgHdlsDeviceInfo ) -> Result ; } extern "C" { + /// Detach the specified device. Only available with [7.0.0+]. + pub fn hiddbgDetachHdlsVirtualDevice ( HdlsHandle : u64 ) -> Result ; } extern "C" { + /// Sets state for the specified device. Only available with [7.0.0+]. + pub fn hiddbgSetHdlsState ( HdlsHandle : u64 , state : * const HiddbgHdlsState ) -> Result ; } /// Mini Cycle struct for \ref HidsysNotificationLedPattern. # [ repr ( C ) ] pub struct HidsysNotificationLedPatternCycle { /// < Mini Cycle X LED Intensity. @@ -2582,9 +3846,13 @@ where /// < Unknown pub unk_x44 : [ u8 ; 2usize ] , /// < Padding - pub pad_x46 : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_HidsysNotificationLedPattern ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidsysNotificationLedPattern > ( ) , 72usize , concat ! ( "Size of: " , stringify ! ( HidsysNotificationLedPattern ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidsysNotificationLedPattern > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( HidsysNotificationLedPattern ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . baseMiniCycleDuration as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( baseMiniCycleDuration ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . totalMiniCycles as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( totalMiniCycles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . totalFullCycles as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( totalFullCycles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . startIntensity as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( startIntensity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . miniCycles as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( miniCycles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . unk_x44 as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( unk_x44 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . pad_x46 as * const _ as usize } , 70usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( pad_x46 ) ) ) ; } extern "C" { pub fn hidsysInitialize ( ) -> Result ; } extern "C" { pub fn hidsysExit ( ) ; } extern "C" { pub fn hidsysEnableAppletToGetInput ( enable : bool ) -> Result ; } extern "C" { + pub pad_x46 : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_HidsysNotificationLedPattern ( ) { assert_eq ! ( :: core :: mem :: size_of :: < HidsysNotificationLedPattern > ( ) , 72usize , concat ! ( "Size of: " , stringify ! ( HidsysNotificationLedPattern ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < HidsysNotificationLedPattern > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( HidsysNotificationLedPattern ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . baseMiniCycleDuration as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( baseMiniCycleDuration ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . totalMiniCycles as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( totalMiniCycles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . totalFullCycles as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( totalFullCycles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . startIntensity as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( startIntensity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . miniCycles as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( miniCycles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . unk_x44 as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( unk_x44 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < HidsysNotificationLedPattern > ( ) ) ) . pad_x46 as * const _ as usize } , 70usize , concat ! ( "Offset of field: " , stringify ! ( HidsysNotificationLedPattern ) , "::" , stringify ! ( pad_x46 ) ) ) ; } extern "C" { pub fn hidsysInitialize ( ) -> Result ; } extern "C" { pub fn hidsysExit ( ) ; } extern "C" { pub fn hidsysGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn hidsysEnableAppletToGetInput ( enable : bool ) -> Result ; } extern "C" { /// @brief Returns an event that fires when the home button is pressed, this will prevent the home menu from opening when the button is pressed. This event does not auto clear. pub fn hidsysAcquireHomeButtonEventHandle ( event_out : * mut Event ) -> Result ; } extern "C" { pub fn hidsysActivateHomeButton ( ) -> Result ; } extern "C" { pub fn hidsysActivateSleepButton ( ) -> Result ; } extern "C" { pub fn hidsysActivateCaptureButton ( ) -> Result ; } extern "C" { + /// @brief Gets the SupportedNpadStyleSet for the CallerApplet. applet must be initialized in order to use this (uses \ref appletGetAppletResourceUserIdOfCallerApplet). +/// @note Only available on [6.0.0+]. +/// @param[out] out \ref HidControllerType + pub fn hidsysGetSupportedNpadStyleSetOfCallerApplet ( out : * mut HidControllerType ) -> Result ; } extern "C" { /// @brief Gets the UniquePadIds for the specified controller. /// @note Only available on [3.0.0+]. /// @param id Controller ID. Must not be CONTROLLER_P1_AUTO. @@ -2600,7 +3868,11 @@ where /// @brief Sets the HOME-button notification LED pattern, for the specified controller. /// @param pattern \ref HidsysNotificationLedPattern /// @param UniquePadId UniquePadId for the controller. - pub fn hidsysSetNotificationLedPattern ( pattern : * const HidsysNotificationLedPattern , UniquePadId : u64 ) -> Result ; } # [ repr ( C , packed ) ] pub struct IrsPackedMomentProcessorConfig { pub unk_x0 : u64 , pub unk_x8 : u8 , pub unk_x9 : u8 , pub unk_xa : u8 , pub pad : [ u8 ; 5usize ] , pub unk_x10 : u16 , pub unk_x12 : u32 , pub unk_x16 : u16 , pub unk_constant : u32 , pub unk_x1c : u8 , pub unk_x1d : u8 , pub pad2 : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_IrsPackedMomentProcessorConfig ( ) { assert_eq ! ( :: core :: mem :: size_of :: < IrsPackedMomentProcessorConfig > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( IrsPackedMomentProcessorConfig ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < IrsPackedMomentProcessorConfig > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( IrsPackedMomentProcessorConfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x8 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x9 as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x9 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_xa as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_xa ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . pad as * const _ as usize } , 11usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x10 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x10 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x12 as * const _ as usize } , 18usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x12 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x16 as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_constant as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_constant ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x1c as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x1c ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x1d as * const _ as usize } , 29usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x1d ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . pad2 as * const _ as usize } , 30usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( pad2 ) ) ) ; } # [ repr ( C ) ] pub struct IrsImageTransferProcessorConfig { + pub fn hidsysSetNotificationLedPattern ( pattern : * const HidsysNotificationLedPattern , UniquePadId : u64 ) -> Result ; } extern "C" { + /// @brief Gets the unique pad's serial number. +/// @param UniquePadId UniquePadId for the controller. +/// @param serial Pointer to output the serial to. (The buffer size needs to be at least 0x19 bytes) + pub fn hidsysGetUniquePadSerialNumber ( UniquePadId : u64 , serial : * mut ctypes :: c_char ) -> Result ; } # [ repr ( C , packed ) ] pub struct IrsPackedMomentProcessorConfig { pub unk_x0 : u64 , pub unk_x8 : u8 , pub unk_x9 : u8 , pub unk_xa : u8 , pub pad : [ u8 ; 5usize ] , pub unk_x10 : u16 , pub unk_x12 : u32 , pub unk_x16 : u16 , pub unk_constant : u32 , pub unk_x1c : u8 , pub unk_x1d : u8 , pub pad2 : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_IrsPackedMomentProcessorConfig ( ) { assert_eq ! ( :: core :: mem :: size_of :: < IrsPackedMomentProcessorConfig > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( IrsPackedMomentProcessorConfig ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < IrsPackedMomentProcessorConfig > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( IrsPackedMomentProcessorConfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x8 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x9 as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x9 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_xa as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_xa ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . pad as * const _ as usize } , 11usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x10 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x10 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x12 as * const _ as usize } , 18usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x12 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x16 as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_constant as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_constant ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x1c as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x1c ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . unk_x1d as * const _ as usize } , 29usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( unk_x1d ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < IrsPackedMomentProcessorConfig > ( ) ) ) . pad2 as * const _ as usize } , 30usize , concat ! ( "Offset of field: " , stringify ! ( IrsPackedMomentProcessorConfig ) , "::" , stringify ! ( pad2 ) ) ) ; } # [ repr ( C ) ] pub struct IrsImageTransferProcessorConfig { /// < IR Sensor exposure time in nanoseconds. pub exposure : u64 , /// < Controls the IR leds. 0: All leds, 1: Bright group, 2: Dim group, 3: None. @@ -2624,7 +3896,7 @@ where /// Initialize irs. pub fn irsInitialize ( ) -> Result ; } extern "C" { /// Exit irs. - pub fn irsExit ( ) ; } extern "C" { pub fn irsGetSessionService ( ) -> * mut Service ; } extern "C" { pub fn irsGetSharedmemAddr ( ) -> * mut ctypes :: c_void ; } extern "C" { + pub fn irsExit ( ) ; } extern "C" { pub fn irsGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn irsGetSharedmemAddr ( ) -> * mut ctypes :: c_void ; } extern "C" { /// (De)activate the IR sensor, this is automatically used by \ref irsExit. Must be called after irsInitialize() to activate the IR sensor. pub fn irsActivateIrsensor ( activate : bool ) -> Result ; } extern "C" { pub fn irsGetIrCameraHandle ( IrCameraHandle : * mut u32 , id : HidControllerID ) -> Result ; } extern "C" { /// @brief Start ImageTransferProcessor. @@ -2655,15 +3927,23 @@ where /// < Nintendo Extended. This font only has the special Nintendo-specific characters, which aren't available with the other fonts. pub const PlSharedFontType_PlSharedFontType_NintendoExt : PlSharedFontType = 5 ; /// < Total fonts supported by this enum. - pub const PlSharedFontType_PlSharedFontType_Total : PlSharedFontType = 6 ; pub type PlSharedFontType = u32 ; # [ repr ( C ) ] pub struct PlFontData { pub type_ : u32 , pub offset : u32 , pub size : u32 , pub address : * mut ctypes :: c_void , } # [ test ] fn bindgen_test_layout_PlFontData ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PlFontData > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PlFontData ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PlFontData > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PlFontData ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . offset as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . address as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( address ) ) ) ; } extern "C" { pub fn plInitialize ( ) -> Result ; } extern "C" { pub fn plExit ( ) ; } extern "C" { pub fn plGetSharedmemAddr ( ) -> * mut ctypes :: c_void ; } extern "C" { pub fn plGetSharedFontByType ( font : * mut PlFontData , SharedFontType : u32 ) -> Result ; } extern "C" { pub fn plGetSharedFont ( LanguageCode : u64 , fonts : * mut PlFontData , max_fonts : usize , total_fonts : * mut usize ) -> Result ; } # [ repr ( C ) ] pub struct ViDisplay { pub display_id : u64 , pub display_name : [ ctypes :: c_char ; 64usize ] , pub initialized : bool , } # [ test ] fn bindgen_test_layout_ViDisplay ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ViDisplay > ( ) , 80usize , concat ! ( "Size of: " , stringify ! ( ViDisplay ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ViDisplay > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ViDisplay ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViDisplay > ( ) ) ) . display_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ViDisplay ) , "::" , stringify ! ( display_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViDisplay > ( ) ) ) . display_name as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ViDisplay ) , "::" , stringify ! ( display_name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViDisplay > ( ) ) ) . initialized as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( ViDisplay ) , "::" , stringify ! ( initialized ) ) ) ; } # [ repr ( C ) ] pub struct ViLayer { pub layer_id : u64 , pub igbp_binder_obj_id : u32 , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub __bindgen_padding_0 : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_ViLayer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ViLayer > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ViLayer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ViLayer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ViLayer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViLayer > ( ) ) ) . layer_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ViLayer ) , "::" , stringify ! ( layer_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViLayer > ( ) ) ) . igbp_binder_obj_id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ViLayer ) , "::" , stringify ! ( igbp_binder_obj_id ) ) ) ; } impl ViLayer { # [ inline ] pub fn initialized ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_initialized ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn stray_layer ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_stray_layer ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( initialized : bool , stray_layer : bool ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let initialized : u8 = unsafe { :: core :: mem :: transmute ( initialized ) } ; initialized as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let stray_layer : u8 = unsafe { :: core :: mem :: transmute ( stray_layer ) } ; stray_layer as u64 } ) ; __bindgen_bitfield_unit } } pub const ViServiceType_ViServiceType_Default : ViServiceType = -1 ; pub const ViServiceType_ViServiceType_Application : ViServiceType = 0 ; pub const ViServiceType_ViServiceType_System : ViServiceType = 1 ; pub const ViServiceType_ViServiceType_Manager : ViServiceType = 2 ; pub type ViServiceType = i32 ; pub const ViLayerFlags_ViLayerFlags_Default : ViLayerFlags = 1 ; + pub const PlSharedFontType_PlSharedFontType_Total : PlSharedFontType = 6 ; pub type PlSharedFontType = u32 ; # [ repr ( C ) ] pub struct PlFontData { pub type_ : u32 , pub offset : u32 , pub size : u32 , pub address : * mut ctypes :: c_void , } # [ test ] fn bindgen_test_layout_PlFontData ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PlFontData > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( PlFontData ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PlFontData > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PlFontData ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . offset as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PlFontData > ( ) ) ) . address as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( PlFontData ) , "::" , stringify ! ( address ) ) ) ; } extern "C" { pub fn plInitialize ( ) -> Result ; } extern "C" { pub fn plExit ( ) ; } extern "C" { pub fn plGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn plGetSharedmemAddr ( ) -> * mut ctypes :: c_void ; } extern "C" { pub fn plGetSharedFontByType ( font : * mut PlFontData , SharedFontType : u32 ) -> Result ; } extern "C" { pub fn plGetSharedFont ( LanguageCode : u64 , fonts : * mut PlFontData , max_fonts : usize , total_fonts : * mut usize ) -> Result ; } # [ repr ( C ) ] pub struct ViDisplay { pub display_id : u64 , pub display_name : [ ctypes :: c_char ; 64usize ] , pub initialized : bool , } # [ test ] fn bindgen_test_layout_ViDisplay ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ViDisplay > ( ) , 80usize , concat ! ( "Size of: " , stringify ! ( ViDisplay ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ViDisplay > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ViDisplay ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViDisplay > ( ) ) ) . display_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ViDisplay ) , "::" , stringify ! ( display_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViDisplay > ( ) ) ) . display_name as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ViDisplay ) , "::" , stringify ! ( display_name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViDisplay > ( ) ) ) . initialized as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( ViDisplay ) , "::" , stringify ! ( initialized ) ) ) ; } # [ repr ( C ) ] pub struct ViLayer { pub layer_id : u64 , pub igbp_binder_obj_id : u32 , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub __bindgen_padding_0 : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_ViLayer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ViLayer > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ViLayer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ViLayer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ViLayer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViLayer > ( ) ) ) . layer_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ViLayer ) , "::" , stringify ! ( layer_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ViLayer > ( ) ) ) . igbp_binder_obj_id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ViLayer ) , "::" , stringify ! ( igbp_binder_obj_id ) ) ) ; } impl ViLayer { # [ inline ] pub fn initialized ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_initialized ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn stray_layer ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_stray_layer ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( initialized : bool , stray_layer : bool ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let initialized : u8 = unsafe { :: core :: mem :: transmute ( initialized ) } ; initialized as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let stray_layer : u8 = unsafe { :: core :: mem :: transmute ( stray_layer ) } ; stray_layer as u64 } ) ; __bindgen_bitfield_unit } } pub const ViServiceType_ViServiceType_Default : ViServiceType = -1 ; pub const ViServiceType_ViServiceType_Application : ViServiceType = 0 ; pub const ViServiceType_ViServiceType_System : ViServiceType = 1 ; pub const ViServiceType_ViServiceType_Manager : ViServiceType = 2 ; pub type ViServiceType = i32 ; pub const ViLayerFlags_ViLayerFlags_Default : ViLayerFlags = 1 ; /// Used by viCreateLayer when CreateStrayLayer is used internally. pub type ViLayerFlags = u32 ; pub const ViScalingMode_ViScalingMode_None : ViScalingMode = 0 ; pub const ViScalingMode_ViScalingMode_FitToLayer : ViScalingMode = 2 ; pub const ViScalingMode_ViScalingMode_PreserveAspectRatio : ViScalingMode = 4 ; pub const ViScalingMode_ViScalingMode_Default : ViScalingMode = 2 ; /// Used with viSetLayerScalingMode. - pub type ViScalingMode = u32 ; pub const ViPowerState_ViPowerState_Off : ViPowerState = 0 ; pub const ViPowerState_ViPowerState_NotScanning : ViPowerState = 1 ; pub const ViPowerState_ViPowerState_On : ViPowerState = 2 ; + pub type ViScalingMode = u32 ; + /// < Screen is off. + pub const ViPowerState_ViPowerState_Off : ViPowerState = 0 ; + /// < [3.0.0+] Screen is on, but not scanning content. + pub const ViPowerState_ViPowerState_NotScanning : ViPowerState = 1 ; + /// < [3.0.0+] Screen is on. + pub const ViPowerState_ViPowerState_On : ViPowerState = 2 ; + /// < [1.0.0 - 2.3.0] Screen is on. + pub const ViPowerState_ViPowerState_On_Deprecated : ViPowerState = 1 ; /// Used with viSetDisplayPowerState. pub type ViPowerState = u32 ; extern "C" { pub fn viInitialize ( service_type : ViServiceType ) -> Result ; } extern "C" { pub fn viExit ( ) ; } extern "C" { pub fn viGetSession_IApplicationDisplayService ( ) -> * mut Service ; } extern "C" { pub fn viGetSession_IHOSBinderDriverRelay ( ) -> * mut Service ; } extern "C" { pub fn viGetSession_ISystemDisplayService ( ) -> * mut Service ; } extern "C" { pub fn viGetSession_IManagerDisplayService ( ) -> * mut Service ; } extern "C" { pub fn viGetSession_IHOSBinderDriverIndirect ( ) -> * mut Service ; } extern "C" { pub fn viSetContentVisibility ( v : bool ) -> Result ; } extern "C" { pub fn viOpenDisplay ( display_name : * const ctypes :: c_char , display : * mut ViDisplay ) -> Result ; } extern "C" { pub fn viCloseDisplay ( display : * mut ViDisplay ) -> Result ; } extern "C" { pub fn viGetDisplayResolution ( display : * mut ViDisplay , width : * mut u64 , height : * mut u64 ) -> Result ; } extern "C" { pub fn viGetDisplayLogicalResolution ( display : * mut ViDisplay , width : * mut u32 , height : * mut u32 ) -> Result ; } extern "C" { /// Only available on [3.0.0+]. - pub fn viSetDisplayMagnification ( display : * mut ViDisplay , x : u32 , y : u32 , width : u32 , height : u32 ) -> Result ; } extern "C" { pub fn viGetDisplayVsyncEvent ( display : * mut ViDisplay , event_out : * mut Event ) -> Result ; } extern "C" { pub fn viSetDisplayPowerState ( display : * mut ViDisplay , state : ViPowerState ) -> Result ; } extern "C" { pub fn viSetDisplayAlpha ( display : * mut ViDisplay , alpha : f32 ) -> Result ; } extern "C" { pub fn viGetDisplayMinimumZ ( display : * mut ViDisplay , z : * mut u64 ) -> Result ; } extern "C" { pub fn viGetDisplayMaximumZ ( display : * mut ViDisplay , z : * mut u64 ) -> Result ; } extern "C" { pub fn viCreateLayer ( display : * const ViDisplay , layer : * mut ViLayer ) -> Result ; } extern "C" { pub fn viCreateManagedLayer ( display : * const ViDisplay , layer_flags : ViLayerFlags , aruid : u64 , layer_id : * mut u64 ) -> Result ; } extern "C" { pub fn viSetLayerSize ( layer : * mut ViLayer , width : u64 , height : u64 ) -> Result ; } extern "C" { pub fn viSetLayerZ ( layer : * mut ViLayer , z : u64 ) -> Result ; } extern "C" { pub fn viSetLayerPosition ( layer : * mut ViLayer , x : f32 , y : f32 ) -> Result ; } extern "C" { pub fn viCloseLayer ( layer : * mut ViLayer ) -> Result ; } extern "C" { pub fn viSetLayerScalingMode ( layer : * mut ViLayer , scaling_mode : ViScalingMode ) -> Result ; } extern "C" { pub fn viGetIndirectLayerImageMap ( buffer : * mut ctypes :: c_void , size : usize , width : s32 , height : s32 , IndirectLayerConsumerHandle : u64 , out0 : * mut u64 , out1 : * mut u64 ) -> Result ; } extern "C" { pub fn viGetIndirectLayerImageRequiredMemoryInfo ( width : s32 , height : s32 , out_size : * mut u64 , out_alignment : * mut u64 ) -> Result ; } extern "C" { pub fn nvInitialize ( ) -> Result ; } extern "C" { pub fn nvExit ( ) ; } pub const NvEventId_NvEventId_Gpu_SmException_BptIntReport : NvEventId = 1 ; pub const NvEventId_NvEventId_Gpu_SmException_BptPauseReport : NvEventId = 2 ; pub const NvEventId_NvEventId_Gpu_ErrorNotifier : NvEventId = 3 ; pub const NvEventId_NvEventId_CtrlGpu_ErrorEventHandle : NvEventId = 1 ; pub const NvEventId_NvEventId_CtrlGpu_Unknown : NvEventId = 2 ; pub type NvEventId = u32 ; extern "C" { pub fn nvOpen ( fd : * mut u32 , devicepath : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn nvIoctl ( fd : u32 , request : u32 , argp : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn nvIoctl2 ( fd : u32 , request : u32 , argp : * mut ctypes :: c_void , inbuf : * const ctypes :: c_void , inbuf_size : usize ) -> Result ; } extern "C" { pub fn nvClose ( fd : u32 ) -> Result ; } extern "C" { pub fn nvQueryEvent ( fd : u32 , event_id : u32 , event_out : * mut Event ) -> Result ; } extern "C" { pub fn nvConvertError ( rc : ctypes :: c_int ) -> Result ; } + pub fn viSetDisplayMagnification ( display : * mut ViDisplay , x : u32 , y : u32 , width : u32 , height : u32 ) -> Result ; } extern "C" { pub fn viGetDisplayVsyncEvent ( display : * mut ViDisplay , event_out : * mut Event ) -> Result ; } extern "C" { pub fn viSetDisplayPowerState ( display : * mut ViDisplay , state : ViPowerState ) -> Result ; } extern "C" { pub fn viSetDisplayAlpha ( display : * mut ViDisplay , alpha : f32 ) -> Result ; } extern "C" { pub fn viGetDisplayMinimumZ ( display : * mut ViDisplay , z : * mut u64 ) -> Result ; } extern "C" { pub fn viGetDisplayMaximumZ ( display : * mut ViDisplay , z : * mut u64 ) -> Result ; } extern "C" { pub fn viCreateLayer ( display : * const ViDisplay , layer : * mut ViLayer ) -> Result ; } extern "C" { pub fn viCreateManagedLayer ( display : * const ViDisplay , layer_flags : ViLayerFlags , aruid : u64 , layer_id : * mut u64 ) -> Result ; } extern "C" { pub fn viSetLayerSize ( layer : * mut ViLayer , width : u64 , height : u64 ) -> Result ; } extern "C" { pub fn viSetLayerZ ( layer : * mut ViLayer , z : u64 ) -> Result ; } extern "C" { pub fn viSetLayerPosition ( layer : * mut ViLayer , x : f32 , y : f32 ) -> Result ; } extern "C" { pub fn viCloseLayer ( layer : * mut ViLayer ) -> Result ; } extern "C" { pub fn viDestroyManagedLayer ( layer : * mut ViLayer ) -> Result ; } extern "C" { pub fn viSetLayerScalingMode ( layer : * mut ViLayer , scaling_mode : ViScalingMode ) -> Result ; } extern "C" { pub fn viGetIndirectLayerImageMap ( buffer : * mut ctypes :: c_void , size : usize , width : s32 , height : s32 , IndirectLayerConsumerHandle : u64 , out0 : * mut u64 , out1 : * mut u64 ) -> Result ; } extern "C" { pub fn viGetIndirectLayerImageRequiredMemoryInfo ( width : s32 , height : s32 , out_size : * mut u64 , out_alignment : * mut u64 ) -> Result ; } extern "C" { pub fn nvInitialize ( ) -> Result ; } extern "C" { pub fn nvExit ( ) ; } pub const NvEventId_NvEventId_Gpu_SmException_BptIntReport : NvEventId = 1 ; pub const NvEventId_NvEventId_Gpu_SmException_BptPauseReport : NvEventId = 2 ; pub const NvEventId_NvEventId_Gpu_ErrorNotifier : NvEventId = 3 ; pub const NvEventId_NvEventId_CtrlGpu_ErrorEventHandle : NvEventId = 1 ; pub const NvEventId_NvEventId_CtrlGpu_Unknown : NvEventId = 2 ; pub type NvEventId = u32 ; extern "C" { pub fn nvOpen ( fd : * mut u32 , devicepath : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn nvIoctl ( fd : u32 , request : u32 , argp : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn nvIoctl2 ( fd : u32 , request : u32 , argp : * mut ctypes :: c_void , inbuf : * const ctypes :: c_void , inbuf_size : usize ) -> Result ; } extern "C" { pub fn nvClose ( fd : u32 ) -> Result ; } extern "C" { pub fn nvQueryEvent ( fd : u32 , event_id : u32 , event_out : * mut Event ) -> Result ; } extern "C" { pub fn nvConvertError ( rc : ctypes :: c_int ) -> Result ; } /// < Initializes nifm:u. pub const NifmServiceType_NifmServiceType_NotInitialized : NifmServiceType = 0 ; /// < Initializes nifm:u. @@ -2701,7 +3981,7 @@ where /// @brief Returns the available storage capacity from content manager services. /// @param storage_id Specified FsStorageId. (Must be FsStorageId_SdCard) /// @param size Pointer to output the free storage size to. - pub fn nsGetFreeSpaceSize ( storage_id : FsStorageId , size : * mut u64 ) -> Result ; } extern "C" { pub fn nsvmInitialize ( ) -> Result ; } extern "C" { pub fn nsvmExit ( ) ; } extern "C" { pub fn nsvmNeedsUpdateVulnerability ( out : * mut bool ) -> Result ; } extern "C" { pub fn nsvmGetSafeSystemVersion ( out : * mut u16 ) -> Result ; } extern "C" { pub fn nsdevInitialize ( ) -> Result ; } extern "C" { pub fn nsdevExit ( ) ; } extern "C" { pub fn nsdevLaunchProgram ( out_pid : * mut u64 , properties : * const NsLaunchProperties , flags : u32 ) -> Result ; } extern "C" { pub fn nsdevTerminateProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn nsdevTerminateProgram ( tid : u64 ) -> Result ; } extern "C" { pub fn nsdevGetShellEvent ( out : * mut Event ) -> Result ; } extern "C" { pub fn nsdevGetShellEventInfo ( out : * mut NsShellEventInfo ) -> Result ; } extern "C" { pub fn nsdevTerminateApplication ( ) -> Result ; } extern "C" { pub fn nsdevPrepareLaunchProgramFromHost ( out : * mut NsLaunchProperties , path : * const ctypes :: c_char , path_len : usize ) -> Result ; } extern "C" { pub fn nsdevLaunchApplication ( out_pid : * mut u64 , app_title_id : u64 , flags : u32 ) -> Result ; } extern "C" { pub fn nsdevLaunchApplicationWithStorageId ( out_pid : * mut u64 , app_title_id : u64 , flags : u32 , app_storage_id : u8 , patch_storage_id : u8 ) -> Result ; } extern "C" { pub fn nsdevIsSystemMemoryResourceLimitBoosted ( out : * mut bool ) -> Result ; } extern "C" { pub fn nsdevGetRunningApplicationProcessId ( out_pid : * mut u64 ) -> Result ; } extern "C" { pub fn nsdevSetCurrentApplicationRightsEnvironmentCanBeActive ( can_be_active : bool ) -> Result ; } # [ repr ( C ) ] pub struct LoaderProgramInfo { pub main_thread_priority : u8 , pub default_cpu_id : u8 , pub application_type : u16 , pub main_thread_stack_size : u32 , pub title_id : u64 , pub acid_sac_size : u32 , pub aci0_sac_size : u32 , pub acid_fac_size : u32 , pub aci0_fah_size : u32 , pub ac_buffer : [ u8 ; 992usize ] , } # [ test ] fn bindgen_test_layout_LoaderProgramInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LoaderProgramInfo > ( ) , 1024usize , concat ! ( "Size of: " , stringify ! ( LoaderProgramInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LoaderProgramInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( LoaderProgramInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . main_thread_priority as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( main_thread_priority ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . default_cpu_id as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( default_cpu_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . application_type as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( application_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . main_thread_stack_size as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( main_thread_stack_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . title_id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( title_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . acid_sac_size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( acid_sac_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . aci0_sac_size as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( aci0_sac_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . acid_fac_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( acid_fac_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . aci0_fah_size as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( aci0_fah_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . ac_buffer as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( ac_buffer ) ) ) ; } # [ repr ( C ) ] pub struct LoaderModuleInfo { pub build_id : [ u8 ; 32usize ] , pub base_address : u64 , pub size : u64 , } # [ test ] fn bindgen_test_layout_LoaderModuleInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LoaderModuleInfo > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( LoaderModuleInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LoaderModuleInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( LoaderModuleInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderModuleInfo > ( ) ) ) . build_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LoaderModuleInfo ) , "::" , stringify ! ( build_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderModuleInfo > ( ) ) ) . base_address as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( LoaderModuleInfo ) , "::" , stringify ! ( base_address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderModuleInfo > ( ) ) ) . size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( LoaderModuleInfo ) , "::" , stringify ! ( size ) ) ) ; } extern "C" { pub fn ldrShellInitialize ( ) -> Result ; } extern "C" { pub fn ldrShellExit ( ) ; } extern "C" { pub fn ldrDmntInitialize ( ) -> Result ; } extern "C" { pub fn ldrDmntExit ( ) ; } extern "C" { pub fn ldrPmInitialize ( ) -> Result ; } extern "C" { pub fn ldrPmExit ( ) ; } extern "C" { pub fn ldrShellAddTitleToLaunchQueue ( tid : u64 , args : * const ctypes :: c_void , args_size : usize ) -> Result ; } extern "C" { pub fn ldrShellClearLaunchQueue ( ) -> Result ; } extern "C" { pub fn ldrDmntAddTitleToLaunchQueue ( tid : u64 , args : * const ctypes :: c_void , args_size : usize ) -> Result ; } extern "C" { pub fn ldrDmntClearLaunchQueue ( ) -> Result ; } extern "C" { pub fn ldrDmntGetModuleInfos ( pid : u64 , out_module_infos : * mut LoaderModuleInfo , max_out_modules : usize , num_out : * mut u32 ) -> Result ; } extern "C" { pub fn ldrPmCreateProcess ( flags : u64 , launch_index : u64 , reslimit_h : Handle , out_process_h : * mut Handle ) -> Result ; } extern "C" { pub fn ldrPmGetProgramInfo ( title_id : u64 , storage_id : FsStorageId , out_program_info : * mut LoaderProgramInfo ) -> Result ; } extern "C" { pub fn ldrPmRegisterTitle ( title_id : u64 , storage_id : FsStorageId , out_index : * mut u64 ) -> Result ; } extern "C" { pub fn ldrPmUnregisterTitle ( launch_index : u64 ) -> Result ; } extern "C" { pub fn ldrRoInitialize ( ) -> Result ; } extern "C" { pub fn ldrRoExit ( ) ; } extern "C" { pub fn ro1Initialize ( ) -> Result ; } extern "C" { pub fn ro1Exit ( ) ; } extern "C" { pub fn roDmntInitialize ( ) -> Result ; } extern "C" { pub fn roDmntExit ( ) ; } extern "C" { pub fn ldrRoLoadNro ( out_address : * mut u64 , nro_address : u64 , nro_size : u64 , bss_address : u64 , bss_size : u64 ) -> Result ; } extern "C" { pub fn ldrRoUnloadNro ( nro_address : u64 ) -> Result ; } extern "C" { pub fn ldrRoLoadNrr ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn ldrRoUnloadNrr ( nrr_address : u64 ) -> Result ; } extern "C" { pub fn ldrRoLoadNrrEx ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn ro1LoadNro ( out_address : * mut u64 , nro_address : u64 , nro_size : u64 , bss_address : u64 , bss_size : u64 ) -> Result ; } extern "C" { pub fn ro1UnloadNro ( nro_address : u64 ) -> Result ; } extern "C" { pub fn ro1LoadNrr ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn ro1UnloadNrr ( nrr_address : u64 ) -> Result ; } extern "C" { pub fn ro1LoadNrrEx ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn roDmntGetModuleInfos ( pid : u64 , out_module_infos : * mut LoaderModuleInfo , max_out_modules : usize , num_out : * mut u32 ) -> Result ; } pub const PmLaunchFlag_PmLaunchFlag_None : PmLaunchFlag = 0 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnExit : PmLaunchFlag = 1 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnStart : PmLaunchFlag = 2 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnCrash : PmLaunchFlag = 4 ; pub const PmLaunchFlag_PmLaunchFlag_SignalOnDebug : PmLaunchFlag = 8 ; pub const PmLaunchFlag_PmLaunchFlag_StartSuspended : PmLaunchFlag = 16 ; pub const PmLaunchFlag_PmLaunchFlag_DisableAslr : PmLaunchFlag = 32 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnExit : PmLaunchFlag = 1 ; pub const PmLaunchFlag_PmLaunchFlagOld_StartSuspended : PmLaunchFlag = 2 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnCrash : PmLaunchFlag = 4 ; pub const PmLaunchFlag_PmLaunchFlagOld_DisableAslr : PmLaunchFlag = 8 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnDebug : PmLaunchFlag = 16 ; pub const PmLaunchFlag_PmLaunchFlagOld_SignalOnStart : PmLaunchFlag = 32 ; pub type PmLaunchFlag = u32 ; pub const PmProcessEvent_PmProcessEvent_None : PmProcessEvent = 0 ; pub const PmProcessEvent_PmProcessEvent_Exit : PmProcessEvent = 1 ; pub const PmProcessEvent_PmProcessEvent_Start : PmProcessEvent = 2 ; pub const PmProcessEvent_PmProcessEvent_Crash : PmProcessEvent = 3 ; pub const PmProcessEvent_PmProcessEvent_DebugStart : PmProcessEvent = 4 ; pub const PmProcessEvent_PmProcessEvent_DebugBreak : PmProcessEvent = 5 ; pub type PmProcessEvent = u32 ; # [ repr ( C ) ] pub struct PmProcessEventInfo { pub event : PmProcessEvent , pub process_id : u64 , } # [ test ] fn bindgen_test_layout_PmProcessEventInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PmProcessEventInfo > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( PmProcessEventInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PmProcessEventInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( PmProcessEventInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PmProcessEventInfo > ( ) ) ) . event as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PmProcessEventInfo ) , "::" , stringify ! ( event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PmProcessEventInfo > ( ) ) ) . process_id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( PmProcessEventInfo ) , "::" , stringify ! ( process_id ) ) ) ; } extern "C" { pub fn pmdmntInitialize ( ) -> Result ; } extern "C" { pub fn pmdmntExit ( ) ; } extern "C" { pub fn pmdmntGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pminfoInitialize ( ) -> Result ; } extern "C" { pub fn pminfoExit ( ) ; } extern "C" { pub fn pmshellInitialize ( ) -> Result ; } extern "C" { pub fn pmshellExit ( ) ; } extern "C" { pub fn pmdmntGetDebugProcesses ( out_count : * mut u32 , out_pids : * mut u64 , max_pids : usize ) -> Result ; } extern "C" { pub fn pmdmntStartProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn pmdmntGetTitlePid ( pid_out : * mut u64 , title_id : u64 ) -> Result ; } extern "C" { pub fn pmdmntEnableDebugForTitleId ( handle_out : * mut Handle , title_id : u64 ) -> Result ; } extern "C" { pub fn pmdmntGetApplicationPid ( pid_out : * mut u64 ) -> Result ; } extern "C" { pub fn pmdmntEnableDebugForApplication ( handle_out : * mut Handle ) -> Result ; } extern "C" { pub fn pmdmntDisableDebug ( ) -> Result ; } extern "C" { pub fn pminfoGetTitleId ( title_id_out : * mut u64 , pid : u64 ) -> Result ; } extern "C" { pub fn pmshellLaunchProcess ( launch_flags : u32 , titleID : u64 , storageID : u64 , pid : * mut u64 ) -> Result ; } extern "C" { pub fn pmshellTerminateProcessByProcessId ( processID : u64 ) -> Result ; } extern "C" { pub fn pmshellTerminateProcessByTitleId ( titleID : u64 ) -> Result ; } extern "C" { pub fn pmshellGetProcessEvent ( out : * mut Event ) -> Result ; } extern "C" { pub fn pmshellGetProcessEventInfo ( out : * mut PmProcessEventInfo ) -> Result ; } extern "C" { pub fn pmshellFinalizeDeadProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn pmshellClearProcessExceptionOccurred ( pid : u64 ) -> Result ; } extern "C" { pub fn pmshellNotifyBootFinished ( ) -> Result ; } extern "C" { pub fn pmshellGetApplicationPid ( pid_out : * mut u64 ) -> Result ; } extern "C" { pub fn pmshellBoostSystemMemoryResourceLimit ( boost_size : u64 ) -> Result ; } pub const ColorSetId_ColorSetId_Light : ColorSetId = 0 ; pub const ColorSetId_ColorSetId_Dark : ColorSetId = 1 ; pub type ColorSetId = u32 ; + pub fn nsGetFreeSpaceSize ( storage_id : FsStorageId , size : * mut u64 ) -> Result ; } extern "C" { pub fn nsvmInitialize ( ) -> Result ; } extern "C" { pub fn nsvmExit ( ) ; } extern "C" { pub fn nsvmNeedsUpdateVulnerability ( out : * mut bool ) -> Result ; } extern "C" { pub fn nsvmGetSafeSystemVersion ( out : * mut u16 ) -> Result ; } extern "C" { pub fn nsdevInitialize ( ) -> Result ; } extern "C" { pub fn nsdevExit ( ) ; } extern "C" { pub fn nsdevLaunchProgram ( out_pid : * mut u64 , properties : * const NsLaunchProperties , flags : u32 ) -> Result ; } extern "C" { pub fn nsdevTerminateProcess ( pid : u64 ) -> Result ; } extern "C" { pub fn nsdevTerminateProgram ( tid : u64 ) -> Result ; } extern "C" { pub fn nsdevGetShellEvent ( out : * mut Event ) -> Result ; } extern "C" { pub fn nsdevGetShellEventInfo ( out : * mut NsShellEventInfo ) -> Result ; } extern "C" { pub fn nsdevTerminateApplication ( ) -> Result ; } extern "C" { pub fn nsdevPrepareLaunchProgramFromHost ( out : * mut NsLaunchProperties , path : * const ctypes :: c_char , path_len : usize ) -> Result ; } extern "C" { pub fn nsdevLaunchApplication ( out_pid : * mut u64 , app_title_id : u64 , flags : u32 ) -> Result ; } extern "C" { pub fn nsdevLaunchApplicationWithStorageId ( out_pid : * mut u64 , app_title_id : u64 , flags : u32 , app_storage_id : u8 , patch_storage_id : u8 ) -> Result ; } extern "C" { pub fn nsdevIsSystemMemoryResourceLimitBoosted ( out : * mut bool ) -> Result ; } extern "C" { pub fn nsdevGetRunningApplicationProcessId ( out_pid : * mut u64 ) -> Result ; } extern "C" { pub fn nsdevSetCurrentApplicationRightsEnvironmentCanBeActive ( can_be_active : bool ) -> Result ; } # [ repr ( C ) ] pub struct LoaderProgramInfo { pub main_thread_priority : u8 , pub default_cpu_id : u8 , pub application_type : u16 , pub main_thread_stack_size : u32 , pub title_id : u64 , pub acid_sac_size : u32 , pub aci0_sac_size : u32 , pub acid_fac_size : u32 , pub aci0_fah_size : u32 , pub ac_buffer : [ u8 ; 992usize ] , } # [ test ] fn bindgen_test_layout_LoaderProgramInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LoaderProgramInfo > ( ) , 1024usize , concat ! ( "Size of: " , stringify ! ( LoaderProgramInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LoaderProgramInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( LoaderProgramInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . main_thread_priority as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( main_thread_priority ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . default_cpu_id as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( default_cpu_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . application_type as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( application_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . main_thread_stack_size as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( main_thread_stack_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . title_id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( title_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . acid_sac_size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( acid_sac_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . aci0_sac_size as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( aci0_sac_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . acid_fac_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( acid_fac_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . aci0_fah_size as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( aci0_fah_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderProgramInfo > ( ) ) ) . ac_buffer as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( LoaderProgramInfo ) , "::" , stringify ! ( ac_buffer ) ) ) ; } # [ repr ( C ) ] pub struct LoaderModuleInfo { pub build_id : [ u8 ; 32usize ] , pub base_address : u64 , pub size : u64 , } # [ test ] fn bindgen_test_layout_LoaderModuleInfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LoaderModuleInfo > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( LoaderModuleInfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LoaderModuleInfo > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( LoaderModuleInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderModuleInfo > ( ) ) ) . build_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LoaderModuleInfo ) , "::" , stringify ! ( build_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderModuleInfo > ( ) ) ) . base_address as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( LoaderModuleInfo ) , "::" , stringify ! ( base_address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LoaderModuleInfo > ( ) ) ) . size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( LoaderModuleInfo ) , "::" , stringify ! ( size ) ) ) ; } extern "C" { pub fn ldrShellInitialize ( ) -> Result ; } extern "C" { pub fn ldrShellExit ( ) ; } extern "C" { pub fn ldrShellGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn ldrDmntInitialize ( ) -> Result ; } extern "C" { pub fn ldrDmntExit ( ) ; } extern "C" { pub fn ldrDmntGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn ldrPmInitialize ( ) -> Result ; } extern "C" { pub fn ldrPmExit ( ) ; } extern "C" { pub fn ldrPmGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn ldrShellAddTitleToLaunchQueue ( tid : u64 , args : * const ctypes :: c_void , args_size : usize ) -> Result ; } extern "C" { pub fn ldrShellClearLaunchQueue ( ) -> Result ; } extern "C" { pub fn ldrDmntAddTitleToLaunchQueue ( tid : u64 , args : * const ctypes :: c_void , args_size : usize ) -> Result ; } extern "C" { pub fn ldrDmntClearLaunchQueue ( ) -> Result ; } extern "C" { pub fn ldrDmntGetModuleInfos ( pid : u64 , out_module_infos : * mut LoaderModuleInfo , max_out_modules : usize , num_out : * mut u32 ) -> Result ; } extern "C" { pub fn ldrPmCreateProcess ( flags : u64 , launch_index : u64 , reslimit_h : Handle , out_process_h : * mut Handle ) -> Result ; } extern "C" { pub fn ldrPmGetProgramInfo ( title_id : u64 , storage_id : FsStorageId , out_program_info : * mut LoaderProgramInfo ) -> Result ; } extern "C" { pub fn ldrPmRegisterTitle ( title_id : u64 , storage_id : FsStorageId , out_index : * mut u64 ) -> Result ; } extern "C" { pub fn ldrPmUnregisterTitle ( launch_index : u64 ) -> Result ; } extern "C" { pub fn ldrRoInitialize ( ) -> Result ; } extern "C" { pub fn ldrRoExit ( ) ; } extern "C" { pub fn ldrRoGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn ro1Initialize ( ) -> Result ; } extern "C" { pub fn ro1Exit ( ) ; } extern "C" { pub fn ro1GetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn roDmntInitialize ( ) -> Result ; } extern "C" { pub fn roDmntExit ( ) ; } extern "C" { pub fn roDmntGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn ldrRoLoadNro ( out_address : * mut u64 , nro_address : u64 , nro_size : u64 , bss_address : u64 , bss_size : u64 ) -> Result ; } extern "C" { pub fn ldrRoUnloadNro ( nro_address : u64 ) -> Result ; } extern "C" { pub fn ldrRoLoadNrr ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn ldrRoUnloadNrr ( nrr_address : u64 ) -> Result ; } extern "C" { pub fn ldrRoLoadNrrEx ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn ro1LoadNro ( out_address : * mut u64 , nro_address : u64 , nro_size : u64 , bss_address : u64 , bss_size : u64 ) -> Result ; } extern "C" { pub fn ro1UnloadNro ( nro_address : u64 ) -> Result ; } extern "C" { pub fn ro1LoadNrr ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn ro1UnloadNrr ( nrr_address : u64 ) -> Result ; } extern "C" { pub fn ro1LoadNrrEx ( nrr_address : u64 , nrr_size : u64 ) -> Result ; } extern "C" { pub fn roDmntGetModuleInfos ( pid : u64 , out_module_infos : * mut LoaderModuleInfo , max_out_modules : usize , num_out : * mut u32 ) -> Result ; } pub const ColorSetId_ColorSetId_Light : ColorSetId = 0 ; pub const ColorSetId_ColorSetId_Dark : ColorSetId = 1 ; pub type ColorSetId = u32 ; /// < Japanese pub const SetLanguage_SetLanguage_JA : SetLanguage = 0 ; /// < US English ("AmericanEnglish") @@ -2749,7 +4029,7 @@ where /// Command IDs for setsysGetFlag/setsysSetFlag. pub type SetSysFlag = u32 ; /// Structure returned by \ref setsysGetFirmwareVersion - # [ repr ( C ) ] pub struct SetSysFirmwareVersion { pub major : u8 , pub minor : u8 , pub micro : u8 , pub padding1 : u8 , pub revision_major : u8 , pub revision_minor : u8 , pub padding2 : u8 , pub padding3 : u8 , pub platform : [ ctypes :: c_char ; 32usize ] , pub version_hash : [ ctypes :: c_char ; 64usize ] , pub display_version : [ ctypes :: c_char ; 24usize ] , pub display_title : [ ctypes :: c_char ; 128usize ] , } # [ test ] fn bindgen_test_layout_SetSysFirmwareVersion ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SetSysFirmwareVersion > ( ) , 256usize , concat ! ( "Size of: " , stringify ! ( SetSysFirmwareVersion ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SetSysFirmwareVersion > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( SetSysFirmwareVersion ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . major as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( major ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . minor as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( minor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . micro as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( micro ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . padding1 as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . revision_major as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( revision_major ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . revision_minor as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( revision_minor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . padding2 as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . padding3 as * const _ as usize } , 7usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( padding3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . platform as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( platform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . version_hash as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( version_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . display_version as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( display_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . display_title as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( display_title ) ) ) ; } extern "C" { pub fn setInitialize ( ) -> Result ; } extern "C" { pub fn setExit ( ) ; } extern "C" { + # [ repr ( C ) ] pub struct SetSysFirmwareVersion { pub major : u8 , pub minor : u8 , pub micro : u8 , pub padding1 : u8 , pub revision_major : u8 , pub revision_minor : u8 , pub padding2 : u8 , pub padding3 : u8 , pub platform : [ ctypes :: c_char ; 32usize ] , pub version_hash : [ ctypes :: c_char ; 64usize ] , pub display_version : [ ctypes :: c_char ; 24usize ] , pub display_title : [ ctypes :: c_char ; 128usize ] , } # [ test ] fn bindgen_test_layout_SetSysFirmwareVersion ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SetSysFirmwareVersion > ( ) , 256usize , concat ! ( "Size of: " , stringify ! ( SetSysFirmwareVersion ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SetSysFirmwareVersion > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( SetSysFirmwareVersion ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . major as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( major ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . minor as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( minor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . micro as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( micro ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . padding1 as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( padding1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . revision_major as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( revision_major ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . revision_minor as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( revision_minor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . padding2 as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( padding2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . padding3 as * const _ as usize } , 7usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( padding3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . platform as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( platform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . version_hash as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( version_hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . display_version as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( display_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SetSysFirmwareVersion > ( ) ) ) . display_title as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( SetSysFirmwareVersion ) , "::" , stringify ! ( display_title ) ) ) ; } extern "C" { pub fn setInitialize ( ) -> Result ; } extern "C" { pub fn setExit ( ) ; } extern "C" { pub fn setGetServiceSession ( ) -> * mut Service ; } extern "C" { /// Converts LanguageCode to Language. pub fn setMakeLanguage ( LanguageCode : u64 , Language : * mut s32 ) -> Result ; } extern "C" { /// Converts Language to LanguageCode. @@ -2767,7 +4047,7 @@ where /// Output total is overridden with value 0 if the total is <0. pub fn setGetAvailableLanguageCodeCount ( total : * mut s32 ) -> Result ; } extern "C" { /// Gets the RegionCode. - pub fn setGetRegionCode ( out : * mut SetRegion ) -> Result ; } extern "C" { pub fn setsysInitialize ( ) -> Result ; } extern "C" { pub fn setsysExit ( ) ; } extern "C" { + pub fn setGetRegionCode ( out : * mut SetRegion ) -> Result ; } extern "C" { pub fn setsysInitialize ( ) -> Result ; } extern "C" { pub fn setsysExit ( ) ; } extern "C" { pub fn setsysGetServiceSession ( ) -> * mut Service ; } extern "C" { /// Gets the current system theme. pub fn setsysGetColorSetId ( out : * mut ColorSetId ) -> Result ; } extern "C" { /// Sets the current system theme. @@ -2803,7 +4083,13 @@ where /// @brief Gets the settings flags that have changed. /// @param flags_0 Pointer to populate with first 64 flags. /// @param flags_1 Pointer to populate with second 64 flags. - pub fn setsysGetFatalDirtyFlags ( flags_0 : * mut u64 , flags_1 : * mut u64 ) -> Result ; } # [ repr ( C ) ] pub struct LrLocationResolver { pub s : Service , } # [ test ] fn bindgen_test_layout_LrLocationResolver ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LrLocationResolver > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( LrLocationResolver ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LrLocationResolver > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( LrLocationResolver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LrLocationResolver > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LrLocationResolver ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct LrRegisteredLocationResolver { pub s : Service , } # [ test ] fn bindgen_test_layout_LrRegisteredLocationResolver ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LrRegisteredLocationResolver > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( LrRegisteredLocationResolver ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LrRegisteredLocationResolver > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( LrRegisteredLocationResolver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LrRegisteredLocationResolver > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LrRegisteredLocationResolver ) , "::" , stringify ! ( s ) ) ) ; } extern "C" { pub fn lrInitialize ( ) -> Result ; } extern "C" { pub fn lrExit ( ) ; } extern "C" { pub fn lrOpenLocationResolver ( storage : FsStorageId , out : * mut LrLocationResolver ) -> Result ; } extern "C" { pub fn lrOpenRegisteredLocationResolver ( out : * mut LrRegisteredLocationResolver ) -> Result ; } extern "C" { pub fn lrLrResolveProgramPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectProgramPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveApplicationControlPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveApplicationHtmlDocumentPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveDataPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectApplicationControlPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectApplicationHtmlDocumentPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveLegalInformationPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectLegalInformationPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRefresh ( lr : * mut LrLocationResolver ) -> Result ; } extern "C" { pub fn lrRegLrResolveProgramPath ( reg : * mut LrRegisteredLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } pub const SplConfigItem_SplConfigItem_DisableProgramVerification : SplConfigItem = 1 ; pub const SplConfigItem_SplConfigItem_DramId : SplConfigItem = 2 ; pub const SplConfigItem_SplConfigItem_SecurityEngineIrqNumber : SplConfigItem = 3 ; pub const SplConfigItem_SplConfigItem_Version : SplConfigItem = 4 ; pub const SplConfigItem_SplConfigItem_HardwareType : SplConfigItem = 5 ; pub const SplConfigItem_SplConfigItem_IsRetail : SplConfigItem = 6 ; pub const SplConfigItem_SplConfigItem_IsRecoveryBoot : SplConfigItem = 7 ; pub const SplConfigItem_SplConfigItem_DeviceId : SplConfigItem = 8 ; pub const SplConfigItem_SplConfigItem_BootReason : SplConfigItem = 9 ; pub const SplConfigItem_SplConfigItem_MemoryArrange : SplConfigItem = 10 ; pub const SplConfigItem_SplConfigItem_IsDebugMode : SplConfigItem = 11 ; pub const SplConfigItem_SplConfigItem_KernelMemoryConfiguration : SplConfigItem = 12 ; pub const SplConfigItem_SplConfigItem_IsChargerHiZModeEnabled : SplConfigItem = 13 ; pub const SplConfigItem_SplConfigItem_IsKiosk : SplConfigItem = 14 ; pub const SplConfigItem_SplConfigItem_NewHardwareType : SplConfigItem = 15 ; pub const SplConfigItem_SplConfigItem_NewKeyGeneration : SplConfigItem = 16 ; pub const SplConfigItem_SplConfigItem_Package2Hash : SplConfigItem = 17 ; pub type SplConfigItem = u32 ; pub const RsaKeyVersion_RsaKeyVersion_Deprecated : RsaKeyVersion = 0 ; pub const RsaKeyVersion_RsaKeyVersion_Extended : RsaKeyVersion = 1 ; pub type RsaKeyVersion = u32 ; extern "C" { pub fn splInitialize ( ) -> Result ; } extern "C" { pub fn splExit ( ) ; } extern "C" { pub fn splCryptoInitialize ( ) -> Result ; } extern "C" { pub fn splCryptoExit ( ) ; } extern "C" { pub fn splSslInitialize ( ) -> Result ; } extern "C" { pub fn splSslExit ( ) ; } extern "C" { pub fn splEsInitialize ( ) -> Result ; } extern "C" { pub fn splEsExit ( ) ; } extern "C" { pub fn splFsInitialize ( ) -> Result ; } extern "C" { pub fn splFsExit ( ) ; } extern "C" { pub fn splManuInitialize ( ) -> Result ; } extern "C" { pub fn splManuExit ( ) ; } extern "C" { pub fn splGetConfig ( config_item : SplConfigItem , out_config : * mut u64 ) -> Result ; } extern "C" { pub fn splUserExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , exp : * const ctypes :: c_void , exp_size : usize , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splSetConfig ( config_item : SplConfigItem , value : u64 ) -> Result ; } extern "C" { pub fn splGetRandomBytes ( out : * mut ctypes :: c_void , out_size : usize ) -> Result ; } extern "C" { pub fn splIsDevelopment ( out_is_development : * mut bool ) -> Result ; } extern "C" { pub fn splSetSharedData ( value : u32 ) -> Result ; } extern "C" { pub fn splGetSharedData ( out_value : * mut u32 ) -> Result ; } extern "C" { pub fn splCryptoGenerateAesKek ( wrapped_kek : * const ctypes :: c_void , key_generation : u32 , option : u32 , out_sealed_kek : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoLoadAesKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , keyslot : u32 ) -> Result ; } extern "C" { pub fn splCryptoGenerateAesKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , out_sealed_key : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoDecryptAesKey ( wrapped_key : * const ctypes :: c_void , key_generation : u32 , option : u32 , out_sealed_key : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoCryptAesCtr ( input : * const ctypes :: c_void , output : * mut ctypes :: c_void , size : usize , keyslot : u32 , ctr : * const ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoComputeCmac ( input : * const ctypes :: c_void , size : usize , keyslot : u32 , out_cmac : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoLockAesEngine ( out_keyslot : * mut u32 ) -> Result ; } extern "C" { pub fn splCryptoUnlockAesEngine ( keyslot : u32 ) -> Result ; } extern "C" { pub fn splCryptoGetSecurityEngineEvent ( out_event : * mut Handle ) -> Result ; } extern "C" { pub fn splRsaDecryptPrivateKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion , dst : * mut ctypes :: c_void , dst_size : usize ) -> Result ; } extern "C" { pub fn splSslLoadSecureExpModKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splSslSecureExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splEsLoadRsaOaepKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splEsUnwrapRsaOaepWrappedTitlekey ( rsa_wrapped_titlekey : * const ctypes :: c_void , modulus : * const ctypes :: c_void , label_hash : * const ctypes :: c_void , label_hash_size : usize , key_generation : u32 , out_sealed_titlekey : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splEsUnwrapAesWrappedTitlekey ( aes_wrapped_titlekey : * const ctypes :: c_void , key_generation : u32 , out_sealed_titlekey : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splEsLoadSecureExpModKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splEsSecureExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splFsLoadSecureExpModKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splFsSecureExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splFsGenerateSpecificAesKey ( wrapped_key : * const ctypes :: c_void , key_generation : u32 , option : u32 , out_sealed_key : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splFsLoadTitlekey ( sealed_titlekey : * const ctypes :: c_void , keyslot : u32 ) -> Result ; } extern "C" { pub fn splFsGetPackage2Hash ( out_hash : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splManuEncryptRsaKeyForImport ( sealed_kek_pre : * const ctypes :: c_void , wrapped_key_pre : * const ctypes :: c_void , sealed_kek_post : * const ctypes :: c_void , wrapped_kek_post : * const ctypes :: c_void , option : u32 , wrapped_rsa_key : * const ctypes :: c_void , out_wrapped_rsa_key : * mut ctypes :: c_void , rsa_key_size : usize ) -> Result ; } pub const NcmContentType_NcmContentType_CNMT : NcmContentType = 0 ; pub const NcmContentType_NcmContentType_Program : NcmContentType = 1 ; pub const NcmContentType_NcmContentType_Data : NcmContentType = 2 ; pub const NcmContentType_NcmContentType_Icon : NcmContentType = 3 ; pub const NcmContentType_NcmContentType_Doc : NcmContentType = 4 ; pub const NcmContentType_NcmContentType_Info : NcmContentType = 5 ; pub type NcmContentType = u32 ; # [ repr ( C ) ] pub struct NcmContentStorage { pub s : Service , } # [ test ] fn bindgen_test_layout_NcmContentStorage ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentStorage > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NcmContentStorage ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentStorage > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NcmContentStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentStorage > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentStorage ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct NcmContentMetaDatabase { pub s : Service , } # [ test ] fn bindgen_test_layout_NcmContentMetaDatabase ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentMetaDatabase > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NcmContentMetaDatabase ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentMetaDatabase > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NcmContentMetaDatabase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaDatabase > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaDatabase ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct NcmNcaId { pub c : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_NcmNcaId ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmNcaId > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NcmNcaId ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmNcaId > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( NcmNcaId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmNcaId > ( ) ) ) . c as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmNcaId ) , "::" , stringify ! ( c ) ) ) ; } # [ repr ( C ) ] pub struct NcmMetaRecord { pub titleId : u64 , pub version : u32 , pub type_ : u8 , pub flags : u8 , pub padding : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_NcmMetaRecord ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmMetaRecord > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NcmMetaRecord ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmMetaRecord > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NcmMetaRecord ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . titleId as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( titleId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . version as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . type_ as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . flags as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . padding as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct NcmContentRecord { pub ncaId : NcmNcaId , pub size : [ u8 ; 6usize ] , pub type_ : u8 , pub padding : u8 , } # [ test ] fn bindgen_test_layout_NcmContentRecord ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentRecord > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( NcmContentRecord ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentRecord > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( NcmContentRecord ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . ncaId as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( ncaId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . type_ as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . padding as * const _ as usize } , 23usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct NcmContentMetaRecordsHeader { + pub fn setsysGetFatalDirtyFlags ( flags_0 : * mut u64 , flags_1 : * mut u64 ) -> Result ; } extern "C" { + /// @brief Gets the system's nickname. +/// @param nickname Pointer to output the nickname to. (The buffer size needs to be at least 0x80 bytes) + pub fn setsysGetDeviceNickname ( nickname : * mut ctypes :: c_char ) -> Result ; } extern "C" { + /// @brief Sets the system's nickname. +/// @param nickname Pointer to read the nickname from. + pub fn setsysSetDeviceNickname ( nickname : * const ctypes :: c_char ) -> Result ; } # [ repr ( C ) ] pub struct LrLocationResolver { pub s : Service , } # [ test ] fn bindgen_test_layout_LrLocationResolver ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LrLocationResolver > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( LrLocationResolver ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LrLocationResolver > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( LrLocationResolver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LrLocationResolver > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LrLocationResolver ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct LrRegisteredLocationResolver { pub s : Service , } # [ test ] fn bindgen_test_layout_LrRegisteredLocationResolver ( ) { assert_eq ! ( :: core :: mem :: size_of :: < LrRegisteredLocationResolver > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( LrRegisteredLocationResolver ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < LrRegisteredLocationResolver > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( LrRegisteredLocationResolver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < LrRegisteredLocationResolver > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( LrRegisteredLocationResolver ) , "::" , stringify ! ( s ) ) ) ; } extern "C" { pub fn lrInitialize ( ) -> Result ; } extern "C" { pub fn lrExit ( ) ; } extern "C" { pub fn lrGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn lrOpenLocationResolver ( storage : FsStorageId , out : * mut LrLocationResolver ) -> Result ; } extern "C" { pub fn lrOpenRegisteredLocationResolver ( out : * mut LrRegisteredLocationResolver ) -> Result ; } extern "C" { pub fn lrLrResolveProgramPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectProgramPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveApplicationControlPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveApplicationHtmlDocumentPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveDataPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectApplicationControlPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectApplicationHtmlDocumentPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrResolveLegalInformationPath ( lr : * mut LrLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRedirectLegalInformationPath ( lr : * mut LrLocationResolver , tid : u64 , path : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn lrLrRefresh ( lr : * mut LrLocationResolver ) -> Result ; } extern "C" { pub fn lrRegLrResolveProgramPath ( reg : * mut LrRegisteredLocationResolver , tid : u64 , out : * mut ctypes :: c_char ) -> Result ; } pub const SplConfigItem_SplConfigItem_DisableProgramVerification : SplConfigItem = 1 ; pub const SplConfigItem_SplConfigItem_DramId : SplConfigItem = 2 ; pub const SplConfigItem_SplConfigItem_SecurityEngineIrqNumber : SplConfigItem = 3 ; pub const SplConfigItem_SplConfigItem_Version : SplConfigItem = 4 ; pub const SplConfigItem_SplConfigItem_HardwareType : SplConfigItem = 5 ; pub const SplConfigItem_SplConfigItem_IsRetail : SplConfigItem = 6 ; pub const SplConfigItem_SplConfigItem_IsRecoveryBoot : SplConfigItem = 7 ; pub const SplConfigItem_SplConfigItem_DeviceId : SplConfigItem = 8 ; pub const SplConfigItem_SplConfigItem_BootReason : SplConfigItem = 9 ; pub const SplConfigItem_SplConfigItem_MemoryArrange : SplConfigItem = 10 ; pub const SplConfigItem_SplConfigItem_IsDebugMode : SplConfigItem = 11 ; pub const SplConfigItem_SplConfigItem_KernelMemoryConfiguration : SplConfigItem = 12 ; pub const SplConfigItem_SplConfigItem_IsChargerHiZModeEnabled : SplConfigItem = 13 ; pub const SplConfigItem_SplConfigItem_IsKiosk : SplConfigItem = 14 ; pub const SplConfigItem_SplConfigItem_NewHardwareType : SplConfigItem = 15 ; pub const SplConfigItem_SplConfigItem_NewKeyGeneration : SplConfigItem = 16 ; pub const SplConfigItem_SplConfigItem_Package2Hash : SplConfigItem = 17 ; pub type SplConfigItem = u32 ; pub const RsaKeyVersion_RsaKeyVersion_Deprecated : RsaKeyVersion = 0 ; pub const RsaKeyVersion_RsaKeyVersion_Extended : RsaKeyVersion = 1 ; pub type RsaKeyVersion = u32 ; extern "C" { pub fn splInitialize ( ) -> Result ; } extern "C" { pub fn splExit ( ) ; } extern "C" { pub fn splGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn splCryptoInitialize ( ) -> Result ; } extern "C" { pub fn splCryptoExit ( ) ; } extern "C" { pub fn splCryptoGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn splSslInitialize ( ) -> Result ; } extern "C" { pub fn splSslExit ( ) ; } extern "C" { pub fn splSslGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn splEsInitialize ( ) -> Result ; } extern "C" { pub fn splEsExit ( ) ; } extern "C" { pub fn splEsGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn splFsInitialize ( ) -> Result ; } extern "C" { pub fn splFsExit ( ) ; } extern "C" { pub fn splFsGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn splManuInitialize ( ) -> Result ; } extern "C" { pub fn splManuExit ( ) ; } extern "C" { pub fn splManuGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn splGetConfig ( config_item : SplConfigItem , out_config : * mut u64 ) -> Result ; } extern "C" { pub fn splUserExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , exp : * const ctypes :: c_void , exp_size : usize , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splSetConfig ( config_item : SplConfigItem , value : u64 ) -> Result ; } extern "C" { pub fn splGetRandomBytes ( out : * mut ctypes :: c_void , out_size : usize ) -> Result ; } extern "C" { pub fn splIsDevelopment ( out_is_development : * mut bool ) -> Result ; } extern "C" { pub fn splSetBootReason ( value : u32 ) -> Result ; } extern "C" { pub fn splGetBootReason ( out_value : * mut u32 ) -> Result ; } extern "C" { pub fn splCryptoGenerateAesKek ( wrapped_kek : * const ctypes :: c_void , key_generation : u32 , option : u32 , out_sealed_kek : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoLoadAesKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , keyslot : u32 ) -> Result ; } extern "C" { pub fn splCryptoGenerateAesKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , out_sealed_key : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoDecryptAesKey ( wrapped_key : * const ctypes :: c_void , key_generation : u32 , option : u32 , out_sealed_key : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoCryptAesCtr ( input : * const ctypes :: c_void , output : * mut ctypes :: c_void , size : usize , keyslot : u32 , ctr : * const ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoComputeCmac ( input : * const ctypes :: c_void , size : usize , keyslot : u32 , out_cmac : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splCryptoLockAesEngine ( out_keyslot : * mut u32 ) -> Result ; } extern "C" { pub fn splCryptoUnlockAesEngine ( keyslot : u32 ) -> Result ; } extern "C" { pub fn splCryptoGetSecurityEngineEvent ( out_event : * mut Handle ) -> Result ; } extern "C" { pub fn splRsaDecryptPrivateKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion , dst : * mut ctypes :: c_void , dst_size : usize ) -> Result ; } extern "C" { pub fn splSslLoadSecureExpModKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splSslSecureExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splEsLoadRsaOaepKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splEsUnwrapRsaOaepWrappedTitlekey ( rsa_wrapped_titlekey : * const ctypes :: c_void , modulus : * const ctypes :: c_void , label_hash : * const ctypes :: c_void , label_hash_size : usize , key_generation : u32 , out_sealed_titlekey : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splEsUnwrapAesWrappedTitlekey ( aes_wrapped_titlekey : * const ctypes :: c_void , key_generation : u32 , out_sealed_titlekey : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splEsLoadSecureExpModKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splEsSecureExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splFsLoadSecureExpModKey ( sealed_kek : * const ctypes :: c_void , wrapped_key : * const ctypes :: c_void , wrapped_rsa_key : * const ctypes :: c_void , wrapped_rsa_key_size : usize , version : RsaKeyVersion ) -> Result ; } extern "C" { pub fn splFsSecureExpMod ( input : * const ctypes :: c_void , modulus : * const ctypes :: c_void , dst : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splFsGenerateSpecificAesKey ( wrapped_key : * const ctypes :: c_void , key_generation : u32 , option : u32 , out_sealed_key : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splFsLoadTitlekey ( sealed_titlekey : * const ctypes :: c_void , keyslot : u32 ) -> Result ; } extern "C" { pub fn splFsGetPackage2Hash ( out_hash : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn splManuEncryptRsaKeyForImport ( sealed_kek_pre : * const ctypes :: c_void , wrapped_key_pre : * const ctypes :: c_void , sealed_kek_post : * const ctypes :: c_void , wrapped_kek_post : * const ctypes :: c_void , option : u32 , wrapped_rsa_key : * const ctypes :: c_void , out_wrapped_rsa_key : * mut ctypes :: c_void , rsa_key_size : usize ) -> Result ; } pub const NcmContentType_NcmContentType_CNMT : NcmContentType = 0 ; pub const NcmContentType_NcmContentType_Program : NcmContentType = 1 ; pub const NcmContentType_NcmContentType_Data : NcmContentType = 2 ; pub const NcmContentType_NcmContentType_Icon : NcmContentType = 3 ; pub const NcmContentType_NcmContentType_Doc : NcmContentType = 4 ; pub const NcmContentType_NcmContentType_Info : NcmContentType = 5 ; pub type NcmContentType = u32 ; pub const NcmContentMetaType_NcmContentMetaType_SystemProgram : NcmContentMetaType = 1 ; pub const NcmContentMetaType_NcmContentMetaType_SystemData : NcmContentMetaType = 2 ; pub const NcmContentMetaType_NcmContentMetaType_SystemUpdate : NcmContentMetaType = 3 ; pub const NcmContentMetaType_NcmContentMetaType_BootImagePackage : NcmContentMetaType = 4 ; pub const NcmContentMetaType_NcmContentMetaType_BootImagePackageSafe : NcmContentMetaType = 5 ; pub const NcmContentMetaType_NcmContentMetaType_Application : NcmContentMetaType = 128 ; pub const NcmContentMetaType_NcmContentMetaType_Patch : NcmContentMetaType = 129 ; pub const NcmContentMetaType_NcmContentMetaType_AddOnContent : NcmContentMetaType = 130 ; pub const NcmContentMetaType_NcmContentMetaType_Delta : NcmContentMetaType = 131 ; pub type NcmContentMetaType = u32 ; pub const NcmContentMetaAttribute_NcmContentMetaAttribute_Exfat : NcmContentMetaAttribute = 1 ; pub const NcmContentMetaAttribute_NcmContentMetaAttribute_Rebootless : NcmContentMetaAttribute = 2 ; pub type NcmContentMetaAttribute = u32 ; # [ repr ( C ) ] pub struct NcmContentStorage { pub s : Service , } # [ test ] fn bindgen_test_layout_NcmContentStorage ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentStorage > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NcmContentStorage ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentStorage > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NcmContentStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentStorage > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentStorage ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct NcmContentMetaDatabase { pub s : Service , } # [ test ] fn bindgen_test_layout_NcmContentMetaDatabase ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentMetaDatabase > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NcmContentMetaDatabase ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentMetaDatabase > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NcmContentMetaDatabase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaDatabase > ( ) ) ) . s as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaDatabase ) , "::" , stringify ! ( s ) ) ) ; } # [ repr ( C ) ] pub struct NcmNcaId { pub c : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_NcmNcaId ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmNcaId > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NcmNcaId ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmNcaId > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( NcmNcaId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmNcaId > ( ) ) ) . c as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmNcaId ) , "::" , stringify ! ( c ) ) ) ; } # [ repr ( C ) ] pub struct NcmMetaRecord { pub titleId : u64 , pub version : u32 , pub type_ : u8 , pub flags : u8 , pub padding : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_NcmMetaRecord ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmMetaRecord > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NcmMetaRecord ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmMetaRecord > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NcmMetaRecord ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . titleId as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( titleId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . version as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . type_ as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . flags as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmMetaRecord > ( ) ) ) . padding as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( NcmMetaRecord ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct NcmContentRecord { pub ncaId : NcmNcaId , pub size : [ u8 ; 6usize ] , pub type_ : u8 , pub padding : u8 , } # [ test ] fn bindgen_test_layout_NcmContentRecord ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentRecord > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( NcmContentRecord ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentRecord > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( NcmContentRecord ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . ncaId as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( ncaId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . type_ as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentRecord > ( ) ) ) . padding as * const _ as usize } , 23usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentRecord ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct NcmContentMetaRecordsHeader { /// < Size of optional struct that comes after this one. pub numExtraBytes : u16 , /// < Number of NcmContentRecord entries after the extra bytes. @@ -2811,7 +4097,7 @@ where /// < Number of NcmMetaRecord entries that come after the NcmContentRecords. pub numMetaRecords : u16 , /// < Always zero. - pub padding : u16 , } # [ test ] fn bindgen_test_layout_NcmContentMetaRecordsHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentMetaRecordsHeader > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( NcmContentMetaRecordsHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentMetaRecordsHeader > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( NcmContentMetaRecordsHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . numExtraBytes as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( numExtraBytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . numContentRecords as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( numContentRecords ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . numMetaRecords as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( numMetaRecords ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . padding as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct NcmApplicationContentMetaKey { pub metaRecord : NcmMetaRecord , pub baseTitleId : u64 , } # [ test ] fn bindgen_test_layout_NcmApplicationContentMetaKey ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmApplicationContentMetaKey > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( NcmApplicationContentMetaKey ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmApplicationContentMetaKey > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NcmApplicationContentMetaKey ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmApplicationContentMetaKey > ( ) ) ) . metaRecord as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmApplicationContentMetaKey ) , "::" , stringify ! ( metaRecord ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmApplicationContentMetaKey > ( ) ) ) . baseTitleId as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NcmApplicationContentMetaKey ) , "::" , stringify ! ( baseTitleId ) ) ) ; } # [ repr ( C ) ] pub struct NcmRightsId { pub c : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_NcmRightsId ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmRightsId > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NcmRightsId ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmRightsId > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( NcmRightsId ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmRightsId > ( ) ) ) . c as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmRightsId ) , "::" , stringify ! ( c ) ) ) ; } extern "C" { pub fn ncmInitialize ( ) -> Result ; } extern "C" { pub fn ncmExit ( ) ; } extern "C" { pub fn ncmOpenContentStorage ( storage : FsStorageId , out : * mut NcmContentStorage ) -> Result ; } extern "C" { pub fn ncmOpenContentMetaDatabase ( storage : FsStorageId , out : * mut NcmContentMetaDatabase ) -> Result ; } extern "C" { pub fn ncmContentStorageGeneratePlaceHolderId ( cs : * mut NcmContentStorage , outputId : * mut NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageCreatePlaceHolder ( cs : * mut NcmContentStorage , registeredId : * const NcmNcaId , placeholderId : * const NcmNcaId , size : u64 ) -> Result ; } extern "C" { pub fn ncmContentStorageDeletePlaceHolder ( cs : * mut NcmContentStorage , placeholderId : * const NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageWritePlaceHolder ( cs : * mut NcmContentStorage , placeholderId : * const NcmNcaId , offset : u64 , srcData : * const ctypes :: c_void , srcDataSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageRegister ( cs : * mut NcmContentStorage , registeredId : * const NcmNcaId , placeholderId : * const NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageDelete ( cs : * mut NcmContentStorage , registeredId : * const NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageHas ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut bool ) -> Result ; } extern "C" { pub fn ncmContentStorageGetPath ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut ctypes :: c_char , outSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageGetPlaceHolderPath ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut ctypes :: c_char , outSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageCleanupAllPlaceHolder ( cs : * mut NcmContentStorage ) -> Result ; } extern "C" { pub fn ncmContentStorageGetSize ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut u64 ) -> Result ; } extern "C" { pub fn ncmContentStorageDisableForcibly ( cs : * mut NcmContentStorage ) -> Result ; } extern "C" { pub fn ncmContentStorageReadContentIdFile ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , offset : u64 , outBuf : * mut ctypes :: c_void , bufSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageGetRightsIdFromContentId ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , rightsIdOut : * mut NcmRightsId , keyGenerationOut : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseSet ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , inDataSize : u64 , srcRecordsData : * const NcmContentMetaRecordsHeader ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGet ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , outDataSize : u64 , outRecordsData : * mut NcmContentMetaRecordsHeader , sizeRead : * mut u64 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseRemove ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGetContentIdByType ( db : * mut NcmContentMetaDatabase , contentType : NcmContentType , record : * const NcmMetaRecord , out : * mut NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseListContentInfo ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , index : u32 , contentRecordsOut : * mut NcmContentRecord , contentRecordsBufSize : usize , numEntriesRead : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseList ( db : * mut NcmContentMetaDatabase , titleType : u32 , titleIdExact : u64 , titleIdLow : u64 , titleIdHigh : u64 , metaRecordsOut : * mut NcmMetaRecord , metaRecordsBufSize : usize , numEntriesWritten : * mut u32 , numEntriesTotal : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGetLatestContentMetaKey ( db : * mut NcmContentMetaDatabase , titleId : u64 , out : * mut NcmMetaRecord ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseListApplication ( db : * mut NcmContentMetaDatabase , filter : u8 , outBuf : * mut NcmApplicationContentMetaKey , outBufSize : usize , numEntriesWritten : * mut u32 , numEntriesTotal : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseHas ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , out : * mut bool ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseDisableForcibly ( db : * mut NcmContentMetaDatabase ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseCommit ( db : * mut NcmContentMetaDatabase ) -> Result ; } + pub padding : u16 , } # [ test ] fn bindgen_test_layout_NcmContentMetaRecordsHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmContentMetaRecordsHeader > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( NcmContentMetaRecordsHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmContentMetaRecordsHeader > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( NcmContentMetaRecordsHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . numExtraBytes as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( numExtraBytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . numContentRecords as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( numContentRecords ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . numMetaRecords as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( numMetaRecords ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmContentMetaRecordsHeader > ( ) ) ) . padding as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( NcmContentMetaRecordsHeader ) , "::" , stringify ! ( padding ) ) ) ; } # [ repr ( C ) ] pub struct NcmApplicationContentMetaKey { pub metaRecord : NcmMetaRecord , pub baseTitleId : u64 , } # [ test ] fn bindgen_test_layout_NcmApplicationContentMetaKey ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NcmApplicationContentMetaKey > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( NcmApplicationContentMetaKey ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NcmApplicationContentMetaKey > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NcmApplicationContentMetaKey ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmApplicationContentMetaKey > ( ) ) ) . metaRecord as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NcmApplicationContentMetaKey ) , "::" , stringify ! ( metaRecord ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NcmApplicationContentMetaKey > ( ) ) ) . baseTitleId as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NcmApplicationContentMetaKey ) , "::" , stringify ! ( baseTitleId ) ) ) ; } extern "C" { pub fn ncmInitialize ( ) -> Result ; } extern "C" { pub fn ncmExit ( ) ; } extern "C" { pub fn ncmGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn ncmOpenContentStorage ( storage : FsStorageId , out : * mut NcmContentStorage ) -> Result ; } extern "C" { pub fn ncmOpenContentMetaDatabase ( storage : FsStorageId , out : * mut NcmContentMetaDatabase ) -> Result ; } extern "C" { pub fn ncmContentStorageGeneratePlaceHolderId ( cs : * mut NcmContentStorage , outputId : * mut NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageCreatePlaceHolder ( cs : * mut NcmContentStorage , registeredId : * const NcmNcaId , placeholderId : * const NcmNcaId , size : u64 ) -> Result ; } extern "C" { pub fn ncmContentStorageDeletePlaceHolder ( cs : * mut NcmContentStorage , placeholderId : * const NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageWritePlaceHolder ( cs : * mut NcmContentStorage , placeholderId : * const NcmNcaId , offset : u64 , srcData : * const ctypes :: c_void , srcDataSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageRegister ( cs : * mut NcmContentStorage , registeredId : * const NcmNcaId , placeholderId : * const NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageDelete ( cs : * mut NcmContentStorage , registeredId : * const NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentStorageHas ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut bool ) -> Result ; } extern "C" { pub fn ncmContentStorageGetPath ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut ctypes :: c_char , outSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageGetPlaceHolderPath ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut ctypes :: c_char , outSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageCleanupAllPlaceHolder ( cs : * mut NcmContentStorage ) -> Result ; } extern "C" { pub fn ncmContentStorageGetSize ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , out : * mut u64 ) -> Result ; } extern "C" { pub fn ncmContentStorageDisableForcibly ( cs : * mut NcmContentStorage ) -> Result ; } extern "C" { pub fn ncmContentStorageReadContentIdFile ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , offset : u64 , outBuf : * mut ctypes :: c_void , bufSize : usize ) -> Result ; } extern "C" { pub fn ncmContentStorageGetRightsIdFromContentId ( cs : * mut NcmContentStorage , ncaId : * const NcmNcaId , rightsIdOut : * mut FsRightsId , keyGenerationOut : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseSet ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , inDataSize : u64 , srcRecordsData : * const NcmContentMetaRecordsHeader ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGet ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , outDataSize : u64 , outRecordsData : * mut NcmContentMetaRecordsHeader , sizeRead : * mut u64 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseRemove ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGetContentIdByType ( db : * mut NcmContentMetaDatabase , contentType : NcmContentType , record : * const NcmMetaRecord , out : * mut NcmNcaId ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseListContentInfo ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , index : u32 , contentRecordsOut : * mut NcmContentRecord , contentRecordsBufSize : usize , numEntriesRead : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseList ( db : * mut NcmContentMetaDatabase , titleType : u32 , titleIdExact : u64 , titleIdLow : u64 , titleIdHigh : u64 , metaRecordsOut : * mut NcmMetaRecord , metaRecordsBufSize : usize , numEntriesWritten : * mut u32 , numEntriesTotal : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGetLatestContentMetaKey ( db : * mut NcmContentMetaDatabase , titleId : u64 , out : * mut NcmMetaRecord ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseListApplication ( db : * mut NcmContentMetaDatabase , filter : u8 , outBuf : * mut NcmApplicationContentMetaKey , outBufSize : usize , numEntriesWritten : * mut u32 , numEntriesTotal : * mut u32 ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseHas ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , out : * mut bool ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseDisableForcibly ( db : * mut NcmContentMetaDatabase ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseCommit ( db : * mut NcmContentMetaDatabase ) -> Result ; } extern "C" { pub fn ncmContentMetaDatabaseGetAttributes ( db : * mut NcmContentMetaDatabase , record : * const NcmMetaRecord , out : * mut u8 ) -> Result ; } /// < Everything is awake. pub const PscPmState_PscPmState_Awake : PscPmState = 0 ; /// < Preparing to transition to awake. @@ -2823,13 +4109,9 @@ where /// < Critical services are ready to wake up. pub const PscPmState_PscPmState_ReadyAwakenCritical : PscPmState = 4 ; /// < Preparing to transition to shutdown. - pub const PscPmState_PscPmState_ReadyShutdown : PscPmState = 5 ; pub type PscPmState = u32 ; # [ repr ( C ) ] pub struct PscPmModule { pub event : Event , pub srv : Service , pub module_id : u16 , } # [ test ] fn bindgen_test_layout_PscPmModule ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PscPmModule > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PscPmModule ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PscPmModule > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PscPmModule ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PscPmModule > ( ) ) ) . event as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PscPmModule ) , "::" , stringify ! ( event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PscPmModule > ( ) ) ) . srv as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PscPmModule ) , "::" , stringify ! ( srv ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PscPmModule > ( ) ) ) . module_id as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( PscPmModule ) , "::" , stringify ! ( module_id ) ) ) ; } extern "C" { pub fn pscInitialize ( ) -> Result ; } extern "C" { pub fn pscExit ( ) ; } extern "C" { pub fn pscGetPmModule ( out : * mut PscPmModule , module_id : u16 , dependencies : * const u16 , dependency_count : usize , autoclear : bool ) -> Result ; } extern "C" { pub fn pscPmModuleGetRequest ( module : * mut PscPmModule , out_state : * mut PscPmState , out_flags : * mut u32 ) -> Result ; } extern "C" { pub fn pscPmModuleAcknowledge ( module : * mut PscPmModule , state : PscPmState ) -> Result ; } extern "C" { pub fn pscPmModuleFinalize ( module : * mut PscPmModule ) -> Result ; } # [ repr ( C ) ] pub struct CapsScreenShotAttribute { pub unk_x0 : u32 , pub unk_x4 : [ u8 ; 60usize ] , } # [ test ] fn bindgen_test_layout_CapsScreenShotAttribute ( ) { assert_eq ! ( :: core :: mem :: size_of :: < CapsScreenShotAttribute > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( CapsScreenShotAttribute ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < CapsScreenShotAttribute > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( CapsScreenShotAttribute ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsScreenShotAttribute > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( CapsScreenShotAttribute ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsScreenShotAttribute > ( ) ) ) . unk_x4 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( CapsScreenShotAttribute ) , "::" , stringify ! ( unk_x4 ) ) ) ; } - /// AlbumEntry - # [ repr ( C ) ] pub struct CapsAlbumEntry { pub unk_x0 : [ u8 ; 32usize ] , } # [ test ] fn bindgen_test_layout_CapsAlbumEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < CapsAlbumEntry > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( CapsAlbumEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < CapsAlbumEntry > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( CapsAlbumEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsAlbumEntry > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( CapsAlbumEntry ) , "::" , stringify ! ( unk_x0 ) ) ) ; } - /// ApplicationAlbumEntry - # [ repr ( C ) ] pub struct CapsApplicationAlbumEntry { pub unk_x0 : [ u8 ; 32usize ] , } # [ test ] fn bindgen_test_layout_CapsApplicationAlbumEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < CapsApplicationAlbumEntry > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( CapsApplicationAlbumEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < CapsApplicationAlbumEntry > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( CapsApplicationAlbumEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < CapsApplicationAlbumEntry > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( CapsApplicationAlbumEntry ) , "::" , stringify ! ( unk_x0 ) ) ) ; } extern "C" { + pub const PscPmState_PscPmState_ReadyShutdown : PscPmState = 5 ; pub type PscPmState = u32 ; # [ repr ( C ) ] pub struct PscPmModule { pub event : Event , pub srv : Service , pub module_id : u16 , } # [ test ] fn bindgen_test_layout_PscPmModule ( ) { assert_eq ! ( :: core :: mem :: size_of :: < PscPmModule > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( PscPmModule ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < PscPmModule > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( PscPmModule ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PscPmModule > ( ) ) ) . event as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( PscPmModule ) , "::" , stringify ! ( event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PscPmModule > ( ) ) ) . srv as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( PscPmModule ) , "::" , stringify ! ( srv ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < PscPmModule > ( ) ) ) . module_id as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( PscPmModule ) , "::" , stringify ! ( module_id ) ) ) ; } extern "C" { pub fn pscInitialize ( ) -> Result ; } extern "C" { pub fn pscExit ( ) ; } extern "C" { pub fn pscGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn pscGetPmModule ( out : * mut PscPmModule , module_id : u16 , dependencies : * const u16 , dependency_count : usize , autoclear : bool ) -> Result ; } extern "C" { pub fn pscPmModuleGetRequest ( module : * mut PscPmModule , out_state : * mut PscPmState , out_flags : * mut u32 ) -> Result ; } extern "C" { pub fn pscPmModuleAcknowledge ( module : * mut PscPmModule , state : PscPmState ) -> Result ; } extern "C" { pub fn pscPmModuleFinalize ( module : * mut PscPmModule ) -> Result ; } extern "C" { /// Initialize caps:sc. Only available on 2.0.0+. - pub fn capsscInitialize ( ) -> Result ; } extern "C" { pub fn capsscExit ( ) ; } extern "C" { + pub fn capsscInitialize ( ) -> Result ; } extern "C" { pub fn capsscExit ( ) ; } extern "C" { pub fn capsscGetServiceSession ( ) -> * mut Service ; } extern "C" { /// @brief This takes a screenshot, with the screenshot being written into the output buffer. /// @note Not available with 5.0.0+ (stubbed). /// @note buffer_index and buffer_count correspond to buffers with size 0x384000(1280*720*4). These must not be negative. @@ -2843,7 +4125,7 @@ where /// @param timeout Timeout in nanoseconds. A default value of 100000000 can be used. pub fn capsscCaptureScreenshot ( buf : * mut ctypes :: c_void , size : usize , inval : u32 , width : u64 , height : u64 , buffer_count : s64 , buffer_index : s64 , timeout : u64 ) -> Result ; } extern "C" { /// Initialize caps:su. Only available on 4.0.0+. - pub fn capssuInitialize ( ) -> Result ; } extern "C" { pub fn capssuExit ( ) ; } extern "C" { + pub fn capssuInitialize ( ) -> Result ; } extern "C" { pub fn capssuExit ( ) ; } extern "C" { pub fn capssuGetServiceSession ( ) -> * mut Service ; } extern "C" { /// Same as \ref capssuSaveScreenShotEx0, except this uses an all-zero CapsScreenShotAttribute where the first u32 is set to attr_val. attr_val can be zero. pub fn capssuSaveScreenShot ( buffer : * const ctypes :: c_void , size : usize , unk : u32 , attr_val : u32 , out : * mut CapsApplicationAlbumEntry ) -> Result ; } extern "C" { /// Saves an Album screenshot using the specified gfx data in buffer (1280x720 RGBA8), size must be at least 0x384000. unk can be zero. @@ -2867,7 +4149,7 @@ where /// < WLAN is connected. pub const WlanInfState_WlanInfState_Connected : WlanInfState = 3 ; /// WLAN State. - pub type WlanInfState = u32 ; extern "C" { pub fn wlaninfInitialize ( ) -> Result ; } extern "C" { pub fn wlaninfExit ( ) ; } extern "C" { pub fn wlaninfGetState ( out : * mut WlanInfState ) -> Result ; } extern "C" { + pub type WlanInfState = u32 ; extern "C" { pub fn wlaninfInitialize ( ) -> Result ; } extern "C" { pub fn wlaninfExit ( ) ; } extern "C" { pub fn wlaninfGetServiceSession ( ) -> * mut Service ; } extern "C" { pub fn wlaninfGetState ( out : * mut WlanInfState ) -> Result ; } extern "C" { /// Value goes from -30 (really good signal) to -90 (barely enough to stay connected) /// on a logarithmic scale pub fn wlaninfGetRSSI ( out : * mut s32 ) -> Result ; } extern "C" { pub fn pctlInitialize ( ) -> Result ; } extern "C" { pub fn pctlExit ( ) ; } extern "C" { @@ -2878,15 +4160,15 @@ where /// Reset the confirmation done by \ref pctlConfirmStereoVisionPermission. Only available with [5.0.0+]. pub fn pctlResetConfirmedStereoVisionPermission ( ) -> Result ; } extern "C" { /// Gets whether VrMode is allowed. Only available with [5.0.0+]. - pub fn pctlIsStereoVisionPermitted ( flag : * mut bool ) -> Result ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct Binder { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub id : s32 , pub ipc_buffer_size : usize , } # [ test ] fn bindgen_test_layout_Binder ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Binder > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( Binder ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Binder > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Binder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Binder > ( ) ) ) . id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( Binder ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Binder > ( ) ) ) . ipc_buffer_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Binder ) , "::" , stringify ! ( ipc_buffer_size ) ) ) ; } impl Binder { # [ inline ] pub fn created ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_created ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn initialized ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_initialized ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn has_transact_auto ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 2usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_has_transact_auto ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 2usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( created : bool , initialized : bool , has_transact_auto : bool ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let created : u8 = unsafe { :: core :: mem :: transmute ( created ) } ; created as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let initialized : u8 = unsafe { :: core :: mem :: transmute ( initialized ) } ; initialized as u64 } ) ; __bindgen_bitfield_unit . set ( 2usize , 1u8 , { let has_transact_auto : u8 = unsafe { :: core :: mem :: transmute ( has_transact_auto ) } ; has_transact_auto as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { pub fn binderCreate ( b : * mut Binder , id : s32 ) ; } extern "C" { pub fn binderClose ( b : * mut Binder ) ; } extern "C" { pub fn binderInitSession ( b : * mut Binder ) -> Result ; } extern "C" { pub fn binderTransactParcel ( b : * mut Binder , code : u32 , parcel_data : * mut ctypes :: c_void , parcel_data_size : usize , parcel_reply : * mut ctypes :: c_void , parcel_reply_size : usize , flags : u32 ) -> Result ; } extern "C" { pub fn binderConvertErrorCode ( code : s32 ) -> Result ; } extern "C" { pub fn binderAdjustRefcount ( b : * mut Binder , addval : s32 , type_ : s32 ) -> Result ; } extern "C" { pub fn binderGetNativeHandle ( b : * mut Binder , unk0 : u32 , event_out : * mut Event ) -> Result ; } # [ repr ( C ) ] pub struct ParcelHeader { pub payload_size : u32 , pub payload_off : u32 , pub objects_size : u32 , pub objects_off : u32 , } # [ test ] fn bindgen_test_layout_ParcelHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ParcelHeader > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ParcelHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ParcelHeader > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ParcelHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . payload_size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( payload_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . payload_off as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( payload_off ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . objects_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( objects_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . objects_off as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( objects_off ) ) ) ; } # [ repr ( C ) ] pub struct Parcel { pub payload : [ u8 ; 1024usize ] , pub payload_size : u32 , pub objects : * mut u8 , pub objects_size : u32 , pub capacity : u32 , pub pos : u32 , } # [ test ] fn bindgen_test_layout_Parcel ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Parcel > ( ) , 1056usize , concat ! ( "Size of: " , stringify ! ( Parcel ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Parcel > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Parcel ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . payload as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( payload ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . payload_size as * const _ as usize } , 1024usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( payload_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . objects as * const _ as usize } , 1032usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( objects ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . objects_size as * const _ as usize } , 1040usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( objects_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . capacity as * const _ as usize } , 1044usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( capacity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . pos as * const _ as usize } , 1048usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( pos ) ) ) ; } extern "C" { pub fn parcelCreate ( ctx : * mut Parcel ) ; } extern "C" { pub fn parcelTransact ( session : * mut Binder , code : u32 , in_parcel : * mut Parcel , reply_parcel : * mut Parcel ) -> Result ; } extern "C" { pub fn parcelWriteData ( ctx : * mut Parcel , data : * const ctypes :: c_void , data_size : usize ) -> * mut ctypes :: c_void ; } extern "C" { pub fn parcelReadData ( ctx : * mut Parcel , data : * mut ctypes :: c_void , data_size : usize ) -> * mut ctypes :: c_void ; } extern "C" { pub fn parcelWriteInt32 ( ctx : * mut Parcel , val : s32 ) ; } extern "C" { pub fn parcelWriteUInt32 ( ctx : * mut Parcel , val : u32 ) ; } extern "C" { pub fn parcelWriteString16 ( ctx : * mut Parcel , str : * const ctypes :: c_char ) ; } extern "C" { pub fn parcelReadInt32 ( ctx : * mut Parcel ) -> s32 ; } extern "C" { pub fn parcelReadUInt32 ( ctx : * mut Parcel ) -> u32 ; } extern "C" { pub fn parcelWriteInterfaceToken ( ctx : * mut Parcel , str : * const ctypes :: c_char ) ; } extern "C" { pub fn parcelReadFlattenedObject ( ctx : * mut Parcel , size : * mut usize ) -> * mut ctypes :: c_void ; } extern "C" { pub fn parcelWriteFlattenedObject ( ctx : * mut Parcel , data : * const ctypes :: c_void , size : usize ) -> * mut ctypes :: c_void ; } pub const PIXEL_FORMAT_RGBA_8888 : _bindgen_ty_6 = 1 ; pub const PIXEL_FORMAT_RGBX_8888 : _bindgen_ty_6 = 2 ; pub const PIXEL_FORMAT_RGB_888 : _bindgen_ty_6 = 3 ; pub const PIXEL_FORMAT_RGB_565 : _bindgen_ty_6 = 4 ; pub const PIXEL_FORMAT_BGRA_8888 : _bindgen_ty_6 = 5 ; pub const PIXEL_FORMAT_RGBA_5551 : _bindgen_ty_6 = 6 ; pub const PIXEL_FORMAT_RGBA_4444 : _bindgen_ty_6 = 7 ; pub const PIXEL_FORMAT_YCRCB_420_SP : _bindgen_ty_6 = 17 ; pub const PIXEL_FORMAT_RAW16 : _bindgen_ty_6 = 32 ; pub const PIXEL_FORMAT_BLOB : _bindgen_ty_6 = 33 ; pub const PIXEL_FORMAT_IMPLEMENTATION_DEFINED : _bindgen_ty_6 = 34 ; pub const PIXEL_FORMAT_YCBCR_420_888 : _bindgen_ty_6 = 35 ; pub const PIXEL_FORMAT_Y8 : _bindgen_ty_6 = 538982489 ; pub const PIXEL_FORMAT_Y16 : _bindgen_ty_6 = 540422489 ; pub const PIXEL_FORMAT_YV12 : _bindgen_ty_6 = 842094169 ; pub type _bindgen_ty_6 = u32 ; pub const GRALLOC_USAGE_SW_READ_NEVER : _bindgen_ty_7 = 0 ; pub const GRALLOC_USAGE_SW_READ_RARELY : _bindgen_ty_7 = 2 ; pub const GRALLOC_USAGE_SW_READ_OFTEN : _bindgen_ty_7 = 3 ; pub const GRALLOC_USAGE_SW_READ_MASK : _bindgen_ty_7 = 15 ; pub const GRALLOC_USAGE_SW_WRITE_NEVER : _bindgen_ty_7 = 0 ; pub const GRALLOC_USAGE_SW_WRITE_RARELY : _bindgen_ty_7 = 32 ; pub const GRALLOC_USAGE_SW_WRITE_OFTEN : _bindgen_ty_7 = 48 ; pub const GRALLOC_USAGE_SW_WRITE_MASK : _bindgen_ty_7 = 240 ; pub const GRALLOC_USAGE_HW_TEXTURE : _bindgen_ty_7 = 256 ; pub const GRALLOC_USAGE_HW_RENDER : _bindgen_ty_7 = 512 ; pub const GRALLOC_USAGE_HW_2D : _bindgen_ty_7 = 1024 ; pub const GRALLOC_USAGE_HW_COMPOSER : _bindgen_ty_7 = 2048 ; pub const GRALLOC_USAGE_HW_FB : _bindgen_ty_7 = 4096 ; pub const GRALLOC_USAGE_EXTERNAL_DISP : _bindgen_ty_7 = 8192 ; pub const GRALLOC_USAGE_PROTECTED : _bindgen_ty_7 = 16384 ; pub const GRALLOC_USAGE_CURSOR : _bindgen_ty_7 = 32768 ; pub const GRALLOC_USAGE_HW_VIDEO_ENCODER : _bindgen_ty_7 = 65536 ; pub const GRALLOC_USAGE_HW_CAMERA_WRITE : _bindgen_ty_7 = 131072 ; pub const GRALLOC_USAGE_HW_CAMERA_READ : _bindgen_ty_7 = 262144 ; pub const GRALLOC_USAGE_HW_CAMERA_ZSL : _bindgen_ty_7 = 393216 ; pub const GRALLOC_USAGE_HW_CAMERA_MASK : _bindgen_ty_7 = 393216 ; pub const GRALLOC_USAGE_HW_MASK : _bindgen_ty_7 = 466688 ; pub const GRALLOC_USAGE_RENDERSCRIPT : _bindgen_ty_7 = 1048576 ; pub type _bindgen_ty_7 = u32 ; pub const NATIVE_WINDOW_WIDTH : _bindgen_ty_8 = 0 ; pub const NATIVE_WINDOW_HEIGHT : _bindgen_ty_8 = 1 ; pub const NATIVE_WINDOW_FORMAT : _bindgen_ty_8 = 2 ; pub type _bindgen_ty_8 = u32 ; pub const NATIVE_WINDOW_API_CPU : _bindgen_ty_9 = 2 ; pub type _bindgen_ty_9 = u32 ; pub const HAL_TRANSFORM_FLIP_H : _bindgen_ty_10 = 1 ; pub const HAL_TRANSFORM_FLIP_V : _bindgen_ty_10 = 2 ; pub const HAL_TRANSFORM_ROT_90 : _bindgen_ty_10 = 4 ; pub const HAL_TRANSFORM_ROT_180 : _bindgen_ty_10 = 3 ; pub const HAL_TRANSFORM_ROT_270 : _bindgen_ty_10 = 7 ; + pub fn pctlIsStereoVisionPermitted ( flag : * mut bool ) -> Result ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct Binder { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub id : s32 , pub ipc_buffer_size : usize , pub relay : * mut Service , } # [ test ] fn bindgen_test_layout_Binder ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Binder > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( Binder ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Binder > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Binder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Binder > ( ) ) ) . id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( Binder ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Binder > ( ) ) ) . ipc_buffer_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Binder ) , "::" , stringify ! ( ipc_buffer_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Binder > ( ) ) ) . relay as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( Binder ) , "::" , stringify ! ( relay ) ) ) ; } impl Binder { # [ inline ] pub fn created ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_created ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn initialized ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_initialized ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn has_transact_auto ( & self ) -> bool { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 2usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_has_transact_auto ( & mut self , val : bool ) { unsafe { let val : u8 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 2usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( created : bool , initialized : bool , has_transact_auto : bool ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let created : u8 = unsafe { :: core :: mem :: transmute ( created ) } ; created as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let initialized : u8 = unsafe { :: core :: mem :: transmute ( initialized ) } ; initialized as u64 } ) ; __bindgen_bitfield_unit . set ( 2usize , 1u8 , { let has_transact_auto : u8 = unsafe { :: core :: mem :: transmute ( has_transact_auto ) } ; has_transact_auto as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { pub fn binderCreate ( b : * mut Binder , id : s32 ) ; } extern "C" { pub fn binderClose ( b : * mut Binder ) ; } extern "C" { pub fn binderInitSession ( b : * mut Binder , relay : * mut Service ) -> Result ; } extern "C" { pub fn binderTransactParcel ( b : * mut Binder , code : u32 , parcel_data : * mut ctypes :: c_void , parcel_data_size : usize , parcel_reply : * mut ctypes :: c_void , parcel_reply_size : usize , flags : u32 ) -> Result ; } extern "C" { pub fn binderConvertErrorCode ( code : s32 ) -> Result ; } extern "C" { pub fn binderAdjustRefcount ( b : * mut Binder , addval : s32 , type_ : s32 ) -> Result ; } extern "C" { pub fn binderGetNativeHandle ( b : * mut Binder , unk0 : u32 , event_out : * mut Event ) -> Result ; } # [ repr ( C ) ] pub struct ParcelHeader { pub payload_size : u32 , pub payload_off : u32 , pub objects_size : u32 , pub objects_off : u32 , } # [ test ] fn bindgen_test_layout_ParcelHeader ( ) { assert_eq ! ( :: core :: mem :: size_of :: < ParcelHeader > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ParcelHeader ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < ParcelHeader > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ParcelHeader ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . payload_size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( payload_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . payload_off as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( payload_off ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . objects_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( objects_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < ParcelHeader > ( ) ) ) . objects_off as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( ParcelHeader ) , "::" , stringify ! ( objects_off ) ) ) ; } # [ repr ( C ) ] pub struct Parcel { pub payload : [ u8 ; 1024usize ] , pub payload_size : u32 , pub objects : * mut u8 , pub objects_size : u32 , pub capacity : u32 , pub pos : u32 , } # [ test ] fn bindgen_test_layout_Parcel ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Parcel > ( ) , 1056usize , concat ! ( "Size of: " , stringify ! ( Parcel ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Parcel > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Parcel ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . payload as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( payload ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . payload_size as * const _ as usize } , 1024usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( payload_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . objects as * const _ as usize } , 1032usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( objects ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . objects_size as * const _ as usize } , 1040usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( objects_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . capacity as * const _ as usize } , 1044usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( capacity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Parcel > ( ) ) ) . pos as * const _ as usize } , 1048usize , concat ! ( "Offset of field: " , stringify ! ( Parcel ) , "::" , stringify ! ( pos ) ) ) ; } extern "C" { pub fn parcelCreate ( ctx : * mut Parcel ) ; } extern "C" { pub fn parcelTransact ( session : * mut Binder , code : u32 , in_parcel : * mut Parcel , reply_parcel : * mut Parcel ) -> Result ; } extern "C" { pub fn parcelWriteData ( ctx : * mut Parcel , data : * const ctypes :: c_void , data_size : usize ) -> * mut ctypes :: c_void ; } extern "C" { pub fn parcelReadData ( ctx : * mut Parcel , data : * mut ctypes :: c_void , data_size : usize ) -> * mut ctypes :: c_void ; } extern "C" { pub fn parcelWriteInt32 ( ctx : * mut Parcel , val : s32 ) ; } extern "C" { pub fn parcelWriteUInt32 ( ctx : * mut Parcel , val : u32 ) ; } extern "C" { pub fn parcelWriteString16 ( ctx : * mut Parcel , str : * const ctypes :: c_char ) ; } extern "C" { pub fn parcelReadInt32 ( ctx : * mut Parcel ) -> s32 ; } extern "C" { pub fn parcelReadUInt32 ( ctx : * mut Parcel ) -> u32 ; } extern "C" { pub fn parcelWriteInterfaceToken ( ctx : * mut Parcel , str : * const ctypes :: c_char ) ; } extern "C" { pub fn parcelReadFlattenedObject ( ctx : * mut Parcel , size : * mut usize ) -> * mut ctypes :: c_void ; } extern "C" { pub fn parcelWriteFlattenedObject ( ctx : * mut Parcel , data : * const ctypes :: c_void , size : usize ) -> * mut ctypes :: c_void ; } pub const PIXEL_FORMAT_RGBA_8888 : _bindgen_ty_6 = 1 ; pub const PIXEL_FORMAT_RGBX_8888 : _bindgen_ty_6 = 2 ; pub const PIXEL_FORMAT_RGB_888 : _bindgen_ty_6 = 3 ; pub const PIXEL_FORMAT_RGB_565 : _bindgen_ty_6 = 4 ; pub const PIXEL_FORMAT_BGRA_8888 : _bindgen_ty_6 = 5 ; pub const PIXEL_FORMAT_RGBA_5551 : _bindgen_ty_6 = 6 ; pub const PIXEL_FORMAT_RGBA_4444 : _bindgen_ty_6 = 7 ; pub const PIXEL_FORMAT_YCRCB_420_SP : _bindgen_ty_6 = 17 ; pub const PIXEL_FORMAT_RAW16 : _bindgen_ty_6 = 32 ; pub const PIXEL_FORMAT_BLOB : _bindgen_ty_6 = 33 ; pub const PIXEL_FORMAT_IMPLEMENTATION_DEFINED : _bindgen_ty_6 = 34 ; pub const PIXEL_FORMAT_YCBCR_420_888 : _bindgen_ty_6 = 35 ; pub const PIXEL_FORMAT_Y8 : _bindgen_ty_6 = 538982489 ; pub const PIXEL_FORMAT_Y16 : _bindgen_ty_6 = 540422489 ; pub const PIXEL_FORMAT_YV12 : _bindgen_ty_6 = 842094169 ; pub type _bindgen_ty_6 = u32 ; pub const GRALLOC_USAGE_SW_READ_NEVER : _bindgen_ty_7 = 0 ; pub const GRALLOC_USAGE_SW_READ_RARELY : _bindgen_ty_7 = 2 ; pub const GRALLOC_USAGE_SW_READ_OFTEN : _bindgen_ty_7 = 3 ; pub const GRALLOC_USAGE_SW_READ_MASK : _bindgen_ty_7 = 15 ; pub const GRALLOC_USAGE_SW_WRITE_NEVER : _bindgen_ty_7 = 0 ; pub const GRALLOC_USAGE_SW_WRITE_RARELY : _bindgen_ty_7 = 32 ; pub const GRALLOC_USAGE_SW_WRITE_OFTEN : _bindgen_ty_7 = 48 ; pub const GRALLOC_USAGE_SW_WRITE_MASK : _bindgen_ty_7 = 240 ; pub const GRALLOC_USAGE_HW_TEXTURE : _bindgen_ty_7 = 256 ; pub const GRALLOC_USAGE_HW_RENDER : _bindgen_ty_7 = 512 ; pub const GRALLOC_USAGE_HW_2D : _bindgen_ty_7 = 1024 ; pub const GRALLOC_USAGE_HW_COMPOSER : _bindgen_ty_7 = 2048 ; pub const GRALLOC_USAGE_HW_FB : _bindgen_ty_7 = 4096 ; pub const GRALLOC_USAGE_EXTERNAL_DISP : _bindgen_ty_7 = 8192 ; pub const GRALLOC_USAGE_PROTECTED : _bindgen_ty_7 = 16384 ; pub const GRALLOC_USAGE_CURSOR : _bindgen_ty_7 = 32768 ; pub const GRALLOC_USAGE_HW_VIDEO_ENCODER : _bindgen_ty_7 = 65536 ; pub const GRALLOC_USAGE_HW_CAMERA_WRITE : _bindgen_ty_7 = 131072 ; pub const GRALLOC_USAGE_HW_CAMERA_READ : _bindgen_ty_7 = 262144 ; pub const GRALLOC_USAGE_HW_CAMERA_ZSL : _bindgen_ty_7 = 393216 ; pub const GRALLOC_USAGE_HW_CAMERA_MASK : _bindgen_ty_7 = 393216 ; pub const GRALLOC_USAGE_HW_MASK : _bindgen_ty_7 = 466688 ; pub const GRALLOC_USAGE_RENDERSCRIPT : _bindgen_ty_7 = 1048576 ; pub type _bindgen_ty_7 = u32 ; pub const NATIVE_WINDOW_WIDTH : _bindgen_ty_8 = 0 ; pub const NATIVE_WINDOW_HEIGHT : _bindgen_ty_8 = 1 ; pub const NATIVE_WINDOW_FORMAT : _bindgen_ty_8 = 2 ; pub type _bindgen_ty_8 = u32 ; pub const NATIVE_WINDOW_API_CPU : _bindgen_ty_9 = 2 ; pub type _bindgen_ty_9 = u32 ; pub const HAL_TRANSFORM_FLIP_H : _bindgen_ty_10 = 1 ; pub const HAL_TRANSFORM_FLIP_V : _bindgen_ty_10 = 2 ; pub const HAL_TRANSFORM_ROT_90 : _bindgen_ty_10 = 4 ; pub const HAL_TRANSFORM_ROT_180 : _bindgen_ty_10 = 3 ; pub const HAL_TRANSFORM_ROT_270 : _bindgen_ty_10 = 7 ; /// Transformation definitions /// /// IMPORTANT NOTE: /// HAL_TRANSFORM_ROT_90 is applied CLOCKWISE and AFTER HAL_TRANSFORM_FLIP_{H|V}. /// - pub type _bindgen_ty_10 = u32 ; pub const NATIVE_WINDOW_TRANSFORM_FLIP_H : _bindgen_ty_11 = 1 ; pub const NATIVE_WINDOW_TRANSFORM_FLIP_V : _bindgen_ty_11 = 2 ; pub const NATIVE_WINDOW_TRANSFORM_ROT_90 : _bindgen_ty_11 = 4 ; pub const NATIVE_WINDOW_TRANSFORM_ROT_180 : _bindgen_ty_11 = 3 ; pub const NATIVE_WINDOW_TRANSFORM_ROT_270 : _bindgen_ty_11 = 7 ; pub type _bindgen_ty_11 = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct NativeHandle { pub version : ctypes :: c_int , pub num_fds : ctypes :: c_int , pub num_ints : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_NativeHandle ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NativeHandle > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NativeHandle ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NativeHandle > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NativeHandle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NativeHandle > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NativeHandle ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NativeHandle > ( ) ) ) . num_fds as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NativeHandle ) , "::" , stringify ! ( num_fds ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NativeHandle > ( ) ) ) . num_ints as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NativeHandle ) , "::" , stringify ! ( num_ints ) ) ) ; } pub type iova_t = u64 ; pub const NvLayout_NvLayout_Pitch : NvLayout = 1 ; pub const NvLayout_NvLayout_Tiled : NvLayout = 2 ; pub const NvLayout_NvLayout_BlockLinear : NvLayout = 3 ; pub type NvLayout = u32 ; pub const NvDisplayScanFormat_NvDisplayScanFormat_Progressive : NvDisplayScanFormat = 0 ; pub const NvDisplayScanFormat_NvDisplayScanFormat_Interlaced : NvDisplayScanFormat = 1 ; pub type NvDisplayScanFormat = u32 ; pub const NvKind_NvKind_Pitch : NvKind = 0 ; pub const NvKind_NvKind_Z16 : NvKind = 1 ; pub const NvKind_NvKind_Z16_2C : NvKind = 2 ; pub const NvKind_NvKind_Z16_MS2_2C : NvKind = 3 ; pub const NvKind_NvKind_Z16_MS4_2C : NvKind = 4 ; pub const NvKind_NvKind_Z16_MS8_2C : NvKind = 5 ; pub const NvKind_NvKind_Z16_MS16_2C : NvKind = 6 ; pub const NvKind_NvKind_Z16_2Z : NvKind = 7 ; pub const NvKind_NvKind_Z16_MS2_2Z : NvKind = 8 ; pub const NvKind_NvKind_Z16_MS4_2Z : NvKind = 9 ; pub const NvKind_NvKind_Z16_MS8_2Z : NvKind = 10 ; pub const NvKind_NvKind_Z16_MS16_2Z : NvKind = 11 ; pub const NvKind_NvKind_Z16_4CZ : NvKind = 12 ; pub const NvKind_NvKind_Z16_MS2_4CZ : NvKind = 13 ; pub const NvKind_NvKind_Z16_MS4_4CZ : NvKind = 14 ; pub const NvKind_NvKind_Z16_MS8_4CZ : NvKind = 15 ; pub const NvKind_NvKind_Z16_MS16_4CZ : NvKind = 16 ; pub const NvKind_NvKind_S8Z24 : NvKind = 17 ; pub const NvKind_NvKind_S8Z24_1Z : NvKind = 18 ; pub const NvKind_NvKind_S8Z24_MS2_1Z : NvKind = 19 ; pub const NvKind_NvKind_S8Z24_MS4_1Z : NvKind = 20 ; pub const NvKind_NvKind_S8Z24_MS8_1Z : NvKind = 21 ; pub const NvKind_NvKind_S8Z24_MS16_1Z : NvKind = 22 ; pub const NvKind_NvKind_S8Z24_2CZ : NvKind = 23 ; pub const NvKind_NvKind_S8Z24_MS2_2CZ : NvKind = 24 ; pub const NvKind_NvKind_S8Z24_MS4_2CZ : NvKind = 25 ; pub const NvKind_NvKind_S8Z24_MS8_2CZ : NvKind = 26 ; pub const NvKind_NvKind_S8Z24_MS16_2CZ : NvKind = 27 ; pub const NvKind_NvKind_S8Z24_2CS : NvKind = 28 ; pub const NvKind_NvKind_S8Z24_MS2_2CS : NvKind = 29 ; pub const NvKind_NvKind_S8Z24_MS4_2CS : NvKind = 30 ; pub const NvKind_NvKind_S8Z24_MS8_2CS : NvKind = 31 ; pub const NvKind_NvKind_S8Z24_MS16_2CS : NvKind = 32 ; pub const NvKind_NvKind_S8Z24_4CSZV : NvKind = 33 ; pub const NvKind_NvKind_S8Z24_MS2_4CSZV : NvKind = 34 ; pub const NvKind_NvKind_S8Z24_MS4_4CSZV : NvKind = 35 ; pub const NvKind_NvKind_S8Z24_MS8_4CSZV : NvKind = 36 ; pub const NvKind_NvKind_S8Z24_MS16_4CSZV : NvKind = 37 ; pub const NvKind_NvKind_V8Z24_MS4_VC12 : NvKind = 38 ; pub const NvKind_NvKind_V8Z24_MS4_VC4 : NvKind = 39 ; pub const NvKind_NvKind_V8Z24_MS8_VC8 : NvKind = 40 ; pub const NvKind_NvKind_V8Z24_MS8_VC24 : NvKind = 41 ; pub const NvKind_NvKind_S8 : NvKind = 42 ; pub const NvKind_NvKind_S8_2S : NvKind = 43 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_1ZV : NvKind = 46 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_1ZV : NvKind = 47 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_1ZV : NvKind = 48 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_1ZV : NvKind = 49 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_2CS : NvKind = 50 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_2CS : NvKind = 51 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_2CS : NvKind = 52 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_2CS : NvKind = 53 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_2CZV : NvKind = 58 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_2CZV : NvKind = 59 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_2CZV : NvKind = 60 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_2CZV : NvKind = 61 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_2ZV : NvKind = 62 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_2ZV : NvKind = 63 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_2ZV : NvKind = 64 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_2ZV : NvKind = 65 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_4CSZV : NvKind = 66 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_4CSZV : NvKind = 67 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_4CSZV : NvKind = 68 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_4CSZV : NvKind = 69 ; pub const NvKind_NvKind_Z24S8 : NvKind = 70 ; pub const NvKind_NvKind_Z24S8_1Z : NvKind = 71 ; pub const NvKind_NvKind_Z24S8_MS2_1Z : NvKind = 72 ; pub const NvKind_NvKind_Z24S8_MS4_1Z : NvKind = 73 ; pub const NvKind_NvKind_Z24S8_MS8_1Z : NvKind = 74 ; pub const NvKind_NvKind_Z24S8_MS16_1Z : NvKind = 75 ; pub const NvKind_NvKind_Z24S8_2CS : NvKind = 76 ; pub const NvKind_NvKind_Z24S8_MS2_2CS : NvKind = 77 ; pub const NvKind_NvKind_Z24S8_MS4_2CS : NvKind = 78 ; pub const NvKind_NvKind_Z24S8_MS8_2CS : NvKind = 79 ; pub const NvKind_NvKind_Z24S8_MS16_2CS : NvKind = 80 ; pub const NvKind_NvKind_Z24S8_2CZ : NvKind = 81 ; pub const NvKind_NvKind_Z24S8_MS2_2CZ : NvKind = 82 ; pub const NvKind_NvKind_Z24S8_MS4_2CZ : NvKind = 83 ; pub const NvKind_NvKind_Z24S8_MS8_2CZ : NvKind = 84 ; pub const NvKind_NvKind_Z24S8_MS16_2CZ : NvKind = 85 ; pub const NvKind_NvKind_Z24S8_4CSZV : NvKind = 86 ; pub const NvKind_NvKind_Z24S8_MS2_4CSZV : NvKind = 87 ; pub const NvKind_NvKind_Z24S8_MS4_4CSZV : NvKind = 88 ; pub const NvKind_NvKind_Z24S8_MS8_4CSZV : NvKind = 89 ; pub const NvKind_NvKind_Z24S8_MS16_4CSZV : NvKind = 90 ; pub const NvKind_NvKind_Z24V8_MS4_VC12 : NvKind = 91 ; pub const NvKind_NvKind_Z24V8_MS4_VC4 : NvKind = 92 ; pub const NvKind_NvKind_Z24V8_MS8_VC8 : NvKind = 93 ; pub const NvKind_NvKind_Z24V8_MS8_VC24 : NvKind = 94 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_1ZV : NvKind = 99 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_1ZV : NvKind = 100 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_1ZV : NvKind = 101 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_1ZV : NvKind = 102 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_2CS : NvKind = 103 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_2CS : NvKind = 104 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_2CS : NvKind = 105 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_2CS : NvKind = 106 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_2CZV : NvKind = 111 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_2CZV : NvKind = 112 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_2CZV : NvKind = 113 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_2CZV : NvKind = 114 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_2ZV : NvKind = 115 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_2ZV : NvKind = 116 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_2ZV : NvKind = 117 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_2ZV : NvKind = 118 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_4CSZV : NvKind = 119 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_4CSZV : NvKind = 120 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_4CSZV : NvKind = 121 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_4CSZV : NvKind = 122 ; pub const NvKind_NvKind_ZF32 : NvKind = 123 ; pub const NvKind_NvKind_ZF32_1Z : NvKind = 124 ; pub const NvKind_NvKind_ZF32_MS2_1Z : NvKind = 125 ; pub const NvKind_NvKind_ZF32_MS4_1Z : NvKind = 126 ; pub const NvKind_NvKind_ZF32_MS8_1Z : NvKind = 127 ; pub const NvKind_NvKind_ZF32_MS16_1Z : NvKind = 128 ; pub const NvKind_NvKind_ZF32_2CS : NvKind = 129 ; pub const NvKind_NvKind_ZF32_MS2_2CS : NvKind = 130 ; pub const NvKind_NvKind_ZF32_MS4_2CS : NvKind = 131 ; pub const NvKind_NvKind_ZF32_MS8_2CS : NvKind = 132 ; pub const NvKind_NvKind_ZF32_MS16_2CS : NvKind = 133 ; pub const NvKind_NvKind_ZF32_2CZ : NvKind = 134 ; pub const NvKind_NvKind_ZF32_MS2_2CZ : NvKind = 135 ; pub const NvKind_NvKind_ZF32_MS4_2CZ : NvKind = 136 ; pub const NvKind_NvKind_ZF32_MS8_2CZ : NvKind = 137 ; pub const NvKind_NvKind_ZF32_MS16_2CZ : NvKind = 138 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12 : NvKind = 139 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4 : NvKind = 140 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8 : NvKind = 141 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24 : NvKind = 142 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_1CS : NvKind = 143 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_1CS : NvKind = 144 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_1CS : NvKind = 145 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_1CS : NvKind = 146 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_1ZV : NvKind = 151 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_1ZV : NvKind = 152 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_1ZV : NvKind = 153 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_1ZV : NvKind = 154 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_1CZV : NvKind = 155 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_1CZV : NvKind = 156 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_1CZV : NvKind = 157 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_1CZV : NvKind = 158 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_2CS : NvKind = 159 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_2CS : NvKind = 160 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_2CS : NvKind = 161 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_2CS : NvKind = 162 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_2CSZV : NvKind = 163 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_2CSZV : NvKind = 164 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_2CSZV : NvKind = 165 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_2CSZV : NvKind = 166 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12 : NvKind = 167 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4 : NvKind = 168 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8 : NvKind = 169 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24 : NvKind = 170 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_1CS : NvKind = 171 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_1CS : NvKind = 172 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_1CS : NvKind = 173 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_1CS : NvKind = 174 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_1ZV : NvKind = 179 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_1ZV : NvKind = 180 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_1ZV : NvKind = 181 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_1ZV : NvKind = 182 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_1CZV : NvKind = 183 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_1CZV : NvKind = 184 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_1CZV : NvKind = 185 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_1CZV : NvKind = 186 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_2CS : NvKind = 187 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_2CS : NvKind = 188 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_2CS : NvKind = 189 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_2CS : NvKind = 190 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_2CSZV : NvKind = 191 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_2CSZV : NvKind = 192 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_2CSZV : NvKind = 193 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_2CSZV : NvKind = 194 ; pub const NvKind_NvKind_ZF32_X24S8 : NvKind = 195 ; pub const NvKind_NvKind_ZF32_X24S8_1CS : NvKind = 196 ; pub const NvKind_NvKind_ZF32_X24S8_MS2_1CS : NvKind = 197 ; pub const NvKind_NvKind_ZF32_X24S8_MS4_1CS : NvKind = 198 ; pub const NvKind_NvKind_ZF32_X24S8_MS8_1CS : NvKind = 199 ; pub const NvKind_NvKind_ZF32_X24S8_MS16_1CS : NvKind = 200 ; pub const NvKind_NvKind_SmskedMessage : NvKind = 202 ; pub const NvKind_NvKind_SmhostMessage : NvKind = 203 ; pub const NvKind_NvKind_C64_MS2_2CRA : NvKind = 205 ; pub const NvKind_NvKind_ZF32_X24S8_2CSZV : NvKind = 206 ; pub const NvKind_NvKind_ZF32_X24S8_MS2_2CSZV : NvKind = 207 ; pub const NvKind_NvKind_ZF32_X24S8_MS4_2CSZV : NvKind = 208 ; pub const NvKind_NvKind_ZF32_X24S8_MS8_2CSZV : NvKind = 209 ; pub const NvKind_NvKind_ZF32_X24S8_MS16_2CSZV : NvKind = 210 ; pub const NvKind_NvKind_ZF32_X24S8_2CS : NvKind = 211 ; pub const NvKind_NvKind_ZF32_X24S8_MS2_2CS : NvKind = 212 ; pub const NvKind_NvKind_ZF32_X24S8_MS4_2CS : NvKind = 213 ; pub const NvKind_NvKind_ZF32_X24S8_MS8_2CS : NvKind = 214 ; pub const NvKind_NvKind_ZF32_X24S8_MS16_2CS : NvKind = 215 ; pub const NvKind_NvKind_C32_2C : NvKind = 216 ; pub const NvKind_NvKind_C32_2CBR : NvKind = 217 ; pub const NvKind_NvKind_C32_2CBA : NvKind = 218 ; pub const NvKind_NvKind_C32_2CRA : NvKind = 219 ; pub const NvKind_NvKind_C32_2BRA : NvKind = 220 ; pub const NvKind_NvKind_C32_MS2_2C : NvKind = 221 ; pub const NvKind_NvKind_C32_MS2_2CBR : NvKind = 222 ; pub const NvKind_NvKind_C32_MS2_2CRA : NvKind = 204 ; pub const NvKind_NvKind_C32_MS4_2C : NvKind = 223 ; pub const NvKind_NvKind_C32_MS4_2CBR : NvKind = 224 ; pub const NvKind_NvKind_C32_MS4_2CBA : NvKind = 225 ; pub const NvKind_NvKind_C32_MS4_2CRA : NvKind = 226 ; pub const NvKind_NvKind_C32_MS4_2BRA : NvKind = 227 ; pub const NvKind_NvKind_C32_MS8_MS16_2C : NvKind = 228 ; pub const NvKind_NvKind_C32_MS8_MS16_2CRA : NvKind = 229 ; pub const NvKind_NvKind_C64_2C : NvKind = 230 ; pub const NvKind_NvKind_C64_2CBR : NvKind = 231 ; pub const NvKind_NvKind_C64_2CBA : NvKind = 232 ; pub const NvKind_NvKind_C64_2CRA : NvKind = 233 ; pub const NvKind_NvKind_C64_2BRA : NvKind = 234 ; pub const NvKind_NvKind_C64_MS2_2C : NvKind = 235 ; pub const NvKind_NvKind_C64_MS2_2CBR : NvKind = 236 ; pub const NvKind_NvKind_C64_MS4_2C : NvKind = 237 ; pub const NvKind_NvKind_C64_MS4_2CBR : NvKind = 238 ; pub const NvKind_NvKind_C64_MS4_2CBA : NvKind = 239 ; pub const NvKind_NvKind_C64_MS4_2CRA : NvKind = 240 ; pub const NvKind_NvKind_C64_MS4_2BRA : NvKind = 241 ; pub const NvKind_NvKind_C64_MS8_MS16_2C : NvKind = 242 ; pub const NvKind_NvKind_C64_MS8_MS16_2CRA : NvKind = 243 ; pub const NvKind_NvKind_C128_2C : NvKind = 244 ; pub const NvKind_NvKind_C128_2CR : NvKind = 245 ; pub const NvKind_NvKind_C128_MS2_2C : NvKind = 246 ; pub const NvKind_NvKind_C128_MS2_2CR : NvKind = 247 ; pub const NvKind_NvKind_C128_MS4_2C : NvKind = 248 ; pub const NvKind_NvKind_C128_MS4_2CR : NvKind = 249 ; pub const NvKind_NvKind_C128_MS8_MS16_2C : NvKind = 250 ; pub const NvKind_NvKind_C128_MS8_MS16_2CR : NvKind = 251 ; pub const NvKind_NvKind_X8C24 : NvKind = 252 ; pub const NvKind_NvKind_PitchNoSwizzle : NvKind = 253 ; pub const NvKind_NvKind_Generic_16BX2 : NvKind = 254 ; pub const NvKind_NvKind_Invalid : NvKind = 255 ; pub type NvKind = u32 ; pub const NvColorFormat_NvColorFormat_Unspecified : NvColorFormat = 0 ; pub const NvColorFormat_NvColorFormat_NonColor8 : NvColorFormat = 153093128 ; pub const NvColorFormat_NvColorFormat_NonColor16 : NvColorFormat = 153094672 ; pub const NvColorFormat_NvColorFormat_NonColor24 : NvColorFormat = 153098776 ; pub const NvColorFormat_NvColorFormat_NonColor32 : NvColorFormat = 153099296 ; pub const NvColorFormat_NvColorFormat_X4C4 : NvColorFormat = 153158920 ; pub const NvColorFormat_NvColorFormat_A4L4 : NvColorFormat = 4299752712 ; pub const NvColorFormat_NvColorFormat_A8L8 : NvColorFormat = 4299755024 ; pub const NvColorFormat_NvColorFormat_Float_A16L16 : NvColorFormat = 4299775264 ; pub const NvColorFormat_NvColorFormat_A1B5G5R5 : NvColorFormat = 4300411920 ; pub const NvColorFormat_NvColorFormat_A4B4G4R4 : NvColorFormat = 4300412176 ; pub const NvColorFormat_NvColorFormat_A5B5G5R1 : NvColorFormat = 4300412944 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10 : NvColorFormat = 4300415008 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8 : NvColorFormat = 4300415264 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16 : NvColorFormat = 4300416832 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16 : NvColorFormat = 4300433216 ; pub const NvColorFormat_NvColorFormat_A1R5G5B5 : NvColorFormat = 4308669456 ; pub const NvColorFormat_NvColorFormat_A4R4G4B4 : NvColorFormat = 4308669712 ; pub const NvColorFormat_NvColorFormat_A5R1G5B5 : NvColorFormat = 4308669968 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10 : NvColorFormat = 4308672544 ; pub const NvColorFormat_NvColorFormat_A8R8G8B8 : NvColorFormat = 4308672800 ; pub const NvColorFormat_NvColorFormat_A1 : NvColorFormat = 4314104065 ; pub const NvColorFormat_NvColorFormat_A2 : NvColorFormat = 4314104322 ; pub const NvColorFormat_NvColorFormat_A4 : NvColorFormat = 4314104580 ; pub const NvColorFormat_NvColorFormat_A8 : NvColorFormat = 4314104840 ; pub const NvColorFormat_NvColorFormat_A16 : NvColorFormat = 4314106384 ; pub const NvColorFormat_NvColorFormat_A32 : NvColorFormat = 4314111008 ; pub const NvColorFormat_NvColorFormat_Float_A16 : NvColorFormat = 4314122768 ; pub const NvColorFormat_NvColorFormat_L4A4 : NvColorFormat = 4328523016 ; pub const NvColorFormat_NvColorFormat_L8A8 : NvColorFormat = 4328525328 ; pub const NvColorFormat_NvColorFormat_B4G4R4A4 : NvColorFormat = 4396291344 ; pub const NvColorFormat_NvColorFormat_B5G5R1A5 : NvColorFormat = 4396291856 ; pub const NvColorFormat_NvColorFormat_B5G5R5A1 : NvColorFormat = 4396292112 ; pub const NvColorFormat_NvColorFormat_B8G8R8A8 : NvColorFormat = 4396294432 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2 : NvColorFormat = 4396294944 ; pub const NvColorFormat_NvColorFormat_R1G5B5A5 : NvColorFormat = 4404548624 ; pub const NvColorFormat_NvColorFormat_R4G4B4A4 : NvColorFormat = 4404548880 ; pub const NvColorFormat_NvColorFormat_R5G5B5A1 : NvColorFormat = 4404549648 ; pub const NvColorFormat_NvColorFormat_R8G8B8A8 : NvColorFormat = 4404551968 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2 : NvColorFormat = 4404552480 ; pub const NvColorFormat_NvColorFormat_L1 : NvColorFormat = 4462739713 ; pub const NvColorFormat_NvColorFormat_L2 : NvColorFormat = 4462739970 ; pub const NvColorFormat_NvColorFormat_L4 : NvColorFormat = 4462740228 ; pub const NvColorFormat_NvColorFormat_L8 : NvColorFormat = 4462740488 ; pub const NvColorFormat_NvColorFormat_L16 : NvColorFormat = 4462742032 ; pub const NvColorFormat_NvColorFormat_L32 : NvColorFormat = 4462746656 ; pub const NvColorFormat_NvColorFormat_Float_L16 : NvColorFormat = 4462758416 ; pub const NvColorFormat_NvColorFormat_B5G6R5 : NvColorFormat = 4463399440 ; pub const NvColorFormat_NvColorFormat_B6G5R5 : NvColorFormat = 4463399696 ; pub const NvColorFormat_NvColorFormat_B5G5R5X1 : NvColorFormat = 4463400976 ; pub const NvColorFormat_NvColorFormat_B8_G8_R8 : NvColorFormat = 4463401240 ; pub const NvColorFormat_NvColorFormat_B8G8R8X8 : NvColorFormat = 4463403296 ; pub const NvColorFormat_NvColorFormat_Float_B10G11R11 : NvColorFormat = 4463418912 ; pub const NvColorFormat_NvColorFormat_X1B5G5R5 : NvColorFormat = 4468184080 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8 : NvColorFormat = 4468187424 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16 : NvColorFormat = 4468188992 ; pub const NvColorFormat_NvColorFormat_Float_X16B16G16R16 : NvColorFormat = 4468205376 ; pub const NvColorFormat_NvColorFormat_R3G3B2 : NvColorFormat = 4471653896 ; pub const NvColorFormat_NvColorFormat_R5G5B6 : NvColorFormat = 4471656720 ; pub const NvColorFormat_NvColorFormat_R5G6B5 : NvColorFormat = 4471656976 ; pub const NvColorFormat_NvColorFormat_R5G5B5X1 : NvColorFormat = 4471658512 ; pub const NvColorFormat_NvColorFormat_R8_G8_B8 : NvColorFormat = 4471658776 ; pub const NvColorFormat_NvColorFormat_R8G8B8X8 : NvColorFormat = 4471660832 ; pub const NvColorFormat_NvColorFormat_X1R5G5B5 : NvColorFormat = 4476441616 ; pub const NvColorFormat_NvColorFormat_X8R8G8B8 : NvColorFormat = 4476444960 ; pub const NvColorFormat_NvColorFormat_RG8 : NvColorFormat = 4480044560 ; pub const NvColorFormat_NvColorFormat_R16G16 : NvColorFormat = 4480048416 ; pub const NvColorFormat_NvColorFormat_Float_R16G16 : NvColorFormat = 4480064800 ; pub const NvColorFormat_NvColorFormat_R8 : NvColorFormat = 4481614856 ; pub const NvColorFormat_NvColorFormat_R16 : NvColorFormat = 4481616400 ; pub const NvColorFormat_NvColorFormat_Float_R16 : NvColorFormat = 4481632784 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_sRGB : NvColorFormat = 8595382304 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_sRGB : NvColorFormat = 8595382560 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_sRGB : NvColorFormat = 8595384128 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_sRGB : NvColorFormat = 8603639840 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_sRGB : NvColorFormat = 8691262240 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_sRGB : NvColorFormat = 8699519776 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_sRGB : NvColorFormat = 8763154720 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_sRGB : NvColorFormat = 8763156288 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_709 : NvColorFormat = 12890349600 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_709 : NvColorFormat = 12890349856 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_709 : NvColorFormat = 12890351424 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_709 : NvColorFormat = 12898607136 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_709 : NvColorFormat = 12986229536 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_709 : NvColorFormat = 12994487072 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_709 : NvColorFormat = 13058122016 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_709 : NvColorFormat = 13058123584 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_709_Linear : NvColorFormat = 17185316896 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_709_Linear : NvColorFormat = 17185317152 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_709_Linear : NvColorFormat = 17185318720 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_709_Linear : NvColorFormat = 17193574432 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_709_Linear : NvColorFormat = 17281196832 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_709_Linear : NvColorFormat = 17289454368 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_709_Linear : NvColorFormat = 17353089312 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_709_Linear : NvColorFormat = 17353090880 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16_scRGB_Linear : NvColorFormat = 21480302400 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_2020 : NvColorFormat = 25775251488 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_2020 : NvColorFormat = 25775251744 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_2020 : NvColorFormat = 25775253312 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_2020 : NvColorFormat = 25783509024 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_2020 : NvColorFormat = 25871131424 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_2020 : NvColorFormat = 25879388960 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_2020 : NvColorFormat = 25943023904 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_2020 : NvColorFormat = 25943025472 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_2020_Linear : NvColorFormat = 30070218784 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_2020_Linear : NvColorFormat = 30070219040 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_2020_Linear : NvColorFormat = 30070220608 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16_2020_Linear : NvColorFormat = 30070236992 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_2020_Linear : NvColorFormat = 30078476320 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_2020_Linear : NvColorFormat = 30166098720 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_2020_Linear : NvColorFormat = 30174356256 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_2020_Linear : NvColorFormat = 30237991200 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_2020_Linear : NvColorFormat = 30237992768 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16_2020_PQ : NvColorFormat = 34365204288 ; pub const NvColorFormat_NvColorFormat_A4I4 : NvColorFormat = 38673646856 ; pub const NvColorFormat_NvColorFormat_A8I8 : NvColorFormat = 38673649168 ; pub const NvColorFormat_NvColorFormat_I4A4 : NvColorFormat = 38707135752 ; pub const NvColorFormat_NvColorFormat_I8A8 : NvColorFormat = 38707138064 ; pub const NvColorFormat_NvColorFormat_I1 : NvColorFormat = 38807798017 ; pub const NvColorFormat_NvColorFormat_I2 : NvColorFormat = 38807798274 ; pub const NvColorFormat_NvColorFormat_I4 : NvColorFormat = 38807798532 ; pub const NvColorFormat_NvColorFormat_I8 : NvColorFormat = 38807798792 ; pub const NvColorFormat_NvColorFormat_A8Y8U8V8 : NvColorFormat = 42963378464 ; pub const NvColorFormat_NvColorFormat_A16Y16U16V16 : NvColorFormat = 42963380032 ; pub const NvColorFormat_NvColorFormat_Y8U8V8A8 : NvColorFormat = 43059257632 ; pub const NvColorFormat_NvColorFormat_V8_U8 : NvColorFormat = 43084678928 ; pub const NvColorFormat_NvColorFormat_V8U8 : NvColorFormat = 43084680720 ; pub const NvColorFormat_NvColorFormat_V10U10 : NvColorFormat = 43085210144 ; pub const NvColorFormat_NvColorFormat_V12U12 : NvColorFormat = 43085210656 ; pub const NvColorFormat_NvColorFormat_V8 : NvColorFormat = 43086251016 ; pub const NvColorFormat_NvColorFormat_V10 : NvColorFormat = 43086253840 ; pub const NvColorFormat_NvColorFormat_V12 : NvColorFormat = 43086254096 ; pub const NvColorFormat_NvColorFormat_U8_V8 : NvColorFormat = 43088348944 ; pub const NvColorFormat_NvColorFormat_U8V8 : NvColorFormat = 43088350736 ; pub const NvColorFormat_NvColorFormat_U10V10 : NvColorFormat = 43092550176 ; pub const NvColorFormat_NvColorFormat_U12V12 : NvColorFormat = 43092550688 ; pub const NvColorFormat_NvColorFormat_U8 : NvColorFormat = 43100931080 ; pub const NvColorFormat_NvColorFormat_U10 : NvColorFormat = 43100933904 ; pub const NvColorFormat_NvColorFormat_U12 : NvColorFormat = 43100934160 ; pub const NvColorFormat_NvColorFormat_Y8 : NvColorFormat = 43102766088 ; pub const NvColorFormat_NvColorFormat_Y10 : NvColorFormat = 43102768912 ; pub const NvColorFormat_NvColorFormat_Y12 : NvColorFormat = 43102769168 ; pub const NvColorFormat_NvColorFormat_YVYU : NvColorFormat = 43122690064 ; pub const NvColorFormat_NvColorFormat_VYUY : NvColorFormat = 43122690320 ; pub const NvColorFormat_NvColorFormat_YUYV : NvColorFormat = 43126360080 ; pub const NvColorFormat_NvColorFormat_UYVY : NvColorFormat = 43126360336 ; pub const NvColorFormat_NvColorFormat_Y8_U8_V8 : NvColorFormat = 43126364440 ; pub const NvColorFormat_NvColorFormat_V8_U8_RR : NvColorFormat = 47379646224 ; pub const NvColorFormat_NvColorFormat_V8U8_RR : NvColorFormat = 47379648016 ; pub const NvColorFormat_NvColorFormat_V8_RR : NvColorFormat = 47381218312 ; pub const NvColorFormat_NvColorFormat_U8_V8_RR : NvColorFormat = 47383316240 ; pub const NvColorFormat_NvColorFormat_U8V8_RR : NvColorFormat = 47383318032 ; pub const NvColorFormat_NvColorFormat_U8_RR : NvColorFormat = 47395898376 ; pub const NvColorFormat_NvColorFormat_Y8_RR : NvColorFormat = 47397733384 ; pub const NvColorFormat_NvColorFormat_V8_U8_ER : NvColorFormat = 51674613520 ; pub const NvColorFormat_NvColorFormat_V8U8_ER : NvColorFormat = 51674615312 ; pub const NvColorFormat_NvColorFormat_V8_ER : NvColorFormat = 51676185608 ; pub const NvColorFormat_NvColorFormat_U8_V8_ER : NvColorFormat = 51678283536 ; pub const NvColorFormat_NvColorFormat_U8V8_ER : NvColorFormat = 51678285328 ; pub const NvColorFormat_NvColorFormat_U8_ER : NvColorFormat = 51690865672 ; pub const NvColorFormat_NvColorFormat_Y8_ER : NvColorFormat = 51692700680 ; pub const NvColorFormat_NvColorFormat_V8_U8_709 : NvColorFormat = 55969580816 ; pub const NvColorFormat_NvColorFormat_V8U8_709 : NvColorFormat = 55969582608 ; pub const NvColorFormat_NvColorFormat_V10U10_709 : NvColorFormat = 55970112032 ; pub const NvColorFormat_NvColorFormat_V12U12_709 : NvColorFormat = 55970112544 ; pub const NvColorFormat_NvColorFormat_V8_709 : NvColorFormat = 55971152904 ; pub const NvColorFormat_NvColorFormat_V10_709 : NvColorFormat = 55971155728 ; pub const NvColorFormat_NvColorFormat_V12_709 : NvColorFormat = 55971155984 ; pub const NvColorFormat_NvColorFormat_U8_V8_709 : NvColorFormat = 55973250832 ; pub const NvColorFormat_NvColorFormat_U8V8_709 : NvColorFormat = 55973252624 ; pub const NvColorFormat_NvColorFormat_U10V10_709 : NvColorFormat = 55977452064 ; pub const NvColorFormat_NvColorFormat_U12V12_709 : NvColorFormat = 55977452576 ; pub const NvColorFormat_NvColorFormat_U8_709 : NvColorFormat = 55985832968 ; pub const NvColorFormat_NvColorFormat_U10_709 : NvColorFormat = 55985835792 ; pub const NvColorFormat_NvColorFormat_U12_709 : NvColorFormat = 55985836048 ; pub const NvColorFormat_NvColorFormat_Y8_709 : NvColorFormat = 55987667976 ; pub const NvColorFormat_NvColorFormat_Y10_709 : NvColorFormat = 55987670800 ; pub const NvColorFormat_NvColorFormat_Y12_709 : NvColorFormat = 55987671056 ; pub const NvColorFormat_NvColorFormat_V8_U8_709_ER : NvColorFormat = 60264548112 ; pub const NvColorFormat_NvColorFormat_V8U8_709_ER : NvColorFormat = 60264549904 ; pub const NvColorFormat_NvColorFormat_V10U10_709_ER : NvColorFormat = 60265079328 ; pub const NvColorFormat_NvColorFormat_V12U12_709_ER : NvColorFormat = 60265079840 ; pub const NvColorFormat_NvColorFormat_V8_709_ER : NvColorFormat = 60266120200 ; pub const NvColorFormat_NvColorFormat_V10_709_ER : NvColorFormat = 60266123024 ; pub const NvColorFormat_NvColorFormat_V12_709_ER : NvColorFormat = 60266123280 ; pub const NvColorFormat_NvColorFormat_U8_V8_709_ER : NvColorFormat = 60268218128 ; pub const NvColorFormat_NvColorFormat_U8V8_709_ER : NvColorFormat = 60268219920 ; pub const NvColorFormat_NvColorFormat_U10V10_709_ER : NvColorFormat = 60272419360 ; pub const NvColorFormat_NvColorFormat_U12V12_709_ER : NvColorFormat = 60272419872 ; pub const NvColorFormat_NvColorFormat_U8_709_ER : NvColorFormat = 60280800264 ; pub const NvColorFormat_NvColorFormat_U10_709_ER : NvColorFormat = 60280803088 ; pub const NvColorFormat_NvColorFormat_U12_709_ER : NvColorFormat = 60280803344 ; pub const NvColorFormat_NvColorFormat_Y8_709_ER : NvColorFormat = 60282635272 ; pub const NvColorFormat_NvColorFormat_Y10_709_ER : NvColorFormat = 60282638096 ; pub const NvColorFormat_NvColorFormat_Y12_709_ER : NvColorFormat = 60282638352 ; pub const NvColorFormat_NvColorFormat_V10U10_2020 : NvColorFormat = 64560046624 ; pub const NvColorFormat_NvColorFormat_V12U12_2020 : NvColorFormat = 64560047136 ; pub const NvColorFormat_NvColorFormat_V10_2020 : NvColorFormat = 64561090320 ; pub const NvColorFormat_NvColorFormat_V12_2020 : NvColorFormat = 64561090576 ; pub const NvColorFormat_NvColorFormat_U10V10_2020 : NvColorFormat = 64567386656 ; pub const NvColorFormat_NvColorFormat_U12V12_2020 : NvColorFormat = 64567387168 ; pub const NvColorFormat_NvColorFormat_U10_2020 : NvColorFormat = 64575770384 ; pub const NvColorFormat_NvColorFormat_U12_2020 : NvColorFormat = 64575770640 ; pub const NvColorFormat_NvColorFormat_Y10_2020 : NvColorFormat = 64577605392 ; pub const NvColorFormat_NvColorFormat_Y12_2020 : NvColorFormat = 64577605648 ; pub const NvColorFormat_NvColorFormat_Bayer8RGGB : NvColorFormat = 68872569864 ; pub const NvColorFormat_NvColorFormat_Bayer16RGGB : NvColorFormat = 68872571408 ; pub const NvColorFormat_NvColorFormat_BayerS16RGGB : NvColorFormat = 68872604176 ; pub const NvColorFormat_NvColorFormat_X2Bayer14RGGB : NvColorFormat = 68872637200 ; pub const NvColorFormat_NvColorFormat_X4Bayer12RGGB : NvColorFormat = 68872637456 ; pub const NvColorFormat_NvColorFormat_X6Bayer10RGGB : NvColorFormat = 68872637712 ; pub const NvColorFormat_NvColorFormat_Bayer8BGGR : NvColorFormat = 73167537160 ; pub const NvColorFormat_NvColorFormat_Bayer16BGGR : NvColorFormat = 73167538704 ; pub const NvColorFormat_NvColorFormat_BayerS16BGGR : NvColorFormat = 73167571472 ; pub const NvColorFormat_NvColorFormat_X2Bayer14BGGR : NvColorFormat = 73167604496 ; pub const NvColorFormat_NvColorFormat_X4Bayer12BGGR : NvColorFormat = 73167604752 ; pub const NvColorFormat_NvColorFormat_X6Bayer10BGGR : NvColorFormat = 73167605008 ; pub const NvColorFormat_NvColorFormat_Bayer8GRBG : NvColorFormat = 77462504456 ; pub const NvColorFormat_NvColorFormat_Bayer16GRBG : NvColorFormat = 77462506000 ; pub const NvColorFormat_NvColorFormat_BayerS16GRBG : NvColorFormat = 77462538768 ; pub const NvColorFormat_NvColorFormat_X2Bayer14GRBG : NvColorFormat = 77462571792 ; pub const NvColorFormat_NvColorFormat_X4Bayer12GRBG : NvColorFormat = 77462572048 ; pub const NvColorFormat_NvColorFormat_X6Bayer10GRBG : NvColorFormat = 77462572304 ; pub const NvColorFormat_NvColorFormat_Bayer8GBRG : NvColorFormat = 81757471752 ; pub const NvColorFormat_NvColorFormat_Bayer16GBRG : NvColorFormat = 81757473296 ; pub const NvColorFormat_NvColorFormat_BayerS16GBRG : NvColorFormat = 81757506064 ; pub const NvColorFormat_NvColorFormat_X2Bayer14GBRG : NvColorFormat = 81757539088 ; pub const NvColorFormat_NvColorFormat_X4Bayer12GBRG : NvColorFormat = 81757539344 ; pub const NvColorFormat_NvColorFormat_X6Bayer10GBRG : NvColorFormat = 81757539600 ; pub const NvColorFormat_NvColorFormat_XYZ : NvColorFormat = 86076057152 ; pub type NvColorFormat = u64 ; # [ repr ( C ) ] pub struct nvioctl_gpu_characteristics { pub arch : u32 , pub impl_ : u32 , pub rev : u32 , pub num_gpc : u32 , pub L2_cache_size : u64 , pub on_board_video_memory_size : u64 , pub num_tpc_per_gpc : u32 , pub bus_type : u32 , pub big_page_size : u32 , pub compression_page_size : u32 , pub pde_coverage_bit_count : u32 , pub available_big_page_sizes : u32 , pub gpc_mask : u32 , pub sm_arch_sm_version : u32 , pub sm_arch_spa_version : u32 , pub sm_arch_warp_count : u32 , pub gpu_va_bit_count : u32 , pub reserved : u32 , pub flags : u64 , pub twod_class : u32 , pub threed_class : u32 , pub compute_class : u32 , pub gpfifo_class : u32 , pub inline_to_memory_class : u32 , pub dma_copy_class : u32 , pub max_fbps_count : u32 , pub fbp_en_mask : u32 , pub max_ltc_per_fbp : u32 , pub max_lts_per_ltc : u32 , pub max_tex_per_tpc : u32 , pub max_gpc_count : u32 , pub rop_l2_en_mask_0 : u32 , pub rop_l2_en_mask_1 : u32 , pub chipname : u64 , pub gr_compbit_store_base_hw : u64 , } # [ test ] fn bindgen_test_layout_nvioctl_gpu_characteristics ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_gpu_characteristics > ( ) , 160usize , concat ! ( "Size of: " , stringify ! ( nvioctl_gpu_characteristics ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_gpu_characteristics > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_gpu_characteristics ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . arch as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( arch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . impl_ as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( impl_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . rev as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( rev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . num_gpc as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( num_gpc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . L2_cache_size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( L2_cache_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . on_board_video_memory_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( on_board_video_memory_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . num_tpc_per_gpc as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( num_tpc_per_gpc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . bus_type as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( bus_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . big_page_size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( big_page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . compression_page_size as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( compression_page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . pde_coverage_bit_count as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( pde_coverage_bit_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . available_big_page_sizes as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( available_big_page_sizes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gpc_mask as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gpc_mask ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . sm_arch_sm_version as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( sm_arch_sm_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . sm_arch_spa_version as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( sm_arch_spa_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . sm_arch_warp_count as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( sm_arch_warp_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gpu_va_bit_count as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gpu_va_bit_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . reserved as * const _ as usize } , 76usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( reserved ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . flags as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . twod_class as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( twod_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . threed_class as * const _ as usize } , 92usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( threed_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . compute_class as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( compute_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gpfifo_class as * const _ as usize } , 100usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gpfifo_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . inline_to_memory_class as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( inline_to_memory_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . dma_copy_class as * const _ as usize } , 108usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( dma_copy_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_fbps_count as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_fbps_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . fbp_en_mask as * const _ as usize } , 116usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( fbp_en_mask ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_ltc_per_fbp as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_ltc_per_fbp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_lts_per_ltc as * const _ as usize } , 124usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_lts_per_ltc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_tex_per_tpc as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_tex_per_tpc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_gpc_count as * const _ as usize } , 132usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_gpc_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . rop_l2_en_mask_0 as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( rop_l2_en_mask_0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . rop_l2_en_mask_1 as * const _ as usize } , 140usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( rop_l2_en_mask_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . chipname as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( chipname ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gr_compbit_store_base_hw as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gr_compbit_store_base_hw ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_va_region { pub offset : u64 , pub page_size : u32 , pub pad : u32 , pub pages : u64 , } # [ test ] fn bindgen_test_layout_nvioctl_va_region ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_va_region > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( nvioctl_va_region ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_va_region > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_va_region ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . page_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . pad as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . pages as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( pages ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_l2_state { pub mask : u32 , pub flush : u32 , } # [ test ] fn bindgen_test_layout_nvioctl_l2_state ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_l2_state > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_l2_state ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_l2_state > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_l2_state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_l2_state > ( ) ) ) . mask as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_l2_state ) , "::" , stringify ! ( mask ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_l2_state > ( ) ) ) . flush as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_l2_state ) , "::" , stringify ! ( flush ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_fence { pub id : u32 , pub value : u32 , } # [ test ] fn bindgen_test_layout_nvioctl_fence ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_fence > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_fence ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_fence > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_fence ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_fence > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_fence ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_fence > ( ) ) ) . value as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_fence ) , "::" , stringify ! ( value ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_gpfifo_entry { pub __bindgen_anon_1 : nvioctl_gpfifo_entry__bindgen_ty_1 , } # [ repr ( C ) ] pub struct nvioctl_gpfifo_entry__bindgen_ty_1 { pub desc : __BindgenUnionField < u64 > , pub desc32 : __BindgenUnionField < [ u32 ; 2usize ] > , pub bindgen_union_field : u64 , } # [ test ] fn bindgen_test_layout_nvioctl_gpfifo_entry__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) ) ) . desc as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) , "::" , stringify ! ( desc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) ) ) . desc32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) , "::" , stringify ! ( desc32 ) ) ) ; } # [ test ] fn bindgen_test_layout_nvioctl_gpfifo_entry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_gpfifo_entry > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_gpfifo_entry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_gpfifo_entry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_gpfifo_entry ) ) ) ; } pub const nvioctl_map_param_NvMapParam_Size : nvioctl_map_param = 1 ; pub const nvioctl_map_param_NvMapParam_Alignment : nvioctl_map_param = 2 ; pub const nvioctl_map_param_NvMapParam_Base : nvioctl_map_param = 3 ; pub const nvioctl_map_param_NvMapParam_Heap : nvioctl_map_param = 4 ; pub const nvioctl_map_param_NvMapParam_Kind : nvioctl_map_param = 5 ; pub type nvioctl_map_param = u32 ; pub use self :: nvioctl_map_param as NvMapParam ; pub const nvioctl_channel_obj_classnum_NvClassNumber_2D : nvioctl_channel_obj_classnum = 36909 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_3D : nvioctl_channel_obj_classnum = 45463 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_Compute : nvioctl_channel_obj_classnum = 45504 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_Kepler : nvioctl_channel_obj_classnum = 41280 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_DMA : nvioctl_channel_obj_classnum = 45237 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_ChannelGpfifo : nvioctl_channel_obj_classnum = 45167 ; pub type nvioctl_channel_obj_classnum = u32 ; pub use self :: nvioctl_channel_obj_classnum as NvClassNumber ; pub const nvioctl_channel_priority_NvChannelPriority_Low : nvioctl_channel_priority = 50 ; pub const nvioctl_channel_priority_NvChannelPriority_Medium : nvioctl_channel_priority = 100 ; pub const nvioctl_channel_priority_NvChannelPriority_High : nvioctl_channel_priority = 150 ; pub type nvioctl_channel_priority = u32 ; pub use self :: nvioctl_channel_priority as NvChannelPriority ; pub const NvZcullConfig_NvZcullConfig_Global : NvZcullConfig = 0 ; pub const NvZcullConfig_NvZcullConfig_NoCtxSwitch : NvZcullConfig = 1 ; pub const NvZcullConfig_NvZcullConfig_SeparateBuffer : NvZcullConfig = 2 ; pub const NvZcullConfig_NvZcullConfig_PartOfRegularBuffer : NvZcullConfig = 3 ; pub type NvZcullConfig = u32 ; pub const NvAllocSpaceFlags_NvAllocSpaceFlags_FixedOffset : NvAllocSpaceFlags = 1 ; pub const NvAllocSpaceFlags_NvAllocSpaceFlags_Sparse : NvAllocSpaceFlags = 2 ; pub type NvAllocSpaceFlags = u32 ; pub const NvMapBufferFlags_NvMapBufferFlags_FixedOffset : NvMapBufferFlags = 1 ; pub const NvMapBufferFlags_NvMapBufferFlags_IsCacheable : NvMapBufferFlags = 4 ; pub const NvMapBufferFlags_NvMapBufferFlags_Modify : NvMapBufferFlags = 256 ; pub type NvMapBufferFlags = u32 ; pub const NvErrorType_NvErrorType_FifoErrorIdleTimeout : NvErrorType = 8 ; pub const NvErrorType_NvErrorType_GrErrorSwNotify : NvErrorType = 13 ; pub const NvErrorType_NvErrorType_GrSemaphoreTimeout : NvErrorType = 24 ; pub const NvErrorType_NvErrorType_GrIllegalNotify : NvErrorType = 25 ; pub const NvErrorType_NvErrorType_FifoErrorMmuErrFlt : NvErrorType = 31 ; pub const NvErrorType_NvErrorType_PbdmaError : NvErrorType = 32 ; pub const NvErrorType_NvErrorType_ResetChannelVerifError : NvErrorType = 43 ; pub const NvErrorType_NvErrorType_PbdmaPushbufferCrcMismatch : NvErrorType = 80 ; pub type NvErrorType = u32 ; # [ repr ( C ) ] pub struct NvError { pub tickstamp : u64 , pub error_type : u32 , pub unk16 : u16 , pub status : u16 , } # [ test ] fn bindgen_test_layout_NvError ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvError > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NvError ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvError > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvError ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . tickstamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( tickstamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . error_type as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( error_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . unk16 as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( unk16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . status as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( status ) ) ) ; } extern "C" { pub fn nvioctlNvhostCtrl_SyncptRead ( fd : u32 , id : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_SyncptIncr ( fd : u32 , id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_SyncptWait ( fd : u32 , id : u32 , threshold : u32 , timeout : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventSignal ( fd : u32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventWait ( fd : u32 , syncpt_id : u32 , threshold : u32 , timeout : s32 , event_id : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventWaitAsync ( fd : u32 , syncpt_id : u32 , threshold : u32 , timeout : s32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventRegister ( fd : u32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventUnregister ( fd : u32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZCullGetCtxSize ( fd : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZCullGetInfo ( fd : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_GetCharacteristics ( fd : u32 , out : * mut nvioctl_gpu_characteristics ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_GetTpcMasks ( fd : u32 , inval : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_GetL2State ( fd : u32 , out : * mut nvioctl_l2_state ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_BindChannel ( fd : u32 , channel_fd : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_AllocSpace ( fd : u32 , pages : u32 , page_size : u32 , flags : u32 , align_or_offset : u64 , offset : * mut u64 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_FreeSpace ( fd : u32 , offset : u64 , pages : u32 , page_size : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_MapBufferEx ( fd : u32 , flags : u32 , kind : u32 , nvmap_handle : u32 , page_size : u32 , buffer_offset : u64 , mapping_size : u64 , input_offset : u64 , offset : * mut u64 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_UnmapBuffer ( fd : u32 , offset : u64 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_GetVARegions ( fd : u32 , regions : * mut nvioctl_va_region ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_InitializeEx ( fd : u32 , flags : u32 , big_page_size : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Create ( fd : u32 , size : u32 , nvmap_handle : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_FromId ( fd : u32 , id : u32 , nvmap_handle : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Alloc ( fd : u32 , nvmap_handle : u32 , heapmask : u32 , flags : u32 , align : u32 , kind : u8 , addr : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Free ( fd : u32 , nvmap_handle : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Param ( fd : u32 , nvmap_handle : u32 , param : NvMapParam , result : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_GetId ( fd : u32 , nvmap_handle : u32 , id : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetNvmapFd ( fd : u32 , nvmap_fd : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SubmitGpfifo ( fd : u32 , entries : * mut nvioctl_gpfifo_entry , num_entries : u32 , flags : u32 , fence_inout : * mut nvioctl_fence ) -> Result ; } extern "C" { pub fn nvioctlChannel_KickoffPb ( fd : u32 , entries : * mut nvioctl_gpfifo_entry , num_entries : u32 , flags : u32 , fence_inout : * mut nvioctl_fence ) -> Result ; } extern "C" { pub fn nvioctlChannel_AllocObjCtx ( fd : u32 , class_num : u32 , flags : u32 , id_out : * mut u64 ) -> Result ; } extern "C" { pub fn nvioctlChannel_ZCullBind ( fd : u32 , gpu_va : u64 , mode : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetErrorNotifier ( fd : u32 , enable : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_GetErrorNotification ( fd : u32 , out : * mut NvError ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetPriority ( fd : u32 , priority : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetTimeout ( fd : u32 , timeout : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_AllocGpfifoEx2 ( fd : u32 , num_entries : u32 , flags : u32 , unk0 : u32 , unk1 : u32 , unk2 : u32 , unk3 : u32 , fence_out : * mut nvioctl_fence ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetUserData ( fd : u32 , addr : * mut ctypes :: c_void ) -> Result ; } pub type NvFence = nvioctl_fence ; # [ repr ( C ) ] pub struct NvMultiFence { pub num_fences : u32 , pub fences : [ NvFence ; 4usize ] , } # [ test ] fn bindgen_test_layout_NvMultiFence ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvMultiFence > ( ) , 36usize , concat ! ( "Size of: " , stringify ! ( NvMultiFence ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvMultiFence > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NvMultiFence ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvMultiFence > ( ) ) ) . num_fences as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvMultiFence ) , "::" , stringify ! ( num_fences ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvMultiFence > ( ) ) ) . fences as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvMultiFence ) , "::" , stringify ! ( fences ) ) ) ; } extern "C" { pub fn nvFenceInit ( ) -> Result ; } extern "C" { pub fn nvFenceExit ( ) ; } extern "C" { pub fn nvFenceWait ( f : * mut NvFence , timeout_us : s32 ) -> Result ; } extern "C" { pub fn nvMultiFenceWait ( mf : * mut NvMultiFence , timeout_us : s32 ) -> Result ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BqRect { pub left : s32 , pub top : s32 , pub right : s32 , pub bottom : s32 , } # [ test ] fn bindgen_test_layout_BqRect ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqRect > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( BqRect ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqRect > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( BqRect ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . left as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( left ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . top as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( top ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . right as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( right ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . bottom as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( bottom ) ) ) ; } # [ repr ( C ) ] pub struct BqBufferInput { pub __bindgen_anon_1 : BqBufferInput__bindgen_ty_1 , pub isAutoTimestamp : s32 , pub crop : BqRect , pub scalingMode : s32 , pub transform : u32 , pub stickyTransform : u32 , pub unk : u32 , pub swapInterval : u32 , pub fence : NvMultiFence , } # [ repr ( C , packed ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BqBufferInput__bindgen_ty_1 { pub timestamp : s64 , } # [ test ] fn bindgen_test_layout_BqBufferInput__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqBufferInput__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( BqBufferInput__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqBufferInput__bindgen_ty_1 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( BqBufferInput__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput__bindgen_ty_1 > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput__bindgen_ty_1 ) , "::" , stringify ! ( timestamp ) ) ) ; } # [ test ] fn bindgen_test_layout_BqBufferInput ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqBufferInput > ( ) , 84usize , concat ! ( "Size of: " , stringify ! ( BqBufferInput ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqBufferInput > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( BqBufferInput ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . isAutoTimestamp as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( isAutoTimestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . crop as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( crop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . scalingMode as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( scalingMode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . transform as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( transform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . stickyTransform as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( stickyTransform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . unk as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( unk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . swapInterval as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( swapInterval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . fence as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( fence ) ) ) ; } # [ repr ( C ) ] pub struct BqBufferOutput { pub width : u32 , pub height : u32 , pub transformHint : u32 , pub numPendingBuffers : u32 , } # [ test ] fn bindgen_test_layout_BqBufferOutput ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqBufferOutput > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( BqBufferOutput ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqBufferOutput > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( BqBufferOutput ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . width as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . height as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . transformHint as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( transformHint ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . numPendingBuffers as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( numPendingBuffers ) ) ) ; } # [ repr ( C ) ] pub struct BqGraphicBuffer { pub width : u32 , pub height : u32 , pub stride : u32 , pub format : u32 , pub usage : u32 , pub native_handle : * mut NativeHandle , } # [ test ] fn bindgen_test_layout_BqGraphicBuffer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqGraphicBuffer > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( BqGraphicBuffer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqGraphicBuffer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( BqGraphicBuffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . width as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . height as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . stride as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( stride ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . format as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . usage as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . native_handle as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( native_handle ) ) ) ; } extern "C" { pub fn bqRequestBuffer ( b : * mut Binder , bufferIdx : s32 , buf : * mut BqGraphicBuffer ) -> Result ; } extern "C" { pub fn bqDequeueBuffer ( b : * mut Binder , async : bool , width : u32 , height : u32 , format : s32 , usage : u32 , buf : * mut s32 , fence : * mut NvMultiFence ) -> Result ; } extern "C" { pub fn bqDetachBuffer ( b : * mut Binder , slot : s32 ) -> Result ; } extern "C" { pub fn bqQueueBuffer ( b : * mut Binder , buf : s32 , input : * const BqBufferInput , output : * mut BqBufferOutput ) -> Result ; } extern "C" { pub fn bqCancelBuffer ( b : * mut Binder , buf : s32 , fence : * const NvMultiFence ) -> Result ; } extern "C" { pub fn bqQuery ( b : * mut Binder , what : s32 , value : * mut s32 ) -> Result ; } extern "C" { pub fn bqConnect ( b : * mut Binder , api : s32 , producerControlledByApp : bool , output : * mut BqBufferOutput ) -> Result ; } extern "C" { pub fn bqDisconnect ( b : * mut Binder , api : s32 ) -> Result ; } extern "C" { pub fn bqSetPreallocatedBuffer ( b : * mut Binder , buf : s32 , input : * const BqGraphicBuffer ) -> Result ; } # [ repr ( C ) ] pub struct NvSurface { pub width : u32 , pub height : u32 , pub color_format : NvColorFormat , pub layout : NvLayout , pub pitch : u32 , pub unused : u32 , pub offset : u32 , pub kind : NvKind , pub block_height_log2 : u32 , pub scan : NvDisplayScanFormat , pub second_field_offset : u32 , pub flags : u64 , pub size : u64 , pub unk : [ u32 ; 6usize ] , } # [ test ] fn bindgen_test_layout_NvSurface ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvSurface > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( NvSurface ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvSurface > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvSurface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . width as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . height as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . color_format as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( color_format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . layout as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( layout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . pitch as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( pitch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . unused as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( unused ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . offset as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . kind as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( kind ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . block_height_log2 as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( block_height_log2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . scan as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( scan ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . second_field_offset as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( second_field_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . flags as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . size as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . unk as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( unk ) ) ) ; } # [ repr ( C ) ] pub struct NvGraphicBuffer { pub header : NativeHandle , pub unk0 : s32 , pub nvmap_id : s32 , pub unk2 : u32 , pub magic : u32 , pub pid : u32 , pub type_ : u32 , pub usage : u32 , pub format : u32 , pub ext_format : u32 , pub stride : u32 , pub total_size : u32 , pub num_planes : u32 , pub unk12 : u32 , pub planes : [ NvSurface ; 3usize ] , pub unused : u64 , } # [ test ] fn bindgen_test_layout_NvGraphicBuffer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvGraphicBuffer > ( ) , 336usize , concat ! ( "Size of: " , stringify ! ( NvGraphicBuffer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvGraphicBuffer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvGraphicBuffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unk0 as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unk0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . nvmap_id as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( nvmap_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unk2 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unk2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . magic as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( magic ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . pid as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( pid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . type_ as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . usage as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . format as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . ext_format as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( ext_format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . stride as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( stride ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . total_size as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( total_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . num_planes as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( num_planes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unk12 as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unk12 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . planes as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( planes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unused as * const _ as usize } , 328usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unused ) ) ) ; } + pub type _bindgen_ty_10 = u32 ; pub const NATIVE_WINDOW_TRANSFORM_FLIP_H : _bindgen_ty_11 = 1 ; pub const NATIVE_WINDOW_TRANSFORM_FLIP_V : _bindgen_ty_11 = 2 ; pub const NATIVE_WINDOW_TRANSFORM_ROT_90 : _bindgen_ty_11 = 4 ; pub const NATIVE_WINDOW_TRANSFORM_ROT_180 : _bindgen_ty_11 = 3 ; pub const NATIVE_WINDOW_TRANSFORM_ROT_270 : _bindgen_ty_11 = 7 ; pub type _bindgen_ty_11 = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct NativeHandle { pub version : ctypes :: c_int , pub num_fds : ctypes :: c_int , pub num_ints : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_NativeHandle ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NativeHandle > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NativeHandle ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NativeHandle > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NativeHandle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NativeHandle > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NativeHandle ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NativeHandle > ( ) ) ) . num_fds as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NativeHandle ) , "::" , stringify ! ( num_fds ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NativeHandle > ( ) ) ) . num_ints as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NativeHandle ) , "::" , stringify ! ( num_ints ) ) ) ; } pub type iova_t = u64 ; pub const NvLayout_NvLayout_Pitch : NvLayout = 1 ; pub const NvLayout_NvLayout_Tiled : NvLayout = 2 ; pub const NvLayout_NvLayout_BlockLinear : NvLayout = 3 ; pub type NvLayout = u32 ; pub const NvDisplayScanFormat_NvDisplayScanFormat_Progressive : NvDisplayScanFormat = 0 ; pub const NvDisplayScanFormat_NvDisplayScanFormat_Interlaced : NvDisplayScanFormat = 1 ; pub type NvDisplayScanFormat = u32 ; pub const NvKind_NvKind_Pitch : NvKind = 0 ; pub const NvKind_NvKind_Z16 : NvKind = 1 ; pub const NvKind_NvKind_Z16_2C : NvKind = 2 ; pub const NvKind_NvKind_Z16_MS2_2C : NvKind = 3 ; pub const NvKind_NvKind_Z16_MS4_2C : NvKind = 4 ; pub const NvKind_NvKind_Z16_MS8_2C : NvKind = 5 ; pub const NvKind_NvKind_Z16_MS16_2C : NvKind = 6 ; pub const NvKind_NvKind_Z16_2Z : NvKind = 7 ; pub const NvKind_NvKind_Z16_MS2_2Z : NvKind = 8 ; pub const NvKind_NvKind_Z16_MS4_2Z : NvKind = 9 ; pub const NvKind_NvKind_Z16_MS8_2Z : NvKind = 10 ; pub const NvKind_NvKind_Z16_MS16_2Z : NvKind = 11 ; pub const NvKind_NvKind_Z16_4CZ : NvKind = 12 ; pub const NvKind_NvKind_Z16_MS2_4CZ : NvKind = 13 ; pub const NvKind_NvKind_Z16_MS4_4CZ : NvKind = 14 ; pub const NvKind_NvKind_Z16_MS8_4CZ : NvKind = 15 ; pub const NvKind_NvKind_Z16_MS16_4CZ : NvKind = 16 ; pub const NvKind_NvKind_S8Z24 : NvKind = 17 ; pub const NvKind_NvKind_S8Z24_1Z : NvKind = 18 ; pub const NvKind_NvKind_S8Z24_MS2_1Z : NvKind = 19 ; pub const NvKind_NvKind_S8Z24_MS4_1Z : NvKind = 20 ; pub const NvKind_NvKind_S8Z24_MS8_1Z : NvKind = 21 ; pub const NvKind_NvKind_S8Z24_MS16_1Z : NvKind = 22 ; pub const NvKind_NvKind_S8Z24_2CZ : NvKind = 23 ; pub const NvKind_NvKind_S8Z24_MS2_2CZ : NvKind = 24 ; pub const NvKind_NvKind_S8Z24_MS4_2CZ : NvKind = 25 ; pub const NvKind_NvKind_S8Z24_MS8_2CZ : NvKind = 26 ; pub const NvKind_NvKind_S8Z24_MS16_2CZ : NvKind = 27 ; pub const NvKind_NvKind_S8Z24_2CS : NvKind = 28 ; pub const NvKind_NvKind_S8Z24_MS2_2CS : NvKind = 29 ; pub const NvKind_NvKind_S8Z24_MS4_2CS : NvKind = 30 ; pub const NvKind_NvKind_S8Z24_MS8_2CS : NvKind = 31 ; pub const NvKind_NvKind_S8Z24_MS16_2CS : NvKind = 32 ; pub const NvKind_NvKind_S8Z24_4CSZV : NvKind = 33 ; pub const NvKind_NvKind_S8Z24_MS2_4CSZV : NvKind = 34 ; pub const NvKind_NvKind_S8Z24_MS4_4CSZV : NvKind = 35 ; pub const NvKind_NvKind_S8Z24_MS8_4CSZV : NvKind = 36 ; pub const NvKind_NvKind_S8Z24_MS16_4CSZV : NvKind = 37 ; pub const NvKind_NvKind_V8Z24_MS4_VC12 : NvKind = 38 ; pub const NvKind_NvKind_V8Z24_MS4_VC4 : NvKind = 39 ; pub const NvKind_NvKind_V8Z24_MS8_VC8 : NvKind = 40 ; pub const NvKind_NvKind_V8Z24_MS8_VC24 : NvKind = 41 ; pub const NvKind_NvKind_S8 : NvKind = 42 ; pub const NvKind_NvKind_S8_2S : NvKind = 43 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_1ZV : NvKind = 46 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_1ZV : NvKind = 47 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_1ZV : NvKind = 48 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_1ZV : NvKind = 49 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_2CS : NvKind = 50 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_2CS : NvKind = 51 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_2CS : NvKind = 52 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_2CS : NvKind = 53 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_2CZV : NvKind = 58 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_2CZV : NvKind = 59 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_2CZV : NvKind = 60 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_2CZV : NvKind = 61 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_2ZV : NvKind = 62 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_2ZV : NvKind = 63 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_2ZV : NvKind = 64 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_2ZV : NvKind = 65 ; pub const NvKind_NvKind_V8Z24_MS4_VC12_4CSZV : NvKind = 66 ; pub const NvKind_NvKind_V8Z24_MS4_VC4_4CSZV : NvKind = 67 ; pub const NvKind_NvKind_V8Z24_MS8_VC8_4CSZV : NvKind = 68 ; pub const NvKind_NvKind_V8Z24_MS8_VC24_4CSZV : NvKind = 69 ; pub const NvKind_NvKind_Z24S8 : NvKind = 70 ; pub const NvKind_NvKind_Z24S8_1Z : NvKind = 71 ; pub const NvKind_NvKind_Z24S8_MS2_1Z : NvKind = 72 ; pub const NvKind_NvKind_Z24S8_MS4_1Z : NvKind = 73 ; pub const NvKind_NvKind_Z24S8_MS8_1Z : NvKind = 74 ; pub const NvKind_NvKind_Z24S8_MS16_1Z : NvKind = 75 ; pub const NvKind_NvKind_Z24S8_2CS : NvKind = 76 ; pub const NvKind_NvKind_Z24S8_MS2_2CS : NvKind = 77 ; pub const NvKind_NvKind_Z24S8_MS4_2CS : NvKind = 78 ; pub const NvKind_NvKind_Z24S8_MS8_2CS : NvKind = 79 ; pub const NvKind_NvKind_Z24S8_MS16_2CS : NvKind = 80 ; pub const NvKind_NvKind_Z24S8_2CZ : NvKind = 81 ; pub const NvKind_NvKind_Z24S8_MS2_2CZ : NvKind = 82 ; pub const NvKind_NvKind_Z24S8_MS4_2CZ : NvKind = 83 ; pub const NvKind_NvKind_Z24S8_MS8_2CZ : NvKind = 84 ; pub const NvKind_NvKind_Z24S8_MS16_2CZ : NvKind = 85 ; pub const NvKind_NvKind_Z24S8_4CSZV : NvKind = 86 ; pub const NvKind_NvKind_Z24S8_MS2_4CSZV : NvKind = 87 ; pub const NvKind_NvKind_Z24S8_MS4_4CSZV : NvKind = 88 ; pub const NvKind_NvKind_Z24S8_MS8_4CSZV : NvKind = 89 ; pub const NvKind_NvKind_Z24S8_MS16_4CSZV : NvKind = 90 ; pub const NvKind_NvKind_Z24V8_MS4_VC12 : NvKind = 91 ; pub const NvKind_NvKind_Z24V8_MS4_VC4 : NvKind = 92 ; pub const NvKind_NvKind_Z24V8_MS8_VC8 : NvKind = 93 ; pub const NvKind_NvKind_Z24V8_MS8_VC24 : NvKind = 94 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_1ZV : NvKind = 99 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_1ZV : NvKind = 100 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_1ZV : NvKind = 101 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_1ZV : NvKind = 102 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_2CS : NvKind = 103 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_2CS : NvKind = 104 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_2CS : NvKind = 105 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_2CS : NvKind = 106 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_2CZV : NvKind = 111 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_2CZV : NvKind = 112 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_2CZV : NvKind = 113 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_2CZV : NvKind = 114 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_2ZV : NvKind = 115 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_2ZV : NvKind = 116 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_2ZV : NvKind = 117 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_2ZV : NvKind = 118 ; pub const NvKind_NvKind_Z24V8_MS4_VC12_4CSZV : NvKind = 119 ; pub const NvKind_NvKind_Z24V8_MS4_VC4_4CSZV : NvKind = 120 ; pub const NvKind_NvKind_Z24V8_MS8_VC8_4CSZV : NvKind = 121 ; pub const NvKind_NvKind_Z24V8_MS8_VC24_4CSZV : NvKind = 122 ; pub const NvKind_NvKind_ZF32 : NvKind = 123 ; pub const NvKind_NvKind_ZF32_1Z : NvKind = 124 ; pub const NvKind_NvKind_ZF32_MS2_1Z : NvKind = 125 ; pub const NvKind_NvKind_ZF32_MS4_1Z : NvKind = 126 ; pub const NvKind_NvKind_ZF32_MS8_1Z : NvKind = 127 ; pub const NvKind_NvKind_ZF32_MS16_1Z : NvKind = 128 ; pub const NvKind_NvKind_ZF32_2CS : NvKind = 129 ; pub const NvKind_NvKind_ZF32_MS2_2CS : NvKind = 130 ; pub const NvKind_NvKind_ZF32_MS4_2CS : NvKind = 131 ; pub const NvKind_NvKind_ZF32_MS8_2CS : NvKind = 132 ; pub const NvKind_NvKind_ZF32_MS16_2CS : NvKind = 133 ; pub const NvKind_NvKind_ZF32_2CZ : NvKind = 134 ; pub const NvKind_NvKind_ZF32_MS2_2CZ : NvKind = 135 ; pub const NvKind_NvKind_ZF32_MS4_2CZ : NvKind = 136 ; pub const NvKind_NvKind_ZF32_MS8_2CZ : NvKind = 137 ; pub const NvKind_NvKind_ZF32_MS16_2CZ : NvKind = 138 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12 : NvKind = 139 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4 : NvKind = 140 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8 : NvKind = 141 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24 : NvKind = 142 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_1CS : NvKind = 143 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_1CS : NvKind = 144 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_1CS : NvKind = 145 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_1CS : NvKind = 146 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_1ZV : NvKind = 151 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_1ZV : NvKind = 152 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_1ZV : NvKind = 153 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_1ZV : NvKind = 154 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_1CZV : NvKind = 155 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_1CZV : NvKind = 156 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_1CZV : NvKind = 157 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_1CZV : NvKind = 158 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_2CS : NvKind = 159 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_2CS : NvKind = 160 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_2CS : NvKind = 161 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_2CS : NvKind = 162 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC12_2CSZV : NvKind = 163 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS4_VC4_2CSZV : NvKind = 164 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC8_2CSZV : NvKind = 165 ; pub const NvKind_NvKind_X8Z24_X16V8S8_MS8_VC24_2CSZV : NvKind = 166 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12 : NvKind = 167 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4 : NvKind = 168 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8 : NvKind = 169 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24 : NvKind = 170 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_1CS : NvKind = 171 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_1CS : NvKind = 172 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_1CS : NvKind = 173 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_1CS : NvKind = 174 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_1ZV : NvKind = 179 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_1ZV : NvKind = 180 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_1ZV : NvKind = 181 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_1ZV : NvKind = 182 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_1CZV : NvKind = 183 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_1CZV : NvKind = 184 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_1CZV : NvKind = 185 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_1CZV : NvKind = 186 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_2CS : NvKind = 187 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_2CS : NvKind = 188 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_2CS : NvKind = 189 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_2CS : NvKind = 190 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC12_2CSZV : NvKind = 191 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS4_VC4_2CSZV : NvKind = 192 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC8_2CSZV : NvKind = 193 ; pub const NvKind_NvKind_ZF32_X16V8S8_MS8_VC24_2CSZV : NvKind = 194 ; pub const NvKind_NvKind_ZF32_X24S8 : NvKind = 195 ; pub const NvKind_NvKind_ZF32_X24S8_1CS : NvKind = 196 ; pub const NvKind_NvKind_ZF32_X24S8_MS2_1CS : NvKind = 197 ; pub const NvKind_NvKind_ZF32_X24S8_MS4_1CS : NvKind = 198 ; pub const NvKind_NvKind_ZF32_X24S8_MS8_1CS : NvKind = 199 ; pub const NvKind_NvKind_ZF32_X24S8_MS16_1CS : NvKind = 200 ; pub const NvKind_NvKind_SmskedMessage : NvKind = 202 ; pub const NvKind_NvKind_SmhostMessage : NvKind = 203 ; pub const NvKind_NvKind_C64_MS2_2CRA : NvKind = 205 ; pub const NvKind_NvKind_ZF32_X24S8_2CSZV : NvKind = 206 ; pub const NvKind_NvKind_ZF32_X24S8_MS2_2CSZV : NvKind = 207 ; pub const NvKind_NvKind_ZF32_X24S8_MS4_2CSZV : NvKind = 208 ; pub const NvKind_NvKind_ZF32_X24S8_MS8_2CSZV : NvKind = 209 ; pub const NvKind_NvKind_ZF32_X24S8_MS16_2CSZV : NvKind = 210 ; pub const NvKind_NvKind_ZF32_X24S8_2CS : NvKind = 211 ; pub const NvKind_NvKind_ZF32_X24S8_MS2_2CS : NvKind = 212 ; pub const NvKind_NvKind_ZF32_X24S8_MS4_2CS : NvKind = 213 ; pub const NvKind_NvKind_ZF32_X24S8_MS8_2CS : NvKind = 214 ; pub const NvKind_NvKind_ZF32_X24S8_MS16_2CS : NvKind = 215 ; pub const NvKind_NvKind_C32_2C : NvKind = 216 ; pub const NvKind_NvKind_C32_2CBR : NvKind = 217 ; pub const NvKind_NvKind_C32_2CBA : NvKind = 218 ; pub const NvKind_NvKind_C32_2CRA : NvKind = 219 ; pub const NvKind_NvKind_C32_2BRA : NvKind = 220 ; pub const NvKind_NvKind_C32_MS2_2C : NvKind = 221 ; pub const NvKind_NvKind_C32_MS2_2CBR : NvKind = 222 ; pub const NvKind_NvKind_C32_MS2_2CRA : NvKind = 204 ; pub const NvKind_NvKind_C32_MS4_2C : NvKind = 223 ; pub const NvKind_NvKind_C32_MS4_2CBR : NvKind = 224 ; pub const NvKind_NvKind_C32_MS4_2CBA : NvKind = 225 ; pub const NvKind_NvKind_C32_MS4_2CRA : NvKind = 226 ; pub const NvKind_NvKind_C32_MS4_2BRA : NvKind = 227 ; pub const NvKind_NvKind_C32_MS8_MS16_2C : NvKind = 228 ; pub const NvKind_NvKind_C32_MS8_MS16_2CRA : NvKind = 229 ; pub const NvKind_NvKind_C64_2C : NvKind = 230 ; pub const NvKind_NvKind_C64_2CBR : NvKind = 231 ; pub const NvKind_NvKind_C64_2CBA : NvKind = 232 ; pub const NvKind_NvKind_C64_2CRA : NvKind = 233 ; pub const NvKind_NvKind_C64_2BRA : NvKind = 234 ; pub const NvKind_NvKind_C64_MS2_2C : NvKind = 235 ; pub const NvKind_NvKind_C64_MS2_2CBR : NvKind = 236 ; pub const NvKind_NvKind_C64_MS4_2C : NvKind = 237 ; pub const NvKind_NvKind_C64_MS4_2CBR : NvKind = 238 ; pub const NvKind_NvKind_C64_MS4_2CBA : NvKind = 239 ; pub const NvKind_NvKind_C64_MS4_2CRA : NvKind = 240 ; pub const NvKind_NvKind_C64_MS4_2BRA : NvKind = 241 ; pub const NvKind_NvKind_C64_MS8_MS16_2C : NvKind = 242 ; pub const NvKind_NvKind_C64_MS8_MS16_2CRA : NvKind = 243 ; pub const NvKind_NvKind_C128_2C : NvKind = 244 ; pub const NvKind_NvKind_C128_2CR : NvKind = 245 ; pub const NvKind_NvKind_C128_MS2_2C : NvKind = 246 ; pub const NvKind_NvKind_C128_MS2_2CR : NvKind = 247 ; pub const NvKind_NvKind_C128_MS4_2C : NvKind = 248 ; pub const NvKind_NvKind_C128_MS4_2CR : NvKind = 249 ; pub const NvKind_NvKind_C128_MS8_MS16_2C : NvKind = 250 ; pub const NvKind_NvKind_C128_MS8_MS16_2CR : NvKind = 251 ; pub const NvKind_NvKind_X8C24 : NvKind = 252 ; pub const NvKind_NvKind_PitchNoSwizzle : NvKind = 253 ; pub const NvKind_NvKind_Generic_16BX2 : NvKind = 254 ; pub const NvKind_NvKind_Invalid : NvKind = 255 ; pub type NvKind = u32 ; pub const NvColorFormat_NvColorFormat_Unspecified : NvColorFormat = 0 ; pub const NvColorFormat_NvColorFormat_NonColor8 : NvColorFormat = 153093128 ; pub const NvColorFormat_NvColorFormat_NonColor16 : NvColorFormat = 153094672 ; pub const NvColorFormat_NvColorFormat_NonColor24 : NvColorFormat = 153098776 ; pub const NvColorFormat_NvColorFormat_NonColor32 : NvColorFormat = 153099296 ; pub const NvColorFormat_NvColorFormat_X4C4 : NvColorFormat = 153158920 ; pub const NvColorFormat_NvColorFormat_A4L4 : NvColorFormat = 4299752712 ; pub const NvColorFormat_NvColorFormat_A8L8 : NvColorFormat = 4299755024 ; pub const NvColorFormat_NvColorFormat_Float_A16L16 : NvColorFormat = 4299775264 ; pub const NvColorFormat_NvColorFormat_A1B5G5R5 : NvColorFormat = 4300411920 ; pub const NvColorFormat_NvColorFormat_A4B4G4R4 : NvColorFormat = 4300412176 ; pub const NvColorFormat_NvColorFormat_A5B5G5R1 : NvColorFormat = 4300412944 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10 : NvColorFormat = 4300415008 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8 : NvColorFormat = 4300415264 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16 : NvColorFormat = 4300416832 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16 : NvColorFormat = 4300433216 ; pub const NvColorFormat_NvColorFormat_A1R5G5B5 : NvColorFormat = 4308669456 ; pub const NvColorFormat_NvColorFormat_A4R4G4B4 : NvColorFormat = 4308669712 ; pub const NvColorFormat_NvColorFormat_A5R1G5B5 : NvColorFormat = 4308669968 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10 : NvColorFormat = 4308672544 ; pub const NvColorFormat_NvColorFormat_A8R8G8B8 : NvColorFormat = 4308672800 ; pub const NvColorFormat_NvColorFormat_A1 : NvColorFormat = 4314104065 ; pub const NvColorFormat_NvColorFormat_A2 : NvColorFormat = 4314104322 ; pub const NvColorFormat_NvColorFormat_A4 : NvColorFormat = 4314104580 ; pub const NvColorFormat_NvColorFormat_A8 : NvColorFormat = 4314104840 ; pub const NvColorFormat_NvColorFormat_A16 : NvColorFormat = 4314106384 ; pub const NvColorFormat_NvColorFormat_A32 : NvColorFormat = 4314111008 ; pub const NvColorFormat_NvColorFormat_Float_A16 : NvColorFormat = 4314122768 ; pub const NvColorFormat_NvColorFormat_L4A4 : NvColorFormat = 4328523016 ; pub const NvColorFormat_NvColorFormat_L8A8 : NvColorFormat = 4328525328 ; pub const NvColorFormat_NvColorFormat_B4G4R4A4 : NvColorFormat = 4396291344 ; pub const NvColorFormat_NvColorFormat_B5G5R1A5 : NvColorFormat = 4396291856 ; pub const NvColorFormat_NvColorFormat_B5G5R5A1 : NvColorFormat = 4396292112 ; pub const NvColorFormat_NvColorFormat_B8G8R8A8 : NvColorFormat = 4396294432 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2 : NvColorFormat = 4396294944 ; pub const NvColorFormat_NvColorFormat_R1G5B5A5 : NvColorFormat = 4404548624 ; pub const NvColorFormat_NvColorFormat_R4G4B4A4 : NvColorFormat = 4404548880 ; pub const NvColorFormat_NvColorFormat_R5G5B5A1 : NvColorFormat = 4404549648 ; pub const NvColorFormat_NvColorFormat_R8G8B8A8 : NvColorFormat = 4404551968 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2 : NvColorFormat = 4404552480 ; pub const NvColorFormat_NvColorFormat_L1 : NvColorFormat = 4462739713 ; pub const NvColorFormat_NvColorFormat_L2 : NvColorFormat = 4462739970 ; pub const NvColorFormat_NvColorFormat_L4 : NvColorFormat = 4462740228 ; pub const NvColorFormat_NvColorFormat_L8 : NvColorFormat = 4462740488 ; pub const NvColorFormat_NvColorFormat_L16 : NvColorFormat = 4462742032 ; pub const NvColorFormat_NvColorFormat_L32 : NvColorFormat = 4462746656 ; pub const NvColorFormat_NvColorFormat_Float_L16 : NvColorFormat = 4462758416 ; pub const NvColorFormat_NvColorFormat_B5G6R5 : NvColorFormat = 4463399440 ; pub const NvColorFormat_NvColorFormat_B6G5R5 : NvColorFormat = 4463399696 ; pub const NvColorFormat_NvColorFormat_B5G5R5X1 : NvColorFormat = 4463400976 ; pub const NvColorFormat_NvColorFormat_B8_G8_R8 : NvColorFormat = 4463401240 ; pub const NvColorFormat_NvColorFormat_B8G8R8X8 : NvColorFormat = 4463403296 ; pub const NvColorFormat_NvColorFormat_Float_B10G11R11 : NvColorFormat = 4463418912 ; pub const NvColorFormat_NvColorFormat_X1B5G5R5 : NvColorFormat = 4468184080 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8 : NvColorFormat = 4468187424 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16 : NvColorFormat = 4468188992 ; pub const NvColorFormat_NvColorFormat_Float_X16B16G16R16 : NvColorFormat = 4468205376 ; pub const NvColorFormat_NvColorFormat_R3G3B2 : NvColorFormat = 4471653896 ; pub const NvColorFormat_NvColorFormat_R5G5B6 : NvColorFormat = 4471656720 ; pub const NvColorFormat_NvColorFormat_R5G6B5 : NvColorFormat = 4471656976 ; pub const NvColorFormat_NvColorFormat_R5G5B5X1 : NvColorFormat = 4471658512 ; pub const NvColorFormat_NvColorFormat_R8_G8_B8 : NvColorFormat = 4471658776 ; pub const NvColorFormat_NvColorFormat_R8G8B8X8 : NvColorFormat = 4471660832 ; pub const NvColorFormat_NvColorFormat_X1R5G5B5 : NvColorFormat = 4476441616 ; pub const NvColorFormat_NvColorFormat_X8R8G8B8 : NvColorFormat = 4476444960 ; pub const NvColorFormat_NvColorFormat_RG8 : NvColorFormat = 4480044560 ; pub const NvColorFormat_NvColorFormat_R16G16 : NvColorFormat = 4480048416 ; pub const NvColorFormat_NvColorFormat_Float_R16G16 : NvColorFormat = 4480064800 ; pub const NvColorFormat_NvColorFormat_R8 : NvColorFormat = 4481614856 ; pub const NvColorFormat_NvColorFormat_R16 : NvColorFormat = 4481616400 ; pub const NvColorFormat_NvColorFormat_Float_R16 : NvColorFormat = 4481632784 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_sRGB : NvColorFormat = 8595382304 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_sRGB : NvColorFormat = 8595382560 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_sRGB : NvColorFormat = 8595384128 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_sRGB : NvColorFormat = 8603639840 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_sRGB : NvColorFormat = 8691262240 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_sRGB : NvColorFormat = 8699519776 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_sRGB : NvColorFormat = 8763154720 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_sRGB : NvColorFormat = 8763156288 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_709 : NvColorFormat = 12890349600 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_709 : NvColorFormat = 12890349856 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_709 : NvColorFormat = 12890351424 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_709 : NvColorFormat = 12898607136 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_709 : NvColorFormat = 12986229536 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_709 : NvColorFormat = 12994487072 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_709 : NvColorFormat = 13058122016 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_709 : NvColorFormat = 13058123584 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_709_Linear : NvColorFormat = 17185316896 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_709_Linear : NvColorFormat = 17185317152 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_709_Linear : NvColorFormat = 17185318720 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_709_Linear : NvColorFormat = 17193574432 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_709_Linear : NvColorFormat = 17281196832 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_709_Linear : NvColorFormat = 17289454368 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_709_Linear : NvColorFormat = 17353089312 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_709_Linear : NvColorFormat = 17353090880 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16_scRGB_Linear : NvColorFormat = 21480302400 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_2020 : NvColorFormat = 25775251488 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_2020 : NvColorFormat = 25775251744 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_2020 : NvColorFormat = 25775253312 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_2020 : NvColorFormat = 25783509024 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_2020 : NvColorFormat = 25871131424 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_2020 : NvColorFormat = 25879388960 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_2020 : NvColorFormat = 25943023904 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_2020 : NvColorFormat = 25943025472 ; pub const NvColorFormat_NvColorFormat_A2B10G10R10_2020_Linear : NvColorFormat = 30070218784 ; pub const NvColorFormat_NvColorFormat_A8B8G8R8_2020_Linear : NvColorFormat = 30070219040 ; pub const NvColorFormat_NvColorFormat_A16B16G16R16_2020_Linear : NvColorFormat = 30070220608 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16_2020_Linear : NvColorFormat = 30070236992 ; pub const NvColorFormat_NvColorFormat_A2R10G10B10_2020_Linear : NvColorFormat = 30078476320 ; pub const NvColorFormat_NvColorFormat_B10G10R10A2_2020_Linear : NvColorFormat = 30166098720 ; pub const NvColorFormat_NvColorFormat_R10G10B10A2_2020_Linear : NvColorFormat = 30174356256 ; pub const NvColorFormat_NvColorFormat_X8B8G8R8_2020_Linear : NvColorFormat = 30237991200 ; pub const NvColorFormat_NvColorFormat_X16B16G16R16_2020_Linear : NvColorFormat = 30237992768 ; pub const NvColorFormat_NvColorFormat_Float_A16B16G16R16_2020_PQ : NvColorFormat = 34365204288 ; pub const NvColorFormat_NvColorFormat_A4I4 : NvColorFormat = 38673646856 ; pub const NvColorFormat_NvColorFormat_A8I8 : NvColorFormat = 38673649168 ; pub const NvColorFormat_NvColorFormat_I4A4 : NvColorFormat = 38707135752 ; pub const NvColorFormat_NvColorFormat_I8A8 : NvColorFormat = 38707138064 ; pub const NvColorFormat_NvColorFormat_I1 : NvColorFormat = 38807798017 ; pub const NvColorFormat_NvColorFormat_I2 : NvColorFormat = 38807798274 ; pub const NvColorFormat_NvColorFormat_I4 : NvColorFormat = 38807798532 ; pub const NvColorFormat_NvColorFormat_I8 : NvColorFormat = 38807798792 ; pub const NvColorFormat_NvColorFormat_A8Y8U8V8 : NvColorFormat = 42963378464 ; pub const NvColorFormat_NvColorFormat_A16Y16U16V16 : NvColorFormat = 42963380032 ; pub const NvColorFormat_NvColorFormat_Y8U8V8A8 : NvColorFormat = 43059257632 ; pub const NvColorFormat_NvColorFormat_V8_U8 : NvColorFormat = 43084678928 ; pub const NvColorFormat_NvColorFormat_V8U8 : NvColorFormat = 43084680720 ; pub const NvColorFormat_NvColorFormat_V10U10 : NvColorFormat = 43085210144 ; pub const NvColorFormat_NvColorFormat_V12U12 : NvColorFormat = 43085210656 ; pub const NvColorFormat_NvColorFormat_V8 : NvColorFormat = 43086251016 ; pub const NvColorFormat_NvColorFormat_V10 : NvColorFormat = 43086253840 ; pub const NvColorFormat_NvColorFormat_V12 : NvColorFormat = 43086254096 ; pub const NvColorFormat_NvColorFormat_U8_V8 : NvColorFormat = 43088348944 ; pub const NvColorFormat_NvColorFormat_U8V8 : NvColorFormat = 43088350736 ; pub const NvColorFormat_NvColorFormat_U10V10 : NvColorFormat = 43092550176 ; pub const NvColorFormat_NvColorFormat_U12V12 : NvColorFormat = 43092550688 ; pub const NvColorFormat_NvColorFormat_U8 : NvColorFormat = 43100931080 ; pub const NvColorFormat_NvColorFormat_U10 : NvColorFormat = 43100933904 ; pub const NvColorFormat_NvColorFormat_U12 : NvColorFormat = 43100934160 ; pub const NvColorFormat_NvColorFormat_Y8 : NvColorFormat = 43102766088 ; pub const NvColorFormat_NvColorFormat_Y10 : NvColorFormat = 43102768912 ; pub const NvColorFormat_NvColorFormat_Y12 : NvColorFormat = 43102769168 ; pub const NvColorFormat_NvColorFormat_YVYU : NvColorFormat = 43122690064 ; pub const NvColorFormat_NvColorFormat_VYUY : NvColorFormat = 43122690320 ; pub const NvColorFormat_NvColorFormat_YUYV : NvColorFormat = 43126360080 ; pub const NvColorFormat_NvColorFormat_UYVY : NvColorFormat = 43126360336 ; pub const NvColorFormat_NvColorFormat_Y8_U8_V8 : NvColorFormat = 43126364440 ; pub const NvColorFormat_NvColorFormat_V8_U8_RR : NvColorFormat = 47379646224 ; pub const NvColorFormat_NvColorFormat_V8U8_RR : NvColorFormat = 47379648016 ; pub const NvColorFormat_NvColorFormat_V8_RR : NvColorFormat = 47381218312 ; pub const NvColorFormat_NvColorFormat_U8_V8_RR : NvColorFormat = 47383316240 ; pub const NvColorFormat_NvColorFormat_U8V8_RR : NvColorFormat = 47383318032 ; pub const NvColorFormat_NvColorFormat_U8_RR : NvColorFormat = 47395898376 ; pub const NvColorFormat_NvColorFormat_Y8_RR : NvColorFormat = 47397733384 ; pub const NvColorFormat_NvColorFormat_V8_U8_ER : NvColorFormat = 51674613520 ; pub const NvColorFormat_NvColorFormat_V8U8_ER : NvColorFormat = 51674615312 ; pub const NvColorFormat_NvColorFormat_V8_ER : NvColorFormat = 51676185608 ; pub const NvColorFormat_NvColorFormat_U8_V8_ER : NvColorFormat = 51678283536 ; pub const NvColorFormat_NvColorFormat_U8V8_ER : NvColorFormat = 51678285328 ; pub const NvColorFormat_NvColorFormat_U8_ER : NvColorFormat = 51690865672 ; pub const NvColorFormat_NvColorFormat_Y8_ER : NvColorFormat = 51692700680 ; pub const NvColorFormat_NvColorFormat_V8_U8_709 : NvColorFormat = 55969580816 ; pub const NvColorFormat_NvColorFormat_V8U8_709 : NvColorFormat = 55969582608 ; pub const NvColorFormat_NvColorFormat_V10U10_709 : NvColorFormat = 55970112032 ; pub const NvColorFormat_NvColorFormat_V12U12_709 : NvColorFormat = 55970112544 ; pub const NvColorFormat_NvColorFormat_V8_709 : NvColorFormat = 55971152904 ; pub const NvColorFormat_NvColorFormat_V10_709 : NvColorFormat = 55971155728 ; pub const NvColorFormat_NvColorFormat_V12_709 : NvColorFormat = 55971155984 ; pub const NvColorFormat_NvColorFormat_U8_V8_709 : NvColorFormat = 55973250832 ; pub const NvColorFormat_NvColorFormat_U8V8_709 : NvColorFormat = 55973252624 ; pub const NvColorFormat_NvColorFormat_U10V10_709 : NvColorFormat = 55977452064 ; pub const NvColorFormat_NvColorFormat_U12V12_709 : NvColorFormat = 55977452576 ; pub const NvColorFormat_NvColorFormat_U8_709 : NvColorFormat = 55985832968 ; pub const NvColorFormat_NvColorFormat_U10_709 : NvColorFormat = 55985835792 ; pub const NvColorFormat_NvColorFormat_U12_709 : NvColorFormat = 55985836048 ; pub const NvColorFormat_NvColorFormat_Y8_709 : NvColorFormat = 55987667976 ; pub const NvColorFormat_NvColorFormat_Y10_709 : NvColorFormat = 55987670800 ; pub const NvColorFormat_NvColorFormat_Y12_709 : NvColorFormat = 55987671056 ; pub const NvColorFormat_NvColorFormat_V8_U8_709_ER : NvColorFormat = 60264548112 ; pub const NvColorFormat_NvColorFormat_V8U8_709_ER : NvColorFormat = 60264549904 ; pub const NvColorFormat_NvColorFormat_V10U10_709_ER : NvColorFormat = 60265079328 ; pub const NvColorFormat_NvColorFormat_V12U12_709_ER : NvColorFormat = 60265079840 ; pub const NvColorFormat_NvColorFormat_V8_709_ER : NvColorFormat = 60266120200 ; pub const NvColorFormat_NvColorFormat_V10_709_ER : NvColorFormat = 60266123024 ; pub const NvColorFormat_NvColorFormat_V12_709_ER : NvColorFormat = 60266123280 ; pub const NvColorFormat_NvColorFormat_U8_V8_709_ER : NvColorFormat = 60268218128 ; pub const NvColorFormat_NvColorFormat_U8V8_709_ER : NvColorFormat = 60268219920 ; pub const NvColorFormat_NvColorFormat_U10V10_709_ER : NvColorFormat = 60272419360 ; pub const NvColorFormat_NvColorFormat_U12V12_709_ER : NvColorFormat = 60272419872 ; pub const NvColorFormat_NvColorFormat_U8_709_ER : NvColorFormat = 60280800264 ; pub const NvColorFormat_NvColorFormat_U10_709_ER : NvColorFormat = 60280803088 ; pub const NvColorFormat_NvColorFormat_U12_709_ER : NvColorFormat = 60280803344 ; pub const NvColorFormat_NvColorFormat_Y8_709_ER : NvColorFormat = 60282635272 ; pub const NvColorFormat_NvColorFormat_Y10_709_ER : NvColorFormat = 60282638096 ; pub const NvColorFormat_NvColorFormat_Y12_709_ER : NvColorFormat = 60282638352 ; pub const NvColorFormat_NvColorFormat_V10U10_2020 : NvColorFormat = 64560046624 ; pub const NvColorFormat_NvColorFormat_V12U12_2020 : NvColorFormat = 64560047136 ; pub const NvColorFormat_NvColorFormat_V10_2020 : NvColorFormat = 64561090320 ; pub const NvColorFormat_NvColorFormat_V12_2020 : NvColorFormat = 64561090576 ; pub const NvColorFormat_NvColorFormat_U10V10_2020 : NvColorFormat = 64567386656 ; pub const NvColorFormat_NvColorFormat_U12V12_2020 : NvColorFormat = 64567387168 ; pub const NvColorFormat_NvColorFormat_U10_2020 : NvColorFormat = 64575770384 ; pub const NvColorFormat_NvColorFormat_U12_2020 : NvColorFormat = 64575770640 ; pub const NvColorFormat_NvColorFormat_Y10_2020 : NvColorFormat = 64577605392 ; pub const NvColorFormat_NvColorFormat_Y12_2020 : NvColorFormat = 64577605648 ; pub const NvColorFormat_NvColorFormat_Bayer8RGGB : NvColorFormat = 68872569864 ; pub const NvColorFormat_NvColorFormat_Bayer16RGGB : NvColorFormat = 68872571408 ; pub const NvColorFormat_NvColorFormat_BayerS16RGGB : NvColorFormat = 68872604176 ; pub const NvColorFormat_NvColorFormat_X2Bayer14RGGB : NvColorFormat = 68872637200 ; pub const NvColorFormat_NvColorFormat_X4Bayer12RGGB : NvColorFormat = 68872637456 ; pub const NvColorFormat_NvColorFormat_X6Bayer10RGGB : NvColorFormat = 68872637712 ; pub const NvColorFormat_NvColorFormat_Bayer8BGGR : NvColorFormat = 73167537160 ; pub const NvColorFormat_NvColorFormat_Bayer16BGGR : NvColorFormat = 73167538704 ; pub const NvColorFormat_NvColorFormat_BayerS16BGGR : NvColorFormat = 73167571472 ; pub const NvColorFormat_NvColorFormat_X2Bayer14BGGR : NvColorFormat = 73167604496 ; pub const NvColorFormat_NvColorFormat_X4Bayer12BGGR : NvColorFormat = 73167604752 ; pub const NvColorFormat_NvColorFormat_X6Bayer10BGGR : NvColorFormat = 73167605008 ; pub const NvColorFormat_NvColorFormat_Bayer8GRBG : NvColorFormat = 77462504456 ; pub const NvColorFormat_NvColorFormat_Bayer16GRBG : NvColorFormat = 77462506000 ; pub const NvColorFormat_NvColorFormat_BayerS16GRBG : NvColorFormat = 77462538768 ; pub const NvColorFormat_NvColorFormat_X2Bayer14GRBG : NvColorFormat = 77462571792 ; pub const NvColorFormat_NvColorFormat_X4Bayer12GRBG : NvColorFormat = 77462572048 ; pub const NvColorFormat_NvColorFormat_X6Bayer10GRBG : NvColorFormat = 77462572304 ; pub const NvColorFormat_NvColorFormat_Bayer8GBRG : NvColorFormat = 81757471752 ; pub const NvColorFormat_NvColorFormat_Bayer16GBRG : NvColorFormat = 81757473296 ; pub const NvColorFormat_NvColorFormat_BayerS16GBRG : NvColorFormat = 81757506064 ; pub const NvColorFormat_NvColorFormat_X2Bayer14GBRG : NvColorFormat = 81757539088 ; pub const NvColorFormat_NvColorFormat_X4Bayer12GBRG : NvColorFormat = 81757539344 ; pub const NvColorFormat_NvColorFormat_X6Bayer10GBRG : NvColorFormat = 81757539600 ; pub const NvColorFormat_NvColorFormat_XYZ : NvColorFormat = 86076057152 ; pub type NvColorFormat = u64 ; # [ repr ( C ) ] pub struct nvioctl_zcull_info { pub width_align_pixels : u32 , pub height_align_pixels : u32 , pub pixel_squares_by_aliquots : u32 , pub aliquot_total : u32 , pub region_byte_multiplier : u32 , pub region_header_size : u32 , pub subregion_header_size : u32 , pub subregion_width_align_pixels : u32 , pub subregion_height_align_pixels : u32 , pub subregion_count : u32 , } # [ test ] fn bindgen_test_layout_nvioctl_zcull_info ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_zcull_info > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( nvioctl_zcull_info ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_zcull_info > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_zcull_info ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . width_align_pixels as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( width_align_pixels ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . height_align_pixels as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( height_align_pixels ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . pixel_squares_by_aliquots as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( pixel_squares_by_aliquots ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . aliquot_total as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( aliquot_total ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . region_byte_multiplier as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( region_byte_multiplier ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . region_header_size as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( region_header_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . subregion_header_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( subregion_header_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . subregion_width_align_pixels as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( subregion_width_align_pixels ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . subregion_height_align_pixels as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( subregion_height_align_pixels ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zcull_info > ( ) ) ) . subregion_count as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zcull_info ) , "::" , stringify ! ( subregion_count ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_zbc_entry { pub color_ds : [ u32 ; 4usize ] , pub color_l2 : [ u32 ; 4usize ] , pub depth : u32 , pub ref_cnt : u32 , pub format : u32 , pub type_ : u32 , pub size : u32 , } # [ test ] fn bindgen_test_layout_nvioctl_zbc_entry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_zbc_entry > ( ) , 52usize , concat ! ( "Size of: " , stringify ! ( nvioctl_zbc_entry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_zbc_entry > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_zbc_entry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . color_ds as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( color_ds ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . color_l2 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( color_l2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . depth as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( depth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . ref_cnt as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( ref_cnt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . format as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . type_ as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_entry > ( ) ) ) . size as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_entry ) , "::" , stringify ! ( size ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_gpu_characteristics { pub arch : u32 , pub impl_ : u32 , pub rev : u32 , pub num_gpc : u32 , pub L2_cache_size : u64 , pub on_board_video_memory_size : u64 , pub num_tpc_per_gpc : u32 , pub bus_type : u32 , pub big_page_size : u32 , pub compression_page_size : u32 , pub pde_coverage_bit_count : u32 , pub available_big_page_sizes : u32 , pub gpc_mask : u32 , pub sm_arch_sm_version : u32 , pub sm_arch_spa_version : u32 , pub sm_arch_warp_count : u32 , pub gpu_va_bit_count : u32 , pub reserved : u32 , pub flags : u64 , pub twod_class : u32 , pub threed_class : u32 , pub compute_class : u32 , pub gpfifo_class : u32 , pub inline_to_memory_class : u32 , pub dma_copy_class : u32 , pub max_fbps_count : u32 , pub fbp_en_mask : u32 , pub max_ltc_per_fbp : u32 , pub max_lts_per_ltc : u32 , pub max_tex_per_tpc : u32 , pub max_gpc_count : u32 , pub rop_l2_en_mask_0 : u32 , pub rop_l2_en_mask_1 : u32 , pub chipname : u64 , pub gr_compbit_store_base_hw : u64 , } # [ test ] fn bindgen_test_layout_nvioctl_gpu_characteristics ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_gpu_characteristics > ( ) , 160usize , concat ! ( "Size of: " , stringify ! ( nvioctl_gpu_characteristics ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_gpu_characteristics > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_gpu_characteristics ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . arch as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( arch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . impl_ as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( impl_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . rev as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( rev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . num_gpc as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( num_gpc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . L2_cache_size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( L2_cache_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . on_board_video_memory_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( on_board_video_memory_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . num_tpc_per_gpc as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( num_tpc_per_gpc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . bus_type as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( bus_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . big_page_size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( big_page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . compression_page_size as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( compression_page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . pde_coverage_bit_count as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( pde_coverage_bit_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . available_big_page_sizes as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( available_big_page_sizes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gpc_mask as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gpc_mask ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . sm_arch_sm_version as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( sm_arch_sm_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . sm_arch_spa_version as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( sm_arch_spa_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . sm_arch_warp_count as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( sm_arch_warp_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gpu_va_bit_count as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gpu_va_bit_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . reserved as * const _ as usize } , 76usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( reserved ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . flags as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . twod_class as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( twod_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . threed_class as * const _ as usize } , 92usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( threed_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . compute_class as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( compute_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gpfifo_class as * const _ as usize } , 100usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gpfifo_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . inline_to_memory_class as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( inline_to_memory_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . dma_copy_class as * const _ as usize } , 108usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( dma_copy_class ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_fbps_count as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_fbps_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . fbp_en_mask as * const _ as usize } , 116usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( fbp_en_mask ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_ltc_per_fbp as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_ltc_per_fbp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_lts_per_ltc as * const _ as usize } , 124usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_lts_per_ltc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_tex_per_tpc as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_tex_per_tpc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . max_gpc_count as * const _ as usize } , 132usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( max_gpc_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . rop_l2_en_mask_0 as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( rop_l2_en_mask_0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . rop_l2_en_mask_1 as * const _ as usize } , 140usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( rop_l2_en_mask_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . chipname as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( chipname ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpu_characteristics > ( ) ) ) . gr_compbit_store_base_hw as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpu_characteristics ) , "::" , stringify ! ( gr_compbit_store_base_hw ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_va_region { pub offset : u64 , pub page_size : u32 , pub pad : u32 , pub pages : u64 , } # [ test ] fn bindgen_test_layout_nvioctl_va_region ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_va_region > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( nvioctl_va_region ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_va_region > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_va_region ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . page_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . pad as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( pad ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_va_region > ( ) ) ) . pages as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_va_region ) , "::" , stringify ! ( pages ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_zbc_slot_mask { pub slot : u32 , pub mask : u32 , } # [ test ] fn bindgen_test_layout_nvioctl_zbc_slot_mask ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_zbc_slot_mask > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_zbc_slot_mask ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_zbc_slot_mask > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_zbc_slot_mask ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_slot_mask > ( ) ) ) . slot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_slot_mask ) , "::" , stringify ! ( slot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_zbc_slot_mask > ( ) ) ) . mask as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_zbc_slot_mask ) , "::" , stringify ! ( mask ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_fence { pub id : u32 , pub value : u32 , } # [ test ] fn bindgen_test_layout_nvioctl_fence ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_fence > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_fence ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_fence > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_fence ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_fence > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_fence ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_fence > ( ) ) ) . value as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_fence ) , "::" , stringify ! ( value ) ) ) ; } # [ repr ( C ) ] pub struct nvioctl_gpfifo_entry { pub __bindgen_anon_1 : nvioctl_gpfifo_entry__bindgen_ty_1 , } # [ repr ( C ) ] pub struct nvioctl_gpfifo_entry__bindgen_ty_1 { pub desc : __BindgenUnionField < u64 > , pub desc32 : __BindgenUnionField < [ u32 ; 2usize ] > , pub bindgen_union_field : u64 , } # [ test ] fn bindgen_test_layout_nvioctl_gpfifo_entry__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) ) ) . desc as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) , "::" , stringify ! ( desc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nvioctl_gpfifo_entry__bindgen_ty_1 > ( ) ) ) . desc32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nvioctl_gpfifo_entry__bindgen_ty_1 ) , "::" , stringify ! ( desc32 ) ) ) ; } # [ test ] fn bindgen_test_layout_nvioctl_gpfifo_entry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nvioctl_gpfifo_entry > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nvioctl_gpfifo_entry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nvioctl_gpfifo_entry > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nvioctl_gpfifo_entry ) ) ) ; } pub const nvioctl_map_param_NvMapParam_Size : nvioctl_map_param = 1 ; pub const nvioctl_map_param_NvMapParam_Alignment : nvioctl_map_param = 2 ; pub const nvioctl_map_param_NvMapParam_Base : nvioctl_map_param = 3 ; pub const nvioctl_map_param_NvMapParam_Heap : nvioctl_map_param = 4 ; pub const nvioctl_map_param_NvMapParam_Kind : nvioctl_map_param = 5 ; pub type nvioctl_map_param = u32 ; pub use self :: nvioctl_map_param as NvMapParam ; pub const nvioctl_channel_obj_classnum_NvClassNumber_2D : nvioctl_channel_obj_classnum = 36909 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_3D : nvioctl_channel_obj_classnum = 45463 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_Compute : nvioctl_channel_obj_classnum = 45504 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_Kepler : nvioctl_channel_obj_classnum = 41280 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_DMA : nvioctl_channel_obj_classnum = 45237 ; pub const nvioctl_channel_obj_classnum_NvClassNumber_ChannelGpfifo : nvioctl_channel_obj_classnum = 45167 ; pub type nvioctl_channel_obj_classnum = u32 ; pub use self :: nvioctl_channel_obj_classnum as NvClassNumber ; pub const nvioctl_channel_priority_NvChannelPriority_Low : nvioctl_channel_priority = 50 ; pub const nvioctl_channel_priority_NvChannelPriority_Medium : nvioctl_channel_priority = 100 ; pub const nvioctl_channel_priority_NvChannelPriority_High : nvioctl_channel_priority = 150 ; pub type nvioctl_channel_priority = u32 ; pub use self :: nvioctl_channel_priority as NvChannelPriority ; pub const NvZcullConfig_NvZcullConfig_Global : NvZcullConfig = 0 ; pub const NvZcullConfig_NvZcullConfig_NoCtxSwitch : NvZcullConfig = 1 ; pub const NvZcullConfig_NvZcullConfig_SeparateBuffer : NvZcullConfig = 2 ; pub const NvZcullConfig_NvZcullConfig_PartOfRegularBuffer : NvZcullConfig = 3 ; pub type NvZcullConfig = u32 ; pub const NvAllocSpaceFlags_NvAllocSpaceFlags_FixedOffset : NvAllocSpaceFlags = 1 ; pub const NvAllocSpaceFlags_NvAllocSpaceFlags_Sparse : NvAllocSpaceFlags = 2 ; pub type NvAllocSpaceFlags = u32 ; pub const NvMapBufferFlags_NvMapBufferFlags_FixedOffset : NvMapBufferFlags = 1 ; pub const NvMapBufferFlags_NvMapBufferFlags_IsCacheable : NvMapBufferFlags = 4 ; pub const NvMapBufferFlags_NvMapBufferFlags_Modify : NvMapBufferFlags = 256 ; pub type NvMapBufferFlags = u32 ; pub const NvErrorType_NvErrorType_FifoErrorIdleTimeout : NvErrorType = 8 ; pub const NvErrorType_NvErrorType_GrErrorSwNotify : NvErrorType = 13 ; pub const NvErrorType_NvErrorType_GrSemaphoreTimeout : NvErrorType = 24 ; pub const NvErrorType_NvErrorType_GrIllegalNotify : NvErrorType = 25 ; pub const NvErrorType_NvErrorType_FifoErrorMmuErrFlt : NvErrorType = 31 ; pub const NvErrorType_NvErrorType_PbdmaError : NvErrorType = 32 ; pub const NvErrorType_NvErrorType_ResetChannelVerifError : NvErrorType = 43 ; pub const NvErrorType_NvErrorType_PbdmaPushbufferCrcMismatch : NvErrorType = 80 ; pub type NvErrorType = u32 ; # [ repr ( C ) ] pub struct NvError { pub tickstamp : u64 , pub error_type : u32 , pub unk16 : u16 , pub status : u16 , } # [ test ] fn bindgen_test_layout_NvError ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvError > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( NvError ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvError > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvError ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . tickstamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( tickstamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . error_type as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( error_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . unk16 as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( unk16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvError > ( ) ) ) . status as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( NvError ) , "::" , stringify ! ( status ) ) ) ; } extern "C" { pub fn nvioctlNvhostCtrl_SyncptRead ( fd : u32 , id : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_SyncptIncr ( fd : u32 , id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_SyncptWait ( fd : u32 , id : u32 , threshold : u32 , timeout : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventSignal ( fd : u32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventWait ( fd : u32 , syncpt_id : u32 , threshold : u32 , timeout : s32 , event_id : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventWaitAsync ( fd : u32 , syncpt_id : u32 , threshold : u32 , timeout : s32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventRegister ( fd : u32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrl_EventUnregister ( fd : u32 , event_id : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZCullGetCtxSize ( fd : u32 , out : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZCullGetInfo ( fd : u32 , out : * mut nvioctl_zcull_info ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZbcSetTable ( fd : u32 , color_ds : * const u32 , color_l2 : * const u32 , depth : u32 , format : u32 , type_ : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZbcQueryTable ( fd : u32 , index : u32 , out : * mut nvioctl_zbc_entry ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_GetCharacteristics ( fd : u32 , out : * mut nvioctl_gpu_characteristics ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_GetTpcMasks ( fd : u32 , buffer : * mut ctypes :: c_void , size : usize ) -> Result ; } extern "C" { pub fn nvioctlNvhostCtrlGpu_ZbcGetActiveSlotMask ( fd : u32 , out : * mut nvioctl_zbc_slot_mask ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_BindChannel ( fd : u32 , channel_fd : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_AllocSpace ( fd : u32 , pages : u32 , page_size : u32 , flags : u32 , align_or_offset : u64 , offset : * mut u64 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_FreeSpace ( fd : u32 , offset : u64 , pages : u32 , page_size : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_MapBufferEx ( fd : u32 , flags : u32 , kind : u32 , nvmap_handle : u32 , page_size : u32 , buffer_offset : u64 , mapping_size : u64 , input_offset : u64 , offset : * mut u64 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_UnmapBuffer ( fd : u32 , offset : u64 ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_GetVARegions ( fd : u32 , regions : * mut nvioctl_va_region ) -> Result ; } extern "C" { pub fn nvioctlNvhostAsGpu_InitializeEx ( fd : u32 , flags : u32 , big_page_size : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Create ( fd : u32 , size : u32 , nvmap_handle : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_FromId ( fd : u32 , id : u32 , nvmap_handle : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Alloc ( fd : u32 , nvmap_handle : u32 , heapmask : u32 , flags : u32 , align : u32 , kind : u8 , addr : * mut ctypes :: c_void ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Free ( fd : u32 , nvmap_handle : u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_Param ( fd : u32 , nvmap_handle : u32 , param : NvMapParam , result : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlNvmap_GetId ( fd : u32 , nvmap_handle : u32 , id : * mut u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetNvmapFd ( fd : u32 , nvmap_fd : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SubmitGpfifo ( fd : u32 , entries : * mut nvioctl_gpfifo_entry , num_entries : u32 , flags : u32 , fence_inout : * mut nvioctl_fence ) -> Result ; } extern "C" { pub fn nvioctlChannel_KickoffPb ( fd : u32 , entries : * mut nvioctl_gpfifo_entry , num_entries : u32 , flags : u32 , fence_inout : * mut nvioctl_fence ) -> Result ; } extern "C" { pub fn nvioctlChannel_AllocObjCtx ( fd : u32 , class_num : u32 , flags : u32 , id_out : * mut u64 ) -> Result ; } extern "C" { pub fn nvioctlChannel_ZCullBind ( fd : u32 , gpu_va : u64 , mode : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetErrorNotifier ( fd : u32 , enable : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_GetErrorNotification ( fd : u32 , out : * mut NvError ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetPriority ( fd : u32 , priority : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetTimeout ( fd : u32 , timeout : u32 ) -> Result ; } extern "C" { pub fn nvioctlChannel_AllocGpfifoEx2 ( fd : u32 , num_entries : u32 , flags : u32 , unk0 : u32 , unk1 : u32 , unk2 : u32 , unk3 : u32 , fence_out : * mut nvioctl_fence ) -> Result ; } extern "C" { pub fn nvioctlChannel_SetUserData ( fd : u32 , addr : * mut ctypes :: c_void ) -> Result ; } pub type NvFence = nvioctl_fence ; # [ repr ( C ) ] pub struct NvMultiFence { pub num_fences : u32 , pub fences : [ NvFence ; 4usize ] , } # [ test ] fn bindgen_test_layout_NvMultiFence ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvMultiFence > ( ) , 36usize , concat ! ( "Size of: " , stringify ! ( NvMultiFence ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvMultiFence > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NvMultiFence ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvMultiFence > ( ) ) ) . num_fences as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvMultiFence ) , "::" , stringify ! ( num_fences ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvMultiFence > ( ) ) ) . fences as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvMultiFence ) , "::" , stringify ! ( fences ) ) ) ; } extern "C" { pub fn nvFenceInit ( ) -> Result ; } extern "C" { pub fn nvFenceExit ( ) ; } extern "C" { pub fn nvFenceWait ( f : * mut NvFence , timeout_us : s32 ) -> Result ; } extern "C" { pub fn nvMultiFenceWait ( mf : * mut NvMultiFence , timeout_us : s32 ) -> Result ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BqRect { pub left : s32 , pub top : s32 , pub right : s32 , pub bottom : s32 , } # [ test ] fn bindgen_test_layout_BqRect ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqRect > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( BqRect ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqRect > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( BqRect ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . left as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( left ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . top as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( top ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . right as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( right ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqRect > ( ) ) ) . bottom as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqRect ) , "::" , stringify ! ( bottom ) ) ) ; } # [ repr ( C ) ] pub struct BqBufferInput { pub __bindgen_anon_1 : BqBufferInput__bindgen_ty_1 , pub isAutoTimestamp : s32 , pub crop : BqRect , pub scalingMode : s32 , pub transform : u32 , pub stickyTransform : u32 , pub unk : u32 , pub swapInterval : u32 , pub fence : NvMultiFence , } # [ repr ( C , packed ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BqBufferInput__bindgen_ty_1 { pub timestamp : s64 , } # [ test ] fn bindgen_test_layout_BqBufferInput__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqBufferInput__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( BqBufferInput__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqBufferInput__bindgen_ty_1 > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( BqBufferInput__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput__bindgen_ty_1 > ( ) ) ) . timestamp as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput__bindgen_ty_1 ) , "::" , stringify ! ( timestamp ) ) ) ; } # [ test ] fn bindgen_test_layout_BqBufferInput ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqBufferInput > ( ) , 84usize , concat ! ( "Size of: " , stringify ! ( BqBufferInput ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqBufferInput > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( BqBufferInput ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . isAutoTimestamp as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( isAutoTimestamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . crop as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( crop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . scalingMode as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( scalingMode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . transform as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( transform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . stickyTransform as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( stickyTransform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . unk as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( unk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . swapInterval as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( swapInterval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferInput > ( ) ) ) . fence as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferInput ) , "::" , stringify ! ( fence ) ) ) ; } # [ repr ( C ) ] pub struct BqBufferOutput { pub width : u32 , pub height : u32 , pub transformHint : u32 , pub numPendingBuffers : u32 , } # [ test ] fn bindgen_test_layout_BqBufferOutput ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqBufferOutput > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( BqBufferOutput ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqBufferOutput > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( BqBufferOutput ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . width as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . height as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . transformHint as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( transformHint ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqBufferOutput > ( ) ) ) . numPendingBuffers as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqBufferOutput ) , "::" , stringify ! ( numPendingBuffers ) ) ) ; } # [ repr ( C ) ] pub struct BqGraphicBuffer { pub width : u32 , pub height : u32 , pub stride : u32 , pub format : u32 , pub usage : u32 , pub native_handle : * mut NativeHandle , } # [ test ] fn bindgen_test_layout_BqGraphicBuffer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < BqGraphicBuffer > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( BqGraphicBuffer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < BqGraphicBuffer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( BqGraphicBuffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . width as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . height as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . stride as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( stride ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . format as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . usage as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < BqGraphicBuffer > ( ) ) ) . native_handle as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( BqGraphicBuffer ) , "::" , stringify ! ( native_handle ) ) ) ; } extern "C" { pub fn bqRequestBuffer ( b : * mut Binder , bufferIdx : s32 , buf : * mut BqGraphicBuffer ) -> Result ; } extern "C" { pub fn bqDequeueBuffer ( b : * mut Binder , async : bool , width : u32 , height : u32 , format : s32 , usage : u32 , buf : * mut s32 , fence : * mut NvMultiFence ) -> Result ; } extern "C" { pub fn bqDetachBuffer ( b : * mut Binder , slot : s32 ) -> Result ; } extern "C" { pub fn bqQueueBuffer ( b : * mut Binder , buf : s32 , input : * const BqBufferInput , output : * mut BqBufferOutput ) -> Result ; } extern "C" { pub fn bqCancelBuffer ( b : * mut Binder , buf : s32 , fence : * const NvMultiFence ) -> Result ; } extern "C" { pub fn bqQuery ( b : * mut Binder , what : s32 , value : * mut s32 ) -> Result ; } extern "C" { pub fn bqConnect ( b : * mut Binder , api : s32 , producerControlledByApp : bool , output : * mut BqBufferOutput ) -> Result ; } extern "C" { pub fn bqDisconnect ( b : * mut Binder , api : s32 ) -> Result ; } extern "C" { pub fn bqSetPreallocatedBuffer ( b : * mut Binder , buf : s32 , input : * const BqGraphicBuffer ) -> Result ; } # [ repr ( C ) ] pub struct NvSurface { pub width : u32 , pub height : u32 , pub color_format : NvColorFormat , pub layout : NvLayout , pub pitch : u32 , pub unused : u32 , pub offset : u32 , pub kind : NvKind , pub block_height_log2 : u32 , pub scan : NvDisplayScanFormat , pub second_field_offset : u32 , pub flags : u64 , pub size : u64 , pub unk : [ u32 ; 6usize ] , } # [ test ] fn bindgen_test_layout_NvSurface ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvSurface > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( NvSurface ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvSurface > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvSurface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . width as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . height as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . color_format as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( color_format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . layout as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( layout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . pitch as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( pitch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . unused as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( unused ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . offset as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . kind as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( kind ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . block_height_log2 as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( block_height_log2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . scan as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( scan ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . second_field_offset as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( second_field_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . flags as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . size as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvSurface > ( ) ) ) . unk as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( NvSurface ) , "::" , stringify ! ( unk ) ) ) ; } # [ repr ( C ) ] pub struct NvGraphicBuffer { pub header : NativeHandle , pub unk0 : s32 , pub nvmap_id : s32 , pub unk2 : u32 , pub magic : u32 , pub pid : u32 , pub type_ : u32 , pub usage : u32 , pub format : u32 , pub ext_format : u32 , pub stride : u32 , pub total_size : u32 , pub num_planes : u32 , pub unk12 : u32 , pub planes : [ NvSurface ; 3usize ] , pub unused : u64 , } # [ test ] fn bindgen_test_layout_NvGraphicBuffer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvGraphicBuffer > ( ) , 336usize , concat ! ( "Size of: " , stringify ! ( NvGraphicBuffer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvGraphicBuffer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvGraphicBuffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . header as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unk0 as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unk0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . nvmap_id as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( nvmap_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unk2 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unk2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . magic as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( magic ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . pid as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( pid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . type_ as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . usage as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . format as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . ext_format as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( ext_format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . stride as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( stride ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . total_size as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( total_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . num_planes as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( num_planes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unk12 as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unk12 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . planes as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( planes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGraphicBuffer > ( ) ) ) . unused as * const _ as usize } , 328usize , concat ! ( "Offset of field: " , stringify ! ( NvGraphicBuffer ) , "::" , stringify ! ( unused ) ) ) ; } /// Native window structure. - # [ repr ( C ) ] pub struct NWindow { pub magic : u32 , pub bq : Binder , pub event : Event , pub mutex : Mutex , pub slots_configured : u64 , pub slots_requested : u64 , pub cur_slot : s32 , pub width : u32 , pub height : u32 , pub format : u32 , pub usage : u32 , pub crop : BqRect , pub scaling_mode : u32 , pub transform : u32 , pub sticky_transform : u32 , pub default_width : u32 , pub default_height : u32 , pub swap_interval : u32 , pub is_connected : bool , pub producer_controlled_by_app : bool , pub consumer_running_behind : bool , } # [ test ] fn bindgen_test_layout_NWindow ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NWindow > ( ) , 120usize , concat ! ( "Size of: " , stringify ! ( NWindow ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NWindow > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NWindow ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . magic as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( magic ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . bq as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( bq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . event as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . mutex as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( mutex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . slots_configured as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( slots_configured ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . slots_requested as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( slots_requested ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . cur_slot as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( cur_slot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . width as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . height as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . format as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . usage as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . crop as * const _ as usize } , 76usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( crop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . scaling_mode as * const _ as usize } , 92usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( scaling_mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . transform as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( transform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . sticky_transform as * const _ as usize } , 100usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( sticky_transform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . default_width as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( default_width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . default_height as * const _ as usize } , 108usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( default_height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . swap_interval as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( swap_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . is_connected as * const _ as usize } , 116usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( is_connected ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . producer_controlled_by_app as * const _ as usize } , 117usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( producer_controlled_by_app ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . consumer_running_behind as * const _ as usize } , 118usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( consumer_running_behind ) ) ) ; } extern "C" { + # [ repr ( C ) ] pub struct NWindow { pub magic : u32 , pub bq : Binder , pub event : Event , pub mutex : Mutex , pub slots_configured : u64 , pub slots_requested : u64 , pub cur_slot : s32 , pub width : u32 , pub height : u32 , pub format : u32 , pub usage : u32 , pub crop : BqRect , pub scaling_mode : u32 , pub transform : u32 , pub sticky_transform : u32 , pub default_width : u32 , pub default_height : u32 , pub swap_interval : u32 , pub is_connected : bool , pub producer_controlled_by_app : bool , pub consumer_running_behind : bool , } # [ test ] fn bindgen_test_layout_NWindow ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NWindow > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( NWindow ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NWindow > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NWindow ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . magic as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( magic ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . bq as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( bq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . event as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . mutex as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( mutex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . slots_configured as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( slots_configured ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . slots_requested as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( slots_requested ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . cur_slot as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( cur_slot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . width as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . height as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . format as * const _ as usize } , 76usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( format ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . usage as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( usage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . crop as * const _ as usize } , 84usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( crop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . scaling_mode as * const _ as usize } , 100usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( scaling_mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . transform as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( transform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . sticky_transform as * const _ as usize } , 108usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( sticky_transform ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . default_width as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( default_width ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . default_height as * const _ as usize } , 116usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( default_height ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . swap_interval as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( swap_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . is_connected as * const _ as usize } , 124usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( is_connected ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . producer_controlled_by_app as * const _ as usize } , 125usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( producer_controlled_by_app ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NWindow > ( ) ) ) . consumer_running_behind as * const _ as usize } , 126usize , concat ! ( "Offset of field: " , stringify ! ( NWindow ) , "::" , stringify ! ( consumer_running_behind ) ) ) ; } extern "C" { /// Checks whether a pointer refers to a valid \ref NWindow object. pub fn nwindowIsValid ( nw : * mut NWindow ) -> bool ; } extern "C" { /// @brief Retrieves the default \ref NWindow object. @@ -3015,7 +4297,7 @@ where /// @note If \ref framebufferMakeLinear was used, this function will copy the image from the shadow linear buffer to the actual framebuffer, /// converting it in the process to the layout expected by the compositor. /// @note Each call to \ref framebufferBegin must be paired with a \ref framebufferEnd call. - pub fn framebufferEnd ( fb : * mut Framebuffer ) ; } # [ repr ( C ) ] pub struct NvAddressSpace { pub fd : u32 , pub page_size : u32 , pub has_init : bool , } # [ test ] fn bindgen_test_layout_NvAddressSpace ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvAddressSpace > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NvAddressSpace ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvAddressSpace > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NvAddressSpace ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvAddressSpace > ( ) ) ) . fd as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvAddressSpace ) , "::" , stringify ! ( fd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvAddressSpace > ( ) ) ) . page_size as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvAddressSpace ) , "::" , stringify ! ( page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvAddressSpace > ( ) ) ) . has_init as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvAddressSpace ) , "::" , stringify ! ( has_init ) ) ) ; } extern "C" { pub fn nvAddressSpaceCreate ( a : * mut NvAddressSpace , page_size : u32 ) -> Result ; } extern "C" { pub fn nvAddressSpaceClose ( a : * mut NvAddressSpace ) ; } extern "C" { pub fn nvAddressSpaceAlloc ( a : * mut NvAddressSpace , sparse : bool , size : u64 , iova_out : * mut iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceAllocFixed ( a : * mut NvAddressSpace , sparse : bool , size : u64 , iova : iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceFree ( a : * mut NvAddressSpace , iova : iova_t , size : u64 ) -> Result ; } extern "C" { pub fn nvAddressSpaceMap ( a : * mut NvAddressSpace , nvmap_handle : u32 , is_gpu_cacheable : bool , kind : NvKind , iova_out : * mut iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceMapFixed ( a : * mut NvAddressSpace , nvmap_handle : u32 , is_gpu_cacheable : bool , kind : NvKind , iova : iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceModify ( a : * mut NvAddressSpace , iova : iova_t , offset : u64 , size : u64 , kind : NvKind ) -> Result ; } extern "C" { pub fn nvAddressSpaceUnmap ( a : * mut NvAddressSpace , iova : iova_t ) -> Result ; } # [ repr ( C ) ] pub struct NvChannel { pub fd : u32 , pub has_init : bool , } # [ test ] fn bindgen_test_layout_NvChannel ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvChannel > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( NvChannel ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvChannel > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NvChannel ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvChannel > ( ) ) ) . fd as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvChannel ) , "::" , stringify ! ( fd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvChannel > ( ) ) ) . has_init as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvChannel ) , "::" , stringify ! ( has_init ) ) ) ; } extern "C" { pub fn nvChannelCreate ( c : * mut NvChannel , dev : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn nvChannelClose ( c : * mut NvChannel ) ; } extern "C" { pub fn nvChannelSetPriority ( c : * mut NvChannel , prio : NvChannelPriority ) -> Result ; } extern "C" { pub fn nvChannelSetTimeout ( c : * mut NvChannel , timeout : u32 ) -> Result ; } extern "C" { pub fn nvGpuInit ( ) -> Result ; } extern "C" { pub fn nvGpuExit ( ) ; } extern "C" { pub fn nvGpuGetCharacteristics ( ) -> * const nvioctl_gpu_characteristics ; } extern "C" { pub fn nvGpuGetZcullCtxSize ( ) -> u32 ; } # [ repr ( C ) ] pub struct NvGpuChannel { pub base : NvChannel , pub error_event : Event , pub object_id : u64 , pub fence : NvFence , pub fence_incr : u32 , pub entries : [ nvioctl_gpfifo_entry ; 2048usize ] , pub num_entries : u32 , } # [ test ] fn bindgen_test_layout_NvGpuChannel ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvGpuChannel > ( ) , 16440usize , concat ! ( "Size of: " , stringify ! ( NvGpuChannel ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvGpuChannel > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvGpuChannel ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . base as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . error_event as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( error_event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . object_id as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( object_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . fence as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( fence ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . fence_incr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( fence_incr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . entries as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . num_entries as * const _ as usize } , 16432usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( num_entries ) ) ) ; } extern "C" { pub fn nvGpuChannelCreate ( c : * mut NvGpuChannel , as_ : * mut NvAddressSpace ) -> Result ; } extern "C" { pub fn nvGpuChannelClose ( c : * mut NvGpuChannel ) ; } extern "C" { pub fn nvGpuChannelZcullBind ( c : * mut NvGpuChannel , iova : iova_t ) -> Result ; } extern "C" { pub fn nvGpuChannelAppendEntry ( c : * mut NvGpuChannel , start : iova_t , num_cmds : usize , flags : u32 , flush_threshold : u32 ) -> Result ; } extern "C" { pub fn nvGpuChannelKickoff ( c : * mut NvGpuChannel ) -> Result ; } extern "C" { pub fn nvGpuChannelGetErrorNotification ( c : * mut NvGpuChannel , error : * mut NvError ) -> Result ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AudioDriverEtc { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AudioDriver { pub etc : * mut AudioDriverEtc , pub config : AudioRendererConfig , pub in_mempools : * mut AudioRendererMemPoolInfoIn , pub in_channels : * mut AudioRendererChannelInfoIn , pub in_voices : * mut AudioRendererVoiceInfoIn , pub in_mixes : * mut AudioRendererMixInfoIn , pub in_sinks : * mut AudioRendererSinkInfoIn , } # [ test ] fn bindgen_test_layout_AudioDriver ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioDriver > ( ) , 72usize , concat ! ( "Size of: " , stringify ! ( AudioDriver ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioDriver > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioDriver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . etc as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( etc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . config as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( config ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_mempools as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_mempools ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_channels as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_channels ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_voices as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_voices ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_mixes as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_mixes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_sinks as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_sinks ) ) ) ; } extern "C" { pub fn audrvCreate ( d : * mut AudioDriver , config : * const AudioRendererConfig , num_final_mix_channels : ctypes :: c_int ) -> Result ; } extern "C" { pub fn audrvUpdate ( d : * mut AudioDriver ) -> Result ; } extern "C" { pub fn audrvClose ( d : * mut AudioDriver ) ; } extern "C" { pub fn audrvMemPoolAdd ( d : * mut AudioDriver , buffer : * mut ctypes :: c_void , size : usize ) -> ctypes :: c_int ; } extern "C" { pub fn audrvMemPoolRemove ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvMemPoolAttach ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvMemPoolDetach ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Free : AudioDriverWaveBufState = 0 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Waiting : AudioDriverWaveBufState = 1 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Queued : AudioDriverWaveBufState = 2 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Playing : AudioDriverWaveBufState = 3 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Done : AudioDriverWaveBufState = 4 ; pub type AudioDriverWaveBufState = u32 ; # [ repr ( C ) ] pub struct AudioDriverWaveBuf { pub __bindgen_anon_1 : AudioDriverWaveBuf__bindgen_ty_1 , pub size : u64 , pub start_sample_offset : s32 , pub end_sample_offset : s32 , pub context_addr : * const ctypes :: c_void , pub context_sz : u64 , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub is_looping : bool , pub sequence_id : u32 , pub next : * mut AudioDriverWaveBuf , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union AudioDriverWaveBuf__bindgen_ty_1 { pub data_pcm16 : * mut s16 , pub data_adpcm : * mut u8 , pub data_raw : * const ctypes :: c_void , _bindgen_union_align : u64 , } # [ test ] fn bindgen_test_layout_AudioDriverWaveBuf__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) ) ) . data_pcm16 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) , "::" , stringify ! ( data_pcm16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) ) ) . data_adpcm as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) , "::" , stringify ! ( data_adpcm ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) ) ) . data_raw as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) , "::" , stringify ! ( data_raw ) ) ) ; } # [ test ] fn bindgen_test_layout_AudioDriverWaveBuf ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioDriverWaveBuf > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AudioDriverWaveBuf ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioDriverWaveBuf > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioDriverWaveBuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . start_sample_offset as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( start_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . end_sample_offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( end_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . context_addr as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( context_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . context_sz as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( context_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . is_looping as * const _ as usize } , 41usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( is_looping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . sequence_id as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( sequence_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . next as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( next ) ) ) ; } impl AudioDriverWaveBuf { # [ inline ] pub fn state ( & self ) -> AudioDriverWaveBufState { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_state ( & mut self , val : AudioDriverWaveBufState ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 8u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( state : AudioDriverWaveBufState ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 8u8 , { let state : u32 = unsafe { :: core :: mem :: transmute ( state ) } ; state as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { pub fn audrvVoiceInit ( d : * mut AudioDriver , id : ctypes :: c_int , num_channels : ctypes :: c_int , format : PcmFormat , sample_rate : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvVoiceDrop ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } extern "C" { pub fn audrvVoiceStop ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } extern "C" { pub fn audrvVoiceIsPlaying ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvVoiceAddWaveBuf ( d : * mut AudioDriver , id : ctypes :: c_int , wavebuf : * mut AudioDriverWaveBuf ) -> bool ; } extern "C" { pub fn audrvVoiceGetWaveBufSeq ( d : * mut AudioDriver , id : ctypes :: c_int ) -> u32 ; } extern "C" { pub fn audrvVoiceGetPlayedSampleCount ( d : * mut AudioDriver , id : ctypes :: c_int ) -> u32 ; } extern "C" { pub fn audrvVoiceGetVoiceDropsCount ( d : * mut AudioDriver , id : ctypes :: c_int ) -> u32 ; } extern "C" { pub fn audrvVoiceSetBiquadFilter ( d : * mut AudioDriver , id : ctypes :: c_int , biquad_id : ctypes :: c_int , a0 : f32 , a1 : f32 , a2 : f32 , b0 : f32 , b1 : f32 , b2 : f32 ) ; } extern "C" { pub fn audrvMixAdd ( d : * mut AudioDriver , sample_rate : ctypes :: c_int , num_channels : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { pub fn audrvMixRemove ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } extern "C" { pub fn audrvDeviceSinkAdd ( d : * mut AudioDriver , device_name : * const ctypes :: c_char , num_channels : ctypes :: c_int , channel_ids : * const u8 ) -> ctypes :: c_int ; } extern "C" { pub fn audrvSinkRemove ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } + pub fn framebufferEnd ( fb : * mut Framebuffer ) ; } # [ repr ( C ) ] pub struct NvAddressSpace { pub fd : u32 , pub page_size : u32 , pub has_init : bool , } # [ test ] fn bindgen_test_layout_NvAddressSpace ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvAddressSpace > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( NvAddressSpace ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvAddressSpace > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NvAddressSpace ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvAddressSpace > ( ) ) ) . fd as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvAddressSpace ) , "::" , stringify ! ( fd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvAddressSpace > ( ) ) ) . page_size as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvAddressSpace ) , "::" , stringify ! ( page_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvAddressSpace > ( ) ) ) . has_init as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvAddressSpace ) , "::" , stringify ! ( has_init ) ) ) ; } extern "C" { pub fn nvAddressSpaceCreate ( a : * mut NvAddressSpace , page_size : u32 ) -> Result ; } extern "C" { pub fn nvAddressSpaceClose ( a : * mut NvAddressSpace ) ; } extern "C" { pub fn nvAddressSpaceAlloc ( a : * mut NvAddressSpace , sparse : bool , size : u64 , iova_out : * mut iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceAllocFixed ( a : * mut NvAddressSpace , sparse : bool , size : u64 , iova : iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceFree ( a : * mut NvAddressSpace , iova : iova_t , size : u64 ) -> Result ; } extern "C" { pub fn nvAddressSpaceMap ( a : * mut NvAddressSpace , nvmap_handle : u32 , is_gpu_cacheable : bool , kind : NvKind , iova_out : * mut iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceMapFixed ( a : * mut NvAddressSpace , nvmap_handle : u32 , is_gpu_cacheable : bool , kind : NvKind , iova : iova_t ) -> Result ; } extern "C" { pub fn nvAddressSpaceModify ( a : * mut NvAddressSpace , iova : iova_t , offset : u64 , size : u64 , kind : NvKind ) -> Result ; } extern "C" { pub fn nvAddressSpaceUnmap ( a : * mut NvAddressSpace , iova : iova_t ) -> Result ; } # [ repr ( C ) ] pub struct NvChannel { pub fd : u32 , pub has_init : bool , } # [ test ] fn bindgen_test_layout_NvChannel ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvChannel > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( NvChannel ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvChannel > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( NvChannel ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvChannel > ( ) ) ) . fd as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvChannel ) , "::" , stringify ! ( fd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvChannel > ( ) ) ) . has_init as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( NvChannel ) , "::" , stringify ! ( has_init ) ) ) ; } extern "C" { pub fn nvChannelCreate ( c : * mut NvChannel , dev : * const ctypes :: c_char ) -> Result ; } extern "C" { pub fn nvChannelClose ( c : * mut NvChannel ) ; } extern "C" { pub fn nvChannelSetPriority ( c : * mut NvChannel , prio : NvChannelPriority ) -> Result ; } extern "C" { pub fn nvChannelSetTimeout ( c : * mut NvChannel , timeout : u32 ) -> Result ; } extern "C" { pub fn nvGpuInit ( ) -> Result ; } extern "C" { pub fn nvGpuExit ( ) ; } extern "C" { pub fn nvGpuGetCharacteristics ( ) -> * const nvioctl_gpu_characteristics ; } extern "C" { pub fn nvGpuGetZcullCtxSize ( ) -> u32 ; } extern "C" { pub fn nvGpuGetZcullInfo ( ) -> * const nvioctl_zcull_info ; } extern "C" { pub fn nvGpuGetTpcMasks ( num_masks_out : * mut u32 ) -> * const u32 ; } extern "C" { pub fn nvGpuZbcGetActiveSlotMask ( out_slot : * mut u32 , out_mask : * mut u32 ) -> Result ; } extern "C" { pub fn nvGpuZbcAddColor ( color_l2 : * const u32 , color_ds : * const u32 , format : u32 ) -> Result ; } extern "C" { pub fn nvGpuZbcAddDepth ( depth : f32 ) -> Result ; } # [ repr ( C ) ] pub struct NvGpuChannel { pub base : NvChannel , pub error_event : Event , pub object_id : u64 , pub fence : NvFence , pub fence_incr : u32 , pub entries : [ nvioctl_gpfifo_entry ; 2048usize ] , pub num_entries : u32 , } # [ test ] fn bindgen_test_layout_NvGpuChannel ( ) { assert_eq ! ( :: core :: mem :: size_of :: < NvGpuChannel > ( ) , 16440usize , concat ! ( "Size of: " , stringify ! ( NvGpuChannel ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < NvGpuChannel > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( NvGpuChannel ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . base as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . error_event as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( error_event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . object_id as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( object_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . fence as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( fence ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . fence_incr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( fence_incr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . entries as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < NvGpuChannel > ( ) ) ) . num_entries as * const _ as usize } , 16432usize , concat ! ( "Offset of field: " , stringify ! ( NvGpuChannel ) , "::" , stringify ! ( num_entries ) ) ) ; } extern "C" { pub fn nvGpuChannelCreate ( c : * mut NvGpuChannel , as_ : * mut NvAddressSpace ) -> Result ; } extern "C" { pub fn nvGpuChannelClose ( c : * mut NvGpuChannel ) ; } extern "C" { pub fn nvGpuChannelZcullBind ( c : * mut NvGpuChannel , iova : iova_t ) -> Result ; } extern "C" { pub fn nvGpuChannelAppendEntry ( c : * mut NvGpuChannel , start : iova_t , num_cmds : usize , flags : u32 , flush_threshold : u32 ) -> Result ; } extern "C" { pub fn nvGpuChannelKickoff ( c : * mut NvGpuChannel ) -> Result ; } extern "C" { pub fn nvGpuChannelGetErrorNotification ( c : * mut NvGpuChannel , error : * mut NvError ) -> Result ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AudioDriverEtc { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct AudioDriver { pub etc : * mut AudioDriverEtc , pub config : AudioRendererConfig , pub in_mempools : * mut AudioRendererMemPoolInfoIn , pub in_channels : * mut AudioRendererChannelInfoIn , pub in_voices : * mut AudioRendererVoiceInfoIn , pub in_mixes : * mut AudioRendererMixInfoIn , pub in_sinks : * mut AudioRendererSinkInfoIn , } # [ test ] fn bindgen_test_layout_AudioDriver ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioDriver > ( ) , 72usize , concat ! ( "Size of: " , stringify ! ( AudioDriver ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioDriver > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioDriver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . etc as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( etc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . config as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( config ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_mempools as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_mempools ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_channels as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_channels ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_voices as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_voices ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_mixes as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_mixes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriver > ( ) ) ) . in_sinks as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriver ) , "::" , stringify ! ( in_sinks ) ) ) ; } extern "C" { pub fn audrvCreate ( d : * mut AudioDriver , config : * const AudioRendererConfig , num_final_mix_channels : ctypes :: c_int ) -> Result ; } extern "C" { pub fn audrvUpdate ( d : * mut AudioDriver ) -> Result ; } extern "C" { pub fn audrvClose ( d : * mut AudioDriver ) ; } extern "C" { pub fn audrvMemPoolAdd ( d : * mut AudioDriver , buffer : * mut ctypes :: c_void , size : usize ) -> ctypes :: c_int ; } extern "C" { pub fn audrvMemPoolRemove ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvMemPoolAttach ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvMemPoolDetach ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Free : AudioDriverWaveBufState = 0 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Waiting : AudioDriverWaveBufState = 1 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Queued : AudioDriverWaveBufState = 2 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Playing : AudioDriverWaveBufState = 3 ; pub const AudioDriverWaveBufState_AudioDriverWaveBufState_Done : AudioDriverWaveBufState = 4 ; pub type AudioDriverWaveBufState = u32 ; # [ repr ( C ) ] pub struct AudioDriverWaveBuf { pub __bindgen_anon_1 : AudioDriverWaveBuf__bindgen_ty_1 , pub size : u64 , pub start_sample_offset : s32 , pub end_sample_offset : s32 , pub context_addr : * const ctypes :: c_void , pub context_sz : u64 , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub is_looping : bool , pub sequence_id : u32 , pub next : * mut AudioDriverWaveBuf , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union AudioDriverWaveBuf__bindgen_ty_1 { pub data_pcm16 : * mut s16 , pub data_adpcm : * mut u8 , pub data_raw : * const ctypes :: c_void , _bindgen_union_align : u64 , } # [ test ] fn bindgen_test_layout_AudioDriverWaveBuf__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) ) ) . data_pcm16 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) , "::" , stringify ! ( data_pcm16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) ) ) . data_adpcm as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) , "::" , stringify ! ( data_adpcm ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf__bindgen_ty_1 > ( ) ) ) . data_raw as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf__bindgen_ty_1 ) , "::" , stringify ! ( data_raw ) ) ) ; } # [ test ] fn bindgen_test_layout_AudioDriverWaveBuf ( ) { assert_eq ! ( :: core :: mem :: size_of :: < AudioDriverWaveBuf > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( AudioDriverWaveBuf ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < AudioDriverWaveBuf > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( AudioDriverWaveBuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . start_sample_offset as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( start_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . end_sample_offset as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( end_sample_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . context_addr as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( context_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . context_sz as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( context_sz ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . is_looping as * const _ as usize } , 41usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( is_looping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . sequence_id as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( sequence_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < AudioDriverWaveBuf > ( ) ) ) . next as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( AudioDriverWaveBuf ) , "::" , stringify ! ( next ) ) ) ; } impl AudioDriverWaveBuf { # [ inline ] pub fn state ( & self ) -> AudioDriverWaveBufState { unsafe { :: core :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 8u8 ) as u32 ) } } # [ inline ] pub fn set_state ( & mut self , val : AudioDriverWaveBufState ) { unsafe { let val : u32 = :: core :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 8u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( state : AudioDriverWaveBufState ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 8u8 , { let state : u32 = unsafe { :: core :: mem :: transmute ( state ) } ; state as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { pub fn audrvVoiceInit ( d : * mut AudioDriver , id : ctypes :: c_int , num_channels : ctypes :: c_int , format : PcmFormat , sample_rate : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvVoiceDrop ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } extern "C" { pub fn audrvVoiceStop ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } extern "C" { pub fn audrvVoiceIsPlaying ( d : * mut AudioDriver , id : ctypes :: c_int ) -> bool ; } extern "C" { pub fn audrvVoiceAddWaveBuf ( d : * mut AudioDriver , id : ctypes :: c_int , wavebuf : * mut AudioDriverWaveBuf ) -> bool ; } extern "C" { pub fn audrvVoiceGetWaveBufSeq ( d : * mut AudioDriver , id : ctypes :: c_int ) -> u32 ; } extern "C" { pub fn audrvVoiceGetPlayedSampleCount ( d : * mut AudioDriver , id : ctypes :: c_int ) -> u32 ; } extern "C" { pub fn audrvVoiceGetVoiceDropsCount ( d : * mut AudioDriver , id : ctypes :: c_int ) -> u32 ; } extern "C" { pub fn audrvVoiceSetBiquadFilter ( d : * mut AudioDriver , id : ctypes :: c_int , biquad_id : ctypes :: c_int , a0 : f32 , a1 : f32 , a2 : f32 , b0 : f32 , b1 : f32 , b2 : f32 ) ; } extern "C" { pub fn audrvMixAdd ( d : * mut AudioDriver , sample_rate : ctypes :: c_int , num_channels : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { pub fn audrvMixRemove ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } extern "C" { pub fn audrvDeviceSinkAdd ( d : * mut AudioDriver , device_name : * const ctypes :: c_char , num_channels : ctypes :: c_int , channel_ids : * const u8 ) -> ctypes :: c_int ; } extern "C" { pub fn audrvSinkRemove ( d : * mut AudioDriver , id : ctypes :: c_int ) ; } /// CommonArguments # [ repr ( C ) ] pub struct LibAppletArgs { pub CommonArgs_version : u32 , pub CommonArgs_size : u32 , /// < LibraryApplet API version @@ -3347,9 +4629,9 @@ where /// < Used by \ref swkbdConfigMakePresetDownloadCode on 5.0.0+. Enables using \ref SwkbdArgV7 unk_x3e0. pub const SwkbdTextDrawType_SwkbdTextDrawType_DownloadCode : SwkbdTextDrawType = 2 ; /// Value for SwkbdArgCommon::textDrawType. Only applies when stringLenMax is 1..32, otherwise swkbd will only use SwkbdTextDrawType_Box. - pub type SwkbdTextDrawType = u32 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_Finalize : SwkbdRequestCommand = 4 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetUserWordInfo : SwkbdRequestCommand = 6 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetCustomizeDic : SwkbdRequestCommand = 7 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_Calc : SwkbdRequestCommand = 10 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetCustomizedDictionaries : SwkbdRequestCommand = 11 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_UnsetCustomizedDictionaries : SwkbdRequestCommand = 12 ; + pub type SwkbdTextDrawType = u32 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_Finalize : SwkbdRequestCommand = 4 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetUserWordInfo : SwkbdRequestCommand = 6 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetCustomizeDic : SwkbdRequestCommand = 7 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_Calc : SwkbdRequestCommand = 10 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetCustomizedDictionaries : SwkbdRequestCommand = 11 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_UnsetCustomizedDictionaries : SwkbdRequestCommand = 12 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetChangedStringV2Flag : SwkbdRequestCommand = 13 ; pub const SwkbdRequestCommand_SwkbdRequestCommand_SetMovedCursorV2Flag : SwkbdRequestCommand = 14 ; /// SwkbdInline Interactive input storage request ID. - pub type SwkbdRequestCommand = u32 ; pub const SwkbdReplyType_SwkbdReplyType_FinishedInitialize : SwkbdReplyType = 0 ; pub const SwkbdReplyType_SwkbdReplyType_ChangedString : SwkbdReplyType = 2 ; pub const SwkbdReplyType_SwkbdReplyType_MovedCursor : SwkbdReplyType = 3 ; pub const SwkbdReplyType_SwkbdReplyType_MovedTab : SwkbdReplyType = 4 ; pub const SwkbdReplyType_SwkbdReplyType_DecidedEnter : SwkbdReplyType = 5 ; pub const SwkbdReplyType_SwkbdReplyType_DecidedCancel : SwkbdReplyType = 6 ; pub const SwkbdReplyType_SwkbdReplyType_ChangedStringUtf8 : SwkbdReplyType = 7 ; pub const SwkbdReplyType_SwkbdReplyType_MovedCursorUtf8 : SwkbdReplyType = 8 ; pub const SwkbdReplyType_SwkbdReplyType_DecidedEnterUtf8 : SwkbdReplyType = 9 ; pub const SwkbdReplyType_SwkbdReplyType_UnsetCustomizeDic : SwkbdReplyType = 10 ; pub const SwkbdReplyType_SwkbdReplyType_ReleasedUserWordInfo : SwkbdReplyType = 11 ; pub const SwkbdReplyType_SwkbdReplyType_UnsetCustomizedDictionaries : SwkbdReplyType = 12 ; + pub type SwkbdRequestCommand = u32 ; pub const SwkbdReplyType_SwkbdReplyType_FinishedInitialize : SwkbdReplyType = 0 ; pub const SwkbdReplyType_SwkbdReplyType_ChangedString : SwkbdReplyType = 2 ; pub const SwkbdReplyType_SwkbdReplyType_MovedCursor : SwkbdReplyType = 3 ; pub const SwkbdReplyType_SwkbdReplyType_MovedTab : SwkbdReplyType = 4 ; pub const SwkbdReplyType_SwkbdReplyType_DecidedEnter : SwkbdReplyType = 5 ; pub const SwkbdReplyType_SwkbdReplyType_DecidedCancel : SwkbdReplyType = 6 ; pub const SwkbdReplyType_SwkbdReplyType_ChangedStringUtf8 : SwkbdReplyType = 7 ; pub const SwkbdReplyType_SwkbdReplyType_MovedCursorUtf8 : SwkbdReplyType = 8 ; pub const SwkbdReplyType_SwkbdReplyType_DecidedEnterUtf8 : SwkbdReplyType = 9 ; pub const SwkbdReplyType_SwkbdReplyType_UnsetCustomizeDic : SwkbdReplyType = 10 ; pub const SwkbdReplyType_SwkbdReplyType_ReleasedUserWordInfo : SwkbdReplyType = 11 ; pub const SwkbdReplyType_SwkbdReplyType_UnsetCustomizedDictionaries : SwkbdReplyType = 12 ; pub const SwkbdReplyType_SwkbdReplyType_ChangedStringV2 : SwkbdReplyType = 13 ; pub const SwkbdReplyType_SwkbdReplyType_MovedCursorV2 : SwkbdReplyType = 14 ; pub const SwkbdReplyType_SwkbdReplyType_ChangedStringUtf8V2 : SwkbdReplyType = 15 ; pub const SwkbdReplyType_SwkbdReplyType_MovedCursorUtf8V2 : SwkbdReplyType = 16 ; /// SwkbdInline Interactive output storage reply ID. pub type SwkbdReplyType = u32 ; /// < Default state from \ref swkbdInlineCreate, before a state is set by \ref swkbdInlineUpdate when a reply is received. Also indicates that the applet is no longer running. @@ -3413,8 +4695,14 @@ where /// < This is SwkbdCustomizedDictionarySet::entries. pub entries : [ u64 ; 24usize ] , /// < This is SwkbdCustomizedDictionarySet::total_entries. - pub total_entries : u8 , pub pad_x4b5 : [ u8 ; 19usize ] , } # [ test ] fn bindgen_test_layout_SwkbdArgVB ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdArgVB > ( ) , 1232usize , concat ! ( "Size of: " , stringify ! ( SwkbdArgVB ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdArgVB > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SwkbdArgVB ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . arg as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . pad_x3d1 as * const _ as usize } , 980usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( pad_x3d1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . textGrouping as * const _ as usize } , 984usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( textGrouping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . entries as * const _ as usize } , 1016usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . total_entries as * const _ as usize } , 1208usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( total_entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . pad_x4b5 as * const _ as usize } , 1209usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( pad_x4b5 ) ) ) ; } # [ repr ( C ) ] pub struct SwkbdConfig { pub arg : SwkbdArgV7 , pub workbuf : * mut u8 , pub workbuf_size : usize , pub max_dictwords : s32 , pub customizedDictionarySet : SwkbdCustomizedDictionarySet , pub version : u32 , } # [ test ] fn bindgen_test_layout_SwkbdConfig ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdConfig > ( ) , 1264usize , concat ! ( "Size of: " , stringify ! ( SwkbdConfig ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdConfig > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SwkbdConfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . arg as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . workbuf as * const _ as usize } , 1032usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( workbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . workbuf_size as * const _ as usize } , 1040usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( workbuf_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . max_dictwords as * const _ as usize } , 1048usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( max_dictwords ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . customizedDictionarySet as * const _ as usize } , 1052usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( customizedDictionarySet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . version as * const _ as usize } , 1260usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( version ) ) ) ; } # [ repr ( C ) ] pub struct SwkbdInitializeArg { pub unk_x0 : u32 , - /// < See \ref SwkbdInlineMode. + pub total_entries : u8 , + /// < [8.0.0+] + pub unkFlag : u8 , pub pad_x4b6 : [ u8 ; 13usize ] , + /// < [8.0.0+] + pub trigger : u8 , pub pad_x4c4 : [ u8 ; 4usize ] , } # [ test ] fn bindgen_test_layout_SwkbdArgVB ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdArgVB > ( ) , 1232usize , concat ! ( "Size of: " , stringify ! ( SwkbdArgVB ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdArgVB > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SwkbdArgVB ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . arg as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . pad_x3d1 as * const _ as usize } , 980usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( pad_x3d1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . textGrouping as * const _ as usize } , 984usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( textGrouping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . entries as * const _ as usize } , 1016usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . total_entries as * const _ as usize } , 1208usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( total_entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . unkFlag as * const _ as usize } , 1209usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( unkFlag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . pad_x4b6 as * const _ as usize } , 1210usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( pad_x4b6 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . trigger as * const _ as usize } , 1223usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( trigger ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdArgVB > ( ) ) ) . pad_x4c4 as * const _ as usize } , 1224usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdArgVB ) , "::" , stringify ! ( pad_x4c4 ) ) ) ; } # [ repr ( C ) ] pub struct SwkbdConfig { pub arg : SwkbdArgV7 , pub workbuf : * mut u8 , pub workbuf_size : usize , pub max_dictwords : s32 , pub customizedDictionarySet : SwkbdCustomizedDictionarySet , pub unkFlag : u8 , pub trigger : u8 , pub version : u32 , } # [ test ] fn bindgen_test_layout_SwkbdConfig ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdConfig > ( ) , 1264usize , concat ! ( "Size of: " , stringify ! ( SwkbdConfig ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdConfig > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SwkbdConfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . arg as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . workbuf as * const _ as usize } , 1032usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( workbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . workbuf_size as * const _ as usize } , 1040usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( workbuf_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . max_dictwords as * const _ as usize } , 1048usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( max_dictwords ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . customizedDictionarySet as * const _ as usize } , 1052usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( customizedDictionarySet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . unkFlag as * const _ as usize } , 1258usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( unkFlag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . trigger as * const _ as usize } , 1259usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( trigger ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdConfig > ( ) ) ) . version as * const _ as usize } , 1260usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdConfig ) , "::" , stringify ! ( version ) ) ) ; } + /// InitializeArg for SwkbdInline. + # [ repr ( C ) ] pub struct SwkbdInitializeArg { pub unk_x0 : u32 , + /// < See \ref SwkbdInlineMode. (u8 bool) pub mode : u8 , /// < Only set on 5.0.0+. pub unk_x5 : u8 , pub pad : [ u8 ; 2usize ] , } # [ test ] fn bindgen_test_layout_SwkbdInitializeArg ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdInitializeArg > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( SwkbdInitializeArg ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdInitializeArg > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( SwkbdInitializeArg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInitializeArg > ( ) ) ) . unk_x0 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInitializeArg ) , "::" , stringify ! ( unk_x0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInitializeArg > ( ) ) ) . mode as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInitializeArg ) , "::" , stringify ! ( mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInitializeArg > ( ) ) ) . unk_x5 as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInitializeArg ) , "::" , stringify ! ( unk_x5 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInitializeArg > ( ) ) ) . pad as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInitializeArg ) , "::" , stringify ! ( pad ) ) ) ; } # [ repr ( C , packed ) ] pub struct SwkbdAppearArg { @@ -3499,9 +4787,15 @@ where /// This callback is used by \ref swkbdInlineUpdate when handling ChangedString* replies (text changed by the user or by \ref swkbdInlineSetInputText). /// str is the UTF-8 string for the current text. pub type SwkbdChangedStringCb = :: core :: option :: Option < unsafe extern "C" fn ( str : * const ctypes :: c_char , arg : * mut SwkbdChangedStringArg ) > ; + /// This callback is used by \ref swkbdInlineUpdate when handling ChangedString*V2 replies (text changed by the user or by \ref swkbdInlineSetInputText). +/// str is the UTF-8 string for the current text. + pub type SwkbdChangedStringV2Cb = :: core :: option :: Option < unsafe extern "C" fn ( str : * const ctypes :: c_char , arg : * mut SwkbdChangedStringArg , flag : bool ) > ; /// This callback is used by \ref swkbdInlineUpdate when handling MovedCursor* replies. /// str is the UTF-8 string for the current text. pub type SwkbdMovedCursorCb = :: core :: option :: Option < unsafe extern "C" fn ( str : * const ctypes :: c_char , arg : * mut SwkbdMovedCursorArg ) > ; + /// This callback is used by \ref swkbdInlineUpdate when handling MovedCursor*V2 replies. +/// str is the UTF-8 string for the current text. + pub type SwkbdMovedCursorV2Cb = :: core :: option :: Option < unsafe extern "C" fn ( str : * const ctypes :: c_char , arg : * mut SwkbdMovedCursorArg , flag : bool ) > ; /// This callback is used by \ref swkbdInlineUpdate when handling MovedTab* replies. /// str is the UTF-8 string for the current text. pub type SwkbdMovedTabCb = :: core :: option :: Option < unsafe extern "C" fn ( str : * const ctypes :: c_char , arg : * mut SwkbdMovedTabArg ) > ; @@ -3509,7 +4803,7 @@ where /// str is the UTF-8 string for the current text. pub type SwkbdDecidedEnterCb = :: core :: option :: Option < unsafe extern "C" fn ( str : * const ctypes :: c_char , arg : * mut SwkbdDecidedEnterArg ) > ; /// InlineKeyboard - # [ repr ( C ) ] pub struct SwkbdInline { pub version : u32 , pub holder : AppletHolder , pub calcArg : SwkbdInlineCalcArg , pub directionalButtonAssignFlag : bool , pub state : SwkbdState , pub dicCustomInitialized : bool , pub customizedDictionariesInitialized : bool , pub dicStorage : AppletStorage , pub wordInfoInitialized : bool , pub wordInfoStorage : AppletStorage , pub interactive_tmpbuf : * mut u8 , pub interactive_tmpbuf_size : usize , pub interactive_strbuf : * mut ctypes :: c_char , pub interactive_strbuf_size : usize , pub finishedInitializeCb : VoidFn , pub changedStringCb : SwkbdChangedStringCb , pub movedCursorCb : SwkbdMovedCursorCb , pub movedTabCb : SwkbdMovedTabCb , pub decidedEnterCb : SwkbdDecidedEnterCb , pub releasedUserWordInfoCb : VoidFn , } # [ test ] fn bindgen_test_layout_SwkbdInline ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdInline > ( ) , 1464usize , concat ! ( "Size of: " , stringify ! ( SwkbdInline ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdInline > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SwkbdInline ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . holder as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( holder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . calcArg as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( calcArg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . directionalButtonAssignFlag as * const _ as usize } , 1248usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( directionalButtonAssignFlag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . state as * const _ as usize } , 1252usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . dicCustomInitialized as * const _ as usize } , 1256usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( dicCustomInitialized ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . customizedDictionariesInitialized as * const _ as usize } , 1257usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( customizedDictionariesInitialized ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . dicStorage as * const _ as usize } , 1264usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( dicStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . wordInfoInitialized as * const _ as usize } , 1320usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( wordInfoInitialized ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . wordInfoStorage as * const _ as usize } , 1328usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( wordInfoStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_tmpbuf as * const _ as usize } , 1384usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_tmpbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_tmpbuf_size as * const _ as usize } , 1392usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_tmpbuf_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_strbuf as * const _ as usize } , 1400usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_strbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_strbuf_size as * const _ as usize } , 1408usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_strbuf_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . finishedInitializeCb as * const _ as usize } , 1416usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( finishedInitializeCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . changedStringCb as * const _ as usize } , 1424usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( changedStringCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . movedCursorCb as * const _ as usize } , 1432usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( movedCursorCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . movedTabCb as * const _ as usize } , 1440usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( movedTabCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . decidedEnterCb as * const _ as usize } , 1448usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( decidedEnterCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . releasedUserWordInfoCb as * const _ as usize } , 1456usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( releasedUserWordInfoCb ) ) ) ; } extern "C" { + # [ repr ( C ) ] pub struct SwkbdInline { pub version : u32 , pub holder : AppletHolder , pub calcArg : SwkbdInlineCalcArg , pub directionalButtonAssignFlag : bool , pub state : SwkbdState , pub dicCustomInitialized : bool , pub customizedDictionariesInitialized : bool , pub dicStorage : AppletStorage , pub wordInfoInitialized : bool , pub wordInfoStorage : AppletStorage , pub interactive_tmpbuf : * mut u8 , pub interactive_tmpbuf_size : usize , pub interactive_strbuf : * mut ctypes :: c_char , pub interactive_strbuf_size : usize , pub finishedInitializeCb : VoidFn , pub decidedCancelCb : VoidFn , pub changedStringCb : SwkbdChangedStringCb , pub changedStringV2Cb : SwkbdChangedStringV2Cb , pub movedCursorCb : SwkbdMovedCursorCb , pub movedCursorV2Cb : SwkbdMovedCursorV2Cb , pub movedTabCb : SwkbdMovedTabCb , pub decidedEnterCb : SwkbdDecidedEnterCb , pub releasedUserWordInfoCb : VoidFn , } # [ test ] fn bindgen_test_layout_SwkbdInline ( ) { assert_eq ! ( :: core :: mem :: size_of :: < SwkbdInline > ( ) , 1488usize , concat ! ( "Size of: " , stringify ! ( SwkbdInline ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < SwkbdInline > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( SwkbdInline ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . holder as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( holder ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . calcArg as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( calcArg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . directionalButtonAssignFlag as * const _ as usize } , 1248usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( directionalButtonAssignFlag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . state as * const _ as usize } , 1252usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . dicCustomInitialized as * const _ as usize } , 1256usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( dicCustomInitialized ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . customizedDictionariesInitialized as * const _ as usize } , 1257usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( customizedDictionariesInitialized ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . dicStorage as * const _ as usize } , 1264usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( dicStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . wordInfoInitialized as * const _ as usize } , 1320usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( wordInfoInitialized ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . wordInfoStorage as * const _ as usize } , 1328usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( wordInfoStorage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_tmpbuf as * const _ as usize } , 1384usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_tmpbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_tmpbuf_size as * const _ as usize } , 1392usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_tmpbuf_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_strbuf as * const _ as usize } , 1400usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_strbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . interactive_strbuf_size as * const _ as usize } , 1408usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( interactive_strbuf_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . finishedInitializeCb as * const _ as usize } , 1416usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( finishedInitializeCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . decidedCancelCb as * const _ as usize } , 1424usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( decidedCancelCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . changedStringCb as * const _ as usize } , 1432usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( changedStringCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . changedStringV2Cb as * const _ as usize } , 1440usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( changedStringV2Cb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . movedCursorCb as * const _ as usize } , 1448usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( movedCursorCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . movedCursorV2Cb as * const _ as usize } , 1456usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( movedCursorV2Cb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . movedTabCb as * const _ as usize } , 1464usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( movedTabCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . decidedEnterCb as * const _ as usize } , 1472usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( decidedEnterCb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < SwkbdInline > ( ) ) ) . releasedUserWordInfoCb as * const _ as usize } , 1480usize , concat ! ( "Offset of field: " , stringify ! ( SwkbdInline ) , "::" , stringify ! ( releasedUserWordInfoCb ) ) ) ; } extern "C" { /// @brief Creates a SwkbdConfig struct. /// @param c SwkbdConfig struct. /// @param max_dictwords Max \ref SwkbdDictWord entries, 0 for none. @@ -3596,9 +4890,15 @@ where /// @brief Closes a SwkbdInline object. If the applet is running, this will tell the applet to exit, then wait for the applet to exit + applet exit handling. /// @param s SwkbdInline object. pub fn swkbdInlineClose ( s : * mut SwkbdInline ) -> Result ; } extern "C" { - /// @brief Launches the applet with the SwkbdInline object. + /// @brief Does setup for \ref SwkbdInitializeArg and launches the applet with the SwkbdInline object. +/// @note The initArg is cleared, and on [5.0.0+] unk_x5 is set to 1. /// @param s SwkbdInline object. pub fn swkbdInlineLaunch ( s : * mut SwkbdInline ) -> Result ; } extern "C" { + /// @brief Same as \ref swkbdInlineLaunch, except mode and unk_x5 for \ref SwkbdInitializeArg are set to the input params. +/// @param s SwkbdInline object. +/// @param mode Value for SwkbdInitializeArg::mode. +/// @param unk_x5 Value for SwkbdInitializeArg::unk_x5. + pub fn swkbdInlineLaunchForLibraryApplet ( s : * mut SwkbdInline , mode : u8 , unk_x5 : u8 ) -> Result ; } extern "C" { /// @brief Handles updating SwkbdInline state, this should be called periodically. /// @note Handles applet exit if needed, and also sends the \ref SwkbdInlineCalcArg to the applet if needed. Hence, this should be called at some point after writing to \ref SwkbdInlineCalcArg. /// @note Handles applet Interactive storage output when needed. @@ -3609,14 +4909,34 @@ where /// @param s SwkbdInline object. /// @param cb Callback pub fn swkbdInlineSetFinishedInitializeCallback ( s : * mut SwkbdInline , cb : VoidFn ) ; } extern "C" { + /// @brief Sets the DecidedCancel callback, used by \ref swkbdInlineUpdate. The default is NULL for none. +/// @param s SwkbdInline object. +/// @param cb Callback + pub fn swkbdInlineSetDecidedCancelCallback ( s : * mut SwkbdInline , cb : VoidFn ) ; } extern "C" { /// @brief Sets the ChangedString callback, used by \ref swkbdInlineUpdate. The default is NULL for none. +/// @note This clears the callback set by \ref swkbdInlineSetChangedStringV2Callback. +/// @note This should be called after \ref swkbdInlineLaunch / \ref swkbdInlineLaunchForLibraryApplet. /// @param s SwkbdInline object. /// @param cb \ref SwkbdChangedStringCb Callback pub fn swkbdInlineSetChangedStringCallback ( s : * mut SwkbdInline , cb : SwkbdChangedStringCb ) ; } extern "C" { + /// @brief Sets the ChangedStringV2 callback, used by \ref swkbdInlineUpdate. The default is NULL for none. +/// @note Only available with [8.0.0+]. +/// @note This must be called after \ref swkbdInlineLaunch / \ref swkbdInlineLaunchForLibraryApplet. +/// @param s SwkbdInline object. +/// @param cb \ref SwkbdChangedStringV2Cb Callback + pub fn swkbdInlineSetChangedStringV2Callback ( s : * mut SwkbdInline , cb : SwkbdChangedStringV2Cb ) ; } extern "C" { /// @brief Sets the MovedCursor callback, used by \ref swkbdInlineUpdate. The default is NULL for none. +/// @note This clears the callback set by \ref swkbdInlineSetMovedCursorV2Callback. +/// @note This should be called after \ref swkbdInlineLaunch / \ref swkbdInlineLaunchForLibraryApplet. /// @param s SwkbdInline object. /// @param cb \ref SwkbdMovedCursorCb Callback pub fn swkbdInlineSetMovedCursorCallback ( s : * mut SwkbdInline , cb : SwkbdMovedCursorCb ) ; } extern "C" { + /// @brief Sets the MovedCursorV2 callback, used by \ref swkbdInlineUpdate. The default is NULL for none. +/// @note Only available with [8.0.0+]. +/// @note This must be called after \ref swkbdInlineLaunch / \ref swkbdInlineLaunchForLibraryApplet. +/// @param s SwkbdInline object. +/// @param cb \ref SwkbdMovedCursorV2Cb Callback + pub fn swkbdInlineSetMovedCursorV2Callback ( s : * mut SwkbdInline , cb : SwkbdMovedCursorV2Cb ) ; } extern "C" { /// @brief Sets the MovedTab callback, used by \ref swkbdInlineUpdate. The default is NULL for none. /// @param s SwkbdInline object. /// @param cb \ref SwkbdMovedTabCb Callback @@ -3890,10 +5210,12 @@ where # [ repr ( C ) ] pub struct WebCommonReply { /// < Type of reply: false = ret, true = storage. pub type_ : bool , + /// < ShimKind + pub shimKind : WebShimKind , /// < Reply data for reply=false. pub ret : WebCommonReturnValue , /// < Reply data for reply=true. - pub storage : WebCommonTLVStorage , } # [ test ] fn bindgen_test_layout_WebCommonReply ( ) { assert_eq ! ( :: core :: mem :: size_of :: < WebCommonReply > ( ) , 12305usize , concat ! ( "Size of: " , stringify ! ( WebCommonReply ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < WebCommonReply > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( WebCommonReply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . ret as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( ret ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . storage as * const _ as usize } , 4113usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( storage ) ) ) ; } + pub storage : WebCommonTLVStorage , } # [ test ] fn bindgen_test_layout_WebCommonReply ( ) { assert_eq ! ( :: core :: mem :: size_of :: < WebCommonReply > ( ) , 12312usize , concat ! ( "Size of: " , stringify ! ( WebCommonReply ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < WebCommonReply > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( WebCommonReply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . shimKind as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( shimKind ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . ret as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( ret ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebCommonReply > ( ) ) ) . storage as * const _ as usize } , 4120usize , concat ! ( "Offset of field: " , stringify ! ( WebCommonReply ) , "::" , stringify ! ( storage ) ) ) ; } /// Entry data for ::WebArgType_BootFooterButton. # [ repr ( C , packed ) ] pub struct WebBootFooterButtonEntry { pub id : WebFooterButtonId , pub visible : u8 , pub unk_x5 : u16 , pub unk_x7 : u8 , } # [ test ] fn bindgen_test_layout_WebBootFooterButtonEntry ( ) { assert_eq ! ( :: core :: mem :: size_of :: < WebBootFooterButtonEntry > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( WebBootFooterButtonEntry ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < WebBootFooterButtonEntry > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( WebBootFooterButtonEntry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebBootFooterButtonEntry > ( ) ) ) . id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( WebBootFooterButtonEntry ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebBootFooterButtonEntry > ( ) ) ) . visible as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( WebBootFooterButtonEntry ) , "::" , stringify ! ( visible ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebBootFooterButtonEntry > ( ) ) ) . unk_x5 as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( WebBootFooterButtonEntry ) , "::" , stringify ! ( unk_x5 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < WebBootFooterButtonEntry > ( ) ) ) . unk_x7 as * const _ as usize } , 7usize , concat ! ( "Offset of field: " , stringify ! ( WebBootFooterButtonEntry ) , "::" , stringify ! ( unk_x7 ) ) ) ; } /// < [1.0.0+] String, size 0xC00. Initial URL. @@ -4016,9 +5338,15 @@ where pub const WebArgType_WebArgType_OverrideWebAudioVolume : WebArgType = 63 ; /// < [6.0.0+] float pub const WebArgType_WebArgType_OverrideMediaAudioVolume : WebArgType = 64 ; + /// < [7.0.0+] u32 enum WebSessionBootMode + pub const WebArgType_WebArgType_SessionBootMode : WebArgType = 65 ; + /// < [7.0.0+] u8 bool, enables using WebSession when set. + pub const WebArgType_WebArgType_SessionFlag : WebArgType = 66 ; + /// < [8.0.0+] u8 bool + pub const WebArgType_WebArgType_MediaPlayerUi : WebArgType = 67 ; /// Types for \ref WebArgTLV, input storage. pub type WebArgType = u32 ; - /// < [3.0.0+] u32 ShareExitReason + /// < [3.0.0+] u32 ExitReason pub const WebReplyType_WebReplyType_ExitReason : WebReplyType = 1 ; /// < [3.0.0+] string pub const WebReplyType_WebReplyType_LastUrl : WebReplyType = 2 ; @@ -4034,6 +5362,8 @@ where pub const WebReplyType_WebReplyType_PostId : WebReplyType = 7 ; /// < [3.0.0+] u64 pub const WebReplyType_WebReplyType_PostIdSize : WebReplyType = 8 ; + /// < [8.0.0+] u8 bool + pub const WebReplyType_WebReplyType_MediaPlayerAutoClosedByCompletion : WebReplyType = 9 ; /// Types for \ref WebArgTLV, output storage. pub type WebReplyType = u32 ; /// < Use the HtmlDocument NCA content from the application. @@ -4356,6 +5686,11 @@ where /// @param config WebCommonConfig object. /// @param value Value pub fn webConfigSetOverrideMediaAudioVolume ( config : * mut WebCommonConfig , value : f32 ) -> Result ; } extern "C" { + /// @brief Sets whether MediaPlayerUi is enabled. +/// @note Only available with config created by \ref webOfflineCreate on [8.0.0+]. +/// @param config WebCommonConfig object. +/// @param flag Flag + pub fn webConfigSetMediaPlayerUi ( config : * mut WebCommonConfig , flag : bool ) -> Result ; } extern "C" { /// @brief Launches the {web applet} with the specified config and waits for it to exit. /// @param config WebCommonConfig object. /// @param out Optional output applet reply data, can be NULL. @@ -4395,7 +5730,12 @@ where /// @param outstr Output string buffer. If NULL, the string is not loaded. /// @param outstr_maxsize Size of the buffer, including NUL-terminator. If outstr is set, this size must be >1. The size used for the actual string-copy is this size-1, to make sure the output is NUL-terminated (the entire buffer is cleared first). /// @param out_size Output string length including NUL-terminator, for the original input string in the reply loaded from a separate size field. - pub fn webReplyGetPostId ( reply : * mut WebCommonReply , outstr : * mut ctypes :: c_char , outstr_maxsize : usize , out_size : * mut usize ) -> Result ; } + pub fn webReplyGetPostId ( reply : * mut WebCommonReply , outstr : * mut ctypes :: c_char , outstr_maxsize : usize , out_size : * mut usize ) -> Result ; } extern "C" { + /// @brief Gets the MediaPlayerAutoClosedByCompletion flag from the specified reply. +/// @note Only available with reply data from Web on [8.0.0+]. +/// @param reply WebCommonReply object. +/// @param flag Output flag + pub fn webReplyGetMediaPlayerAutoClosedByCompletion ( reply : * mut WebCommonReply , flag : * mut bool ) -> Result ; } /// Structure representing an entry in the homebrew environment configuration. # [ repr ( C ) ] pub struct ConfigEntry { /// < Type of entry @@ -4433,7 +5773,11 @@ where /// < Provides the last load result. pub const EntryType_LastLoadResult : _bindgen_ty_14 = 11 ; /// < Provides random data used to seed the pseudo-random number generator. - pub const EntryType_RandomSeed : _bindgen_ty_14 = 14 ; pub type _bindgen_ty_14 = u32 ; + pub const EntryType_RandomSeed : _bindgen_ty_14 = 14 ; + /// < Provides persistent storage for the preselected user id. + pub const EntryType_UserIdStorage : _bindgen_ty_14 = 15 ; + /// < Provides the currently running Horizon OS version. + pub const EntryType_HosVersion : _bindgen_ty_14 = 16 ; pub type _bindgen_ty_14 = u32 ; /// < Use AppletType_Application instead of AppletType_SystemApplication. pub const EnvAppletFlags_ApplicationOverride : _bindgen_ty_15 = 1 ; pub type _bindgen_ty_15 = u32 ; /// Loader return function. @@ -4443,6 +5787,10 @@ where /// @param main_thread Reserved. /// @param saved_lr Reserved. pub fn envSetup ( ctx : * mut ctypes :: c_void , main_thread : Handle , saved_lr : LoaderReturnFn ) ; } extern "C" { + /// Returns information text about the loader, if present. + pub fn envGetLoaderInfo ( ) -> * const ctypes :: c_char ; } extern "C" { + /// Returns the size of the loader information text. + pub fn envGetLoaderInfoSize ( ) -> u64 ; } extern "C" { /// Retrieves the handle to the main thread. pub fn envGetMainThreadHandle ( ) -> Handle ; } extern "C" { /// Returns true if the application is running as NSO, otherwise NRO. @@ -4480,10 +5828,16 @@ where /// @brief Retrieves the random seed provided by the environment. /// @param out Pointer to a u64[2] buffer which will contain the random seed on return. pub fn envGetRandomSeed ( out : * mut u64 ) ; } extern "C" { + /// Returns a pointer to the user id storage area (if present). + pub fn envGetUserIdStorage ( ) -> * mut u128 ; } extern "C" { /// Returns the current HOS version that was previously set with \ref hosversionSet. If version initialization fails during startup (such as in the case set:sys is not available), this function returns zero. pub fn hosversionGet ( ) -> u32 ; } extern "C" { /// Sets or overrides the current HOS version. This function is normally called automatically by libnx on startup with the version info obtained with \ref setsysGetFirmwareVersion. - pub fn hosversionSet ( version : u32 ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in_addr { _unused : [ u8 ; 0 ] , } extern "C" { pub static mut __nxlink_host : in_addr ; } extern "C" { pub fn nxlinkStdio ( ) -> ctypes :: c_int ; } pub type _ssize_t = ctypes :: c_long ; pub type u_int8_t = __uint8_t ; pub type u_int16_t = __uint16_t ; pub type u_int32_t = __uint32_t ; pub type u_int64_t = __uint64_t ; pub type register_t = ctypes :: c_int ; pub type __blkcnt_t = ctypes :: c_long ; pub type __blksize_t = ctypes :: c_long ; pub type __fsblkcnt_t = __uint64_t ; pub type __fsfilcnt_t = __uint32_t ; pub type _off_t = ctypes :: c_long ; pub type __pid_t = ctypes :: c_int ; pub type __dev_t = ctypes :: c_short ; pub type __uid_t = ctypes :: c_ushort ; pub type __gid_t = ctypes :: c_ushort ; pub type __id_t = __uint32_t ; pub type __ino_t = ctypes :: c_ushort ; pub type __mode_t = __uint32_t ; pub type _off64_t = ctypes :: c_longlong ; pub type __off_t = _off_t ; pub type __loff_t = _off64_t ; pub type __key_t = ctypes :: c_long ; pub type _fpos_t = ctypes :: c_long ; pub type __size_t = ctypes :: c_ulong ; pub type __ssize_t = _ssize_t ; pub type wint_t = ctypes :: c_int ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct _mbstate_t { pub __count : ctypes :: c_int , pub __value : _mbstate_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union _mbstate_t__bindgen_ty_1 { pub __wch : wint_t , pub __wchb : [ ctypes :: c_uchar ; 4usize ] , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout__mbstate_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _mbstate_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( _mbstate_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _mbstate_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( _mbstate_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t__bindgen_ty_1 > ( ) ) ) . __wch as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t__bindgen_ty_1 ) , "::" , stringify ! ( __wch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t__bindgen_ty_1 > ( ) ) ) . __wchb as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t__bindgen_ty_1 ) , "::" , stringify ! ( __wchb ) ) ) ; } # [ test ] fn bindgen_test_layout__mbstate_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _mbstate_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( _mbstate_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _mbstate_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( _mbstate_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t > ( ) ) ) . __count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t ) , "::" , stringify ! ( __count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t > ( ) ) ) . __value as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t ) , "::" , stringify ! ( __value ) ) ) ; } pub type _flock_t = _LOCK_RECURSIVE_T ; pub type _iconv_t = * mut ctypes :: c_void ; pub type __clock_t = ctypes :: c_ulong ; pub type __time_t = ctypes :: c_long ; pub type __clockid_t = ctypes :: c_ulong ; pub type __timer_t = ctypes :: c_ulong ; pub type __sa_family_t = __uint8_t ; pub type __socklen_t = __uint32_t ; pub type __nl_item = ctypes :: c_int ; pub type __nlink_t = ctypes :: c_ushort ; pub type __suseconds_t = ctypes :: c_long ; pub type __useconds_t = ctypes :: c_ulong ; pub type __sigset_t = ctypes :: c_ulong ; pub type suseconds_t = __suseconds_t ; pub type time_t = ctypes :: c_long ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timeval { pub tv_sec : time_t , pub tv_usec : suseconds_t , } # [ test ] fn bindgen_test_layout_timeval ( ) { assert_eq ! ( :: core :: mem :: size_of :: < timeval > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timeval ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < timeval > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timeval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timeval > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timeval > ( ) ) ) . tv_usec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_usec ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timespec { pub tv_sec : time_t , pub tv_nsec : ctypes :: c_long , } # [ test ] fn bindgen_test_layout_timespec ( ) { assert_eq ! ( :: core :: mem :: size_of :: < timespec > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timespec ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < timespec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timespec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timespec > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timespec > ( ) ) ) . tv_nsec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_nsec ) ) ) ; } extern "C" { pub fn timespec2nsec ( ts : * const timespec ) -> __uint64_t ; } extern "C" { pub fn abstimespec2nsec ( clock_id : __clockid_t , ts : * const timespec ) -> __uint64_t ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct itimerspec { pub it_interval : timespec , pub it_value : timespec , } # [ test ] fn bindgen_test_layout_itimerspec ( ) { assert_eq ! ( :: core :: mem :: size_of :: < itimerspec > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < itimerspec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < itimerspec > ( ) ) ) . it_interval as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < itimerspec > ( ) ) ) . it_value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_value ) ) ) ; } pub type sigset_t = __sigset_t ; pub type fd_mask = ctypes :: c_ulong ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _types_fd_set { pub fds_bits : [ fd_mask ; 1usize ] , } # [ test ] fn bindgen_test_layout__types_fd_set ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _types_fd_set > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( _types_fd_set ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _types_fd_set > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _types_fd_set ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _types_fd_set > ( ) ) ) . fds_bits as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _types_fd_set ) , "::" , stringify ! ( fds_bits ) ) ) ; } extern "C" { pub fn select ( __n : ctypes :: c_int , __readfds : * mut _types_fd_set , __writefds : * mut _types_fd_set , __exceptfds : * mut _types_fd_set , __timeout : * mut timeval ) -> ctypes :: c_int ; } extern "C" { pub fn pselect ( __n : ctypes :: c_int , __readfds : * mut _types_fd_set , __writefds : * mut _types_fd_set , __exceptfds : * mut _types_fd_set , __timeout : * const timespec , __set : * const sigset_t ) -> ctypes :: c_int ; } pub type in_addr_t = __uint32_t ; pub type in_port_t = __uint16_t ; pub type u_char = ctypes :: c_uchar ; pub type u_short = ctypes :: c_ushort ; pub type u_int = ctypes :: c_uint ; pub type u_long = ctypes :: c_ulong ; pub type ushort = ctypes :: c_ushort ; pub type uint = ctypes :: c_uint ; pub type ulong = ctypes :: c_ulong ; pub type blkcnt_t = __blkcnt_t ; pub type blksize_t = __blksize_t ; pub type clock_t = ctypes :: c_ulong ; pub type daddr_t = ctypes :: c_long ; pub type caddr_t = * mut ctypes :: c_char ; pub type fsblkcnt_t = __fsblkcnt_t ; pub type fsfilcnt_t = __fsfilcnt_t ; pub type id_t = __id_t ; pub type ino_t = __ino_t ; pub type off_t = __off_t ; pub type dev_t = __dev_t ; pub type uid_t = __uid_t ; pub type gid_t = __gid_t ; pub type pid_t = __pid_t ; pub type key_t = __key_t ; pub type mode_t = __mode_t ; pub type nlink_t = __nlink_t ; pub type clockid_t = __clockid_t ; pub type timer_t = __timer_t ; pub type useconds_t = __useconds_t ; pub type sbintime_t = __int64_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sched_param { pub sched_priority : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_sched_param ( ) { assert_eq ! ( :: core :: mem :: size_of :: < sched_param > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( sched_param ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < sched_param > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( sched_param ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sched_param > ( ) ) ) . sched_priority as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sched_param ) , "::" , stringify ! ( sched_priority ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_t { _unused : [ u8 ; 0 ] , } pub type pthread_t = * mut __pthread_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_attr_t { pub stackaddr : * mut ctypes :: c_void , pub stacksize : ctypes :: c_int , pub schedparam : sched_param , pub detachstate : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_pthread_attr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_attr_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_attr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . stackaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( stackaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . stacksize as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( stacksize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . schedparam as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( schedparam ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . detachstate as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( detachstate ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct pthread_mutex_t { pub type_ : ctypes :: c_int , pub __bindgen_anon_1 : pthread_mutex_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_mutex_t__bindgen_ty_1 { pub normal : _LOCK_T , pub recursive : _LOCK_RECURSIVE_T , _bindgen_union_align : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_pthread_mutex_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutex_t__bindgen_ty_1 > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutex_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t__bindgen_ty_1 > ( ) ) ) . normal as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) , "::" , stringify ! ( normal ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t__bindgen_ty_1 > ( ) ) ) . recursive as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) , "::" , stringify ! ( recursive ) ) ) ; } # [ test ] fn bindgen_test_layout_pthread_mutex_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutex_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutex_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( type_ ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_mutexattr_t { } # [ test ] fn bindgen_test_layout_pthread_mutexattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutexattr_t > ( ) , 0usize , concat ! ( "Size of: " , stringify ! ( pthread_mutexattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutexattr_t > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutexattr_t ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_cond_t { pub clock_id : clockid_t , pub cond : _COND_T , } # [ test ] fn bindgen_test_layout_pthread_cond_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_cond_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_cond_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . clock_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( clock_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . cond as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( cond ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_condattr_t { pub clock_id : clockid_t , } # [ test ] fn bindgen_test_layout_pthread_condattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_condattr_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_condattr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_condattr_t > ( ) ) ) . clock_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_condattr_t ) , "::" , stringify ! ( clock_id ) ) ) ; } pub type pthread_key_t = __uint32_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_once_t { pub status : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_pthread_once_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_once_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_once_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_once_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_once_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_once_t > ( ) ) ) . status as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_once_t ) , "::" , stringify ! ( status ) ) ) ; } extern "C" { + pub fn hosversionSet ( version : u32 ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct in_addr { _unused : [ u8 ; 0 ] , } extern "C" { pub static mut __nxlink_host : in_addr ; } extern "C" { + /// @brief Sets up stdout/stderr redirection to the nxlink host. +/// @return Socket fd on success, negative number on failure. +/// @note The socket should be closed with close() during application cleanup. + pub fn nxlinkStdio ( ) -> ctypes :: c_int ; } pub type _ssize_t = ctypes :: c_long ; pub type u_int8_t = __uint8_t ; pub type u_int16_t = __uint16_t ; pub type u_int32_t = __uint32_t ; pub type u_int64_t = __uint64_t ; pub type register_t = ctypes :: c_int ; pub type __blkcnt_t = ctypes :: c_long ; pub type __blksize_t = ctypes :: c_long ; pub type __fsblkcnt_t = __uint64_t ; pub type __fsfilcnt_t = __uint32_t ; pub type _off_t = ctypes :: c_long ; pub type __pid_t = ctypes :: c_int ; pub type __dev_t = ctypes :: c_short ; pub type __uid_t = ctypes :: c_ushort ; pub type __gid_t = ctypes :: c_ushort ; pub type __id_t = __uint32_t ; pub type __ino_t = ctypes :: c_ushort ; pub type __mode_t = __uint32_t ; pub type _off64_t = ctypes :: c_longlong ; pub type __off_t = _off_t ; pub type __loff_t = _off64_t ; pub type __key_t = ctypes :: c_long ; pub type _fpos_t = ctypes :: c_long ; pub type __size_t = ctypes :: c_ulong ; pub type __ssize_t = _ssize_t ; pub type wint_t = ctypes :: c_uint ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct _mbstate_t { pub __count : ctypes :: c_int , pub __value : _mbstate_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union _mbstate_t__bindgen_ty_1 { pub __wch : wint_t , pub __wchb : [ ctypes :: c_uchar ; 4usize ] , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout__mbstate_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _mbstate_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( _mbstate_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _mbstate_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( _mbstate_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t__bindgen_ty_1 > ( ) ) ) . __wch as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t__bindgen_ty_1 ) , "::" , stringify ! ( __wch ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t__bindgen_ty_1 > ( ) ) ) . __wchb as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t__bindgen_ty_1 ) , "::" , stringify ! ( __wchb ) ) ) ; } # [ test ] fn bindgen_test_layout__mbstate_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _mbstate_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( _mbstate_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _mbstate_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( _mbstate_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t > ( ) ) ) . __count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t ) , "::" , stringify ! ( __count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _mbstate_t > ( ) ) ) . __value as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( _mbstate_t ) , "::" , stringify ! ( __value ) ) ) ; } pub type _flock_t = _LOCK_RECURSIVE_T ; pub type _iconv_t = * mut ctypes :: c_void ; pub type __clock_t = ctypes :: c_ulong ; pub type __time_t = ctypes :: c_long ; pub type __clockid_t = ctypes :: c_ulong ; pub type __timer_t = ctypes :: c_ulong ; pub type __sa_family_t = __uint8_t ; pub type __socklen_t = __uint32_t ; pub type __nl_item = ctypes :: c_int ; pub type __nlink_t = ctypes :: c_ushort ; pub type __suseconds_t = ctypes :: c_long ; pub type __useconds_t = ctypes :: c_ulong ; pub type __va_list = __builtin_va_list ; pub type __sigset_t = ctypes :: c_ulong ; pub type suseconds_t = __suseconds_t ; pub type time_t = ctypes :: c_long ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timeval { pub tv_sec : time_t , pub tv_usec : suseconds_t , } # [ test ] fn bindgen_test_layout_timeval ( ) { assert_eq ! ( :: core :: mem :: size_of :: < timeval > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timeval ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < timeval > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timeval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timeval > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timeval > ( ) ) ) . tv_usec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_usec ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timespec { pub tv_sec : time_t , pub tv_nsec : ctypes :: c_long , } # [ test ] fn bindgen_test_layout_timespec ( ) { assert_eq ! ( :: core :: mem :: size_of :: < timespec > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timespec ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < timespec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timespec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timespec > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < timespec > ( ) ) ) . tv_nsec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_nsec ) ) ) ; } extern "C" { pub fn timespec2nsec ( ts : * const timespec ) -> __uint64_t ; } extern "C" { pub fn abstimespec2nsec ( clock_id : __clockid_t , ts : * const timespec ) -> __uint64_t ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct itimerspec { pub it_interval : timespec , pub it_value : timespec , } # [ test ] fn bindgen_test_layout_itimerspec ( ) { assert_eq ! ( :: core :: mem :: size_of :: < itimerspec > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < itimerspec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < itimerspec > ( ) ) ) . it_interval as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < itimerspec > ( ) ) ) . it_value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_value ) ) ) ; } pub type sigset_t = __sigset_t ; pub type fd_mask = ctypes :: c_ulong ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _types_fd_set { pub fds_bits : [ fd_mask ; 1usize ] , } # [ test ] fn bindgen_test_layout__types_fd_set ( ) { assert_eq ! ( :: core :: mem :: size_of :: < _types_fd_set > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( _types_fd_set ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < _types_fd_set > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _types_fd_set ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < _types_fd_set > ( ) ) ) . fds_bits as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _types_fd_set ) , "::" , stringify ! ( fds_bits ) ) ) ; } extern "C" { pub fn select ( __n : ctypes :: c_int , __readfds : * mut _types_fd_set , __writefds : * mut _types_fd_set , __exceptfds : * mut _types_fd_set , __timeout : * mut timeval ) -> ctypes :: c_int ; } extern "C" { pub fn pselect ( __n : ctypes :: c_int , __readfds : * mut _types_fd_set , __writefds : * mut _types_fd_set , __exceptfds : * mut _types_fd_set , __timeout : * const timespec , __set : * const sigset_t ) -> ctypes :: c_int ; } pub type in_addr_t = __uint32_t ; pub type in_port_t = __uint16_t ; pub type u_char = ctypes :: c_uchar ; pub type u_short = ctypes :: c_ushort ; pub type u_int = ctypes :: c_uint ; pub type u_long = ctypes :: c_ulong ; pub type ushort = ctypes :: c_ushort ; pub type uint = ctypes :: c_uint ; pub type ulong = ctypes :: c_ulong ; pub type blkcnt_t = __blkcnt_t ; pub type blksize_t = __blksize_t ; pub type clock_t = ctypes :: c_ulong ; pub type daddr_t = ctypes :: c_long ; pub type caddr_t = * mut ctypes :: c_char ; pub type fsblkcnt_t = __fsblkcnt_t ; pub type fsfilcnt_t = __fsfilcnt_t ; pub type id_t = __id_t ; pub type ino_t = __ino_t ; pub type off_t = __off_t ; pub type dev_t = __dev_t ; pub type uid_t = __uid_t ; pub type gid_t = __gid_t ; pub type pid_t = __pid_t ; pub type key_t = __key_t ; pub type mode_t = __mode_t ; pub type nlink_t = __nlink_t ; pub type clockid_t = __clockid_t ; pub type timer_t = __timer_t ; pub type useconds_t = __useconds_t ; pub type sbintime_t = __int64_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sched_param { pub sched_priority : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_sched_param ( ) { assert_eq ! ( :: core :: mem :: size_of :: < sched_param > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( sched_param ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < sched_param > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( sched_param ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < sched_param > ( ) ) ) . sched_priority as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sched_param ) , "::" , stringify ! ( sched_priority ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_t { _unused : [ u8 ; 0 ] , } pub type pthread_t = * mut __pthread_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_attr_t { pub stackaddr : * mut ctypes :: c_void , pub stacksize : ctypes :: c_int , pub schedparam : sched_param , pub detachstate : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_pthread_attr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_attr_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_attr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . stackaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( stackaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . stacksize as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( stacksize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . schedparam as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( schedparam ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_attr_t > ( ) ) ) . detachstate as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( detachstate ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct pthread_mutex_t { pub type_ : ctypes :: c_int , pub __bindgen_anon_1 : pthread_mutex_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_mutex_t__bindgen_ty_1 { pub normal : _LOCK_T , pub recursive : _LOCK_RECURSIVE_T , _bindgen_union_align : [ u32 ; 3usize ] , } # [ test ] fn bindgen_test_layout_pthread_mutex_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutex_t__bindgen_ty_1 > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutex_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t__bindgen_ty_1 > ( ) ) ) . normal as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) , "::" , stringify ! ( normal ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t__bindgen_ty_1 > ( ) ) ) . recursive as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t__bindgen_ty_1 ) , "::" , stringify ! ( recursive ) ) ) ; } # [ test ] fn bindgen_test_layout_pthread_mutex_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutex_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutex_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( type_ ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_mutexattr_t { } # [ test ] fn bindgen_test_layout_pthread_mutexattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_mutexattr_t > ( ) , 0usize , concat ! ( "Size of: " , stringify ! ( pthread_mutexattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_mutexattr_t > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutexattr_t ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_cond_t { pub clock_id : clockid_t , pub cond : _COND_T , } # [ test ] fn bindgen_test_layout_pthread_cond_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_cond_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_cond_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . clock_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( clock_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_cond_t > ( ) ) ) . cond as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( cond ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_condattr_t { pub clock_id : clockid_t , } # [ test ] fn bindgen_test_layout_pthread_condattr_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_condattr_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_condattr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_condattr_t > ( ) ) ) . clock_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_condattr_t ) , "::" , stringify ! ( clock_id ) ) ) ; } pub type pthread_key_t = __uint32_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct pthread_once_t { pub status : ctypes :: c_int , } # [ test ] fn bindgen_test_layout_pthread_once_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < pthread_once_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_once_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < pthread_once_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_once_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < pthread_once_t > ( ) ) ) . status as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_once_t ) , "::" , stringify ! ( status ) ) ) ; } extern "C" { /// Convert a UTF-8 sequence into a UTF-32 codepoint /// /// @param[out] out Output codepoint @@ -4771,12 +6125,18 @@ where pub fn fsdevGetDeviceFileSystem ( name : * const ctypes :: c_char ) -> * mut FsFileSystem ; } extern "C" { /// Returns the FsFileSystem for the default device (SD card), if mounted. Used internally by romfs_dev. pub fn fsdevGetDefaultFileSystem ( ) -> * mut FsFileSystem ; } extern "C" { - /// Writes the FS-path to outpath (which has buffer size FS_MAX_PATH), for the input device path. The FsFileSystem is also written to device when not NULL. + /// Writes the FS-path to outpath (which has buffer size FS_MAX_PATH), for the input path (as used in stdio). The FsFileSystem is also written to device when not NULL. pub fn fsdevTranslatePath ( path : * const ctypes :: c_char , device : * mut * mut FsFileSystem , outpath : * mut ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { - /// This calls fsFsSetArchiveBit on the filesystem specified by the input absolute path. + /// This calls fsFsSetArchiveBit on the filesystem specified by the input path (as used in stdio). pub fn fsdevSetArchiveBit ( path : * const ctypes :: c_char ) -> Result ; } extern "C" { + /// This calls fsFsCreateFile on the filesystem specified by the input path (as used in stdio). + pub fn fsdevCreateFile ( path : * const ctypes :: c_char , size : usize , flags : ctypes :: c_int ) -> Result ; } extern "C" { + /// Recursively deletes the directory specified by the input path (as used in stdio). + pub fn fsdevDeleteDirectoryRecursively ( path : * const ctypes :: c_char ) -> Result ; } extern "C" { /// Unmounts all devices and cleans up any resources used by the FS driver. - pub fn fsdevUnmountAll ( ) -> Result ; } + pub fn fsdevUnmountAll ( ) -> Result ; } extern "C" { + /// Retrieves the last native result code generated during a failed fsdev operation. + pub fn fsdevGetLastResult ( ) -> Result ; } /// RomFS header. # [ repr ( C ) ] pub struct romfs_header { /// < Size of the header. @@ -4844,6 +6204,9 @@ where /// @param offset Offset of the RomFS within the storage. /// @param name Device mount name. pub fn romfsMountFromStorage ( storage : FsStorage , offset : u64 , name : * const ctypes :: c_char ) -> Result ; } extern "C" { + /// @brief Mounts RomFS using the current process host title RomFS. +/// @param name Device mount name. + pub fn romfsMountFromCurrentProcess ( name : * const ctypes :: c_char ) -> Result ; } extern "C" { /// @brief Mounts RomFS from a file path in a mounted fsdev device. /// @param path File path. /// @param offset Offset of the RomFS within the file. @@ -5021,4 +6384,4 @@ where /// Gets the context's output mac, finalizes the context. pub fn hmacSha1ContextGetMac ( ctx : * mut HmacSha1Context , dst : * mut ctypes :: c_void ) ; } extern "C" { /// Simple all-in-one HMAC-SHA1 calculator. - pub fn hmacSha1CalculateMac ( dst : * mut ctypes :: c_void , key : * const ctypes :: c_void , key_size : usize , src : * const ctypes :: c_void , size : usize ) ; } pub type __uint128_t = [ u64 ; 2 ] ; pub type __int128_t = [ u64 ; 2 ] ; pub type __builtin_va_list = __va_list ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __va_list { pub __stack : * mut ctypes :: c_void , pub __gr_top : * mut ctypes :: c_void , pub __vr_top : * mut ctypes :: c_void , pub __gr_offs : ctypes :: c_int , pub __vr_offs : ctypes :: c_int , } # [ test ] fn bindgen_test_layout___va_list ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __va_list > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( __va_list ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __va_list > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __va_list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list > ( ) ) ) . __stack as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __va_list ) , "::" , stringify ! ( __stack ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list > ( ) ) ) . __gr_top as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __va_list ) , "::" , stringify ! ( __gr_top ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list > ( ) ) ) . __vr_top as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __va_list ) , "::" , stringify ! ( __vr_top ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list > ( ) ) ) . __gr_offs as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __va_list ) , "::" , stringify ! ( __gr_offs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list > ( ) ) ) . __vr_offs as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( __va_list ) , "::" , stringify ! ( __vr_offs ) ) ) ; } \ No newline at end of file + pub fn hmacSha1CalculateMac ( dst : * mut ctypes :: c_void , key : * const ctypes :: c_void , key_size : usize , src : * const ctypes :: c_void , size : usize ) ; } pub type __uint128_t = [ u64 ; 2 ] ; pub type __int128_t = [ u64 ; 2 ] ; pub type __builtin_va_list = [ __va_list_tag ; 1usize ] ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __va_list_tag { pub gp_offset : ctypes :: c_uint , pub fp_offset : ctypes :: c_uint , pub overflow_arg_area : * mut ctypes :: c_void , pub reg_save_area : * mut ctypes :: c_void , } # [ test ] fn bindgen_test_layout___va_list_tag ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __va_list_tag > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( __va_list_tag ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __va_list_tag > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __va_list_tag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . gp_offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( gp_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . fp_offset as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( fp_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . overflow_arg_area as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( overflow_arg_area ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __va_list_tag > ( ) ) ) . reg_save_area as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __va_list_tag ) , "::" , stringify ! ( reg_save_area ) ) ) ; } \ No newline at end of file diff --git a/bindgen/twili.h b/bindgen/twili.h index 01ec7cc..9d9e5e9 100644 --- a/bindgen/twili.h +++ b/bindgen/twili.h @@ -14,7 +14,7 @@ THIS SOFTWARE. */ -#include +#include "../include/switch-nocrc.h" #ifdef __cplusplus extern "C" { diff --git a/bindgen/twili.rs b/bindgen/twili.rs deleted file mode 100644 index a9eac9b..0000000 --- a/bindgen/twili.rs +++ /dev/null @@ -1,34 +0,0 @@ -mod ctypes { - pub type c_void = core::ffi::c_void; - pub type c_char = u8; - pub type c_int = i32; - pub type c_long = i64; - pub type c_longlong = i64; - pub type c_schar = i8; - pub type c_short = i16; - pub type c_uchar = u8; - pub type c_uint = u32; - pub type c_ulong = u64; - pub type c_ulonglong = u64; - pub type c_ushort = u16; - pub type size_t = u64; - pub type ssize_t = i64; - pub type c_float = f32; - pub type c_double = f64; -}/* automatically generated by rust-bindgen */ - -pub type __uint32_t = ctypes :: c_uint ; pub type Handle = u32 ; pub type Result = u32 ; - /// < Uninitialized service. - pub const ServiceType_ServiceType_Uninitialized : ServiceType = 0 ; - /// < Normal service. - pub const ServiceType_ServiceType_Normal : ServiceType = 1 ; - /// < Domain. - pub const ServiceType_ServiceType_Domain : ServiceType = 2 ; - /// < Domain subservice; - pub const ServiceType_ServiceType_DomainSubservice : ServiceType = 3 ; - /// < Service overriden in the homebrew environment. - pub const ServiceType_ServiceType_Override : ServiceType = 4 ; - /// Service type. - pub type ServiceType = u32 ; - /// Service object structure. - # [ repr ( C ) ] pub struct Service { pub handle : Handle , pub object_id : u32 , pub type_ : ServiceType , } # [ test ] fn bindgen_test_layout_Service ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Service > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( Service ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Service > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( Service ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Service > ( ) ) ) . handle as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Service ) , "::" , stringify ! ( handle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Service > ( ) ) ) . object_id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( Service ) , "::" , stringify ! ( object_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Service > ( ) ) ) . type_ as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Service ) , "::" , stringify ! ( type_ ) ) ) ; } extern "C" { pub fn twiliWriteNamedPipe ( pipe : * mut Service , ptr : * const ctypes :: c_char , len : usize ) -> Result ; } extern "C" { pub fn twiliCreateNamedOutputPipe ( srv_out : * mut Service , name : * const ctypes :: c_char , len : usize ) -> Result ; } extern "C" { pub fn twiliInitialize ( ) -> Result ; } extern "C" { pub fn twiliExit ( ) ; } \ No newline at end of file diff --git a/build.rs b/build.rs index dd85e17..3ca01a2 100644 --- a/build.rs +++ b/build.rs @@ -86,23 +86,23 @@ cfg_if! { builder.generate().map_err(|_| std::io::Error::new(std::io::ErrorKind::Other, "Could not create file!")).and_then(|bnd| { let mut file = OpenOptions::new().write(true).create(true).open(output)?; file.write_all(br#"mod ctypes { - pub type c_void = core::ffi::c_void; - pub type c_char = u8; - pub type c_int = i32; - pub type c_long = i64; - pub type c_longlong = i64; - pub type c_schar = i8; - pub type c_short = i16; - pub type c_uchar = u8; - pub type c_uint = u32; - pub type c_ulong = u64; - pub type c_ulonglong = u64; - pub type c_ushort = u16; - pub type size_t = u64; - pub type ssize_t = i64; - pub type c_float = f32; - pub type c_double = f64; -}"#)?; + pub type c_void = core::ffi::c_void; + pub type c_char = u8; + pub type c_int = i32; + pub type c_long = i64; + pub type c_longlong = i64; + pub type c_schar = i8; + pub type c_short = i16; + pub type c_uchar = u8; + pub type c_uint = u32; + pub type c_ulong = u64; + pub type c_ulonglong = u64; + pub type c_ushort = u16; + pub type size_t = u64; + pub type ssize_t = i64; + pub type c_float = f32; + pub type c_double = f64; + }"#)?; bnd.write(Box::new(file)).map(|_| bnd) }) } @@ -135,8 +135,8 @@ cfg_if! { build.include("/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include/"); build.include("/opt/devkitpro/devkitA64/aarch64-none-elf/include"); build.include("/opt/devkitpro/libnx/include"); - build.include("twili-libnx/include"); - build.file("twili-libnx/src/twili.c"); + build.include("twili/include"); + build.file("twili/src/twili.c"); build.target("aarch64-none-elf"); build.compile("libtwili.a"); } @@ -164,6 +164,7 @@ cfg_if! { } pub fn main() { + println!("Dummy!"); bindgen(); compile_twili(); twili_bindgen(); diff --git a/include/switch-nocrc.h b/include/switch-nocrc.h new file mode 100644 index 0000000..5fba559 --- /dev/null +++ b/include/switch-nocrc.h @@ -0,0 +1,139 @@ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +// Not direcly including switch.h since new CRC crypto dependencies break bindgen :P + +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/twili-libnx b/twili-libnx deleted file mode 160000 index 8cfcc8c..0000000 --- a/twili-libnx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8cfcc8c38dfbbb8e1c43acbbfb5fc5ea17db8255 diff --git a/twili/LICENSE b/twili/LICENSE new file mode 100644 index 0000000..b40fe5b --- /dev/null +++ b/twili/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2019 misson20000 + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/twili/include/twili.h b/twili/include/twili.h new file mode 100644 index 0000000..ce599ff --- /dev/null +++ b/twili/include/twili.h @@ -0,0 +1,31 @@ +/* + Copyright (c) 2019 misson20000 + + Permission to use, copy, modify, and/or distribute this software for any purpose + with or without fee is hereby granted, provided that the above copyright notice + and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. +*/ + +#pragma once + +#include "../../include/switch-nocrc.h" + +#ifdef __cplusplus +extern "C" { +#endif +Result twiliWriteNamedPipe(Service *pipe, const char *ptr, size_t len); +Result twiliCreateNamedOutputPipe(Service *srv_out, const char* name, size_t len); +Result twiliInitialize(void); +void twiliExit(void); + +#ifdef __cplusplus +} +#endif diff --git a/twili/src/twili.c b/twili/src/twili.c new file mode 100644 index 0000000..d0b28cb --- /dev/null +++ b/twili/src/twili.c @@ -0,0 +1,256 @@ +/* + Copyright (c) 2019 misson20000 + + Permission to use, copy, modify, and/or distribute this software for any purpose + with or without fee is hereby granted, provided that the above copyright notice + and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. +*/ + +#include +#include +#include + +#include "twili.h" + +static Service g_twiliSrv; +static u64 g_twiliRefCnt; + +static Result twiliOpenPipe(Service *srv_out, int id) { + IpcCommand c; + ipcInitialize(&c); + + struct { + u64 magic; + u64 cmd_id; + } *raw; + + ipcSendPid(&c); + raw = ipcPrepareHeader(&c, sizeof(*raw)); + + raw->magic = SFCI_MAGIC; + raw->cmd_id = id; + + Result rc = serviceIpcDispatch(&g_twiliSrv); + if(R_SUCCEEDED(rc)) { + IpcParsedCommand r; + ipcParse(&r); + + struct { + u64 magic; + u64 result; + } *resp = r.Raw; + + rc = resp->result; + + if(R_SUCCEEDED(rc)) { + serviceCreate(srv_out, r.Handles[0]); + } + } + + return rc; +} + +static Service g_twiliPipeStdin; +static Service g_twiliPipeStdout; +static Service g_twiliPipeStderr; + +static ssize_t twiliWrite(Service *pipe, struct _reent *r, void *fd, const char *ptr, size_t len) { + IpcCommand c; + ipcInitialize(&c); + + struct { + u64 magic; + u64 cmd_id; + } *raw; + + ipcAddSendBuffer(&c, ptr, len, 0); + raw = ipcPrepareHeader(&c, sizeof(*raw)); + + raw->magic = SFCI_MAGIC; + raw->cmd_id = 1; + + Result rc = serviceIpcDispatch(pipe); + if(R_SUCCEEDED(rc)) { + IpcParsedCommand r; + ipcParse(&r); + + struct { + u64 magic; + u64 result; + } *resp = r.Raw; + + rc = resp->result; + } + + if(R_SUCCEEDED(rc)) { + return len; + } else { + if(r == NULL) { + errno = EIO; + } else { + r->_errno = EIO; + } + return -1; + } +} + +Result twiliWriteNamedPipe(Service *pipe, const char *ptr, size_t len) { + twiliWrite(pipe, NULL, NULL, ptr, len); +} + +static ssize_t twiliRead(Service *pipe, struct _reent *r, void *fd, char *ptr, size_t len) { + IpcCommand c; + ipcInitialize(&c); + + struct { + u64 magic; + u64 cmd_id; + } *raw; + + ipcAddRecvBuffer(&c, ptr, len, 0); + raw = ipcPrepareHeader(&c, sizeof(*raw)); + + raw->magic = SFCI_MAGIC; + raw->cmd_id = 0; + + Result rc = serviceIpcDispatch(pipe); + if(R_SUCCEEDED(rc)) { + IpcParsedCommand r; + ipcParse(&r); + + struct { + u64 magic; + u64 result; + u64 size; + } *resp = r.Raw; + + rc = resp->result; + + if(R_SUCCEEDED(rc)) { + return resp->size; + } + } + + if(r == NULL) { + errno = EIO; + } else { + r->_errno = EIO; + } + return -1; +} + +static ssize_t twiliReadStdin(struct _reent *r, void *fd, char *ptr, size_t len) { + return twiliRead(&g_twiliPipeStdin, r, fd, ptr, len); +} + +static ssize_t twiliWriteStdout(struct _reent *r, void *fd, const char *ptr, size_t len) { + return twiliWrite(&g_twiliPipeStdout, r, fd, ptr, len); +} + +static ssize_t twiliWriteStderr(struct _reent *r, void *fd, const char *ptr, size_t len) { + return twiliWrite(&g_twiliPipeStderr, r, fd, ptr, len); +} + +static const inline devoptab_t twiliMakeDotab(const char *name, ssize_t (*write_r)(struct _reent *r, void *fd, const char *ptr, size_t len), ssize_t (*read_r)(struct _reent *r, void *fd, char *ptr, size_t len)) { + devoptab_t ret = { + .name = name, + .structSize = 0, + .open_r = NULL, + .close_r = NULL, + .write_r = write_r, + .read_r = read_r, + .seek_r = NULL, + .fstat_r = NULL, + .deviceData = NULL + }; + return ret; +} + +Result twiliCreateNamedOutputPipe(Service *srv_out, const char* name, size_t len) { + IpcCommand c; + ipcInitialize(&c); + + struct { + u64 magic; + u64 cmd_id; + } *raw; + + ipcAddSendBuffer(&c, name, len, 0); + raw = ipcPrepareHeader(&c, sizeof(*raw)); + + raw->magic = SFCI_MAGIC; + raw->cmd_id = 10; + + Result rc = serviceIpcDispatch(&g_twiliSrv); + if(R_SUCCEEDED(rc)) { + IpcParsedCommand r; + ipcParse(&r); + + struct { + u64 magic; + u64 result; + } *resp = r.Raw; + + rc = resp->result; + + if(R_SUCCEEDED(rc)) { + serviceCreate(srv_out, r.Handles[0]); + } + } + return rc; +} + +Result twiliInitialize(void) { + Result r = 0; + + atomicIncrement64(&g_twiliRefCnt); + + if(!serviceIsActive(&g_twiliSrv)) { + r = smGetService(&g_twiliSrv, "twili"); + if(R_SUCCEEDED(r)) { + r = twiliOpenPipe(&g_twiliPipeStdin, 0); + } + if(R_SUCCEEDED(r)) { + r = twiliOpenPipe(&g_twiliPipeStdout, 1); + } + if(R_SUCCEEDED(r)) { + r = twiliOpenPipe(&g_twiliPipeStderr, 2); + } + if(R_SUCCEEDED(r)) { + static devoptab_t dotab_twili_stdin; + static devoptab_t dotab_twili_stdout; + static devoptab_t dotab_twili_stderr; + dotab_twili_stdin = twiliMakeDotab("twili-in", + NULL, twiliReadStdin); + dotab_twili_stdout = twiliMakeDotab("twili-out", + twiliWriteStdout, NULL); + dotab_twili_stderr = twiliMakeDotab("twili-err", + twiliWriteStderr, NULL); + + devoptab_list[STD_IN] = &dotab_twili_stdin; + devoptab_list[STD_OUT] = &dotab_twili_stdout; + devoptab_list[STD_ERR] = &dotab_twili_stderr; + } + } + + if(R_FAILED(r)) { + twiliExit(); + } + + return r; +} + +void twiliExit(void) { + serviceClose(&g_twiliPipeStderr); + serviceClose(&g_twiliPipeStdout); + serviceClose(&g_twiliPipeStdin); + serviceClose(&g_twiliSrv); +} From f6c440bce77462142cacc803f2a228b077ef7f5e Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 10:38:03 +0200 Subject: [PATCH 2/7] Add Xargo.toml --- Xargo.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Xargo.toml diff --git a/Xargo.toml b/Xargo.toml new file mode 100644 index 0000000..8a51bbf --- /dev/null +++ b/Xargo.toml @@ -0,0 +1,20 @@ +[dependencies.core] +stage = 0 + +[dependencies.alloc] +stage = 1 + +[dependencies.libc] +stage = 2 +default-features = false +features = ["align", "rustc-dep-of-std"] + +[dependencies.std] +git = "https://github.com/rusty-horizon/horizon-nx-std-squashed" +branch = "horizon" +default-features = false +features = [ + "panic-unwind", + #"backtrace", +] +stage = 3 From 27c2eb95f4868210051a9db1459e698213a92c8c Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 11:18:37 +0200 Subject: [PATCH 3/7] Small changes --- Cargo.toml | 1 - Xargo.toml | 20 -------------------- 2 files changed, 21 deletions(-) delete mode 100644 Xargo.toml diff --git a/Cargo.toml b/Cargo.toml index 861d302..5163274 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,6 @@ name = "nx" version = "0.1.0" authors = ["XorTroll", "ischeinkman ", "Switchbrew"] links = "nx" -build = "build.rs" [lib] crate_type = ["rlib"] diff --git a/Xargo.toml b/Xargo.toml deleted file mode 100644 index 8a51bbf..0000000 --- a/Xargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[dependencies.core] -stage = 0 - -[dependencies.alloc] -stage = 1 - -[dependencies.libc] -stage = 2 -default-features = false -features = ["align", "rustc-dep-of-std"] - -[dependencies.std] -git = "https://github.com/rusty-horizon/horizon-nx-std-squashed" -branch = "horizon" -default-features = false -features = [ - "panic-unwind", - #"backtrace", -] -stage = 3 From 047811ae674c7010e487bcdfb8a6dd20f21b38d4 Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 13:25:41 +0200 Subject: [PATCH 4/7] Try to include CRC, fix twili compiling --- bindgen/libnx.h | 2 +- bindgen/twili.h | 2 +- build.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bindgen/libnx.h b/bindgen/libnx.h index 8cbf91f..90856f1 100644 --- a/bindgen/libnx.h +++ b/bindgen/libnx.h @@ -3,4 +3,4 @@ #pragma once -#include "../include/switch-nocrc.h" \ No newline at end of file +#include \ No newline at end of file diff --git a/bindgen/twili.h b/bindgen/twili.h index 9d9e5e9..7efe6ff 100644 --- a/bindgen/twili.h +++ b/bindgen/twili.h @@ -14,7 +14,7 @@ THIS SOFTWARE. */ -#include "../include/switch-nocrc.h" +#include #ifdef __cplusplus extern "C" { diff --git a/build.rs b/build.rs index 3ca01a2..e8b04a6 100644 --- a/build.rs +++ b/build.rs @@ -137,7 +137,7 @@ cfg_if! { build.include("/opt/devkitpro/libnx/include"); build.include("twili/include"); build.file("twili/src/twili.c"); - build.target("aarch64-none-elf"); + build.compiler("/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc"); build.compile("libtwili.a"); } } else { @@ -148,7 +148,7 @@ cfg_if! { cfg_if! { if #[cfg(all(feature = "twili", feature = "bindgen"))] { pub fn twili_bindgen() { - regen_bindings("bindgen/twili.h", "bindgen/twili.rs", + regen_bindings("bindgen/twili.h", "bindgen/twili.rs", Some(vec!["twiliWriteNamedPipe".to_string(), "twiliCreateNamedOutputPipe".to_string(), "twiliCreateNamedOutputPipe".to_string(), "twiliInitialize".to_string(), "twiliExit".to_string()]) ).expect("Error generating twili bindings!"); } @@ -164,7 +164,6 @@ cfg_if! { } pub fn main() { - println!("Dummy!"); bindgen(); compile_twili(); twili_bindgen(); From ab4a9d9c863049510b1016d55a646de98da1c49c Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 13:30:43 +0200 Subject: [PATCH 5/7] Add Generated twili bindings --- bindgen/twili.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 bindgen/twili.rs diff --git a/bindgen/twili.rs b/bindgen/twili.rs new file mode 100644 index 0000000..a9eac9b --- /dev/null +++ b/bindgen/twili.rs @@ -0,0 +1,34 @@ +mod ctypes { + pub type c_void = core::ffi::c_void; + pub type c_char = u8; + pub type c_int = i32; + pub type c_long = i64; + pub type c_longlong = i64; + pub type c_schar = i8; + pub type c_short = i16; + pub type c_uchar = u8; + pub type c_uint = u32; + pub type c_ulong = u64; + pub type c_ulonglong = u64; + pub type c_ushort = u16; + pub type size_t = u64; + pub type ssize_t = i64; + pub type c_float = f32; + pub type c_double = f64; +}/* automatically generated by rust-bindgen */ + +pub type __uint32_t = ctypes :: c_uint ; pub type Handle = u32 ; pub type Result = u32 ; + /// < Uninitialized service. + pub const ServiceType_ServiceType_Uninitialized : ServiceType = 0 ; + /// < Normal service. + pub const ServiceType_ServiceType_Normal : ServiceType = 1 ; + /// < Domain. + pub const ServiceType_ServiceType_Domain : ServiceType = 2 ; + /// < Domain subservice; + pub const ServiceType_ServiceType_DomainSubservice : ServiceType = 3 ; + /// < Service overriden in the homebrew environment. + pub const ServiceType_ServiceType_Override : ServiceType = 4 ; + /// Service type. + pub type ServiceType = u32 ; + /// Service object structure. + # [ repr ( C ) ] pub struct Service { pub handle : Handle , pub object_id : u32 , pub type_ : ServiceType , } # [ test ] fn bindgen_test_layout_Service ( ) { assert_eq ! ( :: core :: mem :: size_of :: < Service > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( Service ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < Service > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( Service ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Service > ( ) ) ) . handle as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Service ) , "::" , stringify ! ( handle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Service > ( ) ) ) . object_id as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( Service ) , "::" , stringify ! ( object_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < Service > ( ) ) ) . type_ as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Service ) , "::" , stringify ! ( type_ ) ) ) ; } extern "C" { pub fn twiliWriteNamedPipe ( pipe : * mut Service , ptr : * const ctypes :: c_char , len : usize ) -> Result ; } extern "C" { pub fn twiliCreateNamedOutputPipe ( srv_out : * mut Service , name : * const ctypes :: c_char , len : usize ) -> Result ; } extern "C" { pub fn twiliInitialize ( ) -> Result ; } extern "C" { pub fn twiliExit ( ) ; } \ No newline at end of file From 3d5f5cef55222116a8f9d3995c403c5dc8a9c32a Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 13:36:39 +0200 Subject: [PATCH 6/7] Finish fix, working fine --- bindgen/twili.h | 1 + include/switch-nocrc.h | 139 ----------------------------------------- twili/include/twili.h | 2 +- 3 files changed, 2 insertions(+), 140 deletions(-) delete mode 100644 include/switch-nocrc.h diff --git a/bindgen/twili.h b/bindgen/twili.h index 7efe6ff..8ef2abd 100644 --- a/bindgen/twili.h +++ b/bindgen/twili.h @@ -19,6 +19,7 @@ #ifdef __cplusplus extern "C" { #endif + Result twiliWriteNamedPipe(Service *pipe, const char *ptr, size_t len); Result twiliCreateNamedOutputPipe(Service *srv_out, const char* name, size_t len); Result twiliInitialize(void); diff --git a/include/switch-nocrc.h b/include/switch-nocrc.h deleted file mode 100644 index 5fba559..0000000 --- a/include/switch-nocrc.h +++ /dev/null @@ -1,139 +0,0 @@ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -// Not direcly including switch.h since new CRC crypto dependencies break bindgen :P - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef __cplusplus -} -#endif \ No newline at end of file diff --git a/twili/include/twili.h b/twili/include/twili.h index ce599ff..48357c8 100644 --- a/twili/include/twili.h +++ b/twili/include/twili.h @@ -16,7 +16,7 @@ #pragma once -#include "../../include/switch-nocrc.h" +#include #ifdef __cplusplus extern "C" { From 8394eb7f86f47e56c7aa375d3cc1607e3085fcbf Mon Sep 17 00:00:00 2001 From: XorTroll Date: Sat, 24 Aug 2019 21:06:28 +0200 Subject: [PATCH 7/7] Small improvements --- build.rs | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/build.rs b/build.rs index e8b04a6..72a1b42 100644 --- a/build.rs +++ b/build.rs @@ -12,50 +12,39 @@ cfg_if! { #[derive(Debug)] struct CustomCallbacks; - impl ParseCallbacks for CustomCallbacks - { - fn will_parse_macro(&self, _name: &str) -> MacroParsingBehavior - { + impl ParseCallbacks for CustomCallbacks { + fn will_parse_macro(&self, _name: &str) -> MacroParsingBehavior { MacroParsingBehavior::Default } - fn int_macro(&self, _name: &str, _value: i64) -> Option - { - if _name.starts_with("POLL") && _value < i16::max_value() as i64 && _value > i16::min_value() as i64 - { + fn int_macro(&self, _name: &str, _value: i64) -> Option { + if _name.starts_with("POLL") && _value < i16::max_value() as i64 && _value > i16::min_value() as i64 { Some(IntKind::I16) } - else if _name.starts_with("DT_") && _value > 0 && _value < u8::max_value() as i64 - { + else if _name.starts_with("DT_") && _value > 0 && _value < u8::max_value() as i64 { Some(IntKind::U8) } - else if _name.starts_with("S_IF") && _value > 0 && _value < u32::max_value() as i64 - { + else if _name.starts_with("S_IF") && _value > 0 && _value < u32::max_value() as i64 { Some(IntKind::U32) } - else if _value < i32::max_value() as i64 && _value > i32::min_value() as i64 - { + else if _value < i32::max_value() as i64 && _value > i32::min_value() as i64 { Some(IntKind::I32) } - else - { + else { None } } - fn enum_variant_behavior(&self, _enum_name: Option<&str>, _original_variant_name: &str, _variant_value: EnumVariantValue,) -> Option - { + fn enum_variant_behavior(&self, _enum_name: Option<&str>, _original_variant_name: &str, _variant_value: EnumVariantValue,) -> Option { None } - fn enum_variant_name(&self, _enum_name: Option<&str>, _original_variant_name: &str, _variant_value: EnumVariantValue,) -> Option - { + fn enum_variant_name(&self, _enum_name: Option<&str>, _original_variant_name: &str, _variant_value: EnumVariantValue,) -> Option { None } } - pub fn regen_bindings(input: &str, output: &str, whitelist: Option>) -> Result - { + pub fn regen_bindings(input: &str, output: &str, whitelist: Option>) -> Result { // we don't care if deletion succeeds, as long as the file is gone let _ = std::fs::remove_file(output); assert!(!std::path::Path::new(output).exists()); @@ -107,15 +96,10 @@ cfg_if! { }) } - pub fn bindgen() - { - // Where the Rust code will be generated to + pub fn bindgen() { let gen_path = "bindgen/libnx.rs"; - - // Input header let header_wrapper = "bindgen/libnx.h"; - // Use bindgen crate to process libnx headers regen_bindings(header_wrapper, gen_path, None).expect("Error generating libnx bindings!"); } } else { @@ -141,7 +125,8 @@ cfg_if! { build.compile("libtwili.a"); } } else { - pub fn compile_twili() {} + pub fn compile_twili() { + } } } @@ -159,7 +144,8 @@ cfg_if! { } } } else { - pub fn twili_bindgen() {} + pub fn twili_bindgen() { + } } }