mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
Implement Default for Window
This commit is contained in:
parent
ca83db39c7
commit
3aab801f29
|
@ -23,6 +23,8 @@ extern crate libc;
|
||||||
|
|
||||||
pub use events::*;
|
pub use events::*;
|
||||||
|
|
||||||
|
use std::default::Default;
|
||||||
|
|
||||||
#[cfg(target_os = "win32")]
|
#[cfg(target_os = "win32")]
|
||||||
use winimpl = win32;
|
use winimpl = win32;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
@ -145,6 +147,12 @@ pub struct Window {
|
||||||
window: winimpl::Window,
|
window: winimpl::Window,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Window {
|
||||||
|
fn default() -> Window {
|
||||||
|
Window::new().unwrap()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Window {
|
impl Window {
|
||||||
/// Creates a new OpenGL context, and a Window for platforms where this is appropriate.
|
/// Creates a new OpenGL context, and a Window for platforms where this is appropriate.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue