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
use crate::WaylandSurface;
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
use glib::translate::*;
use glib::IsA;
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
use wayland_client::{protocol::wl_surface::WlSurface, sys::client::wl_proxy, Proxy};
pub trait WaylandSurfaceExtManual: 'static {
#[doc(alias = "gdk_wayland_surface_get_wl_surface")]
#[doc(alias = "get_wl_surface")]
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
fn wl_surface(&self) -> WlSurface;
}
impl<O: IsA<WaylandSurface>> WaylandSurfaceExtManual for O {
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
fn wl_surface(&self) -> WlSurface {
unsafe {
let ptr = ffi::gdk_wayland_surface_get_wl_surface(self.as_ref().to_glib_none().0);
Proxy::from_c_ptr(ptr as *mut wl_proxy).into()
}
}
}