diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-20 22:52:22 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-20 22:52:22 +0100 |
commit | 7ff76cddd981d64fbf0f821ba8a5f456fd0fcb29 (patch) | |
tree | 645cd2d15272d61227fed75adfba294caeaac76b /src | |
parent | 8e1d0f7a976078ef7031ff84e077f00655d4e061 (diff) | |
parent | 25ce029cf67993a7bc8dfc3de0ccd4ab3c9f349b (diff) | |
download | glutin-7ff76cddd981d64fbf0f821ba8a5f456fd0fcb29.tar.gz glutin-7ff76cddd981d64fbf0f821ba8a5f456fd0fcb29.zip |
Merge pull request #285 from binsoftware/oculus-integration
expose platform-specific window handle (currently Win only)
Diffstat (limited to 'src')
-rw-r--r-- | src/android/mod.rs | 4 | ||||
-rw-r--r-- | src/cocoa/mod.rs | 4 | ||||
-rw-r--r-- | src/win32/mod.rs | 4 | ||||
-rw-r--r-- | src/window.rs | 8 | ||||
-rw-r--r-- | src/x11/window/mod.rs | 4 |
5 files changed, 24 insertions, 0 deletions
diff --git a/src/android/mod.rs b/src/android/mod.rs index 72ebda3..30e6c08 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -329,6 +329,10 @@ impl Window { self.display as *mut libc::c_void } + pub fn platform_window(&self) -> *mut libc::c_void { + unimplemented!() + } + pub fn get_api(&self) -> ::Api { ::Api::OpenGlEs } diff --git a/src/cocoa/mod.rs b/src/cocoa/mod.rs index 2b8b342..5d7bcd9 100644 --- a/src/cocoa/mod.rs +++ b/src/cocoa/mod.rs @@ -604,6 +604,10 @@ impl Window { unimplemented!() } + pub fn platform_window(&self) -> *mut libc::c_void { + unimplemented!() + } + pub fn get_api(&self) -> ::Api { ::Api::OpenGl } diff --git a/src/win32/mod.rs b/src/win32/mod.rs index e0adb7b..cfb573a 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -212,6 +212,10 @@ impl Window { unimplemented!() } + pub fn platform_window(&self) -> *mut libc::c_void { + self.window as *mut libc::c_void + } + /// See the docs in the crate root file. pub fn get_api(&self) -> ::Api { ::Api::OpenGl diff --git a/src/window.rs b/src/window.rs index c916b27..56f3410 100644 --- a/src/window.rs +++ b/src/window.rs @@ -357,6 +357,14 @@ impl Window { self.window.platform_display() } + /// Gets the native platform specific window handle. This is + /// typically only required when integrating with other libraries + /// that need this information. + #[inline] + pub unsafe fn platform_window(&self) -> *mut libc::c_void { + self.window.platform_window() + } + /// Returns the API that is currently provided by this window. /// /// - On Windows and OS/X, this always returns `OpenGl`. diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index f8afc08..faeea3e 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -719,6 +719,10 @@ impl Window { self.x.display as *mut libc::c_void } + pub fn platform_window(&self) -> *mut libc::c_void { + unimplemented!() + } + /// See the docs in the crate root file. pub fn get_api(&self) -> ::Api { ::Api::OpenGl |