Add support for xcb

Due to XCB and Xlib compability, we can take a shortcut and use X11's
underlying xcb_connection. This way, a complete XCB backend implementation can
be avoided.
This commit is contained in:
Nicolas Koch 2016-07-30 23:58:28 +02:00
parent 20afec5a14
commit 32d01b288e
5 changed files with 26 additions and 1 deletions

View file

@ -694,6 +694,12 @@ impl Window {
self.x.window as *mut libc::c_void
}
pub fn get_xcb_connection(&self) -> *mut libc::c_void {
unsafe {
(self.x.display.xlib_xcb.XGetXCBConnection)(self.get_xlib_display() as *mut _) as *mut _
}
}
#[inline]
pub fn set_window_resize_callback(&mut self, _: Option<fn(u32, u32)>) {
}