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

Redo layer creation to create a sub layer if needed #19

Merged
merged 12 commits into from
Sep 9, 2024
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
- Make `Layer`'s implementation details private; it is now a struct with `as_ptr` and `is_existing` accessor methods.
- Add support for tvOS, watchOS and visionOS.
- Use `objc2` internally.
- Move `Layer` constructors to the type itself.
- `appkit::metal_layer_from_ns_view` is now `Layer::from_ns_view`.
- `uikit::metal_layer_from_ui_view` is now `Layer::from_ui_view`.
- Added `Layer::from_layer` to construct a `Layer` from a `CALayer` directly.
- Fixed layers not automatically resizing to match the super layer they were created from.

# 0.4.0 (2023-10-31)
- Update `raw-window-handle` dep to `0.6.0`.
Expand Down
33 changes: 13 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "raw-window-metal"
version = "0.4.0"
license = "MIT OR Apache-2.0"
authors = ["The Gfx-rs Developers"]
edition = "2021"
description = "Interop library between Metal and raw-window-handle"
documentation = "https://docs.rs/raw-window-metal"
Expand All @@ -12,37 +11,31 @@ keywords = ["window", "metal", "graphics"]
categories = ["game-engines", "graphics"]
exclude = [".github/*"]

[dependencies]
raw-window-handle = "0.6.0"

[target.'cfg(target_vendor = "apple")'.dependencies]
objc2 = "0.5.2"
objc2-foundation = { version = "0.2.2", features = [
"NSObjCRuntime",
"NSDictionary",
"NSGeometry",
"NSKeyValueObserving",
"NSObjCRuntime",
"NSString",
"NSThread",
"NSValue",
] }
objc2-quartz-core = { version = "0.2.2", features = [
"CALayer",
"CAMetalLayer",
"objc2-metal",
] }

[target.'cfg(target_os = "macos")'.dependencies]
objc2-app-kit = { version = "0.2.2", features = [
"NSResponder",
"NSView",
"NSWindow",
"objc2-quartz-core",
] }
[dev-dependencies]
raw-window-handle = "0.6.0"

[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies]
objc2-ui-kit = { version = "0.2.2", features = [
"UIResponder",
"UIView",
"UIWindow",
"UIScreen",
"objc2-quartz-core",
] }
[target.'cfg(target_os = "macos")'.dev-dependencies]
objc2-app-kit = { version = "0.2.2", features = ["NSResponder", "NSView"] }

[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dev-dependencies]
objc2-ui-kit = { version = "0.2.2", features = ["UIResponder", "UIView"] }

[package.metadata.docs.rs]
targets = [
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ raw-window-metal = "0.4"
`CAMetalLayer` is the common entrypoint for graphics APIs (e.g `gfx` or `MoltenVK`), but the handles provided by window libraries may not include such a layer.
This library may extract either this layer or allocate a new one.

Code is mostly extracted from the `gfx-backend-metal` crate.

## License

Licensed under either of
Expand Down
70 changes: 0 additions & 70 deletions src/appkit.rs

This file was deleted.

Loading
Loading