Skip to content

Commit

Permalink
Add the CompositorServices framework
Browse files Browse the repository at this point in the history
Part of #668.
  • Loading branch information
madsmtm committed Jan 13, 2025
1 parent e233645 commit f07d1a7
Show file tree
Hide file tree
Showing 13 changed files with 162 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ env:
FRAMEWORKS_IOS_17: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-tracking-transparency --package=objc2-ar-kit --package=objc2-audio-toolbox --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-av-foundation --package=objc2-av-kit --package=objc2-av-routing --package=objc2-avf-audio --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-color-sync --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-audio --package=objc2-core-audio-types --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-foundation --package=objc2-core-graphics --package=objc2-core-image --package=objc2-core-location --package=objc2-core-media --package=objc2-core-midi --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-text --package=objc2-core-video --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-event-kit-ui --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-home-kit --package=objc2-identity-lookup --package=objc2-io-surface --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-message-ui --package=objc2-messages --package=objc2-metal --package=objc2-metal-kit --package=objc2-metal-performance-shaders --package=objc2-metal-performance-shaders-graph --package=objc2-metric-kit --package=objc2-model-io --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-scene-kit --package=objc2-security --package=objc2-sensitive-content-analysis --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-sprite-kit --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-configuration --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-video-toolbox --package=objc2-vision --package=objc2-watch-connectivity --package=objc2-web-kit
FRAMEWORKS_TVOS_17: --package=objc2-accessibility --package=objc2-ad-support --package=objc2-app-tracking-transparency --package=objc2-audio-toolbox --package=objc2-authentication-services --package=objc2-av-foundation --package=objc2-av-kit --package=objc2-avf-audio --package=objc2-background-tasks --package=objc2-cloud-kit --package=objc2-color-sync --package=objc2-core-audio --package=objc2-core-audio-types --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-foundation --package=objc2-core-graphics --package=objc2-core-image --package=objc2-core-location --package=objc2-core-media --package=objc2-core-midi --package=objc2-core-ml --package=objc2-core-text --package=objc2-core-video --package=objc2-data-detection --package=objc2-device-check --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-home-kit --package=objc2-io-surface --package=objc2-link-presentation --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-metal-performance-shaders --package=objc2-metal-performance-shaders-graph --package=objc2-ml-compute --package=objc2-model-io --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-scene-kit --package=objc2-security --package=objc2-sound-analysis --package=objc2-sprite-kit --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-configuration --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-video-toolbox --package=objc2-vision
FRAMEWORKS_MAC_CATALYST_17: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-ar-kit --package=objc2-audio-toolbox --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-foundation --package=objc2-av-kit --package=objc2-av-routing --package=objc2-avf-audio --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-color-sync --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-audio --package=objc2-core-audio-types --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-foundation --package=objc2-core-graphics --package=objc2-core-image --package=objc2-core-location --package=objc2-core-media --package=objc2-core-midi --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-text --package=objc2-core-video --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-disk-arbitration --package=objc2-event-kit --package=objc2-event-kit-ui --package=objc2-exception-handling --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-home-kit --package=objc2-identity-lookup --package=objc2-io-surface --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-message-ui --package=objc2-messages --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metal-performance-shaders --package=objc2-metal-performance-shaders-graph --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-model-io --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-open-directory --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-scene-kit --package=objc2-security --package=objc2-sensitive-content-analysis --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-sprite-kit --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-configuration --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-video-toolbox --package=objc2-vision --package=objc2-watch-connectivity --package=objc2-web-kit
FRAMEWORKS_VISIONOS_1: --package=objc2-accessibility --package=objc2-ad-services --package=objc2-app-tracking-transparency --package=objc2-ar-kit --package=objc2-audio-toolbox --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-av-foundation --package=objc2-av-kit --package=objc2-av-routing --package=objc2-avf-audio --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-color-sync --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-audio --package=objc2-core-audio-types --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-foundation --package=objc2-core-graphics --package=objc2-core-image --package=objc2-core-location --package=objc2-core-media --package=objc2-core-midi --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-text --package=objc2-core-video --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-event-kit-ui --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-home-kit --package=objc2-identity-lookup --package=objc2-io-surface --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-message-ui --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metal-performance-shaders --package=objc2-metal-performance-shaders-graph --package=objc2-metric-kit --package=objc2-model-io --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-scene-kit --package=objc2-security --package=objc2-sound-analysis --package=objc2-speech --package=objc2-sprite-kit --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-configuration --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-video-toolbox --package=objc2-vision --package=objc2-watch-connectivity --package=objc2-web-kit
FRAMEWORKS_VISIONOS_1: --package=objc2-accessibility --package=objc2-ad-services --package=objc2-app-tracking-transparency --package=objc2-ar-kit --package=objc2-audio-toolbox --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-av-foundation --package=objc2-av-kit --package=objc2-av-routing --package=objc2-avf-audio --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-color-sync --package=objc2-compositor-services --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-audio --package=objc2-core-audio-types --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-foundation --package=objc2-core-graphics --package=objc2-core-image --package=objc2-core-location --package=objc2-core-media --package=objc2-core-midi --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-text --package=objc2-core-video --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-event-kit-ui --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-home-kit --package=objc2-identity-lookup --package=objc2-io-surface --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-message-ui --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metal-performance-shaders --package=objc2-metal-performance-shaders-graph --package=objc2-metric-kit --package=objc2-model-io --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-scene-kit --package=objc2-security --package=objc2-sound-analysis --package=objc2-speech --package=objc2-sprite-kit --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-configuration --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-video-toolbox --package=objc2-vision --package=objc2-watch-connectivity --package=objc2-web-kit
FRAMEWORKS_WATCHOS_10: --package=objc2-accessibility --package=objc2-authentication-services --package=objc2-av-foundation --package=objc2-av-kit --package=objc2-avf-audio --package=objc2-call-kit --package=objc2-cloud-kit --package=objc2-color-sync --package=objc2-contacts --package=objc2-core-audio --package=objc2-core-audio-types --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-foundation --package=objc2-core-graphics --package=objc2-core-location --package=objc2-core-media --package=objc2-core-midi --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-text --package=objc2-core-video --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-extension-kit --package=objc2-foundation --package=objc2-game-kit --package=objc2-health-kit --package=objc2-home-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-photos-ui --package=objc2-scene-kit --package=objc2-security --package=objc2-sound-analysis --package=objc2-sprite-kit --package=objc2-store-kit --package=objc2-symbols --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-watch-connectivity
FRAMEWORKS_GNUSTEP: --package=objc2-app-kit --package=objc2-foundation
# END AUTOMATICALLY GENERATED
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions crates/header-translator/src/rust_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ pub enum Primitive {
Float,
Double,
/// Not yet supported by `rustc`
/// https://github.com/rust-lang/rust/issues/116909
/// <https://github.com/rust-lang/rust/issues/116909>
F16,
F32,
F64,
/// Not yet supported by `rustc`
/// https://github.com/rust-lang/rust/issues/116909
/// <https://github.com/rust-lang/rust/issues/116909>
F128,
I8,
U8,
Expand Down
8 changes: 7 additions & 1 deletion crates/header-translator/src/unexposed_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl UnexposedAttr {
let _ = get_arguments();
Some(Self::ClosedEnum)
}
"NS_ERROR_ENUM" => {
"NS_ERROR_ENUM" | "CF_ERROR_ENUM" => {
let _ = get_arguments();
// TODO: Add error domain here
Some(Self::ErrorEnum)
Expand Down Expand Up @@ -306,6 +306,7 @@ impl UnexposedAttr {
"CF_REFINED_FOR_SWIFT"
| "DISPATCH_REFINED_FOR_SWIFT"
| "NS_REFINED_FOR_SWIFT"
| "AR_REFINED_FOR_SWIFT"
| "NS_SWIFT_DISABLE_ASYNC" => None,
// Possibly interesting?
"DISPATCH_COLD" => None,
Expand All @@ -321,6 +322,11 @@ impl UnexposedAttr {
"objc_non_runtime_protocol" => None,
// Emits unavailability attributes on `new` and `init` methods
"AV_INIT_UNAVAILABLE" => None,
// Helper used to easy declare @interface in CompositorServices.
"CP_OBJECT_DECL" => {
let _ = get_arguments();
None
}
// Irrelevant, we don't emit dispatch_object_t anyhow.
"DISPATCH_TRANSPARENT_UNION" => None,
_ => return Err(()),
Expand Down
1 change: 1 addition & 0 deletions crates/objc2/src/topics/about_generated/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `AVFAudio` / `objc2-avf-audio`.
- `AVFoundation` / `objc2-av-foundation`.
- `AVRouting` / `objc2-av-routing`.
- `CompositorServices` / `objc2-compositor-services`.
- `CoreAudioTypes` / `objc2-core-audio-types`.
- `CoreAudio` / `objc2-core-audio`.
- `ColorSync` / `objc2-color-sync`.
Expand Down
1 change: 1 addition & 0 deletions crates/objc2/src/topics/about_generated/list_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| `ClassKit` | [![`objc2-class-kit`](https://badgen.net/crates/v/objc2-class-kit)](https://crates.io/crates/objc2-class-kit) | [![docs.rs](https://docs.rs/objc2-class-kit/badge.svg)](https://docs.rs/objc2-class-kit/) |
| `CloudKit` | [![`objc2-cloud-kit`](https://badgen.net/crates/v/objc2-cloud-kit)](https://crates.io/crates/objc2-cloud-kit) | [![docs.rs](https://docs.rs/objc2-cloud-kit/badge.svg)](https://docs.rs/objc2-cloud-kit/) |
| `ColorSync` | [![`objc2-color-sync`](https://badgen.net/crates/v/objc2-color-sync)](https://crates.io/crates/objc2-color-sync) | [![docs.rs](https://docs.rs/objc2-color-sync/badge.svg)](https://docs.rs/objc2-color-sync/) |
| `CompositorServices` | [![`objc2-compositor-services`](https://badgen.net/crates/v/objc2-compositor-services)](https://crates.io/crates/objc2-compositor-services) | [![docs.rs](https://docs.rs/objc2-compositor-services/badge.svg)](https://docs.rs/objc2-compositor-services/) |
| `Contacts` | [![`objc2-contacts`](https://badgen.net/crates/v/objc2-contacts)](https://crates.io/crates/objc2-contacts) | [![docs.rs](https://docs.rs/objc2-contacts/badge.svg)](https://docs.rs/objc2-contacts/) |
| `ContactsUI` | [![`objc2-contacts-ui`](https://badgen.net/crates/v/objc2-contacts-ui)](https://crates.io/crates/objc2-contacts-ui) | [![docs.rs](https://docs.rs/objc2-contacts-ui/badge.svg)](https://docs.rs/objc2-contacts-ui/) |
| `CoreAudio` | [![`objc2-core-audio`](https://badgen.net/crates/v/objc2-core-audio)](https://crates.io/crates/objc2-core-audio) | [![docs.rs](https://docs.rs/objc2-core-audio/badge.svg)](https://docs.rs/objc2-core-audio/) |
Expand Down
5 changes: 5 additions & 0 deletions crates/test-frameworks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ test-frameworks = [
"objc2-cloud-kit/all",
"dep:objc2-color-sync",
"objc2-color-sync/all",
"dep:objc2-compositor-services",
"objc2-compositor-services/all",
"dep:objc2-contacts",
"objc2-contacts/all",
"dep:objc2-contacts-ui",
Expand Down Expand Up @@ -348,6 +350,9 @@ objc2-event-kit = { path = "../../framework-crates/objc2-event-kit", optional =
objc2-health-kit = { path = "../../framework-crates/objc2-health-kit", optional = true }
objc2-local-authentication = { path = "../../framework-crates/objc2-local-authentication", optional = true }

[target.'cfg(target_os = "visionos")'.dependencies]
objc2-compositor-services = { path = "../../framework-crates/objc2-compositor-services", optional = true }

[target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))'.dependencies]
objc2-home-kit = { path = "../../framework-crates/objc2-home-kit", optional = true }
objc2-ui-kit = { path = "../../framework-crates/objc2-ui-kit", optional = true }
Expand Down
Loading

0 comments on commit f07d1a7

Please sign in to comment.