mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Merge pull request #626 from tomaka/rm-window-feature
Remove the window feature entirely
This commit is contained in:
commit
819c5f679b
|
@ -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"
|
||||
|
|
|
@ -283,7 +283,6 @@ impl GlContext for Window {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "window")]
|
||||
#[derive(Clone)]
|
||||
pub struct WindowProxy;
|
||||
|
||||
|
|
|
@ -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<Window, CreationError>
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue