Checkpoint
This commit is contained in:
parent
77b9a7aa5a
commit
1c70ca2214
3 changed files with 22 additions and 2 deletions
|
@ -60,9 +60,13 @@ pub struct AsyncWindowContext {
|
|||
}
|
||||
|
||||
impl AsyncWindowContext {
|
||||
pub fn new(app: AsyncAppContext, window: AnyWindowHandle) -> Self {
|
||||
pub(crate) fn new(app: AsyncAppContext, window: AnyWindowHandle) -> Self {
|
||||
Self { app, window }
|
||||
}
|
||||
|
||||
pub fn update<R>(&self, update: impl FnOnce(&mut WindowContext) -> R) -> Result<R> {
|
||||
self.app.update_window(self.window, update)
|
||||
}
|
||||
}
|
||||
|
||||
impl Context for AsyncWindowContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue