Skip to content

Commit 983cf43

Browse files
committed
feat: Add owned window handle
This adds "WindowHandle" and "DisplayHandle" types as discussed in #188. These act similar to `Waker`'s in stdlib, as they are a wrapper around a trait object. Signed-off-by: John Nunley <dev@notgull.net>
1 parent 49855ba commit 983cf43

3 files changed

Lines changed: 599 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
## Unreleased
44

5-
* **Breaking:** Rework web handles to remove `wasm-bindgen` from public API. (#184)
5+
- **Breaking:** Rework web handles to remove `wasm-bindgen` from public API. (#184)
66
- **Breaking:** Remove `WebWindowHandle` as it is no longer used. (#186)
77
- **Breaking:** Remove deprecated `HasRawWindowHandle` and `HasRawDisplayHandle` traits.
88
- **Breaking:** Remove `UiKitWindowHandle::ui_view_controller` field, retrieve this from the UIView's responder chain instead.
99
- **Breaking:** Rename `Web*` handles to `WasmBindgen*`, to make it clearer that these are specific to `wasm-bindgen`.
10-
* Improve documentation on AppKit and UIKit handles.
10+
- Add owned window and display handles.
11+
- Improve documentation on AppKit and UIKit handles.
1112

1213
## 0.6.2 (2024-05-17)
1314

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ mod drm;
4747
mod gbm;
4848
mod haiku;
4949
mod ohos;
50+
mod owned;
5051
mod redox;
5152
mod uikit;
5253
mod wayland;
@@ -61,6 +62,10 @@ pub use drm::{DrmDisplayHandle, DrmWindowHandle};
6162
pub use gbm::{GbmDisplayHandle, GbmWindowHandle};
6263
pub use haiku::{HaikuDisplayHandle, HaikuWindowHandle};
6364
pub use ohos::{OhosDisplayHandle, OhosNdkWindowHandle};
65+
pub use owned::{
66+
DisplayHandleVtable, OwnedDisplayHandle, OwnedWindowHandle, SyncDisplayHandle,
67+
SyncWindowHandle, WindowHandleVtable,
68+
};
6469
pub use redox::{OrbitalDisplayHandle, OrbitalWindowHandle};
6570
pub use uikit::{UiKitDisplayHandle, UiKitWindowHandle};
6671
pub use wayland::{WaylandDisplayHandle, WaylandWindowHandle};

0 commit comments

Comments
 (0)