#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
use libc;
use Window;
use platform::Window as LinuxWindow;
pub trait WindowExt {
fn get_xlib_window(&self) -> Option<*mut libc::c_void>;
fn get_xlib_display(&self) -> Option<*mut libc::c_void>;
}
impl WindowExt for Window {
#[inline]
fn get_xlib_window(&self) -> Option<*mut libc::c_void> {
match self.window {
LinuxWindow::X(ref w) => Some(w.get_xlib_window()),
_ => None
}
}
#[inline]
fn get_xlib_display(&self) -> Option<*mut libc::c_void> {
match self.window {
LinuxWindow::X(ref w) => Some(w.get_xlib_display()),
_ => None
}
}
}