Rename PlatformLifecycle to MainThreadPlatform
Don't love it, but at least it's accurate. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
14b519f78d
commit
7b98994d1f
@@ -8,8 +8,6 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
pub(crate) struct Lifecycle;
|
||||
|
||||
pub(crate) struct Platform {
|
||||
dispatcher: Arc<dyn super::Dispatcher>,
|
||||
fonts: Arc<dyn super::FontSystem>,
|
||||
@@ -17,6 +15,8 @@ pub(crate) struct Platform {
|
||||
last_prompt_for_new_path_args: RefCell<Option<(PathBuf, Box<dyn FnOnce(Option<PathBuf>)>)>>,
|
||||
}
|
||||
|
||||
pub(crate) struct MainThreadPlatform;
|
||||
|
||||
struct Dispatcher;
|
||||
|
||||
pub struct Window {
|
||||
@@ -29,7 +29,7 @@ pub struct Window {
|
||||
pub(crate) last_prompt: RefCell<Option<Box<dyn FnOnce(usize)>>>,
|
||||
}
|
||||
|
||||
impl super::Lifecycle for Lifecycle {
|
||||
impl super::MainThreadPlatform for MainThreadPlatform {
|
||||
fn on_menu_command(&self, _: Box<dyn FnMut(&str, Option<&dyn Any>)>) {}
|
||||
|
||||
fn on_become_active(&self, _: Box<dyn FnMut()>) {}
|
||||
@@ -179,8 +179,8 @@ impl super::Window for Window {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn lifecycle() -> Lifecycle {
|
||||
Lifecycle
|
||||
pub(crate) fn main_thread_platform() -> MainThreadPlatform {
|
||||
MainThreadPlatform
|
||||
}
|
||||
|
||||
pub(crate) fn platform() -> Platform {
|
||||
|
||||
Reference in New Issue
Block a user