WIP: Start on sending view updates to followers

This commit is contained in:
Antonio Scandurra 2022-03-18 14:20:09 +01:00
parent f0b7bd6e17
commit 10e6d82c3e
5 changed files with 146 additions and 45 deletions

View file

@ -2121,6 +2121,10 @@ impl AppContext {
&self.platform
}
pub fn has_global<T: 'static>(&self) -> bool {
self.globals.contains_key(&TypeId::of::<T>())
}
pub fn global<T: 'static>(&self) -> &T {
self.globals
.get(&TypeId::of::<T>())
@ -3654,6 +3658,10 @@ impl AnyViewHandle {
view_type: self.view_type,
}
}
pub fn view_type(&self) -> TypeId {
self.view_type
}
}
impl Clone for AnyViewHandle {