diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -23,6 +23,8 @@ extern crate libc; pub use events::*; +use std::default::Default; + #[cfg(target_os = "win32")] use winimpl = win32; #[cfg(target_os = "linux")] @@ -145,6 +147,12 @@ pub struct Window { window: winimpl::Window, } +impl Default for Window { + fn default() -> Window { + Window::new().unwrap() + } +} + impl Window { /// Creates a new OpenGL context, and a Window for platforms where this is appropriate. /// |