Get compiling

This commit is contained in:
Nathan Sobo 2023-08-07 19:08:58 -06:00
parent 3e0d0e5c01
commit 486f5bc6ca
14 changed files with 97 additions and 107 deletions

View file

@ -23,6 +23,7 @@ use std::{
};
use anyhow::{anyhow, Context, Result};
use derive_more::Deref;
use parking_lot::Mutex;
use postage::oneshot;
@ -4127,6 +4128,12 @@ impl<T: View> ViewHandle<T> {
self.window_id
}
pub fn window<C: BorrowWindowContext>(&self, cx: &C) -> C::Result<AnyWindowHandle> {
cx.read_window(self.window_id, |cx| {
AnyWindowHandle::new(self.window_id, cx.window.root_view.type_id())
})
}
pub fn id(&self) -> usize {
self.view_id
}