Remove platform::WindowContext trait
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
1c810d7e8d
commit
e803dd9f72
@@ -1,7 +1,6 @@
|
||||
use cocoa::{
|
||||
appkit::{NSSquareStatusItemLength, NSStatusBar, NSStatusItem, NSView},
|
||||
base::{id, nil, NO, YES},
|
||||
foundation::NSRect,
|
||||
quartzcore::AutoresizingMask,
|
||||
};
|
||||
use core_foundation::base::TCFType;
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::{
|
||||
vector::{vec2f, Vector2F},
|
||||
},
|
||||
keymap::Keystroke,
|
||||
platform::{self, Event, WindowBounds, WindowContext},
|
||||
platform::{self, Event, WindowBounds},
|
||||
InputHandler, KeyDownEvent, ModifiersChangedEvent, MouseButton, MouseButtonEvent,
|
||||
MouseMovedEvent, Scene,
|
||||
};
|
||||
@@ -649,9 +649,7 @@ impl platform::Window for Window {
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
}
|
||||
|
||||
impl platform::WindowContext for Window {
|
||||
fn size(&self) -> Vector2F {
|
||||
self.0.as_ref().borrow().size()
|
||||
}
|
||||
@@ -713,9 +711,7 @@ impl WindowState {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl platform::WindowContext for WindowState {
|
||||
fn size(&self) -> Vector2F {
|
||||
let NSSize { width, height, .. } =
|
||||
unsafe { NSView::frame(self.native_window.contentView()) }.size;
|
||||
|
||||
Reference in New Issue
Block a user