Get compiling
This commit is contained in:
parent
3e0d0e5c01
commit
486f5bc6ca
14 changed files with 97 additions and 107 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue