diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b86569e11..a4e71abe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ env: 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-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_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 --package=objc2-watch-kit FRAMEWORKS_GNUSTEP: --package=objc2-app-kit --package=objc2-foundation # END AUTOMATICALLY GENERATED diff --git a/Cargo.lock b/Cargo.lock index 6d4f748fe..109ea64e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1614,6 +1614,25 @@ dependencies = [ "objc2-foundation", ] +[[package]] +name = "objc2-watch-kit" +version = "0.2.2" +dependencies = [ + "bitflags", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-foundation", + "objc2-core-location", + "objc2-foundation", + "objc2-health-kit", + "objc2-home-kit", + "objc2-map-kit", + "objc2-scene-kit", + "objc2-ui-kit", + "objc2-user-notifications", +] + [[package]] name = "objc2-web-kit" version = "0.2.2" @@ -1945,6 +1964,7 @@ dependencies = [ "objc2-virtualization", "objc2-vision", "objc2-watch-connectivity", + "objc2-watch-kit", "objc2-web-kit", ] diff --git a/crates/header-translator/src/unexposed_attr.rs b/crates/header-translator/src/unexposed_attr.rs index dcc96734a..5f70d4986 100644 --- a/crates/header-translator/src/unexposed_attr.rs +++ b/crates/header-translator/src/unexposed_attr.rs @@ -233,7 +233,10 @@ impl UnexposedAttr { | "WEBKIT_AVAILABLE_MAC" | "WEBKIT_CLASS_DEPRECATED_MAC" | "WEBKIT_DEPRECATED_MAC" - | "WEBKIT_ENUM_DEPRECATED_MAC" => { + | "WEBKIT_ENUM_DEPRECATED_MAC" + | "WK_AVAILABLE_WATCHOS_ONLY" + | "WK_DEPRECATED_WATCHOS" + | "WK_DEPRECATED_WITH_REPLACEMENT" => { let _ = get_arguments(); None } diff --git a/crates/objc2/src/topics/about_generated/CHANGELOG.md b/crates/objc2/src/topics/about_generated/CHANGELOG.md index 3b371113b..4f86d788f 100644 --- a/crates/objc2/src/topics/about_generated/CHANGELOG.md +++ b/crates/objc2/src/topics/about_generated/CHANGELOG.md @@ -52,6 +52,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `SystemConfiguration` / `objc2-system-configuration`. - `VideoToolbox` / `objc2-video-toolbox`. - `WatchConnectivity` / `objc2-watch-connectivity`. + - `WatchKit` / `objc2-watch-kit`. * Added `#[must_use]` attributes where the C headers have them. * Added automatic conversion of `Bool` in external function argument and return types (similar to what's done on methods). diff --git a/crates/objc2/src/topics/about_generated/list_data.md b/crates/objc2/src/topics/about_generated/list_data.md index 17eea02bb..62b8af752 100644 --- a/crates/objc2/src/topics/about_generated/list_data.md +++ b/crates/objc2/src/topics/about_generated/list_data.md @@ -105,4 +105,5 @@ | `Virtualization` | [![`objc2-virtualization`](https://badgen.net/crates/v/objc2-virtualization)](https://crates.io/crates/objc2-virtualization) | [![docs.rs](https://docs.rs/objc2-virtualization/badge.svg)](https://docs.rs/objc2-virtualization/) | | `Vision` | [![`objc2-vision`](https://badgen.net/crates/v/objc2-vision)](https://crates.io/crates/objc2-vision) | [![docs.rs](https://docs.rs/objc2-vision/badge.svg)](https://docs.rs/objc2-vision/) | | `WatchConnectivity` | [![`objc2-watch-connectivity`](https://badgen.net/crates/v/objc2-watch-connectivity)](https://crates.io/crates/objc2-watch-connectivity) | [![docs.rs](https://docs.rs/objc2-watch-connectivity/badge.svg)](https://docs.rs/objc2-watch-connectivity/) | +| `WatchKit` | [![`objc2-watch-kit`](https://badgen.net/crates/v/objc2-watch-kit)](https://crates.io/crates/objc2-watch-kit) | [![docs.rs](https://docs.rs/objc2-watch-kit/badge.svg)](https://docs.rs/objc2-watch-kit/) | | `WebKit` | [![`objc2-web-kit`](https://badgen.net/crates/v/objc2-web-kit)](https://crates.io/crates/objc2-web-kit) | [![docs.rs](https://docs.rs/objc2-web-kit/badge.svg)](https://docs.rs/objc2-web-kit/) | diff --git a/crates/test-frameworks/Cargo.toml b/crates/test-frameworks/Cargo.toml index 8561f7861..47e6c3f31 100644 --- a/crates/test-frameworks/Cargo.toml +++ b/crates/test-frameworks/Cargo.toml @@ -224,6 +224,8 @@ test-frameworks = [ "objc2-vision/all", "dep:objc2-watch-connectivity", "objc2-watch-connectivity/all", + "dep:objc2-watch-kit", + "objc2-watch-kit/all", "dep:objc2-web-kit", "objc2-web-kit/all", ] @@ -365,3 +367,6 @@ objc2-nearby-interaction = { path = "../../framework-crates/objc2-nearby-interac [target.'cfg(any(target_os = "ios", target_os = "watchos", target_os = "visionos"))'.dependencies] objc2-watch-connectivity = { path = "../../framework-crates/objc2-watch-connectivity", optional = true } + +[target.'cfg(target_os = "watchos")'.dependencies] +objc2-watch-kit = { path = "../../framework-crates/objc2-watch-kit", optional = true } diff --git a/framework-crates/objc2-compositor-services/Cargo.toml b/framework-crates/objc2-compositor-services/Cargo.toml index cc4f8dfb5..61b241042 100644 --- a/framework-crates/objc2-compositor-services/Cargo.toml +++ b/framework-crates/objc2-compositor-services/Cargo.toml @@ -17,8 +17,8 @@ workspace = true [dependencies] bitflags = { version = "2.5.0", default-features = false, optional = true } -objc2 = { path = "../../crates/objc2", version = "0.5.2", default-features = false, optional = true, features = ["std"] } -objc2-core-foundation = { path = "../objc2-core-foundation", version = "0.2.2", default-features = false, optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.2", default-features = false, features = ["std"] } +objc2-core-foundation = { path = "../objc2-core-foundation", version = "0.2.2", default-features = false, optional = true, features = ["objc2"] } objc2-metal = { path = "../objc2-metal", version = "0.2.2", default-features = false, optional = true } [package.metadata.docs.rs] @@ -35,7 +35,6 @@ default = ["std"] std = ["alloc", "bitflags?/std"] alloc = [] bitflags = ["dep:bitflags", "objc2-core-foundation?/bitflags", "objc2-metal?/bitflags"] -objc2 = ["dep:objc2", "objc2-core-foundation?/objc2"] objc2-core-foundation = ["dep:objc2-core-foundation", "objc2-metal?/objc2-core-foundation"] objc2-metal = ["dep:objc2-metal"] @@ -52,7 +51,6 @@ all = [ "layer_renderer_configuration", "layer_renderer_layout", "layer_renderer_properties", - "objc2", "objc2-core-foundation", "objc2-metal", "view", diff --git a/framework-crates/objc2-watch-kit/Cargo.toml b/framework-crates/objc2-watch-kit/Cargo.toml new file mode 100644 index 000000000..5c963ddb3 --- /dev/null +++ b/framework-crates/objc2-watch-kit/Cargo.toml @@ -0,0 +1,281 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-watch-kit" +version.workspace = true +description = "Bindings to the WatchKit framework" +edition.workspace = true +rust-version.workspace = true +keywords = ["cocoa", "apple", "framework"] +categories.workspace = true +repository.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.1", default-features = false, optional = true, features = ["alloc"] } +objc2 = { path = "../../crates/objc2", version = "0.5.2", default-features = false, features = ["std"] } +objc2-cloud-kit = { path = "../objc2-cloud-kit", version = "0.2.2", default-features = false, optional = true } +objc2-core-foundation = { path = "../objc2-core-foundation", version = "0.2.2", default-features = false, optional = true, features = ["objc2"] } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.2", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.2", default-features = false, features = ["alloc"] } +objc2-health-kit = { path = "../objc2-health-kit", version = "0.2.2", default-features = false, optional = true } +objc2-home-kit = { path = "../objc2-home-kit", version = "0.2.2", default-features = false, optional = true } +objc2-map-kit = { path = "../objc2-map-kit", version = "0.2.2", default-features = false, optional = true } +objc2-scene-kit = { path = "../objc2-scene-kit", version = "0.2.2", default-features = false, optional = true } +objc2-ui-kit = { path = "../objc2-ui-kit", version = "0.2.2", default-features = false, optional = true } +objc2-user-notifications = { path = "../objc2-user-notifications", version = "0.2.2", default-features = false, optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-watchos" +features = ["all"] +rustc-args = ["--cfg", "docsrs"] # Fix cross-crate link to objc2::topics +targets = [ + "aarch64-apple-watchos", +] + +[features] +default = ["std"] +std = ["alloc", "bitflags?/std"] +alloc = [] +bitflags = ["dep:bitflags", "objc2-cloud-kit?/bitflags", "objc2-core-foundation?/bitflags", "objc2-foundation/bitflags", "objc2-health-kit?/bitflags", "objc2-home-kit?/bitflags", "objc2-map-kit?/bitflags", "objc2-scene-kit?/bitflags", "objc2-ui-kit?/bitflags", "objc2-user-notifications?/bitflags"] +block2 = ["dep:block2", "objc2-cloud-kit?/block2", "objc2-core-foundation?/block2", "objc2-core-location?/block2", "objc2-foundation/block2", "objc2-health-kit?/block2", "objc2-home-kit?/block2", "objc2-map-kit?/block2", "objc2-scene-kit?/block2", "objc2-ui-kit?/block2", "objc2-user-notifications?/block2"] +objc2-cloud-kit = ["dep:objc2-cloud-kit", "objc2-ui-kit?/objc2-cloud-kit"] +objc2-core-foundation = ["dep:objc2-core-foundation", "objc2-foundation/objc2-core-foundation", "objc2-home-kit?/objc2-core-foundation", "objc2-map-kit?/objc2-core-foundation", "objc2-scene-kit?/objc2-core-foundation", "objc2-ui-kit?/objc2-core-foundation"] +objc2-core-location = ["dep:objc2-core-location", "objc2-cloud-kit?/objc2-core-location", "objc2-health-kit?/objc2-core-location", "objc2-home-kit?/objc2-core-location", "objc2-map-kit?/objc2-core-location", "objc2-ui-kit?/objc2-core-location", "objc2-user-notifications?/objc2-core-location"] +objc2-health-kit = ["dep:objc2-health-kit"] +objc2-home-kit = ["dep:objc2-home-kit"] +objc2-map-kit = ["dep:objc2-map-kit"] +objc2-scene-kit = ["dep:objc2-scene-kit"] +objc2-ui-kit = ["dep:objc2-ui-kit", "objc2-home-kit?/objc2-ui-kit"] +objc2-user-notifications = ["dep:objc2-user-notifications", "objc2-ui-kit?/objc2-user-notifications"] + +WKAccessibility = ["objc2-foundation/NSString"] +WKAlertAction = ["objc2-foundation/NSString"] +WKApplication = [ + "objc2-cloud-kit?/CKShareMetadata", + "objc2-foundation/NSData", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSError", + "objc2-foundation/NSSet", + "objc2-foundation/NSURL", + "objc2-foundation/NSUserActivity", + "objc2-health-kit?/HKWorkoutConfiguration", + "objc2-ui-kit?/UIColor", +] +WKApplicationMain = ["objc2-foundation/NSString"] +WKAudioFileAsset = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", +] +WKAudioFilePlayer = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDate", + "objc2-foundation/NSError", +] +WKAudioFilePlayerItem = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] +WKBackgroundTask = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +WKCrownSequencer = [] +WKDefines = [] +WKError = ["objc2-foundation/NSString"] +WKExtendedRuntimeSession = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] +WKExtension = [ + "objc2-cloud-kit?/CKShareMetadata", + "objc2-foundation/NSData", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSError", + "objc2-foundation/NSNotification", + "objc2-foundation/NSSet", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", + "objc2-foundation/NSUserActivity", + "objc2-health-kit?/HKWorkoutConfiguration", + "objc2-ui-kit?/UIColor", + "objc2-ui-kit?/UILocalNotification", +] +WKGestureRecognizer = [ + "bitflags", + "objc2-core-foundation?/CFCGTypes", + "objc2-core-foundation?/CFDate", +] +WKImage = [ + "objc2-foundation/NSData", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIImage", +] +WKInterfaceActivityRing = ["objc2-health-kit?/HKActivitySummary"] +WKInterfaceAuthorizationAppleIDButton = [] +WKInterfaceButton = [ + "objc2-foundation/NSAttributedString", + "objc2-foundation/NSData", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIColor", + "objc2-ui-kit?/UIImage", +] +WKInterfaceController = [ + "objc2-core-foundation?/CFCGTypes", + "objc2-foundation/NSArray", + "objc2-foundation/NSDate", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSError", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", + "objc2-foundation/NSUserActivity", + "objc2-ui-kit?/UIGeometry", + "objc2-ui-kit?/UIImage", + "objc2-user-notifications?/UNNotification", + "objc2-user-notifications?/UNNotificationAction", +] +WKInterfaceDate = [ + "objc2-foundation/NSCalendar", + "objc2-foundation/NSTimeZone", + "objc2-ui-kit?/UIColor", +] +WKInterfaceDevice = [ + "objc2-core-foundation?/CFCGTypes", + "objc2-foundation/NSString", + "objc2-foundation/NSUUID", +] +WKInterfaceGroup = [ + "objc2-core-foundation?/CFCGTypes", + "objc2-foundation/NSData", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIColor", + "objc2-ui-kit?/UIGeometry", + "objc2-ui-kit?/UIImage", +] +WKInterfaceHMCamera = ["objc2-home-kit?/HMCameraSource"] +WKInterfaceImage = [ + "objc2-foundation/NSData", + "objc2-foundation/NSDate", + "objc2-foundation/NSRange", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIColor", + "objc2-ui-kit?/UIImage", +] +WKInterfaceInlineMovie = ["objc2-foundation/NSURL"] +WKInterfaceLabel = [ + "objc2-foundation/NSAttributedString", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIColor", +] +WKInterfaceMap = [ + "objc2-core-foundation?/CFCGTypes", + "objc2-core-location?/CLLocation", + "objc2-foundation/NSString", + "objc2-map-kit?/MKGeometry", + "objc2-ui-kit?/UIImage", +] +WKInterfaceMovie = ["objc2-foundation/NSURL"] +WKInterfaceObject = [ + "objc2-core-foundation?/CFCGTypes", + "objc2-foundation/NSArray", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIAccessibilityConstants", +] +WKInterfacePaymentButton = [] +WKInterfacePicker = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +WKInterfaceSCNScene = [ + "objc2-scene-kit?/SCNScene", + "objc2-scene-kit?/SCNSceneRenderer", + "objc2-ui-kit?/UIImage", +] +WKInterfaceSKScene = [] +WKInterfaceSeparator = ["objc2-ui-kit?/UIColor"] +WKInterfaceSlider = ["objc2-ui-kit?/UIColor"] +WKInterfaceSwitch = [ + "objc2-foundation/NSAttributedString", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIColor", +] +WKInterfaceTable = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSIndexSet", + "objc2-foundation/NSString", +] +WKInterfaceTextField = [ + "objc2-foundation/NSAttributedString", + "objc2-foundation/NSString", + "objc2-ui-kit?/UIColor", +] +WKInterfaceTimer = [ + "objc2-foundation/NSDate", + "objc2-ui-kit?/UIColor", +] +WKInterfaceVolumeControl = ["objc2-ui-kit?/UIColor"] +all = [ + "WKAccessibility", + "WKAlertAction", + "WKApplication", + "WKApplicationMain", + "WKAudioFileAsset", + "WKAudioFilePlayer", + "WKAudioFilePlayerItem", + "WKBackgroundTask", + "WKCrownSequencer", + "WKDefines", + "WKError", + "WKExtendedRuntimeSession", + "WKExtension", + "WKGestureRecognizer", + "WKImage", + "WKInterfaceActivityRing", + "WKInterfaceAuthorizationAppleIDButton", + "WKInterfaceButton", + "WKInterfaceController", + "WKInterfaceDate", + "WKInterfaceDevice", + "WKInterfaceGroup", + "WKInterfaceHMCamera", + "WKInterfaceImage", + "WKInterfaceInlineMovie", + "WKInterfaceLabel", + "WKInterfaceMap", + "WKInterfaceMovie", + "WKInterfaceObject", + "WKInterfacePaymentButton", + "WKInterfacePicker", + "WKInterfaceSCNScene", + "WKInterfaceSKScene", + "WKInterfaceSeparator", + "WKInterfaceSlider", + "WKInterfaceSwitch", + "WKInterfaceTable", + "WKInterfaceTextField", + "WKInterfaceTimer", + "WKInterfaceVolumeControl", + "bitflags", + "block2", + "objc2-cloud-kit", + "objc2-core-foundation", + "objc2-core-location", + "objc2-health-kit", + "objc2-home-kit", + "objc2-map-kit", + "objc2-scene-kit", + "objc2-ui-kit", + "objc2-user-notifications", +] diff --git a/framework-crates/objc2-watch-kit/README.md b/framework-crates/objc2-watch-kit/README.md new file mode 100644 index 000000000..641dae879 --- /dev/null +++ b/framework-crates/objc2-watch-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-watch-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-watch-kit)](https://crates.io/crates/objc2-watch-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-watch-kit/badge.svg)](https://docs.rs/objc2-watch-kit/) +[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml) + +Rust bindings to Apple's framework WatchKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-watch-kit/) for more details on this crate. + +This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2), +see that for related crates. diff --git a/framework-crates/objc2-watch-kit/src/generated b/framework-crates/objc2-watch-kit/src/generated new file mode 120000 index 000000000..282382503 --- /dev/null +++ b/framework-crates/objc2-watch-kit/src/generated @@ -0,0 +1 @@ +../../../generated/WatchKit \ No newline at end of file diff --git a/framework-crates/objc2-watch-kit/src/lib.rs b/framework-crates/objc2-watch-kit/src/lib.rs new file mode 100644 index 000000000..2636bdbdb --- /dev/null +++ b/framework-crates/objc2-watch-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `WatchKit` framework +//! +//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information. +//! +//! [apple-doc]: https://developer.apple.com/documentation/watchkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-watch-kit/0.2.2")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; diff --git a/framework-crates/objc2-watch-kit/translation-config.toml b/framework-crates/objc2-watch-kit/translation-config.toml new file mode 100644 index 000000000..c7ce40cf6 --- /dev/null +++ b/framework-crates/objc2-watch-kit/translation-config.toml @@ -0,0 +1,31 @@ +framework = "WatchKit" +crate = "objc2-watch-kit" +required-crates = ["objc2", "objc2-foundation"] +watchos = "2.0" + +external.PKPass.module = "PassKit.PKPass" +external.UNNotificationAction.module = "UserNotifications.UNNotificationAction" +external.UNNotification.module = "UserNotifications.UNNotification" +external.HKWorkoutConfiguration.module = "HealthKit.HKWorkoutConfiguration" +external.HKActivitySummary.module = "HealthKit.HKActivitySummary" +external.INIntent.module = "Intents.INIntent" +external.INIntentResponse.module = "Intents.INIntentResponse" +external.CKShareMetadata.module = "CloudKit.CKShareMetadata" +external.SKScene.module = "SpriteKit.SKScene" +external.SKTransition.module = "SpriteKit.SKTransition" +external.SKNode.module = "SpriteKit.SKNode" +external.SKTexture.module = "SpriteKit.SKTexture" + +# Needs PKPass from PassKit +class.WKInterfaceController.methods."presentAddPassesControllerWithPasses:completion:".skipped = true + +# Needs Intents +protocol.WKApplicationDelegate.methods."handleIntent:completionHandler:".skipped = true +protocol.WKExtensionDelegate.methods."handleIntent:completionHandler:".skipped = true + +# Needs SKScene/SKNode to be configured for watchOS/UIKit +class.WKInterfaceSKScene.methods."presentScene:".skipped = true +class.WKInterfaceSKScene.methods."presentScene:transition:".skipped = true +class.WKInterfaceSKScene.methods.scene.skipped = true +class.WKInterfaceSKScene.methods."textureFromNode:".skipped = true +class.WKInterfaceSKScene.methods."textureFromNode:crop:".skipped = true diff --git a/generated b/generated index 411f8b5d0..7fb69cd1a 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 411f8b5d0dddc144bc122575feafc312e61cc9db +Subproject commit 7fb69cd1a15385658dede50f79ca823610cc9926