pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 31;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const __TIMESIZE: u32 = 64;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const JXL_TRUE: u32 = 1;
pub const JXL_FALSE: u32 = 0;
pub const JXL_PARALLEL_RET_RUNNER_ERROR: i32 = -1;
pub const _STDIO_H: u32 = 1;
pub const __GNUC_VA_LIST: u32 = 1;
pub const _____fpos_t_defined: u32 = 1;
pub const ____mbstate_t_defined: u32 = 1;
pub const _____fpos64_t_defined: u32 = 1;
pub const ____FILE_defined: u32 = 1;
pub const __FILE_defined: u32 = 1;
pub const __struct_FILE_defined: u32 = 1;
pub const _IO_EOF_SEEN: u32 = 16;
pub const _IO_ERR_SEEN: u32 = 32;
pub const _IO_USER_LOCK: u32 = 32768;
pub const _IOFBF: u32 = 0;
pub const _IOLBF: u32 = 1;
pub const _IONBF: u32 = 2;
pub const BUFSIZ: u32 = 8192;
pub const EOF: i32 = -1;
pub const SEEK_SET: u32 = 0;
pub const SEEK_CUR: u32 = 1;
pub const SEEK_END: u32 = 2;
pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0";
pub const _BITS_STDIO_LIM_H: u32 = 1;
pub const L_tmpnam: u32 = 20;
pub const TMP_MAX: u32 = 238328;
pub const FILENAME_MAX: u32 = 4096;
pub const L_ctermid: u32 = 9;
pub const FOPEN_MAX: u32 = 16;
pub const _STDLIB_H: u32 = 1;
pub const WNOHANG: u32 = 1;
pub const WUNTRACED: u32 = 2;
pub const WSTOPPED: u32 = 2;
pub const WEXITED: u32 = 4;
pub const WCONTINUED: u32 = 8;
pub const WNOWAIT: u32 = 16777216;
pub const __WNOTHREAD: u32 = 536870912;
pub const __WALL: u32 = 1073741824;
pub const __WCLONE: u32 = 2147483648;
pub const __ENUM_IDTYPE_T: u32 = 1;
pub const __W_CONTINUED: u32 = 65535;
pub const __WCOREFLAG: u32 = 128;
pub const __HAVE_FLOAT128: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
pub const __HAVE_FLOAT64X: u32 = 1;
pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
pub const __HAVE_FLOAT16: u32 = 0;
pub const __HAVE_FLOAT32: u32 = 1;
pub const __HAVE_FLOAT64: u32 = 1;
pub const __HAVE_FLOAT32X: u32 = 1;
pub const __HAVE_FLOAT128X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
pub const __ldiv_t_defined: u32 = 1;
pub const __lldiv_t_defined: u32 = 1;
pub const RAND_MAX: u32 = 2147483647;
pub const EXIT_FAILURE: u32 = 1;
pub const EXIT_SUCCESS: u32 = 0;
pub const _SYS_TYPES_H: u32 = 1;
pub const __clock_t_defined: u32 = 1;
pub const __clockid_t_defined: u32 = 1;
pub const __time_t_defined: u32 = 1;
pub const __timer_t_defined: u32 = 1;
pub const __BIT_TYPES_DEFINED__: u32 = 1;
pub const _ENDIAN_H: u32 = 1;
pub const _BITS_ENDIAN_H: u32 = 1;
pub const __LITTLE_ENDIAN: u32 = 1234;
pub const __BIG_ENDIAN: u32 = 4321;
pub const __PDP_ENDIAN: u32 = 3412;
pub const _BITS_ENDIANNESS_H: u32 = 1;
pub const __BYTE_ORDER: u32 = 1234;
pub const __FLOAT_WORD_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const _BITS_BYTESWAP_H: u32 = 1;
pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
pub const _SYS_SELECT_H: u32 = 1;
pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0";
pub const __sigset_t_defined: u32 = 1;
pub const __timeval_defined: u32 = 1;
pub const _STRUCT_TIMESPEC: u32 = 1;
pub const FD_SETSIZE: u32 = 1024;
pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
pub const _THREAD_SHARED_TYPES_H: u32 = 1;
pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
pub const __have_pthread_attr_t: u32 = 1;
pub const _ALLOCA_H: u32 = 1;
pub type size_t = ::std::os::raw::c_ulong;
pub type wchar_t = ::std::os::raw::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
pub __bindgen_padding_0: u64,
pub __clang_max_align_nonce2: u128,
}
#[test]
fn bindgen_test_layout_max_align_t() {
assert_eq!(
::std::mem::size_of::<max_align_t>(),
32usize,
concat!("Size of: ", stringify!(max_align_t))
);
assert_eq!(
::std::mem::align_of::<max_align_t>(),
16usize,
concat!("Alignment of ", stringify!(max_align_t))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<max_align_t>())).__clang_max_align_nonce1 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<max_align_t>())).__clang_max_align_nonce2 as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce2)
)
);
}
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
pub __val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
assert_eq!(
::std::mem::size_of::<__fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__fsid_t))
);
assert_eq!(
::std::mem::align_of::<__fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__fsid_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__fsid_t),
"::",
stringify!(__val)
)
);
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
#[doc = " use type float, with range 0.0-1.0 (within gamut, may go outside this"]
#[doc = " range for wide color gamut). This is the recommended data type to handle"]
#[doc = " HDR and wide color gamut images."]
pub const JxlDataType_JXL_TYPE_FLOAT: JxlDataType = 0;
#[doc = " Use 1-bit packed in uint8_t, first pixel in LSB, padded to uint8_t per"]
#[doc = " row."]
#[doc = " TODO(lode): support first in MSB, other padding."]
pub const JxlDataType_JXL_TYPE_BOOLEAN: JxlDataType = 1;
#[doc = " Use type uint8_t. May clip wide color gamut data."]
pub const JxlDataType_JXL_TYPE_UINT8: JxlDataType = 2;
#[doc = " Use type uint16_t. May clip wide color gamut data."]
pub const JxlDataType_JXL_TYPE_UINT16: JxlDataType = 3;
#[doc = " Use type uint32_t. May clip wide color gamut data."]
pub const JxlDataType_JXL_TYPE_UINT32: JxlDataType = 4;
#[doc = " Data type for the sample values per channel per pixel."]
pub type JxlDataType = ::std::os::raw::c_uint;
#[doc = " Use the endianness of the system, either little endian or big endian,"]
#[doc = " without forcing either specific endianness. Do not use if pixel data"]
#[doc = " should be exported to a well defined format."]
pub const JxlEndianness_JXL_NATIVE_ENDIAN: JxlEndianness = 0;
#[doc = " Force little endian"]
pub const JxlEndianness_JXL_LITTLE_ENDIAN: JxlEndianness = 1;
#[doc = " Force big endian"]
pub const JxlEndianness_JXL_BIG_ENDIAN: JxlEndianness = 2;
#[doc = " Ordering of multi-byte data."]
pub type JxlEndianness = ::std::os::raw::c_uint;
#[doc = " Data type for the sample values per channel per pixel for the output buffer"]
#[doc = " for pixels. This is not necessarily the same as the data type encoded in the"]
#[doc = " codestream. The channels are interleaved per pixel. The pixels are"]
#[doc = " organized row by row, left to right, top to bottom."]
#[doc = " TODO(lode): implement padding / alignment (row stride)"]
#[doc = " TODO(lode): support different channel orders if needed (RGB, BGR, ...)"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlPixelFormat {
#[doc = " Amount of channels available in a pixel buffer."]
#[doc = " 1: single-channel data, e.g. grayscale"]
#[doc = " 2: single-channel + alpha"]
#[doc = " 3: trichromatic, e.g. RGB"]
#[doc = " 4: trichromatic + alpha"]
#[doc = " TODO(lode): this needs finetuning. It is not yet defined how the user"]
#[doc = " chooses output color space. CMYK+alpha needs 5 channels."]
pub num_channels: u32,
#[doc = " Data type of each channel."]
pub data_type: JxlDataType,
#[doc = " Whether multi-byte data types are represented in big endian or little"]
#[doc = " endian format. This applies to JXL_TYPE_UINT16, JXL_TYPE_UINT32"]
#[doc = " and JXL_TYPE_FLOAT."]
pub endianness: JxlEndianness,
#[doc = " Align scanlines to a multiple of align bytes, or 0 to require no"]
#[doc = " alignment at all (which has the same effect as value 1)"]
pub align: size_t,
}
#[test]
fn bindgen_test_layout_JxlPixelFormat() {
assert_eq!(
::std::mem::size_of::<JxlPixelFormat>(),
24usize,
concat!("Size of: ", stringify!(JxlPixelFormat))
);
assert_eq!(
::std::mem::align_of::<JxlPixelFormat>(),
8usize,
concat!("Alignment of ", stringify!(JxlPixelFormat))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlPixelFormat>())).num_channels as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlPixelFormat),
"::",
stringify!(num_channels)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlPixelFormat>())).data_type as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(JxlPixelFormat),
"::",
stringify!(data_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlPixelFormat>())).endianness as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JxlPixelFormat),
"::",
stringify!(endianness)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlPixelFormat>())).align as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(JxlPixelFormat),
"::",
stringify!(align)
)
);
}
#[doc = " Tristimulus RGB"]
pub const JxlColorSpace_JXL_COLOR_SPACE_RGB: JxlColorSpace = 0;
#[doc = " Luminance based, the primaries in JxlColorEncoding must be ignored."]
pub const JxlColorSpace_JXL_COLOR_SPACE_GRAY: JxlColorSpace = 1;
#[doc = " XYB (opsin) color space"]
pub const JxlColorSpace_JXL_COLOR_SPACE_XYB: JxlColorSpace = 2;
#[doc = " None of the other table entries describe the color space appropriately"]
pub const JxlColorSpace_JXL_COLOR_SPACE_UNKNOWN: JxlColorSpace = 3;
#[doc = " Color space of the image data."]
pub type JxlColorSpace = ::std::os::raw::c_uint;
#[doc = " CIE Standard Illuminant D65: 0.3127, 0.3290"]
pub const JxlWhitePoint_JXL_WHITE_POINT_D65: JxlWhitePoint = 1;
#[doc = " Custom white point stored in JxlColorEncoding white_point."]
pub const JxlWhitePoint_JXL_WHITE_POINT_CUSTOM: JxlWhitePoint = 2;
#[doc = " CIE Standard Illuminant E (equal-energy): 1/3, 1/3"]
pub const JxlWhitePoint_JXL_WHITE_POINT_E: JxlWhitePoint = 10;
#[doc = " DCI-P3 from SMPTE RP 431-2: 0.314, 0.351"]
pub const JxlWhitePoint_JXL_WHITE_POINT_DCI: JxlWhitePoint = 11;
#[doc = " Built-in whitepoints for color encoding. Numeric values match CICP (Rec."]
#[doc = " ITU-T H.273 | ISO/IEC 23091-2:2019(E))."]
pub type JxlWhitePoint = ::std::os::raw::c_uint;
#[doc = " The CIE xy values of the red, green and blue primaries are: 0.639998686,"]
#[doc = "0.330010138; 0.300003784, 0.600003357; 0.150002046, 0.059997204"]
pub const JxlPrimaries_JXL_PRIMARIES_SRGB: JxlPrimaries = 1;
#[doc = " Custom white point stored in JxlColorEncoding primaries_red_xy,"]
#[doc = "primaries_green_xy and primaries_blue_xy."]
pub const JxlPrimaries_JXL_PRIMARIES_CUSTOM: JxlPrimaries = 2;
#[doc = " As specified in Rec. ITU-R BT.2100-1"]
pub const JxlPrimaries_JXL_PRIMARIES_2100: JxlPrimaries = 9;
#[doc = " As specified in SMPTE RP 431-2"]
pub const JxlPrimaries_JXL_PRIMARIES_P3: JxlPrimaries = 11;
#[doc = " Built-in primaries for color encoding. Numeric values match CICP (Rec. ITU-T"]
#[doc = " H.273 | ISO/IEC 23091-2:2019(E))."]
pub type JxlPrimaries = ::std::os::raw::c_uint;
#[doc = " As specified in SMPTE RP 431-2"]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_709: JxlTransferFunction = 1;
#[doc = " None of the other table entries describe the transfer function."]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_UNKNOWN: JxlTransferFunction = 2;
#[doc = " The gamma exponent is 1"]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_LINEAR: JxlTransferFunction = 8;
#[doc = " As specified in IEC 61966-2-1 sRGB"]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_SRGB: JxlTransferFunction = 13;
#[doc = " As specified in SMPTE ST 428-1"]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_PQ: JxlTransferFunction = 16;
#[doc = " As specified in SMPTE ST 428-1"]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_DCI: JxlTransferFunction = 17;
#[doc = " As specified in Rec. ITU-R BT.2100-1 (HLG)"]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_HLG: JxlTransferFunction = 18;
#[doc = " Transfer function follows power law given by the gamma value in"]
#[doc = "JxlColorEncoding. Not a CICP value."]
pub const JxlTransferFunction_JXL_TRANSFER_FUNCTION_GAMMA: JxlTransferFunction = 65535;
#[doc = " Built-in transfer functions for color encoding. Numeric values match CICP"]
#[doc = " (Rec. ITU-T H.273 | ISO/IEC 23091-2:2019(E)) unless specified otherwise."]
pub type JxlTransferFunction = ::std::os::raw::c_uint;
#[doc = " vendor-specific"]
pub const JxlRenderingIntent_JXL_RENDERING_INTENT_PERCEPTUAL: JxlRenderingIntent = 0;
#[doc = " media-relative"]
pub const JxlRenderingIntent_JXL_RENDERING_INTENT_RELATIVE: JxlRenderingIntent = 1;
#[doc = " vendor-specific"]
pub const JxlRenderingIntent_JXL_RENDERING_INTENT_SATURATION: JxlRenderingIntent = 2;
#[doc = " ICC-absolute"]
pub const JxlRenderingIntent_JXL_RENDERING_INTENT_ABSOLUTE: JxlRenderingIntent = 3;
#[doc = " Renderig intent for color encoding, as specified in ISO 15076-1:2010"]
pub type JxlRenderingIntent = ::std::os::raw::c_uint;
#[doc = " Color encoding of the image as structured information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlColorEncoding {
#[doc = " Color space of the image data."]
pub color_space: JxlColorSpace,
#[doc = " Built-in white point. If this value is JXL_WHITE_POINT_CUSTOM, must"]
#[doc = " use the numerical whitepoint values from white_point_xy."]
pub white_point: JxlWhitePoint,
#[doc = " Numerical whitepoint values in CIE xy space."]
pub white_point_xy: [f64; 2usize],
#[doc = " Built-in RGB primaries. If this value is JXL_PRIMARIES_CUSTOM, must"]
#[doc = " use the numerical primaries values below. This field and the custom values"]
#[doc = " below are unused and must be ignored if the color space is"]
#[doc = " JXL_COLOR_SPACE_GRAY or JXL_COLOR_SPACE_XYB."]
pub primaries: JxlPrimaries,
#[doc = " Numerical red primary values in CIE xy space."]
pub primaries_red_xy: [f64; 2usize],
#[doc = " Numerical green primary values in CIE xy space."]
pub primaries_green_xy: [f64; 2usize],
#[doc = " Numerical blue primary values in CIE xy space."]
pub primaries_blue_xy: [f64; 2usize],
#[doc = " Transfer function is have_gamma is 0"]
pub transfer_function: JxlTransferFunction,
#[doc = " Gamma value used when transfer_function is JXL_TRANSFER_FUNCTION_GAMMA"]
pub gamma: f64,
#[doc = " Rendering intent defined for the color profile."]
pub rendering_intent: JxlRenderingIntent,
}
#[test]
fn bindgen_test_layout_JxlColorEncoding() {
assert_eq!(
::std::mem::size_of::<JxlColorEncoding>(),
104usize,
concat!("Size of: ", stringify!(JxlColorEncoding))
);
assert_eq!(
::std::mem::align_of::<JxlColorEncoding>(),
8usize,
concat!("Alignment of ", stringify!(JxlColorEncoding))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlColorEncoding>())).color_space as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(color_space)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlColorEncoding>())).white_point as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(white_point)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlColorEncoding>())).white_point_xy as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(white_point_xy)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlColorEncoding>())).primaries as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(primaries)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlColorEncoding>())).primaries_red_xy as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(primaries_red_xy)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlColorEncoding>())).primaries_green_xy as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(primaries_green_xy)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlColorEncoding>())).primaries_blue_xy as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(primaries_blue_xy)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlColorEncoding>())).transfer_function as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(transfer_function)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlColorEncoding>())).gamma as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(gamma)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlColorEncoding>())).rendering_intent as *const _ as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(JxlColorEncoding),
"::",
stringify!(rendering_intent)
)
);
}
#[doc = " Color transform used for the XYB encoding. This affects how the internal"]
#[doc = " XYB color format is converted, and is not needed unless XYB color is used."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlInverseOpsinMatrix {
#[doc = " Inverse opsin matrix."]
pub opsin_inv_matrix: [[f32; 3usize]; 3usize],
#[doc = " Opsin bias for opsin matrix. This affects how the internal XYB color"]
#[doc = " format is converted, and is not needed unless XYB color is used."]
pub opsin_biases: [f32; 3usize],
#[doc = " Quantization bias for opsin matrix. This affects how the internal XYB"]
#[doc = " color format is converted, and is not needed unless XYB color is used."]
pub quant_biases: [f32; 3usize],
}
#[test]
fn bindgen_test_layout_JxlInverseOpsinMatrix() {
assert_eq!(
::std::mem::size_of::<JxlInverseOpsinMatrix>(),
60usize,
concat!("Size of: ", stringify!(JxlInverseOpsinMatrix))
);
assert_eq!(
::std::mem::align_of::<JxlInverseOpsinMatrix>(),
4usize,
concat!("Alignment of ", stringify!(JxlInverseOpsinMatrix))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlInverseOpsinMatrix>())).opsin_inv_matrix as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(JxlInverseOpsinMatrix),
"::",
stringify!(opsin_inv_matrix)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlInverseOpsinMatrix>())).opsin_biases as *const _ as usize
},
36usize,
concat!(
"Offset of field: ",
stringify!(JxlInverseOpsinMatrix),
"::",
stringify!(opsin_biases)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlInverseOpsinMatrix>())).quant_biases as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(JxlInverseOpsinMatrix),
"::",
stringify!(quant_biases)
)
);
}
pub const JxlOrientation_JXL_ORIENT_IDENTITY: JxlOrientation = 1;
pub const JxlOrientation_JXL_ORIENT_FLIP_HORIZONTAL: JxlOrientation = 2;
pub const JxlOrientation_JXL_ORIENT_ROTATE_180: JxlOrientation = 3;
pub const JxlOrientation_JXL_ORIENT_FLIP_VERTICAL: JxlOrientation = 4;
pub const JxlOrientation_JXL_ORIENT_TRANSPOSE: JxlOrientation = 5;
pub const JxlOrientation_JXL_ORIENT_ROTATE_90_CW: JxlOrientation = 6;
pub const JxlOrientation_JXL_ORIENT_ANTI_TRANSPOSE: JxlOrientation = 7;
pub const JxlOrientation_JXL_ORIENT_ROTATE_90_CCW: JxlOrientation = 8;
#[doc = " Image orientation metadata."]
#[doc = " Values 1..8 match the EXIF definitions."]
#[doc = " The name indicates the operation to perform to transform from the encoded"]
#[doc = " image to the display image."]
pub type JxlOrientation = ::std::os::raw::c_uint;
pub const JxlExtraChannelType_JXL_CHANNEL_ALPHA: JxlExtraChannelType = 0;
pub const JxlExtraChannelType_JXL_CHANNEL_DEPTH: JxlExtraChannelType = 1;
pub const JxlExtraChannelType_JXL_CHANNEL_SPOT_COLOR: JxlExtraChannelType = 2;
pub const JxlExtraChannelType_JXL_CHANNEL_SELECTION_MASK: JxlExtraChannelType = 3;
pub const JxlExtraChannelType_JXL_CHANNEL_BLACK: JxlExtraChannelType = 4;
pub const JxlExtraChannelType_JXL_CHANNEL_CFA: JxlExtraChannelType = 5;
pub const JxlExtraChannelType_JXL_CHANNEL_THERMAL: JxlExtraChannelType = 6;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED0: JxlExtraChannelType = 7;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED1: JxlExtraChannelType = 8;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED2: JxlExtraChannelType = 9;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED3: JxlExtraChannelType = 10;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED4: JxlExtraChannelType = 11;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED5: JxlExtraChannelType = 12;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED6: JxlExtraChannelType = 13;
pub const JxlExtraChannelType_JXL_CHANNEL_RESERVED7: JxlExtraChannelType = 14;
pub const JxlExtraChannelType_JXL_CHANNEL_UNKNOWN: JxlExtraChannelType = 15;
pub const JxlExtraChannelType_JXL_CHANNEL_OPTIONAL: JxlExtraChannelType = 16;
#[doc = " Given type of an extra channel."]
pub type JxlExtraChannelType = ::std::os::raw::c_uint;
#[doc = " The codestream preview header"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlPreviewHeader {
#[doc = " Preview width in pixels"]
pub xsize: u32,
#[doc = " Preview height in pixels"]
pub ysize: u32,
}
#[test]
fn bindgen_test_layout_JxlPreviewHeader() {
assert_eq!(
::std::mem::size_of::<JxlPreviewHeader>(),
8usize,
concat!("Size of: ", stringify!(JxlPreviewHeader))
);
assert_eq!(
::std::mem::align_of::<JxlPreviewHeader>(),
4usize,
concat!("Alignment of ", stringify!(JxlPreviewHeader))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlPreviewHeader>())).xsize as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlPreviewHeader),
"::",
stringify!(xsize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlPreviewHeader>())).ysize as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(JxlPreviewHeader),
"::",
stringify!(ysize)
)
);
}
#[doc = " The codestream animation header, optionally present in the beginning of"]
#[doc = " the codestream, and if it is it applies to all animation frames, unlike"]
#[doc = " JxlFrameHeader which applies to an individual frame."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlAnimationHeader {
#[doc = " Numerator of ticks per second of a single animation frame time unit"]
pub tps_numerator: u32,
#[doc = " Denominator of ticks per second of a single animation frame time unit"]
pub tps_denominator: u32,
#[doc = " Amount of animation loops, or 0 to repeat infinitely"]
pub num_loops: u32,
#[doc = " Whether animation time codes are present at animation frames in the"]
#[doc = " codestream"]
pub have_timecodes: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_JxlAnimationHeader() {
assert_eq!(
::std::mem::size_of::<JxlAnimationHeader>(),
16usize,
concat!("Size of: ", stringify!(JxlAnimationHeader))
);
assert_eq!(
::std::mem::align_of::<JxlAnimationHeader>(),
4usize,
concat!("Alignment of ", stringify!(JxlAnimationHeader))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlAnimationHeader>())).tps_numerator as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(JxlAnimationHeader),
"::",
stringify!(tps_numerator)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlAnimationHeader>())).tps_denominator as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(JxlAnimationHeader),
"::",
stringify!(tps_denominator)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlAnimationHeader>())).num_loops as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JxlAnimationHeader),
"::",
stringify!(num_loops)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlAnimationHeader>())).have_timecodes as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(JxlAnimationHeader),
"::",
stringify!(have_timecodes)
)
);
}
#[doc = " Basic image information. This information is available from the file"]
#[doc = " signature and first part of the codestream header."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlBasicInfo {
#[doc = " Whether the codestream is embedded in the container format. If true,"]
#[doc = " metadata information and extensions may be available in addition to the"]
#[doc = " codestream."]
pub have_container: ::std::os::raw::c_int,
#[doc = " Width of the image in pixels, before applying orientation."]
pub xsize: u32,
#[doc = " Height of the image in pixels, before applying orientation."]
pub ysize: u32,
#[doc = " Original image color channel bit depth."]
pub bits_per_sample: u32,
#[doc = " Original image color channel floating point exponent bits, or 0 if they"]
#[doc = " are unsigned integer. For example, if the original data is half-precision"]
#[doc = " (binary16) floating point, bits_per_sample is 16 and"]
#[doc = " exponent_bits_per_sample is 5, and so on for other floating point"]
#[doc = " precisions."]
pub exponent_bits_per_sample: u32,
#[doc = " Upper bound on the intensity level present in the image in nits. For"]
#[doc = " unsigned integer pixel encodings, this is the brightness of the largest"]
#[doc = " representable value. The image does not necessarily contain a pixel"]
#[doc = " actually this bright. An encoder is allowed to set 255 for SDR images"]
#[doc = " without computing a histogram."]
pub intensity_target: f32,
#[doc = " Lower bound on the intensity level present in the image. This may be"]
#[doc = " loose, i.e. lower than the actual darkest pixel. When tone mapping, a"]
#[doc = " decoder will map [min_nits, intensity_target] to the display range."]
pub min_nits: f32,
#[doc = " See the description of @see linear_below."]
pub relative_to_max_display: ::std::os::raw::c_int,
#[doc = " The tone mapping will leave unchanged (linear mapping) any pixels whose"]
#[doc = " brightness is strictly below this. The interpretation depends on"]
#[doc = " relative_to_max_display. If true, this is a ratio [0, 1] of the maximum"]
#[doc = " display brightness [nits], otherwise an absolute brightness [nits]."]
pub linear_below: f32,
#[doc = " Whether the data in the codestream is encoded in the original color"]
#[doc = " profile that is attached to the codestream metadata header, or is"]
#[doc = " encoded in an internally supported absolute color space (which the decoder"]
#[doc = " can always convert to linear or non-linear sRGB or to XYB). If the original"]
#[doc = " profile is used, the decoder outputs pixel data in the color space matching"]
#[doc = " that profile, but doesn't convert it to any other color space. If the"]
#[doc = " original profile is not used, the decoder only outputs the data as sRGB"]
#[doc = " (linear if outputting to floating point, nonlinear with standard sRGB"]
#[doc = " transfer function if outputting to unsigned integers) but will not convert"]
#[doc = " it to to the original color profile. The decoder also does not convert to"]
#[doc = " the target display color profile, but instead will always indicate which"]
#[doc = " color profile the returned pixel data is encoded in when using @see"]
#[doc = " JXL_COLOR_PROFILE_TARGET_DATA so that a CMS can be used to convert the"]
#[doc = " data."]
pub uses_original_profile: ::std::os::raw::c_int,
#[doc = " Indicates a preview image exists near the beginning of the codestream."]
#[doc = " The preview itself or its dimensions are not included in the basic info."]
pub have_preview: ::std::os::raw::c_int,
#[doc = " Indicates animation frames exist in the codestream. The animation"]
#[doc = " information is not included in the basic info."]
pub have_animation: ::std::os::raw::c_int,
#[doc = " Image orientation, value 1-8 matching the values used by JEITA CP-3451C"]
#[doc = " (Exif version 2.3)."]
pub orientation: JxlOrientation,
#[doc = " Number of additional image channels. Information of all the individual"]
#[doc = " extra channels is not included in the basic info struct, except for the"]
#[doc = " first alpha channel in the fields below. Information for other extra"]
#[doc = " channels can be queried from the decoder at this point, however."]
#[doc = " TODO(lode): implement that feature"]
pub num_extra_channels: u32,
#[doc = " Bit depth of the encoded alpha channel, or 0 if there is no alpha channel."]
pub alpha_bits: u32,
#[doc = " Alpha channel floating point exponent bits, or 0 if they are unsigned"]
#[doc = " integer."]
pub alpha_exponent_bits: u32,
#[doc = " Whether the alpha channel is premultiplied"]
pub alpha_premultiplied: ::std::os::raw::c_int,
#[doc = " Dimensions of encoded preview image, only used if have_preview is"]
#[doc = " JXL_TRUE."]
pub preview: JxlPreviewHeader,
#[doc = " Animation header with global animation properties for all frames, only"]
#[doc = " used if have_animation is JXL_TRUE."]
pub animation: JxlAnimationHeader,
}
#[test]
fn bindgen_test_layout_JxlBasicInfo() {
assert_eq!(
::std::mem::size_of::<JxlBasicInfo>(),
92usize,
concat!("Size of: ", stringify!(JxlBasicInfo))
);
assert_eq!(
::std::mem::align_of::<JxlBasicInfo>(),
4usize,
concat!("Alignment of ", stringify!(JxlBasicInfo))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).have_container as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(have_container)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).xsize as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(xsize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).ysize as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(ysize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).bits_per_sample as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(bits_per_sample)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlBasicInfo>())).exponent_bits_per_sample as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(exponent_bits_per_sample)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).intensity_target as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(intensity_target)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).min_nits as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(min_nits)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlBasicInfo>())).relative_to_max_display as *const _ as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(relative_to_max_display)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).linear_below as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(linear_below)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlBasicInfo>())).uses_original_profile as *const _ as usize
},
36usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(uses_original_profile)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).have_preview as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(have_preview)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).have_animation as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(have_animation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).orientation as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(orientation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).num_extra_channels as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(num_extra_channels)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).alpha_bits as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(alpha_bits)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlBasicInfo>())).alpha_exponent_bits as *const _ as usize
},
60usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(alpha_exponent_bits)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlBasicInfo>())).alpha_premultiplied as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(alpha_premultiplied)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).preview as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(preview)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlBasicInfo>())).animation as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(JxlBasicInfo),
"::",
stringify!(animation)
)
);
}
#[doc = " Information for a single extra channel."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlExtraChannelInfo {
#[doc = " Given type of an extra channel."]
pub type_: JxlExtraChannelType,
#[doc = " Total bits per sample for this channel."]
pub bits_per_sample: u32,
#[doc = " Floating point exponent bits per channel, or 0 if they are unsigned"]
#[doc = " integer."]
pub exponent_bits_per_sample: u32,
#[doc = " The exponent the channel is downsampled by on each axis."]
#[doc = " TODO(lode): expand this comment to match the JPEG XL specification,"]
#[doc = " specify how to upscale, how to round the size computation, and to which"]
#[doc = " extra channels this field applies."]
pub dim_shift: u32,
#[doc = " Length of the extra channel name in bytes, or 0 if no name."]
#[doc = " Excludes null termination character."]
pub name_length: u32,
#[doc = " Whether alpha channel uses premultiplied alpha. Only applicable if"]
#[doc = " type is JXL_CHANNEL_ALPHA."]
pub alpha_associated: ::std::os::raw::c_int,
#[doc = " Spot color of the current spot channel in linear RGBA. Only applicable if"]
#[doc = " type is JXL_CHANNEL_SPOT_COLOR."]
pub spot_color: [f32; 4usize],
#[doc = " Only applicable if type is JXL_CHANNEL_CFA."]
#[doc = " TODO(lode): add comment about the meaning of this field."]
pub cfa_channel: u32,
}
#[test]
fn bindgen_test_layout_JxlExtraChannelInfo() {
assert_eq!(
::std::mem::size_of::<JxlExtraChannelInfo>(),
44usize,
concat!("Size of: ", stringify!(JxlExtraChannelInfo))
);
assert_eq!(
::std::mem::align_of::<JxlExtraChannelInfo>(),
4usize,
concat!("Alignment of ", stringify!(JxlExtraChannelInfo))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlExtraChannelInfo>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlExtraChannelInfo>())).bits_per_sample as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(bits_per_sample)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlExtraChannelInfo>())).exponent_bits_per_sample as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(exponent_bits_per_sample)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlExtraChannelInfo>())).dim_shift as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(dim_shift)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlExtraChannelInfo>())).name_length as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(name_length)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JxlExtraChannelInfo>())).alpha_associated as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(alpha_associated)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlExtraChannelInfo>())).spot_color as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(spot_color)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlExtraChannelInfo>())).cfa_channel as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(JxlExtraChannelInfo),
"::",
stringify!(cfa_channel)
)
);
}
#[doc = " Extensions in the codestream header."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlHeaderExtensions {
#[doc = " Extension bits."]
pub extensions: u64,
}
#[test]
fn bindgen_test_layout_JxlHeaderExtensions() {
assert_eq!(
::std::mem::size_of::<JxlHeaderExtensions>(),
8usize,
concat!("Size of: ", stringify!(JxlHeaderExtensions))
);
assert_eq!(
::std::mem::align_of::<JxlHeaderExtensions>(),
8usize,
concat!("Alignment of ", stringify!(JxlHeaderExtensions))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlHeaderExtensions>())).extensions as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlHeaderExtensions),
"::",
stringify!(extensions)
)
);
}
#[doc = " The header of one displayed frame."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlFrameHeader {
#[doc = " How long to wait after rendering in ticks. The duration in seconds of a"]
#[doc = " tick is given by tps_numerator and tps_denominator in JxlAnimationHeader."]
pub duration: u32,
#[doc = " SMPTE timecode of the current frame in form 0xHHMMSSFF, or 0. The bits are"]
#[doc = " interpreted from most-significant to least-significant as hour, minute,"]
#[doc = " second, and frame. If timecode is nonzero, it is strictly larger than that"]
#[doc = " of a previous frame with nonzero duration. These values are only available"]
#[doc = " if have_timecodes in JxlAnimationHeader is JXL_TRUE."]
#[doc = " This value is only used if have_timecodes in JxlAnimationHeader is"]
#[doc = " JXL_TRUE."]
pub timecode: u32,
#[doc = " Length of the frame name in bytes, or 0 if no name."]
#[doc = " Excludes null termination character."]
pub name_length: u32,
#[doc = " Indicates this is the last animation frame."]
pub is_last: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_JxlFrameHeader() {
assert_eq!(
::std::mem::size_of::<JxlFrameHeader>(),
16usize,
concat!("Size of: ", stringify!(JxlFrameHeader))
);
assert_eq!(
::std::mem::align_of::<JxlFrameHeader>(),
4usize,
concat!("Alignment of ", stringify!(JxlFrameHeader))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlFrameHeader>())).duration as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlFrameHeader),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlFrameHeader>())).timecode as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(JxlFrameHeader),
"::",
stringify!(timecode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlFrameHeader>())).name_length as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JxlFrameHeader),
"::",
stringify!(name_length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlFrameHeader>())).is_last as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(JxlFrameHeader),
"::",
stringify!(is_last)
)
);
}
#[doc = " Allocating function for a memory region of a given size."]
#[doc = ""]
#[doc = " Allocates a contiguous memory region of size @p size bytes. The returned"]
#[doc = " memory may not be aligned to a specific size or initialized at all."]
#[doc = ""]
#[doc = " @param opaque custom memory manager handle provided by the caller."]
#[doc = " @param size in bytes of the requested memory region."]
#[doc = " @returns @c 0 if the memory can not be allocated,"]
#[doc = " @returns pointer to the memory otherwise."]
pub type jpegxl_alloc_func = ::std::option::Option<
unsafe extern "C" fn(
opaque: *mut ::std::os::raw::c_void,
size: size_t,
) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Deallocating function pointer type."]
#[doc = ""]
#[doc = " This function @b MUST do nothing if @p address is @c 0."]
#[doc = ""]
#[doc = " @param opaque custom memory manager handle provided by the caller."]
#[doc = " @param address memory region pointer returned by ::jpegxl_alloc_func, or @c 0"]
pub type jpegxl_free_func = ::std::option::Option<
unsafe extern "C" fn(opaque: *mut ::std::os::raw::c_void, address: *mut ::std::os::raw::c_void),
>;
#[doc = " Memory Manager struct."]
#[doc = " These functions, when provided by the caller, will be used to handle memory"]
#[doc = " allocations."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlMemoryManagerStruct {
#[doc = " The opaque pointer that will be passed as the first parameter to all the"]
#[doc = " functions in this struct."]
pub opaque: *mut ::std::os::raw::c_void,
#[doc = " Memory allocation function. This can be NULL if and only if also the"]
#[doc = " free() member in this class is NULL. All dynamic memory will be allocated"]
#[doc = " and freed with these functions if they are not NULL."]
pub alloc: jpegxl_alloc_func,
#[doc = " Free function matching the alloc() member."]
pub free: jpegxl_free_func,
}
#[test]
fn bindgen_test_layout_JxlMemoryManagerStruct() {
assert_eq!(
::std::mem::size_of::<JxlMemoryManagerStruct>(),
24usize,
concat!("Size of: ", stringify!(JxlMemoryManagerStruct))
);
assert_eq!(
::std::mem::align_of::<JxlMemoryManagerStruct>(),
8usize,
concat!("Alignment of ", stringify!(JxlMemoryManagerStruct))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlMemoryManagerStruct>())).opaque as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JxlMemoryManagerStruct),
"::",
stringify!(opaque)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlMemoryManagerStruct>())).alloc as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JxlMemoryManagerStruct),
"::",
stringify!(alloc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JxlMemoryManagerStruct>())).free as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(JxlMemoryManagerStruct),
"::",
stringify!(free)
)
);
}
#[doc = " Memory Manager struct."]
#[doc = " These functions, when provided by the caller, will be used to handle memory"]
#[doc = " allocations."]
pub type JxlMemoryManager = JxlMemoryManagerStruct;
#[doc = " Return code used in the JxlParallel* functions as return value. A value"]
#[doc = " of 0 means success and any other value means error. The special value"]
#[doc = " JXL_PARALLEL_RET_RUNNER_ERROR can be used by the runner to indicate any"]
#[doc = " other error."]
pub type JxlParallelRetCode = ::std::os::raw::c_int;
#[doc = " Parallel run initialization callback. See JxlParallelRunner for details."]
#[doc = ""]
#[doc = " This function MUST be called by the JxlParallelRunner only once, on the"]
#[doc = " same thread that called JxlParallelRunner, before any parallel execution."]
#[doc = " The purpose of this call is to provide the maximum number of threads that the"]
#[doc = " JxlParallelRunner will use, which can be used by JPEG XL to allocate"]
#[doc = " per-thread storage if needed."]
#[doc = ""]
#[doc = " @param jpegxl_opaque the @p jpegxl_opaque handle provided to"]
#[doc = " JxlParallelRunner() must be passed here."]
#[doc = " @param num_threads the maximum number of threads. This value must be"]
#[doc = " positive."]
#[doc = " @returns 0 if the initialization process was successful."]
#[doc = " @returns an error code if there was an error, which should be returned by"]
#[doc = " JxlParallelRunner()."]
pub type JxlParallelRunInit = ::std::option::Option<
unsafe extern "C" fn(
jpegxl_opaque: *mut ::std::os::raw::c_void,
num_threads: size_t,
) -> JxlParallelRetCode,
>;
#[doc = " Parallel run data processing callback. See JxlParallelRunner for details."]
#[doc = ""]
#[doc = " This function MUST be called once for every number in the range [start_range,"]
#[doc = " end_range) (including start_range but not including end_range) passing this"]
#[doc = " number as the @p value. Calls for different value may be executed from"]
#[doc = " different threads in parallel."]
#[doc = ""]
#[doc = " @param jpegxl_opaque the @p jpegxl_opaque handle provided to"]
#[doc = " JxlParallelRunner() must be passed here."]
#[doc = " @param value the number in the range [start_range, end_range) of the call."]
#[doc = " @param thread_id the thread number where this function is being called from."]
#[doc = " This must be lower than the @p num_threads value passed to"]
#[doc = " JxlParallelRunInit."]
pub type JxlParallelRunFunction = ::std::option::Option<
unsafe extern "C" fn(jpegxl_opaque: *mut ::std::os::raw::c_void, value: u32, thread_id: size_t),
>;
#[doc = " JxlParallelRunner function type. A parallel runner implementation can be"]
#[doc = " provided by a JPEG XL caller to allow running computations in multiple"]
#[doc = " threads. This function must call the initialization function @p init in the"]
#[doc = " same thread that called it and then call the passed @p func once for every"]
#[doc = " number in the range [start_range, end_range) (including start_range but not"]
#[doc = " including end_range) possibly from different multiple threads in parallel."]
#[doc = ""]
#[doc = " The JxlParallelRunner function does not need to be re-entrant. This means"]
#[doc = " that the same JxlParallelRunner function with the same runner_opaque"]
#[doc = " provided parameter will not be called from the library from either @p init or"]
#[doc = " @p func in the same decoder or encoder instance. However, a single decoding"]
#[doc = " or encoding instance may call the provided JxlParallelRunner multiple"]
#[doc = " times for different parts of the decoding or encoding process."]
#[doc = ""]
#[doc = " @returns 0 if the @p init call succeeded (returned 0) and no other error"]
#[doc = " occurred in the runner code."]
#[doc = " @returns JXL_PARALLEL_RET_RUNNER_ERROR if an error occurred in the runner"]
#[doc = " code, for example, setting up the threads."]
#[doc = " @return the return value of @p init() if non-zero."]
pub type JxlParallelRunner = ::std::option::Option<
unsafe extern "C" fn(
runner_opaque: *mut ::std::os::raw::c_void,
jpegxl_opaque: *mut ::std::os::raw::c_void,
init: JxlParallelRunInit,
func: JxlParallelRunFunction,
start_range: u32,
end_range: u32,
) -> JxlParallelRetCode,
>;
extern "C" {
#[doc = " Decoder library version."]
#[doc = ""]
#[doc = " @return the decoder library version as an integer:"]
#[doc = " MAJOR_VERSION * 1000000 + MINOR_VERSION * 1000 + PATCH_VERSION. For example,"]
#[doc = " version 1.2.3 would return 1002003."]
pub fn JxlDecoderVersion() -> u32;
}
#[doc = " Not enough bytes were passed to determine if a valid signature was found."]
pub const JxlSignature_JXL_SIG_NOT_ENOUGH_BYTES: JxlSignature = 0;
#[doc = " No valid JPEGXL header was found."]
pub const JxlSignature_JXL_SIG_INVALID: JxlSignature = 1;
#[doc = " A valid JPEG XL codestream signature was found, that is a JPEG XL image"]
#[doc = " without container."]
pub const JxlSignature_JXL_SIG_CODESTREAM: JxlSignature = 2;
#[doc = " A valid container signature was found, that is a JPEG XL image embedded"]
#[doc = " in a box format container."]
pub const JxlSignature_JXL_SIG_CONTAINER: JxlSignature = 3;
#[doc = " The result of JxlSignatureCheck."]
pub type JxlSignature = ::std::os::raw::c_uint;
extern "C" {
#[doc = " JPEG XL signature identification."]
#[doc = ""]
#[doc = " Checks if the passed buffer contains a valid JPEG XL signature. The passed @p"]
#[doc = " buf of size"]
#[doc = " @p size doesn't need to be a full image, only the beginning of the file."]
#[doc = ""]
#[doc = " @return a flag indicating if a JPEG XL signature was found and what type."]
#[doc = " - JXL_SIG_NOT_ENOUGH_BYTES not enough bytes were passed to determine"]
#[doc = " if a valid signature is there."]
#[doc = " - JXL_SIG_INVALID: no valid signature found for JPEG XL decoding."]
#[doc = " - JXL_SIG_CODESTREAM a valid JPEG XL codestream signature was found."]
#[doc = " - JXL_SIG_CONTAINER a valid JPEG XL container signature was found."]
pub fn JxlSignatureCheck(buf: *const u8, len: size_t) -> JxlSignature;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlDecoderStruct {
_unused: [u8; 0],
}
#[doc = " Opaque structure that holds the JPEGXL decoder."]
#[doc = ""]
#[doc = " Allocated and initialized with JxlDecoderCreate()."]
#[doc = " Cleaned up and deallocated with JxlDecoderDestroy()."]
pub type JxlDecoder = JxlDecoderStruct;
extern "C" {
#[doc = " Creates an instance of JxlDecoder and initializes it."]
#[doc = ""]
#[doc = " @p memory_manager will be used for all the library dynamic allocations made"]
#[doc = " from this instance. The parameter may be NULL, in which case the default"]
#[doc = " allocator will be used. See jpegxl/memory_manager.h for details."]
#[doc = ""]
#[doc = " @param memory_manager custom allocator function. It may be NULL. The memory"]
#[doc = " manager will be copied internally."]
#[doc = " @return @c NULL if the instance can not be allocated or initialized"]
#[doc = " @return pointer to initialized JxlDecoder otherwise"]
pub fn JxlDecoderCreate(memory_manager: *const JxlMemoryManager) -> *mut JxlDecoder;
}
extern "C" {
#[doc = " Re-initializes a JxlDecoder instance, so it can be re-used for decoding"]
#[doc = " another image. All state and settings are reset as if the object was"]
#[doc = " newly created with JxlDecoderCreate, but the memory manager is kept."]
#[doc = ""]
#[doc = " @param dec instance to be re-initialized."]
pub fn JxlDecoderReset(dec: *mut JxlDecoder);
}
extern "C" {
#[doc = " Deinitializes and frees JxlDecoder instance."]
#[doc = ""]
#[doc = " @param dec instance to be cleaned up and deallocated."]
pub fn JxlDecoderDestroy(dec: *mut JxlDecoder);
}
#[doc = " Function call finished successfully, or decoding is finished and there is"]
#[doc = " nothing more to be done."]
pub const JxlDecoderStatus_JXL_DEC_SUCCESS: JxlDecoderStatus = 0;
#[doc = " An error occured, for example invalid input file or out of memory."]
#[doc = " TODO(lode): add function to get error information from decoder."]
pub const JxlDecoderStatus_JXL_DEC_ERROR: JxlDecoderStatus = 1;
#[doc = " The decoder needs more input bytes to continue. In the next"]
#[doc = " JxlDecoderProcessInput call, next_in and avail_in must point to more"]
#[doc = " bytes to continue. If *avail_in is not 0, the new bytes must be appended to"]
#[doc = " the *avail_in last previous bytes."]
pub const JxlDecoderStatus_JXL_DEC_NEED_MORE_INPUT: JxlDecoderStatus = 2;
#[doc = " The decoder is able to decode a preview image and requests setting a"]
#[doc = " preview output buffer using JxlDecoderSetPreviewOutBuffer. This occurs if"]
#[doc = " JXL_DEC_PREVIEW_IMAGE is requested and it is possible to decode a preview"]
#[doc = " image from the codestream and the preview out buffer was not yet set. There"]
#[doc = " is maximum one preview image in a codestream."]
pub const JxlDecoderStatus_JXL_DEC_NEED_PREVIEW_OUT_BUFFER: JxlDecoderStatus = 3;
#[doc = " The decoder is able to decode a DC image and requests setting a DC output"]
#[doc = " buffer using JxlDecoderSetDCOutBuffer. This occurs if JXL_DEC_DC_IMAGE is"]
#[doc = " requested and it is possible to decode a DC image from the codestream and"]
#[doc = " the DC out buffer was not yet set. This event re-occurs for new frames"]
#[doc = " if there are multiple animation frames."]
pub const JxlDecoderStatus_JXL_DEC_NEED_DC_OUT_BUFFER: JxlDecoderStatus = 4;
#[doc = " The decoder requests and output buffer to store the full resolution image,"]
#[doc = " which can be set with JxlDecoderSetImageOutBuffer. This event re-occurs for"]
#[doc = " new frames if there are multiple animation frames."]
pub const JxlDecoderStatus_JXL_DEC_NEED_IMAGE_OUT_BUFFER: JxlDecoderStatus = 5;
#[doc = " Informative event by JxlDecoderProcessInput: basic information such as"]
#[doc = " image dimensions and extra channels. This event occurs max once per image."]
pub const JxlDecoderStatus_JXL_DEC_BASIC_INFO: JxlDecoderStatus = 64;
#[doc = " Informative event by JxlDecoderProcessInput: user extensions of the"]
#[doc = " codestream header. This event occurs max once per image and always later"]
#[doc = " than JXL_DEC_BASIC_INFO and earlier than any pixel data."]
pub const JxlDecoderStatus_JXL_DEC_EXTENSIONS: JxlDecoderStatus = 128;
#[doc = " Informative event by JxlDecoderProcessInput: color encoding or ICC"]
#[doc = " profile from the codestream header. This event occurs max once per image"]
#[doc = " and always later than JXL_DEC_BASIC_INFO and earlier than any pixel"]
#[doc = " data."]
pub const JxlDecoderStatus_JXL_DEC_COLOR_ENCODING: JxlDecoderStatus = 256;
#[doc = " Informative event by JxlDecoderProcessInput: Preview image, a small"]
#[doc = " frame, decoded. This event can only happen if the image has a preview"]
#[doc = " frame encoded. This event occurs max once for the codestream and always"]
#[doc = " later than JXL_DEC_COLOR_ENCODING and before JXL_DEC_FRAME."]
#[doc = " This event is different than JXL_DEC_PREVIEW_HEADER because the latter only"]
#[doc = " outputs the dimensions of the preview image."]
pub const JxlDecoderStatus_JXL_DEC_PREVIEW_IMAGE: JxlDecoderStatus = 512;
#[doc = " Informative event by JxlDecoderProcessInput: Beginning of a frame."]
#[doc = " JxlDecoderGetFrameHeader can be used at this point. A note on frames:"]
#[doc = " a JPEG XL image can have internal frames that are not intended to be"]
#[doc = " displayed (e.g. used for compositing a final frame), but this only returns"]
#[doc = " displayed frames. A displayed frame either has an animation duration or is"]
#[doc = " the only or last frame in the image. This event occurs max once per"]
#[doc = " displayed frame, always later than JXL_DEC_COLOR_ENCODING, and always"]
#[doc = " earlier than any pixel data. While JPEG XL supports encoding a single frame"]
#[doc = " as the composition of multiple internal sub-frames also called frames, this"]
#[doc = " event is not indicated for the internal frames."]
pub const JxlDecoderStatus_JXL_DEC_FRAME: JxlDecoderStatus = 1024;
#[doc = " Informative event by JxlDecoderProcessInput: DC image, 8x8 sub-sampled"]
#[doc = " frame, decoded. It is not guaranteed that the decoder will always return DC"]
#[doc = " separately, but when it does it will do so before outputting the full"]
#[doc = " frame. JxlDecoderSetDCOutBuffer must be used after getting the basic"]
#[doc = " image information to be able to get the DC pixels, if not this return"]
#[doc = " status only indicates we're past this point in the codestream. This event"]
#[doc = " occurs max once per frame and always later than JXL_DEC_FRAME_HEADER"]
#[doc = " and other header events and earlier than full resolution pixel data."]
pub const JxlDecoderStatus_JXL_DEC_DC_IMAGE: JxlDecoderStatus = 2048;
#[doc = " Informative event by JxlDecoderProcessInput: full frame decoded."]
#[doc = " JxlDecoderSetImageOutBuffer must be used after getting the basic image"]
#[doc = " information to be able to get the image pixels, if not this return status"]
#[doc = " only indicates we're past this point in the codestream. This event occurs"]
#[doc = " max once per frame and always later than JXL_DEC_DC_IMAGE."]
pub const JxlDecoderStatus_JXL_DEC_FULL_IMAGE: JxlDecoderStatus = 4096;
#[doc = " Return value for JxlDecoderProcessInput."]
#[doc = " The values above 0x40 are optional informal events that can be subscribed to,"]
#[doc = " they are never returned if they have not been registered with"]
#[doc = " JxlDecoderSubscribeEvents."]
pub type JxlDecoderStatus = ::std::os::raw::c_uint;
extern "C" {
#[doc = " Get the default pixel format for this decoder."]
#[doc = ""]
#[doc = " Requires that the decoder can produce JxlBasicInfo."]
#[doc = ""]
#[doc = " @param dec JxlDecoder to query when creating the recommended pixel format."]
#[doc = " @param format JxlPixelFormat to populate with the recommended settings for"]
#[doc = " the data loaded into this decoder."]
#[doc = " @return JXL_DEC_SUCCESS if no error, JXL_DEC_NEED_MORE_INPUT if the"]
#[doc = " basic info isn't yet available, and JXL_DEC_ERROR otherwise."]
pub fn JxlDecoderDefaultPixelFormat(
dec: *const JxlDecoder,
format: *mut JxlPixelFormat,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Set the parallel runner for multithreading. May only be set before starting"]
#[doc = " decoding."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param parallel_runner function pointer to runner for multithreading. It may"]
#[doc = " be NULL to use the default, single-threaded, runner. A multithreaded"]
#[doc = " runner should be set to reach fast performance."]
#[doc = " @param parallel_runner_opaque opaque pointer for parallel_runner."]
#[doc = " @return JXL_DEC_SUCCESS if the runner was set, JXL_DEC_ERROR"]
#[doc = " otherwise (the previous runner remains set)."]
pub fn JxlDecoderSetParallelRunner(
dec: *mut JxlDecoder,
parallel_runner: JxlParallelRunner,
parallel_runner_opaque: *mut ::std::os::raw::c_void,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Returns a hint indicating how many more bytes the decoder is expected to"]
#[doc = " need to make JxlDecoderGetBasicInfo available after the next"]
#[doc = " JxlDecoderProcessInput call. This is a suggested large enough value for"]
#[doc = " the *avail_in parameter, but it is not guaranteed to be an upper bound nor"]
#[doc = " a lower bound."]
#[doc = " Can be used before the first JxlDecoderProcessInput call, and is correct"]
#[doc = " the first time in most cases. If not, JxlDecoderSizeHintBasicInfo can be"]
#[doc = " called again to get an updated hint."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @return the size hint in bytes if the basic info is not yet fully decoded."]
#[doc = " @return 0 when the basic info is already available."]
pub fn JxlDecoderSizeHintBasicInfo(dec: *const JxlDecoder) -> size_t;
}
extern "C" {
#[doc = " Select for which informative events (JXL_DEC_BASIC_INFO, etc...) the"]
#[doc = " decoder should return with a status. It is not required to subscribe to any"]
#[doc = " events, data can still be requested from the decoder as soon as it available."]
#[doc = " By default, the decoder is subscribed to no events (events_wanted == 0), and"]
#[doc = " the decoder will then only return when it cannot continue because it needs"]
#[doc = " more input data or more output buffer. This function may only be be called"]
#[doc = " before using JxlDecoderProcessInput"]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param events_wanted bitfield of desired events."]
#[doc = " @return JXL_DEC_SUCCESS if no error, JXL_DEC_ERROR otherwise."]
pub fn JxlDecoderSubscribeEvents(
dec: *mut JxlDecoder,
events_wanted: ::std::os::raw::c_int,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Enables or disables preserving of original orientation. Some images are"]
#[doc = " encoded with an orientation tag indicating the image is rotated and/or"]
#[doc = " mirrored (here called the original orientation)."]
#[doc = ""]
#[doc = " *) If keep_orientation is JXL_FALSE (the default): the decoder will perform"]
#[doc = " work to undo the transformation. This ensures the decoded pixels will not"]
#[doc = " be rotated or mirrored. The decoder will always set the orientation field"]
#[doc = " of the JxlBasicInfo to JXL_ORIENT_IDENTITY to match the returned pixel data."]
#[doc = " The decoder may also swap xsize and ysize in the JxlBasicInfo compared to the"]
#[doc = " values inside of the codestream, to correctly match the decoded pixel data,"]
#[doc = " e.g. when a 90 degree rotation was performed."]
#[doc = ""]
#[doc = " *) If this option is JXL_TRUE: then the image is returned as-is, which may be"]
#[doc = " rotated or mirrored, and the user must check the orientation field in"]
#[doc = " JxlBasicInfo after decoding to correctly interpret the decoded pixel data."]
#[doc = " This may be faster to decode since the decoder doesn't have to apply the"]
#[doc = " transformation, but can cause wrong display of the image if the orientation"]
#[doc = " tag is not correctly taken into account by the user."]
#[doc = ""]
#[doc = " By default, this option is disabled, and the decoder automatically corrects"]
#[doc = " the orientation."]
#[doc = ""]
#[doc = " @see JxlBasicInfo for the orientation field, and @see JxlOrientation for the"]
#[doc = " possible values."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param keep_orientation JXL_TRUE to enable, JXL_FALSE to disable."]
#[doc = " @return JXL_DEC_SUCCESS if no error, JXL_DEC_ERROR otherwise."]
pub fn JxlDecoderSetKeepOrientation(
dec: *mut JxlDecoder,
keep_orientation: ::std::os::raw::c_int,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Decodes JPEG XL file using the available bytes. @p *avail_in indicates how"]
#[doc = " many input bytes are available, and @p *next_in points to the input bytes."]
#[doc = " *avail_in will be decremented by the amount of bytes that have been processed"]
#[doc = " by the decoder and *next_in will be incremented by the same amount, so"]
#[doc = " *next_in will now point at the amount of *avail_in unprocessed bytes. For the"]
#[doc = " next call to this function, all unprocessed bytes must be provided again (the"]
#[doc = " address need not match, but the contents must), and more bytes may be"]
#[doc = " concatenated after the unprocessed bytes."]
#[doc = ""]
#[doc = " The returned status indicates whether the decoder needs more input bytes, or"]
#[doc = " more output buffer for a certain type of output data. No matter what the"]
#[doc = " returned status is (other than JXL_DEC_ERROR), new information, such as"]
#[doc = " JxlDecoderGetBasicInfo, may have become available after this call. When"]
#[doc = " the return value is not JXL_DEC_ERROR or JXL_DEC_SUCCESS, the decoding"]
#[doc = " requires more JxlDecoderProcessInput calls to continue."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param next_in pointer to next bytes to read from"]
#[doc = " @param avail_in amount of bytes available starting from *next_in"]
#[doc = " @return JXL_DEC_SUCCESS when decoding finished and all events handled."]
#[doc = " @return JXL_DEC_ERROR when decoding failed, e.g. invalid codestream."]
#[doc = " TODO(lode) document the input data mechanism"]
#[doc = " @return JXL_DEC_NEED_MORE_INPUT more input data is necessary."]
#[doc = " @return JXL_DEC_BASIC_INFO when basic info such as image dimensions is"]
#[doc = " available and this informative event is subscribed to."]
#[doc = " @return JXL_DEC_EXTENSIONS when JPEG XL codestream user extensions are"]
#[doc = " available and this informative event is subscribed to."]
#[doc = " @return JXL_DEC_COLOR_ENCODING when color profile information is"]
#[doc = " available and this informative event is subscribed to."]
#[doc = " @return JXL_DEC_PREVIEW_IMAGE when preview pixel information is available and"]
#[doc = " output in the preview buffer."]
#[doc = " @return JXL_DEC_DC_IMAGE when DC pixel information (8x8 downscaled version"]
#[doc = " of the image) is available and output in the DC buffer."]
#[doc = " @return JXL_DEC_FULL_IMAGE when all pixel information at highest detail is"]
#[doc = " available and has been output in the pixel buffer."]
pub fn JxlDecoderProcessInput(
dec: *mut JxlDecoder,
next_in: *mut *const u8,
avail_in: *mut size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs the basic image information, such as image dimensions, bit depth and"]
#[doc = " all other JxlBasicInfo fields, if available."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param info struct to copy the information into, or NULL to only check"]
#[doc = " whether the information is available through the return value."]
#[doc = " @return JXL_DEC_SUCCESS if the value is available,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if not yet available, JXL_DEC_ERROR in case"]
#[doc = " of other error conditions."]
pub fn JxlDecoderGetBasicInfo(
dec: *const JxlDecoder,
info: *mut JxlBasicInfo,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs information for extra channel at the given index. The index must be"]
#[doc = " smaller than num_extra_channels in the associated JxlBasicInfo."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param index index of the extra channel to query."]
#[doc = " @param info struct to copy the information into, or NULL to only check"]
#[doc = " whether the information is available through the return value."]
#[doc = " @return JXL_DEC_SUCCESS if the value is available,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if not yet available, JXL_DEC_ERROR in case"]
#[doc = " of other error conditions."]
pub fn JxlDecoderGetExtraChannelInfo(
dec: *const JxlDecoder,
index: size_t,
info: *mut JxlExtraChannelInfo,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs name for extra channel at the given index in UTF-8. The index must be"]
#[doc = " smaller than num_extra_channels in the associated JxlBasicInfo. The buffer"]
#[doc = " for name must have at least name_length + 1 bytes allocated, gotten from"]
#[doc = " the associated JxlExtraChannelInfo."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param index index of the extra channel to query."]
#[doc = " @param name buffer to copy the name into"]
#[doc = " @param size size of the name buffer in bytes"]
#[doc = " @return JXL_DEC_SUCCESS if the value is available,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if not yet available, JXL_DEC_ERROR in case"]
#[doc = " of other error conditions."]
pub fn JxlDecoderGetExtraChannelName(
dec: *const JxlDecoder,
index: size_t,
name: *mut ::std::os::raw::c_char,
size: size_t,
) -> JxlDecoderStatus;
}
#[doc = " Get the color profile of the original image from the metadata.."]
pub const JxlColorProfileTarget_JXL_COLOR_PROFILE_TARGET_ORIGINAL: JxlColorProfileTarget = 0;
#[doc = " Get the color profile of the pixel data the decoder outputs."]
pub const JxlColorProfileTarget_JXL_COLOR_PROFILE_TARGET_DATA: JxlColorProfileTarget = 1;
#[doc = " Defines which color profile to get: the profile from the codestream"]
#[doc = " metadata header, which represents the color profile of the original image,"]
#[doc = " or the color profile from the pixel data received by the decoder. Both are"]
#[doc = " the same if the basic has uses_original_profile set."]
pub type JxlColorProfileTarget = ::std::os::raw::c_uint;
extern "C" {
#[doc = " Outputs the color profile as JPEG XL encoded structured data, if available."]
#[doc = " This is an alternative to an ICC Profile, which can represent a more limited"]
#[doc = " amount of color spaces, but represents them exactly through enum values."]
#[doc = ""]
#[doc = " It is often possible to use JxlDecoderGetColorAsICCProfile as an"]
#[doc = " alternative anyway. The following scenarios are possible:"]
#[doc = " - The JPEG XL image has an attached ICC Profile, in that case, the encoded"]
#[doc = " structured data is not available, this function will return an error status"]
#[doc = " and you must use JxlDecoderGetColorAsICCProfile instead."]
#[doc = " - The JPEG XL image has an encoded structured color profile, and it"]
#[doc = " represents an RGB or grayscale color space. This function will return it."]
#[doc = " You can still use JxlDecoderGetColorAsICCProfile as well as an"]
#[doc = " alternative if desired, though depending on which RGB color space is"]
#[doc = " represented, the ICC profile may be a close approximation. It is also not"]
#[doc = " always feasible to deduce from an ICC profile which named color space it"]
#[doc = " exactly represents, if any, as it can represent any arbitrary space."]
#[doc = " - The JPEG XL image has an encoded structured color profile, and it indicates"]
#[doc = " an unknown or xyb color space. In that case,"]
#[doc = " JxlDecoderGetColorAsICCProfile is not available."]
#[doc = ""]
#[doc = " If you wish to render the image using a system that supports ICC profiles,"]
#[doc = " use JxlDecoderGetColorAsICCProfile first. If you're looking for a specific"]
#[doc = " color space possibly indicated in the JPEG XL image, use"]
#[doc = " JxlDecoderGetColorAsEncodedProfile first."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format pixel format to output the data to. Only used for"]
#[doc = " JXL_COLOR_PROFILE_TARGET_DATA, may be nullptr otherwise."]
#[doc = " @param target whether to get the original color profile from the metadata"]
#[doc = " or the color profile of the decoded pixels."]
#[doc = " @param color_encoding struct to copy the information into, or NULL to only"]
#[doc = " check whether the information is available through the return value."]
#[doc = " @return JXL_DEC_SUCCESS if the data is available and returned,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if not yet available, JXL_DEC_ERROR in case"]
#[doc = " the encuded structured color profile does not exist in the codestream."]
pub fn JxlDecoderGetColorAsEncodedProfile(
dec: *const JxlDecoder,
format: *const JxlPixelFormat,
target: JxlColorProfileTarget,
color_encoding: *mut JxlColorEncoding,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs the size in bytes of the ICC profile returned by"]
#[doc = " JxlDecoderGetColorAsICCProfile, if available, or indicates there is none"]
#[doc = " available. In most cases, the image will have an ICC profile available, but"]
#[doc = " if it does not, JxlDecoderGetColorAsEncodedProfile must be used instead."]
#[doc = " @see JxlDecoderGetColorAsEncodedProfile for more information. The ICC"]
#[doc = " profile is either the exact ICC profile attached to the codestream metadata,"]
#[doc = " or a close approximation generated from JPEG XL encoded structured data,"]
#[doc = " depending of what is encoded in the codestream."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format pixel format to output the data to. Only used for"]
#[doc = " JXL_COLOR_PROFILE_TARGET_DATA, may be nullptr otherwise."]
#[doc = " @param target whether to get the original color profile from the metadata"]
#[doc = " or the color profile of the decoded pixels."]
#[doc = " @param size variable to output the size into, or NULL to only check the"]
#[doc = " return status."]
#[doc = " @return JXL_DEC_SUCCESS if the ICC profile is available,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if the decoder has not yet received enough"]
#[doc = " input data to determine whether an ICC profile is available or what its"]
#[doc = " size is, JXL_DEC_ERROR in case the ICC profile is not available and"]
#[doc = " cannot be generated."]
pub fn JxlDecoderGetICCProfileSize(
dec: *const JxlDecoder,
format: *const JxlPixelFormat,
target: JxlColorProfileTarget,
size: *mut size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs ICC profile if available. The profile is only available if"]
#[doc = " JxlDecoderGetICCProfileSize returns success. The output buffer must have"]
#[doc = " at least as many bytes as given by JxlDecoderGetICCProfileSize."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format pixel format to output the data to. Only used for"]
#[doc = " JXL_COLOR_PROFILE_TARGET_DATA, may be nullptr otherwise."]
#[doc = " @param target whether to get the original color profile from the metadata"]
#[doc = " or the color profile of the decoded pixels."]
#[doc = " @param icc_profile buffer to copy the ICC profile into"]
#[doc = " @param size size of the icc_profile buffer in bytes"]
#[doc = " @return JXL_DEC_SUCCESS if the profile was successfully returned is"]
#[doc = " available, JXL_DEC_NEED_MORE_INPUT if not yet available,"]
#[doc = " JXL_DEC_ERROR if the profile doesn't exist or the output size is not"]
#[doc = " large enough."]
pub fn JxlDecoderGetColorAsICCProfile(
dec: *const JxlDecoder,
format: *const JxlPixelFormat,
target: JxlColorProfileTarget,
icc_profile: *mut u8,
size: size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Returns the minimum size in bytes of the preview image output pixel buffer"]
#[doc = " for the given format. This is the buffer for JxlDecoderSetPreviewOutBuffer."]
#[doc = " Requires the preview header information is available in the decoder."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format format of pixels"]
#[doc = " @param size output value, buffer size in bytes"]
#[doc = " @return JXL_DEC_SUCCESS on success, JXL_DEC_ERROR on error, such as"]
#[doc = " information not available yet."]
pub fn JxlDecoderPreviewOutBufferSize(
dec: *const JxlDecoder,
format: *const JxlPixelFormat,
size: *mut size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Sets the buffer to write the small resolution preview image"]
#[doc = " to. The size of the buffer must be at least as large as given by"]
#[doc = " JxlDecoderPreviewOutBufferSize. The buffer follows the format described by"]
#[doc = " JxlPixelFormat. The preview image dimensions are given by the"]
#[doc = " JxlPreviewHeader. The buffer is owned by the caller."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format format of pixels. Object owned by user and its contents are"]
#[doc = " copied internally."]
#[doc = " @param buffer buffer type to output the pixel data to"]
#[doc = " @param size size of buffer in bytes"]
#[doc = " @return JXL_DEC_SUCCESS on success, JXL_DEC_ERROR on error, such as"]
#[doc = " size too small."]
pub fn JxlDecoderSetPreviewOutBuffer(
dec: *mut JxlDecoder,
format: *const JxlPixelFormat,
buffer: *mut ::std::os::raw::c_void,
size: size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs the information from the frame, such as duration when have_animagion."]
#[doc = " This function can be called when JXL_DEC_FRAME occurred for the current"]
#[doc = " frame, even when have_animation in the JxlBasicInfo is JXL_FALSE."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param header struct to copy the information into, or NULL to only check"]
#[doc = " whether the information is available through the return value."]
#[doc = " @return JXL_DEC_SUCCESS if the value is available,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if not yet available, JXL_DEC_ERROR in case"]
#[doc = " of other error conditions."]
pub fn JxlDecoderGetFrameHeader(
dec: *const JxlDecoder,
header: *mut JxlFrameHeader,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Outputs name for the current frame. The buffer"]
#[doc = " for name must have at least name_length + 1 bytes allocated, gotten from"]
#[doc = " the associated JxlFrameHeader."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param name buffer to copy the name into"]
#[doc = " @param size size of the name buffer in bytes, includig zero termination"]
#[doc = " character, so this must be at least JxlFrameHeader.name_length + 1."]
#[doc = " @return JXL_DEC_SUCCESS if the value is available,"]
#[doc = " JXL_DEC_NEED_MORE_INPUT if not yet available, JXL_DEC_ERROR in case"]
#[doc = " of other error conditions."]
pub fn JxlDecoderGetFrameName(
dec: *const JxlDecoder,
name: *mut ::std::os::raw::c_char,
size: size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Returns the minimum size in bytes of the DC image output buffer"]
#[doc = " for the given format. This is the buffer for JxlDecoderSetDCOutBuffer."]
#[doc = " Requires the basic image information is available in the decoder."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format format of pixels"]
#[doc = " @param size output value, buffer size in bytes"]
#[doc = " @return JXL_DEC_SUCCESS on success, JXL_DEC_ERROR on error, such as"]
#[doc = " information not available yet."]
pub fn JxlDecoderDCOutBufferSize(
dec: *const JxlDecoder,
format: *const JxlPixelFormat,
size: *mut size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Sets the buffer to write the lower resolution (8x8 sub-sampled) DC image"]
#[doc = " to. The size of the buffer must be at least as large as given by"]
#[doc = " JxlDecoderDCOutBufferSize. The buffer follows the format described by"]
#[doc = " JxlPixelFormat. The DC image has dimensions ceil(sizex / 8) * ceil(sizey /"]
#[doc = " 8). The buffer is owned by the caller."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format format of pixels. Object owned by user and its contents are"]
#[doc = " copied internally."]
#[doc = " @param buffer buffer type to output the pixel data to"]
#[doc = " @param size size of buffer in bytes"]
#[doc = " @return JXL_DEC_SUCCESS on success, JXL_DEC_ERROR on error, such as"]
#[doc = " size too small."]
pub fn JxlDecoderSetDCOutBuffer(
dec: *mut JxlDecoder,
format: *const JxlPixelFormat,
buffer: *mut ::std::os::raw::c_void,
size: size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Returns the minimum size in bytes of the image output pixel buffer for the"]
#[doc = " given format. This is the buffer for JxlDecoderSetImageOutBuffer. Requires"]
#[doc = " the basic image information is available in the decoder."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format format of pixelsformat of pixels."]
#[doc = " @param size output value, buffer size in bytes"]
#[doc = " @return JXL_DEC_SUCCESS on success, JXL_DEC_ERROR on error, such as"]
#[doc = " information not available yet."]
pub fn JxlDecoderImageOutBufferSize(
dec: *const JxlDecoder,
format: *const JxlPixelFormat,
size: *mut size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Sets the buffer to write the full resolution image to. The size of the"]
#[doc = " buffer must be at least as large as given by JxlDecoderImageOutBufferSize."]
#[doc = " The buffer follows the format described by JxlPixelFormat. The buffer is"]
#[doc = " owned by the caller."]
#[doc = ""]
#[doc = " @param dec decoder object"]
#[doc = " @param format format of pixelsformat of pixels. Object owned by user and its"]
#[doc = " contents are copied internally."]
#[doc = " @param buffer buffer type to output the pixel data to"]
#[doc = " @param size size of buffer in bytes"]
#[doc = " @return JXL_DEC_SUCCESS on success, JXL_DEC_ERROR on error, such as"]
#[doc = " size too small."]
pub fn JxlDecoderSetImageOutBuffer(
dec: *mut JxlDecoder,
format: *const JxlPixelFormat,
buffer: *mut ::std::os::raw::c_void,
size: size_t,
) -> JxlDecoderStatus;
}
extern "C" {
#[doc = " Encoder library version."]
#[doc = ""]
#[doc = " @return the encoder library version as an integer:"]
#[doc = " MAJOR_VERSION * 1000000 + MINOR_VERSION * 1000 + PATCH_VERSION. For example,"]
#[doc = " version 1.2.3 would return 1002003."]
pub fn JxlEncoderVersion() -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlEncoderStruct {
_unused: [u8; 0],
}
#[doc = " Opaque structure that holds the JPEG XL encoder."]
#[doc = ""]
#[doc = " Allocated and initialized with JxlEncoderCreate()."]
#[doc = " Cleaned up and deallocated with JxlEncoderDestroy()."]
pub type JxlEncoder = JxlEncoderStruct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JxlEncoderOptionsStruct {
_unused: [u8; 0],
}
#[doc = " Opaque structure that holds encoding options for a JPEG XL encoder."]
#[doc = ""]
#[doc = " Allocated and initialized with JxlEncoderOptionsCreate()."]
#[doc = " Cleaned up and deallocated when the encoder is destroyed with"]
#[doc = " JxlEncoderDestroy()."]
pub type JxlEncoderOptions = JxlEncoderOptionsStruct;
#[doc = " Function call finished successfully, or encoding is finished and there is"]
#[doc = " nothing more to be done."]
pub const JxlEncoderStatus_JXL_ENC_SUCCESS: JxlEncoderStatus = 0;
#[doc = " An error occurred, for example out of memory."]
pub const JxlEncoderStatus_JXL_ENC_ERROR: JxlEncoderStatus = 1;
#[doc = " The encoder needs more output buffer to continue encoding."]
pub const JxlEncoderStatus_JXL_ENC_NEED_MORE_OUTPUT: JxlEncoderStatus = 2;
#[doc = " Return value for multiple encoder functions."]
pub type JxlEncoderStatus = ::std::os::raw::c_uint;
extern "C" {
#[doc = " Creates an instance of JxlEncoder and initializes it."]
#[doc = ""]
#[doc = " @p memory_manager will be used for all the library dynamic allocations made"]
#[doc = " from this instance. The parameter may be NULL, in which case the default"]
#[doc = " allocator will be used. See jpegxl/memory_manager.h for details."]
#[doc = ""]
#[doc = " @param memory_manager custom allocator function. It may be NULL. The memory"]
#[doc = " manager will be copied internally."]
#[doc = " @return @c NULL if the instance can not be allocated or initialized"]
#[doc = " @return pointer to initialized JxlEncoder otherwise"]
pub fn JxlEncoderCreate(memory_manager: *const JxlMemoryManager) -> *mut JxlEncoder;
}
extern "C" {
#[doc = " Deinitializes and frees JxlEncoder instance."]
#[doc = ""]
#[doc = " @param enc instance to be cleaned up and deallocated."]
pub fn JxlEncoderDestroy(enc: *mut JxlEncoder);
}
extern "C" {
#[doc = " Set the parallel runner for multithreading. May only be set before starting"]
#[doc = " encoding."]
#[doc = ""]
#[doc = " @param enc encoder object"]
#[doc = " @param parallel_runner function pointer to runner for multithreading. It may"]
#[doc = " be NULL to use the default, single-threaded, runner. A multithreaded"]
#[doc = " runner should be set to reach fast performance."]
#[doc = " @param parallel_runner_opaque opaque pointer for parallel_runner."]
#[doc = " @return JXL_ENC_SUCCESS if the runner was set, JXL_ENC_ERROR"]
#[doc = " otherwise (the previous runner remains set)."]
pub fn JxlEncoderSetParallelRunner(
enc: *mut JxlEncoder,
parallel_runner: JxlParallelRunner,
parallel_runner_opaque: *mut ::std::os::raw::c_void,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Encodes JPEG XL file using the available bytes. @p *avail_out indicates how"]
#[doc = " many output bytes are available, and @p *next_out points to the input bytes."]
#[doc = " *avail_out will be decremented by the amount of bytes that have been"]
#[doc = " processed by the encoder and *next_out will be incremented by the same"]
#[doc = " amount, so *next_out will now point at the amount of *avail_out unprocessed"]
#[doc = " bytes."]
#[doc = ""]
#[doc = " The returned status indicates whether the encoder needs more output bytes."]
#[doc = " When the return value is not JXL_ENC_ERROR or JXL_ENC_SUCCESS, the encoding"]
#[doc = " requires more JxlEncoderProcessOutput calls to continue."]
#[doc = ""]
#[doc = " @param enc encoder object"]
#[doc = " @param next_out pointer to next bytes to write to"]
#[doc = " @param avail_out amount of bytes available starting from *next_out"]
#[doc = " @return JXL_ENC_SUCCESS when encoding finished and all events handled."]
#[doc = " @return JXL_ENC_ERROR when encoding failed, e.g. invalid input."]
#[doc = " @return JXL_ENC_NEED_MORE_OUTPUT more output buffer is necessary."]
pub fn JxlEncoderProcessOutput(
enc: *mut JxlEncoder,
next_out: *mut *mut u8,
avail_out: *mut size_t,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Sets the buffer to read from for the next image to encode."]
#[doc = " The buffer is owned by the caller."]
#[doc = ""]
#[doc = " Currently only some pixel formats are supported:"]
#[doc = " - JXL_TYPE_UINT8, input pixels assumed to be nonlinear SRGB encoded"]
#[doc = " - JXL_TYPE_UINT16, input pixels assumed to be nonlinear SRGB encoded"]
#[doc = " - JXL_TYPE_FLOAT, input pixels are assumed to be linear SRGB encoded"]
#[doc = ""]
#[doc = " @param options set of encoder options to use when encoding the frame"]
#[doc = " @param pixel_format format for pixels. Object owned by user and its"]
#[doc = " contents are copied internally."]
#[doc = " @param buffer buffer type to input the pixel data from"]
#[doc = " @param size size of buffer in bytes"]
#[doc = " @return JXL_ENC_SUCCESS on success, JXL_ENC_ERROR on error"]
pub fn JxlEncoderAddImageFrame(
options: *mut JxlEncoderOptions,
pixel_format: *const JxlPixelFormat,
buffer: *mut ::std::os::raw::c_void,
size: size_t,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Declares that this encoder will not encode anything further."]
#[doc = ""]
#[doc = " Must be called between JxlEncoderAddImageFrame of the last frame and the next"]
#[doc = " call to JxlEncoderProcessOutput, or JxlEncoderProcessOutput won't output the"]
#[doc = " last frame correctly."]
#[doc = ""]
#[doc = " @param enc encoder object"]
pub fn JxlEncoderCloseInput(enc: *mut JxlEncoder);
}
extern "C" {
#[doc = " Sets the dimensions of the image encoded by this encoder."]
#[doc = ""]
#[doc = " @param enc encoder object"]
#[doc = " @param xsize width of image"]
#[doc = " @param ysize height of image"]
#[doc = " @return JXL_ENC_SUCCESS if the dimensions are within jxl spec limitations,"]
#[doc = " JXL_ENC_ERROR otherwise"]
pub fn JxlEncoderSetDimensions(
enc: *mut JxlEncoder,
xsize: size_t,
ysize: size_t,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Sets lossless/lossy mode for the provided options. Default is lossy."]
#[doc = ""]
#[doc = " @param options set of encoder options to update with the new mode"]
#[doc = " @param lossless whether the options should be lossless"]
pub fn JxlEncoderOptionsSetLossless(
options: *mut JxlEncoderOptions,
lossless: ::std::os::raw::c_int,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Sets encoder effort/speed level. Valid values are, from faster to slower"]
#[doc = " speed:"]
#[doc = " 3:falcon 4:cheetah 5:hare 6:wombat 7:squirrel 8:kitten 9:tortoise"]
#[doc = " Default: squirrel (7)."]
#[doc = ""]
#[doc = " @param options set of encoder options to update with the new mode"]
#[doc = " @param effort the effort value to set"]
pub fn JxlEncoderOptionsSetEffort(
options: *mut JxlEncoderOptions,
effort: ::std::os::raw::c_int,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Sets the distance level for lossy compression: target max butteraugli"]
#[doc = " distance, lower = higher quality. Range: 0 .. 15."]
#[doc = " 0.0 = mathematically lossless (however, use JxlEncoderOptionsSetLossless to"]
#[doc = " use true lossless)."]
#[doc = " 1.0 = visually lossless."]
#[doc = " Recommended range: 0.5 .. 3.0."]
#[doc = " Default value: 1.0."]
#[doc = " If JxlEncoderOptionsSetLossless is used, this value is unused and implied"]
#[doc = " to be 0."]
#[doc = ""]
#[doc = " @param options set of encoder options to update with the new mode"]
#[doc = " @param distance the distance value to set"]
pub fn JxlEncoderOptionsSetDistance(
options: *mut JxlEncoderOptions,
distance: f32,
) -> JxlEncoderStatus;
}
extern "C" {
#[doc = " Create a new set of encoder options, with all values initially copied from"]
#[doc = " the source options, or set to default."]
#[doc = ""]
#[doc = " @param enc encoder object"]
#[doc = " @param source source options to copy initial values from, or NULL to get"]
#[doc = " defaults initialized to defaults"]
pub fn JxlEncoderOptionsCreate(
enc: *mut JxlEncoder,
source: *const JxlEncoderOptions,
) -> *mut JxlEncoderOptions;
}
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __mbstate_t {
pub __count: ::std::os::raw::c_int,
pub __value: __mbstate_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __mbstate_t__bindgen_ty_1 {
pub __wch: ::std::os::raw::c_uint,
pub __wchb: [::std::os::raw::c_char; 4usize],
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout___mbstate_t__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::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 {
&(*(::std::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!(
::std::mem::size_of::<__mbstate_t>(),
8usize,
concat!("Size of: ", stringify!(__mbstate_t))
);
assert_eq!(
::std::mem::align_of::<__mbstate_t>(),
4usize,
concat!("Alignment of ", stringify!(__mbstate_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__value as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__value)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos_t {
pub __pos: __off_t,
pub __state: __mbstate_t,
}
#[test]
fn bindgen_test_layout__G_fpos_t() {
assert_eq!(
::std::mem::size_of::<_G_fpos_t>(),
16usize,
concat!("Size of: ", stringify!(_G_fpos_t))
);
assert_eq!(
::std::mem::align_of::<_G_fpos_t>(),
8usize,
concat!("Alignment of ", stringify!(_G_fpos_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_G_fpos_t>())).__pos as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos_t),
"::",
stringify!(__pos)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_G_fpos_t>())).__state as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos_t),
"::",
stringify!(__state)
)
);
}
pub type __fpos_t = _G_fpos_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos64_t {
pub __pos: __off64_t,
pub __state: __mbstate_t,
}
#[test]
fn bindgen_test_layout__G_fpos64_t() {
assert_eq!(
::std::mem::size_of::<_G_fpos64_t>(),
16usize,
concat!("Size of: ", stringify!(_G_fpos64_t))
);
assert_eq!(
::std::mem::align_of::<_G_fpos64_t>(),
8usize,
concat!("Alignment of ", stringify!(_G_fpos64_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_G_fpos64_t>())).__pos as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos64_t),
"::",
stringify!(__pos)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_G_fpos64_t>())).__state as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos64_t),
"::",
stringify!(__state)
)
);
}
pub type __fpos64_t = _G_fpos64_t;
pub type __FILE = _IO_FILE;
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: ::std::os::raw::c_int,
pub _IO_read_ptr: *mut ::std::os::raw::c_char,
pub _IO_read_end: *mut ::std::os::raw::c_char,
pub _IO_read_base: *mut ::std::os::raw::c_char,
pub _IO_write_base: *mut ::std::os::raw::c_char,
pub _IO_write_ptr: *mut ::std::os::raw::c_char,
pub _IO_write_end: *mut ::std::os::raw::c_char,
pub _IO_buf_base: *mut ::std::os::raw::c_char,
pub _IO_buf_end: *mut ::std::os::raw::c_char,
pub _IO_save_base: *mut ::std::os::raw::c_char,
pub _IO_backup_base: *mut ::std::os::raw::c_char,
pub _IO_save_end: *mut ::std::os::raw::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: ::std::os::raw::c_int,
pub _flags2: ::std::os::raw::c_int,
pub _old_offset: __off_t,
pub _cur_column: ::std::os::raw::c_ushort,
pub _vtable_offset: ::std::os::raw::c_schar,
pub _shortbuf: [::std::os::raw::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut ::std::os::raw::c_void,
pub __pad5: size_t,
pub _mode: ::std::os::raw::c_int,
pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
assert_eq!(
::std::mem::size_of::<_IO_FILE>(),
216usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::std::mem::align_of::<_IO_FILE>(),
8usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
130usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
131usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_unused2)
)
);
}
pub type off_t = __off_t;
pub type ssize_t = __ssize_t;
pub type fpos_t = __fpos_t;
extern "C" {
pub static mut stdin: *mut FILE;
}
extern "C" {
pub static mut stdout: *mut FILE;
}
extern "C" {
pub static mut stderr: *mut FILE;
}
extern "C" {
pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rename(
__old: *const ::std::os::raw::c_char,
__new: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn renameat(
__oldfd: ::std::os::raw::c_int,
__old: *const ::std::os::raw::c_char,
__newfd: ::std::os::raw::c_int,
__new: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn tmpfile() -> *mut FILE;
}
extern "C" {
pub fn tmpnam(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn tempnam(
__dir: *const ::std::os::raw::c_char,
__pfx: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fopen(
__filename: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
extern "C" {
pub fn freopen(
__filename: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
__stream: *mut FILE,
) -> *mut FILE;
}
extern "C" {
pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char)
-> *mut FILE;
}
extern "C" {
pub fn fmemopen(
__s: *mut ::std::os::raw::c_void,
__len: size_t,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
extern "C" {
pub fn open_memstream(
__bufloc: *mut *mut ::std::os::raw::c_char,
__sizeloc: *mut size_t,
) -> *mut FILE;
}
extern "C" {
pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char);
}
extern "C" {
pub fn setvbuf(
__stream: *mut FILE,
__buf: *mut ::std::os::raw::c_char,
__modes: ::std::os::raw::c_int,
__n: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: size_t);
}
extern "C" {
pub fn setlinebuf(__stream: *mut FILE);
}
extern "C" {
pub fn fprintf(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sprintf(
__s: *mut ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vfprintf(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vprintf(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vsprintf(
__s: *mut ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn snprintf(
__s: *mut ::std::os::raw::c_char,
__maxlen: ::std::os::raw::c_ulong,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vsnprintf(
__s: *mut ::std::os::raw::c_char,
__maxlen: ::std::os::raw::c_ulong,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vdprintf(
__fd: ::std::os::raw::c_int,
__fmt: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn dprintf(
__fd: ::std::os::raw::c_int,
__fmt: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fscanf(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sscanf(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_fscanf"]
pub fn fscanf1(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_scanf"]
pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_sscanf"]
pub fn sscanf1(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vfscanf(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vscanf(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vsscanf(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vfscanf"]
pub fn vfscanf1(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vscanf"]
pub fn vscanf1(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vsscanf"]
pub fn vsscanf1(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getchar() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getchar_unlocked() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fgets(
__s: *mut ::std::os::raw::c_char,
__n: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn __getdelim(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut size_t,
__delimiter: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn getdelim(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut size_t,
__delimiter: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn getline(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut size_t,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fread(
__ptr: *mut ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
__n: ::std::os::raw::c_ulong,
__stream: *mut FILE,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn fwrite(
__ptr: *const ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
__n: ::std::os::raw::c_ulong,
__s: *mut FILE,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn fread_unlocked(
__ptr: *mut ::std::os::raw::c_void,
__size: size_t,
__n: size_t,
__stream: *mut FILE,
) -> size_t;
}
extern "C" {
pub fn fwrite_unlocked(
__ptr: *const ::std::os::raw::c_void,
__size: size_t,
__n: size_t,
__stream: *mut FILE,
) -> size_t;
}
extern "C" {
pub fn fseek(
__stream: *mut FILE,
__off: ::std::os::raw::c_long,
__whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn rewind(__stream: *mut FILE);
}
extern "C" {
pub fn fseeko(
__stream: *mut FILE,
__off: __off_t,
__whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ftello(__stream: *mut FILE) -> __off_t;
}
extern "C" {
pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn clearerr(__stream: *mut FILE);
}
extern "C" {
pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn clearerr_unlocked(__stream: *mut FILE);
}
extern "C" {
pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perror(__s: *const ::std::os::raw::c_char);
}
extern "C" {
pub static mut sys_nerr: ::std::os::raw::c_int;
}
extern "C" {
pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize];
}
extern "C" {
pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn popen(
__command: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
extern "C" {
pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn flockfile(__stream: *mut FILE);
}
extern "C" {
pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn funlockfile(__stream: *mut FILE);
}
extern "C" {
pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
pub const idtype_t_P_ALL: idtype_t = 0;
pub const idtype_t_P_PID: idtype_t = 1;
pub const idtype_t_P_PGID: idtype_t = 2;
pub type idtype_t = ::std::os::raw::c_uint;
pub type _Float32 = f32;
pub type _Float64 = f64;
pub type _Float32x = f64;
pub type _Float64x = u128;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct div_t {
pub quot: ::std::os::raw::c_int,
pub rem: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_div_t() {
assert_eq!(
::std::mem::size_of::<div_t>(),
8usize,
concat!("Size of: ", stringify!(div_t))
);
assert_eq!(
::std::mem::align_of::<div_t>(),
4usize,
concat!("Alignment of ", stringify!(div_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<div_t>())).quot as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(div_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<div_t>())).rem as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(div_t),
"::",
stringify!(rem)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ldiv_t {
pub quot: ::std::os::raw::c_long,
pub rem: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_ldiv_t() {
assert_eq!(
::std::mem::size_of::<ldiv_t>(),
16usize,
concat!("Size of: ", stringify!(ldiv_t))
);
assert_eq!(
::std::mem::align_of::<ldiv_t>(),
8usize,
concat!("Alignment of ", stringify!(ldiv_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<ldiv_t>())).quot as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ldiv_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<ldiv_t>())).rem as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ldiv_t),
"::",
stringify!(rem)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lldiv_t {
pub quot: ::std::os::raw::c_longlong,
pub rem: ::std::os::raw::c_longlong,
}
#[test]
fn bindgen_test_layout_lldiv_t() {
assert_eq!(
::std::mem::size_of::<lldiv_t>(),
16usize,
concat!("Size of: ", stringify!(lldiv_t))
);
assert_eq!(
::std::mem::align_of::<lldiv_t>(),
8usize,
concat!("Alignment of ", stringify!(lldiv_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<lldiv_t>())).quot as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(lldiv_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<lldiv_t>())).rem as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(lldiv_t),
"::",
stringify!(rem)
)
);
}
extern "C" {
pub fn __ctype_get_mb_cur_max() -> size_t;
}
extern "C" {
pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
}
extern "C" {
pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn strtod(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
) -> f64;
}
extern "C" {
pub fn strtof(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
) -> f32;
}
extern "C" {
pub fn strtol(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn strtoul(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn strtoq(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn strtouq(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn strtoll(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn strtoull(
__nptr: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
}
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type u_long = __u_long;
pub type quad_t = __quad_t;
pub type u_quad_t = __u_quad_t;
pub type fsid_t = __fsid_t;
pub type loff_t = __loff_t;
pub type ino_t = __ino_t;
pub type dev_t = __dev_t;
pub type gid_t = __gid_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type uid_t = __uid_t;
pub type pid_t = __pid_t;
pub type id_t = __id_t;
pub type daddr_t = __daddr_t;
pub type caddr_t = __caddr_t;
pub type key_t = __key_t;
pub type clock_t = __clock_t;
pub type clockid_t = __clockid_t;
pub type time_t = __time_t;
pub type timer_t = __timer_t;
pub type ulong = ::std::os::raw::c_ulong;
pub type ushort = ::std::os::raw::c_ushort;
pub type uint = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
pub __val: [::std::os::raw::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___sigset_t() {
assert_eq!(
::std::mem::size_of::<__sigset_t>(),
128usize,
concat!("Size of: ", stringify!(__sigset_t))
);
assert_eq!(
::std::mem::align_of::<__sigset_t>(),
8usize,
concat!("Alignment of ", stringify!(__sigset_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigset_t),
"::",
stringify!(__val)
)
);
}
pub type sigset_t = __sigset_t;
#[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!(
::std::mem::size_of::<timeval>(),
16usize,
concat!("Size of: ", stringify!(timeval))
);
assert_eq!(
::std::mem::align_of::<timeval>(),
8usize,
concat!("Alignment of ", stringify!(timeval))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<timeval>())).tv_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { &(*(::std::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: __syscall_slong_t,
}
#[test]
fn bindgen_test_layout_timespec() {
assert_eq!(
::std::mem::size_of::<timespec>(),
16usize,
concat!("Size of: ", stringify!(timespec))
);
assert_eq!(
::std::mem::align_of::<timespec>(),
8usize,
concat!("Alignment of ", stringify!(timespec))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<timespec>())).tv_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<timespec>())).tv_nsec as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_nsec)
)
);
}
pub type suseconds_t = __suseconds_t;
pub type __fd_mask = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
pub __fds_bits: [__fd_mask; 16usize],
}
#[test]
fn bindgen_test_layout_fd_set() {
assert_eq!(
::std::mem::size_of::<fd_set>(),
128usize,
concat!("Size of: ", stringify!(fd_set))
);
assert_eq!(
::std::mem::align_of::<fd_set>(),
8usize,
concat!("Alignment of ", stringify!(fd_set))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fd_set>())).__fds_bits as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fd_set),
"::",
stringify!(__fds_bits)
)
);
}
pub type fd_mask = __fd_mask;
extern "C" {
pub fn select(
__nfds: ::std::os::raw::c_int,
__readfds: *mut fd_set,
__writefds: *mut fd_set,
__exceptfds: *mut fd_set,
__timeout: *mut timeval,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pselect(
__nfds: ::std::os::raw::c_int,
__readfds: *mut fd_set,
__writefds: *mut fd_set,
__exceptfds: *mut fd_set,
__timeout: *const timespec,
__sigmask: *const __sigset_t,
) -> ::std::os::raw::c_int;
}
pub type blksize_t = __blksize_t;
pub type blkcnt_t = __blkcnt_t;
pub type fsblkcnt_t = __fsblkcnt_t;
pub type fsfilcnt_t = __fsfilcnt_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
pub __prev: *mut __pthread_internal_list,
pub __next: *mut __pthread_internal_list,
}
#[test]
fn bindgen_test_layout___pthread_internal_list() {
assert_eq!(
::std::mem::size_of::<__pthread_internal_list>(),
16usize,
concat!("Size of: ", stringify!(__pthread_internal_list))
);
assert_eq!(
::std::mem::align_of::<__pthread_internal_list>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_list))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__prev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__next)
)
);
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_slist {
pub __next: *mut __pthread_internal_slist,
}
#[test]
fn bindgen_test_layout___pthread_internal_slist() {
assert_eq!(
::std::mem::size_of::<__pthread_internal_slist>(),
8usize,
concat!("Size of: ", stringify!(__pthread_internal_slist))
);
assert_eq!(
::std::mem::align_of::<__pthread_internal_slist>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_slist))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_internal_slist>())).__next as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_slist),
"::",
stringify!(__next)
)
);
}
pub type __pthread_slist_t = __pthread_internal_slist;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
pub __lock: ::std::os::raw::c_int,
pub __count: ::std::os::raw::c_uint,
pub __owner: ::std::os::raw::c_int,
pub __nusers: ::std::os::raw::c_uint,
pub __kind: ::std::os::raw::c_int,
pub __spins: ::std::os::raw::c_short,
pub __elision: ::std::os::raw::c_short,
pub __list: __pthread_list_t,
}
#[test]
fn bindgen_test_layout___pthread_mutex_s() {
assert_eq!(
::std::mem::size_of::<__pthread_mutex_s>(),
40usize,
concat!("Size of: ", stringify!(__pthread_mutex_s))
);
assert_eq!(
::std::mem::align_of::<__pthread_mutex_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_mutex_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__lock as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__count as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__owner as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__owner)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__nusers as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__nusers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__kind as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__kind)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__spins as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__spins)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__elision as *const _ as usize },
22usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__elision)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__list as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__list)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
pub __readers: ::std::os::raw::c_uint,
pub __writers: ::std::os::raw::c_uint,
pub __wrphase_futex: ::std::os::raw::c_uint,
pub __writers_futex: ::std::os::raw::c_uint,
pub __pad3: ::std::os::raw::c_uint,
pub __pad4: ::std::os::raw::c_uint,
pub __cur_writer: ::std::os::raw::c_int,
pub __shared: ::std::os::raw::c_int,
pub __rwelision: ::std::os::raw::c_schar,
pub __pad1: [::std::os::raw::c_uchar; 7usize],
pub __pad2: ::std::os::raw::c_ulong,
pub __flags: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_rwlock_arch_t() {
assert_eq!(
::std::mem::size_of::<__pthread_rwlock_arch_t>(),
56usize,
concat!("Size of: ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
::std::mem::align_of::<__pthread_rwlock_arch_t>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__readers as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__readers)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__wrphase_futex as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__wrphase_futex)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers_futex as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers_futex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad3 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad3)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad4 as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__cur_writer as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__cur_writer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__shared as *const _ as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__shared)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__rwelision as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__rwelision)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad1 as *const _ as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad2 as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__flags as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__flags)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1,
pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2,
pub __g_refs: [::std::os::raw::c_uint; 2usize],
pub __g_size: [::std::os::raw::c_uint; 2usize],
pub __g1_orig_size: ::std::os::raw::c_uint,
pub __wrefs: ::std::os::raw::c_uint,
pub __g_signals: [::std::os::raw::c_uint; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __pthread_cond_s__bindgen_ty_1 {
pub __wseq: ::std::os::raw::c_ulonglong,
pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__low
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(__low)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__high
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(__high)
)
);
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1),
"::",
stringify!(__wseq)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq32 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1),
"::",
stringify!(__wseq32)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __pthread_cond_s__bindgen_ty_2 {
pub __g1_start: ::std::os::raw::c_ulonglong,
pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__low
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(__low)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__high
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(__high)
)
);
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_2))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2),
"::",
stringify!(__g1_start)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start32 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2),
"::",
stringify!(__g1_start32)
)
);
}
#[test]
fn bindgen_test_layout___pthread_cond_s() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s>(),
48usize,
concat!("Size of: ", stringify!(__pthread_cond_s))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_refs as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_size as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g1_orig_size as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g1_orig_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__wrefs as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__wrefs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_signals as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_signals)
)
);
}
pub type pthread_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutexattr_t {
pub __size: [::std::os::raw::c_char; 4usize],
pub __align: ::std::os::raw::c_int,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_pthread_mutexattr_t() {
assert_eq!(
::std::mem::size_of::<pthread_mutexattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_mutexattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_mutexattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_mutexattr_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutexattr_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutexattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutexattr_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutexattr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_condattr_t {
pub __size: [::std::os::raw::c_char; 4usize],
pub __align: ::std::os::raw::c_int,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_pthread_condattr_t() {
assert_eq!(
::std::mem::size_of::<pthread_condattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_condattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_condattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_condattr_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_condattr_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_condattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_condattr_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_condattr_t),
"::",
stringify!(__align)
)
);
}
pub type pthread_key_t = ::std::os::raw::c_uint;
pub type pthread_once_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_attr_t {
pub __size: [::std::os::raw::c_char; 56usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 7usize],
}
#[test]
fn bindgen_test_layout_pthread_attr_t() {
assert_eq!(
::std::mem::size_of::<pthread_attr_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_attr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_attr_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_attr_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_attr_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_attr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_attr_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_attr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
pub __data: __pthread_mutex_s,
pub __size: [::std::os::raw::c_char; 40usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 5usize],
}
#[test]
fn bindgen_test_layout_pthread_mutex_t() {
assert_eq!(
::std::mem::size_of::<pthread_mutex_t>(),
40usize,
concat!("Size of: ", stringify!(pthread_mutex_t))
);
assert_eq!(
::std::mem::align_of::<pthread_mutex_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_mutex_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
pub __data: __pthread_cond_s,
pub __size: [::std::os::raw::c_char; 48usize],
pub __align: ::std::os::raw::c_longlong,
_bindgen_union_align: [u64; 6usize],
}
#[test]
fn bindgen_test_layout_pthread_cond_t() {
assert_eq!(
::std::mem::size_of::<pthread_cond_t>(),
48usize,
concat!("Size of: ", stringify!(pthread_cond_t))
);
assert_eq!(
::std::mem::align_of::<pthread_cond_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_cond_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
pub __data: __pthread_rwlock_arch_t,
pub __size: [::std::os::raw::c_char; 56usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 7usize],
}
#[test]
fn bindgen_test_layout_pthread_rwlock_t() {
assert_eq!(
::std::mem::size_of::<pthread_rwlock_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_rwlock_t))
);
assert_eq!(
::std::mem::align_of::<pthread_rwlock_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlock_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlock_t>())).__data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlock_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlock_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlockattr_t {
pub __size: [::std::os::raw::c_char; 8usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_pthread_rwlockattr_t() {
assert_eq!(
::std::mem::size_of::<pthread_rwlockattr_t>(),
8usize,
concat!("Size of: ", stringify!(pthread_rwlockattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_rwlockattr_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlockattr_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlockattr_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlockattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlockattr_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlockattr_t),
"::",
stringify!(__align)
)
);
}
pub type pthread_spinlock_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
pub __size: [::std::os::raw::c_char; 32usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_pthread_barrier_t() {
assert_eq!(
::std::mem::size_of::<pthread_barrier_t>(),
32usize,
concat!("Size of: ", stringify!(pthread_barrier_t))
);
assert_eq!(
::std::mem::align_of::<pthread_barrier_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_barrier_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_barrier_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_barrier_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrierattr_t {
pub __size: [::std::os::raw::c_char; 4usize],
pub __align: ::std::os::raw::c_int,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_pthread_barrierattr_t() {
assert_eq!(
::std::mem::size_of::<pthread_barrierattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_barrierattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_barrierattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_barrierattr_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_barrierattr_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrierattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_barrierattr_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrierattr_t),
"::",
stringify!(__align)
)
);
}
extern "C" {
pub fn random() -> ::std::os::raw::c_long;
}
extern "C" {
pub fn srandom(__seed: ::std::os::raw::c_uint);
}
extern "C" {
pub fn initstate(
__seed: ::std::os::raw::c_uint,
__statebuf: *mut ::std::os::raw::c_char,
__statelen: size_t,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct random_data {
pub fptr: *mut i32,
pub rptr: *mut i32,
pub state: *mut i32,
pub rand_type: ::std::os::raw::c_int,
pub rand_deg: ::std::os::raw::c_int,
pub rand_sep: ::std::os::raw::c_int,
pub end_ptr: *mut i32,
}
#[test]
fn bindgen_test_layout_random_data() {
assert_eq!(
::std::mem::size_of::<random_data>(),
48usize,
concat!("Size of: ", stringify!(random_data))
);
assert_eq!(
::std::mem::align_of::<random_data>(),
8usize,
concat!("Alignment of ", stringify!(random_data))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).fptr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(fptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).rptr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(rptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).state as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).rand_type as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(rand_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).rand_deg as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(rand_deg)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).rand_sep as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(rand_sep)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<random_data>())).end_ptr as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(random_data),
"::",
stringify!(end_ptr)
)
);
}
extern "C" {
pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn srandom_r(
__seed: ::std::os::raw::c_uint,
__buf: *mut random_data,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn initstate_r(
__seed: ::std::os::raw::c_uint,
__statebuf: *mut ::std::os::raw::c_char,
__statelen: size_t,
__buf: *mut random_data,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setstate_r(
__statebuf: *mut ::std::os::raw::c_char,
__buf: *mut random_data,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rand() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn srand(__seed: ::std::os::raw::c_uint);
}
extern "C" {
pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn drand48() -> f64;
}
extern "C" {
pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
}
extern "C" {
pub fn lrand48() -> ::std::os::raw::c_long;
}
extern "C" {
pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn mrand48() -> ::std::os::raw::c_long;
}
extern "C" {
pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn srand48(__seedval: ::std::os::raw::c_long);
}
extern "C" {
pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
}
extern "C" {
pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct drand48_data {
pub __x: [::std::os::raw::c_ushort; 3usize],
pub __old_x: [::std::os::raw::c_ushort; 3usize],
pub __c: ::std::os::raw::c_ushort,
pub __init: ::std::os::raw::c_ushort,
pub __a: ::std::os::raw::c_ulonglong,
}
#[test]
fn bindgen_test_layout_drand48_data() {
assert_eq!(
::std::mem::size_of::<drand48_data>(),
24usize,
concat!("Size of: ", stringify!(drand48_data))
);
assert_eq!(
::std::mem::align_of::<drand48_data>(),
8usize,
concat!("Alignment of ", stringify!(drand48_data))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<drand48_data>())).__x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(drand48_data),
"::",
stringify!(__x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<drand48_data>())).__old_x as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(drand48_data),
"::",
stringify!(__old_x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<drand48_data>())).__c as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(drand48_data),
"::",
stringify!(__c)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<drand48_data>())).__init as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(drand48_data),
"::",
stringify!(__init)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<drand48_data>())).__a as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(drand48_data),
"::",
stringify!(__a)
)
);
}
extern "C" {
pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn erand48_r(
__xsubi: *mut ::std::os::raw::c_ushort,
__buffer: *mut drand48_data,
__result: *mut f64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn lrand48_r(
__buffer: *mut drand48_data,
__result: *mut ::std::os::raw::c_long,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nrand48_r(
__xsubi: *mut ::std::os::raw::c_ushort,
__buffer: *mut drand48_data,
__result: *mut ::std::os::raw::c_long,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mrand48_r(
__buffer: *mut drand48_data,
__result: *mut ::std::os::raw::c_long,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn jrand48_r(
__xsubi: *mut ::std::os::raw::c_ushort,
__buffer: *mut drand48_data,
__result: *mut ::std::os::raw::c_long,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn srand48_r(
__seedval: ::std::os::raw::c_long,
__buffer: *mut drand48_data,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn seed48_r(
__seed16v: *mut ::std::os::raw::c_ushort,
__buffer: *mut drand48_data,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn lcong48_r(
__param: *mut ::std::os::raw::c_ushort,
__buffer: *mut drand48_data,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn calloc(
__nmemb: ::std::os::raw::c_ulong,
__size: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn realloc(
__ptr: *mut ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn reallocarray(
__ptr: *mut ::std::os::raw::c_void,
__nmemb: size_t,
__size: size_t,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn free(__ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn valloc(__size: size_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn posix_memalign(
__memptr: *mut *mut ::std::os::raw::c_void,
__alignment: size_t,
__size: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn aligned_alloc(__alignment: size_t, __size: size_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn abort();
}
extern "C" {
pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn at_quick_exit(
__func: ::std::option::Option<unsafe extern "C" fn()>,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn on_exit(
__func: ::std::option::Option<
unsafe extern "C" fn(
__status: ::std::os::raw::c_int,
__arg: *mut ::std::os::raw::c_void,
),
>,
__arg: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn exit(__status: ::std::os::raw::c_int);
}
extern "C" {
pub fn quick_exit(__status: ::std::os::raw::c_int);
}
extern "C" {
pub fn _Exit(__status: ::std::os::raw::c_int);
}
extern "C" {
pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setenv(
__name: *const ::std::os::raw::c_char,
__value: *const ::std::os::raw::c_char,
__replace: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn clearenv() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mkstemps(
__template: *mut ::std::os::raw::c_char,
__suffixlen: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn realpath(
__name: *const ::std::os::raw::c_char,
__resolved: *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
pub type __compar_fn_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn bsearch(
__key: *const ::std::os::raw::c_void,
__base: *const ::std::os::raw::c_void,
__nmemb: size_t,
__size: size_t,
__compar: __compar_fn_t,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn qsort(
__base: *mut ::std::os::raw::c_void,
__nmemb: size_t,
__size: size_t,
__compar: __compar_fn_t,
);
}
extern "C" {
pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
}
extern "C" {
pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
}
extern "C" {
pub fn lldiv(
__numer: ::std::os::raw::c_longlong,
__denom: ::std::os::raw::c_longlong,
) -> lldiv_t;
}
extern "C" {
pub fn ecvt(
__value: f64,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn fcvt(
__value: f64,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn gcvt(
__value: f64,
__ndigit: ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn qecvt(
__value: u128,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn qfcvt(
__value: u128,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn qgcvt(
__value: u128,
__ndigit: ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ecvt_r(
__value: f64,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
__len: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fcvt_r(
__value: f64,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
__len: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn qecvt_r(
__value: u128,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
__len: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn qfcvt_r(
__value: u128,
__ndigit: ::std::os::raw::c_int,
__decpt: *mut ::std::os::raw::c_int,
__sign: *mut ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
__len: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mbtowc(
__pwc: *mut wchar_t,
__s: *const ::std::os::raw::c_char,
__n: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mbstowcs(
__pwcs: *mut wchar_t,
__s: *const ::std::os::raw::c_char,
__n: size_t,
) -> size_t;
}
extern "C" {
pub fn wcstombs(
__s: *mut ::std::os::raw::c_char,
__pwcs: *const wchar_t,
__n: size_t,
) -> size_t;
}
extern "C" {
pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getsubopt(
__optionp: *mut *mut ::std::os::raw::c_char,
__tokens: *const *mut ::std::os::raw::c_char,
__valuep: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Parallel runner internally using std::thread. Use as JxlParallelRunner."]
pub fn JxlThreadParallelRunner(
runner_opaque: *mut ::std::os::raw::c_void,
jpegxl_opaque: *mut ::std::os::raw::c_void,
init: JxlParallelRunInit,
func: JxlParallelRunFunction,
start_range: u32,
end_range: u32,
) -> JxlParallelRetCode;
}
extern "C" {
#[doc = " Creates the runner for JxlThreadParallelRunner. Use as the opaque"]
#[doc = " runner."]
pub fn JxlThreadParallelRunnerCreate(
memory_manager: *const JxlMemoryManager,
num_worker_threads: size_t,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = " Destroys the runner created by JxlThreadParallelRunnerCreate."]
pub fn JxlThreadParallelRunnerDestroy(runner_opaque: *mut ::std::os::raw::c_void);
}
extern "C" {
#[doc = " Returns a default num_worker_threads value for"]
#[doc = " JxlThreadParallelRunnerCreate."]
pub fn JxlThreadParallelRunnerDefaultNumWorkerThreads() -> size_t;
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
pub gp_offset: ::std::os::raw::c_uint,
pub fp_offset: ::std::os::raw::c_uint,
pub overflow_arg_area: *mut ::std::os::raw::c_void,
pub reg_save_area: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout___va_list_tag() {
assert_eq!(
::std::mem::size_of::<__va_list_tag>(),
24usize,
concat!("Size of: ", stringify!(__va_list_tag))
);
assert_eq!(
::std::mem::align_of::<__va_list_tag>(),
8usize,
concat!("Alignment of ", stringify!(__va_list_tag))
);
assert_eq!(
unsafe { &(*(::std::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 { &(*(::std::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 { &(*(::std::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 { &(*(::std::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)
)
);
}