--- rust-glib-sys-0.19.0.orig/src/lib.rs +++ rust-glib-sys-0.19.0/src/lib.rs @@ -40,7 +40,6 @@ pub type GRefString = c_char; pub type GStrv = *mut *mut c_char; pub type GTime = i32; pub type GTimeSpan = i64; -pub type GType = size_t; // Enums pub type GBookmarkFileError = c_int; @@ -343,6 +342,12 @@ pub const G_TEST_RUN_INCOMPLETE: GTestRe pub type GThreadError = c_int; pub const G_THREAD_ERROR_AGAIN: GThreadError = 0; +pub type GThreadPriority = c_int; +pub const G_THREAD_PRIORITY_LOW: GThreadPriority = 0; +pub const G_THREAD_PRIORITY_NORMAL: GThreadPriority = 1; +pub const G_THREAD_PRIORITY_HIGH: GThreadPriority = 2; +pub const G_THREAD_PRIORITY_URGENT: GThreadPriority = 3; + pub type GTimeType = c_int; pub const G_TIME_TYPE_STANDARD: GTimeType = 0; pub const G_TIME_TYPE_DAYLIGHT: GTimeType = 1; @@ -424,6 +429,11 @@ pub const G_UNICODE_BREAK_REGIONAL_INDIC pub const G_UNICODE_BREAK_EMOJI_BASE: GUnicodeBreakType = 40; pub const G_UNICODE_BREAK_EMOJI_MODIFIER: GUnicodeBreakType = 41; pub const G_UNICODE_BREAK_ZERO_WIDTH_JOINER: GUnicodeBreakType = 42; +pub const G_UNICODE_BREAK_AKSARA: GUnicodeBreakType = 43; +pub const G_UNICODE_BREAK_AKSARA_PRE_BASE: GUnicodeBreakType = 44; +pub const G_UNICODE_BREAK_AKSARA_START: GUnicodeBreakType = 45; +pub const G_UNICODE_BREAK_VIRAMA_FINAL: GUnicodeBreakType = 46; +pub const G_UNICODE_BREAK_VIRAMA: GUnicodeBreakType = 47; pub type GUnicodeScript = c_int; pub const G_UNICODE_SCRIPT_INVALID_CODE: GUnicodeScript = -1; @@ -625,6 +635,16 @@ pub const G_UNICODE_LINE_SEPARATOR: GUni pub const G_UNICODE_PARAGRAPH_SEPARATOR: GUnicodeType = 28; pub const G_UNICODE_SPACE_SEPARATOR: GUnicodeType = 29; +#[cfg(unix)] +#[cfg_attr(docsrs, doc(cfg(unix)))] +pub type GUnixPipeEnd = c_int; +#[cfg(unix)] +#[cfg_attr(docsrs, doc(cfg(unix)))] +pub const G_UNIX_PIPE_END_READ: GUnixPipeEnd = 0; +#[cfg(unix)] +#[cfg_attr(docsrs, doc(cfg(unix)))] +pub const G_UNIX_PIPE_END_WRITE: GUnixPipeEnd = 1; + pub type GUriError = c_int; pub const G_URI_ERROR_FAILED: GUriError = 0; pub const G_URI_ERROR_BAD_SCHEME: GUriError = 1; @@ -690,6 +710,11 @@ pub const G_VARIANT_PARSE_ERROR_VALUE_EX pub const G_VARIANT_PARSE_ERROR_RECURSION: GVariantParseError = 18; // Constants +pub const G_ALLOCATOR_LIST: c_int = 1; +pub const G_ALLOCATOR_NODE: c_int = 3; +pub const G_ALLOCATOR_SLIST: c_int = 2; +pub const G_ALLOC_AND_FREE: c_int = 2; +pub const G_ALLOC_ONLY: c_int = 1; pub const G_ASCII_DTOSTR_BUF_SIZE: c_int = 39; pub const G_ATOMIC_REF_COUNT_INIT: c_int = 1; pub const G_BIG_ENDIAN: c_int = 4321; @@ -1089,10 +1114,15 @@ impl ::std::fmt::Debug for GVariantDict_ } // Callbacks +pub type GCacheDestroyFunc = Option; +pub type GCacheDupFunc = Option gpointer>; +pub type GCacheNewFunc = Option gpointer>; pub type GChildWatchFunc = Option; pub type GClearHandleFunc = Option; pub type GCompareDataFunc = Option c_int>; pub type GCompareFunc = Option c_int>; +pub type GCompletionFunc = Option *mut c_char>; +pub type GCompletionStrncmpFunc = Option c_int>; pub type GCopyFunc = Option gpointer>; pub type GDataForeachFunc = Option; pub type GDestroyNotify = Option; @@ -1144,6 +1174,14 @@ pub type GUnixFDSourceFunc = Option; // Records +#[repr(C)] +pub struct _GAllocator { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GAllocator = _GAllocator; + #[derive(Copy, Clone)] #[repr(C)] pub struct GArray { @@ -1211,6 +1249,14 @@ impl ::std::fmt::Debug for GBytes { } #[repr(C)] +pub struct _GCache { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GCache = _GCache; + +#[repr(C)] pub struct GChecksum { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, @@ -1225,6 +1271,28 @@ impl ::std::fmt::Debug for GChecksum { #[derive(Copy, Clone)] #[repr(C)] +pub struct GCompletion { + pub items: *mut GList, + pub func: GCompletionFunc, + pub prefix: *mut c_char, + pub cache: *mut GList, + pub strncmp_func: GCompletionStrncmpFunc, +} + +impl ::std::fmt::Debug for GCompletion { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GCompletion @ {self:p}")) + .field("items", &self.items) + .field("func", &self.func) + .field("prefix", &self.prefix) + .field("cache", &self.cache) + .field("strncmp_func", &self.strncmp_func) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] pub struct GCond { pub p: gpointer, pub i: [c_uint; 2], @@ -1291,12 +1359,17 @@ impl ::std::fmt::Debug for GDebugKey { } #[repr(C)] -pub struct _GDir { +pub struct GDir { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } -pub type GDir = _GDir; +impl ::std::fmt::Debug for GDir { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GDir @ {self:p}")) + .finish() + } +} #[repr(C)] pub struct GDoubleIEEE754_mpn { @@ -1378,12 +1451,17 @@ impl ::std::fmt::Debug for GHashTableIte } #[repr(C)] -pub struct _GHmac { +pub struct GHmac { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } -pub type GHmac = _GHmac; +impl ::std::fmt::Debug for GHmac { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GHmac @ {self:p}")) + .finish() + } +} #[derive(Copy, Clone)] #[repr(C)] @@ -1631,6 +1709,14 @@ impl ::std::fmt::Debug for GMatchInfo { } } +#[repr(C)] +pub struct _GMemChunk { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GMemChunk = _GMemChunk; + #[derive(Copy, Clone)] #[repr(C)] pub struct GMemVTable { @@ -1828,12 +1914,17 @@ impl ::std::fmt::Debug for GRWLock { } #[repr(C)] -pub struct _GRand { +pub struct GRand { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } -pub type GRand = _GRand; +impl ::std::fmt::Debug for GRand { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GRand @ {self:p}")) + .finish() + } +} #[derive(Copy, Clone)] #[repr(C)] @@ -1862,6 +1953,14 @@ impl ::std::fmt::Debug for GRegex { } } +#[repr(C)] +pub struct _GRelation { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GRelation = _GRelation; + #[derive(Copy, Clone)] #[repr(C)] pub struct GSList { @@ -2048,6 +2147,66 @@ pub type GStatBuf = _GStatBuf; #[derive(Copy, Clone)] #[repr(C)] +pub struct GStaticMutex { + pub mutex: *mut GMutex, +} + +impl ::std::fmt::Debug for GStaticMutex { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GStaticMutex @ {self:p}")) + .field("mutex", &self.mutex) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GStaticPrivate { + pub index: c_uint, +} + +impl ::std::fmt::Debug for GStaticPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GStaticPrivate @ {self:p}")) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GStaticRWLock { + pub mutex: GStaticMutex, + pub read_cond: *mut GCond, + pub write_cond: *mut GCond, + pub read_counter: c_uint, + pub have_writer: gboolean, + pub want_to_read: c_uint, + pub want_to_write: c_uint, +} + +impl ::std::fmt::Debug for GStaticRWLock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GStaticRWLock @ {self:p}")) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GStaticRecMutex { + pub mutex: GStaticMutex, + pub depth: c_uint, +} + +impl ::std::fmt::Debug for GStaticRecMutex { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GStaticRecMutex @ {self:p}")) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] pub struct GString { pub str: *mut c_char, pub len: size_t, @@ -2073,12 +2232,17 @@ pub struct _GStringChunk { pub type GStringChunk = _GStringChunk; #[repr(C)] -pub struct _GStrvBuilder { +pub struct GStrvBuilder { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } -pub type GStrvBuilder = _GStrvBuilder; +impl ::std::fmt::Debug for GStrvBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GStrvBuilder @ {self:p}")) + .finish() + } +} #[repr(C)] pub struct _GTestCase { @@ -2134,10 +2298,13 @@ pub struct _GTestSuite { pub type GTestSuite = _GTestSuite; +#[derive(Copy, Clone)] #[repr(C)] pub struct GThread { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, + pub func: GThreadFunc, + pub data: gpointer, + pub joinable: gboolean, + pub priority: GThreadPriority, } impl ::std::fmt::Debug for GThread { @@ -2149,6 +2316,60 @@ impl ::std::fmt::Debug for GThread { #[derive(Copy, Clone)] #[repr(C)] +pub struct GThreadFunctions { + pub mutex_new: Option *mut GMutex>, + pub mutex_lock: Option, + pub mutex_trylock: Option gboolean>, + pub mutex_unlock: Option, + pub mutex_free: Option, + pub cond_new: Option *mut GCond>, + pub cond_signal: Option, + pub cond_broadcast: Option, + pub cond_wait: Option, + pub cond_timed_wait: Option gboolean>, + pub cond_free: Option, + pub private_new: Option *mut GPrivate>, + pub private_get: Option gpointer>, + pub private_set: Option, + pub thread_create: Option, + pub thread_yield: Option, + pub thread_join: Option, + pub thread_exit: Option, + pub thread_set_priority: Option, + pub thread_self: Option, + pub thread_equal: Option gboolean>, +} + +impl ::std::fmt::Debug for GThreadFunctions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GThreadFunctions @ {self:p}")) + .field("mutex_new", &self.mutex_new) + .field("mutex_lock", &self.mutex_lock) + .field("mutex_trylock", &self.mutex_trylock) + .field("mutex_unlock", &self.mutex_unlock) + .field("mutex_free", &self.mutex_free) + .field("cond_new", &self.cond_new) + .field("cond_signal", &self.cond_signal) + .field("cond_broadcast", &self.cond_broadcast) + .field("cond_wait", &self.cond_wait) + .field("cond_timed_wait", &self.cond_timed_wait) + .field("cond_free", &self.cond_free) + .field("private_new", &self.private_new) + .field("private_get", &self.private_get) + .field("private_set", &self.private_set) + .field("thread_create", &self.thread_create) + .field("thread_yield", &self.thread_yield) + .field("thread_join", &self.thread_join) + .field("thread_exit", &self.thread_exit) + .field("thread_set_priority", &self.thread_set_priority) + .field("thread_self", &self.thread_self) + .field("thread_equal", &self.thread_equal) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] pub struct GThreadPool { pub func: GFunc, pub user_data: gpointer, @@ -2237,6 +2458,38 @@ pub struct _GTreeNode { pub type GTreeNode = _GTreeNode; +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GTuples { + pub len: c_uint, +} + +impl ::std::fmt::Debug for GTuples { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GTuples @ {self:p}")) + .field("len", &self.len) + .finish() + } +} + +#[cfg(unix)] +#[cfg_attr(docsrs, doc(cfg(unix)))] +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GUnixPipe { + pub fds: [c_int; 2], +} + +#[cfg(unix)] +#[cfg_attr(docsrs, doc(cfg(unix)))] +impl ::std::fmt::Debug for GUnixPipe { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GUnixPipe @ {self:p}")) + .field("fds", &self.fds) + .finish() + } +} + #[repr(C)] pub struct GUri { _data: [u8; 0], @@ -2374,6 +2627,28 @@ impl ::std::fmt::Debug for GVariantType extern "C" { //========================================================================= + // GNormalizeMode + //========================================================================= + pub fn g_normalize_mode_get_type() -> GType; + + //========================================================================= + // GUnicodeBreakType + //========================================================================= + pub fn g_unicode_break_type_get_type() -> GType; + + //========================================================================= + // GUnicodeScript + //========================================================================= + pub fn g_unicode_script_get_type() -> GType; + pub fn g_unicode_script_from_iso15924(iso15924: u32) -> GUnicodeScript; + pub fn g_unicode_script_to_iso15924(script: GUnicodeScript) -> u32; + + //========================================================================= + // GUnicodeType + //========================================================================= + pub fn g_unicode_type_get_type() -> GType; + + //========================================================================= // GIOCondition //========================================================================= pub fn g_io_condition_get_type() -> GType; @@ -2382,10 +2657,18 @@ extern "C" { // GMutex //========================================================================= pub fn g_mutex_clear(mutex: *mut GMutex); + pub fn g_mutex_free(mutex: *mut GMutex); pub fn g_mutex_init(mutex: *mut GMutex); pub fn g_mutex_lock(mutex: *mut GMutex); pub fn g_mutex_trylock(mutex: *mut GMutex) -> gboolean; pub fn g_mutex_unlock(mutex: *mut GMutex); + pub fn g_mutex_new() -> *mut GMutex; + + //========================================================================= + // GAllocator + //========================================================================= + pub fn g_allocator_free(allocator: *mut GAllocator); + pub fn g_allocator_new(name: *const c_char, n_preallocs: c_uint) -> *mut GAllocator; //========================================================================= // GArray @@ -2470,7 +2753,7 @@ extern "C" { #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_get_added_date_time(bookmark: *mut GBookmarkFile, uri: *const c_char, error: *mut *mut GError) -> *mut GDateTime; - pub fn g_bookmark_file_get_app_info(bookmark: *mut GBookmarkFile, uri: *const c_char, name: *const c_char, exec: *mut *mut c_char, count: *mut c_uint, stamp: *mut c_long, error: *mut *mut GError) -> gboolean; + pub fn g_bookmark_file_get_app_info(bookmark: *mut GBookmarkFile, uri: *const c_char, name: *const c_char, exec: *mut *mut c_char, count: *mut c_uint, stamp: *mut time_t, error: *mut *mut GError) -> gboolean; #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_get_application_info(bookmark: *mut GBookmarkFile, uri: *const c_char, name: *const c_char, exec: *mut *mut c_char, count: *mut c_uint, stamp: *mut *mut GDateTime, error: *mut *mut GError) -> gboolean; @@ -2573,6 +2856,16 @@ extern "C" { pub fn g_bytes_unref_to_data(bytes: *mut GBytes, size: *mut size_t) -> gpointer; //========================================================================= + // GCache + //========================================================================= + pub fn g_cache_destroy(cache: *mut GCache); + pub fn g_cache_insert(cache: *mut GCache, key: gpointer) -> gpointer; + pub fn g_cache_key_foreach(cache: *mut GCache, func: GHFunc, user_data: gpointer); + pub fn g_cache_remove(cache: *mut GCache, value: gconstpointer); + pub fn g_cache_value_foreach(cache: *mut GCache, func: GHFunc, user_data: gpointer); + pub fn g_cache_new(value_new_func: GCacheNewFunc, value_destroy_func: GCacheDestroyFunc, key_dup_func: GCacheDupFunc, key_destroy_func: GCacheDestroyFunc, hash_key_func: GHashFunc, hash_value_func: GHashFunc, key_equal_func: GEqualFunc) -> *mut GCache; + + //========================================================================= // GChecksum //========================================================================= pub fn g_checksum_get_type() -> GType; @@ -2586,14 +2879,29 @@ extern "C" { pub fn g_checksum_type_get_length(checksum_type: GChecksumType) -> ssize_t; //========================================================================= + // GCompletion + //========================================================================= + pub fn g_completion_add_items(cmp: *mut GCompletion, items: *mut GList); + pub fn g_completion_clear_items(cmp: *mut GCompletion); + pub fn g_completion_complete(cmp: *mut GCompletion, prefix: *const c_char, new_prefix: *mut *mut c_char) -> *mut GList; + pub fn g_completion_complete_utf8(cmp: *mut GCompletion, prefix: *const c_char, new_prefix: *mut *mut c_char) -> *mut GList; + pub fn g_completion_free(cmp: *mut GCompletion); + pub fn g_completion_remove_items(cmp: *mut GCompletion, items: *mut GList); + pub fn g_completion_set_compare(cmp: *mut GCompletion, strncmp_func: GCompletionStrncmpFunc); + pub fn g_completion_new(func: GCompletionFunc) -> *mut GCompletion; + + //========================================================================= // GCond //========================================================================= pub fn g_cond_broadcast(cond: *mut GCond); pub fn g_cond_clear(cond: *mut GCond); + pub fn g_cond_free(cond: *mut GCond); pub fn g_cond_init(cond: *mut GCond); pub fn g_cond_signal(cond: *mut GCond); + pub fn g_cond_timed_wait(cond: *mut GCond, mutex: *mut GMutex, abs_time: *mut GTimeVal) -> gboolean; pub fn g_cond_wait(cond: *mut GCond, mutex: *mut GMutex); pub fn g_cond_wait_until(cond: *mut GCond, mutex: *mut GMutex, end_time: i64) -> gboolean; + pub fn g_cond_new() -> *mut GCond; //========================================================================= // GDate @@ -2658,7 +2966,13 @@ extern "C" { pub fn g_date_time_new_from_timeval_local(tv: *const GTimeVal) -> *mut GDateTime; pub fn g_date_time_new_from_timeval_utc(tv: *const GTimeVal) -> *mut GDateTime; pub fn g_date_time_new_from_unix_local(t: i64) -> *mut GDateTime; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_date_time_new_from_unix_local_usec(usecs: i64) -> *mut GDateTime; pub fn g_date_time_new_from_unix_utc(t: i64) -> *mut GDateTime; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_date_time_new_from_unix_utc_usec(usecs: i64) -> *mut GDateTime; pub fn g_date_time_new_local(year: c_int, month: c_int, day: c_int, hour: c_int, minute: c_int, seconds: c_double) -> *mut GDateTime; pub fn g_date_time_new_now(tz: *mut GTimeZone) -> *mut GDateTime; pub fn g_date_time_new_now_local() -> *mut GDateTime; @@ -2705,17 +3019,27 @@ extern "C" { pub fn g_date_time_to_timeval(datetime: *mut GDateTime, tv: *mut GTimeVal) -> gboolean; pub fn g_date_time_to_timezone(datetime: *mut GDateTime, tz: *mut GTimeZone) -> *mut GDateTime; pub fn g_date_time_to_unix(datetime: *mut GDateTime) -> i64; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_date_time_to_unix_usec(datetime: *mut GDateTime) -> i64; pub fn g_date_time_to_utc(datetime: *mut GDateTime) -> *mut GDateTime; pub fn g_date_time_unref(datetime: *mut GDateTime); //========================================================================= // GDir //========================================================================= + pub fn g_dir_get_type() -> GType; + pub fn g_dir_open(path: *const c_char, flags: c_uint, error: *mut *mut GError) -> *mut GDir; pub fn g_dir_close(dir: *mut GDir); pub fn g_dir_read_name(dir: *mut GDir) -> *const c_char; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_dir_ref(dir: *mut GDir) -> *mut GDir; pub fn g_dir_rewind(dir: *mut GDir); + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_dir_unref(dir: *mut GDir); pub fn g_dir_make_tmp(tmpl: *const c_char, error: *mut *mut GError) -> *mut c_char; - pub fn g_dir_open(path: *const c_char, flags: c_uint, error: *mut *mut GError) -> *mut GDir; //========================================================================= // GError @@ -2793,13 +3117,14 @@ extern "C" { //========================================================================= // GHmac //========================================================================= + pub fn g_hmac_get_type() -> GType; + pub fn g_hmac_new(digest_type: GChecksumType, key: *const u8, key_len: size_t) -> *mut GHmac; pub fn g_hmac_copy(hmac: *const GHmac) -> *mut GHmac; pub fn g_hmac_get_digest(hmac: *mut GHmac, buffer: *mut u8, digest_len: *mut size_t); pub fn g_hmac_get_string(hmac: *mut GHmac) -> *const c_char; pub fn g_hmac_ref(hmac: *mut GHmac) -> *mut GHmac; pub fn g_hmac_unref(hmac: *mut GHmac); pub fn g_hmac_update(hmac: *mut GHmac, data: *const u8, length: ssize_t); - pub fn g_hmac_new(digest_type: GChecksumType, key: *const u8, key_len: size_t) -> *mut GHmac; //========================================================================= // GHook @@ -2962,8 +3287,10 @@ extern "C" { pub fn g_list_nth(list: *mut GList, n: c_uint) -> *mut GList; pub fn g_list_nth_data(list: *mut GList, n: c_uint) -> gpointer; pub fn g_list_nth_prev(list: *mut GList, n: c_uint) -> *mut GList; + pub fn g_list_pop_allocator(); pub fn g_list_position(list: *mut GList, llink: *mut GList) -> c_int; pub fn g_list_prepend(list: *mut GList, data: gpointer) -> *mut GList; + pub fn g_list_push_allocator(allocator: *mut GAllocator); pub fn g_list_remove(list: *mut GList, data: gconstpointer) -> *mut GList; pub fn g_list_remove_all(list: *mut GList, data: gconstpointer) -> *mut GList; pub fn g_list_remove_link(list: *mut GList, llink: *mut GList) -> *mut GList; @@ -3070,6 +3397,19 @@ extern "C" { pub fn g_match_info_unref(match_info: *mut GMatchInfo); //========================================================================= + // GMemChunk + //========================================================================= + pub fn g_mem_chunk_alloc(mem_chunk: *mut GMemChunk) -> gpointer; + pub fn g_mem_chunk_alloc0(mem_chunk: *mut GMemChunk) -> gpointer; + pub fn g_mem_chunk_clean(mem_chunk: *mut GMemChunk); + pub fn g_mem_chunk_destroy(mem_chunk: *mut GMemChunk); + pub fn g_mem_chunk_free(mem_chunk: *mut GMemChunk, mem: gpointer); + pub fn g_mem_chunk_print(mem_chunk: *mut GMemChunk); + pub fn g_mem_chunk_reset(mem_chunk: *mut GMemChunk); + pub fn g_mem_chunk_info(); + pub fn g_mem_chunk_new(name: *const c_char, atom_size: c_int, area_size: size_t, type_: c_int) -> *mut GMemChunk; + + //========================================================================= // GNode //========================================================================= pub fn g_node_child_index(node: *mut GNode, data: gpointer) -> c_int; @@ -3098,13 +3438,22 @@ extern "C" { pub fn g_node_traverse(root: *mut GNode, order: GTraverseType, flags: GTraverseFlags, max_depth: c_int, func: GNodeTraverseFunc, data: gpointer); pub fn g_node_unlink(node: *mut GNode); pub fn g_node_new(data: gpointer) -> *mut GNode; + pub fn g_node_pop_allocator(); + pub fn g_node_push_allocator(allocator: *mut GAllocator); //========================================================================= // GOnce //========================================================================= pub fn g_once_impl(once: *mut GOnce, func: GThreadFunc, arg: gpointer) -> gpointer; pub fn g_once_init_enter(location: *mut c_void) -> gboolean; + pub fn g_once_init_enter_impl(location: *mut /*volatile*/size_t) -> gboolean; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_once_init_enter_pointer(location: *mut c_void) -> gboolean; pub fn g_once_init_leave(location: *mut c_void, result: size_t); + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_once_init_leave_pointer(location: *mut c_void, result: gpointer); //========================================================================= // GOptionContext @@ -3222,6 +3571,7 @@ extern "C" { pub fn g_private_get(key: *mut GPrivate) -> gpointer; pub fn g_private_replace(key: *mut GPrivate, value: gpointer); pub fn g_private_set(key: *mut GPrivate, value: gpointer); + pub fn g_private_new(notify: GDestroyNotify) -> *mut GPrivate; //========================================================================= // GPtrArray @@ -3359,6 +3709,10 @@ extern "C" { //========================================================================= // GRand //========================================================================= + pub fn g_rand_get_type() -> GType; + pub fn g_rand_new() -> *mut GRand; + pub fn g_rand_new_with_seed(seed: u32) -> *mut GRand; + pub fn g_rand_new_with_seed_array(seed: *const u32, seed_length: c_uint) -> *mut GRand; pub fn g_rand_copy(rand_: *mut GRand) -> *mut GRand; pub fn g_rand_double(rand_: *mut GRand) -> c_double; pub fn g_rand_double_range(rand_: *mut GRand, begin: c_double, end: c_double) -> c_double; @@ -3367,9 +3721,6 @@ extern "C" { pub fn g_rand_int_range(rand_: *mut GRand, begin: i32, end: i32) -> i32; pub fn g_rand_set_seed(rand_: *mut GRand, seed: u32); pub fn g_rand_set_seed_array(rand_: *mut GRand, seed: *const u32, seed_length: c_uint); - pub fn g_rand_new() -> *mut GRand; - pub fn g_rand_new_with_seed(seed: u32) -> *mut GRand; - pub fn g_rand_new_with_seed_array(seed: *const u32, seed_length: c_uint) -> *mut GRand; //========================================================================= // GRecMutex @@ -3412,6 +3763,19 @@ extern "C" { pub fn g_regex_split_simple(pattern: *const c_char, string: *const c_char, compile_options: GRegexCompileFlags, match_options: GRegexMatchFlags) -> *mut *mut c_char; //========================================================================= + // GRelation + //========================================================================= + pub fn g_relation_count(relation: *mut GRelation, key: gconstpointer, field: c_int) -> c_int; + pub fn g_relation_delete(relation: *mut GRelation, key: gconstpointer, field: c_int) -> c_int; + pub fn g_relation_destroy(relation: *mut GRelation); + pub fn g_relation_exists(relation: *mut GRelation, ...) -> gboolean; + pub fn g_relation_index(relation: *mut GRelation, field: c_int, hash_func: GHashFunc, key_equal_func: GEqualFunc); + pub fn g_relation_insert(relation: *mut GRelation, ...); + pub fn g_relation_print(relation: *mut GRelation); + pub fn g_relation_select(relation: *mut GRelation, key: gconstpointer, field: c_int) -> *mut GTuples; + pub fn g_relation_new(fields: c_int) -> *mut GRelation; + + //========================================================================= // GSList //========================================================================= pub fn g_slist_alloc() -> *mut GSList; @@ -3435,8 +3799,10 @@ extern "C" { pub fn g_slist_length(list: *mut GSList) -> c_uint; pub fn g_slist_nth(list: *mut GSList, n: c_uint) -> *mut GSList; pub fn g_slist_nth_data(list: *mut GSList, n: c_uint) -> gpointer; + pub fn g_slist_pop_allocator(); pub fn g_slist_position(list: *mut GSList, llink: *mut GSList) -> c_int; pub fn g_slist_prepend(list: *mut GSList, data: gpointer) -> *mut GSList; + pub fn g_slist_push_allocator(allocator: *mut GAllocator); pub fn g_slist_remove(list: *mut GSList, data: gconstpointer) -> *mut GSList; pub fn g_slist_remove_all(list: *mut GSList, data: gconstpointer) -> *mut GSList; pub fn g_slist_remove_link(list: *mut GSList, link_: *mut GSList) -> *mut GSList; @@ -3560,6 +3926,44 @@ extern "C" { pub fn g_source_set_name_by_id(tag: c_uint, name: *const c_char); //========================================================================= + // GStaticMutex + //========================================================================= + pub fn g_static_mutex_free(mutex: *mut GStaticMutex); + pub fn g_static_mutex_get_mutex_impl(mutex: *mut GStaticMutex) -> *mut GMutex; + pub fn g_static_mutex_init(mutex: *mut GStaticMutex); + + //========================================================================= + // GStaticPrivate + //========================================================================= + pub fn g_static_private_free(private_key: *mut GStaticPrivate); + pub fn g_static_private_get(private_key: *mut GStaticPrivate) -> gpointer; + pub fn g_static_private_init(private_key: *mut GStaticPrivate); + pub fn g_static_private_set(private_key: *mut GStaticPrivate, data: gpointer, notify: GDestroyNotify); + + //========================================================================= + // GStaticRWLock + //========================================================================= + pub fn g_static_rw_lock_free(lock: *mut GStaticRWLock); + pub fn g_static_rw_lock_init(lock: *mut GStaticRWLock); + pub fn g_static_rw_lock_reader_lock(lock: *mut GStaticRWLock); + pub fn g_static_rw_lock_reader_trylock(lock: *mut GStaticRWLock) -> gboolean; + pub fn g_static_rw_lock_reader_unlock(lock: *mut GStaticRWLock); + pub fn g_static_rw_lock_writer_lock(lock: *mut GStaticRWLock); + pub fn g_static_rw_lock_writer_trylock(lock: *mut GStaticRWLock) -> gboolean; + pub fn g_static_rw_lock_writer_unlock(lock: *mut GStaticRWLock); + + //========================================================================= + // GStaticRecMutex + //========================================================================= + pub fn g_static_rec_mutex_free(mutex: *mut GStaticRecMutex); + pub fn g_static_rec_mutex_init(mutex: *mut GStaticRecMutex); + pub fn g_static_rec_mutex_lock(mutex: *mut GStaticRecMutex); + pub fn g_static_rec_mutex_lock_full(mutex: *mut GStaticRecMutex, depth: c_uint); + pub fn g_static_rec_mutex_trylock(mutex: *mut GStaticRecMutex) -> gboolean; + pub fn g_static_rec_mutex_unlock(mutex: *mut GStaticRecMutex); + pub fn g_static_rec_mutex_unlock_full(mutex: *mut GStaticRecMutex) -> c_uint; + + //========================================================================= // GString //========================================================================= pub fn g_gstring_get_type() -> GType; @@ -3622,6 +4026,12 @@ extern "C" { //========================================================================= #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] + pub fn g_strv_builder_get_type() -> GType; + #[cfg(feature = "v2_68")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] + pub fn g_strv_builder_new() -> *mut GStrvBuilder; + #[cfg(feature = "v2_68")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_add(builder: *mut GStrvBuilder, value: *const c_char); #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] @@ -3637,10 +4047,10 @@ extern "C" { pub fn g_strv_builder_ref(builder: *mut GStrvBuilder) -> *mut GStrvBuilder; #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] - pub fn g_strv_builder_unref(builder: *mut GStrvBuilder); + pub fn g_strv_builder_take(builder: *mut GStrvBuilder, value: *mut c_char); #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] - pub fn g_strv_builder_new() -> *mut GStrvBuilder; + pub fn g_strv_builder_unref(builder: *mut GStrvBuilder); //========================================================================= // GTestCase @@ -3679,9 +4089,16 @@ extern "C" { pub fn g_thread_try_new(name: *const c_char, func: GThreadFunc, data: gpointer, error: *mut *mut GError) -> *mut GThread; pub fn g_thread_join(thread: *mut GThread) -> gpointer; pub fn g_thread_ref(thread: *mut GThread) -> *mut GThread; + pub fn g_thread_set_priority(thread: *mut GThread, priority: GThreadPriority); pub fn g_thread_unref(thread: *mut GThread); + pub fn g_thread_create(func: GThreadFunc, data: gpointer, joinable: gboolean, error: *mut *mut GError) -> *mut GThread; + pub fn g_thread_create_full(func: GThreadFunc, data: gpointer, stack_size: c_ulong, joinable: gboolean, bound: gboolean, priority: GThreadPriority, error: *mut *mut GError) -> *mut GThread; pub fn g_thread_error_quark() -> GQuark; pub fn g_thread_exit(retval: gpointer); + pub fn g_thread_foreach(thread_func: GFunc, user_data: gpointer); + pub fn g_thread_get_initialized() -> gboolean; + pub fn g_thread_init(vtable: gpointer); + pub fn g_thread_init_with_errorcheck_mutexes(vtable: gpointer); pub fn g_thread_self() -> *mut GThread; pub fn g_thread_yield(); @@ -3829,6 +4246,12 @@ extern "C" { pub fn g_tree_node_value(node: *mut GTreeNode) -> gpointer; //========================================================================= + // GTuples + //========================================================================= + pub fn g_tuples_destroy(tuples: *mut GTuples); + pub fn g_tuples_index(tuples: *mut GTuples, index_: c_int, field: c_int) -> gpointer; + + //========================================================================= // GUri //========================================================================= #[cfg(feature = "v2_66")] @@ -4113,7 +4536,7 @@ extern "C" { pub fn g_variant_type_next(type_: *const GVariantType) -> *const GVariantType; pub fn g_variant_type_peek_string(type_: *const GVariantType) -> *const c_char; pub fn g_variant_type_value(type_: *const GVariantType) -> *const GVariantType; - pub fn g_variant_type_checked_(arg0: *const c_char) -> *const GVariantType; + pub fn g_variant_type_checked_(type_string: *const c_char) -> *const GVariantType; pub fn g_variant_type_string_get_depth_(type_string: *const c_char) -> size_t; pub fn g_variant_type_string_is_valid(type_string: *const c_char) -> gboolean; pub fn g_variant_type_string_scan(string: *const c_char, limit: *const c_char, endptr: *mut *const c_char) -> gboolean; @@ -4176,8 +4599,8 @@ extern "C" { pub fn g_atomic_int_or(atomic: *mut /*volatile*/c_uint, val: c_uint) -> c_uint; pub fn g_atomic_int_set(atomic: *mut /*volatile*/c_int, newval: c_int); pub fn g_atomic_int_xor(atomic: *mut /*volatile*/c_uint, val: c_uint) -> c_uint; - pub fn g_atomic_pointer_add(atomic: *mut c_void, val: ssize_t) -> ssize_t; - pub fn g_atomic_pointer_and(atomic: *mut c_void, val: size_t) -> size_t; + pub fn g_atomic_pointer_add(atomic: *mut c_void, val: ssize_t) -> intptr_t; + pub fn g_atomic_pointer_and(atomic: *mut c_void, val: size_t) -> uintptr_t; pub fn g_atomic_pointer_compare_and_exchange(atomic: *mut c_void, oldval: gpointer, newval: gpointer) -> gboolean; #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] @@ -4186,9 +4609,9 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_atomic_pointer_exchange(atomic: *mut c_void, newval: gpointer) -> gpointer; pub fn g_atomic_pointer_get(atomic: *mut c_void) -> gpointer; - pub fn g_atomic_pointer_or(atomic: *mut c_void, val: size_t) -> size_t; + pub fn g_atomic_pointer_or(atomic: *mut c_void, val: size_t) -> uintptr_t; pub fn g_atomic_pointer_set(atomic: *mut c_void, newval: gpointer); - pub fn g_atomic_pointer_xor(atomic: *mut c_void, val: size_t) -> size_t; + pub fn g_atomic_pointer_xor(atomic: *mut c_void, val: size_t) -> uintptr_t; #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_acquire(mem_block: gpointer) -> gpointer; @@ -4258,6 +4681,9 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_clear_slist(slist_ptr: *mut *mut GSList, destroy: GDestroyNotify); pub fn g_close(fd: c_int, error: *mut *mut GError) -> gboolean; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_closefrom(lowfd: c_int) -> c_int; pub fn g_compute_checksum_for_bytes(checksum_type: GChecksumType, data: *mut GBytes) -> *mut c_char; pub fn g_compute_checksum_for_data(checksum_type: GChecksumType, data: *const u8, length: size_t) -> *mut c_char; pub fn g_compute_checksum_for_string(checksum_type: GChecksumType, str: *const c_char, length: ssize_t) -> *mut c_char; @@ -4300,6 +4726,9 @@ extern "C" { pub fn g_environ_getenv(envp: *mut *mut c_char, variable: *const c_char) -> *const c_char; pub fn g_environ_setenv(envp: *mut *mut c_char, variable: *const c_char, value: *const c_char, overwrite: gboolean) -> *mut *mut c_char; pub fn g_environ_unsetenv(envp: *mut *mut c_char, variable: *const c_char) -> *mut *mut c_char; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_fdwalk_set_cloexec(lowfd: c_int) -> c_int; pub fn g_file_error_from_errno(err_no: c_int) -> GFileError; pub fn g_file_error_quark() -> GQuark; pub fn g_file_get_contents(filename: *const c_char, contents: *mut *mut u8, length: *mut size_t, error: *mut *mut GError) -> gboolean; @@ -4408,6 +4837,9 @@ extern "C" { pub fn g_log_structured_standard(log_domain: *const c_char, log_level: GLogLevelFlags, file: *const c_char, line: *const c_char, func: *const c_char, message_format: *const c_char, ...); pub fn g_log_variant(log_domain: *const c_char, log_level: GLogLevelFlags, fields: *mut GVariant); pub fn g_log_writer_default(log_level: GLogLevelFlags, fields: *const GLogField, n_fields: size_t, user_data: gpointer) -> GLogWriterOutput; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_log_writer_default_set_debug_domains(domains: *const *const c_char); #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_log_writer_default_set_use_stderr(use_stderr: gboolean); @@ -4419,6 +4851,9 @@ extern "C" { pub fn g_log_writer_journald(log_level: GLogLevelFlags, fields: *const GLogField, n_fields: size_t, user_data: gpointer) -> GLogWriterOutput; pub fn g_log_writer_standard_streams(log_level: GLogLevelFlags, fields: *const GLogField, n_fields: size_t, user_data: gpointer) -> GLogWriterOutput; pub fn g_log_writer_supports_color(output_fd: c_int) -> gboolean; + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_log_writer_syslog(log_level: GLogLevelFlags, fields: *const GLogField, n_fields: size_t, user_data: gpointer) -> GLogWriterOutput; //pub fn g_logv(log_domain: *const c_char, log_level: GLogLevelFlags, format: *const c_char, args: /*Unimplemented*/va_list); pub fn g_main_current_source() -> *mut GSource; pub fn g_main_depth() -> c_int; @@ -4457,8 +4892,17 @@ extern "C" { pub fn g_pattern_match_simple(pattern: *const c_char, string: *const c_char) -> gboolean; pub fn g_pattern_match_string(pspec: *mut GPatternSpec, string: *const c_char) -> gboolean; pub fn g_pointer_bit_lock(address: *mut c_void, lock_bit: c_int); + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_pointer_bit_lock_and_get(address: gpointer, lock_bit: c_uint, out_ptr: *mut uintptr_t); + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_pointer_bit_lock_mask_ptr(ptr: gpointer, lock_bit: c_uint, set: gboolean, preserve_mask: uintptr_t, preserve_ptr: gpointer) -> gpointer; pub fn g_pointer_bit_trylock(address: *mut c_void, lock_bit: c_int) -> gboolean; pub fn g_pointer_bit_unlock(address: *mut c_void, lock_bit: c_int); + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_pointer_bit_unlock_and_set(address: *mut c_void, lock_bit: c_uint, ptr: gpointer, preserve_mask: uintptr_t); pub fn g_poll(fds: *mut GPollFD, nfds: c_uint, timeout: c_int) -> c_int; pub fn g_prefix_error(err: *mut *mut GError, format: *const c_char, ...); #[cfg(feature = "v2_70")] @@ -4576,6 +5020,7 @@ extern "C" { pub fn g_spawn_exit_error_quark() -> GQuark; pub fn g_spawn_sync(working_directory: *const c_char, argv: *mut *mut c_char, envp: *mut *mut c_char, flags: GSpawnFlags, child_setup: GSpawnChildSetupFunc, user_data: gpointer, standard_output: *mut *mut u8, standard_error: *mut *mut u8, wait_status: *mut c_int, error: *mut *mut GError) -> gboolean; pub fn g_sprintf(string: *mut c_char, format: *const c_char, ...) -> c_int; + pub fn g_stat(filename: *const c_char, buf: *mut GStatBuf) -> c_int; pub fn g_stpcpy(dest: *mut c_char, src: *const c_char) -> *mut c_char; pub fn g_str_equal(v1: gconstpointer, v2: gconstpointer) -> gboolean; pub fn g_str_has_prefix(str: *const c_char, prefix: *const c_char) -> gboolean; @@ -4684,6 +5129,9 @@ extern "C" { pub fn g_test_trap_has_passed() -> gboolean; pub fn g_test_trap_reached_timeout() -> gboolean; pub fn g_test_trap_subprocess(test_path: *const c_char, usec_timeout: u64, test_flags: GTestSubprocessFlags); + #[cfg(feature = "v2_80")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_80")))] + pub fn g_test_trap_subprocess_with_envp(test_path: *const c_char, envp: *const *const c_char, usec_timeout: u64, test_flags: GTestSubprocessFlags); pub fn g_timeout_add(interval: c_uint, function: GSourceFunc, data: gpointer) -> c_uint; pub fn g_timeout_add_full(priority: c_int, interval: c_uint, function: GSourceFunc, data: gpointer, notify: GDestroyNotify) -> c_uint; #[cfg(feature = "v2_74")] @@ -4738,8 +5186,6 @@ extern "C" { pub fn g_unichar_xdigit_value(c: u32) -> c_int; pub fn g_unicode_canonical_decomposition(ch: u32, result_len: *mut size_t) -> *mut u32; pub fn g_unicode_canonical_ordering(string: *mut u32, len: size_t); - pub fn g_unicode_script_from_iso15924(iso15924: u32) -> GUnicodeScript; - pub fn g_unicode_script_to_iso15924(script: GUnicodeScript) -> u32; pub fn g_unix_error_quark() -> GQuark; pub fn g_unix_fd_add(fd: c_int, condition: GIOCondition, function: GUnixFDSourceFunc, user_data: gpointer) -> c_uint; pub fn g_unix_fd_add_full(priority: c_int, fd: c_int, condition: GIOCondition, function: GUnixFDSourceFunc, user_data: gpointer, notify: GDestroyNotify) -> c_uint; --- rust-glib-sys-0.19.0.orig/tests/abi.rs +++ rust-glib-sys-0.19.0/tests/abi.rs @@ -211,6 +211,7 @@ const RUST_LAYOUTS: &[(&str, Layout)] = ("GBookmarkFileError", Layout {size: size_of::(), alignment: align_of::()}), ("GByteArray", Layout {size: size_of::(), alignment: align_of::()}), ("GChecksumType", Layout {size: size_of::(), alignment: align_of::()}), + ("GCompletion", Layout {size: size_of::(), alignment: align_of::()}), ("GCond", Layout {size: size_of::(), alignment: align_of::()}), ("GConvertError", Layout {size: size_of::(), alignment: align_of::()}), ("GDate", Layout {size: size_of::(), alignment: align_of::()}), @@ -281,6 +282,10 @@ const RUST_LAYOUTS: &[(&str, Layout)] = ("GSourceFuncs", Layout {size: size_of::(), alignment: align_of::()}), ("GSpawnError", Layout {size: size_of::(), alignment: align_of::()}), ("GSpawnFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("GStaticMutex", Layout {size: size_of::(), alignment: align_of::()}), + ("GStaticPrivate", Layout {size: size_of::(), alignment: align_of::()}), + ("GStaticRWLock", Layout {size: size_of::(), alignment: align_of::()}), + ("GStaticRecMutex", Layout {size: size_of::(), alignment: align_of::()}), ("GString", Layout {size: size_of::(), alignment: align_of::()}), ("GStrv", Layout {size: size_of::(), alignment: align_of::()}), ("GTestConfig", Layout {size: size_of::(), alignment: align_of::()}), @@ -290,8 +295,11 @@ const RUST_LAYOUTS: &[(&str, Layout)] = ("GTestResult", Layout {size: size_of::(), alignment: align_of::()}), ("GTestSubprocessFlags", Layout {size: size_of::(), alignment: align_of::()}), ("GTestTrapFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("GThread", Layout {size: size_of::(), alignment: align_of::()}), ("GThreadError", Layout {size: size_of::(), alignment: align_of::()}), + ("GThreadFunctions", Layout {size: size_of::(), alignment: align_of::()}), ("GThreadPool", Layout {size: size_of::(), alignment: align_of::()}), + ("GThreadPriority", Layout {size: size_of::(), alignment: align_of::()}), ("GTime", Layout {size: size_of::(), alignment: align_of::()}), ("GTimeSpan", Layout {size: size_of::(), alignment: align_of::()}), ("GTimeType", Layout {size: size_of::(), alignment: align_of::()}), @@ -301,10 +309,16 @@ const RUST_LAYOUTS: &[(&str, Layout)] = ("GTrashStack", Layout {size: size_of::(), alignment: align_of::()}), ("GTraverseFlags", Layout {size: size_of::(), alignment: align_of::()}), ("GTraverseType", Layout {size: size_of::(), alignment: align_of::()}), - ("GType", Layout {size: size_of::(), alignment: align_of::()}), + ("GTuples", Layout {size: size_of::(), alignment: align_of::()}), ("GUnicodeBreakType", Layout {size: size_of::(), alignment: align_of::()}), ("GUnicodeScript", Layout {size: size_of::(), alignment: align_of::()}), ("GUnicodeType", Layout {size: size_of::(), alignment: align_of::()}), + #[cfg(unix)] + #[cfg_attr(docsrs, doc(cfg(unix)))] + ("GUnixPipe", Layout {size: size_of::(), alignment: align_of::()}), + #[cfg(unix)] + #[cfg_attr(docsrs, doc(cfg(unix)))] + ("GUnixPipeEnd", Layout {size: size_of::(), alignment: align_of::()}), ("GUriError", Layout {size: size_of::(), alignment: align_of::()}), ("GUriFlags", Layout {size: size_of::(), alignment: align_of::()}), ("GUriHideFlags", Layout {size: size_of::(), alignment: align_of::()}), @@ -325,6 +339,11 @@ const RUST_CONSTANTS: &[(&str, &str)] = ("GLIB_SYSDEF_MSG_DONTROUTE", "4"), ("GLIB_SYSDEF_MSG_OOB", "1"), ("GLIB_SYSDEF_MSG_PEEK", "2"), + ("G_ALLOCATOR_LIST", "1"), + ("G_ALLOCATOR_NODE", "3"), + ("G_ALLOCATOR_SLIST", "2"), + ("G_ALLOC_AND_FREE", "2"), + ("G_ALLOC_ONLY", "1"), ("(guint) G_ASCII_ALNUM", "1"), ("(guint) G_ASCII_ALPHA", "2"), ("(guint) G_ASCII_CNTRL", "4"), @@ -768,6 +787,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = ("(guint) G_TEST_TRAP_SILENCE_STDERR", "256"), ("(guint) G_TEST_TRAP_SILENCE_STDOUT", "128"), ("(gint) G_THREAD_ERROR_AGAIN", "0"), + ("(gint) G_THREAD_PRIORITY_HIGH", "2"), + ("(gint) G_THREAD_PRIORITY_LOW", "0"), + ("(gint) G_THREAD_PRIORITY_NORMAL", "1"), + ("(gint) G_THREAD_PRIORITY_URGENT", "3"), ("G_TIME_SPAN_DAY", "86400000000"), ("G_TIME_SPAN_HOUR", "3600000000"), ("G_TIME_SPAN_MILLISECOND", "1000"), @@ -807,6 +830,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = ("(guint) G_TRAVERSE_NON_LEAVES", "2"), ("G_UNICHAR_MAX_DECOMPOSITION_LENGTH", "18"), ("(gint) G_UNICODE_BREAK_AFTER", "10"), + ("(gint) G_UNICODE_BREAK_AKSARA", "43"), + ("(gint) G_UNICODE_BREAK_AKSARA_PRE_BASE", "44"), + ("(gint) G_UNICODE_BREAK_AKSARA_START", "45"), ("(gint) G_UNICODE_BREAK_ALPHABETIC", "23"), ("(gint) G_UNICODE_BREAK_AMBIGUOUS", "27"), ("(gint) G_UNICODE_BREAK_BEFORE", "11"), @@ -847,6 +873,8 @@ const RUST_CONSTANTS: &[(&str, &str)] = ("(gint) G_UNICODE_BREAK_SURROGATE", "4"), ("(gint) G_UNICODE_BREAK_SYMBOL", "22"), ("(gint) G_UNICODE_BREAK_UNKNOWN", "28"), + ("(gint) G_UNICODE_BREAK_VIRAMA", "47"), + ("(gint) G_UNICODE_BREAK_VIRAMA_FINAL", "46"), ("(gint) G_UNICODE_BREAK_WORD_JOINER", "30"), ("(gint) G_UNICODE_BREAK_ZERO_WIDTH_JOINER", "42"), ("(gint) G_UNICODE_BREAK_ZERO_WIDTH_SPACE", "5"), @@ -1046,6 +1074,8 @@ const RUST_CONSTANTS: &[(&str, &str)] = ("(gint) G_UNICODE_TITLECASE_LETTER", "8"), ("(gint) G_UNICODE_UNASSIGNED", "2"), ("(gint) G_UNICODE_UPPERCASE_LETTER", "9"), + ("(gint) G_UNIX_PIPE_END_READ", "0"), + ("(gint) G_UNIX_PIPE_END_WRITE", "1"), ("(gint) G_URI_ERROR_BAD_AUTH_PARAMS", "4"), ("(gint) G_URI_ERROR_BAD_FRAGMENT", "9"), ("(gint) G_URI_ERROR_BAD_HOST", "5"), --- rust-glib-sys-0.19.0.orig/tests/constant.c +++ rust-glib-sys-0.19.0/tests/constant.c @@ -34,6 +34,11 @@ int main() { PRINT_CONSTANT(GLIB_SYSDEF_MSG_DONTROUTE); PRINT_CONSTANT(GLIB_SYSDEF_MSG_OOB); PRINT_CONSTANT(GLIB_SYSDEF_MSG_PEEK); + PRINT_CONSTANT(G_ALLOCATOR_LIST); + PRINT_CONSTANT(G_ALLOCATOR_NODE); + PRINT_CONSTANT(G_ALLOCATOR_SLIST); + PRINT_CONSTANT(G_ALLOC_AND_FREE); + PRINT_CONSTANT(G_ALLOC_ONLY); PRINT_CONSTANT((guint) G_ASCII_ALNUM); PRINT_CONSTANT((guint) G_ASCII_ALPHA); PRINT_CONSTANT((guint) G_ASCII_CNTRL); @@ -477,6 +482,10 @@ int main() { PRINT_CONSTANT((guint) G_TEST_TRAP_SILENCE_STDERR); PRINT_CONSTANT((guint) G_TEST_TRAP_SILENCE_STDOUT); PRINT_CONSTANT((gint) G_THREAD_ERROR_AGAIN); + PRINT_CONSTANT((gint) G_THREAD_PRIORITY_HIGH); + PRINT_CONSTANT((gint) G_THREAD_PRIORITY_LOW); + PRINT_CONSTANT((gint) G_THREAD_PRIORITY_NORMAL); + PRINT_CONSTANT((gint) G_THREAD_PRIORITY_URGENT); PRINT_CONSTANT(G_TIME_SPAN_DAY); PRINT_CONSTANT(G_TIME_SPAN_HOUR); PRINT_CONSTANT(G_TIME_SPAN_MILLISECOND); @@ -516,6 +525,9 @@ int main() { PRINT_CONSTANT((guint) G_TRAVERSE_NON_LEAVES); PRINT_CONSTANT(G_UNICHAR_MAX_DECOMPOSITION_LENGTH); PRINT_CONSTANT((gint) G_UNICODE_BREAK_AFTER); + PRINT_CONSTANT((gint) G_UNICODE_BREAK_AKSARA); + PRINT_CONSTANT((gint) G_UNICODE_BREAK_AKSARA_PRE_BASE); + PRINT_CONSTANT((gint) G_UNICODE_BREAK_AKSARA_START); PRINT_CONSTANT((gint) G_UNICODE_BREAK_ALPHABETIC); PRINT_CONSTANT((gint) G_UNICODE_BREAK_AMBIGUOUS); PRINT_CONSTANT((gint) G_UNICODE_BREAK_BEFORE); @@ -556,6 +568,8 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_BREAK_SURROGATE); PRINT_CONSTANT((gint) G_UNICODE_BREAK_SYMBOL); PRINT_CONSTANT((gint) G_UNICODE_BREAK_UNKNOWN); + PRINT_CONSTANT((gint) G_UNICODE_BREAK_VIRAMA); + PRINT_CONSTANT((gint) G_UNICODE_BREAK_VIRAMA_FINAL); PRINT_CONSTANT((gint) G_UNICODE_BREAK_WORD_JOINER); PRINT_CONSTANT((gint) G_UNICODE_BREAK_ZERO_WIDTH_JOINER); PRINT_CONSTANT((gint) G_UNICODE_BREAK_ZERO_WIDTH_SPACE); @@ -755,6 +769,8 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_TITLECASE_LETTER); PRINT_CONSTANT((gint) G_UNICODE_UNASSIGNED); PRINT_CONSTANT((gint) G_UNICODE_UPPERCASE_LETTER); + PRINT_CONSTANT((gint) G_UNIX_PIPE_END_READ); + PRINT_CONSTANT((gint) G_UNIX_PIPE_END_WRITE); PRINT_CONSTANT((gint) G_URI_ERROR_BAD_AUTH_PARAMS); PRINT_CONSTANT((gint) G_URI_ERROR_BAD_FRAGMENT); PRINT_CONSTANT((gint) G_URI_ERROR_BAD_HOST); --- rust-glib-sys-0.19.0.orig/tests/layout.c +++ rust-glib-sys-0.19.0/tests/layout.c @@ -12,6 +12,7 @@ int main() { printf("%s;%zu;%zu\n", "GBookmarkFileError", sizeof(GBookmarkFileError), alignof(GBookmarkFileError)); printf("%s;%zu;%zu\n", "GByteArray", sizeof(GByteArray), alignof(GByteArray)); printf("%s;%zu;%zu\n", "GChecksumType", sizeof(GChecksumType), alignof(GChecksumType)); + printf("%s;%zu;%zu\n", "GCompletion", sizeof(GCompletion), alignof(GCompletion)); printf("%s;%zu;%zu\n", "GCond", sizeof(GCond), alignof(GCond)); printf("%s;%zu;%zu\n", "GConvertError", sizeof(GConvertError), alignof(GConvertError)); printf("%s;%zu;%zu\n", "GDate", sizeof(GDate), alignof(GDate)); @@ -82,6 +83,10 @@ int main() { printf("%s;%zu;%zu\n", "GSourceFuncs", sizeof(GSourceFuncs), alignof(GSourceFuncs)); printf("%s;%zu;%zu\n", "GSpawnError", sizeof(GSpawnError), alignof(GSpawnError)); printf("%s;%zu;%zu\n", "GSpawnFlags", sizeof(GSpawnFlags), alignof(GSpawnFlags)); + printf("%s;%zu;%zu\n", "GStaticMutex", sizeof(GStaticMutex), alignof(GStaticMutex)); + printf("%s;%zu;%zu\n", "GStaticPrivate", sizeof(GStaticPrivate), alignof(GStaticPrivate)); + printf("%s;%zu;%zu\n", "GStaticRWLock", sizeof(GStaticRWLock), alignof(GStaticRWLock)); + printf("%s;%zu;%zu\n", "GStaticRecMutex", sizeof(GStaticRecMutex), alignof(GStaticRecMutex)); printf("%s;%zu;%zu\n", "GString", sizeof(GString), alignof(GString)); printf("%s;%zu;%zu\n", "GStrv", sizeof(GStrv), alignof(GStrv)); printf("%s;%zu;%zu\n", "GTestConfig", sizeof(GTestConfig), alignof(GTestConfig)); @@ -91,8 +96,11 @@ int main() { printf("%s;%zu;%zu\n", "GTestResult", sizeof(GTestResult), alignof(GTestResult)); printf("%s;%zu;%zu\n", "GTestSubprocessFlags", sizeof(GTestSubprocessFlags), alignof(GTestSubprocessFlags)); printf("%s;%zu;%zu\n", "GTestTrapFlags", sizeof(GTestTrapFlags), alignof(GTestTrapFlags)); + printf("%s;%zu;%zu\n", "GThread", sizeof(GThread), alignof(GThread)); printf("%s;%zu;%zu\n", "GThreadError", sizeof(GThreadError), alignof(GThreadError)); + printf("%s;%zu;%zu\n", "GThreadFunctions", sizeof(GThreadFunctions), alignof(GThreadFunctions)); printf("%s;%zu;%zu\n", "GThreadPool", sizeof(GThreadPool), alignof(GThreadPool)); + printf("%s;%zu;%zu\n", "GThreadPriority", sizeof(GThreadPriority), alignof(GThreadPriority)); printf("%s;%zu;%zu\n", "GTime", sizeof(GTime), alignof(GTime)); printf("%s;%zu;%zu\n", "GTimeSpan", sizeof(GTimeSpan), alignof(GTimeSpan)); printf("%s;%zu;%zu\n", "GTimeType", sizeof(GTimeType), alignof(GTimeType)); @@ -102,10 +110,12 @@ int main() { printf("%s;%zu;%zu\n", "GTrashStack", sizeof(GTrashStack), alignof(GTrashStack)); printf("%s;%zu;%zu\n", "GTraverseFlags", sizeof(GTraverseFlags), alignof(GTraverseFlags)); printf("%s;%zu;%zu\n", "GTraverseType", sizeof(GTraverseType), alignof(GTraverseType)); - printf("%s;%zu;%zu\n", "GType", sizeof(GType), alignof(GType)); + printf("%s;%zu;%zu\n", "GTuples", sizeof(GTuples), alignof(GTuples)); printf("%s;%zu;%zu\n", "GUnicodeBreakType", sizeof(GUnicodeBreakType), alignof(GUnicodeBreakType)); printf("%s;%zu;%zu\n", "GUnicodeScript", sizeof(GUnicodeScript), alignof(GUnicodeScript)); printf("%s;%zu;%zu\n", "GUnicodeType", sizeof(GUnicodeType), alignof(GUnicodeType)); + printf("%s;%zu;%zu\n", "GUnixPipe", sizeof(GUnixPipe), alignof(GUnixPipe)); + printf("%s;%zu;%zu\n", "GUnixPipeEnd", sizeof(GUnixPipeEnd), alignof(GUnixPipeEnd)); printf("%s;%zu;%zu\n", "GUriError", sizeof(GUriError), alignof(GUriError)); printf("%s;%zu;%zu\n", "GUriFlags", sizeof(GUriFlags), alignof(GUriFlags)); printf("%s;%zu;%zu\n", "GUriHideFlags", sizeof(GUriHideFlags), alignof(GUriHideFlags));