mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 12:50:04 -04:00
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:
@@ -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)>) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user