Skip to content

Commit e521554

Browse files
committed
Add the ImageIO framework
1 parent a5dc9d6 commit e521554

File tree

12 files changed

+182
-17
lines changed

12 files changed

+182
-17
lines changed

.github/workflows/ci.yml

+13-13
Large diffs are not rendered by default.

Cargo.lock

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/header-translator/src/unexposed_attr.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ impl UnexposedAttr {
6767
| "CF_EXTENSIBLE_STRING_ENUM" => Some(Self::TypedExtensibleEnum),
6868
"NS_SWIFT_BRIDGED_TYPEDEF" | "CF_SWIFT_BRIDGED_TYPEDEF" => Some(Self::BridgedTypedef),
6969
"CF_IMPLICIT_BRIDGING_ENABLED" => Some(Self::BridgedImplicit),
70-
"CF_BRIDGED_TYPE" | "CV_BRIDGED_TYPE" | "CM_BRIDGED_TYPE" | "OPENGL_BRIDGED_TYPE" => {
71-
Some(Self::Bridged)
72-
}
70+
"CF_BRIDGED_TYPE"
71+
| "CV_BRIDGED_TYPE"
72+
| "CM_BRIDGED_TYPE"
73+
| "IIO_BRIDGED_TYPE"
74+
| "OPENGL_BRIDGED_TYPE" => Some(Self::Bridged),
7375
"CF_BRIDGED_MUTABLE_TYPE" => Some(Self::BridgedMutable),
7476
"CF_RELATED_TYPE" => Some(Self::BridgedRelated),
7577
"NS_RETURNS_RETAINED"
@@ -190,6 +192,8 @@ impl UnexposedAttr {
190192
| "IC_DEPRECATED"
191193
| "IC_DEPRECATED_WITH_REPLACEMENT"
192194
| "IC_UNAVAILABLE"
195+
| "IMAGEIO_AVAILABLE_STARTING"
196+
| "IMAGEIO_AVAILABLE_BUT_DEPRECATED"
193197
| "MLCOMPUTE_AVAILABLE_STARTING"
194198
| "MLCOMPUTE_AVAILABLE_STARTING_BUT_DEPRECATED_MACOS14"
195199
| "MLCOMPUTE_CLASS_AVAILABLE_STARTING"
@@ -293,6 +297,8 @@ impl UnexposedAttr {
293297
| "GK_BASE_AVAILABILITY"
294298
| "GK_BASE_AVAILABILITY_2"
295299
| "GK_BASE_AVAILABILITY_3"
300+
| "IMAGEIO_UNAVAILABLE_DESKTOP"
301+
| "IMAGEIO_UNAVAILABLE_EMBEDDED"
296302
| "INTERAPP_AUDIO_DEPRECATED"
297303
| "MD_AVAIL"
298304
| "MD_AVAIL_LEOPARD"

crates/objc2/src/topics/about_generated/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2222
- `CoreAudioKit` / `objc2-audio-kit`.
2323
- `CoreHaptics` / `objc2-core-haptics`.
2424
- `CoreMediaIO` / `objc2-core-media-io`.
25+
- `CoreServices` / `objc2-core-services` (CarbonCore sub-framework not yet supported).
2526
- `CoreSpotlight` / `objc2-core-spotlight`.
2627
- `CoreTelephony` / `objc2-core-telephony`.
2728
- `ExecutionPolicy` / `objc2-execution-policy`.
2829
- `GameplayKit` / `objc2-gameplay-kit`.
2930
- `ImageCaptureCore` / `objc2-image-capture-core`.
31+
- `ImageIO` / `objc2-image-io`.
3032
- `Intents` / `objc2-intents`.
3133
- `IntentsUI` / `objc2-intents-ui`.
3234
- `JavaScriptCore` / `objc2-java-script-core`.

crates/objc2/src/topics/about_generated/list_data.md

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
| `IOSurface` | [![`objc2-io-surface`](https://badgen.net/crates/v/objc2-io-surface)](https://crates.io/crates/objc2-io-surface) | [![docs.rs](https://docs.rs/objc2-io-surface/badge.svg)](https://docs.rs/objc2-io-surface/) |
7070
| `IdentityLookup` | [![`objc2-identity-lookup`](https://badgen.net/crates/v/objc2-identity-lookup)](https://crates.io/crates/objc2-identity-lookup) | [![docs.rs](https://docs.rs/objc2-identity-lookup/badge.svg)](https://docs.rs/objc2-identity-lookup/) |
7171
| `ImageCaptureCore` | [![`objc2-image-capture-core`](https://badgen.net/crates/v/objc2-image-capture-core)](https://crates.io/crates/objc2-image-capture-core) | [![docs.rs](https://docs.rs/objc2-image-capture-core/badge.svg)](https://docs.rs/objc2-image-capture-core/) |
72+
| `ImageIO` | [![`objc2-image-io`](https://badgen.net/crates/v/objc2-image-io)](https://crates.io/crates/objc2-image-io) | [![docs.rs](https://docs.rs/objc2-image-io/badge.svg)](https://docs.rs/objc2-image-io/) |
7273
| `InputMethodKit` | [![`objc2-input-method-kit`](https://badgen.net/crates/v/objc2-input-method-kit)](https://crates.io/crates/objc2-input-method-kit) | [![docs.rs](https://docs.rs/objc2-input-method-kit/badge.svg)](https://docs.rs/objc2-input-method-kit/) |
7374
| `Intents` | [![`objc2-intents`](https://badgen.net/crates/v/objc2-intents)](https://crates.io/crates/objc2-intents) | [![docs.rs](https://docs.rs/objc2-intents/badge.svg)](https://docs.rs/objc2-intents/) |
7475
| `IntentsUI` | [![`objc2-intents-ui`](https://badgen.net/crates/v/objc2-intents-ui)](https://crates.io/crates/objc2-intents-ui) | [![docs.rs](https://docs.rs/objc2-intents-ui/badge.svg)](https://docs.rs/objc2-intents-ui/) |

crates/test-frameworks/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ test-frameworks = [
8282
"objc2-io-surface",
8383
"objc2-identity-lookup",
8484
"objc2-image-capture-core",
85+
"objc2-image-io",
8586
"objc2-input-method-kit",
8687
"objc2-intents",
8788
"objc2-intents-ui",
@@ -285,6 +286,7 @@ objc2-preference-panes = ["dep:objc2-preference-panes"]
285286
objc2-safari-services = ["dep:objc2-safari-services"]
286287
objc2-accessory-setup-kit = ["dep:objc2-accessory-setup-kit"]
287288
objc2-core-services = ["dep:objc2-core-services"]
289+
objc2-image-io = ["dep:objc2-image-io"]
288290

289291
[dependencies]
290292
block2 = { path = "../block2" }
@@ -316,6 +318,7 @@ dispatch2 = { path = "../dispatch2", optional = true }
316318
objc2-extension-kit = { path = "../../framework-crates/objc2-extension-kit", optional = true }
317319
objc2-foundation = { path = "../../framework-crates/objc2-foundation", optional = true }
318320
objc2-game-kit = { path = "../../framework-crates/objc2-game-kit", optional = true }
321+
objc2-image-io = { path = "../../framework-crates/objc2-image-io", optional = true }
319322
objc2-intents = { path = "../../framework-crates/objc2-intents", optional = true }
320323
objc2-intents-ui = { path = "../../framework-crates/objc2-intents-ui", optional = true }
321324
objc2-map-kit = { path = "../../framework-crates/objc2-map-kit", optional = true }

framework-crates/objc2-image-io/Cargo.toml

+93
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework-crates/objc2-image-io/README.md

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework-crates/objc2-image-io/src/generated

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//! # Bindings to the `ImageIO` framework
2+
//!
3+
//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
4+
//!
5+
//! [apple-doc]: https://developer.apple.com/documentation/imageio/
6+
//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
7+
#![no_std]
8+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
9+
// Update in Cargo.toml as well.
10+
#![doc(html_root_url = "https://docs.rs/objc2-image-io/0.3.0")]
11+
12+
#[cfg(feature = "alloc")]
13+
extern crate alloc;
14+
15+
#[cfg(feature = "std")]
16+
extern crate std;
17+
18+
mod generated;
19+
#[allow(unused_imports, unreachable_pub)]
20+
pub use self::generated::*;
21+
22+
// MacTypes.h
23+
#[allow(dead_code)]
24+
pub(crate) type OSStatus = i32;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
framework = "ImageIO"
2+
crate = "objc2-image-io"
3+
required-crates = ["objc2-core-foundation"]
4+
custom-lib-rs = true
5+
macos = "10.8"
6+
maccatalyst = "13.0"
7+
ios = "4.0"
8+
tvos = "9.0"
9+
watchos = "2.0"
10+
visionos = "1.0"

0 commit comments

Comments
 (0)