This PR changes GPUI to open windows with a default size and location, and to otherwise inherit from their spawning window. Note: The linux build now crashes on startup. Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Ezekiel Warren <zaucy@users.noreply.github.com>
22 lines
733 B
Rust
22 lines
733 B
Rust
use std::cell::RefCell;
|
|
use std::rc::Rc;
|
|
|
|
use copypasta::ClipboardProvider;
|
|
|
|
use crate::platform::PlatformWindow;
|
|
use crate::{AnyWindowHandle, CursorStyle, DisplayId, PlatformDisplay, WindowParams};
|
|
|
|
pub trait Client {
|
|
fn displays(&self) -> Vec<Rc<dyn PlatformDisplay>>;
|
|
fn primary_display(&self) -> Option<Rc<dyn PlatformDisplay>>;
|
|
fn display(&self, id: DisplayId) -> Option<Rc<dyn PlatformDisplay>>;
|
|
fn open_window(
|
|
&self,
|
|
handle: AnyWindowHandle,
|
|
options: WindowParams,
|
|
) -> Box<dyn PlatformWindow>;
|
|
fn set_cursor_style(&self, style: CursorStyle);
|
|
fn get_clipboard(&self) -> Rc<RefCell<dyn ClipboardProvider>>;
|
|
fn get_primary(&self) -> Rc<RefCell<dyn ClipboardProvider>>;
|
|
}
|