diff options
-rw-r--r-- | src/headless.rs | 6 | ||||
-rw-r--r-- | src/lib.rs | 14 | ||||
-rw-r--r-- | src/window.rs | 20 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/headless.rs b/src/headless.rs index 5106a7b..f3df83f 100644 --- a/src/headless.rs +++ b/src/headless.rs @@ -6,7 +6,7 @@ use GlRequest; use gl_common; use libc; -use winimpl; +use platform; /// Object that allows you to build headless contexts. pub struct HeadlessRendererBuilder { @@ -52,7 +52,7 @@ impl HeadlessRendererBuilder { /// Error should be very rare and only occur in case of permission denied, incompatible system, /// out of memory, etc. pub fn build(self) -> Result<HeadlessContext, CreationError> { - winimpl::HeadlessContext::new(self.attribs).map(|w| HeadlessContext { context: w }) + platform::HeadlessContext::new(self.attribs).map(|w| HeadlessContext { context: w }) } /// Builds the headless context. @@ -67,7 +67,7 @@ impl HeadlessRendererBuilder { /// Represents a headless OpenGL context. pub struct HeadlessContext { - context: winimpl::HeadlessContext, + context: platform::HeadlessContext, } impl HeadlessContext { @@ -62,16 +62,16 @@ use this_platform_is_not_supported; #[cfg(target_os = "windows")] #[path="win32/mod.rs"] -mod winimpl; +mod platform; #[cfg(target_os = "linux")] #[path="x11/mod.rs"] -mod winimpl; +mod platform; #[cfg(target_os = "macos")] #[path="cocoa/mod.rs"] -mod winimpl; +mod platform; #[cfg(target_os = "android")] #[path="android/mod.rs"] -mod winimpl; +mod platform; mod events; #[cfg(feature = "headless")] @@ -239,10 +239,10 @@ pub struct BuilderAttribs<'a> { #[allow(dead_code)] headless: bool, strict: bool, - sharing: Option<&'a winimpl::Window>, + sharing: Option<&'a platform::Window>, dimensions: Option<(u32, u32)>, title: String, - monitor: Option<winimpl::MonitorID>, + monitor: Option<platform::MonitorID>, gl_version: GlRequest, gl_debug: bool, vsync: bool, @@ -279,7 +279,7 @@ impl BuilderAttribs<'static> { } impl<'a> BuilderAttribs<'a> { - fn extract_non_static(mut self) -> (BuilderAttribs<'static>, Option<&'a winimpl::Window>) { + fn extract_non_static(mut self) -> (BuilderAttribs<'static>, Option<&'a platform::Window>) { let sharing = self.sharing.take(); let new_attribs = BuilderAttribs { diff --git a/src/window.rs b/src/window.rs index f45cd68..6d5cdfe 100644 --- a/src/window.rs +++ b/src/window.rs @@ -13,7 +13,7 @@ use native_monitor::NativeMonitorId; use gl_common; use libc; -use winimpl; +use platform; /// Object that allows you to build windows. pub struct WindowBuilder<'a> { @@ -145,7 +145,7 @@ impl<'a> WindowBuilder<'a> { } // building - winimpl::Window::new(self.attribs).map(|w| Window { window: w }) + platform::Window::new(self.attribs).map(|w| Window { window: w }) } /// Builds the window. @@ -182,7 +182,7 @@ impl<'a> WindowBuilder<'a> { /// } /// ``` pub struct Window { - window: winimpl::Window, + window: platform::Window, } impl Default for Window { @@ -435,7 +435,7 @@ impl gl_common::GlFunctionsSource for Window { /// threads. #[derive(Clone)] pub struct WindowProxy { - proxy: winimpl::WindowProxy, + proxy: platform::WindowProxy, } impl WindowProxy { @@ -449,7 +449,7 @@ impl WindowProxy { } } /// An iterator for the `poll_events` function. -pub struct PollEventsIterator<'a>(winimpl::PollEventsIterator<'a>); +pub struct PollEventsIterator<'a>(platform::PollEventsIterator<'a>); impl<'a> Iterator for PollEventsIterator<'a> { type Item = Event; @@ -464,7 +464,7 @@ impl<'a> Iterator for PollEventsIterator<'a> { } /// An iterator for the `wait_events` function. -pub struct WaitEventsIterator<'a>(winimpl::WaitEventsIterator<'a>); +pub struct WaitEventsIterator<'a>(platform::WaitEventsIterator<'a>); impl<'a> Iterator for WaitEventsIterator<'a> { type Item = Event; @@ -482,7 +482,7 @@ impl<'a> Iterator for WaitEventsIterator<'a> { // Implementation note: we retreive the list once, then serve each element by one by one. // This may change in the future. pub struct AvailableMonitorsIter { - data: VecDequeIter<winimpl::MonitorID>, + data: VecDequeIter<platform::MonitorID>, } impl Iterator for AvailableMonitorsIter { @@ -499,17 +499,17 @@ impl Iterator for AvailableMonitorsIter { /// Returns the list of all available monitors. pub fn get_available_monitors() -> AvailableMonitorsIter { - let data = winimpl::get_available_monitors(); + let data = platform::get_available_monitors(); AvailableMonitorsIter{ data: data.into_iter() } } /// Returns the primary monitor of the system. pub fn get_primary_monitor() -> MonitorID { - MonitorID(winimpl::get_primary_monitor()) + MonitorID(platform::get_primary_monitor()) } /// Identifier for a monitor. -pub struct MonitorID(winimpl::MonitorID); +pub struct MonitorID(platform::MonitorID); impl MonitorID { /// Returns a human-readable name of the monitor. |