diff --git a/gdk-pixbuf/src/auto/pixbuf_loader.rs b/gdk-pixbuf/src/auto/pixbuf_loader.rs index ec59eb203dba..5dd296a92e21 100644 --- a/gdk-pixbuf/src/auto/pixbuf_loader.rs +++ b/gdk-pixbuf/src/auto/pixbuf_loader.rs @@ -190,10 +190,10 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { F: Fn(&P, i32, i32, i32, i32) + 'static, >( this: *mut ffi::GdkPixbufLoader, - x: libc::c_int, - y: libc::c_int, - width: libc::c_int, - height: libc::c_int, + x: std::ffi::c_int, + y: std::ffi::c_int, + width: std::ffi::c_int, + height: std::ffi::c_int, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); @@ -247,8 +247,8 @@ pub trait PixbufLoaderExt: IsA + sealed::Sealed + 'static { F: Fn(&P, i32, i32) + 'static, >( this: *mut ffi::GdkPixbufLoader, - width: libc::c_int, - height: libc::c_int, + width: std::ffi::c_int, + height: std::ffi::c_int, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/gdk-pixbuf/sys/src/lib.rs b/gdk-pixbuf/sys/src/lib.rs index 279c287747b0..577fcaed073b 100644 --- a/gdk-pixbuf/sys/src/lib.rs +++ b/gdk-pixbuf/sys/src/lib.rs @@ -15,14 +15,15 @@ use gio_sys as gio; use glib_sys as glib; use gobject_sys as gobject; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -396,7 +397,6 @@ impl ::std::fmt::Debug for GdkPixbufSimpleAnimIter { } } -#[link(name = "gdk_pixbuf-2.0")] extern "C" { //========================================================================= diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/gio/src/auto/action_group.rs b/gio/src/auto/action_group.rs index b94c3472b919..ea6302e8c6fc 100644 --- a/gio/src/auto/action_group.rs +++ b/gio/src/auto/action_group.rs @@ -178,7 +178,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str) + 'static, >( this: *mut ffi::GActionGroup, - action_name: *mut libc::c_char, + action_name: *mut std::ffi::c_char, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); @@ -215,7 +215,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str, bool) + 'static, >( this: *mut ffi::GActionGroup, - action_name: *mut libc::c_char, + action_name: *mut std::ffi::c_char, enabled: glib::ffi::gboolean, f: glib::ffi::gpointer, ) { @@ -255,7 +255,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str) + 'static, >( this: *mut ffi::GActionGroup, - action_name: *mut libc::c_char, + action_name: *mut std::ffi::c_char, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); @@ -292,7 +292,7 @@ pub trait ActionGroupExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str, &glib::Variant) + 'static, >( this: *mut ffi::GActionGroup, - action_name: *mut libc::c_char, + action_name: *mut std::ffi::c_char, value: *mut glib::ffi::GVariant, f: glib::ffi::gpointer, ) { diff --git a/gio/src/auto/app_launch_context.rs b/gio/src/auto/app_launch_context.rs index e58b7bbddc16..05541e154e08 100644 --- a/gio/src/auto/app_launch_context.rs +++ b/gio/src/auto/app_launch_context.rs @@ -112,7 +112,7 @@ pub trait AppLaunchContextExt: IsA + sealed::Sealed + 'static F: Fn(&P, &str) + 'static, >( this: *mut ffi::GAppLaunchContext, - startup_notify_id: *mut libc::c_char, + startup_notify_id: *mut std::ffi::c_char, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); diff --git a/gio/src/auto/application.rs b/gio/src/auto/application.rs index f28f72b32a9f..5fd5a2906a04 100644 --- a/gio/src/auto/application.rs +++ b/gio/src/auto/application.rs @@ -480,7 +480,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { this: *mut ffi::GApplication, command_line: *mut ffi::GApplicationCommandLine, f: glib::ffi::gpointer, - ) -> libc::c_int { + ) -> std::ffi::c_int { let f: &F = &*(f as *const F); f( Application::from_glib_borrow(this).unsafe_cast_ref(), @@ -512,7 +512,7 @@ pub trait ApplicationExt: IsA + sealed::Sealed + 'static { this: *mut ffi::GApplication, options: *mut glib::ffi::GVariantDict, f: glib::ffi::gpointer, - ) -> libc::c_int { + ) -> std::ffi::c_int { let f: &F = &*(f as *const F); f( Application::from_glib_borrow(this).unsafe_cast_ref(), diff --git a/gio/src/auto/dbus_auth_observer.rs b/gio/src/auto/dbus_auth_observer.rs index ee28ec4450fa..56a26c07ba6a 100644 --- a/gio/src/auto/dbus_auth_observer.rs +++ b/gio/src/auto/dbus_auth_observer.rs @@ -59,7 +59,7 @@ impl DBusAuthObserver { F: Fn(&DBusAuthObserver, &str) -> bool + 'static, >( this: *mut ffi::GDBusAuthObserver, - mechanism: *mut libc::c_char, + mechanism: *mut std::ffi::c_char, f: glib::ffi::gpointer, ) -> glib::ffi::gboolean { let f: &F = &*(f as *const F); diff --git a/gio/src/auto/list_model.rs b/gio/src/auto/list_model.rs index 40d81f6d3b4c..3b69585c56f4 100644 --- a/gio/src/auto/list_model.rs +++ b/gio/src/auto/list_model.rs @@ -78,9 +78,9 @@ pub trait ListModelExt: IsA + sealed::Sealed + 'static { F: Fn(&P, u32, u32, u32) + 'static, >( this: *mut ffi::GListModel, - position: libc::c_uint, - removed: libc::c_uint, - added: libc::c_uint, + position: std::ffi::c_uint, + removed: std::ffi::c_uint, + added: std::ffi::c_uint, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); diff --git a/gio/src/auto/menu_model.rs b/gio/src/auto/menu_model.rs index ca4cbd6bc049..438dba2193be 100644 --- a/gio/src/auto/menu_model.rs +++ b/gio/src/auto/menu_model.rs @@ -119,9 +119,9 @@ pub trait MenuModelExt: IsA + sealed::Sealed + 'static { F: Fn(&P, i32, i32, i32) + 'static, >( this: *mut ffi::GMenuModel, - position: libc::c_int, - removed: libc::c_int, - added: libc::c_int, + position: std::ffi::c_int, + removed: std::ffi::c_int, + added: std::ffi::c_int, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); diff --git a/gio/src/auto/mount_operation.rs b/gio/src/auto/mount_operation.rs index 8144d485a5e2..399c08ea5bb4 100644 --- a/gio/src/auto/mount_operation.rs +++ b/gio/src/auto/mount_operation.rs @@ -270,9 +270,9 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str, &str, &str, AskPasswordFlags) + 'static, >( this: *mut ffi::GMountOperation, - message: *mut libc::c_char, - default_user: *mut libc::c_char, - default_domain: *mut libc::c_char, + message: *mut std::ffi::c_char, + default_user: *mut std::ffi::c_char, + default_domain: *mut std::ffi::c_char, flags: ffi::GAskPasswordFlags, f: glib::ffi::gpointer, ) { @@ -348,7 +348,7 @@ pub trait MountOperationExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str, i64, i64) + 'static, >( this: *mut ffi::GMountOperation, - message: *mut libc::c_char, + message: *mut std::ffi::c_char, time_left: i64, bytes_left: i64, f: glib::ffi::gpointer, diff --git a/gio/src/auto/settings.rs b/gio/src/auto/settings.rs index bf027a7fd26e..d63c64ba69b5 100644 --- a/gio/src/auto/settings.rs +++ b/gio/src/auto/settings.rs @@ -517,7 +517,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { ) -> SignalHandlerId { unsafe extern "C" fn changed_trampoline, F: Fn(&P, &str) + 'static>( this: *mut ffi::GSettings, - key: *mut libc::c_char, + key: *mut std::ffi::c_char, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); @@ -553,7 +553,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { F: Fn(&P, u32) -> glib::Propagation + 'static, >( this: *mut ffi::GSettings, - key: libc::c_uint, + key: std::ffi::c_uint, f: glib::ffi::gpointer, ) -> glib::ffi::gboolean { let f: &F = &*(f as *const F); @@ -583,7 +583,7 @@ pub trait SettingsExt: IsA + sealed::Sealed + 'static { F: Fn(&P, &str) + 'static, >( this: *mut ffi::GSettings, - key: *mut libc::c_char, + key: *mut std::ffi::c_char, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/gio/src/auto/vfs.rs b/gio/src/auto/vfs.rs index c0b908a20f6b..c3081f30b4ef 100644 --- a/gio/src/auto/vfs.rs +++ b/gio/src/auto/vfs.rs @@ -99,7 +99,7 @@ pub trait VfsExt: IsA + sealed::Sealed + 'static { Box_::new(uri_func); unsafe extern "C" fn uri_func_func( vfs: *mut ffi::GVfs, - identifier: *const libc::c_char, + identifier: *const std::ffi::c_char, user_data: glib::ffi::gpointer, ) -> *mut ffi::GFile { let vfs = from_glib_borrow(vfs); @@ -121,7 +121,7 @@ pub trait VfsExt: IsA + sealed::Sealed + 'static { Box_::new(parse_name_func); unsafe extern "C" fn parse_name_func_func( vfs: *mut ffi::GVfs, - identifier: *const libc::c_char, + identifier: *const std::ffi::c_char, user_data: glib::ffi::gpointer, ) -> *mut ffi::GFile { let vfs = from_glib_borrow(vfs); diff --git a/gio/sys/src/lib.rs b/gio/sys/src/lib.rs index 5772282c541f..f9fbc1267698 100644 --- a/gio/sys/src/lib.rs +++ b/gio/sys/src/lib.rs @@ -18,14 +18,15 @@ mod manual; pub use manual::*; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -9363,7 +9364,6 @@ impl ::std::fmt::Debug for GVolume { } } -#[link(name = "gio-2.0")] extern "C" { //========================================================================= diff --git a/gio/sys/src/manual.rs b/gio/sys/src/manual.rs index 10ddd2042d71..adf976e32cef 100644 --- a/gio/sys/src/manual.rs +++ b/gio/sys/src/manual.rs @@ -52,7 +52,6 @@ mod windows_streams { gboolean, GInputStream, GInputStreamClass, GOutputStream, GOutputStreamClass, GType, }; - #[link(name = "gio-2.0")] extern "C" { //========================================================================= // GWin32InputStream diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/gir b/gir index ae08ff966747..a11b11f2e403 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit ae08ff9667478ee9609ab728ebb699fad52e137b +Subproject commit a11b11f2e403d615edd94497b6fe5b3c5283145b diff --git a/glib/gobject-sys/src/lib.rs b/glib/gobject-sys/src/lib.rs index 1017b7026635..658a5bd2025c 100644 --- a/glib/gobject-sys/src/lib.rs +++ b/glib/gobject-sys/src/lib.rs @@ -13,14 +13,15 @@ use glib_sys as glib; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -1415,7 +1416,6 @@ impl ::std::fmt::Debug for GTypePlugin { } } -#[link(name = "gobject-2.0")] extern "C" { //========================================================================= diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/glib/src/param_spec.rs b/glib/src/param_spec.rs index 631607424ed6..64fdf0f46e81 100644 --- a/glib/src/param_spec.rs +++ b/glib/src/param_spec.rs @@ -296,20 +296,16 @@ pub unsafe trait ParamSpecType: { } -#[link(name = "gobject-2.0")] -extern "C" { - pub static g_param_spec_types: *const ffi::GType; -} - macro_rules! define_param_spec { - ($rust_type:ident, $ffi_type:path, $rust_type_offset:expr) => { - // Can't use get_type here as this is not a boxed type but another fundamental type + ($rust_type:ident, $ffi_type:path, $type_name:literal) => { impl StaticType for $rust_type { #[inline] fn static_type() -> Type { - unsafe { - from_glib(*g_param_spec_types.add($rust_type_offset)) - } + // Instead of using the direct reference to the `g_param_spec_types` table, we + // use `g_type_from_name` to query for each of the param spec types. This is + // because rust currently has issues properly linking variables from external + // libraries without using a `#[link]` attribute. + unsafe { from_glib(gobject_ffi::g_type_from_name(concat!($type_name, "\0").as_ptr() as *const _)) } } } @@ -557,8 +553,8 @@ macro_rules! define_param_spec_min_max { } macro_rules! define_param_spec_numeric { - ($rust_type:ident, $ffi_type:path, $value_type:ty, $rust_type_offset:expr, $ffi_fun:ident) => { - define_param_spec!($rust_type, $ffi_type, $rust_type_offset); + ($rust_type:ident, $ffi_type:path, $value_type:ty, $type_name:literal, $ffi_fun:ident) => { + define_param_spec!($rust_type, $ffi_type, $type_name); define_param_spec_default!($rust_type, $ffi_type, $value_type, |x| x); define_param_spec_min_max!($rust_type, $ffi_type, $value_type); @@ -788,7 +784,7 @@ define_param_spec_numeric!( ParamSpecChar, gobject_ffi::GParamSpecChar, i8, - 0, + "GParamChar", g_param_spec_char ); @@ -808,7 +804,7 @@ define_param_spec_numeric!( ParamSpecUChar, gobject_ffi::GParamSpecUChar, u8, - 1, + "GParamUChar", g_param_spec_uchar ); @@ -829,7 +825,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecBoolean, gobject_ffi::GParamSpecBoolean, 2); +define_param_spec!( + ParamSpecBoolean, + gobject_ffi::GParamSpecBoolean, + "GParamBoolean" +); define_param_spec_default!( ParamSpecBoolean, @@ -880,7 +880,7 @@ define_param_spec_numeric!( ParamSpecInt, gobject_ffi::GParamSpecInt, i32, - 3, + "GParamInt", g_param_spec_int ); @@ -900,7 +900,7 @@ define_param_spec_numeric!( ParamSpecUInt, gobject_ffi::GParamSpecUInt, u32, - 4, + "GParamUInt", g_param_spec_uint ); @@ -925,7 +925,7 @@ define_param_spec_numeric!( ParamSpecLong, gobject_ffi::GParamSpecLong, libc::c_long, - 5, + "GParamLong", g_param_spec_long ); @@ -950,7 +950,7 @@ define_param_spec_numeric!( ParamSpecULong, gobject_ffi::GParamSpecULong, libc::c_ulong, - 6, + "GParamULong", g_param_spec_ulong ); @@ -975,7 +975,7 @@ define_param_spec_numeric!( ParamSpecInt64, gobject_ffi::GParamSpecInt64, i64, - 7, + "GParamInt64", g_param_spec_int64 ); @@ -1000,7 +1000,7 @@ define_param_spec_numeric!( ParamSpecUInt64, gobject_ffi::GParamSpecUInt64, u64, - 8, + "GParamUInt64", g_param_spec_uint64 ); @@ -1021,7 +1021,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecUnichar, gobject_ffi::GParamSpecUnichar, 9); +define_param_spec!( + ParamSpecUnichar, + gobject_ffi::GParamSpecUnichar, + "GParamUnichar" +); define_param_spec_default!(ParamSpecUnichar, gobject_ffi::GParamSpecUnichar, Result, TryFrom::try_from); impl ParamSpecUnichar { @@ -1063,7 +1067,7 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecEnum, gobject_ffi::GParamSpecEnum, 10); +define_param_spec!(ParamSpecEnum, gobject_ffi::GParamSpecEnum, "GParamEnum"); impl ParamSpecEnum { unsafe fn new_unchecked<'a>( @@ -1207,7 +1211,7 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecFlags, gobject_ffi::GParamSpecFlags, 11); +define_param_spec!(ParamSpecFlags, gobject_ffi::GParamSpecFlags, "GParamFlags"); impl ParamSpecFlags { unsafe fn new_unchecked<'a>( @@ -1350,7 +1354,7 @@ define_param_spec_numeric!( ParamSpecFloat, gobject_ffi::GParamSpecFloat, f32, - 12, + "GParamFloat", g_param_spec_float ); @@ -1375,7 +1379,7 @@ define_param_spec_numeric!( ParamSpecDouble, gobject_ffi::GParamSpecDouble, f64, - 13, + "GParamDouble", g_param_spec_double ); @@ -1396,7 +1400,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecString, gobject_ffi::GParamSpecString, 14); +define_param_spec!( + ParamSpecString, + gobject_ffi::GParamSpecString, + "GParamString" +); define_param_spec_default!( ParamSpecString, @@ -1505,7 +1513,7 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecParam, gobject_ffi::GParamSpecParam, 15); +define_param_spec!(ParamSpecParam, gobject_ffi::GParamSpecParam, "GParamParam"); impl ParamSpecParam { unsafe fn new_unchecked<'a>( @@ -1547,7 +1555,7 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecBoxed, gobject_ffi::GParamSpecBoxed, 16); +define_param_spec!(ParamSpecBoxed, gobject_ffi::GParamSpecBoxed, "GParamBoxed"); impl ParamSpecBoxed { unsafe fn new_unchecked<'a>( @@ -1635,7 +1643,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecPointer, gobject_ffi::GParamSpecPointer, 17); +define_param_spec!( + ParamSpecPointer, + gobject_ffi::GParamSpecPointer, + "GParamPointer" +); impl ParamSpecPointer { unsafe fn new_unchecked<'a>( @@ -1671,7 +1683,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecValueArray, gobject_ffi::GParamSpecValueArray, 18); +define_param_spec!( + ParamSpecValueArray, + gobject_ffi::GParamSpecValueArray, + "GParamValueArray" +); impl ParamSpecValueArray { unsafe fn new_unchecked<'a>( @@ -1791,7 +1807,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecObject, gobject_ffi::GParamSpecObject, 19); +define_param_spec!( + ParamSpecObject, + gobject_ffi::GParamSpecObject, + "GParamObject" +); impl ParamSpecObject { unsafe fn new_unchecked<'a>( @@ -1879,7 +1899,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecOverride, gobject_ffi::GParamSpecOverride, 20); +define_param_spec!( + ParamSpecOverride, + gobject_ffi::GParamSpecOverride, + "GParamOverride" +); impl ParamSpecOverride { unsafe fn new_unchecked(name: &str, overridden: impl AsRef) -> ParamSpec { @@ -1987,7 +2011,7 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecGType, gobject_ffi::GParamSpecGType, 21); +define_param_spec!(ParamSpecGType, gobject_ffi::GParamSpecGType, "GParamGType"); impl ParamSpecGType { unsafe fn new_unchecked<'a>( @@ -2027,7 +2051,11 @@ wrapper! { unref => |ptr| gobject_ffi::g_param_spec_unref(ptr as *mut gobject_ffi::GParamSpec), } } -define_param_spec!(ParamSpecVariant, gobject_ffi::GParamSpecVariant, 22); +define_param_spec!( + ParamSpecVariant, + gobject_ffi::GParamSpecVariant, + "GParamVariant" +); define_param_spec_default!( ParamSpecVariant, diff --git a/glib/sys/src/lib.rs b/glib/sys/src/lib.rs index d1bd63dce21f..ab5f3f5d83cf 100644 --- a/glib/sys/src/lib.rs +++ b/glib/sys/src/lib.rs @@ -15,14 +15,15 @@ mod manual; pub use manual::*; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; pub type gboolean = c_int; pub const GFALSE: c_int = 0; @@ -2668,8 +2669,6 @@ impl ::std::fmt::Debug for GVariantType { } } -#[link(name = "gobject-2.0")] -#[link(name = "glib-2.0")] extern "C" { //========================================================================= diff --git a/glib/sys/src/manual.rs b/glib/sys/src/manual.rs index af23d450d0b0..f6152c3fd1a1 100644 --- a/glib/sys/src/manual.rs +++ b/glib/sys/src/manual.rs @@ -84,7 +84,6 @@ mod win32 { pub const G_WIN32_OS_WORKSTATION: GWin32OSType = 1; pub const G_WIN32_OS_SERVER: GWin32OSType = 2; - #[link(name = "glib-2.0")] extern "C" { pub fn g_win32_check_windows_version( major: c_int, diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/graphene/sys/src/lib.rs b/graphene/sys/src/lib.rs index 6e4ca37db5e8..9a4a9abe3b52 100644 --- a/graphene/sys/src/lib.rs +++ b/graphene/sys/src/lib.rs @@ -13,14 +13,15 @@ use glib_sys as glib; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -353,7 +354,6 @@ impl ::std::fmt::Debug for graphene_vec4_t { } } -#[link(name = "graphene-1.0")] extern "C" { //========================================================================= diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/pango/sys/src/lib.rs b/pango/sys/src/lib.rs index 71682c40c262..71b819c3d767 100644 --- a/pango/sys/src/lib.rs +++ b/pango/sys/src/lib.rs @@ -14,14 +14,15 @@ use glib_sys as glib; use gobject_sys as gobject; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -1398,7 +1399,6 @@ impl ::std::fmt::Debug for PangoRenderer { } } -#[link(name = "pango-1.0")] extern "C" { //========================================================================= diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70) diff --git a/pangocairo/sys/src/lib.rs b/pangocairo/sys/src/lib.rs index 673a891443e5..25b9d07e4491 100644 --- a/pangocairo/sys/src/lib.rs +++ b/pangocairo/sys/src/lib.rs @@ -15,14 +15,15 @@ use cairo_sys as cairo; use glib_sys as glib; use pango_sys as pango; -#[allow(unused_imports)] -use libc::{ - c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, - intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, -}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -59,7 +60,6 @@ impl ::std::fmt::Debug for PangoCairoFontMap { } } -#[link(name = "pangocairo-1.0")] extern "C" { //========================================================================= diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index f37abf03aa49..4dfc7ef11610 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747) +Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403) from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)