gdk4_wayland/auto/
wayland_toplevel.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
#![allow(deprecated)]

use crate::{ffi, WaylandSurface};
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "GdkWaylandToplevel")]
    pub struct WaylandToplevel(Object<ffi::GdkWaylandToplevel>) @extends WaylandSurface, gdk::Surface, @implements gdk::Toplevel;

    match fn {
        type_ => || ffi::gdk_wayland_toplevel_get_type(),
    }
}

impl WaylandToplevel {
    #[cfg(feature = "v4_12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
    #[doc(alias = "gdk_wayland_toplevel_drop_exported_handle")]
    pub fn drop_exported_handle(&self, handle: &str) {
        unsafe {
            ffi::gdk_wayland_toplevel_drop_exported_handle(
                self.to_glib_none().0,
                handle.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "gdk_wayland_toplevel_set_application_id")]
    pub fn set_application_id(&self, application_id: &str) {
        unsafe {
            ffi::gdk_wayland_toplevel_set_application_id(
                self.to_glib_none().0,
                application_id.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "gdk_wayland_toplevel_set_transient_for_exported")]
    pub fn set_transient_for_exported(&self, parent_handle_str: &str) -> bool {
        unsafe {
            from_glib(ffi::gdk_wayland_toplevel_set_transient_for_exported(
                self.to_glib_none().0,
                parent_handle_str.to_glib_none().0,
            ))
        }
    }

    #[cfg_attr(feature = "v4_12", deprecated = "Since 4.12")]
    #[allow(deprecated)]
    #[doc(alias = "gdk_wayland_toplevel_unexport_handle")]
    pub fn unexport_handle(&self) {
        unsafe {
            ffi::gdk_wayland_toplevel_unexport_handle(self.to_glib_none().0);
        }
    }
}