Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HasRawWindowHandle for WindowHandle in druid #1828

Merged
merged 1 commit into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ You can find its changes [documented below](#070---2021-01-01).
- Linux extension: primary_clipboard ([#1843] by [@Maan2003])
- x11: Implement primary_clipboard ([#1867] by [@psychon])
- x11: Set WM_CLASS property ([#1868] by [@psychon])
- Expose `RawWindowHandle` for `WindowHandle` under the `raw-win-handle` feature ([#1828] by [@djeedai])

### Changed

Expand Down Expand Up @@ -751,6 +752,7 @@ Last release without a changelog :(
[#1805]: https://github.com/linebender/druid/pull/1805
[#1820]: https://github.com/linebender/druid/pull/1820
[#1825]: https://github.com/linebender/druid/pull/1825
[#1828]: https://github.com/linebender/druid/pull/1828
[#1843]: https://github.com/linebender/druid/pull/1843
[#1850]: https://github.com/linebender/druid/pull/1850
[#1851]: https://github.com/linebender/druid/pull/1851
Expand Down
4 changes: 4 additions & 0 deletions druid-shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ pub use image;
pub use kurbo;
pub use piet_common as piet;

// Reexport the version of `raw_window_handle` we are using.
#[cfg(feature = "raw-win-handle")]
pub use raw_window_handle;

#[macro_use]
mod util;

Expand Down
3 changes: 3 additions & 0 deletions druid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ x11 = ["druid-shell/x11"]
crochet = []
serde = ["im/serde", "druid-shell/serde"]

# Implement HasRawWindowHandle for WindowHandle
raw-win-handle = ["druid-shell/raw-win-handle"]

# passing on all the image features. AVIF is not supported because it does not
# support decoding, and that's all we use `Image` for.
png = ["druid-shell/image_png"]
Expand Down
3 changes: 3 additions & 0 deletions druid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ pub use shell::{
WindowHandle, WindowLevel, WindowState,
};

#[cfg(feature = "raw-win-handle")]
pub use crate::shell::raw_window_handle::{HasRawWindowHandle, RawWindowHandle};

pub use crate::core::WidgetPod;
pub use app::{AppLauncher, WindowConfig, WindowDesc, WindowSizePolicy};
pub use app_delegate::{AppDelegate, DelegateCtx};
Expand Down