Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate with latest gir/gir-files #1455

Merged
merged 5 commits into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gdk4-wayland/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
3 changes: 1 addition & 2 deletions gdk4-wayland/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ version = "4.10"
version = "4.11"

[package.metadata.docs.rs]
all-features = true
all-features = "true"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
features = []

[lib]
name = "gdk4_wayland_sys"
Expand Down
4 changes: 2 additions & 2 deletions gdk4-wayland/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
4 changes: 2 additions & 2 deletions gdk4-win32/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
3 changes: 1 addition & 2 deletions gdk4-win32/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ version = "4.4"
version = "4.8"

[package.metadata.docs.rs]
all-features = true
all-features = "true"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
features = []

[lib]
name = "gdk4_win32_sys"
Expand Down
4 changes: 2 additions & 2 deletions gdk4-win32/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
4 changes: 2 additions & 2 deletions gdk4-x11/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
3 changes: 1 addition & 2 deletions gdk4-x11/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ version = "4.4"
version = "4.10"

[package.metadata.docs.rs]
all-features = true
all-features = "true"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
features = []

[lib]
name = "gdk4_x11_sys"
Expand Down
4 changes: 2 additions & 2 deletions gdk4-x11/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
8 changes: 7 additions & 1 deletion gdk4/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ generate = [
"Gdk.TextureError",
"Gdk.TitlebarGesture",
"Gdk.ToplevelLayout",
"Gdk.ToplevelState",
"Gdk.TouchEvent",
"Gdk.TouchpadEvent",
"Gdk.TouchpadGesturePhase",
Expand Down Expand Up @@ -658,3 +657,10 @@ manual_traits = ["ToplevelExtManual"]
name = "compute-size"
manual = true
doc_trait_name = "ToplevelExtManual"

[[object]]
name = "Gdk.ToplevelState"
status = "generate"
[[object.member]]
name = "suspended"
version = "4.12"
4 changes: 4 additions & 0 deletions gdk4/src/auto/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ bitflags! {
const LEFT_TILED = ffi::GDK_TOPLEVEL_STATE_LEFT_TILED as _;
#[doc(alias = "GDK_TOPLEVEL_STATE_LEFT_RESIZABLE")]
const LEFT_RESIZABLE = ffi::GDK_TOPLEVEL_STATE_LEFT_RESIZABLE as _;
#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "GDK_TOPLEVEL_STATE_SUSPENDED")]
const SUSPENDED = ffi::GDK_TOPLEVEL_STATE_SUSPENDED as _;
}
}

Expand Down
4 changes: 2 additions & 2 deletions gdk4/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
3 changes: 1 addition & 2 deletions gdk4/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ version = "0.8.0"
rust-version = "1.70"

[package.metadata.docs.rs]
all-features = true
all-features = "true"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
features = []

[package.metadata.system-deps.gtk4]
name = "gtk4"
Expand Down
1 change: 1 addition & 0 deletions gdk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2604,6 +2604,7 @@ pub const GDK_TOPLEVEL_STATE_BOTTOM_TILED: GdkToplevelState = 4096;
pub const GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE: GdkToplevelState = 8192;
pub const GDK_TOPLEVEL_STATE_LEFT_TILED: GdkToplevelState = 16384;
pub const GDK_TOPLEVEL_STATE_LEFT_RESIZABLE: GdkToplevelState = 32768;
pub const GDK_TOPLEVEL_STATE_SUSPENDED: GdkToplevelState = 65536;

// Callbacks
pub type GdkContentDeserializeFunc = Option<unsafe extern "C" fn(*mut GdkContentDeserializer)>;
Expand Down
1 change: 1 addition & 0 deletions gdk4/sys/tests/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2971,6 +2971,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(guint) GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE", "2048"),
("(guint) GDK_TOPLEVEL_STATE_RIGHT_TILED", "1024"),
("(guint) GDK_TOPLEVEL_STATE_STICKY", "4"),
("(guint) GDK_TOPLEVEL_STATE_SUSPENDED", "65536"),
("(guint) GDK_TOPLEVEL_STATE_TILED", "128"),
("(guint) GDK_TOPLEVEL_STATE_TOP_RESIZABLE", "512"),
("(guint) GDK_TOPLEVEL_STATE_TOP_TILED", "256"),
Expand Down
1 change: 1 addition & 0 deletions gdk4/sys/tests/constant.c
Original file line number Diff line number Diff line change
Expand Up @@ -2533,6 +2533,7 @@ int main() {
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE);
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_RIGHT_TILED);
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_STICKY);
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_SUSPENDED);
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_TILED);
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_TOP_RESIZABLE);
PRINT_CONSTANT((guint) GDK_TOPLEVEL_STATE_TOP_TILED);
Expand Down
4 changes: 2 additions & 2 deletions gdk4/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
2 changes: 1 addition & 1 deletion gir
2 changes: 1 addition & 1 deletion gir-files
Submodule gir-files updated 5 files
+36 −21 GLib-2.0.gir
+5 −1 GObject-2.0.gir
+3 −0 Gdk-4.0.gir
+319 −242 Gio-2.0.gir
+67 −6 Gtk-4.0.gir
4 changes: 2 additions & 2 deletions gsk4/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
3 changes: 1 addition & 2 deletions gsk4/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ version = "0.8.0"
rust-version = "1.70"

