@@ -21,7 +21,7 @@ pub use fonts::FontSystem;
use platform::{MacForegroundPlatform, MacPlatform};
pub use renderer::Surface;
use std::{ops::Range, rc::Rc, sync::Arc};
-use window::Window;
+use window::MacWindow;
use crate::executor;
@@ -1,6 +1,6 @@
use super::{
event::key_to_native, screen::Screen, status_item::StatusItem, BoolExt as _, Dispatcher,
- FontSystem, Window,
+ FontSystem, MacWindow,
};
use crate::{
executor,
@@ -594,11 +594,11 @@ impl platform::Platform for MacPlatform {
options: platform::WindowOptions,
executor: Rc<executor::Foreground>,
) -> Box<dyn platform::Window> {
- Box::new(Window::open(handle, options, executor, self.fonts()))
+ Box::new(MacWindow::open(handle, options, executor, self.fonts()))
}
fn main_window(&self) -> Option<AnyWindowHandle> {
- Window::main_window()
+ MacWindow::main_window()
}
fn add_status_item(&self, _handle: AnyWindowHandle) -> Box<dyn platform::Window> {
@@ -423,9 +423,9 @@ impl WindowState {
}
}
-pub struct Window(Rc<RefCell<WindowState>>);
+pub struct MacWindow(Rc<RefCell<WindowState>>);
-impl Window {
+impl MacWindow {
pub fn open(
handle: AnyWindowHandle,
options: platform::WindowOptions,
@@ -636,7 +636,7 @@ impl Window {
}
}
-impl Drop for Window {
+impl Drop for MacWindow {
fn drop(&mut self) {
let this = self.0.borrow();
let window = this.native_window;
@@ -650,7 +650,7 @@ impl Drop for Window {
}
}
-impl platform::Window for Window {
+impl platform::Window for MacWindow {
fn bounds(&self) -> WindowBounds {
self.0.as_ref().borrow().bounds()
}