Skip to content

Commit 2a1e272

Browse files
committed
Update to objc2 v0.6
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.
1 parent e458e1a commit 2a1e272

File tree

3 files changed

+152
-184
lines changed

3 files changed

+152
-184
lines changed

Cargo.lock

Lines changed: 49 additions & 119 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
[package]
22
name = "arboard"
33
version = "3.4.1"
4-
authors = ["Artur Kovacs <[email protected]>", "Avi Weinstock <[email protected]>", "Arboard contributors"]
4+
authors = [
5+
"Artur Kovacs <[email protected]>",
6+
"Avi Weinstock <[email protected]>",
7+
"Arboard contributors",
8+
]
59
description = "Image and text handling for the OS clipboard."
610
repository = "https://github.com/1Password/arboard"
711
license = "MIT OR Apache-2.0"
@@ -12,7 +16,12 @@ rust-version = "1.67.1"
1216

1317
[features]
1418
default = ["image-data"]
15-
image-data = ["core-graphics", "image", "windows-sys"]
19+
image-data = [
20+
"objc2-core-graphics",
21+
"objc2-core-foundation",
22+
"image",
23+
"windows-sys",
24+
]
1625
wayland-data-control = ["wl-clipboard-rs"]
1726

1827
[dependencies]
@@ -27,24 +36,50 @@ windows-sys = { version = "0.48.0", optional = true, features = [
2736
"Win32_System_DataExchange",
2837
"Win32_System_Memory",
2938
"Win32_System_Ole",
30-
]}
39+
] }
3140
clipboard-win = "5.3.1"
3241
log = "0.4"
33-
image = { version = "0.25", optional = true, default-features = false, features = ["png"] }
42+
image = { version = "0.25", optional = true, default-features = false, features = [
43+
"png",
44+
] }
3445

3546
[target.'cfg(target_os = "macos")'.dependencies]
36-
# Use `relax-void-encoding`, as that allows us to pass `c_void` instead of implementing `Encode` correctly for `&CGImageRef`
37-
objc2 = { version = "0.5.1", features = ["relax-void-encoding"] }
38-
objc2-foundation = { version = "0.2.0", features = ["NSArray", "NSString", "NSEnumerator", "NSGeometry"] }
39-
objc2-app-kit = { version = "0.2.0", features = ["NSPasteboard", "NSPasteboardItem", "NSImage"] }
40-
core-graphics = { version = "0.23", optional = true }
41-
image = { version = "0.25", optional = true, default-features = false, features = ["tiff"] }
47+
objc2 = "0.6.0"
48+
objc2-foundation = { version = "0.3.0", default-features = false, features = [
49+
"std",
50+
"NSArray",
51+
"NSString",
52+
"NSEnumerator",
53+
"NSGeometry",
54+
] }
55+
objc2-app-kit = { version = "0.3.0", default-features = false, features = [
56+
"std",
57+
"objc2-core-graphics",
58+
"NSPasteboard",
59+
"NSPasteboardItem",
60+
"NSImage",
61+
] }
62+
objc2-core-foundation = { version = "0.3.0", default-features = false, optional = true, features = [
63+
"std",
64+
"CFCGTypes",
65+
] }
66+
objc2-core-graphics = { version = "0.3.0", default-features = false, optional = true, features = [
67+
"std",
68+
"CGImage",
69+
"CGColorSpace",
70+
"CGDataProvider",
71+
] }
72+
image = { version = "0.25", optional = true, default-features = false, features = [
73+
"tiff",
74+
] }
4275

4376
[target.'cfg(all(unix, not(any(target_os="macos", target_os="android", target_os="emscripten"))))'.dependencies]
4477
log = "0.4"
4578
x11rb = { version = "0.13" }
4679
wl-clipboard-rs = { version = "0.8", optional = true }
47-
image = { version = "0.25", optional = true, default-features = false, features = ["png"] }
80+
image = { version = "0.25", optional = true, default-features = false, features = [
81+
"png",
82+
] }
4883
parking_lot = "0.12"
4984

5085
[[example]]

0 commit comments

Comments
 (0)