Add accessor for underlying display handle on Linux. Although unimplemented on other platforms, this applies to at least android as well.

This commit is contained in:
Glenn Watson committed 2014-10-24 15:20:25 +10:00
1 parent d8ca679a6e
commit 5693fbcce3
5 files changed
+24

No files matched your search

+4
View File
@@ -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]
+8
View File
@@ -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 fn platform_display(&self) -> *mut libc::c_void {
self.window.platform_display()
}
}
/// Represents a headless OpenGL context.
+4
View File
@@ -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!()
}
}
+4
View File
@@ -233,6 +233,10 @@ impl Window {
ffi::SwapBuffers(self.hdc);
}
}
pub fn platform_display(&self) -> *mut libc::c_void {
unimplemented!()
}
}
#[unsafe_destructor]
+4
View File
@@ -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 {