Introduce more GPUI2 APIs needed for transitioning the workspace

This commit is contained in:
Antonio Scandurra 2023-11-02 10:53:28 +01:00
parent 8793300444
commit 32db64a049
7 changed files with 80 additions and 100 deletions

View file

@ -138,12 +138,7 @@ pub(crate) trait PlatformWindow {
fn mouse_position(&self) -> Point<Pixels>;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn set_input_handler(&mut self, input_handler: Box<dyn PlatformInputHandler>);
fn prompt(
&self,
level: WindowPromptLevel,
msg: &str,
answers: &[&str],
) -> oneshot::Receiver<usize>;
fn prompt(&self, level: PromptLevel, msg: &str, answers: &[&str]) -> oneshot::Receiver<usize>;
fn activate(&self);
fn set_title(&mut self, title: &str);
fn set_edited(&mut self, edited: bool);
@ -454,14 +449,6 @@ impl Default for WindowAppearance {
}
}
#[derive(Copy, Clone, Debug, PartialEq, Default)]
pub enum WindowPromptLevel {
#[default]
Info,
Warning,
Critical,
}
#[derive(Copy, Clone, Debug)]
pub struct PathPromptOptions {
pub files: bool,