mostly working now

This commit is contained in:
Kay Simmons 2023-01-25 11:30:03 -08:00
parent a581d0c5b8
commit 5eac797a93
20 changed files with 675 additions and 454 deletions

View file

@ -440,6 +440,10 @@ impl platform::Platform for MacPlatform {
self.dispatcher.clone()
}
fn fonts(&self) -> Arc<dyn platform::FontSystem> {
self.fonts.clone()
}
fn activate(&self, ignoring_other_apps: bool) {
unsafe {
let app = NSApplication::sharedApplication(nil);
@ -488,6 +492,10 @@ impl platform::Platform for MacPlatform {
}
}
fn screen_by_id(&self, id: uuid::Uuid) -> Option<Rc<dyn crate::Screen>> {
Screen::find_by_id(id).map(|screen| Rc::new(screen) as Rc<_>)
}
fn screens(&self) -> Vec<Rc<dyn platform::Screen>> {
Screen::all()
.into_iter()
@ -512,10 +520,6 @@ impl platform::Platform for MacPlatform {
Box::new(StatusItem::add(self.fonts()))
}
fn fonts(&self) -> Arc<dyn platform::FontSystem> {
self.fonts.clone()
}
fn write_to_clipboard(&self, item: ClipboardItem) {
unsafe {
self.pasteboard.clearContents();