Skip to content
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
2 changes: 1 addition & 1 deletion gdk4-macos/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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion gdk4-macos/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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
28 changes: 0 additions & 28 deletions gdk4-wayland/src/wayland_toplevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,7 @@ use crate::{ffi, WaylandToplevel};
use glib::translate::*;
use std::boxed::Box as Box_;

#[cfg(all(feature = "v4_20", feature = "wayland_crate"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_20", feature = "wayland_crate"))))]
use wayland_client::{backend::ObjectId, Proxy};
#[cfg(all(feature = "v4_20", feature = "wayland_crate"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_20", feature = "wayland_crate"))))]
use wayland_protocols::xdg::shell::client::xdg_toplevel::XdgToplevel;

impl WaylandToplevel {
#[cfg(all(feature = "v4_20", feature = "wayland_crate"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_20", feature = "wayland_crate"))))]
#[doc(alias = "gdk_wayland_toplevel_get_xdg_toplevel")]
#[doc(alias = "get_xdg_toplevel")]
pub fn xdg_toplevel(&self) -> Option<XdgToplevel> {
use gdk::prelude::*;
let display = self.display().downcast::<crate::WaylandDisplay>().unwrap();
unsafe {
let toplevel_ptr = ffi::gdk_wayland_toplevel_get_xdg_toplevel(self.to_glib_none().0);
if toplevel_ptr.is_null() {
None
} else {
let cnx = display.connection();
let id =
ObjectId::from_ptr(XdgToplevel::interface(), toplevel_ptr as *mut _).unwrap();

XdgToplevel::from_id(&cnx, id).ok()
}
}
}

#[doc(alias = "gdk_wayland_toplevel_export_handle")]
pub fn export_handle<P: Fn(&WaylandToplevel, Result<&str, glib::BoolError>) + 'static>(
&self,
Expand Down
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion gir-files
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
2 changes: 1 addition & 1 deletion 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 @ 3fcec321a85e)
from gir-files (https://github.com/gtk-rs/gir-files @ f4cde2ff49b7)
from gir-files (https://github.com/gtk-rs/gir-files @ e9775ea8223a)
Loading