mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Merge pull request #66 from glennw/platform_data
Add accessor for underlying display handle on Linux.
This commit is contained in:
commit
fe8646c556
|
@ -186,6 +186,10 @@ impl Window {
|
|||
ffi::egl::SwapBuffers(self.display, self.surface);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
#[unsafe_destructor]
|
||||
|
|
|
@ -341,6 +341,14 @@ impl Window {
|
|||
pub fn swap_buffers(&self) {
|
||||
self.window.swap_buffers()
|
||||
}
|
||||
|
||||
/// Gets the native platform specific display for this window.
|
||||
/// This is typically only required when integrating with
|
||||
/// other libraries that need this information.
|
||||
#[inline]
|
||||
pub unsafe fn platform_display(&self) -> *mut libc::c_void {
|
||||
self.window.platform_display()
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a headless OpenGL context.
|
||||
|
|
|
@ -337,4 +337,8 @@ impl Window {
|
|||
pub fn swap_buffers(&self) {
|
||||
unsafe { self.context.flushBuffer(); }
|
||||
}
|
||||
|
||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,6 +233,10 @@ impl Window {
|
|||
ffi::SwapBuffers(self.hdc);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
#[unsafe_destructor]
|
||||
|
|
|
@ -469,6 +469,10 @@ impl Window {
|
|||
pub fn swap_buffers(&self) {
|
||||
unsafe { ffi::glx::SwapBuffers(self.display, self.window) }
|
||||
}
|
||||
|
||||
pub fn platform_display(&self) -> *mut libc::c_void {
|
||||
self.display as *mut libc::c_void
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Window {
|
||||
|
|
Loading…
Reference in a new issue