From c893e4faec212953174c12c68538d55929c90ad3 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 18 Nov 2014 17:55:26 +0100 Subject: Add get_api() function --- src/win32/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/win32/mod.rs') diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 8339cb1..5ba5a26 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -41,6 +41,11 @@ impl HeadlessContext { pub fn get_proc_address(&self, addr: &str) -> *const () { self.0.get_proc_address(addr) } + + /// See the docs in the crate root file. + pub fn get_api(&self) -> ::Api { + ::Api::OpenGl + } } /// The Win32 implementation of the main `Window` object. @@ -252,6 +257,11 @@ impl Window { pub fn platform_display(&self) -> *mut libc::c_void { unimplemented!() } + + /// See the docs in the crate root file. + pub fn get_api(&self) -> ::Api { + ::Api::OpenGl + } } #[unsafe_destructor] -- cgit v1.2.3