From 1d4968cb379f5ae6431fa416862b2993f4d39a8b Mon Sep 17 00:00:00 2001 From: eclipse-zenoh-bot <61247838+eclipse-zenoh-bot@users.noreply.github.com> Date: Sun, 8 Dec 2024 01:14:17 +0100 Subject: [PATCH] build: Sync with eclipse-zenoh/zenoh@2332406 from 2024-12-06 (#31) Co-authored-by: eclipse-zenoh-bot --- epan-sys/bindings.rs | 2224 ++++++++++++++++++++++++++---------------- 1 file changed, 1367 insertions(+), 857 deletions(-) diff --git a/epan-sys/bindings.rs b/epan-sys/bindings.rs index 5c6d914..3f5481c 100644 --- a/epan-sys/bindings.rs +++ b/epan-sys/bindings.rs @@ -136,6 +136,7 @@ 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 __GLIBC_USE_C2X_STRTOL: u32 = 0; pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; pub const __STDC_IEC_60559_BFP__: u32 = 201404; @@ -144,7 +145,7 @@ pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 35; +pub const __GLIBC_MINOR__: u32 = 39; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; @@ -169,6 +170,7 @@ 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 _BITS_STDINT_LEAST_H: u32 = 1; pub const INT8_MIN: i32 = -128; pub const INT16_MIN: i32 = -32768; pub const INT32_MIN: i32 = -2147483648; @@ -363,15 +365,16 @@ pub const SCNiPTR: &[u8; 3] = b"li\0"; pub const SCNoPTR: &[u8; 3] = b"lo\0"; pub const SCNuPTR: &[u8; 3] = b"lu\0"; pub const SCNxPTR: &[u8; 3] = b"lx\0"; +pub const __bool_true_false_are_defined: u32 = 1; pub const true_: u32 = 1; pub const false_: u32 = 0; -pub const __bool_true_false_are_defined: u32 = 1; pub const _STRING_H: u32 = 1; pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; pub const _STRINGS_H: u32 = 1; pub const G_ANALYZER_ANALYZING: u32 = 0; pub const FALSE: u32 = 0; +pub const G_HAVE_GNUC_VISIBILITY: u32 = 1; pub const _LIBC_LIMITS_H_: u32 = 1; pub const MB_LEN_MAX: u32 = 16; pub const _BITS_POSIX1_LIM_H: u32 = 1; @@ -475,12 +478,11 @@ pub const G_GINTPTR_MODIFIER: &[u8; 2] = b"l\0"; pub const G_GINTPTR_FORMAT: &[u8; 3] = b"li\0"; pub const G_GUINTPTR_FORMAT: &[u8; 3] = b"lu\0"; pub const GLIB_MAJOR_VERSION: u32 = 2; -pub const GLIB_MINOR_VERSION: u32 = 72; -pub const GLIB_MICRO_VERSION: u32 = 4; +pub const GLIB_MINOR_VERSION: u32 = 80; +pub const GLIB_MICRO_VERSION: u32 = 0; pub const G_VA_COPY_AS_ARRAY: u32 = 1; pub const G_HAVE_ISO_VARARGS: u32 = 1; pub const G_HAVE_GROWING_STACK: u32 = 0; -pub const G_HAVE_GNUC_VISIBILITY: u32 = 1; pub const G_HAVE_GNUC_VARARGS: u32 = 1; pub const G_MODULE_SUFFIX: &[u8; 3] = b"so\0"; pub const G_PID_FORMAT: &[u8; 2] = b"i\0"; @@ -536,7 +538,6 @@ pub const G_PDP_ENDIAN: u32 = 3412; pub const G_IEEE754_FLOAT_BIAS: u32 = 127; pub const G_IEEE754_DOUBLE_BIAS: u32 = 1023; pub const G_LOG_2_BASE_10: f64 = 0.3010299956639812; -pub const __GNUC_VA_LIST: u32 = 1; pub const _STDLIB_H: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; @@ -694,6 +695,8 @@ pub const G_PRIORITY_DEFAULT_IDLE: u32 = 200; pub const G_PRIORITY_LOW: u32 = 300; pub const G_SOURCE_REMOVE: u32 = 0; pub const G_UNICHAR_MAX_DECOMPOSITION_LENGTH: u32 = 18; +pub const G_STR_DELIMITERS: &[u8; 8] = b"_-|> <.\0"; +pub const G_ASCII_DTOSTR_BUF_SIZE: u32 = 39; pub const G_KEY_FILE_DESKTOP_GROUP: &[u8; 14] = b"Desktop Entry\0"; pub const G_KEY_FILE_DESKTOP_KEY_TYPE: &[u8; 5] = b"Type\0"; pub const G_KEY_FILE_DESKTOP_KEY_VERSION: &[u8; 8] = b"Version\0"; @@ -726,8 +729,6 @@ pub const G_CSET_a_2_z: &[u8; 27] = b"abcdefghijklmnopqrstuvwxyz\0"; pub const G_CSET_DIGITS: &[u8; 11] = b"0123456789\0"; pub const G_CSET_LATINC : & [u8 ; 31] = b"\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\0" ; pub const G_CSET_LATINS : & [u8 ; 33] = b"\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF\0" ; -pub const G_STR_DELIMITERS: &[u8; 8] = b"_-|> <.\0"; -pub const G_ASCII_DTOSTR_BUF_SIZE: u32 = 39; pub const _ERRNO_H: u32 = 1; pub const _BITS_ERRNO_H: u32 = 1; pub const EPERM: u32 = 1; @@ -902,6 +903,7 @@ 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 __cookie_io_functions_t_defined: u32 = 1; pub const _IOFBF: u32 = 0; pub const _IOLBF: u32 = 1; pub const _IONBF: u32 = 2; @@ -911,9 +913,9 @@ pub const SEEK_SET: u32 = 0; pub const SEEK_CUR: u32 = 1; pub const SEEK_END: u32 = 2; pub const P_tmpdir: &[u8; 5] = 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 _BITS_STDIO_LIM_H: u32 = 1; pub const FILENAME_MAX: u32 = 4096; pub const L_ctermid: u32 = 9; pub const FOPEN_MAX: u32 = 16; @@ -2127,6 +2129,12 @@ extern "C" { __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } +extern "C" { + pub fn strchrnul( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} extern "C" { pub fn strcspn( __s: *const ::std::os::raw::c_char, @@ -2171,6 +2179,34 @@ extern "C" { __save_ptr: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } +extern "C" { + pub fn strcasestr( + __haystack: *const ::std::os::raw::c_char, + __needle: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn memmem( + __haystack: *const ::std::os::raw::c_void, + __haystacklen: usize, + __needle: *const ::std::os::raw::c_void, + __needlelen: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn __mempcpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn mempcpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; +} extern "C" { pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } @@ -2205,7 +2241,7 @@ extern "C" { pub fn bcopy( __src: *const ::std::os::raw::c_void, __dest: *mut ::std::os::raw::c_void, - __n: usize, + __n: ::std::os::raw::c_ulong, ); } extern "C" { @@ -2298,6 +2334,20 @@ extern "C" { __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } +extern "C" { + pub fn strlcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> usize; +} +extern "C" { + pub fn strlcat( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> usize; +} pub type wchar_t = ::std::os::raw::c_int; #[repr(C)] #[repr(align(16))] @@ -2748,6 +2798,9 @@ pub type GCompareDataFunc = ::std::option::Option< >; pub type GEqualFunc = ::std::option::Option gboolean>; +pub type GEqualFuncFull = ::std::option::Option< + unsafe extern "C" fn(a: gconstpointer, b: gconstpointer, user_data: gpointer) -> gboolean, +>; pub type GDestroyNotify = ::std::option::Option; pub type GFunc = ::std::option::Option; pub type GHashFunc = ::std::option::Option guint>; @@ -3192,6 +3245,21 @@ extern "C" { element_size: guint, ) -> *mut GArray; } +extern "C" { + pub fn g_array_new_take( + data: gpointer, + len: gsize, + clear: gboolean, + element_size: gsize, + ) -> *mut GArray; +} +extern "C" { + pub fn g_array_new_take_zero_terminated( + data: gpointer, + clear: gboolean, + element_size: gsize, + ) -> *mut GArray; +} extern "C" { pub fn g_array_steal(array: *mut GArray, len: *mut gsize) -> gpointer; } @@ -3272,6 +3340,22 @@ extern "C" { extern "C" { pub fn g_ptr_array_new_with_free_func(element_free_func: GDestroyNotify) -> *mut GPtrArray; } +extern "C" { + pub fn g_ptr_array_new_take( + data: *mut gpointer, + len: gsize, + element_free_func: GDestroyNotify, + ) -> *mut GPtrArray; +} +extern "C" { + pub fn g_ptr_array_new_from_array( + data: *mut gpointer, + len: gsize, + copy_func: GCopyFunc, + copy_func_user_data: gpointer, + element_free_func: GDestroyNotify, + ) -> *mut GPtrArray; +} extern "C" { pub fn g_ptr_array_steal(array: *mut GPtrArray, len: *mut gsize) -> *mut gpointer; } @@ -3291,6 +3375,27 @@ extern "C" { element_free_func: GDestroyNotify, ) -> *mut GPtrArray; } +extern "C" { + pub fn g_ptr_array_new_null_terminated( + reserved_size: guint, + element_free_func: GDestroyNotify, + null_terminated: gboolean, + ) -> *mut GPtrArray; +} +extern "C" { + pub fn g_ptr_array_new_take_null_terminated( + data: *mut gpointer, + element_free_func: GDestroyNotify, + ) -> *mut GPtrArray; +} +extern "C" { + pub fn g_ptr_array_new_from_null_terminated_array( + data: *mut gpointer, + copy_func: GCopyFunc, + copy_func_user_data: gpointer, + element_free_func: GDestroyNotify, + ) -> *mut GPtrArray; +} extern "C" { pub fn g_ptr_array_free(array: *mut GPtrArray, free_seg: gboolean) -> *mut gpointer; } @@ -3358,6 +3463,16 @@ extern "C" { user_data: gpointer, ); } +extern "C" { + pub fn g_ptr_array_sort_values(array: *mut GPtrArray, compare_func: GCompareFunc); +} +extern "C" { + pub fn g_ptr_array_sort_values_with_data( + array: *mut GPtrArray, + compare_func: GCompareDataFunc, + user_data: gpointer, + ); +} extern "C" { pub fn g_ptr_array_foreach(array: *mut GPtrArray, func: GFunc, user_data: gpointer); } @@ -3376,6 +3491,9 @@ extern "C" { index_: *mut guint, ) -> gboolean; } +extern "C" { + pub fn g_ptr_array_is_null_terminated(array: *mut GPtrArray) -> gboolean; +} extern "C" { pub fn g_byte_array_new() -> *mut GByteArray; } @@ -3460,6 +3578,17 @@ extern "C" { newval: gint, ) -> gboolean; } +extern "C" { + pub fn g_atomic_int_compare_and_exchange_full( + atomic: *mut gint, + oldval: gint, + newval: gint, + preval: *mut gint, + ) -> gboolean; +} +extern "C" { + pub fn g_atomic_int_exchange(atomic: *mut gint, newval: gint) -> gint; +} extern "C" { pub fn g_atomic_int_add(atomic: *mut gint, val: gint) -> gint; } @@ -3486,22 +3615,36 @@ extern "C" { ) -> gboolean; } extern "C" { - pub fn g_atomic_pointer_add(atomic: *mut ::std::os::raw::c_void, val: gssize) -> gssize; + pub fn g_atomic_pointer_compare_and_exchange_full( + atomic: *mut ::std::os::raw::c_void, + oldval: gpointer, + newval: gpointer, + preval: *mut ::std::os::raw::c_void, + ) -> gboolean; +} +extern "C" { + pub fn g_atomic_pointer_exchange( + atomic: *mut ::std::os::raw::c_void, + newval: gpointer, + ) -> gpointer; +} +extern "C" { + pub fn g_atomic_pointer_add(atomic: *mut ::std::os::raw::c_void, val: gssize) -> gintptr; } extern "C" { - pub fn g_atomic_pointer_and(atomic: *mut ::std::os::raw::c_void, val: gsize) -> gsize; + pub fn g_atomic_pointer_and(atomic: *mut ::std::os::raw::c_void, val: gsize) -> guintptr; } extern "C" { - pub fn g_atomic_pointer_or(atomic: *mut ::std::os::raw::c_void, val: gsize) -> gsize; + pub fn g_atomic_pointer_or(atomic: *mut ::std::os::raw::c_void, val: gsize) -> guintptr; } extern "C" { - pub fn g_atomic_pointer_xor(atomic: *mut ::std::os::raw::c_void, val: gsize) -> gsize; + pub fn g_atomic_pointer_xor(atomic: *mut ::std::os::raw::c_void, val: gsize) -> guintptr; } extern "C" { pub fn g_atomic_int_exchange_and_add(atomic: *mut gint, val: gint) -> gint; } -pub type va_list = __builtin_va_list; pub type __gnuc_va_list = __builtin_va_list; +pub type va_list = __builtin_va_list; pub type GQuark = guint32; extern "C" { pub fn g_quark_try_string(string: *const gchar) -> GQuark; @@ -3790,6 +3933,8 @@ pub const GFormatSizeFlags_G_FORMAT_SIZE_DEFAULT: GFormatSizeFlags = 0; pub const GFormatSizeFlags_G_FORMAT_SIZE_LONG_FORMAT: GFormatSizeFlags = 1; pub const GFormatSizeFlags_G_FORMAT_SIZE_IEC_UNITS: GFormatSizeFlags = 2; pub const GFormatSizeFlags_G_FORMAT_SIZE_BITS: GFormatSizeFlags = 4; +pub const GFormatSizeFlags_G_FORMAT_SIZE_ONLY_VALUE: GFormatSizeFlags = 8; +pub const GFormatSizeFlags_G_FORMAT_SIZE_ONLY_UNIT: GFormatSizeFlags = 16; pub type GFormatSizeFlags = ::std::os::raw::c_uint; extern "C" { pub fn g_format_size_full(size: guint64, flags: GFormatSizeFlags) -> *mut gchar; @@ -5434,6 +5579,15 @@ extern "C" { __buffer: *mut drand48_data, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn arc4random() -> __uint32_t; +} +extern "C" { + pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __size: usize); +} +extern "C" { + pub fn arc4random_uniform(__upper_bound: __uint32_t) -> __uint32_t; +} extern "C" { pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } @@ -6000,7 +6154,7 @@ extern "C" { pub fn g_thread_self() -> *mut GThread; } extern "C" { - pub fn g_thread_exit(retval: gpointer); + pub fn g_thread_exit(retval: gpointer) -> !; } extern "C" { pub fn g_thread_join(thread: *mut GThread) -> gpointer; @@ -6098,6 +6252,12 @@ extern "C" { extern "C" { pub fn g_once_init_leave(location: *mut ::std::os::raw::c_void, result: gsize); } +extern "C" { + pub fn g_once_init_enter_pointer(location: *mut ::std::os::raw::c_void) -> gboolean; +} +extern "C" { + pub fn g_once_init_leave_pointer(location: *mut ::std::os::raw::c_void, result: gpointer); +} extern "C" { pub fn g_get_num_processors() -> guint; } @@ -6991,6 +7151,7 @@ pub const SEGV_ADIDERR: _bindgen_ty_4 = 6; pub const SEGV_ADIPERR: _bindgen_ty_4 = 7; pub const SEGV_MTEAERR: _bindgen_ty_4 = 8; pub const SEGV_MTESERR: _bindgen_ty_4 = 9; +pub const SEGV_CPERR: _bindgen_ty_4 = 10; pub type _bindgen_ty_4 = ::std::os::raw::c_uint; pub const BUS_ADRALN: _bindgen_ty_5 = 1; pub const BUS_ADRERR: _bindgen_ty_5 = 2; @@ -8783,12 +8944,32 @@ extern "C" { extern "C" { pub fn g_pointer_bit_lock(address: *mut ::std::os::raw::c_void, lock_bit: gint); } +extern "C" { + pub fn g_pointer_bit_lock_and_get(address: gpointer, lock_bit: guint, out_ptr: *mut guintptr); +} extern "C" { pub fn g_pointer_bit_trylock(address: *mut ::std::os::raw::c_void, lock_bit: gint) -> gboolean; } extern "C" { pub fn g_pointer_bit_unlock(address: *mut ::std::os::raw::c_void, lock_bit: gint); } +extern "C" { + pub fn g_pointer_bit_lock_mask_ptr( + ptr: gpointer, + lock_bit: guint, + set: gboolean, + preserve_mask: guintptr, + preserve_ptr: gpointer, + ) -> gpointer; +} +extern "C" { + pub fn g_pointer_bit_unlock_and_set( + address: *mut ::std::os::raw::c_void, + lock_bit: guint, + ptr: gpointer, + preserve_mask: guintptr, + ); +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GTimeZone { @@ -8870,6 +9051,12 @@ extern "C" { extern "C" { pub fn g_date_time_new_from_unix_utc(t: gint64) -> *mut GDateTime; } +extern "C" { + pub fn g_date_time_new_from_unix_local_usec(usecs: gint64) -> *mut GDateTime; +} +extern "C" { + pub fn g_date_time_new_from_unix_utc_usec(usecs: gint64) -> *mut GDateTime; +} extern "C" { pub fn g_date_time_new_from_timeval_local(tv: *const GTimeVal) -> *mut GDateTime; } @@ -9007,6 +9194,9 @@ extern "C" { extern "C" { pub fn g_date_time_to_unix(datetime: *mut GDateTime) -> gint64; } +extern "C" { + pub fn g_date_time_to_unix_usec(datetime: *mut GDateTime) -> gint64; +} extern "C" { pub fn g_date_time_to_timeval(datetime: *mut GDateTime, tv: *mut GTimeVal) -> gboolean; } @@ -9061,6 +9251,9 @@ extern "C" { extern "C" { pub fn g_bookmark_file_free(bookmark: *mut GBookmarkFile); } +extern "C" { + pub fn g_bookmark_file_copy(bookmark: *mut GBookmarkFile) -> *mut GBookmarkFile; +} extern "C" { pub fn g_bookmark_file_load_from_file( bookmark: *mut GBookmarkFile, @@ -9684,6 +9877,13 @@ extern "C" { destroy_func: GDestroyNotify, ); } +extern "C" { + pub fn g_datalist_id_remove_multiple( + datalist: *mut *mut GData, + keys: *mut GQuark, + n_keys: gsize, + ); +} pub type GDuplicateFunc = ::std::option::Option gpointer>; extern "C" { @@ -10150,13 +10350,13 @@ pub struct __dirstream { } pub type DIR = __dirstream; extern "C" { - pub fn opendir(__name: *const ::std::os::raw::c_char) -> *mut DIR; + pub fn closedir(__dirp: *mut DIR) -> ::std::os::raw::c_int; } extern "C" { - pub fn fdopendir(__fd: ::std::os::raw::c_int) -> *mut DIR; + pub fn opendir(__name: *const ::std::os::raw::c_char) -> *mut DIR; } extern "C" { - pub fn closedir(__dirp: *mut DIR) -> ::std::os::raw::c_int; + pub fn fdopendir(__fd: ::std::os::raw::c_int) -> *mut DIR; } extern "C" { pub fn readdir(__dirp: *mut DIR) -> *mut dirent; @@ -10224,6 +10424,12 @@ extern "C" { extern "C" { pub fn g_dir_close(dir: *mut GDir); } +extern "C" { + pub fn g_dir_ref(dir: *mut GDir) -> *mut GDir; +} +extern "C" { + pub fn g_dir_unref(dir: *mut GDir); +} extern "C" { pub fn g_getenv(variable: *const gchar) -> *const gchar; } @@ -10425,6 +10631,9 @@ pub type GMemVTable = _GMemVTable; extern "C" { pub fn g_free(mem: gpointer); } +extern "C" { + pub fn g_free_sized(mem: gpointer, size: usize); +} extern "C" { pub fn g_clear_pointer(pp: *mut gpointer, destroy: GDestroyNotify); } @@ -10473,6 +10682,9 @@ extern "C" { extern "C" { pub fn g_aligned_free(mem: gpointer); } +extern "C" { + pub fn g_aligned_free_sized(mem: gpointer, alignment: usize, size: usize); +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GMemVTable { @@ -11095,6 +11307,12 @@ extern "C" { extern "C" { pub fn g_hash_table_steal_all(hash_table: *mut GHashTable); } +extern "C" { + pub fn g_hash_table_steal_all_keys(hash_table: *mut GHashTable) -> *mut GPtrArray; +} +extern "C" { + pub fn g_hash_table_steal_all_values(hash_table: *mut GHashTable) -> *mut GPtrArray; +} extern "C" { pub fn g_hash_table_lookup(hash_table: *mut GHashTable, key: gconstpointer) -> gpointer; } @@ -11148,6 +11366,12 @@ extern "C" { length: *mut guint, ) -> *mut gpointer; } +extern "C" { + pub fn g_hash_table_get_keys_as_ptr_array(hash_table: *mut GHashTable) -> *mut GPtrArray; +} +extern "C" { + pub fn g_hash_table_get_values_as_ptr_array(hash_table: *mut GHashTable) -> *mut GPtrArray; +} extern "C" { pub fn g_hash_table_iter_init(iter: *mut GHashTableIter, hash_table: *mut GHashTable); } @@ -11869,6 +12093,7 @@ pub type GSourcePrivate = _GSourcePrivate; pub type GSourceCallbackFuncs = _GSourceCallbackFuncs; pub type GSourceFuncs = _GSourceFuncs; pub type GSourceFunc = ::std::option::Option gboolean>; +pub type GSourceOnceFunc = ::std::option::Option; pub type GChildWatchFunc = ::std::option::Option; pub type GSourceDisposeFunc = ::std::option::Option; @@ -12476,6 +12701,9 @@ extern "C" { extern "C" { pub fn g_timeout_add(interval: guint, function: GSourceFunc, data: gpointer) -> guint; } +extern "C" { + pub fn g_timeout_add_once(interval: guint, function: GSourceOnceFunc, data: gpointer) -> guint; +} extern "C" { pub fn g_timeout_add_seconds_full( priority: gint, @@ -12488,6 +12716,13 @@ extern "C" { extern "C" { pub fn g_timeout_add_seconds(interval: guint, function: GSourceFunc, data: gpointer) -> guint; } +extern "C" { + pub fn g_timeout_add_seconds_once( + interval: guint, + function: GSourceOnceFunc, + data: gpointer, + ) -> guint; +} extern "C" { pub fn g_child_watch_add_full( priority: gint, @@ -12511,6 +12746,9 @@ extern "C" { notify: GDestroyNotify, ) -> guint; } +extern "C" { + pub fn g_idle_add_once(function: GSourceOnceFunc, data: gpointer) -> guint; +} extern "C" { pub fn g_idle_remove_by_data(data: gpointer) -> gboolean; } @@ -12618,6 +12856,11 @@ pub const GUnicodeBreakType_G_UNICODE_BREAK_REGIONAL_INDICATOR: GUnicodeBreakTyp pub const GUnicodeBreakType_G_UNICODE_BREAK_EMOJI_BASE: GUnicodeBreakType = 40; pub const GUnicodeBreakType_G_UNICODE_BREAK_EMOJI_MODIFIER: GUnicodeBreakType = 41; pub const GUnicodeBreakType_G_UNICODE_BREAK_ZERO_WIDTH_JOINER: GUnicodeBreakType = 42; +pub const GUnicodeBreakType_G_UNICODE_BREAK_AKSARA: GUnicodeBreakType = 43; +pub const GUnicodeBreakType_G_UNICODE_BREAK_AKSARA_PRE_BASE: GUnicodeBreakType = 44; +pub const GUnicodeBreakType_G_UNICODE_BREAK_AKSARA_START: GUnicodeBreakType = 45; +pub const GUnicodeBreakType_G_UNICODE_BREAK_VIRAMA_FINAL: GUnicodeBreakType = 46; +pub const GUnicodeBreakType_G_UNICODE_BREAK_VIRAMA: GUnicodeBreakType = 47; pub type GUnicodeBreakType = ::std::os::raw::c_uint; pub const GUnicodeScript_G_UNICODE_SCRIPT_INVALID_CODE: GUnicodeScript = -1; pub const GUnicodeScript_G_UNICODE_SCRIPT_COMMON: GUnicodeScript = 0; @@ -12783,6 +13026,8 @@ pub const GUnicodeScript_G_UNICODE_SCRIPT_TANGSA: GUnicodeScript = 159; pub const GUnicodeScript_G_UNICODE_SCRIPT_TOTO: GUnicodeScript = 160; pub const GUnicodeScript_G_UNICODE_SCRIPT_VITHKUQI: GUnicodeScript = 161; pub const GUnicodeScript_G_UNICODE_SCRIPT_MATH: GUnicodeScript = 162; +pub const GUnicodeScript_G_UNICODE_SCRIPT_KAWI: GUnicodeScript = 163; +pub const GUnicodeScript_G_UNICODE_SCRIPT_NAG_MUNDARI: GUnicodeScript = 164; pub type GUnicodeScript = ::std::os::raw::c_int; extern "C" { pub fn g_unicode_script_to_iso15924(script: GUnicodeScript) -> guint32; @@ -12928,6 +13173,9 @@ extern "C" { extern "C" { pub fn g_utf8_strncpy(dest: *mut gchar, src: *const gchar, n: gsize) -> *mut gchar; } +extern "C" { + pub fn g_utf8_truncate_middle(string: *const gchar, truncate_length: gsize) -> *mut gchar; +} extern "C" { pub fn g_utf8_strchr(p: *const gchar, len: gssize, c: gunichar) -> *mut gchar; } @@ -13045,340 +13293,594 @@ extern "C" { extern "C" { pub fn g_utf8_make_valid(str_: *const gchar, len: gssize) -> *mut gchar; } -pub type GString = _GString; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _GString { - pub str_: *mut gchar, - pub len: gsize, - pub allocated_len: gsize, -} -#[test] -fn bindgen_test_layout__GString() { - const UNINIT: ::std::mem::MaybeUninit<_GString> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GString>(), - 24usize, - concat!("Size of: ", stringify!(_GString)) - ); - assert_eq!( - ::std::mem::align_of::<_GString>(), - 8usize, - concat!("Alignment of ", stringify!(_GString)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GString), - "::", - stringify!(str_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GString), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).allocated_len) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GString), - "::", - stringify!(allocated_len) - ) - ); -} -extern "C" { - pub fn g_string_new(init: *const gchar) -> *mut GString; -} +pub const GAsciiType_G_ASCII_ALNUM: GAsciiType = 1; +pub const GAsciiType_G_ASCII_ALPHA: GAsciiType = 2; +pub const GAsciiType_G_ASCII_CNTRL: GAsciiType = 4; +pub const GAsciiType_G_ASCII_DIGIT: GAsciiType = 8; +pub const GAsciiType_G_ASCII_GRAPH: GAsciiType = 16; +pub const GAsciiType_G_ASCII_LOWER: GAsciiType = 32; +pub const GAsciiType_G_ASCII_PRINT: GAsciiType = 64; +pub const GAsciiType_G_ASCII_PUNCT: GAsciiType = 128; +pub const GAsciiType_G_ASCII_SPACE: GAsciiType = 256; +pub const GAsciiType_G_ASCII_UPPER: GAsciiType = 512; +pub const GAsciiType_G_ASCII_XDIGIT: GAsciiType = 1024; +pub type GAsciiType = ::std::os::raw::c_uint; extern "C" { - pub fn g_string_new_len(init: *const gchar, len: gssize) -> *mut GString; + pub static g_ascii_table: *const guint16; } extern "C" { - pub fn g_string_sized_new(dfl_size: gsize) -> *mut GString; + pub fn g_ascii_tolower(c: gchar) -> gchar; } extern "C" { - pub fn g_string_free(string: *mut GString, free_segment: gboolean) -> *mut gchar; + pub fn g_ascii_toupper(c: gchar) -> gchar; } extern "C" { - pub fn g_string_free_to_bytes(string: *mut GString) -> *mut GBytes; + pub fn g_ascii_digit_value(c: gchar) -> gint; } extern "C" { - pub fn g_string_equal(v: *const GString, v2: *const GString) -> gboolean; + pub fn g_ascii_xdigit_value(c: gchar) -> gint; } extern "C" { - pub fn g_string_hash(str_: *const GString) -> guint; + pub fn g_strdelimit( + string: *mut gchar, + delimiters: *const gchar, + new_delimiter: gchar, + ) -> *mut gchar; } extern "C" { - pub fn g_string_assign(string: *mut GString, rval: *const gchar) -> *mut GString; + pub fn g_strcanon( + string: *mut gchar, + valid_chars: *const gchar, + substitutor: gchar, + ) -> *mut gchar; } extern "C" { - pub fn g_string_truncate(string: *mut GString, len: gsize) -> *mut GString; + pub fn g_strerror(errnum: gint) -> *const gchar; } extern "C" { - pub fn g_string_set_size(string: *mut GString, len: gsize) -> *mut GString; + pub fn g_strsignal(signum: gint) -> *const gchar; } extern "C" { - pub fn g_string_insert_len( - string: *mut GString, - pos: gssize, - val: *const gchar, - len: gssize, - ) -> *mut GString; + pub fn g_strreverse(string: *mut gchar) -> *mut gchar; } extern "C" { - pub fn g_string_append(string: *mut GString, val: *const gchar) -> *mut GString; + pub fn g_strlcpy(dest: *mut gchar, src: *const gchar, dest_size: gsize) -> gsize; } extern "C" { - pub fn g_string_append_len( - string: *mut GString, - val: *const gchar, - len: gssize, - ) -> *mut GString; + pub fn g_strlcat(dest: *mut gchar, src: *const gchar, dest_size: gsize) -> gsize; } extern "C" { - pub fn g_string_append_c(string: *mut GString, c: gchar) -> *mut GString; + pub fn g_strstr_len( + haystack: *const gchar, + haystack_len: gssize, + needle: *const gchar, + ) -> *mut gchar; } extern "C" { - pub fn g_string_append_unichar(string: *mut GString, wc: gunichar) -> *mut GString; + pub fn g_strrstr(haystack: *const gchar, needle: *const gchar) -> *mut gchar; } extern "C" { - pub fn g_string_prepend(string: *mut GString, val: *const gchar) -> *mut GString; + pub fn g_strrstr_len( + haystack: *const gchar, + haystack_len: gssize, + needle: *const gchar, + ) -> *mut gchar; } extern "C" { - pub fn g_string_prepend_c(string: *mut GString, c: gchar) -> *mut GString; + pub fn g_str_has_suffix(str_: *const gchar, suffix: *const gchar) -> gboolean; } extern "C" { - pub fn g_string_prepend_unichar(string: *mut GString, wc: gunichar) -> *mut GString; + pub fn g_str_has_prefix(str_: *const gchar, prefix: *const gchar) -> gboolean; } extern "C" { - pub fn g_string_prepend_len( - string: *mut GString, - val: *const gchar, - len: gssize, - ) -> *mut GString; + pub fn g_strtod(nptr: *const gchar, endptr: *mut *mut gchar) -> gdouble; } extern "C" { - pub fn g_string_insert(string: *mut GString, pos: gssize, val: *const gchar) -> *mut GString; + pub fn g_ascii_strtod(nptr: *const gchar, endptr: *mut *mut gchar) -> gdouble; } extern "C" { - pub fn g_string_insert_c(string: *mut GString, pos: gssize, c: gchar) -> *mut GString; + pub fn g_ascii_strtoull(nptr: *const gchar, endptr: *mut *mut gchar, base: guint) -> guint64; } extern "C" { - pub fn g_string_insert_unichar(string: *mut GString, pos: gssize, wc: gunichar) - -> *mut GString; + pub fn g_ascii_strtoll(nptr: *const gchar, endptr: *mut *mut gchar, base: guint) -> gint64; } extern "C" { - pub fn g_string_overwrite(string: *mut GString, pos: gsize, val: *const gchar) -> *mut GString; + pub fn g_ascii_dtostr(buffer: *mut gchar, buf_len: gint, d: gdouble) -> *mut gchar; } extern "C" { - pub fn g_string_overwrite_len( - string: *mut GString, - pos: gsize, - val: *const gchar, - len: gssize, - ) -> *mut GString; + pub fn g_ascii_formatd( + buffer: *mut gchar, + buf_len: gint, + format: *const gchar, + d: gdouble, + ) -> *mut gchar; } extern "C" { - pub fn g_string_erase(string: *mut GString, pos: gssize, len: gssize) -> *mut GString; + pub fn g_strchug(string: *mut gchar) -> *mut gchar; } extern "C" { - pub fn g_string_replace( - string: *mut GString, - find: *const gchar, - replace: *const gchar, - limit: guint, - ) -> guint; + pub fn g_strchomp(string: *mut gchar) -> *mut gchar; } extern "C" { - pub fn g_string_ascii_down(string: *mut GString) -> *mut GString; + pub fn g_ascii_strcasecmp(s1: *const gchar, s2: *const gchar) -> gint; } extern "C" { - pub fn g_string_ascii_up(string: *mut GString) -> *mut GString; + pub fn g_ascii_strncasecmp(s1: *const gchar, s2: *const gchar, n: gsize) -> gint; } extern "C" { - pub fn g_string_vprintf(string: *mut GString, format: *const gchar, args: *mut __va_list_tag); + pub fn g_ascii_strdown(str_: *const gchar, len: gssize) -> *mut gchar; } extern "C" { - pub fn g_string_printf(string: *mut GString, format: *const gchar, ...); + pub fn g_ascii_strup(str_: *const gchar, len: gssize) -> *mut gchar; } extern "C" { - pub fn g_string_append_vprintf( - string: *mut GString, - format: *const gchar, - args: *mut __va_list_tag, - ); + pub fn g_str_is_ascii(str_: *const gchar) -> gboolean; } extern "C" { - pub fn g_string_append_printf(string: *mut GString, format: *const gchar, ...); + pub fn g_strcasecmp(s1: *const gchar, s2: *const gchar) -> gint; } extern "C" { - pub fn g_string_append_uri_escaped( - string: *mut GString, - unescaped: *const gchar, - reserved_chars_allowed: *const gchar, - allow_utf8: gboolean, - ) -> *mut GString; + pub fn g_strncasecmp(s1: *const gchar, s2: *const gchar, n: guint) -> gint; } extern "C" { - pub fn g_string_down(string: *mut GString) -> *mut GString; + pub fn g_strdown(string: *mut gchar) -> *mut gchar; } extern "C" { - pub fn g_string_up(string: *mut GString) -> *mut GString; + pub fn g_strup(string: *mut gchar) -> *mut gchar; } -pub type GIOChannel = _GIOChannel; -pub type GIOFuncs = _GIOFuncs; -pub const GIOError_G_IO_ERROR_NONE: GIOError = 0; -pub const GIOError_G_IO_ERROR_AGAIN: GIOError = 1; -pub const GIOError_G_IO_ERROR_INVAL: GIOError = 2; -pub const GIOError_G_IO_ERROR_UNKNOWN: GIOError = 3; -pub type GIOError = ::std::os::raw::c_uint; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_FBIG: GIOChannelError = 0; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_INVAL: GIOChannelError = 1; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_IO: GIOChannelError = 2; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_ISDIR: GIOChannelError = 3; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_NOSPC: GIOChannelError = 4; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_NXIO: GIOChannelError = 5; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_OVERFLOW: GIOChannelError = 6; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_PIPE: GIOChannelError = 7; -pub const GIOChannelError_G_IO_CHANNEL_ERROR_FAILED: GIOChannelError = 8; -pub type GIOChannelError = ::std::os::raw::c_uint; -pub const GIOStatus_G_IO_STATUS_ERROR: GIOStatus = 0; -pub const GIOStatus_G_IO_STATUS_NORMAL: GIOStatus = 1; -pub const GIOStatus_G_IO_STATUS_EOF: GIOStatus = 2; -pub const GIOStatus_G_IO_STATUS_AGAIN: GIOStatus = 3; -pub type GIOStatus = ::std::os::raw::c_uint; -pub const GSeekType_G_SEEK_CUR: GSeekType = 0; -pub const GSeekType_G_SEEK_SET: GSeekType = 1; -pub const GSeekType_G_SEEK_END: GSeekType = 2; -pub type GSeekType = ::std::os::raw::c_uint; -pub const GIOFlags_G_IO_FLAG_APPEND: GIOFlags = 1; -pub const GIOFlags_G_IO_FLAG_NONBLOCK: GIOFlags = 2; -pub const GIOFlags_G_IO_FLAG_IS_READABLE: GIOFlags = 4; -pub const GIOFlags_G_IO_FLAG_IS_WRITABLE: GIOFlags = 8; -pub const GIOFlags_G_IO_FLAG_IS_WRITEABLE: GIOFlags = 8; -pub const GIOFlags_G_IO_FLAG_IS_SEEKABLE: GIOFlags = 16; -pub const GIOFlags_G_IO_FLAG_MASK: GIOFlags = 31; -pub const GIOFlags_G_IO_FLAG_GET_MASK: GIOFlags = 31; -pub const GIOFlags_G_IO_FLAG_SET_MASK: GIOFlags = 3; -pub type GIOFlags = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _GIOChannel { - pub ref_count: gint, - pub funcs: *mut GIOFuncs, - pub encoding: *mut gchar, - pub read_cd: GIConv, - pub write_cd: GIConv, - pub line_term: *mut gchar, - pub line_term_len: guint, - pub buf_size: gsize, - pub read_buf: *mut GString, - pub encoded_read_buf: *mut GString, - pub write_buf: *mut GString, - pub partial_write_buf: [gchar; 6usize], - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub reserved1: gpointer, - pub reserved2: gpointer, +extern "C" { + pub fn g_strdup(str_: *const gchar) -> *mut gchar; } -#[test] -fn bindgen_test_layout__GIOChannel() { - const UNINIT: ::std::mem::MaybeUninit<_GIOChannel> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GIOChannel>(), - 112usize, - concat!("Size of: ", stringify!(_GIOChannel)) - ); - assert_eq!( - ::std::mem::align_of::<_GIOChannel>(), - 8usize, - concat!("Alignment of ", stringify!(_GIOChannel)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ref_count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(ref_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).funcs) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(funcs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).encoding) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_cd) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(read_cd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).write_cd) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(write_cd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line_term) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(line_term) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line_term_len) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GIOChannel), - "::", - stringify!(line_term_len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf_size) as usize - ptr as usize }, - 56usize, +extern "C" { + pub fn g_strdup_printf(format: *const gchar, ...) -> *mut gchar; +} +extern "C" { + pub fn g_strdup_vprintf(format: *const gchar, args: *mut __va_list_tag) -> *mut gchar; +} +extern "C" { + pub fn g_strndup(str_: *const gchar, n: gsize) -> *mut gchar; +} +extern "C" { + pub fn g_strnfill(length: gsize, fill_char: gchar) -> *mut gchar; +} +extern "C" { + pub fn g_strconcat(string1: *const gchar, ...) -> *mut gchar; +} +extern "C" { + pub fn g_strjoin(separator: *const gchar, ...) -> *mut gchar; +} +extern "C" { + pub fn g_strcompress(source: *const gchar) -> *mut gchar; +} +extern "C" { + pub fn g_strescape(source: *const gchar, exceptions: *const gchar) -> *mut gchar; +} +extern "C" { + pub fn g_memdup(mem: gconstpointer, byte_size: guint) -> gpointer; +} +extern "C" { + pub fn g_memdup2(mem: gconstpointer, byte_size: gsize) -> gpointer; +} +pub type GStrv = *mut *mut gchar; +extern "C" { + pub fn g_strsplit( + string: *const gchar, + delimiter: *const gchar, + max_tokens: gint, + ) -> *mut *mut gchar; +} +extern "C" { + pub fn g_strsplit_set( + string: *const gchar, + delimiters: *const gchar, + max_tokens: gint, + ) -> *mut *mut gchar; +} +extern "C" { + pub fn g_strjoinv(separator: *const gchar, str_array: *mut *mut gchar) -> *mut gchar; +} +extern "C" { + pub fn g_strfreev(str_array: *mut *mut gchar); +} +extern "C" { + pub fn g_strdupv(str_array: *mut *mut gchar) -> *mut *mut gchar; +} +extern "C" { + pub fn g_strv_length(str_array: *mut *mut gchar) -> guint; +} +extern "C" { + pub fn g_stpcpy(dest: *mut gchar, src: *const ::std::os::raw::c_char) -> *mut gchar; +} +extern "C" { + pub fn g_str_to_ascii(str_: *const gchar, from_locale: *const gchar) -> *mut gchar; +} +extern "C" { + pub fn g_str_tokenize_and_fold( + string: *const gchar, + translit_locale: *const gchar, + ascii_alternates: *mut *mut *mut gchar, + ) -> *mut *mut gchar; +} +extern "C" { + pub fn g_str_match_string( + search_term: *const gchar, + potential_hit: *const gchar, + accept_alternates: gboolean, + ) -> gboolean; +} +extern "C" { + pub fn g_strv_contains(strv: *const *const gchar, str_: *const gchar) -> gboolean; +} +extern "C" { + pub fn g_strv_equal(strv1: *const *const gchar, strv2: *const *const gchar) -> gboolean; +} +pub const GNumberParserError_G_NUMBER_PARSER_ERROR_INVALID: GNumberParserError = 0; +pub const GNumberParserError_G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: GNumberParserError = 1; +pub type GNumberParserError = ::std::os::raw::c_uint; +extern "C" { + pub fn g_number_parser_error_quark() -> GQuark; +} +extern "C" { + pub fn g_ascii_string_to_signed( + str_: *const gchar, + base: guint, + min: gint64, + max: gint64, + out_num: *mut gint64, + error: *mut *mut GError, + ) -> gboolean; +} +extern "C" { + pub fn g_ascii_string_to_unsigned( + str_: *const gchar, + base: guint, + min: guint64, + max: guint64, + out_num: *mut guint64, + error: *mut *mut GError, + ) -> gboolean; +} +pub type GString = _GString; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _GString { + pub str_: *mut gchar, + pub len: gsize, + pub allocated_len: gsize, +} +#[test] +fn bindgen_test_layout__GString() { + const UNINIT: ::std::mem::MaybeUninit<_GString> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_GString>(), + 24usize, + concat!("Size of: ", stringify!(_GString)) + ); + assert_eq!( + ::std::mem::align_of::<_GString>(), + 8usize, + concat!("Alignment of ", stringify!(_GString)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_GString), + "::", + stringify!(str_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_GString), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).allocated_len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_GString), + "::", + stringify!(allocated_len) + ) + ); +} +extern "C" { + pub fn g_string_new(init: *const gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_new_take(init: *mut gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_new_len(init: *const gchar, len: gssize) -> *mut GString; +} +extern "C" { + pub fn g_string_sized_new(dfl_size: gsize) -> *mut GString; +} +extern "C" { + pub fn g_string_free(string: *mut GString, free_segment: gboolean) -> *mut gchar; +} +extern "C" { + pub fn g_string_free_and_steal(string: *mut GString) -> *mut gchar; +} +extern "C" { + pub fn g_string_free_to_bytes(string: *mut GString) -> *mut GBytes; +} +extern "C" { + pub fn g_string_equal(v: *const GString, v2: *const GString) -> gboolean; +} +extern "C" { + pub fn g_string_hash(str_: *const GString) -> guint; +} +extern "C" { + pub fn g_string_assign(string: *mut GString, rval: *const gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_truncate(string: *mut GString, len: gsize) -> *mut GString; +} +extern "C" { + pub fn g_string_set_size(string: *mut GString, len: gsize) -> *mut GString; +} +extern "C" { + pub fn g_string_insert_len( + string: *mut GString, + pos: gssize, + val: *const gchar, + len: gssize, + ) -> *mut GString; +} +extern "C" { + pub fn g_string_append(string: *mut GString, val: *const gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_append_len( + string: *mut GString, + val: *const gchar, + len: gssize, + ) -> *mut GString; +} +extern "C" { + pub fn g_string_append_c(string: *mut GString, c: gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_append_unichar(string: *mut GString, wc: gunichar) -> *mut GString; +} +extern "C" { + pub fn g_string_prepend(string: *mut GString, val: *const gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_prepend_c(string: *mut GString, c: gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_prepend_unichar(string: *mut GString, wc: gunichar) -> *mut GString; +} +extern "C" { + pub fn g_string_prepend_len( + string: *mut GString, + val: *const gchar, + len: gssize, + ) -> *mut GString; +} +extern "C" { + pub fn g_string_insert(string: *mut GString, pos: gssize, val: *const gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_insert_c(string: *mut GString, pos: gssize, c: gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_insert_unichar(string: *mut GString, pos: gssize, wc: gunichar) + -> *mut GString; +} +extern "C" { + pub fn g_string_overwrite(string: *mut GString, pos: gsize, val: *const gchar) -> *mut GString; +} +extern "C" { + pub fn g_string_overwrite_len( + string: *mut GString, + pos: gsize, + val: *const gchar, + len: gssize, + ) -> *mut GString; +} +extern "C" { + pub fn g_string_erase(string: *mut GString, pos: gssize, len: gssize) -> *mut GString; +} +extern "C" { + pub fn g_string_replace( + string: *mut GString, + find: *const gchar, + replace: *const gchar, + limit: guint, + ) -> guint; +} +extern "C" { + pub fn g_string_ascii_down(string: *mut GString) -> *mut GString; +} +extern "C" { + pub fn g_string_ascii_up(string: *mut GString) -> *mut GString; +} +extern "C" { + pub fn g_string_vprintf(string: *mut GString, format: *const gchar, args: *mut __va_list_tag); +} +extern "C" { + pub fn g_string_printf(string: *mut GString, format: *const gchar, ...); +} +extern "C" { + pub fn g_string_append_vprintf( + string: *mut GString, + format: *const gchar, + args: *mut __va_list_tag, + ); +} +extern "C" { + pub fn g_string_append_printf(string: *mut GString, format: *const gchar, ...); +} +extern "C" { + pub fn g_string_append_uri_escaped( + string: *mut GString, + unescaped: *const gchar, + reserved_chars_allowed: *const gchar, + allow_utf8: gboolean, + ) -> *mut GString; +} +extern "C" { + pub fn g_string_down(string: *mut GString) -> *mut GString; +} +extern "C" { + pub fn g_string_up(string: *mut GString) -> *mut GString; +} +pub type GIOChannel = _GIOChannel; +pub type GIOFuncs = _GIOFuncs; +pub const GIOError_G_IO_ERROR_NONE: GIOError = 0; +pub const GIOError_G_IO_ERROR_AGAIN: GIOError = 1; +pub const GIOError_G_IO_ERROR_INVAL: GIOError = 2; +pub const GIOError_G_IO_ERROR_UNKNOWN: GIOError = 3; +pub type GIOError = ::std::os::raw::c_uint; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_FBIG: GIOChannelError = 0; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_INVAL: GIOChannelError = 1; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_IO: GIOChannelError = 2; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_ISDIR: GIOChannelError = 3; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_NOSPC: GIOChannelError = 4; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_NXIO: GIOChannelError = 5; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_OVERFLOW: GIOChannelError = 6; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_PIPE: GIOChannelError = 7; +pub const GIOChannelError_G_IO_CHANNEL_ERROR_FAILED: GIOChannelError = 8; +pub type GIOChannelError = ::std::os::raw::c_uint; +pub const GIOStatus_G_IO_STATUS_ERROR: GIOStatus = 0; +pub const GIOStatus_G_IO_STATUS_NORMAL: GIOStatus = 1; +pub const GIOStatus_G_IO_STATUS_EOF: GIOStatus = 2; +pub const GIOStatus_G_IO_STATUS_AGAIN: GIOStatus = 3; +pub type GIOStatus = ::std::os::raw::c_uint; +pub const GSeekType_G_SEEK_CUR: GSeekType = 0; +pub const GSeekType_G_SEEK_SET: GSeekType = 1; +pub const GSeekType_G_SEEK_END: GSeekType = 2; +pub type GSeekType = ::std::os::raw::c_uint; +pub const GIOFlags_G_IO_FLAG_NONE: GIOFlags = 0; +pub const GIOFlags_G_IO_FLAG_APPEND: GIOFlags = 1; +pub const GIOFlags_G_IO_FLAG_NONBLOCK: GIOFlags = 2; +pub const GIOFlags_G_IO_FLAG_IS_READABLE: GIOFlags = 4; +pub const GIOFlags_G_IO_FLAG_IS_WRITABLE: GIOFlags = 8; +pub const GIOFlags_G_IO_FLAG_IS_WRITEABLE: GIOFlags = 8; +pub const GIOFlags_G_IO_FLAG_IS_SEEKABLE: GIOFlags = 16; +pub const GIOFlags_G_IO_FLAG_MASK: GIOFlags = 31; +pub const GIOFlags_G_IO_FLAG_GET_MASK: GIOFlags = 31; +pub const GIOFlags_G_IO_FLAG_SET_MASK: GIOFlags = 3; +pub type GIOFlags = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _GIOChannel { + pub ref_count: gint, + pub funcs: *mut GIOFuncs, + pub encoding: *mut gchar, + pub read_cd: GIConv, + pub write_cd: GIConv, + pub line_term: *mut gchar, + pub line_term_len: guint, + pub buf_size: gsize, + pub read_buf: *mut GString, + pub encoded_read_buf: *mut GString, + pub write_buf: *mut GString, + pub partial_write_buf: [gchar; 6usize], + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub reserved1: gpointer, + pub reserved2: gpointer, +} +#[test] +fn bindgen_test_layout__GIOChannel() { + const UNINIT: ::std::mem::MaybeUninit<_GIOChannel> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_GIOChannel>(), + 112usize, + concat!("Size of: ", stringify!(_GIOChannel)) + ); + assert_eq!( + ::std::mem::align_of::<_GIOChannel>(), + 8usize, + concat!("Alignment of ", stringify!(_GIOChannel)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(ref_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).funcs) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(funcs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).encoding) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(encoding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).read_cd) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(read_cd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).write_cd) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(write_cd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).line_term) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(line_term) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).line_term_len) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_GIOChannel), + "::", + stringify!(line_term_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buf_size) as usize - ptr as usize }, + 56usize, concat!( "Offset of field: ", stringify!(_GIOChannel), @@ -14340,6 +14842,7 @@ pub type GMarkupError = ::std::os::raw::c_uint; extern "C" { pub fn g_markup_error_quark() -> GQuark; } +pub const GMarkupParseFlags_G_MARKUP_DEFAULT_FLAGS: GMarkupParseFlags = 0; pub const GMarkupParseFlags_G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: GMarkupParseFlags = 1; pub const GMarkupParseFlags_G_MARKUP_TREAT_CDATA_AS_TEXT: GMarkupParseFlags = 2; pub const GMarkupParseFlags_G_MARKUP_PREFIX_ERROR_POSITION: GMarkupParseFlags = 4; @@ -14662,7 +15165,7 @@ extern "C" { ) -> *mut GVariantType; } extern "C" { - pub fn g_variant_type_checked_(arg1: *const gchar) -> *const GVariantType; + pub fn g_variant_type_checked_(type_string: *const gchar) -> *const GVariantType; } extern "C" { pub fn g_variant_type_string_get_depth_(type_string: *const gchar) -> gsize; @@ -14984,7 +15487,7 @@ pub type GVariantIter = _GVariantIter; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GVariantIter { - pub x: [gsize; 16usize], + pub x: [guintptr; 16usize], } #[test] fn bindgen_test_layout__GVariantIter() { @@ -15053,14 +15556,14 @@ pub struct _GVariantBuilder { #[derive(Copy, Clone)] pub union _GVariantBuilder__bindgen_ty_1 { pub s: _GVariantBuilder__bindgen_ty_1__bindgen_ty_1, - pub x: [gsize; 16usize], + pub x: [guintptr; 16usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GVariantBuilder__bindgen_ty_1__bindgen_ty_1 { pub partial_magic: gsize, pub type_: *const GVariantType, - pub y: [gsize; 14usize], + pub y: [guintptr; 14usize], } #[test] fn bindgen_test_layout__GVariantBuilder__bindgen_ty_1__bindgen_ty_1() { @@ -15297,14 +15800,14 @@ pub struct _GVariantDict { #[derive(Copy, Clone)] pub union _GVariantDict__bindgen_ty_1 { pub s: _GVariantDict__bindgen_ty_1__bindgen_ty_1, - pub x: [gsize; 16usize], + pub x: [guintptr; 16usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GVariantDict__bindgen_ty_1__bindgen_ty_1 { pub asv: *mut GVariant, pub partial_magic: gsize, - pub y: [gsize; 14usize], + pub y: [guintptr; 14usize], } #[test] fn bindgen_test_layout__GVariantDict__bindgen_ty_1__bindgen_ty_1() { @@ -15647,6 +16150,14 @@ extern "C" { use_color: gboolean, ) -> *mut gchar; } +extern "C" { + pub fn g_log_writer_syslog( + log_level: GLogLevelFlags, + fields: *const GLogField, + n_fields: gsize, + user_data: gpointer, + ) -> GLogWriterOutput; +} extern "C" { pub fn g_log_writer_journald( log_level: GLogLevelFlags, @@ -15680,6 +16191,9 @@ extern "C" { log_domain: *const ::std::os::raw::c_char, ) -> gboolean; } +extern "C" { + pub fn g_log_writer_default_set_debug_domains(domains: *const *const gchar); +} extern "C" { pub fn g_log_get_debug_enabled() -> gboolean; } @@ -16038,6 +16552,94 @@ extern "C" { extern "C" { pub fn g_option_group_set_translation_domain(group: *mut GOptionGroup, domain: *const gchar); } +pub type GPathBuf = _GPathBuf; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _GPathBuf { + pub dummy: [gpointer; 8usize], +} +#[test] +fn bindgen_test_layout__GPathBuf() { + const UNINIT: ::std::mem::MaybeUninit<_GPathBuf> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_GPathBuf>(), + 64usize, + concat!("Size of: ", stringify!(_GPathBuf)) + ); + assert_eq!( + ::std::mem::align_of::<_GPathBuf>(), + 8usize, + concat!("Alignment of ", stringify!(_GPathBuf)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dummy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_GPathBuf), + "::", + stringify!(dummy) + ) + ); +} +extern "C" { + pub fn g_path_buf_new() -> *mut GPathBuf; +} +extern "C" { + pub fn g_path_buf_new_from_path(path: *const ::std::os::raw::c_char) -> *mut GPathBuf; +} +extern "C" { + pub fn g_path_buf_init(buf: *mut GPathBuf) -> *mut GPathBuf; +} +extern "C" { + pub fn g_path_buf_init_from_path( + buf: *mut GPathBuf, + path: *const ::std::os::raw::c_char, + ) -> *mut GPathBuf; +} +extern "C" { + pub fn g_path_buf_clear(buf: *mut GPathBuf); +} +extern "C" { + pub fn g_path_buf_clear_to_path(buf: *mut GPathBuf) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn g_path_buf_free(buf: *mut GPathBuf); +} +extern "C" { + pub fn g_path_buf_free_to_path(buf: *mut GPathBuf) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn g_path_buf_copy(buf: *mut GPathBuf) -> *mut GPathBuf; +} +extern "C" { + pub fn g_path_buf_push( + buf: *mut GPathBuf, + path: *const ::std::os::raw::c_char, + ) -> *mut GPathBuf; +} +extern "C" { + pub fn g_path_buf_pop(buf: *mut GPathBuf) -> gboolean; +} +extern "C" { + pub fn g_path_buf_set_filename( + buf: *mut GPathBuf, + file_name: *const ::std::os::raw::c_char, + ) -> gboolean; +} +extern "C" { + pub fn g_path_buf_set_extension( + buf: *mut GPathBuf, + extension: *const ::std::os::raw::c_char, + ) -> gboolean; +} +extern "C" { + pub fn g_path_buf_to_path(buf: *mut GPathBuf) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn g_path_buf_equal(v1: gconstpointer, v2: gconstpointer) -> gboolean; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GPatternSpec { @@ -16489,6 +17091,7 @@ pub type GRegexError = ::std::os::raw::c_uint; extern "C" { pub fn g_regex_error_quark() -> GQuark; } +pub const GRegexCompileFlags_G_REGEX_DEFAULT: GRegexCompileFlags = 0; pub const GRegexCompileFlags_G_REGEX_CASELESS: GRegexCompileFlags = 1; pub const GRegexCompileFlags_G_REGEX_MULTILINE: GRegexCompileFlags = 2; pub const GRegexCompileFlags_G_REGEX_DOTALL: GRegexCompileFlags = 4; @@ -16508,6 +17111,7 @@ pub const GRegexCompileFlags_G_REGEX_NEWLINE_ANYCRLF: GRegexCompileFlags = 52428 pub const GRegexCompileFlags_G_REGEX_BSR_ANYCRLF: GRegexCompileFlags = 8388608; pub const GRegexCompileFlags_G_REGEX_JAVASCRIPT_COMPAT: GRegexCompileFlags = 33554432; pub type GRegexCompileFlags = ::std::os::raw::c_uint; +pub const GRegexMatchFlags_G_REGEX_MATCH_DEFAULT: GRegexMatchFlags = 0; pub const GRegexMatchFlags_G_REGEX_MATCH_ANCHORED: GRegexMatchFlags = 16; pub const GRegexMatchFlags_G_REGEX_MATCH_NOTBOL: GRegexMatchFlags = 128; pub const GRegexMatchFlags_G_REGEX_MATCH_NOTEOL: GRegexMatchFlags = 256; @@ -17627,740 +18231,496 @@ fn bindgen_test_layout__GScanner() { stringify!(_GScanner), "::", stringify!(scope_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).msg_handler) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_GScanner), - "::", - stringify!(msg_handler) - ) - ); -} -extern "C" { - pub fn g_scanner_new(config_templ: *const GScannerConfig) -> *mut GScanner; -} -extern "C" { - pub fn g_scanner_destroy(scanner: *mut GScanner); -} -extern "C" { - pub fn g_scanner_input_file(scanner: *mut GScanner, input_fd: gint); -} -extern "C" { - pub fn g_scanner_sync_file_offset(scanner: *mut GScanner); -} -extern "C" { - pub fn g_scanner_input_text(scanner: *mut GScanner, text: *const gchar, text_len: guint); -} -extern "C" { - pub fn g_scanner_get_next_token(scanner: *mut GScanner) -> GTokenType; -} -extern "C" { - pub fn g_scanner_peek_next_token(scanner: *mut GScanner) -> GTokenType; -} -extern "C" { - pub fn g_scanner_cur_token(scanner: *mut GScanner) -> GTokenType; -} -extern "C" { - pub fn g_scanner_cur_value(scanner: *mut GScanner) -> GTokenValue; -} -extern "C" { - pub fn g_scanner_cur_line(scanner: *mut GScanner) -> guint; -} -extern "C" { - pub fn g_scanner_cur_position(scanner: *mut GScanner) -> guint; -} -extern "C" { - pub fn g_scanner_eof(scanner: *mut GScanner) -> gboolean; -} -extern "C" { - pub fn g_scanner_set_scope(scanner: *mut GScanner, scope_id: guint) -> guint; -} -extern "C" { - pub fn g_scanner_scope_add_symbol( - scanner: *mut GScanner, - scope_id: guint, - symbol: *const gchar, - value: gpointer, - ); -} -extern "C" { - pub fn g_scanner_scope_remove_symbol( - scanner: *mut GScanner, - scope_id: guint, - symbol: *const gchar, - ); -} -extern "C" { - pub fn g_scanner_scope_lookup_symbol( - scanner: *mut GScanner, - scope_id: guint, - symbol: *const gchar, - ) -> gpointer; -} -extern "C" { - pub fn g_scanner_scope_foreach_symbol( - scanner: *mut GScanner, - scope_id: guint, - func: GHFunc, - user_data: gpointer, - ); -} -extern "C" { - pub fn g_scanner_lookup_symbol(scanner: *mut GScanner, symbol: *const gchar) -> gpointer; -} -extern "C" { - pub fn g_scanner_unexp_token( - scanner: *mut GScanner, - expected_token: GTokenType, - identifier_spec: *const gchar, - symbol_spec: *const gchar, - symbol_name: *const gchar, - message: *const gchar, - is_error: gint, - ); -} -extern "C" { - pub fn g_scanner_error(scanner: *mut GScanner, format: *const gchar, ...); -} -extern "C" { - pub fn g_scanner_warn(scanner: *mut GScanner, format: *const gchar, ...); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _GSequence { - _unused: [u8; 0], -} -pub type GSequence = _GSequence; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _GSequenceNode { - _unused: [u8; 0], -} -pub type GSequenceIter = _GSequenceNode; -pub type GSequenceIterCompareFunc = ::std::option::Option< - unsafe extern "C" fn(a: *mut GSequenceIter, b: *mut GSequenceIter, data: gpointer) -> gint, ->; -extern "C" { - pub fn g_sequence_new(data_destroy: GDestroyNotify) -> *mut GSequence; -} -extern "C" { - pub fn g_sequence_free(seq: *mut GSequence); -} -extern "C" { - pub fn g_sequence_get_length(seq: *mut GSequence) -> gint; -} -extern "C" { - pub fn g_sequence_foreach(seq: *mut GSequence, func: GFunc, user_data: gpointer); -} -extern "C" { - pub fn g_sequence_foreach_range( - begin: *mut GSequenceIter, - end: *mut GSequenceIter, - func: GFunc, - user_data: gpointer, - ); -} -extern "C" { - pub fn g_sequence_sort(seq: *mut GSequence, cmp_func: GCompareDataFunc, cmp_data: gpointer); -} -extern "C" { - pub fn g_sequence_sort_iter( - seq: *mut GSequence, - cmp_func: GSequenceIterCompareFunc, - cmp_data: gpointer, - ); -} -extern "C" { - pub fn g_sequence_is_empty(seq: *mut GSequence) -> gboolean; -} -extern "C" { - pub fn g_sequence_get_begin_iter(seq: *mut GSequence) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_get_end_iter(seq: *mut GSequence) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_get_iter_at_pos(seq: *mut GSequence, pos: gint) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_append(seq: *mut GSequence, data: gpointer) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_prepend(seq: *mut GSequence, data: gpointer) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_insert_before(iter: *mut GSequenceIter, data: gpointer) - -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_move(src: *mut GSequenceIter, dest: *mut GSequenceIter); -} -extern "C" { - pub fn g_sequence_swap(a: *mut GSequenceIter, b: *mut GSequenceIter); -} -extern "C" { - pub fn g_sequence_insert_sorted( - seq: *mut GSequence, - data: gpointer, - cmp_func: GCompareDataFunc, - cmp_data: gpointer, - ) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_insert_sorted_iter( - seq: *mut GSequence, - data: gpointer, - iter_cmp: GSequenceIterCompareFunc, - cmp_data: gpointer, - ) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_sort_changed( - iter: *mut GSequenceIter, - cmp_func: GCompareDataFunc, - cmp_data: gpointer, - ); -} -extern "C" { - pub fn g_sequence_sort_changed_iter( - iter: *mut GSequenceIter, - iter_cmp: GSequenceIterCompareFunc, - cmp_data: gpointer, + ) ); -} -extern "C" { - pub fn g_sequence_remove(iter: *mut GSequenceIter); -} -extern "C" { - pub fn g_sequence_remove_range(begin: *mut GSequenceIter, end: *mut GSequenceIter); -} -extern "C" { - pub fn g_sequence_move_range( - dest: *mut GSequenceIter, - begin: *mut GSequenceIter, - end: *mut GSequenceIter, + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).msg_handler) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(_GScanner), + "::", + stringify!(msg_handler) + ) ); } extern "C" { - pub fn g_sequence_search( - seq: *mut GSequence, - data: gpointer, - cmp_func: GCompareDataFunc, - cmp_data: gpointer, - ) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_search_iter( - seq: *mut GSequence, - data: gpointer, - iter_cmp: GSequenceIterCompareFunc, - cmp_data: gpointer, - ) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_lookup( - seq: *mut GSequence, - data: gpointer, - cmp_func: GCompareDataFunc, - cmp_data: gpointer, - ) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_lookup_iter( - seq: *mut GSequence, - data: gpointer, - iter_cmp: GSequenceIterCompareFunc, - cmp_data: gpointer, - ) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_get(iter: *mut GSequenceIter) -> gpointer; -} -extern "C" { - pub fn g_sequence_set(iter: *mut GSequenceIter, data: gpointer); -} -extern "C" { - pub fn g_sequence_iter_is_begin(iter: *mut GSequenceIter) -> gboolean; -} -extern "C" { - pub fn g_sequence_iter_is_end(iter: *mut GSequenceIter) -> gboolean; -} -extern "C" { - pub fn g_sequence_iter_next(iter: *mut GSequenceIter) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_iter_prev(iter: *mut GSequenceIter) -> *mut GSequenceIter; -} -extern "C" { - pub fn g_sequence_iter_get_position(iter: *mut GSequenceIter) -> gint; + pub fn g_scanner_new(config_templ: *const GScannerConfig) -> *mut GScanner; } extern "C" { - pub fn g_sequence_iter_move(iter: *mut GSequenceIter, delta: gint) -> *mut GSequenceIter; + pub fn g_scanner_destroy(scanner: *mut GScanner); } extern "C" { - pub fn g_sequence_iter_get_sequence(iter: *mut GSequenceIter) -> *mut GSequence; + pub fn g_scanner_input_file(scanner: *mut GScanner, input_fd: gint); } extern "C" { - pub fn g_sequence_iter_compare(a: *mut GSequenceIter, b: *mut GSequenceIter) -> gint; + pub fn g_scanner_sync_file_offset(scanner: *mut GScanner); } extern "C" { - pub fn g_sequence_range_get_midpoint( - begin: *mut GSequenceIter, - end: *mut GSequenceIter, - ) -> *mut GSequenceIter; + pub fn g_scanner_input_text(scanner: *mut GScanner, text: *const gchar, text_len: guint); } -pub const GShellError_G_SHELL_ERROR_BAD_QUOTING: GShellError = 0; -pub const GShellError_G_SHELL_ERROR_EMPTY_STRING: GShellError = 1; -pub const GShellError_G_SHELL_ERROR_FAILED: GShellError = 2; -pub type GShellError = ::std::os::raw::c_uint; extern "C" { - pub fn g_shell_error_quark() -> GQuark; + pub fn g_scanner_get_next_token(scanner: *mut GScanner) -> GTokenType; } extern "C" { - pub fn g_shell_quote(unquoted_string: *const gchar) -> *mut gchar; + pub fn g_scanner_peek_next_token(scanner: *mut GScanner) -> GTokenType; } extern "C" { - pub fn g_shell_unquote(quoted_string: *const gchar, error: *mut *mut GError) -> *mut gchar; + pub fn g_scanner_cur_token(scanner: *mut GScanner) -> GTokenType; } extern "C" { - pub fn g_shell_parse_argv( - command_line: *const gchar, - argcp: *mut gint, - argvp: *mut *mut *mut gchar, - error: *mut *mut GError, - ) -> gboolean; + pub fn g_scanner_cur_value(scanner: *mut GScanner) -> GTokenValue; } extern "C" { - pub fn g_slice_alloc(block_size: gsize) -> gpointer; + pub fn g_scanner_cur_line(scanner: *mut GScanner) -> guint; } extern "C" { - pub fn g_slice_alloc0(block_size: gsize) -> gpointer; + pub fn g_scanner_cur_position(scanner: *mut GScanner) -> guint; } extern "C" { - pub fn g_slice_copy(block_size: gsize, mem_block: gconstpointer) -> gpointer; + pub fn g_scanner_eof(scanner: *mut GScanner) -> gboolean; } extern "C" { - pub fn g_slice_free1(block_size: gsize, mem_block: gpointer); + pub fn g_scanner_set_scope(scanner: *mut GScanner, scope_id: guint) -> guint; } extern "C" { - pub fn g_slice_free_chain_with_offset( - block_size: gsize, - mem_chain: gpointer, - next_offset: gsize, + pub fn g_scanner_scope_add_symbol( + scanner: *mut GScanner, + scope_id: guint, + symbol: *const gchar, + value: gpointer, ); } -pub const GSliceConfig_G_SLICE_CONFIG_ALWAYS_MALLOC: GSliceConfig = 1; -pub const GSliceConfig_G_SLICE_CONFIG_BYPASS_MAGAZINES: GSliceConfig = 2; -pub const GSliceConfig_G_SLICE_CONFIG_WORKING_SET_MSECS: GSliceConfig = 3; -pub const GSliceConfig_G_SLICE_CONFIG_COLOR_INCREMENT: GSliceConfig = 4; -pub const GSliceConfig_G_SLICE_CONFIG_CHUNK_SIZES: GSliceConfig = 5; -pub const GSliceConfig_G_SLICE_CONFIG_CONTENTION_COUNTER: GSliceConfig = 6; -pub type GSliceConfig = ::std::os::raw::c_uint; -extern "C" { - pub fn g_slice_set_config(ckey: GSliceConfig, value: gint64); -} -extern "C" { - pub fn g_slice_get_config(ckey: GSliceConfig) -> gint64; -} -extern "C" { - pub fn g_slice_get_config_state( - ckey: GSliceConfig, - address: gint64, - n_values: *mut guint, - ) -> *mut gint64; -} -pub const GSpawnError_G_SPAWN_ERROR_FORK: GSpawnError = 0; -pub const GSpawnError_G_SPAWN_ERROR_READ: GSpawnError = 1; -pub const GSpawnError_G_SPAWN_ERROR_CHDIR: GSpawnError = 2; -pub const GSpawnError_G_SPAWN_ERROR_ACCES: GSpawnError = 3; -pub const GSpawnError_G_SPAWN_ERROR_PERM: GSpawnError = 4; -pub const GSpawnError_G_SPAWN_ERROR_TOO_BIG: GSpawnError = 5; -pub const GSpawnError_G_SPAWN_ERROR_2BIG: GSpawnError = 5; -pub const GSpawnError_G_SPAWN_ERROR_NOEXEC: GSpawnError = 6; -pub const GSpawnError_G_SPAWN_ERROR_NAMETOOLONG: GSpawnError = 7; -pub const GSpawnError_G_SPAWN_ERROR_NOENT: GSpawnError = 8; -pub const GSpawnError_G_SPAWN_ERROR_NOMEM: GSpawnError = 9; -pub const GSpawnError_G_SPAWN_ERROR_NOTDIR: GSpawnError = 10; -pub const GSpawnError_G_SPAWN_ERROR_LOOP: GSpawnError = 11; -pub const GSpawnError_G_SPAWN_ERROR_TXTBUSY: GSpawnError = 12; -pub const GSpawnError_G_SPAWN_ERROR_IO: GSpawnError = 13; -pub const GSpawnError_G_SPAWN_ERROR_NFILE: GSpawnError = 14; -pub const GSpawnError_G_SPAWN_ERROR_MFILE: GSpawnError = 15; -pub const GSpawnError_G_SPAWN_ERROR_INVAL: GSpawnError = 16; -pub const GSpawnError_G_SPAWN_ERROR_ISDIR: GSpawnError = 17; -pub const GSpawnError_G_SPAWN_ERROR_LIBBAD: GSpawnError = 18; -pub const GSpawnError_G_SPAWN_ERROR_FAILED: GSpawnError = 19; -pub type GSpawnError = ::std::os::raw::c_uint; -pub type GSpawnChildSetupFunc = ::std::option::Option; -pub const GSpawnFlags_G_SPAWN_DEFAULT: GSpawnFlags = 0; -pub const GSpawnFlags_G_SPAWN_LEAVE_DESCRIPTORS_OPEN: GSpawnFlags = 1; -pub const GSpawnFlags_G_SPAWN_DO_NOT_REAP_CHILD: GSpawnFlags = 2; -pub const GSpawnFlags_G_SPAWN_SEARCH_PATH: GSpawnFlags = 4; -pub const GSpawnFlags_G_SPAWN_STDOUT_TO_DEV_NULL: GSpawnFlags = 8; -pub const GSpawnFlags_G_SPAWN_STDERR_TO_DEV_NULL: GSpawnFlags = 16; -pub const GSpawnFlags_G_SPAWN_CHILD_INHERITS_STDIN: GSpawnFlags = 32; -pub const GSpawnFlags_G_SPAWN_FILE_AND_ARGV_ZERO: GSpawnFlags = 64; -pub const GSpawnFlags_G_SPAWN_SEARCH_PATH_FROM_ENVP: GSpawnFlags = 128; -pub const GSpawnFlags_G_SPAWN_CLOEXEC_PIPES: GSpawnFlags = 256; -pub type GSpawnFlags = ::std::os::raw::c_uint; -extern "C" { - pub fn g_spawn_error_quark() -> GQuark; -} -extern "C" { - pub fn g_spawn_exit_error_quark() -> GQuark; -} -extern "C" { - pub fn g_spawn_async( - working_directory: *const gchar, - argv: *mut *mut gchar, - envp: *mut *mut gchar, - flags: GSpawnFlags, - child_setup: GSpawnChildSetupFunc, - user_data: gpointer, - child_pid: *mut GPid, - error: *mut *mut GError, - ) -> gboolean; -} -extern "C" { - pub fn g_spawn_async_with_pipes( - working_directory: *const gchar, - argv: *mut *mut gchar, - envp: *mut *mut gchar, - flags: GSpawnFlags, - child_setup: GSpawnChildSetupFunc, - user_data: gpointer, - child_pid: *mut GPid, - standard_input: *mut gint, - standard_output: *mut gint, - standard_error: *mut gint, - error: *mut *mut GError, - ) -> gboolean; -} -extern "C" { - pub fn g_spawn_async_with_pipes_and_fds( - working_directory: *const gchar, - argv: *const *const gchar, - envp: *const *const gchar, - flags: GSpawnFlags, - child_setup: GSpawnChildSetupFunc, - user_data: gpointer, - stdin_fd: gint, - stdout_fd: gint, - stderr_fd: gint, - source_fds: *const gint, - target_fds: *const gint, - n_fds: gsize, - child_pid_out: *mut GPid, - stdin_pipe_out: *mut gint, - stdout_pipe_out: *mut gint, - stderr_pipe_out: *mut gint, - error: *mut *mut GError, - ) -> gboolean; -} -extern "C" { - pub fn g_spawn_async_with_fds( - working_directory: *const gchar, - argv: *mut *mut gchar, - envp: *mut *mut gchar, - flags: GSpawnFlags, - child_setup: GSpawnChildSetupFunc, - user_data: gpointer, - child_pid: *mut GPid, - stdin_fd: gint, - stdout_fd: gint, - stderr_fd: gint, - error: *mut *mut GError, - ) -> gboolean; -} extern "C" { - pub fn g_spawn_sync( - working_directory: *const gchar, - argv: *mut *mut gchar, - envp: *mut *mut gchar, - flags: GSpawnFlags, - child_setup: GSpawnChildSetupFunc, - user_data: gpointer, - standard_output: *mut *mut gchar, - standard_error: *mut *mut gchar, - wait_status: *mut gint, - error: *mut *mut GError, - ) -> gboolean; + pub fn g_scanner_scope_remove_symbol( + scanner: *mut GScanner, + scope_id: guint, + symbol: *const gchar, + ); } extern "C" { - pub fn g_spawn_command_line_sync( - command_line: *const gchar, - standard_output: *mut *mut gchar, - standard_error: *mut *mut gchar, - wait_status: *mut gint, - error: *mut *mut GError, - ) -> gboolean; + pub fn g_scanner_scope_lookup_symbol( + scanner: *mut GScanner, + scope_id: guint, + symbol: *const gchar, + ) -> gpointer; } extern "C" { - pub fn g_spawn_command_line_async( - command_line: *const gchar, - error: *mut *mut GError, - ) -> gboolean; + pub fn g_scanner_scope_foreach_symbol( + scanner: *mut GScanner, + scope_id: guint, + func: GHFunc, + user_data: gpointer, + ); } extern "C" { - pub fn g_spawn_check_wait_status(wait_status: gint, error: *mut *mut GError) -> gboolean; + pub fn g_scanner_lookup_symbol(scanner: *mut GScanner, symbol: *const gchar) -> gpointer; } extern "C" { - pub fn g_spawn_check_exit_status(wait_status: gint, error: *mut *mut GError) -> gboolean; + pub fn g_scanner_unexp_token( + scanner: *mut GScanner, + expected_token: GTokenType, + identifier_spec: *const gchar, + symbol_spec: *const gchar, + symbol_name: *const gchar, + message: *const gchar, + is_error: gint, + ); } extern "C" { - pub fn g_spawn_close_pid(pid: GPid); + pub fn g_scanner_error(scanner: *mut GScanner, format: *const gchar, ...); } -pub const GAsciiType_G_ASCII_ALNUM: GAsciiType = 1; -pub const GAsciiType_G_ASCII_ALPHA: GAsciiType = 2; -pub const GAsciiType_G_ASCII_CNTRL: GAsciiType = 4; -pub const GAsciiType_G_ASCII_DIGIT: GAsciiType = 8; -pub const GAsciiType_G_ASCII_GRAPH: GAsciiType = 16; -pub const GAsciiType_G_ASCII_LOWER: GAsciiType = 32; -pub const GAsciiType_G_ASCII_PRINT: GAsciiType = 64; -pub const GAsciiType_G_ASCII_PUNCT: GAsciiType = 128; -pub const GAsciiType_G_ASCII_SPACE: GAsciiType = 256; -pub const GAsciiType_G_ASCII_UPPER: GAsciiType = 512; -pub const GAsciiType_G_ASCII_XDIGIT: GAsciiType = 1024; -pub type GAsciiType = ::std::os::raw::c_uint; extern "C" { - pub static g_ascii_table: *const guint16; + pub fn g_scanner_warn(scanner: *mut GScanner, format: *const gchar, ...); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _GSequence { + _unused: [u8; 0], +} +pub type GSequence = _GSequence; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _GSequenceNode { + _unused: [u8; 0], } +pub type GSequenceIter = _GSequenceNode; +pub type GSequenceIterCompareFunc = ::std::option::Option< + unsafe extern "C" fn(a: *mut GSequenceIter, b: *mut GSequenceIter, data: gpointer) -> gint, +>; extern "C" { - pub fn g_ascii_tolower(c: gchar) -> gchar; + pub fn g_sequence_new(data_destroy: GDestroyNotify) -> *mut GSequence; } extern "C" { - pub fn g_ascii_toupper(c: gchar) -> gchar; + pub fn g_sequence_free(seq: *mut GSequence); } extern "C" { - pub fn g_ascii_digit_value(c: gchar) -> gint; + pub fn g_sequence_get_length(seq: *mut GSequence) -> gint; } extern "C" { - pub fn g_ascii_xdigit_value(c: gchar) -> gint; + pub fn g_sequence_foreach(seq: *mut GSequence, func: GFunc, user_data: gpointer); } extern "C" { - pub fn g_strdelimit( - string: *mut gchar, - delimiters: *const gchar, - new_delimiter: gchar, - ) -> *mut gchar; + pub fn g_sequence_foreach_range( + begin: *mut GSequenceIter, + end: *mut GSequenceIter, + func: GFunc, + user_data: gpointer, + ); } extern "C" { - pub fn g_strcanon( - string: *mut gchar, - valid_chars: *const gchar, - substitutor: gchar, - ) -> *mut gchar; + pub fn g_sequence_sort(seq: *mut GSequence, cmp_func: GCompareDataFunc, cmp_data: gpointer); } extern "C" { - pub fn g_strerror(errnum: gint) -> *const gchar; + pub fn g_sequence_sort_iter( + seq: *mut GSequence, + cmp_func: GSequenceIterCompareFunc, + cmp_data: gpointer, + ); } extern "C" { - pub fn g_strsignal(signum: gint) -> *const gchar; + pub fn g_sequence_is_empty(seq: *mut GSequence) -> gboolean; } extern "C" { - pub fn g_strreverse(string: *mut gchar) -> *mut gchar; + pub fn g_sequence_get_begin_iter(seq: *mut GSequence) -> *mut GSequenceIter; } extern "C" { - pub fn g_strlcpy(dest: *mut gchar, src: *const gchar, dest_size: gsize) -> gsize; + pub fn g_sequence_get_end_iter(seq: *mut GSequence) -> *mut GSequenceIter; } extern "C" { - pub fn g_strlcat(dest: *mut gchar, src: *const gchar, dest_size: gsize) -> gsize; + pub fn g_sequence_get_iter_at_pos(seq: *mut GSequence, pos: gint) -> *mut GSequenceIter; } extern "C" { - pub fn g_strstr_len( - haystack: *const gchar, - haystack_len: gssize, - needle: *const gchar, - ) -> *mut gchar; + pub fn g_sequence_append(seq: *mut GSequence, data: gpointer) -> *mut GSequenceIter; } extern "C" { - pub fn g_strrstr(haystack: *const gchar, needle: *const gchar) -> *mut gchar; + pub fn g_sequence_prepend(seq: *mut GSequence, data: gpointer) -> *mut GSequenceIter; } extern "C" { - pub fn g_strrstr_len( - haystack: *const gchar, - haystack_len: gssize, - needle: *const gchar, - ) -> *mut gchar; + pub fn g_sequence_insert_before(iter: *mut GSequenceIter, data: gpointer) + -> *mut GSequenceIter; } extern "C" { - pub fn g_str_has_suffix(str_: *const gchar, suffix: *const gchar) -> gboolean; + pub fn g_sequence_move(src: *mut GSequenceIter, dest: *mut GSequenceIter); } extern "C" { - pub fn g_str_has_prefix(str_: *const gchar, prefix: *const gchar) -> gboolean; + pub fn g_sequence_swap(a: *mut GSequenceIter, b: *mut GSequenceIter); } extern "C" { - pub fn g_strtod(nptr: *const gchar, endptr: *mut *mut gchar) -> gdouble; + pub fn g_sequence_insert_sorted( + seq: *mut GSequence, + data: gpointer, + cmp_func: GCompareDataFunc, + cmp_data: gpointer, + ) -> *mut GSequenceIter; } extern "C" { - pub fn g_ascii_strtod(nptr: *const gchar, endptr: *mut *mut gchar) -> gdouble; + pub fn g_sequence_insert_sorted_iter( + seq: *mut GSequence, + data: gpointer, + iter_cmp: GSequenceIterCompareFunc, + cmp_data: gpointer, + ) -> *mut GSequenceIter; } extern "C" { - pub fn g_ascii_strtoull(nptr: *const gchar, endptr: *mut *mut gchar, base: guint) -> guint64; + pub fn g_sequence_sort_changed( + iter: *mut GSequenceIter, + cmp_func: GCompareDataFunc, + cmp_data: gpointer, + ); } extern "C" { - pub fn g_ascii_strtoll(nptr: *const gchar, endptr: *mut *mut gchar, base: guint) -> gint64; + pub fn g_sequence_sort_changed_iter( + iter: *mut GSequenceIter, + iter_cmp: GSequenceIterCompareFunc, + cmp_data: gpointer, + ); } extern "C" { - pub fn g_ascii_dtostr(buffer: *mut gchar, buf_len: gint, d: gdouble) -> *mut gchar; + pub fn g_sequence_remove(iter: *mut GSequenceIter); } extern "C" { - pub fn g_ascii_formatd( - buffer: *mut gchar, - buf_len: gint, - format: *const gchar, - d: gdouble, - ) -> *mut gchar; + pub fn g_sequence_remove_range(begin: *mut GSequenceIter, end: *mut GSequenceIter); } extern "C" { - pub fn g_strchug(string: *mut gchar) -> *mut gchar; + pub fn g_sequence_move_range( + dest: *mut GSequenceIter, + begin: *mut GSequenceIter, + end: *mut GSequenceIter, + ); } extern "C" { - pub fn g_strchomp(string: *mut gchar) -> *mut gchar; + pub fn g_sequence_search( + seq: *mut GSequence, + data: gpointer, + cmp_func: GCompareDataFunc, + cmp_data: gpointer, + ) -> *mut GSequenceIter; } extern "C" { - pub fn g_ascii_strcasecmp(s1: *const gchar, s2: *const gchar) -> gint; + pub fn g_sequence_search_iter( + seq: *mut GSequence, + data: gpointer, + iter_cmp: GSequenceIterCompareFunc, + cmp_data: gpointer, + ) -> *mut GSequenceIter; } extern "C" { - pub fn g_ascii_strncasecmp(s1: *const gchar, s2: *const gchar, n: gsize) -> gint; + pub fn g_sequence_lookup( + seq: *mut GSequence, + data: gpointer, + cmp_func: GCompareDataFunc, + cmp_data: gpointer, + ) -> *mut GSequenceIter; } extern "C" { - pub fn g_ascii_strdown(str_: *const gchar, len: gssize) -> *mut gchar; + pub fn g_sequence_lookup_iter( + seq: *mut GSequence, + data: gpointer, + iter_cmp: GSequenceIterCompareFunc, + cmp_data: gpointer, + ) -> *mut GSequenceIter; } extern "C" { - pub fn g_ascii_strup(str_: *const gchar, len: gssize) -> *mut gchar; + pub fn g_sequence_get(iter: *mut GSequenceIter) -> gpointer; } extern "C" { - pub fn g_str_is_ascii(str_: *const gchar) -> gboolean; + pub fn g_sequence_set(iter: *mut GSequenceIter, data: gpointer); } extern "C" { - pub fn g_strcasecmp(s1: *const gchar, s2: *const gchar) -> gint; + pub fn g_sequence_iter_is_begin(iter: *mut GSequenceIter) -> gboolean; } extern "C" { - pub fn g_strncasecmp(s1: *const gchar, s2: *const gchar, n: guint) -> gint; + pub fn g_sequence_iter_is_end(iter: *mut GSequenceIter) -> gboolean; } extern "C" { - pub fn g_strdown(string: *mut gchar) -> *mut gchar; + pub fn g_sequence_iter_next(iter: *mut GSequenceIter) -> *mut GSequenceIter; } extern "C" { - pub fn g_strup(string: *mut gchar) -> *mut gchar; + pub fn g_sequence_iter_prev(iter: *mut GSequenceIter) -> *mut GSequenceIter; } extern "C" { - pub fn g_strdup(str_: *const gchar) -> *mut gchar; + pub fn g_sequence_iter_get_position(iter: *mut GSequenceIter) -> gint; } extern "C" { - pub fn g_strdup_printf(format: *const gchar, ...) -> *mut gchar; + pub fn g_sequence_iter_move(iter: *mut GSequenceIter, delta: gint) -> *mut GSequenceIter; } extern "C" { - pub fn g_strdup_vprintf(format: *const gchar, args: *mut __va_list_tag) -> *mut gchar; + pub fn g_sequence_iter_get_sequence(iter: *mut GSequenceIter) -> *mut GSequence; } extern "C" { - pub fn g_strndup(str_: *const gchar, n: gsize) -> *mut gchar; + pub fn g_sequence_iter_compare(a: *mut GSequenceIter, b: *mut GSequenceIter) -> gint; } extern "C" { - pub fn g_strnfill(length: gsize, fill_char: gchar) -> *mut gchar; + pub fn g_sequence_range_get_midpoint( + begin: *mut GSequenceIter, + end: *mut GSequenceIter, + ) -> *mut GSequenceIter; } +pub const GShellError_G_SHELL_ERROR_BAD_QUOTING: GShellError = 0; +pub const GShellError_G_SHELL_ERROR_EMPTY_STRING: GShellError = 1; +pub const GShellError_G_SHELL_ERROR_FAILED: GShellError = 2; +pub type GShellError = ::std::os::raw::c_uint; extern "C" { - pub fn g_strconcat(string1: *const gchar, ...) -> *mut gchar; + pub fn g_shell_error_quark() -> GQuark; } extern "C" { - pub fn g_strjoin(separator: *const gchar, ...) -> *mut gchar; + pub fn g_shell_quote(unquoted_string: *const gchar) -> *mut gchar; } extern "C" { - pub fn g_strcompress(source: *const gchar) -> *mut gchar; + pub fn g_shell_unquote(quoted_string: *const gchar, error: *mut *mut GError) -> *mut gchar; } extern "C" { - pub fn g_strescape(source: *const gchar, exceptions: *const gchar) -> *mut gchar; + pub fn g_shell_parse_argv( + command_line: *const gchar, + argcp: *mut gint, + argvp: *mut *mut *mut gchar, + error: *mut *mut GError, + ) -> gboolean; } extern "C" { - pub fn g_memdup(mem: gconstpointer, byte_size: guint) -> gpointer; + pub fn g_slice_alloc(block_size: gsize) -> gpointer; } extern "C" { - pub fn g_memdup2(mem: gconstpointer, byte_size: gsize) -> gpointer; + pub fn g_slice_alloc0(block_size: gsize) -> gpointer; } -pub type GStrv = *mut *mut gchar; extern "C" { - pub fn g_strsplit( - string: *const gchar, - delimiter: *const gchar, - max_tokens: gint, - ) -> *mut *mut gchar; + pub fn g_slice_copy(block_size: gsize, mem_block: gconstpointer) -> gpointer; } extern "C" { - pub fn g_strsplit_set( - string: *const gchar, - delimiters: *const gchar, - max_tokens: gint, - ) -> *mut *mut gchar; + pub fn g_slice_free1(block_size: gsize, mem_block: gpointer); } extern "C" { - pub fn g_strjoinv(separator: *const gchar, str_array: *mut *mut gchar) -> *mut gchar; + pub fn g_slice_free_chain_with_offset( + block_size: gsize, + mem_chain: gpointer, + next_offset: gsize, + ); } +pub const GSliceConfig_G_SLICE_CONFIG_ALWAYS_MALLOC: GSliceConfig = 1; +pub const GSliceConfig_G_SLICE_CONFIG_BYPASS_MAGAZINES: GSliceConfig = 2; +pub const GSliceConfig_G_SLICE_CONFIG_WORKING_SET_MSECS: GSliceConfig = 3; +pub const GSliceConfig_G_SLICE_CONFIG_COLOR_INCREMENT: GSliceConfig = 4; +pub const GSliceConfig_G_SLICE_CONFIG_CHUNK_SIZES: GSliceConfig = 5; +pub const GSliceConfig_G_SLICE_CONFIG_CONTENTION_COUNTER: GSliceConfig = 6; +pub type GSliceConfig = ::std::os::raw::c_uint; extern "C" { - pub fn g_strfreev(str_array: *mut *mut gchar); + pub fn g_slice_set_config(ckey: GSliceConfig, value: gint64); } extern "C" { - pub fn g_strdupv(str_array: *mut *mut gchar) -> *mut *mut gchar; + pub fn g_slice_get_config(ckey: GSliceConfig) -> gint64; } extern "C" { - pub fn g_strv_length(str_array: *mut *mut gchar) -> guint; + pub fn g_slice_get_config_state( + ckey: GSliceConfig, + address: gint64, + n_values: *mut guint, + ) -> *mut gint64; } +pub const GSpawnError_G_SPAWN_ERROR_FORK: GSpawnError = 0; +pub const GSpawnError_G_SPAWN_ERROR_READ: GSpawnError = 1; +pub const GSpawnError_G_SPAWN_ERROR_CHDIR: GSpawnError = 2; +pub const GSpawnError_G_SPAWN_ERROR_ACCES: GSpawnError = 3; +pub const GSpawnError_G_SPAWN_ERROR_PERM: GSpawnError = 4; +pub const GSpawnError_G_SPAWN_ERROR_TOO_BIG: GSpawnError = 5; +pub const GSpawnError_G_SPAWN_ERROR_2BIG: GSpawnError = 5; +pub const GSpawnError_G_SPAWN_ERROR_NOEXEC: GSpawnError = 6; +pub const GSpawnError_G_SPAWN_ERROR_NAMETOOLONG: GSpawnError = 7; +pub const GSpawnError_G_SPAWN_ERROR_NOENT: GSpawnError = 8; +pub const GSpawnError_G_SPAWN_ERROR_NOMEM: GSpawnError = 9; +pub const GSpawnError_G_SPAWN_ERROR_NOTDIR: GSpawnError = 10; +pub const GSpawnError_G_SPAWN_ERROR_LOOP: GSpawnError = 11; +pub const GSpawnError_G_SPAWN_ERROR_TXTBUSY: GSpawnError = 12; +pub const GSpawnError_G_SPAWN_ERROR_IO: GSpawnError = 13; +pub const GSpawnError_G_SPAWN_ERROR_NFILE: GSpawnError = 14; +pub const GSpawnError_G_SPAWN_ERROR_MFILE: GSpawnError = 15; +pub const GSpawnError_G_SPAWN_ERROR_INVAL: GSpawnError = 16; +pub const GSpawnError_G_SPAWN_ERROR_ISDIR: GSpawnError = 17; +pub const GSpawnError_G_SPAWN_ERROR_LIBBAD: GSpawnError = 18; +pub const GSpawnError_G_SPAWN_ERROR_FAILED: GSpawnError = 19; +pub type GSpawnError = ::std::os::raw::c_uint; +pub type GSpawnChildSetupFunc = ::std::option::Option; +pub const GSpawnFlags_G_SPAWN_DEFAULT: GSpawnFlags = 0; +pub const GSpawnFlags_G_SPAWN_LEAVE_DESCRIPTORS_OPEN: GSpawnFlags = 1; +pub const GSpawnFlags_G_SPAWN_DO_NOT_REAP_CHILD: GSpawnFlags = 2; +pub const GSpawnFlags_G_SPAWN_SEARCH_PATH: GSpawnFlags = 4; +pub const GSpawnFlags_G_SPAWN_STDOUT_TO_DEV_NULL: GSpawnFlags = 8; +pub const GSpawnFlags_G_SPAWN_STDERR_TO_DEV_NULL: GSpawnFlags = 16; +pub const GSpawnFlags_G_SPAWN_CHILD_INHERITS_STDIN: GSpawnFlags = 32; +pub const GSpawnFlags_G_SPAWN_FILE_AND_ARGV_ZERO: GSpawnFlags = 64; +pub const GSpawnFlags_G_SPAWN_SEARCH_PATH_FROM_ENVP: GSpawnFlags = 128; +pub const GSpawnFlags_G_SPAWN_CLOEXEC_PIPES: GSpawnFlags = 256; +pub const GSpawnFlags_G_SPAWN_CHILD_INHERITS_STDOUT: GSpawnFlags = 512; +pub const GSpawnFlags_G_SPAWN_CHILD_INHERITS_STDERR: GSpawnFlags = 1024; +pub const GSpawnFlags_G_SPAWN_STDIN_FROM_DEV_NULL: GSpawnFlags = 2048; +pub type GSpawnFlags = ::std::os::raw::c_uint; extern "C" { - pub fn g_stpcpy(dest: *mut gchar, src: *const ::std::os::raw::c_char) -> *mut gchar; + pub fn g_spawn_error_quark() -> GQuark; } extern "C" { - pub fn g_str_to_ascii(str_: *const gchar, from_locale: *const gchar) -> *mut gchar; + pub fn g_spawn_exit_error_quark() -> GQuark; } extern "C" { - pub fn g_str_tokenize_and_fold( - string: *const gchar, - translit_locale: *const gchar, - ascii_alternates: *mut *mut *mut gchar, - ) -> *mut *mut gchar; + pub fn g_spawn_async( + working_directory: *const gchar, + argv: *mut *mut gchar, + envp: *mut *mut gchar, + flags: GSpawnFlags, + child_setup: GSpawnChildSetupFunc, + user_data: gpointer, + child_pid: *mut GPid, + error: *mut *mut GError, + ) -> gboolean; } extern "C" { - pub fn g_str_match_string( - search_term: *const gchar, - potential_hit: *const gchar, - accept_alternates: gboolean, + pub fn g_spawn_async_with_pipes( + working_directory: *const gchar, + argv: *mut *mut gchar, + envp: *mut *mut gchar, + flags: GSpawnFlags, + child_setup: GSpawnChildSetupFunc, + user_data: gpointer, + child_pid: *mut GPid, + standard_input: *mut gint, + standard_output: *mut gint, + standard_error: *mut gint, + error: *mut *mut GError, ) -> gboolean; } extern "C" { - pub fn g_strv_contains(strv: *const *const gchar, str_: *const gchar) -> gboolean; + pub fn g_spawn_async_with_pipes_and_fds( + working_directory: *const gchar, + argv: *const *const gchar, + envp: *const *const gchar, + flags: GSpawnFlags, + child_setup: GSpawnChildSetupFunc, + user_data: gpointer, + stdin_fd: gint, + stdout_fd: gint, + stderr_fd: gint, + source_fds: *const gint, + target_fds: *const gint, + n_fds: gsize, + child_pid_out: *mut GPid, + stdin_pipe_out: *mut gint, + stdout_pipe_out: *mut gint, + stderr_pipe_out: *mut gint, + error: *mut *mut GError, + ) -> gboolean; } extern "C" { - pub fn g_strv_equal(strv1: *const *const gchar, strv2: *const *const gchar) -> gboolean; + pub fn g_spawn_async_with_fds( + working_directory: *const gchar, + argv: *mut *mut gchar, + envp: *mut *mut gchar, + flags: GSpawnFlags, + child_setup: GSpawnChildSetupFunc, + user_data: gpointer, + child_pid: *mut GPid, + stdin_fd: gint, + stdout_fd: gint, + stderr_fd: gint, + error: *mut *mut GError, + ) -> gboolean; } -pub const GNumberParserError_G_NUMBER_PARSER_ERROR_INVALID: GNumberParserError = 0; -pub const GNumberParserError_G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: GNumberParserError = 1; -pub type GNumberParserError = ::std::os::raw::c_uint; extern "C" { - pub fn g_number_parser_error_quark() -> GQuark; + pub fn g_spawn_sync( + working_directory: *const gchar, + argv: *mut *mut gchar, + envp: *mut *mut gchar, + flags: GSpawnFlags, + child_setup: GSpawnChildSetupFunc, + user_data: gpointer, + standard_output: *mut *mut gchar, + standard_error: *mut *mut gchar, + wait_status: *mut gint, + error: *mut *mut GError, + ) -> gboolean; } extern "C" { - pub fn g_ascii_string_to_signed( - str_: *const gchar, - base: guint, - min: gint64, - max: gint64, - out_num: *mut gint64, + pub fn g_spawn_command_line_sync( + command_line: *const gchar, + standard_output: *mut *mut gchar, + standard_error: *mut *mut gchar, + wait_status: *mut gint, error: *mut *mut GError, ) -> gboolean; } extern "C" { - pub fn g_ascii_string_to_unsigned( - str_: *const gchar, - base: guint, - min: guint64, - max: guint64, - out_num: *mut guint64, + pub fn g_spawn_command_line_async( + command_line: *const gchar, error: *mut *mut GError, ) -> gboolean; } +extern "C" { + pub fn g_spawn_check_wait_status(wait_status: gint, error: *mut *mut GError) -> gboolean; +} +extern "C" { + pub fn g_spawn_check_exit_status(wait_status: gint, error: *mut *mut GError) -> gboolean; +} +extern "C" { + pub fn g_spawn_close_pid(pid: GPid); +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GStringChunk { @@ -18419,6 +18779,9 @@ extern "C" { extern "C" { pub fn g_strv_builder_add_many(builder: *mut GStrvBuilder, ...); } +extern "C" { + pub fn g_strv_builder_take(builder: *mut GStrvBuilder, value: *mut ::std::os::raw::c_char); +} extern "C" { pub fn g_strv_builder_end(builder: *mut GStrvBuilder) -> GStrv; } @@ -18517,6 +18880,9 @@ extern "C" { extern "C" { pub fn g_test_set_nonfatal_assertions(); } +extern "C" { + pub fn g_test_disable_crash_reporting(); +} extern "C" { pub fn g_test_message(format: *const ::std::os::raw::c_char, ...); } @@ -18544,6 +18910,7 @@ extern "C" { extern "C" { pub fn g_test_queue_destroy(destroy_func: GDestroyNotify, destroy_data: gpointer); } +pub const GTestTrapFlags_G_TEST_TRAP_DEFAULT: GTestTrapFlags = 0; pub const GTestTrapFlags_G_TEST_TRAP_SILENCE_STDOUT: GTestTrapFlags = 128; pub const GTestTrapFlags_G_TEST_TRAP_SILENCE_STDERR: GTestTrapFlags = 256; pub const GTestTrapFlags_G_TEST_TRAP_INHERIT_STDIN: GTestTrapFlags = 512; @@ -18551,6 +18918,7 @@ pub type GTestTrapFlags = ::std::os::raw::c_uint; extern "C" { pub fn g_test_trap_fork(usec_timeout: guint64, test_trap_flags: GTestTrapFlags) -> gboolean; } +pub const GTestSubprocessFlags_G_TEST_SUBPROCESS_DEFAULT: GTestSubprocessFlags = 0; pub const GTestSubprocessFlags_G_TEST_SUBPROCESS_INHERIT_STDIN: GTestSubprocessFlags = 1; pub const GTestSubprocessFlags_G_TEST_SUBPROCESS_INHERIT_STDOUT: GTestSubprocessFlags = 2; pub const GTestSubprocessFlags_G_TEST_SUBPROCESS_INHERIT_STDERR: GTestSubprocessFlags = 4; @@ -18562,6 +18930,14 @@ extern "C" { test_flags: GTestSubprocessFlags, ); } +extern "C" { + pub fn g_test_trap_subprocess_with_envp( + test_path: *const ::std::os::raw::c_char, + envp: *const *const ::std::os::raw::c_char, + usec_timeout: guint64, + test_flags: GTestSubprocessFlags, + ); +} extern "C" { pub fn g_test_trap_has_passed() -> gboolean; } @@ -18663,6 +19039,19 @@ extern "C" { first_wrong_idx: gsize, ); } +extern "C" { + pub fn g_assertion_message_cmpint( + domain: *const ::std::os::raw::c_char, + file: *const ::std::os::raw::c_char, + line: ::std::os::raw::c_int, + func: *const ::std::os::raw::c_char, + expr: *const ::std::os::raw::c_char, + arg1: guint64, + cmp: *const ::std::os::raw::c_char, + arg2: guint64, + numtype: ::std::os::raw::c_char, + ); +} extern "C" { pub fn g_assertion_message_cmpnum( domain: *const ::std::os::raw::c_char, @@ -19814,7 +20203,7 @@ extern "C" { } pub type GCompletion = _GCompletion; pub type GCompletionFunc = - ::std::option::Option *mut gchar>; + ::std::option::Option *mut gchar>; pub type GCompletionStrncmpFunc = ::std::option::Option< unsafe extern "C" fn(s1: *const gchar, s2: *const gchar, n: gsize) -> gint, >; @@ -21668,7 +22057,7 @@ extern "C" { pub fn g_cond_timed_wait( cond: *mut GCond, mutex: *mut GMutex, - timeval: *mut GTimeVal, + abs_time: *mut GTimeVal, ) -> gboolean; } pub type GAsyncQueue_autoptr = *mut GAsyncQueue; @@ -21875,6 +22264,10 @@ pub type GUri_autoptr = *mut GUri; pub type GUri_listautoptr = *mut GList; pub type GUri_slistautoptr = *mut GSList; pub type GUri_queueautoptr = *mut GQueue; +pub type GPathBuf_autoptr = *mut GPathBuf; +pub type GPathBuf_listautoptr = *mut GList; +pub type GPathBuf_slistautoptr = *mut GSList; +pub type GPathBuf_queueautoptr = *mut GQueue; #[repr(C)] #[derive(Copy, Clone)] pub struct __mbstate_t { @@ -22398,6 +22791,95 @@ fn bindgen_test_layout__IO_FILE() { ) ); } +pub type cookie_read_function_t = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __buf: *mut ::std::os::raw::c_char, + __nbytes: usize, + ) -> __ssize_t, +>; +pub type cookie_write_function_t = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __buf: *const ::std::os::raw::c_char, + __nbytes: usize, + ) -> __ssize_t, +>; +pub type cookie_seek_function_t = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __pos: *mut __off64_t, + __w: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type cookie_close_function_t = ::std::option::Option< + unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_cookie_io_functions_t { + pub read: cookie_read_function_t, + pub write: cookie_write_function_t, + pub seek: cookie_seek_function_t, + pub close: cookie_close_function_t, +} +#[test] +fn bindgen_test_layout__IO_cookie_io_functions_t() { + const UNINIT: ::std::mem::MaybeUninit<_IO_cookie_io_functions_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_IO_cookie_io_functions_t>(), + 32usize, + concat!("Size of: ", stringify!(_IO_cookie_io_functions_t)) + ); + assert_eq!( + ::std::mem::align_of::<_IO_cookie_io_functions_t>(), + 8usize, + concat!("Alignment of ", stringify!(_IO_cookie_io_functions_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(read) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(write) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(seek) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(close) + ) + ); +} +pub type cookie_io_functions_t = _IO_cookie_io_functions_t; pub type fpos_t = __fpos_t; extern "C" { pub static mut stdin: *mut FILE; @@ -22466,6 +22948,13 @@ extern "C" { pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) -> *mut FILE; } +extern "C" { + pub fn fopencookie( + __magic_cookie: *mut ::std::os::raw::c_void, + __modes: *const ::std::os::raw::c_char, + __io_funcs: cookie_io_functions_t, + ) -> *mut FILE; +} extern "C" { pub fn fmemopen( __s: *mut ::std::os::raw::c_void, @@ -22549,6 +23038,27 @@ extern "C" { __arg: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn vasprintf( + __ptr: *mut *mut ::std::os::raw::c_char, + __f: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __asprintf( + __ptr: *mut *mut ::std::os::raw::c_char, + __fmt: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn asprintf( + __ptr: *mut *mut ::std::os::raw::c_char, + __fmt: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} extern "C" { pub fn vdprintf( __fd: ::std::os::raw::c_int,