Skip to content

Commit

Permalink
Update to objc2 v0.6
Browse files Browse the repository at this point in the history
This includes using the new crate `objc2-core-graphics`, which notably
does not have the `CustomData` helper that `core-graphics`. This is
probably for the better, as it allows us to avoid a double-boxing of the
data.
  • Loading branch information
madsmtm committed Jan 26, 2025
1 parent e458e1a commit 2a1e272
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 184 deletions.
168 changes: 49 additions & 119 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 46 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[package]
name = "arboard"
version = "3.4.1"
authors = ["Artur Kovacs <[email protected]>", "Avi Weinstock <[email protected]>", "Arboard contributors"]
authors = [
"Artur Kovacs <[email protected]>",
"Avi Weinstock <[email protected]>",
"Arboard contributors",
]
description = "Image and text handling for the OS clipboard."
repository = "https://github.com/1Password/arboard"
license = "MIT OR Apache-2.0"
Expand All @@ -12,7 +16,12 @@ rust-version = "1.67.1"

[features]
default = ["image-data"]
image-data = ["core-graphics", "image", "windows-sys"]
image-data = [
"objc2-core-graphics",
"objc2-core-foundation",
"image",
"windows-sys",
]
wayland-data-control = ["wl-clipboard-rs"]

[dependencies]
Expand All @@ -27,24 +36,50 @@ windows-sys = { version = "0.48.0", optional = true, features = [
"Win32_System_DataExchange",
"Win32_System_Memory",
"Win32_System_Ole",
]}
] }
clipboard-win = "5.3.1"
log = "0.4"
image = { version = "0.25", optional = true, default-features = false, features = ["png"] }
image = { version = "0.25", optional = true, default-features = false, features = [
"png",
] }

[target.'cfg(target_os = "macos")'.dependencies]
# Use `relax-void-encoding`, as that allows us to pass `c_void` instead of implementing `Encode` correctly for `&CGImageRef`
objc2 = { version = "0.5.1", features = ["relax-void-encoding"] }
objc2-foundation = { version = "0.2.0", features = ["NSArray", "NSString", "NSEnumerator", "NSGeometry"] }
objc2-app-kit = { version = "0.2.0", features = ["NSPasteboard", "NSPasteboardItem", "NSImage"] }
core-graphics = { version = "0.23", optional = true }
image = { version = "0.25", optional = true, default-features = false, features = ["tiff"] }
objc2 = "0.6.0"
objc2-foundation = { version = "0.3.0", default-features = false, features = [
"std",
"NSArray",
"NSString",
"NSEnumerator",
"NSGeometry",
] }
objc2-app-kit = { version = "0.3.0", default-features = false, features = [
"std",
"objc2-core-graphics",
"NSPasteboard",
"NSPasteboardItem",
"NSImage",
] }
objc2-core-foundation = { version = "0.3.0", default-features = false, optional = true, features = [
"std",
"CFCGTypes",
] }
objc2-core-graphics = { version = "0.3.0", default-features = false, optional = true, features = [
"std",
"CGImage",
"CGColorSpace",
"CGDataProvider",
] }
image = { version = "0.25", optional = true, default-features = false, features = [
"tiff",
] }

[target.'cfg(all(unix, not(any(target_os="macos", target_os="android", target_os="emscripten"))))'.dependencies]
log = "0.4"
x11rb = { version = "0.13" }
wl-clipboard-rs = { version = "0.8", optional = true }
image = { version = "0.25", optional = true, default-features = false, features = ["png"] }
image = { version = "0.25", optional = true, default-features = false, features = [
"png",
] }
parking_lot = "0.12"

[[example]]
Expand Down
Loading

0 comments on commit 2a1e272

Please sign in to comment.