[package.metadata.docs.rs]
all-features = true
all-features = "true"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
features = []

[package.metadata.system-deps.gtk4]
name = "gtk4"
Expand Down
4 changes: 2 additions & 2 deletions gsk4/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
42 changes: 42 additions & 0 deletions gtk4/src/auto/file_launcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ impl FileLauncher {
}
}

#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "gtk_file_launcher_get_always_ask")]
#[doc(alias = "get_always_ask")]
pub fn must_always_ask(&self) -> bool {
unsafe { from_glib(ffi::gtk_file_launcher_get_always_ask(self.to_glib_none().0)) }
}

#[doc(alias = "gtk_file_launcher_get_file")]
#[doc(alias = "get_file")]
pub fn file(&self) -> Option<gio::File> {
Expand Down Expand Up @@ -170,6 +178,15 @@ impl FileLauncher {
}))
}

#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "gtk_file_launcher_set_always_ask")]
pub fn set_always_ask(&self, always_ask: bool) {
unsafe {
ffi::gtk_file_launcher_set_always_ask(self.to_glib_none().0, always_ask.into_glib());
}
}

#[doc(alias = "gtk_file_launcher_set_file")]
pub fn set_file(&self, file: Option<&impl IsA<gio::File>>) {
unsafe {
Expand All @@ -180,6 +197,31 @@ impl FileLauncher {
}
}

#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "always-ask")]
pub fn connect_always_ask_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_always_ask_trampoline<F: Fn(&FileLauncher) + 'static>(
this: *mut ffi::GtkFileLauncher,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::always-ask\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_always_ask_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(alias = "file")]
Expand Down
4 changes: 2 additions & 2 deletions gtk4/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
32 changes: 32 additions & 0 deletions gtk4/src/auto/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,13 @@ pub trait GtkWindowExt: IsA<Window> + sealed::Sealed + 'static {
unsafe { from_glib(ffi::gtk_window_is_maximized(self.as_ref().to_glib_none().0)) }
}

#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "gtk_window_is_suspended")]
fn is_suspended(&self) -> bool {
unsafe { from_glib(ffi::gtk_window_is_suspended(self.as_ref().to_glib_none().0)) }
}

#[doc(alias = "gtk_window_maximize")]
fn maximize(&self) {
unsafe {
Expand Down Expand Up @@ -1604,6 +1611,31 @@ pub trait GtkWindowExt: IsA<Window> + sealed::Sealed + 'static {
}
}

#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "suspended")]
fn connect_suspended_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_suspended_trampoline<P: IsA<Window>, F: Fn(&P) + 'static>(
this: *mut ffi::GtkWindow,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(Window::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::suspended\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_suspended_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[doc(alias = "title")]
fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_title_trampoline<P: IsA<Window>, F: Fn(&P) + 'static>(
Expand Down
3 changes: 1 addition & 2 deletions gtk4/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ version = "0.8.0"
rust-version = "1.70"

[package.metadata.docs.rs]
all-features = true
all-features = "true"
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
features = []

[package.metadata.system-deps.gtk4]
name = "gtk4"
Expand Down
9 changes: 9 additions & 0 deletions gtk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13294,6 +13294,9 @@ extern "C" {
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
pub fn gtk_file_launcher_new(file: *mut gio::GFile) -> *mut GtkFileLauncher;
#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
pub fn gtk_file_launcher_get_always_ask(self_: *mut GtkFileLauncher) -> gboolean;
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
pub fn gtk_file_launcher_get_file(self_: *mut GtkFileLauncher) -> *mut gio::GFile;
Expand Down Expand Up @@ -13329,6 +13332,9 @@ extern "C" {
result: *mut gio::GAsyncResult,
error: *mut *mut glib::GError,
) -> gboolean;
#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
pub fn gtk_file_launcher_set_always_ask(self_: *mut GtkFileLauncher, always_ask: gboolean);
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
pub fn gtk_file_launcher_set_file(self_: *mut GtkFileLauncher, file: *mut gio::GFile);
Expand Down Expand Up @@ -19278,6 +19284,9 @@ extern "C" {
pub fn gtk_window_is_active(window: *mut GtkWindow) -> gboolean;
pub fn gtk_window_is_fullscreen(window: *mut GtkWindow) -> gboolean;
pub fn gtk_window_is_maximized(window: *mut GtkWindow) -> gboolean;
#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
pub fn gtk_window_is_suspended(window: *mut GtkWindow) -> gboolean;
pub fn gtk_window_maximize(window: *mut GtkWindow);
pub fn gtk_window_minimize(window: *mut GtkWindow);
pub fn gtk_window_present(window: *mut GtkWindow);
Expand Down
4 changes: 2 additions & 2 deletions gtk4/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
Generated by gir (https://github.com/gtk-rs/gir @ 77bac6e42112)
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
Loading