From 7a625ef3d8b7fec62222ad6e45f9e1560732ae7a Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 3 Oct 2015 10:33:37 +0200 Subject: Remove the window feature entirely --- Cargo.toml | 4 ---- src/api/android/mod.rs | 1 - src/api/cocoa/mod.rs | 4 ---- src/api/glx/mod.rs | 2 +- src/api/x11/mod.rs | 2 +- src/lib.rs | 4 ---- src/platform/linux/api_dispatch.rs | 4 +--- src/platform/linux/mod.rs | 8 -------- 8 files changed, 3 insertions(+), 26 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b474e77..bbdfcf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,10 +10,6 @@ repository = "https://github.com/tomaka/glutin" documentation = "https://tomaka.github.io/glutin/" build = "build.rs" -[features] -default = ["window"] -window = [] - [dependencies] gl_common = "0.1.0" lazy_static = "0.1.10" diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs index eef04e8..23440d3 100644 --- a/src/api/android/mod.rs +++ b/src/api/android/mod.rs @@ -283,7 +283,6 @@ impl GlContext for Window { } } -#[cfg(feature = "window")] #[derive(Clone)] pub struct WindowProxy; diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index 5a2f004..2b4b5e5 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -185,12 +185,9 @@ pub struct Window { delegate: WindowDelegate, } -#[cfg(feature = "window")] unsafe impl Send for Window {} -#[cfg(feature = "window")] unsafe impl Sync for Window {} -#[cfg(feature = "window")] #[derive(Clone)] pub struct WindowProxy; @@ -264,7 +261,6 @@ impl<'a> Iterator for WaitEventsIterator<'a> { } impl Window { - #[cfg(feature = "window")] pub fn new(win_attribs: &WindowAttributes, pf_reqs: &PixelFormatRequirements, opengl: &GlAttributes<&Window>) -> Result { diff --git a/src/api/glx/mod.rs b/src/api/glx/mod.rs index 43bb1d7..40ef63c 100644 --- a/src/api/glx/mod.rs +++ b/src/api/glx/mod.rs @@ -1,4 +1,4 @@ -#![cfg(all(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"), feature = "window"))] +#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))] use ContextError; use CreationError; diff --git a/src/api/x11/mod.rs b/src/api/x11/mod.rs index d6a8772..7a649ab 100644 --- a/src/api/x11/mod.rs +++ b/src/api/x11/mod.rs @@ -1,4 +1,4 @@ -#![cfg(all(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"), feature = "window"))] +#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))] pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor}; pub use self::window::{Window, XWindow, PollEventsIterator, WaitEventsIterator, Context, WindowProxy}; diff --git a/src/lib.rs b/src/lib.rs index a9c9bef..b62c4a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,11 +60,8 @@ extern crate x11_dl; pub use events::*; pub use headless::{HeadlessRendererBuilder, HeadlessContext}; -#[cfg(feature = "window")] pub use window::{WindowBuilder, WindowProxy, PollEventsIterator, WaitEventsIterator}; -#[cfg(feature = "window")] pub use window::{AvailableMonitorsIter, MonitorId, get_available_monitors, get_primary_monitor}; -#[cfg(feature = "window")] pub use native_monitor::NativeMonitorId; use std::io; @@ -75,7 +72,6 @@ mod api; mod platform; mod events; mod headless; -#[cfg(feature = "window")] mod window; pub mod os; diff --git a/src/platform/linux/api_dispatch.rs b/src/platform/linux/api_dispatch.rs index cb35b26..aa1ba58 100644 --- a/src/platform/linux/api_dispatch.rs +++ b/src/platform/linux/api_dispatch.rs @@ -1,6 +1,4 @@ -/*#[cfg(feature = "window")] -pub use api::x11::{Window, WindowProxy, MonitorId, get_available_monitors, get_primary_monitor}; -#[cfg(feature = "window")] +/*pub use api::x11::{Window, WindowProxy, MonitorId, get_available_monitors, get_primary_monitor}; pub use api::x11::{WaitEventsIterator, PollEventsIterator};*/ use std::collections::VecDeque; diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs index 4f97d5c..c984926 100644 --- a/src/platform/linux/mod.rs +++ b/src/platform/linux/mod.rs @@ -11,18 +11,10 @@ use libc; use api::osmesa::{self, OsMesaContext}; -#[cfg(feature = "window")] pub use self::api_dispatch::{Window, WindowProxy, MonitorId, get_available_monitors, get_primary_monitor}; -#[cfg(feature = "window")] pub use self::api_dispatch::{WaitEventsIterator, PollEventsIterator}; -#[cfg(feature = "window")] mod api_dispatch; -#[cfg(not(feature = "window"))] -pub type Window = (); // TODO: hack to make things work -#[cfg(not(feature = "window"))] -pub type MonitorId = (); // TODO: hack to make things work - pub struct HeadlessContext(OsMesaContext); impl HeadlessContext { -- cgit v1.2.3