Implement most core actions

This commit is contained in:
Mikayla
2023-11-14 00:06:33 -08:00
parent ec16e70336
commit ee4957dd47
12 changed files with 570 additions and 315 deletions
+12
View File
@@ -431,6 +431,18 @@ impl AppContext {
self.platform.activate(ignoring_other_apps);
}
pub fn hide(&self) {
self.platform.hide();
}
pub fn hide_other_apps(&self) {
self.platform.hide_other_apps();
}
pub fn unhide_other_apps(&self) {
self.platform.unhide_other_apps();
}
/// Returns the list of currently active displays.
pub fn displays(&self) -> Vec<Rc<dyn PlatformDisplay>> {
self.platform.displays()
+8
View File
@@ -1365,6 +1365,14 @@ impl<'a> WindowContext<'a> {
self.window.platform_window.activate();
}
pub fn minimize_window(&self) {
self.window.platform_window.minimize();
}
pub fn toggle_full_screen(&self) {
self.window.platform_window.toggle_full_screen();
}
pub fn prompt(
&self,
level: PromptLevel,