diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2016-01-07 16:01:18 +0100 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2016-02-10 17:39:35 +0100 |
commit | ec76d991adc3522512f07935f78569dc4a9d089b (patch) | |
tree | 6a16b4f7559cfb4504b7993df1a0d55632499c5e /src/platform/windows | |
parent | 86dd75f7e9b6078919387c356bca7dd1738d5777 (diff) | |
download | glutin-ec76d991adc3522512f07935f78569dc4a9d089b.tar.gz glutin-ec76d991adc3522512f07935f78569dc4a9d089b.zip |
Unlocks platform-specific attributes
Diffstat (limited to 'src/platform/windows')
-rw-r--r-- | src/platform/windows/mod.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index 246ca51..0c78322 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -51,6 +51,10 @@ lazy_static! { }; } +#[derive(Default)] +pub struct PlatformSpecificWindowBuilderAttributes; +#[derive(Default)] +pub struct PlatformSpecificHeadlessBuilderAttributes; /// The Win32 implementation of the main `Window` object. pub struct Window(win32::Window); @@ -59,7 +63,8 @@ impl Window { /// See the docs in the crate root file. #[inline] pub fn new(window: &WindowAttributes, pf_reqs: &PixelFormatRequirements, - opengl: &GlAttributes<&Window>) -> Result<Window, CreationError> + opengl: &GlAttributes<&Window>, _: &PlatformSpecificWindowBuilderAttributes) + -> Result<Window, CreationError> { win32::Window::new(window, pf_reqs, &opengl.clone().map_sharing(|w| &w.0), EGL.as_ref().map(|w| &w.0)).map(|w| Window(w)) @@ -92,7 +97,9 @@ pub enum HeadlessContext { impl HeadlessContext { pub fn new(dimensions: (u32, u32), pf_reqs: &PixelFormatRequirements, - opengl: &GlAttributes<&HeadlessContext>) -> Result<HeadlessContext, CreationError> + opengl: &GlAttributes<&HeadlessContext>, + _: &PlatformSpecificHeadlessBuilderAttributes) + -> Result<HeadlessContext, CreationError> { // if EGL is available, we try using EGL first // if EGL returns an error, we try the hidden window method |