Checkpoint

This commit is contained in:
Nathan Sobo 2023-10-05 00:08:45 -06:00
parent 77b9a7aa5a
commit 1c70ca2214
3 changed files with 22 additions and 2 deletions

View file

@ -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 {