From 982279bc39737af0ba8ee712b744cc3335b001b0 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 5 Dec 2015 11:54:56 +0100 Subject: Update the emscripten port of glutin --- src/platform/emscripten/mod.rs | 11 +++++++++-- src/platform/mod.rs | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/platform') diff --git a/src/platform/emscripten/mod.rs b/src/platform/emscripten/mod.rs index 270cdaf..1a78dfb 100644 --- a/src/platform/emscripten/mod.rs +++ b/src/platform/emscripten/mod.rs @@ -1,7 +1,12 @@ #![cfg(target_os = "emscripten")] +use Api; use ContextError; +use CreationError; +use GlAttributes; use GlContext; +use PixelFormat; +use PixelFormatRequirements; pub use api::emscripten::{Window, WindowProxy, MonitorId, get_available_monitors}; pub use api::emscripten::{get_primary_monitor, WaitEventsIterator, PollEventsIterator}; @@ -11,8 +16,10 @@ pub struct HeadlessContext(Window); impl HeadlessContext { /// See the docs in the crate root file. #[inline] - pub fn new(builder: BuilderAttribs) -> Result { - Window::new(builder).map(|w| HeadlessContext(w)) + pub fn new(_: (u32, u32), _: &PixelFormatRequirements, _: &GlAttributes<&HeadlessContext>) + -> Result + { + unimplemented!() } } diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 4855765..8527da2 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -15,8 +15,11 @@ mod platform; #[cfg(target_os = "ios")] #[path="ios/mod.rs"] mod platform; +#[cfg(target_os = "emscripten")] +#[path="emscripten/mod.rs"] +mod platform; #[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android"), not(target_os = "dragonfly"), - not(target_os = "freebsd")))] + not(target_os = "freebsd"), not(target_os = "emscripten")))] use this_platform_is_not_supported; -- cgit v1.2.3