diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 11:11:11 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 12:03:58 +0200 |
commit | 8f3ec7998de74dfdb69bd1ef7f038767313b3ae1 (patch) | |
tree | 63058c0d55c959b45a0678c821d7328106074c29 /src/api/win32 | |
parent | 932e565391ea6004714ff74e006637ad29961b06 (diff) | |
download | glutin-8f3ec7998de74dfdb69bd1ef7f038767313b3ae1.tar.gz glutin-8f3ec7998de74dfdb69bd1ef7f038767313b3ae1.zip |
Finish converting windows to the new design
Diffstat (limited to 'src/api/win32')
-rw-r--r-- | src/api/win32/mod.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/api/win32/mod.rs b/src/api/win32/mod.rs index 7d7de05..eb31873 100644 --- a/src/api/win32/mod.rs +++ b/src/api/win32/mod.rs @@ -13,11 +13,14 @@ use libc; use ContextError; use {CreationError, Event, MouseCursor}; use CursorState; +use GlAttributes; use GlContext; use Api; use PixelFormat; +use PixelFormatRequirements; use BuilderAttribs; +use WindowAttributes; pub use self::monitor::{MonitorID, get_available_monitors, get_primary_monitor}; @@ -83,15 +86,18 @@ impl WindowProxy { impl Window { /// See the docs in the crate root file. - pub fn new(builder: BuilderAttribs, egl: Option<&Egl>) -> Result<Window, CreationError> { - let opengl = builder.opengl.clone().map_sharing(|sharing| { + pub fn new(window: &WindowAttributes, pf_reqs: &PixelFormatRequirements, + opengl: &GlAttributes<&Window>, egl: Option<&Egl>) + -> Result<Window, CreationError> + { + let opengl = opengl.clone().map_sharing(|sharing| { match sharing.context { Context::Wgl(ref c) => RawContext::Wgl(c.get_hglrc()), Context::Egl(_) => unimplemented!(), // FIXME: } }); - init::new_window(&builder.window, &builder.pf_reqs, &opengl, egl) + init::new_window(window, pf_reqs, &opengl, egl) } /// See the docs in the crate root file. |