Remove platform::WindowContext
trait
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
1c810d7e8d
commit
e803dd9f72
4 changed files with 18 additions and 27 deletions
|
@ -110,7 +110,7 @@ pub trait InputHandler {
|
|||
fn rect_for_range(&self, range_utf16: Range<usize>) -> Option<RectF>;
|
||||
}
|
||||
|
||||
pub trait Window: WindowContext {
|
||||
pub trait Window {
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any;
|
||||
fn on_event(&mut self, callback: Box<dyn FnMut(Event) -> bool>);
|
||||
fn on_active_status_change(&mut self, callback: Box<dyn FnMut(bool)>);
|
||||
|
@ -127,9 +127,7 @@ pub trait Window: WindowContext {
|
|||
fn minimize(&self);
|
||||
fn zoom(&self);
|
||||
fn toggle_full_screen(&self);
|
||||
}
|
||||
|
||||
pub trait WindowContext {
|
||||
fn size(&self) -> Vector2F;
|
||||
fn scale_factor(&self) -> f32;
|
||||
fn titlebar_height(&self) -> f32;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue