gdk4_wayland/auto/wayland_surface.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
5use crate::ffi;
6use glib::prelude::*;
7#[cfg(feature = "v4_18")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
9use glib::translate::*;
10
11glib::wrapper! {
12 #[doc(alias = "GdkWaylandSurface")]
13 pub struct WaylandSurface(Object<ffi::GdkWaylandSurface>) @extends gdk::Surface;
14
15 match fn {
16 type_ => || ffi::gdk_wayland_surface_get_type(),
17 }
18}
19
20impl WaylandSurface {
21 pub const NONE: Option<&'static WaylandSurface> = None;
22}
23
24mod sealed {
25 pub trait Sealed {}
26 impl<T: super::IsA<super::WaylandSurface>> Sealed for T {}
27}
28
29pub trait WaylandSurfaceExt: IsA<WaylandSurface> + sealed::Sealed + 'static {
30 #[cfg(feature = "v4_18")]
31 #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
32 #[doc(alias = "gdk_wayland_surface_force_next_commit")]
33 fn force_next_commit(&self) {
34 unsafe {
35 ffi::gdk_wayland_surface_force_next_commit(self.as_ref().to_glib_none().0);
36 }
37 }
38}
39
40impl<O: IsA<WaylandSurface>> WaylandSurfaceExt for O {}