mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
wayland: WindowExt implementations.
This commit is contained in:
@@ -286,6 +286,18 @@ impl Window {
|
||||
Err(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_wayland_display(&self) -> *mut libc::c_void {
|
||||
WAYLAND_CONTEXT.as_ref().unwrap() // context exists if window was created
|
||||
.display_ptr() as *mut libc::c_void
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_wayland_surface(&self) -> *mut libc::c_void {
|
||||
use wayland_client::Proxy;
|
||||
self.surface.ptr() as *mut libc::c_void
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||
WAYLAND_CONTEXT.as_ref().unwrap() // context exists if window was created
|
||||
|
||||
Reference in New Issue
Block a user