gdk4_wayland/auto/
wayland_toplevel.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4#![allow(deprecated)]
5
6use crate::{ffi, WaylandSurface};
7use glib::translate::*;
8
9glib::wrapper! {
10    #[doc(alias = "GdkWaylandToplevel")]
11    pub struct WaylandToplevel(Object<ffi::GdkWaylandToplevel>) @extends WaylandSurface, gdk::Surface, @implements gdk::Toplevel;
12
13    match fn {
14        type_ => || ffi::gdk_wayland_toplevel_get_type(),
15    }
16}
17
18impl WaylandToplevel {
19    #[cfg(feature = "v4_12")]
20    #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
21    #[doc(alias = "gdk_wayland_toplevel_drop_exported_handle")]
22    pub fn drop_exported_handle(&self, handle: &str) {
23        unsafe {
24            ffi::gdk_wayland_toplevel_drop_exported_handle(
25                self.to_glib_none().0,
26                handle.to_glib_none().0,
27            );
28        }
29    }
30
31    #[doc(alias = "gdk_wayland_toplevel_set_application_id")]
32    pub fn set_application_id(&self, application_id: &str) {
33        unsafe {
34            ffi::gdk_wayland_toplevel_set_application_id(
35                self.to_glib_none().0,
36                application_id.to_glib_none().0,
37            );
38        }
39    }
40
41    #[doc(alias = "gdk_wayland_toplevel_set_transient_for_exported")]
42    pub fn set_transient_for_exported(&self, parent_handle_str: &str) -> bool {
43        unsafe {
44            from_glib(ffi::gdk_wayland_toplevel_set_transient_for_exported(
45                self.to_glib_none().0,
46                parent_handle_str.to_glib_none().0,
47            ))
48        }
49    }
50
51    #[cfg_attr(feature = "v4_12", deprecated = "Since 4.12")]
52    #[allow(deprecated)]
53    #[doc(alias = "gdk_wayland_toplevel_unexport_handle")]
54    pub fn unexport_handle(&self) {
55        unsafe {
56            ffi::gdk_wayland_toplevel_unexport_handle(self.to_glib_none().0);
57        }
58    }
59}