gpui: Decouple X11 logic from LinuxPlatform (#7598)
Release Notes: - Separated Linux platform and X11-specific code, so that we can add Wayland support now. --------- Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
2e7db57e16
commit
266988adea
11 changed files with 337 additions and 215 deletions
15
crates/gpui/src/platform/linux/client.rs
Normal file
15
crates/gpui/src/platform/linux/client.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
use std::rc::Rc;
|
||||
|
||||
use crate::platform::PlatformWindow;
|
||||
use crate::{AnyWindowHandle, DisplayId, PlatformDisplay, WindowOptions};
|
||||
|
||||
pub trait Client {
|
||||
fn run(&self, on_finish_launching: Box<dyn FnOnce()>);
|
||||
fn displays(&self) -> Vec<Rc<dyn PlatformDisplay>>;
|
||||
fn display(&self, id: DisplayId) -> Option<Rc<dyn PlatformDisplay>>;
|
||||
fn open_window(
|
||||
&self,
|
||||
handle: AnyWindowHandle,
|
||||
options: WindowOptions,
|
||||
) -> Box<dyn PlatformWindow>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue