Remove platform::WindowContext trait

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-09-09 15:24:28 +02:00
parent 1c810d7e8d
commit e803dd9f72
4 changed files with 18 additions and 27 deletions

View file

@ -228,24 +228,6 @@ impl super::Dispatcher for Dispatcher {
}
}
impl super::WindowContext for Window {
fn size(&self) -> Vector2F {
self.size
}
fn scale_factor(&self) -> f32 {
self.scale_factor
}
fn titlebar_height(&self) -> f32 {
24.
}
fn present_scene(&mut self, scene: crate::Scene) {
self.current_scene = Some(scene);
}
}
impl super::Window for Window {
fn as_any_mut(&mut self) -> &mut dyn Any {
self
@ -300,6 +282,22 @@ impl super::Window for Window {
fn zoom(&self) {}
fn toggle_full_screen(&self) {}
fn size(&self) -> Vector2F {
self.size
}
fn scale_factor(&self) -> f32 {
self.scale_factor
}
fn titlebar_height(&self) -> f32 {
24.
}
fn present_scene(&mut self, scene: crate::Scene) {
self.current_scene = Some(scene);
}
}
pub fn platform() -> Platform {