// 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

use crate::ffi;
use glib::prelude::*;
#[cfg(feature = "v4_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
use glib::translate::*;

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

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

impl WaylandSurface {
    pub const NONE: Option<&'static WaylandSurface> = None;
}

pub trait WaylandSurfaceExt: IsA<WaylandSurface> + 'static {
    #[cfg(feature = "v4_18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
    #[doc(alias = "gdk_wayland_surface_force_next_commit")]
    fn force_next_commit(&self) {
        unsafe {
            ffi::gdk_wayland_surface_force_next_commit(self.as_ref().to_glib_none().0);
        }
    }
}

impl<O: IsA<WaylandSurface>> WaylandSurfaceExt for O {}
