mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
Add get_api() function
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user