From 27176a9f6d731c0f1b0bcbb67e26cccf59ba4dac Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 17 Apr 2024 00:40:33 +0200 Subject: [PATCH] Split icrate into one crate per framework Additionally: - Add helper module `objc2::__framework_prelude` with common imports. - Make `block2` an optional dependency. - Make most framework crates except `objc2-foundation` optional. - Move framework changelog to `objc2::topics::about_generated::changelog`. - Add full list of crates in `objc2::topics::about_generated::list`. - Document cargo features in `objc2::topics::about_generated::cargo_features`. --- .github/workflows/ci.yml | 113 +- .gitmodules | 6 +- CONTRIBUTING.md | 23 +- Cargo.lock | 549 ++- Cargo.toml | 1 + README.md | 26 +- crates/block2/Cargo.toml | 14 +- crates/header-translator/Cargo.toml | 1 + crates/header-translator/README.md | 10 +- .../src/bin/check_framework_features.rs | 124 + .../src/bin/check_icrate_features.rs | 96 - crates/header-translator/src/config.rs | 41 +- crates/header-translator/src/data/README.md | 4 +- .../header-translator/src/default_cargo.toml | 40 + crates/header-translator/src/file.rs | 111 +- .../header-translator/src/global_analysis.rs | 13 +- crates/header-translator/src/id.rs | 85 +- crates/header-translator/src/lib.rs | 13 +- crates/header-translator/src/library.rs | 473 +- crates/header-translator/src/main.rs | 233 +- crates/header-translator/src/output.rs | 141 - crates/header-translator/src/rust_type.rs | 11 +- crates/header-translator/src/stmt.rs | 1250 +++--- .../header-translator/translation-config.toml | 195 +- crates/icrate/Cargo.toml | 3842 ----------------- crates/icrate/README.md | 14 - crates/icrate/examples/README.md | 8 - .../src/additions/AppKit/application.rs | 7 - .../additions/AuthenticationServices/mod.rs | 81 - crates/icrate/src/additions/CallKit/mod.rs | 4 - .../src/additions/GameController/mod.rs | 26 - crates/icrate/src/additions/MapKit/mod.rs | 6 - crates/icrate/src/additions/MetricKit/mod.rs | 9 - crates/icrate/src/additions/Photos/mod.rs | 7 - crates/icrate/src/additions/QuartzCore/mod.rs | 10 - crates/icrate/src/additions/WebKit/mod.rs | 21 - crates/icrate/src/additions/mod.rs | 25 - crates/icrate/src/common.rs | 47 - crates/icrate/src/generated | 1 - crates/icrate/src/lib.rs | 258 -- crates/objc-sys/Cargo.toml | 15 +- crates/objc-sys/src/lib.rs | 2 +- crates/objc-sys/src/types.rs | 2 +- crates/objc2-encode/Cargo.toml | 15 +- crates/objc2-proc-macros/Cargo.toml | 13 +- crates/objc2/CHANGELOG.md | 4 +- crates/objc2/Cargo.toml | 15 +- crates/objc2/src/__framework_prelude.rs | 33 + crates/objc2/src/encode.rs | 4 +- crates/objc2/src/lib.rs | 18 +- crates/objc2/src/macros/declare_class.rs | 8 +- crates/objc2/src/macros/extern_category.rs | 2 +- crates/objc2/src/macros/extern_class.rs | 18 +- crates/objc2/src/macros/extern_methods.rs | 4 +- crates/objc2/src/macros/extern_protocol.rs | 5 +- crates/objc2/src/macros/mod.rs | 4 +- crates/objc2/src/mutability.rs | 4 +- crates/objc2/src/rc/id.rs | 10 +- crates/objc2/src/runtime/__nsstring.rs | 6 +- crates/objc2/src/runtime/message_receiver.rs | 2 +- crates/objc2/src/runtime/mod.rs | 6 +- crates/objc2/src/runtime/nsobject.rs | 24 +- .../src/topics/about_generated}/CHANGELOG.md | 58 +- .../src/topics/about_generated/README.md | 32 + .../topics/about_generated/cargo_features.md | 43 + .../objc2/src/topics/about_generated/deref.md | 23 + .../objc2/src/topics/about_generated/list.md | 12 + .../src/topics/about_generated/list_data.md | 53 + .../objc2/src/topics/about_generated/mod.rs | 14 + crates/objc2/src/topics/layered_safety.md | 38 +- crates/objc2/src/topics/mod.rs | 2 + crates/objc2/tests/macros_mainthreadmarker.rs | 2 +- .../crates/test_declare_class/Cargo.toml | 23 +- .../expected/apple-aarch64.s | 144 +- .../expected/apple-x86_64.s | 128 +- .../crates/test_declare_class/lib.rs | 2 +- .../crates/test_fast_enumeration/Cargo.toml | 25 +- .../expected/apple-aarch64.s | 16 +- .../expected/apple-armv7s.s | 24 +- .../expected/apple-x86.s | 12 +- .../expected/apple-x86_64.s | 10 +- .../expected/gnustep-x86.s | 8 +- .../expected/gnustep-x86_64.s | 10 +- .../crates/test_fast_enumeration/lib.rs | 6 +- .../crates/test_ns_string/Cargo.toml | 23 +- .../test_ns_string/expected/gnustep-x86.s | 6 +- .../test_ns_string/expected/gnustep-x86_64.s | 6 +- .../crates/test_ns_string/lib.rs | 8 +- crates/test-assembly/src/lib.rs | 16 +- crates/test-fuzz/Cargo.toml | 20 +- crates/test-fuzz/fuzz_targets/nsstring.rs | 2 +- crates/test-ui/Cargo.toml | 39 +- .../test-ui/ui/array_iter_correct_lifetime.rs | 2 +- crates/test-ui/ui/array_iter_invalid.rs | 2 +- ...clare_class_delegate_not_mainthreadonly.rs | 2 +- .../test-ui/ui/extern_methods_invalid_type.rs | 2 +- .../extern_methods_wrong_arguments_error.rs | 2 +- .../ui/implement_protocol_missing_super.rs | 2 +- .../implement_protocol_missing_super.stderr | 12 +- crates/test-ui/ui/invalid_ns_string_input.rs | 2 +- crates/test-ui/ui/invalid_ns_string_output.rs | 2 +- .../ui/mainthreadmarker_from_nsobject.rs | 2 +- .../ui/mainthreadmarker_from_nsobject.stderr | 8 +- .../ui/mainthreadmarker_not_send_sync.rs | 2 +- .../ui/mainthreadmarker_not_send_sync.stderr | 4 +- .../ui/msg_send_id_underspecified_error1.rs | 2 +- .../ui/msg_send_id_underspecified_error2.rs | 2 +- .../ui/msg_send_id_underspecified_error3.rs | 2 +- crates/test-ui/ui/msg_send_invalid_error.rs | 2 +- .../test-ui/ui/msg_send_invalid_error.stderr | 6 +- crates/test-ui/ui/msg_send_missing_comma.rs | 2 +- .../ui/msg_send_not_allowed_mutable.rs | 2 +- .../ui/msg_send_underspecified_error.rs | 2 +- crates/test-ui/ui/ns_string_not_const.rs | 2 +- .../test-ui/ui/ns_string_output_not_const.rs | 2 +- .../ui/ns_string_output_not_const.stderr | 2 +- .../test-ui/ui/nsarray_bound_not_send_sync.rs | 2 +- .../ui/nsarray_bound_not_send_sync.stderr | 96 +- crates/test-ui/ui/nsarray_not_message.rs | 2 +- crates/test-ui/ui/nsarray_not_message.stderr | 18 +- crates/test-ui/ui/nsset_from_nsobject.rs | 2 +- crates/test-ui/ui/nsset_from_nsobject.stderr | 18 +- .../ui/nsstring_as_str_use_after_release.rs | 2 +- .../ui/nsstring_as_str_use_outside_pool.rs | 2 +- crates/test-ui/ui/object_not_send_sync.rs | 4 +- crates/test-ui/ui/object_not_send_sync.stderr | 4 +- .../ui/protocol_object_only_protocols.rs | 2 +- .../ui/protocol_object_only_protocols.stderr | 46 +- crates/tests/Cargo.toml | 37 +- crates/tests/src/exception.rs | 2 +- crates/tests/src/lib.rs | 2 +- .../tests/src/test_declare_class_protocol.rs | 4 +- ...rs => test_foundation_retain_semantics.rs} | 10 +- crates/tests/src/test_object.rs | 20 +- framework-crates/.gitattributes | 3 + framework-crates/CHANGELOG.md | 1 + .../objc2-accessibility/Cargo.toml | 90 + .../objc2-accessibility/README.md | 14 + .../objc2-accessibility/src/generated | 1 + .../objc2-accessibility/src/lib.rs | 20 + framework-crates/objc2-ad-services/Cargo.toml | 51 + framework-crates/objc2-ad-services/README.md | 14 + .../objc2-ad-services/src/generated | 1 + framework-crates/objc2-ad-services/src/lib.rs | 20 + framework-crates/objc2-ad-support/Cargo.toml | 49 + framework-crates/objc2-ad-support/README.md | 14 + .../objc2-ad-support/src/generated | 1 + framework-crates/objc2-ad-support/src/lib.rs | 20 + .../objc2-app-kit/Cargo.modified.toml | 41 + framework-crates/objc2-app-kit/Cargo.toml | 2077 +++++++++ framework-crates/objc2-app-kit/README.md | 14 + .../objc2-app-kit}/examples/delegate.rs | 8 +- .../objc2-app-kit}/examples/nspasteboard.rs | 8 +- .../objc2-app-kit/src/application.rs | 5 + framework-crates/objc2-app-kit/src/generated | 1 + .../objc2-app-kit/src}/image.rs | 6 +- .../objc2-app-kit/src/lib.rs | 30 +- .../objc2-app-kit/src}/text.rs | 3 - .../objc2-authentication-services/Cargo.toml | 469 ++ .../objc2-authentication-services/README.md | 14 + .../src/generated | 1 + .../objc2-authentication-services/src/lib.rs | 72 + .../Cargo.toml | 71 + .../README.md | 14 + .../src/generated | 1 + .../src/lib.rs | 20 + framework-crates/objc2-automator/Cargo.toml | 127 + framework-crates/objc2-automator/README.md | 14 + .../objc2-automator/src/generated | 1 + framework-crates/objc2-automator/src/lib.rs | 20 + .../objc2-background-assets/Cargo.toml | 92 + .../objc2-background-assets/README.md | 14 + .../objc2-background-assets/src/generated | 1 + .../objc2-background-assets/src/lib.rs | 20 + .../objc2-background-tasks/Cargo.toml | 68 + .../objc2-background-tasks/README.md | 14 + .../objc2-background-tasks/src/generated | 1 + .../objc2-background-tasks/src/lib.rs | 20 + .../objc2-business-chat/Cargo.toml | 68 + .../objc2-business-chat/README.md | 14 + .../objc2-business-chat/src/generated | 1 + .../objc2-business-chat/src/lib.rs | 20 + framework-crates/objc2-call-kit/Cargo.toml | 179 + framework-crates/objc2-call-kit/README.md | 14 + framework-crates/objc2-call-kit/src/generated | 1 + framework-crates/objc2-call-kit/src/lib.rs | 23 + framework-crates/objc2-class-kit/Cargo.toml | 115 + framework-crates/objc2-class-kit/README.md | 14 + .../objc2-class-kit/src/generated | 1 + framework-crates/objc2-class-kit/src/lib.rs | 20 + framework-crates/objc2-cloud-kit/Cargo.toml | 343 ++ framework-crates/objc2-cloud-kit/README.md | 14 + .../objc2-cloud-kit/src/generated | 1 + framework-crates/objc2-cloud-kit/src/lib.rs | 20 + framework-crates/objc2-contacts/Cargo.toml | 207 + framework-crates/objc2-contacts/README.md | 14 + framework-crates/objc2-contacts/src/generated | 1 + framework-crates/objc2-contacts/src/lib.rs | 20 + .../objc2-core-data/Cargo.modified.toml | 18 + framework-crates/objc2-core-data/Cargo.toml | 393 ++ framework-crates/objc2-core-data/README.md | 14 + .../objc2-core-data/src/generated | 1 + framework-crates/objc2-core-data/src/lib.rs | 20 + .../objc2-core-location/Cargo.toml | 174 + .../objc2-core-location/README.md | 14 + .../objc2-core-location/src/generated | 1 + .../objc2-core-location/src/lib.rs | 20 + framework-crates/objc2-core-wlan/Cargo.toml | 85 + framework-crates/objc2-core-wlan/README.md | 14 + .../objc2-core-wlan/src/generated | 1 + framework-crates/objc2-core-wlan/src/lib.rs | 20 + .../objc2-data-detection/Cargo.toml | 59 + .../objc2-data-detection/README.md | 14 + .../objc2-data-detection/src/generated | 1 + .../objc2-data-detection/src/lib.rs | 20 + .../objc2-device-check/Cargo.toml | 69 + framework-crates/objc2-device-check/README.md | 14 + .../objc2-device-check/src/generated | 1 + .../objc2-device-check/src/lib.rs | 20 + framework-crates/objc2-event-kit/Cargo.toml | 154 + framework-crates/objc2-event-kit/README.md | 14 + .../objc2-event-kit/src/generated | 1 + framework-crates/objc2-event-kit/src/lib.rs | 20 + .../objc2-exception-handling/Cargo.toml | 54 + .../objc2-exception-handling/README.md | 14 + .../objc2-exception-handling/src/generated | 1 + .../objc2-exception-handling/src/lib.rs | 20 + .../objc2-extension-kit/Cargo.toml | 82 + .../objc2-extension-kit/README.md | 14 + .../objc2-extension-kit/src/generated | 1 + .../objc2-extension-kit/src/lib.rs | 20 + .../objc2-external-accessory/Cargo.toml | 78 + .../objc2-external-accessory/README.md | 14 + .../objc2-external-accessory/src/generated | 1 + .../objc2-external-accessory/src/lib.rs | 20 + .../objc2-file-provider-ui/Cargo.toml | 82 + .../objc2-file-provider-ui/README.md | 14 + .../objc2-file-provider-ui/src/generated | 1 + .../objc2-file-provider-ui/src/lib.rs | 20 + .../objc2-file-provider/Cargo.toml | 159 + .../objc2-file-provider/README.md | 14 + .../objc2-file-provider/src/generated | 1 + .../objc2-file-provider/src/lib.rs | 20 + .../objc2-foundation/Cargo.modified.toml | 48 + framework-crates/objc2-foundation/Cargo.toml | 418 ++ framework-crates/objc2-foundation/README.md | 14 + .../objc2-foundation}/examples/basic_usage.rs | 4 +- .../examples/speech_synthesis.rs | 4 +- .../src}/__macro_helpers/cached.rs | 0 .../src}/__macro_helpers/mod.rs | 0 .../src}/__macro_helpers/ns_string.rs | 0 .../objc2-foundation/src}/array.rs | 38 +- .../src}/attributed_string.rs | 3 +- .../objc2-foundation/src}/bundle.rs | 0 .../src}/comparison_result.rs | 0 .../objc2-foundation/src}/copying.rs | 0 .../objc2-foundation/src}/data.rs | 0 .../objc2-foundation/src}/decimal.rs | 3 - .../objc2-foundation/src}/dictionary.rs | 15 +- .../objc2-foundation/src}/enumerator.rs | 0 .../objc2-foundation/src}/error.rs | 21 +- .../objc2-foundation/src}/exception.rs | 16 +- .../src}/fast_enumeration_state.rs | 0 .../objc2-foundation/src/generated | 1 + .../objc2-foundation/src}/generics.rs | 2 +- .../objc2-foundation/src}/geometry.rs | 20 +- .../objc2-foundation/src}/iter.rs | 0 .../objc2-foundation/src/lib.rs | 81 +- .../objc2-foundation/src}/macros/mod.rs | 0 .../objc2-foundation/src}/macros/ns_string.rs | 35 +- .../objc2-foundation/src}/ns_consumed.rs | 0 .../objc2-foundation/src}/number.rs | 9 +- .../objc2-foundation/src}/process_info.rs | 1 + .../objc2-foundation/src}/range.rs | 6 +- .../objc2-foundation/src}/set.rs | 62 +- .../objc2-foundation/src}/string.rs | 14 +- .../objc2-foundation/src}/tests/array.rs | 0 .../src}/tests/attributed_string.rs | 0 .../src}/tests/auto_traits.rs | 2 +- .../objc2-foundation/src}/tests/bundle.rs | 0 .../objc2-foundation/src}/tests/copying.rs | 2 +- .../objc2-foundation/src}/tests/data.rs | 0 .../objc2-foundation/src}/tests/dictionary.rs | 0 .../objc2-foundation/src}/tests/error.rs | 0 .../objc2-foundation/src}/tests/exception.rs | 0 .../objc2-foundation/src}/tests/lock.rs | 0 .../objc2-foundation/src}/tests/mod.rs | 0 .../src}/tests/mutable_array.rs | 0 .../src}/tests/mutable_data.rs | 0 .../src}/tests/mutable_dictionary.rs | 0 .../src}/tests/mutable_set.rs | 0 .../src}/tests/mutable_string.rs | 0 .../objc2-foundation/src}/tests/number.rs | 0 .../src}/tests/process_info.rs | 0 .../objc2-foundation/src}/tests/proxy.rs | 0 .../objc2-foundation/src}/tests/set.rs | 0 .../objc2-foundation/src}/tests/string.rs | 1 + .../objc2-foundation/src}/tests/thread.rs | 0 .../objc2-foundation/src}/tests/uuid.rs | 0 .../objc2-foundation/src}/tests/value.rs | 0 .../objc2-foundation/src}/thread.rs | 14 +- .../objc2-foundation/src}/to_owned.rs | 0 .../objc2-foundation/src}/util.rs | 0 .../objc2-foundation/src}/uuid.rs | 7 +- .../objc2-foundation/src}/value.rs | 4 +- .../objc2-game-controller/Cargo.toml | 238 + .../objc2-game-controller/README.md | 14 + .../src}/extended_gamepad_snapshot.rs | 4 +- .../objc2-game-controller/src/generated | 1 + .../objc2-game-controller/src}/input_names.rs | 2 +- .../objc2-game-controller/src/lib.rs | 35 + framework-crates/objc2-game-kit/Cargo.toml | 348 ++ framework-crates/objc2-game-kit/README.md | 14 + framework-crates/objc2-game-kit/src/generated | 1 + framework-crates/objc2-game-kit/src/lib.rs | 20 + framework-crates/objc2-health-kit/Cargo.toml | 507 +++ framework-crates/objc2-health-kit/README.md | 14 + .../objc2-health-kit/src/generated | 1 + framework-crates/objc2-health-kit/src/lib.rs | 20 + .../objc2-identity-lookup/Cargo.toml | 125 + .../objc2-identity-lookup/README.md | 14 + .../objc2-identity-lookup/src/generated | 1 + .../objc2-identity-lookup/src/lib.rs | 20 + .../objc2-input-method-kit/Cargo.toml | 76 + .../objc2-input-method-kit/README.md | 14 + .../objc2-input-method-kit/src/generated | 1 + .../objc2-input-method-kit/src/lib.rs | 21 +- .../objc2-link-presentation/Cargo.toml | 90 + .../objc2-link-presentation/README.md | 14 + .../objc2-link-presentation/src/generated | 1 + .../objc2-link-presentation/src/lib.rs | 20 + .../Cargo.toml | 83 + .../README.md | 14 + .../src/generated | 1 + .../src/lib.rs | 20 + .../objc2-local-authentication/Cargo.toml | 93 + .../objc2-local-authentication/README.md | 14 + .../objc2-local-authentication/src/generated | 1 + .../objc2-local-authentication/src/lib.rs | 20 + framework-crates/objc2-mail-kit/Cargo.toml | 171 + framework-crates/objc2-mail-kit/README.md | 14 + framework-crates/objc2-mail-kit/src/generated | 1 + framework-crates/objc2-mail-kit/src/lib.rs | 20 + framework-crates/objc2-map-kit/Cargo.toml | 425 ++ framework-crates/objc2-map-kit/README.md | 14 + framework-crates/objc2-map-kit/src/generated | 1 + framework-crates/objc2-map-kit/src/lib.rs | 23 + .../objc2-media-player/Cargo.toml | 198 + framework-crates/objc2-media-player/README.md | 14 + .../objc2-media-player/src/generated | 1 + .../objc2-media-player/src/lib.rs | 20 + framework-crates/objc2-metal-fx/Cargo.toml | 71 + framework-crates/objc2-metal-fx/README.md | 14 + framework-crates/objc2-metal-fx/src/generated | 1 + framework-crates/objc2-metal-fx/src/lib.rs | 20 + framework-crates/objc2-metal-kit/Cargo.toml | 102 + framework-crates/objc2-metal-kit/README.md | 14 + .../objc2-metal-kit/src/generated | 1 + framework-crates/objc2-metal-kit/src/lib.rs | 20 + .../objc2-metal/Cargo.modified.toml | 42 + framework-crates/objc2-metal/Cargo.toml | 319 ++ framework-crates/objc2-metal/README.md | 14 + .../objc2-metal/examples/triangle.rs | 32 +- .../objc2-metal/src}/capture.rs | 2 +- .../objc2-metal/src}/device.rs | 2 +- framework-crates/objc2-metal/src/generated | 1 + .../objc2-metal/src/lib.rs | 30 +- .../objc2-metal/src}/packed.rs | 5 +- .../objc2-metal/src}/private.rs | 14 +- .../objc2-metal/src}/resource.rs | 0 .../objc2-metal/src}/slice.rs | 2 +- framework-crates/objc2-metric-kit/Cargo.toml | 244 ++ framework-crates/objc2-metric-kit/README.md | 14 + .../objc2-metric-kit/src/generated | 1 + framework-crates/objc2-metric-kit/src/lib.rs | 26 + .../objc2-metric-kit/src}/manager.rs | 15 +- framework-crates/objc2-osa-kit/Cargo.toml | 106 + framework-crates/objc2-osa-kit/README.md | 14 + framework-crates/objc2-osa-kit/src/generated | 1 + framework-crates/objc2-osa-kit/src/lib.rs | 20 + .../objc2-photos/Cargo.modified.toml | 2 + framework-crates/objc2-photos/Cargo.toml | 240 + framework-crates/objc2-photos/README.md | 14 + framework-crates/objc2-photos/src/generated | 1 + framework-crates/objc2-photos/src/lib.rs | 23 + .../objc2-quartz-core/Cargo.modified.toml | 2 + framework-crates/objc2-quartz-core/Cargo.toml | 191 + framework-crates/objc2-quartz-core/README.md | 14 + .../objc2-quartz-core/src/generated | 1 + framework-crates/objc2-quartz-core/src/lib.rs | 28 + .../objc2-service-management/Cargo.toml | 60 + .../objc2-service-management/README.md | 14 + .../objc2-service-management/src/generated | 1 + .../objc2-service-management/src/lib.rs | 20 + .../objc2-sound-analysis/Cargo.toml | 84 + .../objc2-sound-analysis/README.md | 14 + .../objc2-sound-analysis/src/generated | 1 + .../objc2-sound-analysis/src/lib.rs | 20 + framework-crates/objc2-speech/Cargo.toml | 112 + framework-crates/objc2-speech/README.md | 14 + framework-crates/objc2-speech/src/generated | 1 + framework-crates/objc2-speech/src/lib.rs | 20 + framework-crates/objc2-store-kit/Cargo.toml | 190 + framework-crates/objc2-store-kit/README.md | 14 + .../objc2-store-kit/src/generated | 1 + framework-crates/objc2-store-kit/src/lib.rs | 20 + .../objc2-uniform-type-identifiers/Cargo.toml | 83 + .../objc2-uniform-type-identifiers/README.md | 14 + .../src/generated | 1 + .../objc2-uniform-type-identifiers/src/lib.rs | 20 + .../objc2-user-notifications/Cargo.toml | 134 + .../objc2-user-notifications/README.md | 14 + .../objc2-user-notifications/src/generated | 1 + .../objc2-user-notifications/src/lib.rs | 20 + .../objc2-web-kit/Cargo.modified.toml | 32 + framework-crates/objc2-web-kit/Cargo.toml | 1024 +++++ framework-crates/objc2-web-kit/README.md | 14 + .../objc2-web-kit}/examples/browser.rs | 27 +- framework-crates/objc2-web-kit/src/generated | 1 + framework-crates/objc2-web-kit/src/lib.rs | 40 + generated | 1 + 421 files changed, 16608 insertions(+), 6405 deletions(-) create mode 100644 crates/header-translator/src/bin/check_framework_features.rs delete mode 100644 crates/header-translator/src/bin/check_icrate_features.rs create mode 100644 crates/header-translator/src/default_cargo.toml delete mode 100644 crates/header-translator/src/output.rs delete mode 100644 crates/icrate/Cargo.toml delete mode 100644 crates/icrate/README.md delete mode 100644 crates/icrate/examples/README.md delete mode 100644 crates/icrate/src/additions/AppKit/application.rs delete mode 100644 crates/icrate/src/additions/AuthenticationServices/mod.rs delete mode 100644 crates/icrate/src/additions/CallKit/mod.rs delete mode 100644 crates/icrate/src/additions/GameController/mod.rs delete mode 100644 crates/icrate/src/additions/MapKit/mod.rs delete mode 100644 crates/icrate/src/additions/MetricKit/mod.rs delete mode 100644 crates/icrate/src/additions/Photos/mod.rs delete mode 100644 crates/icrate/src/additions/QuartzCore/mod.rs delete mode 100644 crates/icrate/src/additions/WebKit/mod.rs delete mode 100644 crates/icrate/src/additions/mod.rs delete mode 100644 crates/icrate/src/common.rs delete mode 160000 crates/icrate/src/generated delete mode 100644 crates/icrate/src/lib.rs create mode 100644 crates/objc2/src/__framework_prelude.rs rename crates/{icrate => objc2/src/topics/about_generated}/CHANGELOG.md (93%) create mode 100644 crates/objc2/src/topics/about_generated/README.md create mode 100644 crates/objc2/src/topics/about_generated/cargo_features.md create mode 100644 crates/objc2/src/topics/about_generated/deref.md create mode 100644 crates/objc2/src/topics/about_generated/list.md create mode 100644 crates/objc2/src/topics/about_generated/list_data.md create mode 100644 crates/objc2/src/topics/about_generated/mod.rs rename crates/tests/src/{test_icrate_retain_semantics.rs => test_foundation_retain_semantics.rs} (99%) create mode 100644 framework-crates/.gitattributes create mode 120000 framework-crates/CHANGELOG.md create mode 100644 framework-crates/objc2-accessibility/Cargo.toml create mode 100644 framework-crates/objc2-accessibility/README.md create mode 120000 framework-crates/objc2-accessibility/src/generated create mode 100644 framework-crates/objc2-accessibility/src/lib.rs create mode 100644 framework-crates/objc2-ad-services/Cargo.toml create mode 100644 framework-crates/objc2-ad-services/README.md create mode 120000 framework-crates/objc2-ad-services/src/generated create mode 100644 framework-crates/objc2-ad-services/src/lib.rs create mode 100644 framework-crates/objc2-ad-support/Cargo.toml create mode 100644 framework-crates/objc2-ad-support/README.md create mode 120000 framework-crates/objc2-ad-support/src/generated create mode 100644 framework-crates/objc2-ad-support/src/lib.rs create mode 100644 framework-crates/objc2-app-kit/Cargo.modified.toml create mode 100644 framework-crates/objc2-app-kit/Cargo.toml create mode 100644 framework-crates/objc2-app-kit/README.md rename {crates/icrate => framework-crates/objc2-app-kit}/examples/delegate.rs (95%) rename {crates/icrate => framework-crates/objc2-app-kit}/examples/nspasteboard.rs (90%) create mode 100644 framework-crates/objc2-app-kit/src/application.rs create mode 120000 framework-crates/objc2-app-kit/src/generated rename {crates/icrate/src/additions/AppKit => framework-crates/objc2-app-kit/src}/image.rs (81%) rename crates/icrate/src/additions/AppKit/mod.rs => framework-crates/objc2-app-kit/src/lib.rs (69%) rename {crates/icrate/src/additions/AppKit => framework-crates/objc2-app-kit/src}/text.rs (93%) create mode 100644 framework-crates/objc2-authentication-services/Cargo.toml create mode 100644 framework-crates/objc2-authentication-services/README.md create mode 120000 framework-crates/objc2-authentication-services/src/generated create mode 100644 framework-crates/objc2-authentication-services/src/lib.rs create mode 100644 framework-crates/objc2-automatic-assessment-configuration/Cargo.toml create mode 100644 framework-crates/objc2-automatic-assessment-configuration/README.md create mode 120000 framework-crates/objc2-automatic-assessment-configuration/src/generated create mode 100644 framework-crates/objc2-automatic-assessment-configuration/src/lib.rs create mode 100644 framework-crates/objc2-automator/Cargo.toml create mode 100644 framework-crates/objc2-automator/README.md create mode 120000 framework-crates/objc2-automator/src/generated create mode 100644 framework-crates/objc2-automator/src/lib.rs create mode 100644 framework-crates/objc2-background-assets/Cargo.toml create mode 100644 framework-crates/objc2-background-assets/README.md create mode 120000 framework-crates/objc2-background-assets/src/generated create mode 100644 framework-crates/objc2-background-assets/src/lib.rs create mode 100644 framework-crates/objc2-background-tasks/Cargo.toml create mode 100644 framework-crates/objc2-background-tasks/README.md create mode 120000 framework-crates/objc2-background-tasks/src/generated create mode 100644 framework-crates/objc2-background-tasks/src/lib.rs create mode 100644 framework-crates/objc2-business-chat/Cargo.toml create mode 100644 framework-crates/objc2-business-chat/README.md create mode 120000 framework-crates/objc2-business-chat/src/generated create mode 100644 framework-crates/objc2-business-chat/src/lib.rs create mode 100644 framework-crates/objc2-call-kit/Cargo.toml create mode 100644 framework-crates/objc2-call-kit/README.md create mode 120000 framework-crates/objc2-call-kit/src/generated create mode 100644 framework-crates/objc2-call-kit/src/lib.rs create mode 100644 framework-crates/objc2-class-kit/Cargo.toml create mode 100644 framework-crates/objc2-class-kit/README.md create mode 120000 framework-crates/objc2-class-kit/src/generated create mode 100644 framework-crates/objc2-class-kit/src/lib.rs create mode 100644 framework-crates/objc2-cloud-kit/Cargo.toml create mode 100644 framework-crates/objc2-cloud-kit/README.md create mode 120000 framework-crates/objc2-cloud-kit/src/generated create mode 100644 framework-crates/objc2-cloud-kit/src/lib.rs create mode 100644 framework-crates/objc2-contacts/Cargo.toml create mode 100644 framework-crates/objc2-contacts/README.md create mode 120000 framework-crates/objc2-contacts/src/generated create mode 100644 framework-crates/objc2-contacts/src/lib.rs create mode 100644 framework-crates/objc2-core-data/Cargo.modified.toml create mode 100644 framework-crates/objc2-core-data/Cargo.toml create mode 100644 framework-crates/objc2-core-data/README.md create mode 120000 framework-crates/objc2-core-data/src/generated create mode 100644 framework-crates/objc2-core-data/src/lib.rs create mode 100644 framework-crates/objc2-core-location/Cargo.toml create mode 100644 framework-crates/objc2-core-location/README.md create mode 120000 framework-crates/objc2-core-location/src/generated create mode 100644 framework-crates/objc2-core-location/src/lib.rs create mode 100644 framework-crates/objc2-core-wlan/Cargo.toml create mode 100644 framework-crates/objc2-core-wlan/README.md create mode 120000 framework-crates/objc2-core-wlan/src/generated create mode 100644 framework-crates/objc2-core-wlan/src/lib.rs create mode 100644 framework-crates/objc2-data-detection/Cargo.toml create mode 100644 framework-crates/objc2-data-detection/README.md create mode 120000 framework-crates/objc2-data-detection/src/generated create mode 100644 framework-crates/objc2-data-detection/src/lib.rs create mode 100644 framework-crates/objc2-device-check/Cargo.toml create mode 100644 framework-crates/objc2-device-check/README.md create mode 120000 framework-crates/objc2-device-check/src/generated create mode 100644 framework-crates/objc2-device-check/src/lib.rs create mode 100644 framework-crates/objc2-event-kit/Cargo.toml create mode 100644 framework-crates/objc2-event-kit/README.md create mode 120000 framework-crates/objc2-event-kit/src/generated create mode 100644 framework-crates/objc2-event-kit/src/lib.rs create mode 100644 framework-crates/objc2-exception-handling/Cargo.toml create mode 100644 framework-crates/objc2-exception-handling/README.md create mode 120000 framework-crates/objc2-exception-handling/src/generated create mode 100644 framework-crates/objc2-exception-handling/src/lib.rs create mode 100644 framework-crates/objc2-extension-kit/Cargo.toml create mode 100644 framework-crates/objc2-extension-kit/README.md create mode 120000 framework-crates/objc2-extension-kit/src/generated create mode 100644 framework-crates/objc2-extension-kit/src/lib.rs create mode 100644 framework-crates/objc2-external-accessory/Cargo.toml create mode 100644 framework-crates/objc2-external-accessory/README.md create mode 120000 framework-crates/objc2-external-accessory/src/generated create mode 100644 framework-crates/objc2-external-accessory/src/lib.rs create mode 100644 framework-crates/objc2-file-provider-ui/Cargo.toml create mode 100644 framework-crates/objc2-file-provider-ui/README.md create mode 120000 framework-crates/objc2-file-provider-ui/src/generated create mode 100644 framework-crates/objc2-file-provider-ui/src/lib.rs create mode 100644 framework-crates/objc2-file-provider/Cargo.toml create mode 100644 framework-crates/objc2-file-provider/README.md create mode 120000 framework-crates/objc2-file-provider/src/generated create mode 100644 framework-crates/objc2-file-provider/src/lib.rs create mode 100644 framework-crates/objc2-foundation/Cargo.modified.toml create mode 100644 framework-crates/objc2-foundation/Cargo.toml create mode 100644 framework-crates/objc2-foundation/README.md rename {crates/icrate => framework-crates/objc2-foundation}/examples/basic_usage.rs (91%) rename {crates/icrate => framework-crates/objc2-foundation}/examples/speech_synthesis.rs (98%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/__macro_helpers/cached.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/__macro_helpers/mod.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/__macro_helpers/ns_string.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/array.rs (92%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/attributed_string.rs (95%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/bundle.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/comparison_result.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/copying.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/data.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/decimal.rs (88%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/dictionary.rs (97%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/enumerator.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/error.rs (70%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/exception.rs (86%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/fast_enumeration_state.rs (100%) create mode 120000 framework-crates/objc2-foundation/src/generated rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/generics.rs (99%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/geometry.rs (96%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/iter.rs (100%) rename crates/icrate/src/additions/Foundation/mod.rs => framework-crates/objc2-foundation/src/lib.rs (59%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/macros/mod.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/macros/ns_string.rs (81%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/ns_consumed.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/number.rs (97%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/process_info.rs (94%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/range.rs (97%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/set.rs (89%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/string.rs (94%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/array.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/attributed_string.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/auto_traits.rs (99%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/bundle.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/copying.rs (89%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/data.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/dictionary.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/error.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/exception.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/lock.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/mod.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/mutable_array.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/mutable_data.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/mutable_dictionary.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/mutable_set.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/mutable_string.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/number.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/process_info.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/proxy.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/set.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/string.rs (99%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/thread.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/uuid.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/tests/value.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/thread.rs (97%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/to_owned.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/util.rs (100%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/uuid.rs (93%) rename {crates/icrate/src/additions/Foundation => framework-crates/objc2-foundation/src}/value.rs (98%) create mode 100644 framework-crates/objc2-game-controller/Cargo.toml create mode 100644 framework-crates/objc2-game-controller/README.md rename {crates/icrate/src/additions/GameController => framework-crates/objc2-game-controller/src}/extended_gamepad_snapshot.rs (95%) create mode 120000 framework-crates/objc2-game-controller/src/generated rename {crates/icrate/src/additions/GameController => framework-crates/objc2-game-controller/src}/input_names.rs (98%) create mode 100644 framework-crates/objc2-game-controller/src/lib.rs create mode 100644 framework-crates/objc2-game-kit/Cargo.toml create mode 100644 framework-crates/objc2-game-kit/README.md create mode 120000 framework-crates/objc2-game-kit/src/generated create mode 100644 framework-crates/objc2-game-kit/src/lib.rs create mode 100644 framework-crates/objc2-health-kit/Cargo.toml create mode 100644 framework-crates/objc2-health-kit/README.md create mode 120000 framework-crates/objc2-health-kit/src/generated create mode 100644 framework-crates/objc2-health-kit/src/lib.rs create mode 100644 framework-crates/objc2-identity-lookup/Cargo.toml create mode 100644 framework-crates/objc2-identity-lookup/README.md create mode 120000 framework-crates/objc2-identity-lookup/src/generated create mode 100644 framework-crates/objc2-identity-lookup/src/lib.rs create mode 100644 framework-crates/objc2-input-method-kit/Cargo.toml create mode 100644 framework-crates/objc2-input-method-kit/README.md create mode 120000 framework-crates/objc2-input-method-kit/src/generated rename crates/icrate/src/additions/InputMethodKit/mod.rs => framework-crates/objc2-input-method-kit/src/lib.rs (65%) create mode 100644 framework-crates/objc2-link-presentation/Cargo.toml create mode 100644 framework-crates/objc2-link-presentation/README.md create mode 120000 framework-crates/objc2-link-presentation/src/generated create mode 100644 framework-crates/objc2-link-presentation/src/lib.rs create mode 100644 framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml create mode 100644 framework-crates/objc2-local-authentication-embedded-ui/README.md create mode 120000 framework-crates/objc2-local-authentication-embedded-ui/src/generated create mode 100644 framework-crates/objc2-local-authentication-embedded-ui/src/lib.rs create mode 100644 framework-crates/objc2-local-authentication/Cargo.toml create mode 100644 framework-crates/objc2-local-authentication/README.md create mode 120000 framework-crates/objc2-local-authentication/src/generated create mode 100644 framework-crates/objc2-local-authentication/src/lib.rs create mode 100644 framework-crates/objc2-mail-kit/Cargo.toml create mode 100644 framework-crates/objc2-mail-kit/README.md create mode 120000 framework-crates/objc2-mail-kit/src/generated create mode 100644 framework-crates/objc2-mail-kit/src/lib.rs create mode 100644 framework-crates/objc2-map-kit/Cargo.toml create mode 100644 framework-crates/objc2-map-kit/README.md create mode 120000 framework-crates/objc2-map-kit/src/generated create mode 100644 framework-crates/objc2-map-kit/src/lib.rs create mode 100644 framework-crates/objc2-media-player/Cargo.toml create mode 100644 framework-crates/objc2-media-player/README.md create mode 120000 framework-crates/objc2-media-player/src/generated create mode 100644 framework-crates/objc2-media-player/src/lib.rs create mode 100644 framework-crates/objc2-metal-fx/Cargo.toml create mode 100644 framework-crates/objc2-metal-fx/README.md create mode 120000 framework-crates/objc2-metal-fx/src/generated create mode 100644 framework-crates/objc2-metal-fx/src/lib.rs create mode 100644 framework-crates/objc2-metal-kit/Cargo.toml create mode 100644 framework-crates/objc2-metal-kit/README.md create mode 120000 framework-crates/objc2-metal-kit/src/generated create mode 100644 framework-crates/objc2-metal-kit/src/lib.rs create mode 100644 framework-crates/objc2-metal/Cargo.modified.toml create mode 100644 framework-crates/objc2-metal/Cargo.toml create mode 100644 framework-crates/objc2-metal/README.md rename crates/icrate/examples/metal.rs => framework-crates/objc2-metal/examples/triangle.rs (94%) rename {crates/icrate/src/additions/Metal => framework-crates/objc2-metal/src}/capture.rs (98%) rename {crates/icrate/src/additions/Metal => framework-crates/objc2-metal/src}/device.rs (93%) create mode 120000 framework-crates/objc2-metal/src/generated rename crates/icrate/src/additions/Metal/mod.rs => framework-crates/objc2-metal/src/lib.rs (55%) rename {crates/icrate/src/additions/Metal => framework-crates/objc2-metal/src}/packed.rs (93%) rename {crates/icrate/src/additions/Metal => framework-crates/objc2-metal/src}/private.rs (83%) rename {crates/icrate/src/additions/Metal => framework-crates/objc2-metal/src}/resource.rs (100%) rename {crates/icrate/src/additions/Metal => framework-crates/objc2-metal/src}/slice.rs (98%) create mode 100644 framework-crates/objc2-metric-kit/Cargo.toml create mode 100644 framework-crates/objc2-metric-kit/README.md create mode 120000 framework-crates/objc2-metric-kit/src/generated create mode 100644 framework-crates/objc2-metric-kit/src/lib.rs rename {crates/icrate/src/additions/MetricKit => framework-crates/objc2-metric-kit/src}/manager.rs (51%) create mode 100644 framework-crates/objc2-osa-kit/Cargo.toml create mode 100644 framework-crates/objc2-osa-kit/README.md create mode 120000 framework-crates/objc2-osa-kit/src/generated create mode 100644 framework-crates/objc2-osa-kit/src/lib.rs create mode 100644 framework-crates/objc2-photos/Cargo.modified.toml create mode 100644 framework-crates/objc2-photos/Cargo.toml create mode 100644 framework-crates/objc2-photos/README.md create mode 120000 framework-crates/objc2-photos/src/generated create mode 100644 framework-crates/objc2-photos/src/lib.rs create mode 100644 framework-crates/objc2-quartz-core/Cargo.modified.toml create mode 100644 framework-crates/objc2-quartz-core/Cargo.toml create mode 100644 framework-crates/objc2-quartz-core/README.md create mode 120000 framework-crates/objc2-quartz-core/src/generated create mode 100644 framework-crates/objc2-quartz-core/src/lib.rs create mode 100644 framework-crates/objc2-service-management/Cargo.toml create mode 100644 framework-crates/objc2-service-management/README.md create mode 120000 framework-crates/objc2-service-management/src/generated create mode 100644 framework-crates/objc2-service-management/src/lib.rs create mode 100644 framework-crates/objc2-sound-analysis/Cargo.toml create mode 100644 framework-crates/objc2-sound-analysis/README.md create mode 120000 framework-crates/objc2-sound-analysis/src/generated create mode 100644 framework-crates/objc2-sound-analysis/src/lib.rs create mode 100644 framework-crates/objc2-speech/Cargo.toml create mode 100644 framework-crates/objc2-speech/README.md create mode 120000 framework-crates/objc2-speech/src/generated create mode 100644 framework-crates/objc2-speech/src/lib.rs create mode 100644 framework-crates/objc2-store-kit/Cargo.toml create mode 100644 framework-crates/objc2-store-kit/README.md create mode 120000 framework-crates/objc2-store-kit/src/generated create mode 100644 framework-crates/objc2-store-kit/src/lib.rs create mode 100644 framework-crates/objc2-uniform-type-identifiers/Cargo.toml create mode 100644 framework-crates/objc2-uniform-type-identifiers/README.md create mode 120000 framework-crates/objc2-uniform-type-identifiers/src/generated create mode 100644 framework-crates/objc2-uniform-type-identifiers/src/lib.rs create mode 100644 framework-crates/objc2-user-notifications/Cargo.toml create mode 100644 framework-crates/objc2-user-notifications/README.md create mode 120000 framework-crates/objc2-user-notifications/src/generated create mode 100644 framework-crates/objc2-user-notifications/src/lib.rs create mode 100644 framework-crates/objc2-web-kit/Cargo.modified.toml create mode 100644 framework-crates/objc2-web-kit/Cargo.toml create mode 100644 framework-crates/objc2-web-kit/README.md rename {crates/icrate => framework-crates/objc2-web-kit}/examples/browser.rs (94%) create mode 120000 framework-crates/objc2-web-kit/src/generated create mode 100644 framework-crates/objc2-web-kit/src/lib.rs create mode 160000 generated diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1639db895..a1356c7e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,20 +39,30 @@ env: # This excludes `header-translator`, `test-assembly`, `tests` and `test-ui`. PUBLIC_CRATES: >- --package=block2 - --package=icrate --package=objc-sys --package=objc2 --package=objc2-encode --package=objc2-proc-macros + + # BEGIN AUTOMATICALLY GENERATED + FRAMEWORKS_MACOS_10_12: --package=objc2-app-kit --package=objc2-automator --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-osa-kit --package=objc2-quartz-core --package=objc2-service-management --package=objc2-store-kit --package=objc2-web-kit + FRAMEWORKS_MACOS_10_13: --package=objc2-app-kit --package=objc2-automator --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-external-accessory --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-osa-kit --package=objc2-quartz-core --package=objc2-service-management --package=objc2-store-kit --package=objc2-web-kit + FRAMEWORKS_MACOS_11: --package=objc2-accessibility --package=objc2-ad-support --package=objc2-app-kit --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-business-chat --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-location --package=objc2-core-wlan --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --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-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-osa-kit --package=objc2-photos --package=objc2-quartz-core --package=objc2-service-management --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-web-kit + FRAMEWORKS_MACOS_12: --package=objc2-accessibility --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-business-chat --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-location --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --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-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-osa-kit --package=objc2-photos --package=objc2-quartz-core --package=objc2-service-management --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-web-kit + FRAMEWORKS_MACOS_13: --package=objc2-accessibility --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-background-assets --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-location --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --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-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-osa-kit --package=objc2-photos --package=objc2-quartz-core --package=objc2-service-management --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-web-kit + FRAMEWORKS_MACOS_14: --package=objc2-accessibility --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-background-assets --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-location --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --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-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-osa-kit --package=objc2-photos --package=objc2-quartz-core --package=objc2-service-management --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-web-kit + FRAMEWORKS_IOS_10: --package=objc2-foundation --package=objc2-metal + FRAMEWORKS_GNUSTEP: --package=objc2-app-kit --package=objc2-core-data --package=objc2-foundation + # END AUTOMATICALLY GENERATED + # The current nightly Rust version. Keep this synced with `rust-toolchain.toml` CURRENT_NIGHTLY: nightly-2024-03-13 # Various features that we'd usually want to test with # # Note: The `exception` feature is not enabled here, since it requires # compiling C code, even if just running a `check`/`clippy` build. - INTERESTING_FEATURES: malloc,block,unstable-private - UNSTABLE_FEATURES: unstable-autoreleasesafe,unstable-c-unwind - LATEST_MACOS_FEATURE: unstable-frameworks-macos-14 + INTERESTING_FEATURES: --features=malloc,block2,unstable-private,all + UNSTABLE_FEATURES: --features=unstable-autoreleasesafe,unstable-c-unwind # Required when we want to use a different runtime than the default `apple` OTHER_RUNTIME: --no-default-features --features=std # https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci @@ -96,27 +106,14 @@ jobs: include: - name: macOS 64bit target: aarch64-apple-darwin - # Ideally this would use $LATEST_MACOS_FEATURE, but this causes clippy to - # use too much memory for the CI runner - args: >- - $PUBLIC_CRATES - --features=$INTERESTING_FEATURES - --features=unstable-frameworks-macos-12 + args: $PUBLIC_CRATES $FRAMEWORKS_MACOS_14 $INTERESTING_FEATURES - name: iOS 32bit target: armv7s-apple-ios build-std: true - args: >- - -Zbuild-std - $PUBLIC_CRATES - --features=$INTERESTING_FEATURES - --features=unstable-frameworks-ios + args: $PUBLIC_CRATES $FRAMEWORKS_IOS_10 $INTERESTING_FEATURES -Zbuild-std - name: GNUStep + exceptions target: x86_64-unknown-linux-gnu - args: >- - $PUBLIC_CRATES - $OTHER_RUNTIME --features=gnustep-1-9 - --features=$INTERESTING_FEATURES,catch-all - --features=AppKit_all,Foundation_all + args: $PUBLIC_CRATES $FRAMEWORKS_GNUSTEP $INTERESTING_FEATURES $OTHER_RUNTIME --features=gnustep-1-9,catch-all - name: header-translator target: x86_64-unknown-linux-gnu args: -pheader-translator @@ -187,11 +184,7 @@ jobs: key: cargo-${{ github.job }}-${{ matrix.name }}-${{ hashFiles('**/Cargo.lock') }} - name: cargo check - run: >- - cargo check - $PUBLIC_CRATES - --features=$INTERESTING_FEATURES - --features=$LATEST_MACOS_FEATURE + run: cargo check $PUBLIC_CRATES $FRAMEWORKS_MACOS_14 $INTERESTING_FEATURES env: RUSTFLAGS: "--codegen=debuginfo=0" # Removed --deny=warnings @@ -301,11 +294,11 @@ jobs: - name: Verify that no files changed run: git diff --exit-code --submodule=diff - check-icrate-features: + check-framework-features: # if: ${{ env.FULL }} # This will take ~40 minutes if: ${{ github.head_ref == 'new-versions' || github.ref_name == 'ci-full' }} - name: Check icrate features + name: Check framework features runs-on: macos-12 needs: - fmt @@ -325,8 +318,8 @@ jobs: path: ${{ env.CARGO_CACHE_PATH }} key: cargo-${{ github.job }}-${{ matrix.name }}-${{ hashFiles('**/Cargo.lock') }} - - name: Check `icrate` with each feature enabled separately - run: cargo run --bin=check_icrate_features + - name: Check frameworks with each feature enabled separately + run: cargo run --bin=check_framework_features test-macos: name: Test macOS 12 @@ -359,7 +352,7 @@ jobs: run: cargo test $ARGS $PUBLIC_CRATES -ptests - name: Test all frameworks - run: cargo test $ARGS $PUBLIC_CRATES -ptests --features=$INTERESTING_FEATURES,unstable-frameworks-macos-12 + run: cargo test $ARGS $PUBLIC_CRATES $FRAMEWORKS_MACOS_10_12 -ptests $INTERESTING_FEATURES test-apple: # if: ${{ env.FULL }} @@ -378,43 +371,43 @@ jobs: include: - name: Test macOS 13 os: macos-13 - frameworks: macos-13 + frameworks: MACOS_13 - name: Test macOS 11 os: macos-11 - frameworks: macos-11 + frameworks: MACOS_11 - name: Build macOS AArch64 target: aarch64-apple-darwin - frameworks: macos-11 + frameworks: MACOS_11 - name: Test macOS old SDK # Oldest macOS version we support sdk: "10.12" - frameworks: macos-10-12 + frameworks: MACOS_10_12 - name: Test macOS nightly nightly: true - frameworks: macos-11 + frameworks: MACOS_11 - name: Build macOS 32bit target: i686-apple-darwin nightly: true build-std: true # Newest SDK that supports 32-bit sdk: "10.13" - frameworks: macos-10-13 + frameworks: MACOS_10_13 - name: Build iOS simulator ARM64 target: aarch64-apple-ios-sim - frameworks: ios + frameworks: IOS_10 - name: Build iOS ARM64 target: aarch64-apple-ios - frameworks: ios + frameworks: IOS_10 - name: Build iOS ARMv7s target: armv7s-apple-ios nightly: true build-std: true - frameworks: ios + frameworks: IOS_10 - name: Build iOS 32bit x86 target: i386-apple-ios nightly: true build-std: true - frameworks: ios + frameworks: IOS_10 env: CARGO_BUILD_TARGET: ${{ matrix.target || 'x86_64-apple-darwin' }} @@ -485,34 +478,26 @@ jobs: run: cargo test $ARGS $PUBLIC_CRATES -ptests - name: Test Foundation - run: >- - cargo test $ARGS $PUBLIC_CRATES -ptests - --features=$INTERESTING_FEATURES,Foundation_all + run: cargo test $ARGS $PUBLIC_CRATES -ptests $INTERESTING_FEATURES -pobjc2-foundation - name: Test all frameworks - run: >- - cargo test $ARGS $PUBLIC_CRATES -ptests - --features=$INTERESTING_FEATURES,catch-all,unstable-frameworks-${{ matrix.frameworks }} + run: cargo test $ARGS $PUBLIC_CRATES -ptests $INTERESTING_FEATURES --features=catch-all $FRAMEWORKS_${{ matrix.frameworks }} - - name: Test in release mode - run: >- - cargo test $ARGS $PUBLIC_CRATES -ptests - --features=$INTERESTING_FEATURES,catch-all,Foundation_all --release + - name: Test Foundation in release mode + run: cargo test $ARGS $PUBLIC_CRATES -ptests $INTERESTING_FEATURES -pobjc2-foundation --features=catch-all --release - - name: Test with unstable features + - name: Test Foundation with unstable features if: ${{ matrix.nightly }} - run: >- - cargo test $ARGS $PUBLIC_CRATES -ptests - --features=$INTERESTING_FEATURES,catch-all,Foundation_all,$UNSTABLE_FEATURES + run: cargo test $ARGS $PUBLIC_CRATES -ptests $INTERESTING_FEATURES -pobjc2-foundation --features=catch-all $UNSTABLE_FEATURES # TODO: Re-enable this on all of Foundation once we do some form of # availability checking. - name: Test static class and selectors - if: ${{ !contains(matrix.frameworks, 'ios') && !contains(matrix.frameworks, 'macos-10-12') }} + if: ${{ !contains(matrix.frameworks, 'IOS') && !contains(matrix.frameworks, 'MACOS_10_12') }} run: >- - cargo test $ARGS $PUBLIC_CRATES -ptests + cargo test $ARGS $PUBLIC_CRATES -ptests -pobjc2-foundation --features=unstable-static-sel,unstable-static-class,unstable-static-nsstring - --features=Foundation,Foundation_NSString + --features=Foundation_NSString test-ios: # if: ${{ env.FULL }} @@ -561,11 +546,7 @@ jobs: echo "SIM_ID=$SIM_ID" >> $GITHUB_ENV - name: Test - run: >- - cargo-dinghy --device=$SIM_ID test - $PUBLIC_CRATES -ptests - --features=$INTERESTING_FEATURES,catch-all - --features=unstable-frameworks-ios + run: cargo-dinghy --device=$SIM_ID test $PUBLIC_CRATES $FRAMEWORKS_IOS_10 -ptests $INTERESTING_FEATURES --features=catch-all test-gnustep: name: ${{ matrix.name }} @@ -759,16 +740,16 @@ jobs: run: cargo install cargo-fuzz --version=^0.11.2 - name: Test Foundation - run: cargo test $ARGS --features=$INTERESTING_FEATURES,catch-all,Foundation_all + run: cargo test $ARGS $PUBLIC_CRATES $INTERESTING_FEATURES -ptests -pobjc2-foundation --features=catch-all - name: Test all frameworks if: ${{ env.FULL && matrix.target == 'x86_64-unknown-linux-gnu' }} - run: cargo test $ARGS --features=$INTERESTING_FEATURES,catch-all,Foundation_all,AppKit_all + run: cargo test $ARGS $PUBLIC_CRATES $INTERESTING_FEATURES -ptests $FRAMEWORKS_GNUSTEP --features=catch-all - name: Test in release mode # Disabled on GNUStep 2.1 for now if: ${{ env.FULL && matrix.runtime != 'gnustep-2-1' }} - run: cargo test $ARGS --features=Foundation_all --release + run: cargo test $ARGS $PUBLIC_CRATES -pobjc2-foundation --release - name: Run fuzzing if: ${{ matrix.fuzz }} @@ -796,7 +777,7 @@ jobs: - name: Test with unstable features if: ${{ env.FULL && matrix.nightly }} - run: cargo test $ARGS --features=$INTERESTING_FEATURES,catch-all,Foundation_all,$UNSTABLE_FEATURES + run: cargo test $ARGS $PUBLIC_CRATES $INTERESTING_FEATURES -pobjc2-foundation --features=catch-all $UNSTABLE_FEATURES test-compiler-rt: name: Test Compiler-RT diff --git a/.gitmodules b/.gitmodules index 8a3e27f47..ef468d74c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "crates/icrate/src/generated"] - path = crates/icrate/src/generated - url = https://github.com/madsmtm/icrate-generated.git +[submodule "generated"] + path = generated + url = https://github.com/madsmtm/objc2-generated.git # We recommend a shallow clone here since there are a lot of generated # files in history, and I suspect most contributors won't need to look at # the history of these. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5e862bf3..04f43eb21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,12 +3,21 @@ Thank you for your interest in contributing! There are many ways to contribute and we appreciate all of them. +## A note for Windows users + +This repository relies heavily on symlinks, so make sure that your system is +set up to enable those (see [this StackOverflow answer][so-symlink] for +details on how to do that). + +[so-symlink]: https://stackoverflow.com/a/59761201/5203369 + + ## `git` submodules -The `icrate` crate contains a submodule pointing to -[`madsmtm/icrate-generated`]. This exists to keep the primary repository free -from the clutter inherently associated with storing generated files in `git`, -while still allowing change-tracking of said files. +The framework crates uses a submodule pointing to [`madsmtm/objc2-generated`]. +This exists to keep the primary repository free from the clutter inherently +associated with storing generated files in `git`, while still allowing +change-tracking of said files. You should consider whether you want a shallow or a full checkout of the generated files - the default is to do a shallow clone, since the repository @@ -28,7 +37,7 @@ See the excellent `git` [documentation on submodules][submodule-docs], or the manpage for [`git-submodule`] for further details on how submodules work. -[`madsmtm/icrate-generated`]: https://github.com/madsmtm/icrate-generated +[`madsmtm/objc2-generated`]: https://github.com/madsmtm/objc2-generated [submodule-docs]: https://git-scm.com/docs/gitsubmodules [`git-submodule`]: https://git-scm.com/docs/git-submodule @@ -36,7 +45,7 @@ manpage for [`git-submodule`] for further details on how submodules work. ### Updating the `git` submodule When making changes to `header-translator`, you must update the `git` -submodule manually and push your changes to a fork of `icrate-generated` (you +submodule manually and push your changes to a fork of `objc2-generated` (you do not need to submit a PR to that repo). We try to maintain a linear history in that repo, in a fashion such that every @@ -61,7 +70,7 @@ Copy and fill out the following checklist into the release PR: - `objc2-encode` - `objc2` - `block2` - - `icrate` + - Framework crates - Local tests have been run (see `helper-scripts/test-local.fish`): - [ ] macOS 10.14.6 32bit - [ ] iOS 9.3.6, 1st generation iPad Mini diff --git a/Cargo.lock b/Cargo.lock index 1a79cbe0a..0b280a58d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,12 +130,24 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "glob" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "header-translator" version = "0.1.0" @@ -150,6 +162,7 @@ dependencies = [ "semver", "serde", "syn", + "toml_edit", "tracing", "tracing-subscriber", "tracing-tree", @@ -179,13 +192,13 @@ dependencies = [ ] [[package]] -name = "icrate" -version = "0.1.0" +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "block2", - "dispatch", - "objc2", - "static_assertions", + "equivalent", + "hashbrown", ] [[package]] @@ -315,14 +328,500 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "objc2-accessibility" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ad-services" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ad-support" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-core-data", + "objc2-foundation", +] + +[[package]] +name = "objc2-authentication-services" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-automatic-assessment-configuration" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-automator" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-osa-kit", +] + +[[package]] +name = "objc2-background-assets" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-background-tasks" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-business-chat" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-call-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-class-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-wlan" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-data-detection" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-device-check" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + [[package]] name = "objc2-encode" version = "4.0.0" +[[package]] +name = "objc2-event-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-location", + "objc2-foundation", + "objc2-map-kit", +] + +[[package]] +name = "objc2-exception-handling" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-extension-kit" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-external-accessory" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-file-provider" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-uniform-type-identifiers", +] + +[[package]] +name = "objc2-file-provider-ui" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-file-provider", + "objc2-foundation", +] + +[[package]] +name = "objc2-foundation" +version = "0.2.0" +dependencies = [ + "block2", + "dispatch", + "objc2", + "static_assertions", +] + +[[package]] +name = "objc2-game-controller" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-game-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-health-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", + "objc2-uniform-type-identifiers", +] + +[[package]] +name = "objc2-identity-lookup" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-input-method-kit" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-local-authentication" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-local-authentication-embedded-ui" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-local-authentication", +] + +[[package]] +name = "objc2-mail-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-map-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-contacts", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-media-player" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-metal-kit", +] + +[[package]] +name = "objc2-metal-fx" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-metal-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-metric-kit" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-osa-kit" +version = "0.2.0" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-photos" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-location", + "objc2-foundation", + "objc2-uniform-type-identifiers", +] + [[package]] name = "objc2-proc-macros" version = "0.1.1" +[[package]] +name = "objc2-quartz-core" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-service-management" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-sound-analysis" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-speech" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-store-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.2.0" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + [[package]] name = "once_cell" version = "1.19.0" @@ -501,9 +1000,9 @@ dependencies = [ name = "test-fuzz" version = "0.0.0" dependencies = [ - "icrate", "libfuzzer-sys", "objc2", + "objc2-foundation", ] [[package]] @@ -511,8 +1010,8 @@ name = "test-ui" version = "0.1.0" dependencies = [ "block2", - "icrate", "objc2", + "objc2-foundation", "trybuild", ] @@ -534,8 +1033,8 @@ dependencies = [ name = "test_declare_class" version = "0.1.0" dependencies = [ - "icrate", "objc2", + "objc2-foundation", ] [[package]] @@ -563,8 +1062,8 @@ dependencies = [ name = "test_fast_enumeration" version = "0.1.0" dependencies = [ - "icrate", "objc2", + "objc2-foundation", ] [[package]] @@ -599,7 +1098,7 @@ dependencies = [ name = "test_ns_string" version = "0.1.0" dependencies = [ - "icrate", + "objc2-foundation", ] [[package]] @@ -636,9 +1135,9 @@ version = "0.1.0" dependencies = [ "block2", "cc", - "icrate", "objc-sys", "objc2", + "objc2-foundation", "paste", ] @@ -672,6 +1171,23 @@ dependencies = [ "once_cell", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + [[package]] name = "tracing" version = "0.1.40" @@ -854,3 +1370,12 @@ name = "windows_x86_64_msvc" version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +dependencies = [ + "memchr", +] diff --git a/Cargo.toml b/Cargo.toml index b0acbc909..69e2fad7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "crates/*", + "framework-crates/*", "crates/test-assembly/crates/*", ] resolver = "2" diff --git a/README.md b/README.md index 5c15da841..d6910e921 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,17 @@ [![License](https://badgen.net/badge/license/MIT/blue)](./LICENSE.txt) [![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml) -The three crates you're interested in is probably: -- [`icrate`], which provides an autogenerated interfaces to Apple's - Objective-C frameworks (`AppKit`, `Foundation`, `Metal`, `WebKit`, you name - it, we [aim to have it](https://github.com/madsmtm/objc2/issues/393)). +The crates you're interested in is probably: - [`objc2`], which provides bi-directional interop between Rust and Objective-C, including support for defining Objective-C classes in Rust. +- [`objc2-*`] crates, which provides an autogenerated interfaces to Apple's + Objective-C frameworks (`AppKit`, `Foundation`, `Metal`, `WebKit`, you name + it, we [aim to have it](https://github.com/madsmtm/objc2/issues/393)). - [`block2`], which provides bindings for Apple's C blocks, the C-equivalent of a Rust closure. -[`icrate`]: ./crates/icrate [`objc2`]: ./crates/objc2 +[`objc2-*`]: ./framework-crates [`block2`]: ./crates/block2 @@ -72,10 +72,10 @@ act against being ergonomic. Some APIs in `objc2` and `block2` will still have to remain `unsafe`, so these contain thorough `# Safety` sections, to let you know exactly which safety guarantees you need to uphold. -`icrate` is a bit difficult in this regard, since it is mostly autogenerated, -which means that almost nothing can be safe by default! However, we can still -try to mitigate this problem by marking manually audited functionality as -safe (which we [need your help with][header-data]). +The framework crates are a bit difficult in this regard, since they are mostly +autogenerated, which means that almost nothing can be safe by default! +However, we can still try to mitigate this problem by marking manually audited +functionality as safe (which we [need your help with][header-data]). [header-data]: ./crates/header-translator/src/data/README.md @@ -93,9 +93,9 @@ Help us define a policy over in [#203]. ## Migrating from `objc` and family If size of your project is fairly small, it'll probably be easiest to just -jump straight into replacing everything with `icrate` (when you do, don't -forget to [mark `unsafe` methods that you use as safe][header-data] along the -way). +jump straight into replacing everything to use the framework crates (when you +do, don't forget to [mark `unsafe` methods that you use as safe][header-data] +along the way). If your project is large, you can consider upgrading in small steps, following the changelog at each step of the way. For the most common cases, the @@ -137,7 +137,7 @@ fork [here](https://github.com/SSheldon/rust-objc/issues/101): - [`objc_id`](https://github.com/SSheldon/rust-objc-id) - Moved to `objc2::rc`. - [`objc-foundation`](https://github.com/SSheldon/rust-objc-foundation) - - Moved to `icrate::Foundation`. + - Renamed to `objc2-foundation`. - [`block`](https://github.com/SSheldon/rust-block) - Renamed to `block2`. diff --git a/crates/block2/Cargo.toml b/crates/block2/Cargo.toml index 56c7ad66b..58a615be6 100644 --- a/crates/block2/Cargo.toml +++ b/crates/block2/Cargo.toml @@ -57,20 +57,16 @@ unstable-docsrs = [] objc2 = { path = "../objc2", version = "0.5.0", default-features = false } [package.metadata.docs.rs] -default-target = "x86_64-apple-darwin" +default-target = "aarch64-apple-darwin" features = ["unstable-docsrs", "unstable-private"] targets = [ - # MacOS - "x86_64-apple-darwin", "aarch64-apple-darwin", - # "i686-apple-darwin", - # iOS + "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios", - # "i386-apple-ios", - # GNUStep + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", "x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", - # Windows - "x86_64-pc-windows-msvc", ] diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index 1e0f4be7c..7b3ca30f2 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -11,6 +11,7 @@ license = "Zlib OR Apache-2.0 OR MIT" # https://github.com/KyleMayes/clang-rs/pull/58 clang = { git = "https://github.com/madsmtm/clang-rs.git", branch = "fix-ub-tokenize", features = ["runtime", "clang_10_0"] } clang-sys = { version = "1.4.0" } +toml_edit = "0.22.9" basic-toml = "0.1.2" serde = { version = "1.0.144", features = ["derive"] } apple-sdk = { version = "0.5.1", default-features = false } diff --git a/crates/header-translator/README.md b/crates/header-translator/README.md index 392f1c013..e6f96828d 100644 --- a/crates/header-translator/README.md +++ b/crates/header-translator/README.md @@ -1,6 +1,6 @@ # Objective-C header translator -For use in making `icrate`. Run using: +For use in making framework crates. Run using: ```console cargo run --bin header-translator @@ -9,7 +9,7 @@ cargo run --bin header-translator ## SDKs -Make sure you have the same XCode version installed as the one documented in [`crates/icrate/README.md`](../icrate/README.md). +Make sure you have the same XCode version installed as the one documented in [`crates/objc2/src/topics/about_generated/README.md`](../objc2/src/topics/about_generated/README.md). If you use a different operating system than macOS, or have multiple SDKs installed, you can specify the directory as the first argument: @@ -28,12 +28,12 @@ cargo run --bin header-translator -- /Applications/Xcode_new.app/Contents/Develo We do not redistribute SDKs, to hopefully avoid a license violation. You should download XCode (which contain the SDKs) yourself from [Apple's website](https://developer.apple.com/download/all/?q=xcode) (requires an Apple ID). -## Test `icrate`'s feature setup +## Test feature setup `header-translator` emits a bunch of features to conditionally enable classes. -If you're working on improving this, you should run the `check_icrate_features` tool to (somewhat) ensure that your changes still compile. +If you're working on improving this, you should run the `check_framework_features` tool to (somewhat) ensure that your changes still compile. ```console -cargo run --bin=check_icrate_features +cargo run --bin check_framework_features ``` diff --git a/crates/header-translator/src/bin/check_framework_features.rs b/crates/header-translator/src/bin/check_framework_features.rs new file mode 100644 index 000000000..63bd61d71 --- /dev/null +++ b/crates/header-translator/src/bin/check_framework_features.rs @@ -0,0 +1,124 @@ +//! Utility for testing frameworks' features. +use std::collections::BTreeMap; +use std::error::Error; +use std::fs; +use std::path::Path; +use std::process::Command; + +use serde::Deserialize; + +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] +struct CargoToml { + features: BTreeMap>, +} + +const POPULAR_FOUNDATION_FEATURES: &[&str] = &[ + "Foundation_NSString", + "Foundation_NSArray", + "Foundation_NSDictionary", + "Foundation_NSSet", + "Foundation_NSEnumerator", + "Foundation_NSError", + "Foundation_NSException", + "Foundation_NSValue", + "Foundation_NSThread", +]; + +fn get_pairs<'a>(items: &'a [&'a str]) -> impl Iterator + 'a { + items + .iter() + .enumerate() + .flat_map(|(i, &item1)| items[i..].iter().map(move |&item2| (item1, item2))) +} + +fn get_features(cargo_toml: &Path) -> Result, Box> { + let cargo_toml = fs::read_to_string(cargo_toml)?; + let CargoToml { features } = basic_toml::from_str(&cargo_toml)?; + + // Skip GNUStep-related and "all" features + Ok(features + .into_keys() + .filter(|feature| { + !feature.contains("gnustep") && feature != "all" && feature != "unstable-docsrs" + }) + .collect()) +} + +fn test_feature_sets<'a>( + success: &mut bool, + workspace_dir: &Path, + feature_sets: impl IntoIterator>, + package: &str, +) -> Result<(), Box> { + for features in feature_sets { + println!("running: cargo check --features={}", features.join(",")); + + let status = Command::new("cargo") + .current_dir(workspace_dir) + .args([ + "check", + "--quiet", + "--package", + package, + "--features", + &features.join(","), + ]) + .status()?; + + if !status.success() { + *success = false; + } + } + + Ok(()) +} + +fn main() -> Result<(), Box> { + let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); + let workspace_dir = manifest_dir.parent().unwrap().parent().unwrap(); + + let mut success = true; + + println!("Testing all Foundation features"); + let features = get_features( + &workspace_dir + .join("framework-crates") + .join("objc2-foundation") + .join("Cargo.toml"), + )?; + let feature_sets = get_pairs(POPULAR_FOUNDATION_FEATURES) + .map(|(feature1, feature2)| vec![feature1, feature2]) + .chain(features.iter().map(|feature| vec![&**feature])); + test_feature_sets( + &mut success, + workspace_dir, + feature_sets, + "objc2-foundation", + )?; + + println!("Testing all AppKit features"); + let features = get_features( + &workspace_dir + .join("framework-crates") + .join("objc2-app-kit") + .join("Cargo.toml"), + )?; + let feature_sets = features.iter().map(|feature| vec![&**feature]); + test_feature_sets(&mut success, workspace_dir, feature_sets, "objc2-app-kit")?; + + println!("Testing all Metal features"); + let features = get_features( + &workspace_dir + .join("framework-crates") + .join("objc2-metal") + .join("Cargo.toml"), + )?; + let feature_sets = features.iter().map(|feature| vec![&**feature]); + test_feature_sets(&mut success, workspace_dir, feature_sets, "objc2-metal")?; + + if !success { + panic!("one or more checks failed"); + } + + Ok(()) +} diff --git a/crates/header-translator/src/bin/check_icrate_features.rs b/crates/header-translator/src/bin/check_icrate_features.rs deleted file mode 100644 index 2d5af6081..000000000 --- a/crates/header-translator/src/bin/check_icrate_features.rs +++ /dev/null @@ -1,96 +0,0 @@ -//! Utility for testing `icrate`'s feature set -use std::collections::BTreeMap; -use std::error::Error; -use std::fs; -use std::path::Path; -use std::process::Command; - -use serde::Deserialize; - -#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] -struct CargoToml { - features: BTreeMap>, -} - -const POPULAR_FEATURES: &[&str] = &[ - "Foundation_NSString", - "Foundation_NSArray", - "Foundation_NSDictionary", - "Foundation_NSSet", - "Foundation_NSEnumerator", - "Foundation_NSError", - "Foundation_NSException", - "Foundation_NSValue", - "Foundation_NSThread", -]; - -fn get_pairs<'a>(items: &'a [&'a str]) -> impl Iterator + 'a { - items - .iter() - .enumerate() - .flat_map(|(i, &item1)| items[i..].iter().map(move |&item2| (item1, item2))) -} - -fn main() -> Result<(), Box> { - let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); - let crates_dir = manifest_dir.parent().unwrap(); - let cargo_toml = fs::read_to_string(crates_dir.join("icrate").join("Cargo.toml"))?; - - let CargoToml { features } = basic_toml::from_str(&cargo_toml)?; - - println!("Testing all Foundation features in `icrate`"); - - let feature_sets = get_pairs(POPULAR_FEATURES) - .map(|(feature1, feature2)| vec![feature1, feature2]) - .chain(features.keys().filter_map(|feature| { - #[allow(clippy::if_same_then_else)] - if feature.contains("gnustep") { - // Skip GNUStep-related features - None - } else if feature.contains("_all") || feature.contains("unstable-frameworks-") { - // Skip "_all" features for now - None - } else if !feature.contains("Foundation") - && !feature.contains("AppKit") - && !feature.contains("Metal") - { - // Skip all other than "Foundation", "AppKit" and "Metal" features for now - None - } else { - Some(vec![&**feature]) - } - })); - - let mut success = true; - - for features in feature_sets { - println!( - "running: cargo check --features=Foundation,AppKit,Metal,{}", - features.join(",") - ); - - let status = Command::new("cargo") - .args([ - "check", - "--quiet", - "--package=icrate", - "--features=Foundation", - "--features=AppKit", - "--features=Metal", - "--features", - &features.join(","), - ]) - .current_dir(crates_dir) - .status()?; - - if !status.success() { - success = false; - } - } - - if !success { - panic!("one or more checks failed"); - } - - Ok(()) -} diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index b8cf3d843..f867c97ad 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -1,4 +1,4 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::{BTreeMap, HashMap, HashSet}; use std::error::Error; use std::fmt; use std::fs; @@ -36,7 +36,7 @@ pub struct Config { pub typedef_data: HashMap, #[serde(rename = "library")] #[serde(default)] - pub libraries: HashMap, + pub libraries: BTreeMap, } impl Config { @@ -85,13 +85,20 @@ fn get_version<'de, D: serde::Deserializer<'de>>( #[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] #[serde(deny_unknown_fields)] pub struct LibraryData { - pub imports: Vec, - #[serde(rename = "cfg-apple-link")] - #[serde(default)] - pub cfg_apple_link: bool, - #[serde(rename = "extra-features")] - #[serde(default)] - pub extra_features: Vec, + #[serde(rename = "crate")] + pub krate: String, + /// Dependencies are optional by default, this can be used to make a + /// dependency required. + /// + /// This is used when depending on `objc2-foundation`, as we don't really + /// want a feature for something as fundamental as `NSString`. + /// Additionally, it is used for things like `MetalKit` always wanting + /// `Metal` enabled. + #[serde(rename = "required-dependencies")] + pub required_dependencies: HashSet, + #[serde(rename = "custom-lib-rs")] + #[serde(default)] + pub custom_lib_rs: bool, #[serde(default)] #[serde(deserialize_with = "get_version")] pub macos: Option, @@ -110,6 +117,8 @@ pub struct LibraryData { #[serde(default)] #[serde(deserialize_with = "get_version")] pub visionos: Option, + #[serde(default)] + pub gnustep: bool, } #[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] @@ -255,10 +264,18 @@ impl Config { pub fn from_file(file: &Path) -> Result> { let s = fs::read_to_string(file)?; - let mut this = basic_toml::from_str(&s)?; + let mut config: Self = basic_toml::from_str(&s)?; + + for (name, data) in &config.libraries { + assert_eq!( + name.to_lowercase(), + data.krate.replace("objc2-", "").replace('-', ""), + "crate name had an unexpected format", + ); + } - data::apply_tweaks(&mut this); + data::apply_tweaks(&mut config); - Ok(this) + Ok(config) } } diff --git a/crates/header-translator/src/data/README.md b/crates/header-translator/src/data/README.md index d619b133d..624b4dd53 100644 --- a/crates/header-translator/src/data/README.md +++ b/crates/header-translator/src/data/README.md @@ -31,8 +31,8 @@ specific API! 4. Beware of `Mutable` classes (e.g. `NSMutableString`); these usually need to be passed as `&mut T`, or operate on `&mut self`. -Note: It is _not_ considered a breaking change in `icrate` for a method to be -marked safe, so such an improvement can be made in a minor version! +Note: It is _not_ considered a breaking change for a method to be marked safe, +so such an improvement can be made in a minor version! [#359]: https://github.com/madsmtm/objc2/pull/359 diff --git a/crates/header-translator/src/default_cargo.toml b/crates/header-translator/src/default_cargo.toml new file mode 100644 index 000000000..be75969ac --- /dev/null +++ b/crates/header-translator/src/default_cargo.toml @@ -0,0 +1,40 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "UNSET" +version = "UNSET" # Remember to update html_root_url in lib.rs +description = "UNSET" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } + +[package.metadata.docs.rs] +default-target = "UNSET" +features = ["all", "unstable-docsrs"] +targets = [ +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] diff --git a/crates/header-translator/src/file.rs b/crates/header-translator/src/file.rs index ad1ff881b..b35527787 100644 --- a/crates/header-translator/src/file.rs +++ b/crates/header-translator/src/file.rs @@ -1,12 +1,14 @@ +use std::collections::BTreeSet; use std::fmt; -use crate::context::Context; +use crate::display_helper::FormatterFn; +use crate::id::Feature; use crate::stmt::Stmt; +use crate::Config; #[derive(Debug, PartialEq)] pub struct File { library_name: String, - imports: Vec, pub(crate) stmts: Vec, } @@ -16,15 +18,9 @@ pub(crate) fn clean_name(name: &str) -> String { } impl File { - pub fn new(library_name: &str, context: &Context<'_>) -> Self { + pub fn new(library_name: &str) -> Self { Self { library_name: library_name.to_string(), - imports: context - .libraries - .get(library_name) - .expect("library exists on config") - .imports - .clone(), stmts: Vec::new(), } } @@ -32,28 +28,89 @@ impl File { pub fn add_stmt(&mut self, stmt: Stmt) { self.stmts.push(stmt); } -} - -impl fmt::Display for File { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - writeln!( - f, - "//! This file has been automatically generated by `objc2`'s `header-translator`." - )?; - writeln!(f, "//! DO NOT EDIT")?; - - writeln!(f, "use crate::common::*;")?; - writeln!(f, "use crate::{}::*;", self.library_name)?; - for import in &self.imports { - writeln!(f, "use crate::{import}::*;")?; - } - writeln!(f)?; + pub fn crates<'c>(&self, config: &'c Config) -> BTreeSet<&'c str> { + self.stmts + .iter() + .flat_map(|stmt| stmt.required_items_inner()) + .filter(|item| item.location().library != self.library_name) + // Ignore crate imports for required items from unknown crates + .filter_map(|item| item.location().krate(config)) + .collect() + } + pub fn required_features(&self, config: &Config) -> BTreeSet { + let mut required_features = BTreeSet::new(); for stmt in &self.stmts { - writeln!(f, "{stmt}")?; + for required_item in stmt.required_items_inner() { + let location = required_item.location(); + if location.library != self.library_name { + if let Some(krate) = location.krate(config) { + let required = config.libraries[&self.library_name] + .required_dependencies + .contains(krate); + match location.feature(config, location) { + Some(Feature::Dependency(_)) => {} + Some(Feature::Feature(feature_name)) => { + required_features.insert(format!( + "{krate}{}/{feature_name}", + if required { "" } else { "?" } + )); + } + None => {} + } + } else { + debug!( + ?required_item, + item = ?stmt.provided_item(), + "failed getting crate name", + ); + } + } + } } - Ok(()) + required_features + } + + pub fn contents<'a>(&'a self, config: &'a Config) -> impl fmt::Display + 'a { + FormatterFn(move |f| { + writeln!( + f, + "//! This file has been automatically generated by `objc2`'s `header-translator`." + )?; + writeln!(f, "//! DO NOT EDIT")?; + + writeln!(f, "use objc2::__framework_prelude::*;")?; + + let mut crates = self.crates(config); + // TODO: Remove this once MainThreadMarker is moved to objc2 + crates.extend( + config.libraries[&self.library_name] + .required_dependencies + .iter() + .map(|krate| &**krate), + ); + + for krate in crates { + let required = config.libraries[&self.library_name] + .required_dependencies + .contains(krate); + if !required { + writeln!(f, "#[cfg(feature = {:?})]", krate)?; + } + writeln!(f, "use {}::*;", krate.replace('-', "_"))?; + } + writeln!(f)?; + writeln!(f, "use crate::*;")?; + + writeln!(f)?; + + for stmt in &self.stmts { + writeln!(f, "{}", stmt.fmt(config))?; + } + + Ok(()) + }) } } diff --git a/crates/header-translator/src/global_analysis.rs b/crates/header-translator/src/global_analysis.rs index d31cc9ab8..fd02e1278 100644 --- a/crates/header-translator/src/global_analysis.rs +++ b/crates/header-translator/src/global_analysis.rs @@ -6,16 +6,13 @@ use std::mem; use crate::file::File; use crate::method::Method; -use crate::output::Output; use crate::stmt::Stmt; +use crate::Library; -pub fn global_analysis(output: &mut Output) { - for (name, library) in &mut output.libraries { - let _span = debug_span!("library", name).entered(); - for (name, file) in &mut library.files { - let _span = debug_span!("file", name).entered(); - update_file(file); - } +pub fn global_analysis(library: &mut Library) { + for (name, file) in &mut library.files { + let _span = debug_span!("file", name).entered(); + update_file(file); } } diff --git a/crates/header-translator/src/id.rs b/crates/header-translator/src/id.rs index 306d1ca42..3bc031382 100644 --- a/crates/header-translator/src/id.rs +++ b/crates/header-translator/src/id.rs @@ -8,6 +8,7 @@ use clang::Entity; use crate::context::Context; use crate::display_helper::FormatterFn; use crate::file::clean_name; +use crate::Config; pub trait ToOptionString: fmt::Debug { fn to_option(&self) -> Option<&str>; @@ -33,8 +34,8 @@ impl ToOptionString for () { #[derive(Debug, Clone)] pub struct Location { - library: String, - pub file_name: Option, + pub library: String, + file_name: Option, } impl PartialEq for Location { @@ -61,15 +62,64 @@ impl Ord for Location { } } +pub enum Feature { + Dependency(String), + Feature(String), +} + +impl Feature { + pub fn into_string(self) -> String { + match self { + Self::Dependency(krate) => krate, + Self::Feature(feature_name) => feature_name, + } + } +} + impl Location { - pub fn feature_name(&self) -> Option { + pub fn krate<'a>(&self, config: &'a Config) -> Option<&'a str> { + if self.library == "block2" { + return Some("block2"); + } + Some(&config.libraries.get(&self.library)?.krate) + } + + pub fn assert_file(&self, file_name: &str) { + assert_eq!(self.file_name.as_deref(), Some(file_name)); + } + + /// Only the library of the emmision location matters. + pub fn feature(&self, config: &Config, emission_location: &Self) -> Option { if self.library == "System" { None - } else if let Some(file_name) = &self.file_name { - Some(format!("{}_{}", self.library, clean_name(file_name))) + } else if self.library == "block2" { + Some(Feature::Dependency("block2".to_string())) + } else if self.library == emission_location.library { + if let Some(file_name) = &self.file_name { + Some(Feature::Feature(format!( + "{}_{}", + self.library, + clean_name(file_name) + ))) + } else { + error!("tried to get feature name of location with an unknown file name"); + Some(Feature::Feature(format!("{}_Unknown", self.library))) + } + } else if let Some(krate) = self.krate(config) { + let required = config.libraries[&emission_location.library] + .required_dependencies + .contains(krate); + if required { + None + } else { + Some(Feature::Dependency(krate.to_string())) + } } else { - error!("tried to get feature name of location with an unknown file name"); - Some(format!("{}_Unknown", self.library)) + debug!( + library = self.library, + "tried to get feature name of unknown library" + ); + None } } } @@ -176,6 +226,16 @@ impl ItemIdentifier { } } + pub fn block() -> Self { + Self { + name: "Block".to_string(), + location: Location { + library: "block2".to_string(), + file_name: None, + }, + } + } + pub fn is_nsstring(&self) -> bool { self.location.library == "Foundation" && self.name == "NSString" } @@ -244,20 +304,25 @@ impl AsRef for ItemIdentifier { /// Helper to emit a `#[cfg(feature = "...")]`-gate based on the required /// items and the implied features. +/// +/// Only the library of the emmision location matters. pub fn cfg_gate_ln, I: AsRef>( required_features: impl IntoIterator, implied_features: impl IntoIterator, + config: &Config, + emission_location: &Location, ) -> impl fmt::Display { // Use a set to deduplicate features, and to have them in // a consistent order. let mut feature_names: BTreeSet = required_features .into_iter() - .filter_map(|id| id.as_ref().feature_name()) + .filter_map(|id| id.as_ref().feature(config, emission_location)) + .map(|f| f.into_string()) .collect(); for location in implied_features { - if let Some(feature_name) = location.as_ref().feature_name() { - feature_names.remove(&feature_name); + if let Some(feature_name) = location.as_ref().feature(config, emission_location) { + feature_names.remove(&feature_name.into_string()); } } diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index da3687608..6f1562fb6 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -3,7 +3,7 @@ #[macro_use] extern crate tracing; -use std::fmt; +use std::fmt::{self, Display}; use std::path::Path; use std::process::{Command, Stdio}; @@ -22,24 +22,23 @@ mod id; mod library; mod method; mod objc2_utils; -mod output; mod rust_type; mod stmt; mod thread_safety; mod unexposed_attr; -pub use self::config::Config; +pub use self::config::{Config, LibraryData}; pub use self::context::Context; pub use self::file::File; pub use self::global_analysis::global_analysis; pub use self::id::ItemIdentifier; pub use self::library::Library; -pub use self::output::Output; pub use self::stmt::{Mutability, Stmt}; -pub fn run_cargo_fmt(package: &str) { +pub fn run_cargo_fmt(packages: impl IntoIterator) { let status = Command::new("cargo") - .args(["fmt", "--package", package]) + .arg("fmt") + .args(packages.into_iter().map(|package| format!("-p{package}"))) .current_dir(Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap()) .status() .expect("failed running cargo fmt"); @@ -98,3 +97,5 @@ pub(crate) fn to_snake_case(input: impl AsRef) -> String { heck::ToSnakeCase::to_snake_case(input) } } + +pub const VERSION: &str = "0.2.0"; diff --git a/crates/header-translator/src/library.rs b/crates/header-translator/src/library.rs index 1a6e35bbd..2e27b3ca8 100644 --- a/crates/header-translator/src/library.rs +++ b/crates/header-translator/src/library.rs @@ -1,25 +1,28 @@ use std::collections::BTreeMap; +use std::collections::BTreeSet; use std::fmt; use std::fs; -use std::io; +use std::io::ErrorKind; +use std::io::Write; use std::path::Path; +use toml_edit::InlineTable; +use toml_edit::{value, Array, DocumentMut, Formatted, Item, Table, Value}; + use crate::config::LibraryData; +use crate::display_helper::FormatterFn; use crate::file::clean_name; use crate::file::File; use crate::id::cfg_gate_ln; use crate::id::Location; - -/// Some SDK files have '+' in the file name, so we change those to `_`. -pub(crate) fn clean_file_name(name: &str) -> String { - name.replace('+', "_") -} +use crate::Config; +use crate::VERSION; #[derive(Debug, PartialEq, Default)] pub struct Library { pub files: BTreeMap, link_name: String, - data: LibraryData, + pub data: LibraryData, } impl Library { @@ -31,110 +34,398 @@ impl Library { } } - pub fn output(&self, path: &Path) -> io::Result<()> { + pub fn output( + &self, + crate_dir: &Path, + config: &Config, + ) -> Result<(), Box> { + let generated_dir = crate_dir.join("src").join("generated"); + + // Remove previously generated files + for file in generated_dir.read_dir()? { + fs::remove_file(file?.path())?; + } + + // Output `src/generated/*.rs`. for (name, file) in &self.files { - let name = clean_file_name(name); - let mut path = path.join(name); + let name = clean_name(name); + let mut path = generated_dir.join(name); path.set_extension("rs"); - fs::write(&path, file.to_string())?; + fs::write(&path, file.contents(config).to_string())?; } - // truncate if the file exists - fs::write(path.join("mod.rs"), self.to_string())?; - - Ok(()) - } -} - -impl fmt::Display for Library { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - writeln!( - f, - "// This file has been automatically generated by `objc2`'s `header-translator`." + // Output `src/generated/mod.rs`. + fs::write( + generated_dir.join("mod.rs"), + self.contents(config).to_string(), )?; - writeln!(f, "// DO NOT EDIT")?; - writeln!(f)?; - writeln!(f, "//! # Bindings to the `{}` framework", self.link_name)?; - - // Lints - // We emit `use [framework]::*` more than necessary often. - writeln!(f, "#![allow(unused_imports)]")?; - // Deprecated items are often still used in other signatures. - writeln!(f, "#![allow(deprecated)]")?; - // Methods use a different naming scheme. - writeln!(f, "#![allow(non_snake_case)]")?; - // We emit C types with a different naming scheme. - writeln!(f, "#![allow(non_camel_case_types)]")?; - // Statics and enum fields use a different naming scheme. - writeln!(f, "#![allow(non_upper_case_globals)]")?; - // We don't yet emit documentation for methods. - writeln!(f, "#![allow(missing_docs)]")?; - - // Clippy lints - // We have no control over how many arguments a method takes. - writeln!(f, "#![allow(clippy::too_many_arguments)]")?; - // We have no control over how complex a type is. - writeln!(f, "#![allow(clippy::type_complexity)]")?; - // Apple's naming scheme allows this. - writeln!(f, "#![allow(clippy::upper_case_acronyms)]")?; - // Headers often use `x << 0` for clarity. - writeln!(f, "#![allow(clippy::identity_op)]")?; - // We don't have the manpower to document the safety of methods. - writeln!(f, "#![allow(clippy::missing_safety_doc)]")?; - - writeln!(f)?; - - // Link to the correct framework. - if self.data.cfg_apple_link { - // Allow a different linking on GNUStep + + if !self.data.custom_lib_rs { + // Output `src/lib.rs`. Truncates if the file exists. + let mut lib_rs = fs::File::create(crate_dir.join("src").join("lib.rs"))?; writeln!( - f, - "#[cfg_attr(feature = \"apple\", link(name = \"{}\", kind = \"framework\"))]", + lib_rs, + "//! # Bindings to the `{}` framework", self.link_name )?; - } else { + writeln!(lib_rs, "//!")?; writeln!( - f, - "#[link(name = \"{}\", kind = \"framework\")]", - self.link_name + lib_rs, + "//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.", + )?; + writeln!(lib_rs, "//!")?; + writeln!( + lib_rs, + "//! [apple-doc]: https://developer.apple.com/documentation/{}/", + self.link_name.to_lowercase(), )?; + writeln!(lib_rs, "//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html")?; + writeln!(lib_rs, "#![no_std]")?; + writeln!( + lib_rs, + "#![cfg_attr(feature = \"unstable-docsrs\", feature(doc_auto_cfg))]" + )?; + writeln!(lib_rs, "// Update in Cargo.toml as well.")?; + writeln!( + lib_rs, + "#![doc(html_root_url = \"https://docs.rs/{}/{VERSION}\")]", + self.data.krate, + )?; + writeln!(lib_rs)?; + writeln!(lib_rs, "#[cfg(feature = \"alloc\")]")?; + writeln!(lib_rs, "extern crate alloc;")?; + writeln!(lib_rs)?; + writeln!(lib_rs, "#[cfg(feature = \"std\")]")?; + writeln!(lib_rs, "extern crate std;")?; + writeln!(lib_rs)?; + writeln!(lib_rs, "mod generated;")?; + writeln!(lib_rs, "#[allow(unused_imports, unreachable_pub)]")?; + writeln!(lib_rs, "pub use self::generated::*;")?; + lib_rs.flush()?; } - writeln!(f, "extern \"C\" {{}}")?; - writeln!(f)?; - for name in self.files.keys() { - let name = clean_name(name); - write!(f, "#[cfg(feature = \"{}_{}\")]", self.link_name, name)?; - writeln!(f, "#[path = \"{name}.rs\"]")?; - writeln!(f, "mod __{name};")?; + // Output `README.md`. + let mut readme = fs::File::create(crate_dir.join("README.md"))?; + writeln!(readme, "# `{0}` + +[![Latest version](https://badgen.net/crates/v/{0})](https://crates.io/crates/{0}) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/{0}/badge.svg)](https://docs.rs/{0}/) +[![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 {1}. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/{0}/) for more details on this crate. + +This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2), +see that for related crates.", self.data.krate, self.link_name)?; + readme.flush()?; + + let mut cargo_toml: DocumentMut = include_str!("default_cargo.toml") + .parse() + .expect("invalid default toml"); + + cargo_toml["package"]["name"] = value(&self.data.krate); + match cargo_toml["package"]["version"].as_value_mut().unwrap() { + // Preserve comment behind `version` + Value::String(s) => { + let decor = s.decor().clone(); + *s = Formatted::new(VERSION.to_string()); + *s.decor_mut() = decor; + } + _ => unreachable!(), + } + cargo_toml["package"]["description"] = + value(format!("Bindings to the {} framework", self.link_name)); + let keywords = cargo_toml["package"]["keywords"].as_array_mut().unwrap(); + if self.data.macos.is_some() { + keywords.push("macos"); + } + if self.data.ios.is_some() { + keywords.push("ios"); + } + + let targets = cargo_toml["package"]["metadata"]["docs"]["rs"]["targets"] + .as_array_mut() + .unwrap(); + + let mut default_target = None; + if self.data.macos.is_some() { + // Default to `aarch64-apple-darwin`, as that is likely the more + // popular target nowadays. + default_target.get_or_insert("aarch64-apple-darwin"); + targets.push("aarch64-apple-darwin"); + targets.push("x86_64-apple-darwin"); + } + if self.data.ios.is_some() { + default_target.get_or_insert("aarch64-apple-ios"); + targets.push("aarch64-apple-ios"); + if self.data.macos.is_none() { + targets.push("x86_64-apple-ios"); + } + } + if self.data.tvos.is_some() { + default_target.get_or_insert("aarch64-apple-tvos"); + targets.push("aarch64-apple-tvos"); + } + if self.data.watchos.is_some() { + default_target.get_or_insert("aarch64-apple-watchos"); + targets.push("aarch64-apple-watchos"); + } + if self.data.maccatalyst.is_some() { + default_target.get_or_insert("aarch64-apple-ios-macabi"); + targets.push("aarch64-apple-ios-macabi"); + } + if self.data.gnustep { + default_target.get_or_insert("x86_64-unknown-linux-gnu"); + targets.push("x86_64-unknown-linux-gnu"); + targets.push("i686-unknown-linux-gnu"); + } + for item in targets.iter_mut() { + item.decor_mut().set_prefix("\n "); + } + targets.set_trailing_comma(true); + cargo_toml["package"]["metadata"]["docs"]["rs"]["default-target"] = + value(default_target.unwrap()); + + let dependencies: BTreeMap<_, _> = self + .files + .values() + .flat_map(|file| file.crates(config)) + .chain(self.data.required_dependencies.iter().map(|krate| &**krate)) + .map(|krate| (krate, self.data.required_dependencies.contains(krate))) + .collect(); + + for (krate, required) in &dependencies { + let (path, version) = match *krate { + "block2" => ("../../crates/block2".to_string(), "0.4.0"), + krate => (format!("../{krate}"), VERSION), + }; + let mut table = InlineTable::from_iter([ + ("path", Value::from(path)), + ("version", Value::from(version)), + ]); + if self.data.gnustep { + table.insert("default-features", Value::from(false)); + } + if !required { + table.insert("optional", Value::from(true)); + } + + // Don't override if set by Cargo.modified.toml + cargo_toml["dependencies"] + .as_table_mut() + .unwrap() + .entry(krate) + .or_insert(Item::Value(Value::InlineTable(table))); + } + + match fs::read_to_string(crate_dir.join("Cargo.modified.toml")) { + Ok(s) => { + let modified: DocumentMut = s.parse()?; + merge_toml_table(&mut cargo_toml, modified.as_table().clone()); + } + Err(e) if e.kind() == ErrorKind::NotFound => { + // Skip + } + Err(e) => Err(e)?, + } + + for (krate, required) in &dependencies { + if !required { + let array: Array = [format!("dep:{krate}")].iter().collect(); + cargo_toml["features"][krate] = value(array); + } } - writeln!(f)?; + add_newline_at_end(&mut cargo_toml["features"]); + + let mut generated_features = BTreeMap::new(); + // Own features for (file_name, file) in &self.files { - for stmt in &file.stmts { - if let Some(item) = stmt.provided_item() { - assert_eq!(item.location().file_name.as_ref(), Some(file_name)); - - let mut items = stmt.required_items(); - items.push(item.clone()); - write!(f, "{}", cfg_gate_ln::<_, Location>(items, []))?; - - let visibility = if item.name.starts_with('_') { - "pub(crate)" - } else { - "pub" - }; - write!( - f, - "{visibility} use self::__{}::{{{}}};", - clean_file_name(file_name), - item.name, - )?; + let feature_name = format!("{}_{}", self.link_name, clean_name(file_name)); + generated_features.insert( + feature_name.clone(), + file.required_features(config).into_iter().collect(), + ); + } + + let _ = generated_features.insert( + "all".to_string(), + generated_features + .keys() + .cloned() + .chain( + dependencies + .iter() + .filter(|(_, required)| !*required) + .map(|(krate, _)| krate.to_string()), + ) + .collect::>(), + ); + + for (feature, required_features) in generated_features { + let mut array: Array = required_features.into_iter().collect(); + if 1 < array.len() { + for item in array.iter_mut() { + item.decor_mut().set_prefix("\n "); } + array.set_trailing("\n"); + array.set_trailing_comma(true); } + cargo_toml["features"][feature] = value(array); } + fs::write(crate_dir.join("Cargo.toml"), cargo_toml.to_string())?; + Ok(()) } + + pub fn contents<'a>(&'a self, config: &'a Config) -> impl fmt::Display + 'a { + FormatterFn(|f| { + writeln!( + f, + "// This file has been automatically generated by `objc2`'s `header-translator`." + )?; + writeln!(f, "// DO NOT EDIT")?; + writeln!(f)?; + + // Lints + // We emit `use [framework]::*` more than necessary often. + writeln!(f, "#![allow(unused_imports)]")?; + // Deprecated items are often still used in other signatures. + writeln!(f, "#![allow(deprecated)]")?; + // Methods use a different naming scheme. + writeln!(f, "#![allow(non_snake_case)]")?; + // We emit C types with a different naming scheme. + writeln!(f, "#![allow(non_camel_case_types)]")?; + // Statics and enum fields use a different naming scheme. + writeln!(f, "#![allow(non_upper_case_globals)]")?; + // We don't yet emit documentation for methods. + writeln!(f, "#![allow(missing_docs)]")?; + + // Clippy lints + // We have no control over how many arguments a method takes. + writeln!(f, "#![allow(clippy::too_many_arguments)]")?; + // We have no control over how complex a type is. + writeln!(f, "#![allow(clippy::type_complexity)]")?; + // Apple's naming scheme allows this. + writeln!(f, "#![allow(clippy::upper_case_acronyms)]")?; + // Headers often use `x << 0` for clarity. + writeln!(f, "#![allow(clippy::identity_op)]")?; + // We don't have the manpower to document the safety of methods. + writeln!(f, "#![allow(clippy::missing_safety_doc)]")?; + + writeln!(f)?; + + // Link to the correct framework. + if self.data.gnustep { + // Allow for different linking on GNUStep + writeln!( + f, + "#[cfg_attr(feature = \"apple\", link(name = \"{}\", kind = \"framework\"))]", + self.link_name + )?; + } else { + writeln!( + f, + "#[link(name = \"{}\", kind = \"framework\")]", + self.link_name + )?; + } + writeln!(f, "extern \"C\" {{}}")?; + writeln!(f)?; + + for name in self.files.keys() { + let name = clean_name(name); + write!(f, "#[cfg(feature = \"{}_{}\")]", self.link_name, name)?; + writeln!(f, "#[path = \"{name}.rs\"]")?; + writeln!(f, "mod __{name};")?; + } + + writeln!(f)?; + + for (file_name, file) in &self.files { + for stmt in &file.stmts { + if let Some(item) = stmt.provided_item() { + item.location().assert_file(file_name); + + let mut items = stmt.required_items(); + items.push(item.clone()); + write!( + f, + "{}", + cfg_gate_ln::<_, Location>(items, [], config, item.location()) + )?; + + let visibility = if item.name.starts_with('_') { + "pub(crate)" + } else { + "pub" + }; + write!( + f, + "{visibility} use self::__{}::{{{}}};", + clean_name(file_name), + item.name, + )?; + } + } + } + + Ok(()) + }) + } +} + +fn merge_toml_table(original: &mut Table, addition: Table) { + for (key, mut addition) in addition { + match original.entry(&key) { + toml_edit::Entry::Occupied(mut original) => match (original.get_mut(), addition) { + (Item::Value(original), Item::Value(addition)) => { + *original = addition; + } + (Item::Table(original), Item::Table(addition)) => { + merge_toml_table(original, addition); + } + (Item::ArrayOfTables(original), Item::ArrayOfTables(addition)) => { + *original = addition; + } + (original, addition) => panic!("cannot merge items {original:?} and {addition:?}"), + }, + toml_edit::Entry::Vacant(original) => { + match &mut addition { + Item::Table(table) => { + table.set_position(usize::MAX); + table.decor_mut().clear(); + } + Item::ArrayOfTables(array) => { + for table in array.iter_mut() { + table.set_position(usize::MAX); + table.decor_mut().clear(); + } + } + _ => {} + } + original.insert(addition); + } + } + } +} + +fn add_newline_at_end(item: &mut Item) { + // Place an extra newline at the end of features table, before the + // auto-generated features below are added. + item.as_table_mut() + .unwrap() + .iter_mut() + .last() + .unwrap() + .1 + .as_value_mut() + .unwrap() + .decor_mut() + .set_suffix("\n"); } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 5e27a0262..f9caa5206 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,9 +1,11 @@ -use std::fs; -use std::io::{Read, Write}; +use std::collections::{BTreeMap, BTreeSet}; +use std::io::{ErrorKind, Read, Seek, Write}; use std::path::{Path, PathBuf}; +use std::{fs, io}; use apple_sdk::{AppleSdk, DeveloperDirectory, Platform, SdkPath, SimpleSdk}; use clang::{Clang, EntityKind, EntityVisitResult, Index, TranslationUnit}; +use semver::VersionReq; use tracing::{debug_span, error, info, info_span, trace, trace_span}; use tracing_subscriber::filter::LevelFilter; use tracing_subscriber::layer::{Layer, SubscriberExt}; @@ -11,7 +13,9 @@ use tracing_subscriber::registry::Registry; use tracing_subscriber::util::SubscriberInitExt; use tracing_tree::HierarchicalLayer; -use header_translator::{global_analysis, run_cargo_fmt, Config, Context, File, Output, Stmt}; +use header_translator::{ + global_analysis, run_cargo_fmt, Config, Context, File, Library, LibraryData, Stmt, +}; type BoxError = Box; @@ -41,8 +45,7 @@ fn main() -> Result<(), BoxError> { let _span = info_span!("running").entered(); let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); - let workspace_dir = manifest_dir.parent().unwrap(); - let crate_src = workspace_dir.join("icrate/src"); + let workspace_dir = manifest_dir.parent().unwrap().parent().unwrap(); let config = load_config(manifest_dir); @@ -80,7 +83,7 @@ fn main() -> Result<(), BoxError> { error!("should have one of each platform: {sdks:?}"); } - let mut final_result = None; + let mut libraries = None; // TODO: Compare between SDKs for sdk in sdks { @@ -111,7 +114,7 @@ fn main() -> Result<(), BoxError> { _ => continue, }; - let mut result: Option = None; + let mut result: Option> = None; for llvm_target in llvm_targets { let _span = info_span!("parsing", platform = ?sdk.platform, llvm_target).entered(); @@ -126,63 +129,57 @@ fn main() -> Result<(), BoxError> { } if sdk.platform == Platform::MacOsX { - final_result = result; + libraries = result; } } - let mut final_result = final_result.expect("got a result"); + let mut libraries = libraries.expect("got a result"); let span = info_span!("analyzing").entered(); - global_analysis(&mut final_result); + for (name, library) in &mut libraries { + let _span = debug_span!("library", name).entered(); + global_analysis(library); + } drop(span); - let generated_dir = crate_src.join("generated"); - fs::create_dir_all(&generated_dir)?; - - for (library_name, files) in &final_result.libraries { + for (library_name, library) in &libraries { let _span = info_span!("writing", library_name).entered(); - let output_path = generated_dir.join(library_name); - fs::create_dir_all(&output_path)?; - files.output(&output_path).unwrap(); - } - - final_result - .output_module(&generated_dir.join("mod.rs")) - .unwrap(); - let span = info_span!("writing features").entered(); - const FEATURE_SECTION_PATTERN: - &str = "# This section has been automatically generated by `objc2`'s `header-translator`.\n# DO NOT EDIT\n"; - let mut cargo_toml = { - let path = crate_src.parent().unwrap().join("Cargo.toml"); - fs::OpenOptions::new().read(true).append(true).open(path)? - }; - // find the features section - if let Some(pos) = { - let mut text = String::new(); - cargo_toml.read_to_string(&mut text)?; - text.find(FEATURE_SECTION_PATTERN) - } { - // truncate the file to the section header before writing the features - let len = u64::try_from(pos + FEATURE_SECTION_PATTERN.len())?; - cargo_toml.set_len(len)?; - } else { - return Err("feature section not found in icrate/Cargo.toml".into()); - } - for (feature, required_features) in final_result.cargo_features(&config) { - write!(cargo_toml, "{feature} = [")?; - if !required_features.is_empty() { - writeln!(cargo_toml)?; + let crate_dir = workspace_dir + .join("framework-crates") + .join(&library.data.krate); + + // Ensure directories exist + let generated_dir = workspace_dir.join("generated").join(library_name); + fs::create_dir_all(&generated_dir)?; + fs::create_dir_all(&crate_dir.join("src"))?; + + // Recreate symlink to generated directory + let symlink_path = crate_dir.join("src").join("generated"); + fs::remove_file(&symlink_path)?; + #[cfg(unix)] + let res = + std::os::unix::fs::symlink(format!("../../../generated/{library_name}"), &symlink_path); + #[cfg(windows)] + let res = std::os::windows::fs::symlink_dir( + format!("..\\..\\..\\generated\\{library_name}"), + &symlink_path, + ); + match res { + Ok(()) => {} + Err(err) if err.kind() == ErrorKind::AlreadyExists => {} + Err(err) => Err(err)?, } - for feature in required_features { - writeln!(cargo_toml, " \"{feature}\",")?; - } - writeln!(cargo_toml, "]")?; + + library.output(&crate_dir, &config)?; } - drop(cargo_toml); + + let span = info_span!("formatting").entered(); + run_cargo_fmt(libraries.values().map(|library| &library.data.krate)); drop(span); - let _span = info_span!("formatting").entered(); - run_cargo_fmt("icrate"); + update_ci(workspace_dir, &config)?; + + update_list(workspace_dir, &config)?; Ok(()) } @@ -193,11 +190,20 @@ fn load_config(manifest_dir: &Path) -> Config { Config::from_file(&manifest_dir.join("translation-config.toml")).expect("read config") } -fn parse_sdk(index: &Index<'_>, sdk: &SdkPath, llvm_target: &str, config: &Config) -> Output { +fn parse_sdk( + index: &Index<'_>, + sdk: &SdkPath, + llvm_target: &str, + config: &Config, +) -> BTreeMap { let tu = get_translation_unit(index, sdk, llvm_target); let mut preprocessing = true; - let mut result = Output::from_libraries(&config.libraries); + let mut libraries: BTreeMap = config + .libraries + .iter() + .map(|(name, data)| (name.into(), Library::new(name, data))) + .collect(); let mut library_span = None; let mut library_span_name = String::new(); @@ -224,7 +230,7 @@ fn parse_sdk(index: &Index<'_>, sdk: &SdkPath, llvm_target: &str, config: &Confi file_span = Some(debug_span!("file", name = file_name).entered()); } - if let Some(library) = result.libraries.get_mut(&library_name) { + if let Some(library) = libraries.get_mut(&library_name) { match entity.get_kind() { EntityKind::InclusionDirective if preprocessing => { let name = entity.get_name().expect("inclusion name"); @@ -248,7 +254,7 @@ fn parse_sdk(index: &Index<'_>, sdk: &SdkPath, llvm_target: &str, config: &Confi library .files .entry(included) - .or_insert_with(|| File::new(&library_name, &context)); + .or_insert_with(|| File::new(&library_name)); } } } @@ -283,7 +289,7 @@ fn parse_sdk(index: &Index<'_>, sdk: &SdkPath, llvm_target: &str, config: &Confi EntityVisitResult::Continue }); - result + libraries } fn get_translation_unit<'i: 'tu, 'tu>( @@ -349,3 +355,116 @@ fn get_translation_unit<'i: 'tu, 'tu>( tu } + +fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> { + let _span = info_span!("updating ci.yml").entered(); + let mut ci = fs::OpenOptions::new() + .read(true) + .write(true) + .open(workspace_dir.join(".github/workflows/ci.yml"))?; + // find the features section + let mut text = String::new(); + ci.read_to_string(&mut text)?; + let (before, after) = text + .split_once("BEGIN AUTOMATICALLY GENERATED") + .expect("begin section not found in ci.yml"); + let (_, after) = after + .split_once(" # END AUTOMATICALLY GENERATED") + .expect("end section not found in ci.yml"); + + // Clear file + ci.set_len(0)?; + ci.seek(io::SeekFrom::Start(0))?; + + writeln!(ci, "{before}BEGIN AUTOMATICALLY GENERATED")?; + + fn writer( + mut ci: impl Write, + config: &Config, + env_name: &str, + check: impl Fn(&LibraryData) -> bool, + ) -> io::Result<()> { + // Use a BTreeSet to sort the libraries + let mut frameworks = BTreeSet::new(); + for library in config.libraries.values() { + if check(library) { + frameworks.insert(&*library.krate); + } + } + write!(ci, " {env_name}:")?; + for framework in frameworks { + write!(ci, " --package={}", framework)?; + } + writeln!(ci)?; + + Ok(()) + } + + writer(&mut ci, config, "FRAMEWORKS_MACOS_10_12", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=10.12").unwrap().matches(v)) + // HACK: These depend on `objc2-uniform-type-identifiers`, which + // is not available on macOS 10.12, but will be enabled by `"all"` + && !["objc2-file-provider", "objc2-health-kit", "objc2-photos"].contains(&&*lib.krate) + })?; + writer(&mut ci, config, "FRAMEWORKS_MACOS_10_13", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=10.13").unwrap().matches(v)) + // HACK: These depend on `objc2-uniform-type-identifiers`, which + // is not available on macOS 10.13, but will be enabled by `"all"` + && !["objc2-file-provider", "objc2-health-kit", "objc2-photos"].contains(&&*lib.krate) + })?; + writer(&mut ci, config, "FRAMEWORKS_MACOS_11", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=11.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_MACOS_12", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=12.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_MACOS_13", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=13.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_MACOS_14", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=14.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_IOS_10", |lib| { + // HACK: We can't test iOS frameworks with the `"all"` feature, as + // that enables `objc2-app-kit` as well. + matches!(&*lib.krate, "objc2-foundation" | "objc2-metal") + })?; + writer(&mut ci, config, "FRAMEWORKS_GNUSTEP", |lib| lib.gnustep)?; + + write!(&mut ci, " # END AUTOMATICALLY GENERATED{after}")?; + + Ok(()) +} + +fn update_list(workspace_dir: &Path, config: &Config) -> io::Result<()> { + let _span = info_span!("updating list_data.md").entered(); + + let mut f = fs::File::create( + workspace_dir.join("crates/objc2/src/topics/about_generated/list_data.md"), + )?; + + writeln!(f, "| Framework | Crate | Documentation |")?; + writeln!(f, "| --- | --- | --- |")?; + + for (name, library) in &config.libraries { + let package = &library.krate; + writeln!( + f, + "| `{name}` | [![`{package}`](https://badgen.net/crates/v/{package})](https://crates.io/crates/{package}) | [![docs.rs](https://docs.rs/{package}/badge.svg)](https://docs.rs/{package}/) |", + )?; + } + + Ok(()) +} diff --git a/crates/header-translator/src/output.rs b/crates/header-translator/src/output.rs deleted file mode 100644 index 6c3777f8d..000000000 --- a/crates/header-translator/src/output.rs +++ /dev/null @@ -1,141 +0,0 @@ -use std::collections::{BTreeMap, BTreeSet, HashMap}; -use std::fmt::{self, Write}; -use std::fs; -use std::path::Path; - -use crate::config::{Config, LibraryData}; -use crate::file::clean_name; -use crate::library::Library; - -use semver::VersionReq; - -#[derive(Debug, PartialEq)] -pub struct Output { - pub libraries: BTreeMap, -} - -impl Output { - pub fn from_libraries(libraries: &HashMap) -> Self { - let libraries = libraries - .iter() - .map(|(name, data)| (name.into(), Library::new(name, data))) - .collect(); - Self { libraries } - } - - pub fn output_module(&self, path: &Path) -> fmt::Result { - let mut f = String::new(); - - for library_name in self.libraries.keys() { - writeln!(&mut f, "#[cfg(feature = \"{library_name}\")]")?; - writeln!(&mut f, "pub mod {library_name};")?; - } - - fs::write(path, f).unwrap(); - - Ok(()) - } - - pub fn cargo_features(&self, config: &Config) -> BTreeMap> { - let mut features = BTreeMap::new(); - - let mut macos_10_12_features: BTreeSet = - vec!["unstable-example-basic_usage".into()] - .into_iter() - .collect(); - let mut macos_10_13_features: BTreeSet = vec![ - "unstable-frameworks-macos-10-12".into(), - "unstable-example-delegate".into(), - "unstable-example-metal".into(), - "unstable-example-nspasteboard".into(), - "unstable-example-speech_synthesis".into(), - ] - .into_iter() - .collect(); - let mut macos_11_features: BTreeSet = - vec!["unstable-frameworks-macos-10-13".into()] - .into_iter() - .collect(); - let mut macos_12_features: BTreeSet = vec!["unstable-frameworks-macos-11".into()] - .into_iter() - .collect(); - let mut macos_13_features: BTreeSet = vec![ - "unstable-frameworks-macos-12".into(), - "unstable-example-browser".into(), - ] - .into_iter() - .collect(); - let mut macos_14_features: BTreeSet = vec!["unstable-frameworks-macos-13".into()] - .into_iter() - .collect(); - - for (library_name, library) in &config.libraries { - let library_features = library - .imports - .iter() - .chain(library.extra_features.iter()) - .cloned(); - let _ = features.insert(library_name.to_string(), library_features.collect()); - - if let Some(version) = &library.macos { - if VersionReq::parse("<=10.12").unwrap().matches(version) { - macos_10_12_features.insert(format!("{library_name}_all")); - } else if VersionReq::parse("<=10.13").unwrap().matches(version) { - macos_10_13_features.insert(format!("{library_name}_all")); - } else if VersionReq::parse("<=11.0").unwrap().matches(version) { - macos_11_features.insert(format!("{library_name}_all")); - } else if VersionReq::parse("<=12.0").unwrap().matches(version) { - macos_12_features.insert(format!("{library_name}_all")); - } else if VersionReq::parse("<=13.0").unwrap().matches(version) { - macos_13_features.insert(format!("{library_name}_all")); - } else if VersionReq::parse("<=14.0").unwrap().matches(version) { - macos_14_features.insert(format!("{library_name}_all")); - } else { - error!(?library_name, "has library that does not fit any version"); - } - } - } - - let _ = features.insert( - "unstable-frameworks-macos-10-12".into(), - macos_10_12_features.into_iter().collect(), - ); - let _ = features.insert( - "unstable-frameworks-macos-10-13".into(), - macos_10_13_features.into_iter().collect(), - ); - let _ = features.insert( - "unstable-frameworks-macos-11".into(), - macos_11_features.into_iter().collect(), - ); - let _ = features.insert( - "unstable-frameworks-macos-12".into(), - macos_12_features.into_iter().collect(), - ); - let _ = features.insert( - "unstable-frameworks-macos-13".into(), - macos_13_features.into_iter().collect(), - ); - let _ = features.insert( - "unstable-frameworks-macos-14".into(), - macos_14_features.into_iter().collect(), - ); - - for (library_name, library) in &self.libraries { - let mut library_features = BTreeSet::from([library_name.clone()]); - - for file_name in library.files.keys() { - let feature_name = format!("{}_{}", library_name, clean_name(file_name)); - features.insert(feature_name.clone(), Vec::new()); - library_features.insert(feature_name); - } - - let _ = features.insert( - format!("{library_name}_all"), - library_features.into_iter().collect::>(), - ); - } - - features - } -} diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index de8d87078..e1d6243c8 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -1034,14 +1034,21 @@ impl Ty { no_escape: _, arguments, result_type, + } => { + let mut items = vec![]; + for arg in arguments { + items.extend(arg.required_items()); + } + items.extend(result_type.required_items()); + items } - | Self::Block { + Self::Block { sendable: _, no_escape: _, arguments, result_type, } => { - let mut items = Vec::new(); + let mut items = vec![ItemIdentifier::block()]; for arg in arguments { items.extend(arg.required_items()); } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 4b1a865c0..dd891507f 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -21,6 +21,7 @@ use crate::method::{handle_reserved, Method}; use crate::rust_type::Ty; use crate::thread_safety::ThreadSafety; use crate::unexposed_attr::UnexposedAttr; +use crate::Config; #[derive(serde::Deserialize, Debug, Clone, PartialEq, Eq)] pub struct Derives(Cow<'static, str>); @@ -1509,522 +1510,574 @@ impl Stmt { } } - fn cfg_gate_ln(&self) -> impl fmt::Display + '_ { - cfg_gate_ln(self.required_items(), [self.location()]) + /// Items required for any part of the statement. + pub(crate) fn required_items_inner(&self) -> Vec { + let required_by_inner: Vec<_> = match self { + Self::ExternCategory { + cls_required_items, + methods, + .. + } => methods + .iter() + .flat_map(|method| method.required_items()) + .chain(cls_required_items.clone()) + .collect(), + Self::ExternMethods { methods, .. } | Self::ProtocolDecl { methods, .. } => methods + .iter() + .flat_map(|method| method.required_items()) + .collect(), + Self::EnumDecl { variants, .. } => variants + .iter() + .flat_map(|(_, _, expr)| expr.required_items()) + .collect(), + _ => vec![], + }; + self.required_items() + .into_iter() + .chain(required_by_inner) + .collect() } -} - -impl fmt::Display for Stmt { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let _span = debug_span!("stmt", discriminant = ?mem::discriminant(self)).entered(); - struct GenericTyHelper<'a>(&'a [String]); + fn cfg_gate_ln<'a>(&'a self, config: &'a Config) -> impl fmt::Display + 'a { + cfg_gate_ln( + self.required_items(), + [self.location()], + config, + self.location(), + ) + } - impl fmt::Display for GenericTyHelper<'_> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if !self.0.is_empty() { - write!(f, "<")?; - for generic in self.0 { - write!(f, "{generic}, ")?; - } - write!(f, ">")?; - } - Ok(()) - } - } + pub fn fmt<'a>(&'a self, config: &'a Config) -> impl fmt::Display + 'a { + FormatterFn(move |f| { + let _span = debug_span!("stmt", discriminant = ?mem::discriminant(self)).entered(); - struct GenericParamsHelper<'a>(&'a [String], &'a str); + struct GenericTyHelper<'a>(&'a [String]); - impl fmt::Display for GenericParamsHelper<'_> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if !self.0.is_empty() { - write!(f, "<")?; - for generic in self.0 { - write!(f, "{generic}: {}, ", self.1)?; + impl fmt::Display for GenericTyHelper<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + if !self.0.is_empty() { + write!(f, "<")?; + for generic in self.0 { + write!(f, "{generic}, ")?; + } + write!(f, ">")?; } - write!(f, ">")?; + Ok(()) } - Ok(()) } - } - struct WhereBoundHelper<'a>(&'a [String], Option<&'a str>); + struct GenericParamsHelper<'a>(&'a [String], &'a str); - impl fmt::Display for WhereBoundHelper<'_> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if let Some(bound) = self.1 { + impl fmt::Display for GenericParamsHelper<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if !self.0.is_empty() { - writeln!(f, "where")?; + write!(f, "<")?; for generic in self.0 { - writeln!(f, "{generic}{bound},")?; + write!(f, "{generic}: {}, ", self.1)?; } + write!(f, ">")?; } + Ok(()) } - Ok(()) } - } - // TODO: Derive this after https://github.com/madsmtm/objc2/issues/55 - fn unsafe_impl_encode<'a>( - ident: impl fmt::Display + 'a, - encoding: impl fmt::Display + 'a, - ) -> impl fmt::Display + 'a { - FormatterFn(move |f| { - writeln!(f, "#[cfg(feature = \"objc2\")]")?; - writeln!(f, "unsafe impl Encode for {ident} {{")?; - writeln!(f, " const ENCODING: Encoding = {encoding};")?; - writeln!(f, "}}")?; - Ok(()) - }) - } + struct WhereBoundHelper<'a>(&'a [String], Option<&'a str>); - // TODO: Derive this after https://github.com/madsmtm/objc2/issues/55 - fn unsafe_impl_refencode<'a>(ident: impl fmt::Display + 'a) -> impl fmt::Display + 'a { - FormatterFn(move |f| { - writeln!(f, "#[cfg(feature = \"objc2\")]")?; - writeln!(f, "unsafe impl RefEncode for {ident} {{")?; - writeln!( - f, - " const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);" - )?; - writeln!(f, "}}")?; - Ok(()) - }) - } - - match self { - Self::ClassDecl { - id, - required_items: _, - generics, - availability, - superclasses, - designated_initializers: _, - derives, - mutability, - skipped, - sendable, - } => { - if *skipped { - return Ok(()); + impl fmt::Display for WhereBoundHelper<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + if let Some(bound) = self.1 { + if !self.0.is_empty() { + writeln!(f, "where")?; + for generic in self.0 { + writeln!(f, "{generic}{bound},")?; + } + } + } + Ok(()) } + } - let macro_name = if generics.is_empty() { - "extern_class" - } else { - "__inner_extern_class" - }; + // TODO: Derive this after https://github.com/madsmtm/objc2/issues/55 + fn unsafe_impl_encode<'a>( + ident: impl fmt::Display + 'a, + encoding: impl fmt::Display + 'a, + ) -> impl fmt::Display + 'a { + FormatterFn(move |f| { + writeln!(f, "unsafe impl Encode for {ident} {{")?; + writeln!(f, " const ENCODING: Encoding = {encoding};")?; + writeln!(f, "}}")?; + Ok(()) + }) + } - let (superclass, superclasses_rest) = superclasses.split_at(1); - let (superclass, superclass_generics) = superclass - .first() - .expect("must have a least one superclass"); - - writeln!(f, "{macro_name}!(")?; - writeln!(f, " {derives}")?; - write!(f, " {}", self.cfg_gate_ln())?; - write!(f, " {availability}")?; - write!(f, " pub struct {}", id.name)?; - if !generics.is_empty() { - write!(f, "<")?; - for generic in generics { - write!(f, "{generic}: ?Sized = AnyObject, ")?; - } - write!(f, ">")?; - }; - if generics.is_empty() { - writeln!(f, ";")?; - } else { - writeln!(f, " {{")?; + // TODO: Derive this after https://github.com/madsmtm/objc2/issues/55 + fn unsafe_impl_refencode<'a>(ident: impl fmt::Display + 'a) -> impl fmt::Display + 'a { + FormatterFn(move |f| { + writeln!(f, "unsafe impl RefEncode for {ident} {{")?; writeln!( f, - "__superclass: {}{},", - superclass.path_in_relation_to(id.location()), - GenericTyHelper(superclass_generics), + " const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);" )?; - for (i, generic) in generics.iter().enumerate() { - // Invariant over the generic by default - writeln!(f, "_inner{i}: PhantomData<*mut {generic}>,")?; - } - writeln!(f, "notunwindsafe: PhantomData<&'static mut ()>,")?; writeln!(f, "}}")?; - } + Ok(()) + }) + } - writeln!(f)?; - - write!(f, " {}", self.cfg_gate_ln())?; - writeln!( - f, - " unsafe impl{} ClassType for {}{} {{", - GenericParamsHelper(generics, "?Sized + Message"), - id.name, - GenericTyHelper(generics), - )?; - if !superclasses_rest.is_empty() { - write!(f, " #[inherits(")?; - let mut iter = superclasses_rest.iter(); - // Using generics in here is not technically correct, but - // should work for our use-cases. - if let Some((superclass, generics)) = iter.next() { - write!( - f, - "{}{}", - superclass.path_in_relation_to(id.location()), - GenericTyHelper(generics) - )?; + match self { + Self::ClassDecl { + id, + required_items: _, + generics, + availability, + superclasses, + designated_initializers: _, + derives, + mutability, + skipped, + sendable, + } => { + if *skipped { + return Ok(()); } - for (superclass, generics) in iter { - write!( + + let macro_name = if generics.is_empty() { + "extern_class" + } else { + "__inner_extern_class" + }; + + let (superclass, superclasses_rest) = superclasses.split_at(1); + let (superclass, superclass_generics) = superclass + .first() + .expect("must have a least one superclass"); + + writeln!(f, "{macro_name}!(")?; + writeln!(f, " {derives}")?; + write!(f, " {}", self.cfg_gate_ln(config))?; + write!(f, " {availability}")?; + write!(f, " pub struct {}", id.name)?; + if !generics.is_empty() { + write!(f, "<")?; + for generic in generics { + write!(f, "{generic}: ?Sized = AnyObject, ")?; + } + write!(f, ">")?; + }; + if generics.is_empty() { + writeln!(f, ";")?; + } else { + writeln!(f, " {{")?; + writeln!( f, - ", {}{}", + "__superclass: {}{},", superclass.path_in_relation_to(id.location()), - GenericTyHelper(generics) + GenericTyHelper(superclass_generics), )?; + for (i, generic) in generics.iter().enumerate() { + // Invariant over the generic by default + writeln!(f, "_inner{i}: PhantomData<*mut {generic}>,")?; + } + writeln!(f, "notunwindsafe: PhantomData<&'static mut ()>,")?; + writeln!(f, "}}")?; } - writeln!(f, ")]")?; - } - writeln!( - f, - " type Super = {}{};", - superclass.path_in_relation_to(id.location()), - GenericTyHelper(superclass_generics), - )?; - writeln!(f, " type Mutability = {mutability};")?; - if !generics.is_empty() { - writeln!(f)?; - writeln!( - f, - " fn as_super(&self) -> &Self::Super {{ &self.__superclass }}" - )?; - writeln!(f)?; - writeln!(f, " fn as_super_mut(&mut self) -> &mut Self::Super {{ &mut self.__superclass }}")?; - } - writeln!(f, " }}")?; - writeln!(f, ");")?; - if *sendable && generics.is_empty() { writeln!(f)?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "unsafe impl Send for {} {{}}", id.name)?; - writeln!(f)?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "unsafe impl Sync for {} {{}}", id.name)?; - } - } - Self::ExternMethods { - location: _, - availability: _, - cls, - cls_required_items: _, - source_superclass, - cls_generics, - category_name, - methods, - } => { - writeln!(f, "extern_methods!(")?; - if let Some(source_superclass) = source_superclass { + write!(f, " {}", self.cfg_gate_ln(config))?; writeln!( f, - " /// Methods declared on superclass `{}`", - source_superclass.name + " unsafe impl{} ClassType for {}{} {{", + GenericParamsHelper(generics, "?Sized + Message"), + id.name, + GenericTyHelper(generics), )?; - if let Some(category_name) = category_name { - writeln!(f, "///")?; - writeln!(f, " /// {category_name}")?; + if !superclasses_rest.is_empty() { + write!(f, " #[inherits(")?; + let mut iter = superclasses_rest.iter(); + // Using generics in here is not technically correct, but + // should work for our use-cases. + if let Some((superclass, generics)) = iter.next() { + write!( + f, + "{}{}", + superclass.path_in_relation_to(id.location()), + GenericTyHelper(generics) + )?; + } + for (superclass, generics) in iter { + write!( + f, + ", {}{}", + superclass.path_in_relation_to(id.location()), + GenericTyHelper(generics) + )?; + } + writeln!(f, ")]")?; } - } else if let Some(category_name) = category_name { - writeln!(f, " /// {category_name}")?; - } - write!(f, " {}", self.cfg_gate_ln())?; - // TODO: Add ?Sized here once `extern_methods!` supports it. - writeln!( - f, - " unsafe impl{} {}{} {{", - GenericParamsHelper(cls_generics, "Message"), - cls.path(), - GenericTyHelper(cls_generics), - )?; - let required_items = self.required_items(); - for method in methods { - let implied_features = required_items - .iter() - .map(|item| item.location()) - .chain(iter::once(self.location())); - write!( + writeln!( f, - "{}", - cfg_gate_ln(method.required_items(), implied_features) + " type Super = {}{};", + superclass.path_in_relation_to(id.location()), + GenericTyHelper(superclass_generics), )?; - writeln!(f, "{method}")?; - } - writeln!(f, " }}")?; - writeln!(f, ");")?; + writeln!(f, " type Mutability = {mutability};")?; + if !generics.is_empty() { + writeln!(f)?; + writeln!( + f, + " fn as_super(&self) -> &Self::Super {{ &self.__superclass }}" + )?; + writeln!(f)?; + writeln!(f, " fn as_super_mut(&mut self) -> &mut Self::Super {{ &mut self.__superclass }}")?; + } + writeln!(f, " }}")?; + writeln!(f, ");")?; - if let Some(method) = methods.iter().find(|method| method.usable_in_default_id()) { - writeln!(f)?; - // Assume `new` methods require no extra features - write!(f, "{}", self.cfg_gate_ln())?; + if *sendable && generics.is_empty() { + writeln!(f)?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "unsafe impl Send for {} {{}}", id.name)?; + + writeln!(f)?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "unsafe impl Sync for {} {{}}", id.name)?; + } + } + Self::ExternMethods { + location: _, + availability: _, + cls, + cls_required_items: _, + source_superclass, + cls_generics, + category_name, + methods, + } => { + writeln!(f, "extern_methods!(")?; + if let Some(source_superclass) = source_superclass { + writeln!( + f, + " /// Methods declared on superclass `{}`", + source_superclass.name + )?; + if let Some(category_name) = category_name { + writeln!(f, "///")?; + writeln!(f, " /// {category_name}")?; + } + } else if let Some(category_name) = category_name { + writeln!(f, " /// {category_name}")?; + } + write!(f, " {}", self.cfg_gate_ln(config))?; + // TODO: Add ?Sized here once `extern_methods!` supports it. writeln!( f, - "impl{} DefaultId for {}{} {{", + " unsafe impl{} {}{} {{", GenericParamsHelper(cls_generics, "Message"), cls.path(), GenericTyHelper(cls_generics), )?; - writeln!(f, " #[inline]")?; - writeln!(f, " fn default_id() -> Id {{")?; - writeln!(f, " Self::{}()", method.fn_name)?; + let required_items = self.required_items(); + for method in methods { + let implied_features = required_items + .iter() + .map(|item| item.location()) + .chain(iter::once(self.location())); + write!( + f, + "{}", + cfg_gate_ln( + method.required_items(), + implied_features, + config, + self.location() + ) + )?; + writeln!(f, "{method}")?; + } writeln!(f, " }}")?; - writeln!(f, "}}")?; + writeln!(f, ");")?; + + if let Some(method) = + methods.iter().find(|method| method.usable_in_default_id()) + { + writeln!(f)?; + // Assume `new` methods require no extra features + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!( + f, + "impl{} DefaultId for {}{} {{", + GenericParamsHelper(cls_generics, "Message"), + cls.path(), + GenericTyHelper(cls_generics), + )?; + writeln!(f, " #[inline]")?; + writeln!(f, " fn default_id() -> Id {{")?; + writeln!(f, " Self::{}()", method.fn_name)?; + writeln!(f, " }}")?; + writeln!(f, "}}")?; + } } - } - Self::ExternCategory { - id, - actual_name, - availability, - cls, - cls_required_items, - methods, - } => { - writeln!(f, "extern_category!(")?; + Self::ExternCategory { + id, + actual_name, + availability, + cls, + cls_required_items, + methods, + } => { + writeln!(f, "extern_category!(")?; - if let Some(actual_name) = actual_name { - if *actual_name != id.name { - writeln!(f, " /// Category \"{actual_name}\" on [`{}`].", cls.name)?; - writeln!(f, " #[doc(alias = \"{actual_name}\")]")?; + if let Some(actual_name) = actual_name { + if *actual_name != id.name { + writeln!(f, " /// Category \"{actual_name}\" on [`{}`].", cls.name)?; + writeln!(f, " #[doc(alias = \"{actual_name}\")]")?; + } else { + writeln!(f, " /// Category on [`{}`].", cls.name)?; + } } else { writeln!(f, " /// Category on [`{}`].", cls.name)?; } - } else { - writeln!(f, " /// Category on [`{}`].", cls.name)?; - } - write!(f, " {}", self.cfg_gate_ln())?; - write!(f, " {availability}")?; - writeln!(f, " pub unsafe trait {} {{", id.name)?; - let required_items = self.required_items(); - for method in methods { - let implied_features = required_items - .iter() - .map(|item| item.location()) - .chain(iter::once(self.location())); + write!(f, " {}", self.cfg_gate_ln(config))?; + write!(f, " {availability}")?; + writeln!(f, " pub unsafe trait {} {{", id.name)?; + let required_items = self.required_items(); + for method in methods { + let implied_features = required_items + .iter() + .map(|item| item.location()) + .chain(iter::once(self.location())); + write!( + f, + "{}", + cfg_gate_ln( + method.required_items(), + implied_features, + config, + self.location() + ) + )?; + writeln!(f, "{method}")?; + } + writeln!(f, " }}")?; + + writeln!(f)?; + write!( f, - "{}", - cfg_gate_ln(method.required_items(), implied_features) + " {}", + cfg_gate_ln( + cls_required_items, + [self.location()], + config, + self.location() + ) )?; - writeln!(f, "{method}")?; + writeln!( + f, + " unsafe impl {} for {} {{}}", + id.name, + cls.path_in_relation_to(id.location()), + )?; + + writeln!(f, ");")?; } - writeln!(f, " }}")?; - - writeln!(f)?; - - write!( - f, - " {}", - cfg_gate_ln(cls_required_items, [self.location()]) - )?; - writeln!( - f, - " unsafe impl {} for {} {{}}", - id.name, - cls.path_in_relation_to(id.location()), - )?; - - writeln!(f, ");")?; - } - Self::ProtocolImpl { - location: id, - cls, - cls_required_items: _, - generics, - protocol, - protocol_required_items: _, - availability: _, - } => { - let (generic_bound, where_bound) = if !generics.is_empty() { - match (protocol.library(), &*protocol.name) { - // The object inherits from `NSObject` or `NSProxy` no - // matter what the generic type is, so this must be - // safe. - (_, _) if protocol.is_nsobject() => ("?Sized", None), - // Encoding and decoding requires that the inner types - // are codable as well. - ("Foundation", "NSCoding") => ("?Sized + NSCoding", None), - ("Foundation", "NSSecureCoding") => ("?Sized + NSSecureCoding", None), - // Copying collections is done as a shallow copy: - // - // - // E.g. it does a retain count bump on the items, and - // hence does not require the inner type to implement - // `NSCopying`. - // - // The types does have to be cloneable, since generic - // types effectively store an `Id` of the type. - ("Foundation", "NSCopying") => ("?Sized + IsIdCloneable", None), - ("Foundation", "NSMutableCopying") => ("?Sized + IsIdCloneable", None), - // TODO: Do we need further tweaks to this? - ("Foundation", "NSFastEnumeration") => ("?Sized", None), - // AppKit fixes. TODO: Should we add more bounds here? - ("AppKit", "NSCollectionViewDataSource") => ("?Sized", None), - ("AppKit", "NSTableViewDataSource") => ("?Sized", None), - _ => { - error!( - ?protocol, - ?cls, - "unknown where bound for generic protocol impl" - ); - ("?Sized", None) + Self::ProtocolImpl { + location: id, + cls, + cls_required_items: _, + generics, + protocol, + protocol_required_items: _, + availability: _, + } => { + let (generic_bound, where_bound) = if !generics.is_empty() { + match (protocol.library(), &*protocol.name) { + // The object inherits from `NSObject` or `NSProxy` no + // matter what the generic type is, so this must be + // safe. + (_, _) if protocol.is_nsobject() => ("?Sized", None), + // Encoding and decoding requires that the inner types + // are codable as well. + ("Foundation", "NSCoding") => ("?Sized + NSCoding", None), + ("Foundation", "NSSecureCoding") => ("?Sized + NSSecureCoding", None), + // Copying collections is done as a shallow copy: + // + // + // E.g. it does a retain count bump on the items, and + // hence does not require the inner type to implement + // `NSCopying`. + // + // The types does have to be cloneable, since generic + // types effectively store an `Id` of the type. + ("Foundation", "NSCopying") => ("?Sized + IsIdCloneable", None), + ("Foundation", "NSMutableCopying") => ("?Sized + IsIdCloneable", None), + // TODO: Do we need further tweaks to this? + ("Foundation", "NSFastEnumeration") => ("?Sized", None), + // AppKit fixes. TODO: Should we add more bounds here? + ("AppKit", "NSCollectionViewDataSource") => ("?Sized", None), + ("AppKit", "NSTableViewDataSource") => ("?Sized", None), + _ => { + error!( + ?protocol, + ?cls, + "unknown where bound for generic protocol impl" + ); + ("?Sized", None) + } } - } - } else { - ("InvalidGenericBound", None) - }; + } else { + ("InvalidGenericBound", None) + }; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!( - f, - "unsafe impl{} {} for {}{} {}{{}}", - GenericParamsHelper(generics, generic_bound), - protocol.path_in_relation_to(id), - cls.path_in_relation_to(id), - GenericTyHelper(generics), - WhereBoundHelper(generics, where_bound) - )?; - } - Self::ProtocolDecl { - id, - required_items: _, - actual_name, - availability, - protocols, - methods, - required_sendable: _, - required_mainthreadonly, - } => { - writeln!(f, "extern_protocol!(")?; - - write!(f, " {}", self.cfg_gate_ln())?; - write!(f, " {availability}")?; - write!(f, " pub unsafe trait {}", id.name)?; - if !protocols.is_empty() { - for (i, protocol) in protocols.iter().enumerate() { - if i == 0 { + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!( + f, + "unsafe impl{} {} for {}{} {}{{}}", + GenericParamsHelper(generics, generic_bound), + protocol.path_in_relation_to(id), + cls.path_in_relation_to(id), + GenericTyHelper(generics), + WhereBoundHelper(generics, where_bound) + )?; + } + Self::ProtocolDecl { + id, + required_items: _, + actual_name, + availability, + protocols, + methods, + required_sendable: _, + required_mainthreadonly, + } => { + writeln!(f, "extern_protocol!(")?; + + write!(f, " {}", self.cfg_gate_ln(config))?; + write!(f, " {availability}")?; + write!(f, " pub unsafe trait {}", id.name)?; + if !protocols.is_empty() { + for (i, protocol) in protocols.iter().enumerate() { + if i == 0 { + write!(f, ": ")?; + } else { + write!(f, "+ ")?; + } + write!(f, "{}", protocol.path())?; + } + } + // TODO + // if *required_sendable { + // if protocols.is_empty() { + // write!(f, ": ")?; + // } else { + // write!(f, "+ ")?; + // } + // write!(f, "Send + Sync")?; + // } + if *required_mainthreadonly { + if protocols.is_empty() { write!(f, ": ")?; } else { write!(f, "+ ")?; } - write!(f, "{}", protocol.path())?; - } - } - // TODO - // if *required_sendable { - // if protocols.is_empty() { - // write!(f, ": ")?; - // } else { - // write!(f, "+ ")?; - // } - // write!(f, "Send + Sync")?; - // } - if *required_mainthreadonly { - if protocols.is_empty() { - write!(f, ": ")?; - } else { - write!(f, "+ ")?; + write!(f, "IsMainThreadOnly")?; } - write!(f, "IsMainThreadOnly")?; - } - writeln!(f, " {{")?; - - let required_items = self.required_items(); - for method in methods { - let implied_features = required_items - .iter() - .map(|item| item.location()) - .chain(iter::once(self.location())); - write!( - f, - "{}", - cfg_gate_ln(method.required_items(), implied_features) - )?; - writeln!(f, "{method}")?; - } - writeln!(f, " }}")?; - writeln!(f)?; + writeln!(f, " {{")?; - write!(f, " {}", self.cfg_gate_ln())?; - writeln!(f, " unsafe impl ProtocolType for dyn {} {{", id.name)?; - if let Some(actual_name) = actual_name { + let required_items = self.required_items(); + for method in methods { + let implied_features = required_items + .iter() + .map(|item| item.location()) + .chain(iter::once(self.location())); + write!( + f, + "{}", + cfg_gate_ln( + method.required_items(), + implied_features, + config, + self.location() + ) + )?; + writeln!(f, "{method}")?; + } + writeln!(f, " }}")?; writeln!(f)?; - writeln!(f, " const NAME: &'static str = {actual_name:?};")?; - write!(f, " ")?; - } - writeln!(f, "}}")?; - writeln!(f, ");")?; - } - Self::StructDecl { - id, - encoding_name, - availability, - boxable: _, - fields, - sendable, - } => { - write!(f, "{}", self.cfg_gate_ln())?; - write!(f, "{availability}")?; - write!(f, "#[repr(C)]")?; - write!(f, "#[derive(Clone, Copy, Debug, PartialEq)]")?; - writeln!(f, "pub struct {} {{", id.name)?; - for (name, ty) in fields { - write!(f, " ")?; - if !name.starts_with('_') { - write!(f, "pub ")?; + + write!(f, " {}", self.cfg_gate_ln(config))?; + writeln!(f, " unsafe impl ProtocolType for dyn {} {{", id.name)?; + if let Some(actual_name) = actual_name { + writeln!(f)?; + writeln!(f, " const NAME: &'static str = {actual_name:?};")?; + write!(f, " ")?; } - let name = handle_reserved(name); - writeln!(f, "{name}: {},", ty.struct_())?; + writeln!(f, "}}")?; + writeln!(f, ");")?; } - writeln!(f, "}}")?; - writeln!(f)?; - - let encoding = FormatterFn(|f| { - write!( - f, - "Encoding::Struct({:?}, &[", - encoding_name.as_deref().unwrap_or(&id.name), - )?; - for (_, ty) in fields { - write!(f, "<{}>::ENCODING,", ty.struct_())?; + Self::StructDecl { + id, + encoding_name, + availability, + boxable: _, + fields, + sendable, + } => { + write!(f, "{}", self.cfg_gate_ln(config))?; + write!(f, "{availability}")?; + write!(f, "#[repr(C)]")?; + write!(f, "#[derive(Clone, Copy, Debug, PartialEq)]")?; + writeln!(f, "pub struct {} {{", id.name)?; + for (name, ty) in fields { + write!(f, " ")?; + if !name.starts_with('_') { + write!(f, "pub ")?; + } + let name = handle_reserved(name); + writeln!(f, "{name}: {},", ty.struct_())?; } - write!(f, "])")?; - Ok(()) - }); + writeln!(f, "}}")?; + writeln!(f)?; - // SAFETY: The struct is marked `#[repr(C)]`. - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "{}", unsafe_impl_encode(&id.name, encoding))?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "{}", unsafe_impl_refencode(&id.name))?; + let encoding = FormatterFn(|f| { + write!( + f, + "Encoding::Struct({:?}, &[", + encoding_name.as_deref().unwrap_or(&id.name), + )?; + for (_, ty) in fields { + write!(f, "<{}>::ENCODING,", ty.struct_())?; + } + write!(f, "])")?; + Ok(()) + }); - if let Some(true) = sendable { - writeln!(f)?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "unsafe impl Send for {} {{}}", id.name)?; + // SAFETY: The struct is marked `#[repr(C)]`. + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "{}", unsafe_impl_encode(&id.name, encoding))?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "{}", unsafe_impl_refencode(&id.name))?; - writeln!(f)?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "unsafe impl Sync for {} {{}}", id.name)?; + if let Some(true) = sendable { + writeln!(f)?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "unsafe impl Send for {} {{}}", id.name)?; + + writeln!(f)?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "unsafe impl Sync for {} {{}}", id.name)?; + } } - } - Self::EnumDecl { - id, - availability, - ty, - kind, - variants, - sendable, - } => { - match kind { + Self::EnumDecl { + id, + availability, + ty, + kind, + variants, + sendable, + } => { + match kind { // TODO: Once Rust gains support for more precisely // specifying niches, use that to convert this into a // native enum with a hidden variant that contains the @@ -2048,7 +2101,7 @@ impl fmt::Display for Stmt { _ => unreachable!(), } - write!(f, "{}", self.cfg_gate_ln())?; + write!(f, "{}", self.cfg_gate_ln(config))?; write!(f, "{availability}")?; writeln!(f, "#[repr(transparent)]")?; // TODO: Implement `Debug` manually @@ -2063,7 +2116,7 @@ impl fmt::Display for Stmt { // or a crash, if the invalid value is used). writeln!(f, "pub struct {}(pub {});", id.name, ty.enum_())?; - write!(f, "{}", self.cfg_gate_ln())?; + write!(f, "{}", self.cfg_gate_ln(config))?; writeln!(f, "impl {} {{", id.name)?; let required_items = self.required_items(); @@ -2072,7 +2125,7 @@ impl fmt::Display for Stmt { .iter() .map(|item| item.location()) .chain(iter::once(self.location())); - write!(f, " {}", cfg_gate_ln(expr.required_items(), implied_features))?; + write!(f, " {}", cfg_gate_ln(expr.required_items(), implied_features, config, self.location()))?; write!(f, " {availability}")?; let pretty_name = enum_constant_name(&id.name, name); if pretty_name != name { @@ -2089,7 +2142,7 @@ impl fmt::Display for Stmt { // Rust enum (which in turn will assume that the // unused patterns are valid to use as a niche). writeln!(f, "// NS_CLOSED_ENUM")?; - write!(f, "{}", self.cfg_gate_ln())?; + write!(f, "{}", self.cfg_gate_ln(config))?; write!(f, "{availability}")?; writeln!(f, "{}", ty.closed_enum_repr())?; writeln!( @@ -2104,7 +2157,7 @@ impl fmt::Display for Stmt { .iter() .map(|item| item.location()) .chain(iter::once(self.location())); - write!(f, " {}", cfg_gate_ln(expr.required_items(), implied_features))?; + write!(f, " {}", cfg_gate_ln(expr.required_items(), implied_features, config, self.location()))?; write!(f, " {availability}")?; let pretty_name = enum_constant_name(&id.name, name); if pretty_name != name { @@ -2118,172 +2171,173 @@ impl fmt::Display for Stmt { _ => panic!("invalid enum kind"), } - // SAFETY: The enum is either a `#[repr(transparent)]` newtype - // over the type, or a `#[repr(REPR)]`, where REPR is a valid - // repr with the same size and alignment as the type. - write!(f, "{}", self.cfg_gate_ln())?; - let encoding = format!("{}::ENCODING", ty.enum_()); - writeln!(f, "{}", unsafe_impl_encode(&id.name, encoding))?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "{}", unsafe_impl_refencode(&id.name))?; + // SAFETY: The enum is either a `#[repr(transparent)]` newtype + // over the type, or a `#[repr(REPR)]`, where REPR is a valid + // repr with the same size and alignment as the type. + write!(f, "{}", self.cfg_gate_ln(config))?; + let encoding = format!("{}::ENCODING", ty.enum_()); + writeln!(f, "{}", unsafe_impl_encode(&id.name, encoding))?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "{}", unsafe_impl_refencode(&id.name))?; - if let Some(true) = sendable { - writeln!(f)?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "unsafe impl Send for {} {{}}", id.name)?; + if let Some(true) = sendable { + writeln!(f)?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "unsafe impl Send for {} {{}}", id.name)?; - writeln!(f)?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "unsafe impl Sync for {} {{}}", id.name)?; + writeln!(f)?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "unsafe impl Sync for {} {{}}", id.name)?; + } } - } - Self::ConstDecl { - id, - availability, - ty, - value, - is_last, - } => { - write!(f, "{}", self.cfg_gate_ln())?; - write!(f, "{availability}")?; - write!(f, "pub const {}: {} = {value};", id.name, ty.enum_())?; - if *is_last { - writeln!(f)?; + Self::ConstDecl { + id, + availability, + ty, + value, + is_last, + } => { + write!(f, "{}", self.cfg_gate_ln(config))?; + write!(f, "{availability}")?; + write!(f, "pub const {}: {} = {value};", id.name, ty.enum_())?; + if *is_last { + writeln!(f)?; + } } - } - Self::VarDecl { - id, - availability: _, - ty, - value: None, - } => { - writeln!(f, "extern \"C\" {{")?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "pub static {}: {};", id.name, ty.var())?; - writeln!(f, "}}")?; - } - Self::VarDecl { - id, - availability: _, - ty, - value: Some(expr), - } => { - write!(f, "{}", self.cfg_gate_ln())?; - write!(f, "pub static {}: {} = ", id.name, ty.var())?; - - if ty.is_floating_through_typedef() { - write!(f, "{expr} as _")?; - } else if ty.is_enum_through_typedef() { - write!(f, "{}({expr})", ty.var())?; - } else { - write!(f, "{expr}")?; + Self::VarDecl { + id, + availability: _, + ty, + value: None, + } => { + writeln!(f, "extern \"C\" {{")?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "pub static {}: {};", id.name, ty.var())?; + writeln!(f, "}}")?; } - writeln!(f, ";")?; - } - Self::FnDecl { - id, - availability: _, - arguments, - result_type, - body: Some(_), - safe: _, - } => { - write!(f, "// TODO: ")?; - write!(f, "pub fn {}(", id.name)?; - for (param, arg_ty) in arguments { - let param = handle_reserved(&crate::to_snake_case(param)); - write!(f, "{param}: {},", arg_ty.fn_argument())?; + Self::VarDecl { + id, + availability: _, + ty, + value: Some(expr), + } => { + write!(f, "{}", self.cfg_gate_ln(config))?; + write!(f, "pub static {}: {} = ", id.name, ty.var())?; + + if ty.is_floating_through_typedef() { + write!(f, "{expr} as _")?; + } else if ty.is_enum_through_typedef() { + write!(f, "{}({expr})", ty.var())?; + } else { + write!(f, "{expr}")?; + } + writeln!(f, ";")?; } - writeln!(f, "){};", result_type.fn_return())?; - } - Self::FnDecl { - id, - availability, - arguments, - result_type, - body: None, - safe: false, - } => { - writeln!(f, "extern \"C\" {{")?; - - write!(f, " {}", self.cfg_gate_ln())?; - write!(f, " {availability}")?; - write!(f, " pub fn {}(", id.name)?; - for (param, arg_ty) in arguments { - let param = handle_reserved(&crate::to_snake_case(param)); - write!(f, "{param}: {},", arg_ty.fn_argument())?; + Self::FnDecl { + id, + availability: _, + arguments, + result_type, + body: Some(_), + safe: _, + } => { + write!(f, "// TODO: ")?; + write!(f, "pub fn {}(", id.name)?; + for (param, arg_ty) in arguments { + let param = handle_reserved(&crate::to_snake_case(param)); + write!(f, "{param}: {},", arg_ty.fn_argument())?; + } + writeln!(f, "){};", result_type.fn_return())?; } - write!(f, "){}", result_type.fn_return())?; - writeln!(f, ";")?; + Self::FnDecl { + id, + availability, + arguments, + result_type, + body: None, + safe: false, + } => { + writeln!(f, "extern \"C\" {{")?; + + write!(f, " {}", self.cfg_gate_ln(config))?; + write!(f, " {availability}")?; + write!(f, " pub fn {}(", id.name)?; + for (param, arg_ty) in arguments { + let param = handle_reserved(&crate::to_snake_case(param)); + write!(f, "{param}: {},", arg_ty.fn_argument())?; + } + write!(f, "){}", result_type.fn_return())?; + writeln!(f, ";")?; - writeln!(f, "}}")?; - } - Self::FnDecl { - id, - availability, - arguments, - result_type, - body: None, - safe: true, - } => { - write!(f, "{}", self.cfg_gate_ln())?; - write!(f, "{availability}")?; - writeln!(f, "#[inline]")?; - write!(f, "pub extern \"C\" fn {}(", id.name)?; - for (param, arg_ty) in arguments { - let param = handle_reserved(&crate::to_snake_case(param)); - write!(f, "{param}: {},", arg_ty.fn_argument())?; + writeln!(f, "}}")?; } - writeln!(f, "){} {{", result_type.fn_return())?; - - writeln!(f, " extern \"C\" {{")?; + Self::FnDecl { + id, + availability, + arguments, + result_type, + body: None, + safe: true, + } => { + write!(f, "{}", self.cfg_gate_ln(config))?; + write!(f, "{availability}")?; + writeln!(f, "#[inline]")?; + write!(f, "pub extern \"C\" fn {}(", id.name)?; + for (param, arg_ty) in arguments { + let param = handle_reserved(&crate::to_snake_case(param)); + write!(f, "{param}: {},", arg_ty.fn_argument())?; + } + writeln!(f, "){} {{", result_type.fn_return())?; - write!(f, " fn {}(", id.name)?; - for (param, arg_ty) in arguments { - let param = handle_reserved(&crate::to_snake_case(param)); - write!(f, "{param}: {},", arg_ty.fn_argument())?; - } - writeln!(f, "){};", result_type.fn_return())?; + writeln!(f, " extern \"C\" {{")?; - writeln!(f, " }}")?; + write!(f, " fn {}(", id.name)?; + for (param, arg_ty) in arguments { + let param = handle_reserved(&crate::to_snake_case(param)); + write!(f, "{param}: {},", arg_ty.fn_argument())?; + } + writeln!(f, "){};", result_type.fn_return())?; - write!(f, " unsafe {{ {}(", id.name)?; - for (param, _) in arguments { - let param = handle_reserved(&crate::to_snake_case(param)); - write!(f, "{param},")?; - } - writeln!(f, ") }}")?; + writeln!(f, " }}")?; - writeln!(f, "}}")?; - } - Self::AliasDecl { - id, - availability: _, - ty, - kind, - } => { - match kind { - Some(UnexposedAttr::TypedEnum) => { - // TODO: Handle this differently - writeln!(f, "// NS_TYPED_ENUM")?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "pub type {} = {};", id.name, ty.typedef())?; - } - Some(UnexposedAttr::TypedExtensibleEnum) => { - // TODO: Handle this differently - writeln!(f, "// NS_TYPED_EXTENSIBLE_ENUM")?; - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "pub type {} = {};", id.name, ty.typedef())?; + write!(f, " unsafe {{ {}(", id.name)?; + for (param, _) in arguments { + let param = handle_reserved(&crate::to_snake_case(param)); + write!(f, "{param},")?; } - None | Some(UnexposedAttr::BridgedTypedef) => { - // "bridged" typedefs should use a normal type alias. - write!(f, "{}", self.cfg_gate_ln())?; - writeln!(f, "pub type {} = {};", id.name, ty.typedef())?; + writeln!(f, ") }}")?; + + writeln!(f, "}}")?; + } + Self::AliasDecl { + id, + availability: _, + ty, + kind, + } => { + match kind { + Some(UnexposedAttr::TypedEnum) => { + // TODO: Handle this differently + writeln!(f, "// NS_TYPED_ENUM")?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "pub type {} = {};", id.name, ty.typedef())?; + } + Some(UnexposedAttr::TypedExtensibleEnum) => { + // TODO: Handle this differently + writeln!(f, "// NS_TYPED_EXTENSIBLE_ENUM")?; + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "pub type {} = {};", id.name, ty.typedef())?; + } + None | Some(UnexposedAttr::BridgedTypedef) => { + // "bridged" typedefs should use a normal type alias. + write!(f, "{}", self.cfg_gate_ln(config))?; + writeln!(f, "pub type {} = {};", id.name, ty.typedef())?; + } + kind => panic!("invalid alias kind {kind:?} for {ty:?}"), } - kind => panic!("invalid alias kind {kind:?} for {ty:?}"), } - } - }; - Ok(()) + }; + Ok(()) + }) } } diff --git a/crates/header-translator/translation-config.toml b/crates/header-translator/translation-config.toml index 7684cb249..c05882c98 100644 --- a/crates/header-translator/translation-config.toml +++ b/crates/header-translator/translation-config.toml @@ -5,7 +5,8 @@ ### [library.Accessibility] -imports = ["Foundation"] +crate = "objc2-accessibility" +required-dependencies = ["objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" @@ -14,27 +15,33 @@ watchos = "7.0" visionos = "1.0" [library.AdServices] -imports = ["Foundation"] +crate = "objc2-ad-services" +required-dependencies = ["objc2-foundation"] macos = "11.1" maccatalyst = "14.3" ios = "14.3" visionos = "1.0" [library.AdSupport] -imports = ["Foundation"] +crate = "objc2-ad-support" +required-dependencies = ["objc2-foundation"] macos = "10.14" maccatalyst = "13.0" ios = "6.0" tvos = "9.0" [library.AppKit] -imports = ["CoreData", "Foundation"] -cfg-apple-link = true +crate = "objc2-app-kit" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.0" maccatalyst = "13.0" +gnustep = true [library.AuthenticationServices] -imports = ["AppKit", "Foundation"] +crate = "objc2-authentication-services" +required-dependencies = ["objc2-app-kit", "objc2-foundation"] +custom-lib-rs = true macos = "10.15" maccatalyst = "13.0" ios = "12.0" @@ -43,39 +50,46 @@ watchos = "6.0" visionos = "1.0" [library.AutomaticAssessmentConfiguration] -imports = ["Foundation"] +crate = "objc2-automatic-assessment-configuration" +required-dependencies = ["objc2-foundation"] macos = "10.15.4" maccatalyst = "13.4" ios = "13.4" visionos = "1.0" [library.Automator] -imports = ["AppKit", "Foundation", "OSAKit"] +crate = "objc2-automator" +required-dependencies = ["objc2-foundation"] macos = "10.4" maccatalyst = "14.0" [library.BackgroundAssets] -imports = ["Foundation"] +crate = "objc2-background-assets" +required-dependencies = ["objc2-foundation"] macos = "13.0" maccatalyst = "16.0" ios = "16.0" visionos = "1.0" [library.BackgroundTasks] -imports = ["Foundation"] +crate = "objc2-background-tasks" +required-dependencies = ["objc2-foundation"] maccatalyst = "13.0" ios = "13.0" tvos = "13.0" visionos = "1.0" [library.BusinessChat] -imports = ["AppKit", "Foundation"] +crate = "objc2-business-chat" +required-dependencies = ["objc2-app-kit", "objc2-foundation"] macos = "10.14" maccatalyst = "13.0" # Unsure ios = "11.0" # Unsure [library.CallKit] -imports = ["Foundation"] +crate = "objc2-call-kit" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "13.0" maccatalyst = "13.0" ios = "10.0" @@ -83,14 +97,16 @@ watchos = "9.0" visionos = "1.0" [library.ClassKit] -imports = ["Foundation"] +crate = "objc2-class-kit" +required-dependencies = ["objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "11.4" visionos = "1.0" [library.CloudKit] -imports = ["CoreLocation", "Foundation"] +crate = "objc2-cloud-kit" +required-dependencies = ["objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "8.0" @@ -99,7 +115,8 @@ watchos = "3.0" visionos = "1.0" [library.Contacts] -imports = ["Foundation"] +crate = "objc2-contacts" +required-dependencies = ["objc2-foundation"] macos = "10.11" maccatalyst = "13.0" ios = "9.0" @@ -107,17 +124,19 @@ watchos = "2.0" visionos = "1.0" [library.CoreData] -imports = ["Foundation"] -cfg-apple-link = true +crate = "objc2-core-data" +required-dependencies = ["objc2-foundation"] macos = "10.4" maccatalyst = "13.0" ios = "3.0" tvos = "9.0" watchos = "2.0" visionos = "1.0" +gnustep = true [library.CoreLocation] -imports = ["Contacts", "Foundation"] +crate = "objc2-core-location" +required-dependencies = ["objc2-foundation"] # macos = "10.6" macos = "10.11" # Temporarily raised since `CoreLocation` imports `Contacts` maccatalyst = "13.0" @@ -127,12 +146,14 @@ watchos = "2.0" visionos = "1.0" [library.CoreWLAN] -imports = ["Foundation"] +crate = "objc2-core-wlan" +required-dependencies = ["objc2-foundation"] macos = "10.6" maccatalyst = "13.0" [library.DataDetection] -imports = ["Foundation"] +crate = "objc2-data-detection" +required-dependencies = ["objc2-foundation"] macos = "12.0" maccatalyst = "15.0" ios = "15.0" @@ -141,7 +162,8 @@ watchos = "8.0" visionos = "1.0" [library.DeviceCheck] -imports = ["Foundation"] +crate = "objc2-device-check" +required-dependencies = ["objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "11.0" @@ -150,7 +172,8 @@ watchos = "9.0" visionos = "1.0" [library.EventKit] -imports = ["AppKit", "CoreLocation", "Foundation", "MapKit"] +crate = "objc2-event-kit" +required-dependencies = ["objc2-foundation"] macos = "10.8" maccatalyst = "13.0" ios = "4.0" @@ -158,12 +181,14 @@ watchos = "2.0" visionos = "1.0" [library.ExceptionHandling] -imports = ["Foundation"] +crate = "objc2-exception-handling" +required-dependencies = ["objc2-foundation"] macos = "10.0" maccatalyst = "13.0" [library.ExtensionKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-extension-kit" +required-dependencies = ["objc2-foundation"] macos = "13.0" maccatalyst = "13.0" ios = "16.1" @@ -172,7 +197,8 @@ watchos = "9.0" visionos = "1.0" [library.ExternalAccessory] -imports = ["Foundation"] +crate = "objc2-external-accessory" +required-dependencies = ["objc2-foundation"] macos = "10.13" maccatalyst = "16.0" ios = "3.0" @@ -180,40 +206,36 @@ tvos = "10.0" visionos = "1.0" [library.FileProvider] -imports = ["AppKit", "Foundation", "UniformTypeIdentifiers"] +crate = "objc2-file-provider" +required-dependencies = ["objc2-foundation"] macos = "10.15" ios = "11.0" visionos = "1.0" [library.FileProviderUI] -imports = ["AppKit", "FileProvider", "Foundation"] +crate = "objc2-file-provider-ui" +required-dependencies = ["objc2-file-provider", "objc2-foundation"] macos = "10.15" maccatalyst = "15.0" ios = "11.0" visionos = "1.0" [library.Foundation] -imports = [] -cfg-apple-link = true -extra-features = [ - "objc2", - "block2", - # Ord, Debug and other such fundamental impls requires these. - "Foundation_NSObjCRuntime", - # Some fmt::Debug impls require these - "Foundation_NSString", - "Foundation_NSDictionary", - "Foundation_NSEnumerator", -] +crate = "objc2-foundation" +required-dependencies = [] +custom-lib-rs = true macos = "10.0" maccatalyst = "13.0" ios = "2.0" tvos = "9.0" watchos = "2.0" visionos = "1.0" +gnustep = true [library.GameController] -imports = ["AppKit", "Foundation"] +crate = "objc2-game-controller" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.9" maccatalyst = "13.0" ios = "7.0" @@ -221,7 +243,8 @@ tvos = "9.0" visionos = "1.0" [library.GameKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-game-kit" +required-dependencies = ["objc2-foundation"] macos = "10.8" maccatalyst = "13.0" ios = "3.0" @@ -230,7 +253,8 @@ watchos = "3.0" visionos = "1.0" [library.HealthKit] -imports = ["CoreLocation", "Foundation", "UniformTypeIdentifiers"] +crate = "objc2-health-kit" +required-dependencies = ["objc2-foundation"] macos = "13.0" maccatalyst = "13.0" ios = "8.0" @@ -238,19 +262,32 @@ watchos = "2.0" visionos = "1.0" [library.IdentityLookup] -imports = ["Foundation"] +crate = "objc2-identity-lookup" +required-dependencies = ["objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "11.0" visionos = "1.0" [library.InputMethodKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-input-method-kit" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.5" maccatalyst = "13.0" # Unsure +[library.LinkPresentation] +crate = "objc2-link-presentation" +required-dependencies = ["objc2-foundation"] +macos = "10.15" +maccatalyst = "13.0" +ios = "13.0" +tvos = "14.0" +visionos = "1.0" + [library.LocalAuthentication] -imports = ["Foundation"] +crate = "objc2-local-authentication" +required-dependencies = ["objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "8.0" @@ -258,26 +295,22 @@ watchos = "9.0" visionos = "1.0" [library.LocalAuthenticationEmbeddedUI] -imports = ["AppKit", "Foundation", "LocalAuthentication"] +crate = "objc2-local-authentication-embedded-ui" +required-dependencies = ["objc2-foundation", "objc2-local-authentication"] macos = "12.0" maccatalyst = "16.0" ios = "16.0" visionos = "1.0" -[library.LinkPresentation] -imports = ["AppKit", "Foundation"] -macos = "10.15" -maccatalyst = "13.0" -ios = "13.0" -tvos = "14.0" -visionos = "1.0" - [library.MailKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-mail-kit" +required-dependencies = ["objc2-foundation"] macos = "12.0" [library.MapKit] -imports = ["AppKit", "Contacts", "CoreLocation", "Foundation"] +crate = "objc2-map-kit" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.9" maccatalyst = "13.0" ios = "3.0" @@ -286,7 +319,8 @@ watchos = "2.0" visionos = "1.0" [library.MediaPlayer] -imports = ["AppKit", "Foundation"] +crate = "objc2-media-player" +required-dependencies = ["objc2-foundation"] macos = "10.12.1" maccatalyst = "13.0" ios = "2.0" @@ -295,7 +329,9 @@ watchos = "5.0" visionos = "1.0" [library.Metal] -imports = ["Foundation"] +crate = "objc2-metal" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.11" maccatalyst = "13.0" ios = "8.0" @@ -303,14 +339,16 @@ tvos = "9.0" visionos = "1.0" [library.MetalFX] -imports = ["Foundation", "Metal"] +crate = "objc2-metal-fx" +required-dependencies = ["objc2-foundation", "objc2-metal"] macos = "13.0" maccatalyst = "16.0" ios = "16.0" visionos = "1.0" [library.MetalKit] -imports = ["AppKit", "Foundation", "Metal"] +crate = "objc2-metal-kit" +required-dependencies = ["objc2-foundation", "objc2-metal"] macos = "10.11" maccatalyst = "13.0" ios = "9.0" @@ -318,14 +356,18 @@ tvos = "9.0" visionos = "1.0" [library.MetricKit] -imports = ["Foundation"] +crate = "objc2-metric-kit" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "12.0" maccatalyst = "13.0" ios = "13.0" visionos = "1.0" [library.Photos] -imports = ["AppKit", "CoreLocation", "Foundation", "UniformTypeIdentifiers"] +crate = "objc2-photos" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.11" maccatalyst = "13.0" ios = "8.0" @@ -334,11 +376,14 @@ watchos = "9.0" visionos = "1.0" [library.OSAKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-osa-kit" +required-dependencies = ["objc2-app-kit", "objc2-foundation"] macos = "10.4" [library.QuartzCore] -imports = ["Foundation"] +crate = "objc2-quartz-core" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.3" maccatalyst = "13.0" ios = "2.0" @@ -346,12 +391,14 @@ tvos = "9.0" visionos = "1.0" [library.ServiceManagement] -imports = ["Foundation"] +crate = "objc2-service-management" +required-dependencies = ["objc2-foundation"] macos = "10.6" maccatalyst = "13.0" [library.SoundAnalysis] -imports = ["Foundation"] +crate = "objc2-sound-analysis" +required-dependencies = ["objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "13.0" @@ -360,14 +407,16 @@ watchos = "9.0" visionos = "1.0" [library.Speech] -imports = ["Foundation"] +crate = "objc2-speech" +required-dependencies = ["objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "10.0" visionos = "1.0" [library.StoreKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-store-kit" +required-dependencies = ["objc2-foundation"] macos = "10.7" maccatalyst = "13.0" ios = "3.0" @@ -376,7 +425,8 @@ watchos = "6.2" visionos = "1.0" [library.UniformTypeIdentifiers] -imports = ["Foundation"] +crate = "objc2-uniform-type-identifiers" +required-dependencies = ["objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" @@ -385,7 +435,8 @@ watchos = "7.0" visionos = "1.0" [library.UserNotifications] -imports = ["CoreLocation", "Foundation"] +crate = "objc2-user-notifications" +required-dependencies = ["objc2-foundation"] macos = "10.14" maccatalyst = "13.0" ios = "10.0" @@ -394,7 +445,9 @@ watchos = "3.0" visionos = "1.0" [library.WebKit] -imports = ["AppKit", "Foundation"] +crate = "objc2-web-kit" +required-dependencies = ["objc2-foundation"] +custom-lib-rs = true macos = "10.2" maccatalyst = "13.0" ios = "16.0" diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml deleted file mode 100644 index 21743bb16..000000000 --- a/crates/icrate/Cargo.toml +++ /dev/null @@ -1,3842 +0,0 @@ -[package] -name = "icrate" -version = "0.1.0" # Remember to update html_root_url in lib.rs -authors = ["Mads Marquart "] -edition = "2021" -rust-version = "1.60" - -description = "Bindings to Apple's frameworks" -keywords = ["macos", "ios", "cocoa", "apple", "framework"] -categories = [ - "accessibility", - "api-bindings", - "development-tools::ffi", - "external-ffi-bindings", - "os::macos-apis", -] -readme = "README.md" -repository = "https://github.com/madsmtm/objc2" -documentation = "https://docs.rs/icrate/" -license = "MIT" - -[lints] -workspace = true - -[dependencies] -objc2 = { path = "../objc2", version = "0.5.0", default-features = false, optional = true } -block2 = { path = "../block2", version = "0.4.0", default-features = false, optional = true } -dispatch = { version = "0.2.0", optional = true } - -[dev-dependencies] -static_assertions = "1.1.0" - -[package.metadata.docs.rs] -default-target = "x86_64-apple-darwin" -features = ["block2", "objc2", "dispatch", "unstable-frameworks-all", "unstable-private", "unstable-docsrs"] - -targets = [ - # MacOS - "x86_64-apple-darwin", - "aarch64-apple-darwin", - # "i686-apple-darwin", - # iOS - "aarch64-apple-ios", - "x86_64-apple-ios", - # "i386-apple-ios", - # GNUStep - "x86_64-unknown-linux-gnu", - "i686-unknown-linux-gnu", - # Windows - "x86_64-pc-windows-msvc", -] - -[[example]] -name = "basic_usage" -required-features = [ - "unstable-example-basic_usage" -] - -[[example]] -name = "delegate" -required-features = [ - "unstable-example-delegate" -] - -[[example]] -name = "speech_synthesis" -required-features = [ - "unstable-example-speech_synthesis" -] - -[[example]] -name = "nspasteboard" -required-features = [ - "unstable-example-nspasteboard" -] - -[[example]] -name = "browser" -required-features = [ - "unstable-example-browser" -] - -[[example]] -name = "metal" -required-features = [ - "unstable-example-metal" -] - -[features] -default = ["std", "apple"] - -# Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2?/std", "block2?/std"] -alloc = ["objc2?/alloc", "block2?/alloc"] - -# Runtime selection. See `objc-sys` for details. -apple = ["objc2?/apple", "block2?/apple"] -gnustep-1-7 = ["objc2?/gnustep-1-7", "block2?/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "objc2?/gnustep-1-8", "block2?/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "objc2?/gnustep-1-9", "block2?/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "objc2?/gnustep-2-0", "block2?/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "objc2?/gnustep-2-1", "block2?/gnustep-2-1"] - -# Deprecated. -objective-c = ["objc2"] - -# Deprecated. -block = ["block2"] - -# For better documentation on docs.rs -unstable-docsrs = [] - -# Private framework functionality -# -# These functions/methods are all marked `unsafe`, since they may not always -# exist. -unstable-private = [] - -# Make the `ns_string!` macro create the string statically. -# -# Please test it, and report any issues you may find: -# https://github.com/madsmtm/objc2/issues/new -unstable-static-nsstring = [] - -# Examples - -unstable-example-basic_usage = [ - "Foundation", - "Foundation_NSArray", - "Foundation_NSDictionary", - "Foundation_NSEnumerator", - "Foundation_NSRange", - "Foundation_NSObject", -] -unstable-example-delegate = [ - "apple", - "Foundation", - "Foundation_NSNotification", - "Foundation_NSString", - "Foundation_NSThread", - "Foundation_NSObject", - "AppKit", - "AppKit_NSResponder", - "AppKit_NSApplication", - "AppKit_NSRunningApplication", -] -unstable-example-speech_synthesis = [ - "apple", - "Foundation", - "Foundation_NSString", - "Foundation_NSObject", -] -unstable-example-nspasteboard = [ - "apple", - "Foundation", - "Foundation_NSArray", - "Foundation_NSString", - "Foundation_NSObject", - "AppKit", - "AppKit_NSPasteboard", -] -unstable-example-browser = [ - "apple", - "AppKit", - "AppKit_NSButton", - "AppKit_NSButtonCell", - "AppKit_NSColor", - "AppKit_NSMenu", - "AppKit_NSMenuItem", - "AppKit_NSStackView", - "AppKit_NSText", - "AppKit_NSTextField", - "AppKit_NSTextView", - "AppKit_NSView", - "AppKit_NSWindow", - "AppKit_NSResponder", - "AppKit_NSControl", - "AppKit_NSApplication", - "AppKit_NSRunningApplication", - "AppKit_NSGraphics", - "AppKit_NSLayoutConstraint", - "AppKit_NSUserInterfaceLayout", - "Foundation", - "Foundation_NSNotification", - "Foundation_NSString", - "Foundation_NSThread", - "Foundation_NSURL", - "Foundation_NSURLRequest", - "Foundation_NSGeometry", - "WebKit", - "WebKit_WKNavigation", - "WebKit_WKNavigationDelegate", - "WebKit_WKWebView", -] -unstable-example-metal = [ - "apple", - "AppKit", - "AppKit_NSGraphics", - "AppKit_NSWindow", - "AppKit_NSResponder", - "AppKit_NSApplication", - "AppKit_NSRunningApplication", - "AppKit_NSView", - "Foundation", - "Foundation_NSDate", - "Foundation_NSError", - "Foundation_NSNotification", - "Foundation_NSString", - "Foundation_NSThread", - "Foundation_NSGeometry", - "Metal", - "Metal_MTLLibrary", - "Metal_MTLRenderPipeline", - "Metal_MTLRenderCommandEncoder", - "Metal_MTLCommandBuffer", - "Metal_MTLCommandEncoder", - "Metal_MTLCommandQueue", - "Metal_MTLPixelFormat", - "Metal_MTLDevice", - "Metal_MTLDrawable", - "Metal_MTLRenderPass", - "MetalKit", - "MetalKit_MTKView", -] - -# Helps with CI -unstable-frameworks-all = ["unstable-frameworks-ios", "unstable-frameworks-macos-13"] -# TODO: Autogenerate this -unstable-frameworks-ios = ["Foundation_all", "unstable-example-basic_usage", "unstable-example-speech_synthesis"] - -# This section has been automatically generated by `objc2`'s `header-translator`. -# DO NOT EDIT -Accessibility = [ - "Foundation", -] -Accessibility_AXAudiograph = [] -Accessibility_AXBrailleMap = [] -Accessibility_AXColorUtilities = [] -Accessibility_AXCustomContent = [] -Accessibility_AXFoundation = [] -Accessibility_AXHearingUtilities = [] -Accessibility_AXSettings = [] -Accessibility_all = [ - "Accessibility", - "Accessibility_AXAudiograph", - "Accessibility_AXBrailleMap", - "Accessibility_AXColorUtilities", - "Accessibility_AXCustomContent", - "Accessibility_AXFoundation", - "Accessibility_AXHearingUtilities", - "Accessibility_AXSettings", -] -AdServices = [ - "Foundation", -] -AdServices_AAAttribution = [] -AdServices_all = [ - "AdServices", - "AdServices_AAAttribution", -] -AdSupport = [ - "Foundation", -] -AdSupport_ASIdentifierManager = [] -AdSupport_all = [ - "AdSupport", - "AdSupport_ASIdentifierManager", -] -AppKit = [ - "CoreData", - "Foundation", -] -AppKit_AppKitDefines = [] -AppKit_AppKitErrors = [] -AppKit_NSATSTypesetter = [] -AppKit_NSAccessibility = [] -AppKit_NSAccessibilityColor = [] -AppKit_NSAccessibilityConstants = [] -AppKit_NSAccessibilityCustomAction = [] -AppKit_NSAccessibilityCustomRotor = [] -AppKit_NSAccessibilityElement = [] -AppKit_NSAccessibilityProtocols = [] -AppKit_NSActionCell = [] -AppKit_NSAffineTransform = [] -AppKit_NSAlert = [] -AppKit_NSAlignmentFeedbackFilter = [] -AppKit_NSAnimation = [] -AppKit_NSAnimationContext = [] -AppKit_NSAppearance = [] -AppKit_NSAppleScriptExtensions = [] -AppKit_NSApplication = [] -AppKit_NSApplicationScripting = [] -AppKit_NSArrayController = [] -AppKit_NSAttributedString = [] -AppKit_NSBezierPath = [] -AppKit_NSBitmapImageRep = [] -AppKit_NSBox = [] -AppKit_NSBrowser = [] -AppKit_NSBrowserCell = [] -AppKit_NSButton = [] -AppKit_NSButtonCell = [] -AppKit_NSButtonTouchBarItem = [] -AppKit_NSCIImageRep = [] -AppKit_NSCachedImageRep = [] -AppKit_NSCandidateListTouchBarItem = [] -AppKit_NSCell = [] -AppKit_NSClickGestureRecognizer = [] -AppKit_NSClipView = [] -AppKit_NSCollectionView = [] -AppKit_NSCollectionViewCompositionalLayout = [] -AppKit_NSCollectionViewFlowLayout = [] -AppKit_NSCollectionViewGridLayout = [] -AppKit_NSCollectionViewLayout = [] -AppKit_NSCollectionViewTransitionLayout = [] -AppKit_NSColor = [] -AppKit_NSColorList = [] -AppKit_NSColorPanel = [] -AppKit_NSColorPicker = [] -AppKit_NSColorPickerTouchBarItem = [] -AppKit_NSColorPicking = [] -AppKit_NSColorSampler = [] -AppKit_NSColorSpace = [] -AppKit_NSColorWell = [] -AppKit_NSComboBox = [] -AppKit_NSComboBoxCell = [] -AppKit_NSComboButton = [] -AppKit_NSControl = [] -AppKit_NSController = [] -AppKit_NSCursor = [] -AppKit_NSCustomImageRep = [] -AppKit_NSCustomTouchBarItem = [] -AppKit_NSDataAsset = [] -AppKit_NSDatePicker = [] -AppKit_NSDatePickerCell = [] -AppKit_NSDictionaryController = [] -AppKit_NSDiffableDataSource = [] -AppKit_NSDockTile = [] -AppKit_NSDocument = [] -AppKit_NSDocumentController = [] -AppKit_NSDocumentScripting = [] -AppKit_NSDragging = [] -AppKit_NSDraggingItem = [] -AppKit_NSDraggingSession = [] -AppKit_NSDrawer = [] -AppKit_NSEPSImageRep = [] -AppKit_NSErrors = [] -AppKit_NSEvent = [] -AppKit_NSFilePromiseProvider = [] -AppKit_NSFilePromiseReceiver = [] -AppKit_NSFileWrapperExtensions = [] -AppKit_NSFont = [] -AppKit_NSFontAssetRequest = [] -AppKit_NSFontCollection = [] -AppKit_NSFontDescriptor = [] -AppKit_NSFontManager = [] -AppKit_NSFontPanel = [] -AppKit_NSForm = [] -AppKit_NSFormCell = [] -AppKit_NSGestureRecognizer = [] -AppKit_NSGlyphGenerator = [] -AppKit_NSGlyphInfo = [] -AppKit_NSGradient = [] -AppKit_NSGraphics = [] -AppKit_NSGraphicsContext = [] -AppKit_NSGridView = [] -AppKit_NSGroupTouchBarItem = [] -AppKit_NSHapticFeedback = [] -AppKit_NSHelpManager = [] -AppKit_NSImage = [] -AppKit_NSImageCell = [] -AppKit_NSImageRep = [] -AppKit_NSImageView = [] -AppKit_NSInputManager = [] -AppKit_NSInputServer = [] -AppKit_NSInterfaceStyle = [] -AppKit_NSItemProvider = [] -AppKit_NSKeyValueBinding = [] -AppKit_NSLayoutAnchor = [] -AppKit_NSLayoutConstraint = [] -AppKit_NSLayoutGuide = [] -AppKit_NSLayoutManager = [] -AppKit_NSLevelIndicator = [] -AppKit_NSLevelIndicatorCell = [] -AppKit_NSMagnificationGestureRecognizer = [] -AppKit_NSMatrix = [] -AppKit_NSMediaLibraryBrowserController = [] -AppKit_NSMenu = [] -AppKit_NSMenuItem = [] -AppKit_NSMenuItemBadge = [] -AppKit_NSMenuItemCell = [] -AppKit_NSMenuToolbarItem = [] -AppKit_NSMovie = [] -AppKit_NSNib = [] -AppKit_NSNibDeclarations = [] -AppKit_NSNibLoading = [] -AppKit_NSObjectController = [] -AppKit_NSOpenGL = [] -AppKit_NSOpenGLLayer = [] -AppKit_NSOpenGLView = [] -AppKit_NSOpenPanel = [] -AppKit_NSOutlineView = [] -AppKit_NSPDFImageRep = [] -AppKit_NSPDFInfo = [] -AppKit_NSPDFPanel = [] -AppKit_NSPICTImageRep = [] -AppKit_NSPageController = [] -AppKit_NSPageLayout = [] -AppKit_NSPanGestureRecognizer = [] -AppKit_NSPanel = [] -AppKit_NSParagraphStyle = [] -AppKit_NSPasteboard = [] -AppKit_NSPasteboardItem = [] -AppKit_NSPathCell = [] -AppKit_NSPathComponentCell = [] -AppKit_NSPathControl = [] -AppKit_NSPathControlItem = [] -AppKit_NSPersistentDocument = [] -AppKit_NSPickerTouchBarItem = [] -AppKit_NSPopUpButton = [] -AppKit_NSPopUpButtonCell = [] -AppKit_NSPopover = [] -AppKit_NSPopoverTouchBarItem = [] -AppKit_NSPredicateEditor = [] -AppKit_NSPredicateEditorRowTemplate = [] -AppKit_NSPressGestureRecognizer = [] -AppKit_NSPressureConfiguration = [] -AppKit_NSPreviewRepresentingActivityItem = [] -AppKit_NSPrintInfo = [] -AppKit_NSPrintOperation = [] -AppKit_NSPrintPanel = [] -AppKit_NSPrinter = [] -AppKit_NSProgressIndicator = [] -AppKit_NSResponder = [] -AppKit_NSRotationGestureRecognizer = [] -AppKit_NSRuleEditor = [] -AppKit_NSRulerMarker = [] -AppKit_NSRulerView = [] -AppKit_NSRunningApplication = [] -AppKit_NSSavePanel = [] -AppKit_NSScreen = [] -AppKit_NSScrollView = [] -AppKit_NSScroller = [] -AppKit_NSScrubber = [] -AppKit_NSScrubberItemView = [] -AppKit_NSScrubberLayout = [] -AppKit_NSSearchField = [] -AppKit_NSSearchFieldCell = [] -AppKit_NSSearchToolbarItem = [] -AppKit_NSSecureTextField = [] -AppKit_NSSegmentedCell = [] -AppKit_NSSegmentedControl = [] -AppKit_NSShadow = [] -AppKit_NSSharingService = [] -AppKit_NSSharingServicePickerToolbarItem = [] -AppKit_NSSharingServicePickerTouchBarItem = [] -AppKit_NSSlider = [] -AppKit_NSSliderAccessory = [] -AppKit_NSSliderCell = [] -AppKit_NSSliderTouchBarItem = [] -AppKit_NSSound = [] -AppKit_NSSpeechRecognizer = [] -AppKit_NSSpeechSynthesizer = [] -AppKit_NSSpellChecker = [] -AppKit_NSSpellProtocol = [] -AppKit_NSSplitView = [] -AppKit_NSSplitViewController = [] -AppKit_NSSplitViewItem = [] -AppKit_NSStackView = [] -AppKit_NSStatusBar = [] -AppKit_NSStatusBarButton = [] -AppKit_NSStatusItem = [] -AppKit_NSStepper = [] -AppKit_NSStepperCell = [] -AppKit_NSStepperTouchBarItem = [] -AppKit_NSStoryboard = [] -AppKit_NSStoryboardSegue = [] -AppKit_NSStringDrawing = [] -AppKit_NSSwitch = [] -AppKit_NSTabView = [] -AppKit_NSTabViewController = [] -AppKit_NSTabViewItem = [] -AppKit_NSTableCellView = [] -AppKit_NSTableColumn = [] -AppKit_NSTableHeaderCell = [] -AppKit_NSTableHeaderView = [] -AppKit_NSTableRowView = [] -AppKit_NSTableView = [] -AppKit_NSTableViewDiffableDataSource = [] -AppKit_NSTableViewRowAction = [] -AppKit_NSText = [] -AppKit_NSTextAlternatives = [] -AppKit_NSTextAttachment = [] -AppKit_NSTextAttachmentCell = [] -AppKit_NSTextCheckingClient = [] -AppKit_NSTextCheckingController = [] -AppKit_NSTextContainer = [] -AppKit_NSTextContent = [] -AppKit_NSTextContentManager = [] -AppKit_NSTextElement = [] -AppKit_NSTextField = [] -AppKit_NSTextFieldCell = [] -AppKit_NSTextFinder = [] -AppKit_NSTextInputClient = [] -AppKit_NSTextInputContext = [] -AppKit_NSTextInsertionIndicator = [] -AppKit_NSTextLayoutFragment = [] -AppKit_NSTextLayoutManager = [] -AppKit_NSTextLineFragment = [] -AppKit_NSTextList = [] -AppKit_NSTextListElement = [] -AppKit_NSTextRange = [] -AppKit_NSTextSelection = [] -AppKit_NSTextSelectionNavigation = [] -AppKit_NSTextStorage = [] -AppKit_NSTextStorageScripting = [] -AppKit_NSTextTable = [] -AppKit_NSTextView = [] -AppKit_NSTextViewportLayoutController = [] -AppKit_NSTintConfiguration = [] -AppKit_NSTitlebarAccessoryViewController = [] -AppKit_NSTokenField = [] -AppKit_NSTokenFieldCell = [] -AppKit_NSToolbar = [] -AppKit_NSToolbarItem = [] -AppKit_NSToolbarItemGroup = [] -AppKit_NSTouch = [] -AppKit_NSTouchBar = [] -AppKit_NSTouchBarItem = [] -AppKit_NSTrackingArea = [] -AppKit_NSTrackingSeparatorToolbarItem = [] -AppKit_NSTreeController = [] -AppKit_NSTreeNode = [] -AppKit_NSTypesetter = [] -AppKit_NSUserActivity = [] -AppKit_NSUserDefaultsController = [] -AppKit_NSUserInterfaceCompression = [] -AppKit_NSUserInterfaceItemIdentification = [] -AppKit_NSUserInterfaceItemSearching = [] -AppKit_NSUserInterfaceLayout = [] -AppKit_NSUserInterfaceValidation = [] -AppKit_NSView = [] -AppKit_NSViewController = [] -AppKit_NSVisualEffectView = [] -AppKit_NSWindow = [] -AppKit_NSWindowController = [] -AppKit_NSWindowRestoration = [] -AppKit_NSWindowScripting = [] -AppKit_NSWindowTab = [] -AppKit_NSWindowTabGroup = [] -AppKit_NSWorkspace = [] -AppKit_all = [ - "AppKit", - "AppKit_AppKitDefines", - "AppKit_AppKitErrors", - "AppKit_NSATSTypesetter", - "AppKit_NSAccessibility", - "AppKit_NSAccessibilityColor", - "AppKit_NSAccessibilityConstants", - "AppKit_NSAccessibilityCustomAction", - "AppKit_NSAccessibilityCustomRotor", - "AppKit_NSAccessibilityElement", - "AppKit_NSAccessibilityProtocols", - "AppKit_NSActionCell", - "AppKit_NSAffineTransform", - "AppKit_NSAlert", - "AppKit_NSAlignmentFeedbackFilter", - "AppKit_NSAnimation", - "AppKit_NSAnimationContext", - "AppKit_NSAppearance", - "AppKit_NSAppleScriptExtensions", - "AppKit_NSApplication", - "AppKit_NSApplicationScripting", - "AppKit_NSArrayController", - "AppKit_NSAttributedString", - "AppKit_NSBezierPath", - "AppKit_NSBitmapImageRep", - "AppKit_NSBox", - "AppKit_NSBrowser", - "AppKit_NSBrowserCell", - "AppKit_NSButton", - "AppKit_NSButtonCell", - "AppKit_NSButtonTouchBarItem", - "AppKit_NSCIImageRep", - "AppKit_NSCachedImageRep", - "AppKit_NSCandidateListTouchBarItem", - "AppKit_NSCell", - "AppKit_NSClickGestureRecognizer", - "AppKit_NSClipView", - "AppKit_NSCollectionView", - "AppKit_NSCollectionViewCompositionalLayout", - "AppKit_NSCollectionViewFlowLayout", - "AppKit_NSCollectionViewGridLayout", - "AppKit_NSCollectionViewLayout", - "AppKit_NSCollectionViewTransitionLayout", - "AppKit_NSColor", - "AppKit_NSColorList", - "AppKit_NSColorPanel", - "AppKit_NSColorPicker", - "AppKit_NSColorPickerTouchBarItem", - "AppKit_NSColorPicking", - "AppKit_NSColorSampler", - "AppKit_NSColorSpace", - "AppKit_NSColorWell", - "AppKit_NSComboBox", - "AppKit_NSComboBoxCell", - "AppKit_NSComboButton", - "AppKit_NSControl", - "AppKit_NSController", - "AppKit_NSCursor", - "AppKit_NSCustomImageRep", - "AppKit_NSCustomTouchBarItem", - "AppKit_NSDataAsset", - "AppKit_NSDatePicker", - "AppKit_NSDatePickerCell", - "AppKit_NSDictionaryController", - "AppKit_NSDiffableDataSource", - "AppKit_NSDockTile", - "AppKit_NSDocument", - "AppKit_NSDocumentController", - "AppKit_NSDocumentScripting", - "AppKit_NSDragging", - "AppKit_NSDraggingItem", - "AppKit_NSDraggingSession", - "AppKit_NSDrawer", - "AppKit_NSEPSImageRep", - "AppKit_NSErrors", - "AppKit_NSEvent", - "AppKit_NSFilePromiseProvider", - "AppKit_NSFilePromiseReceiver", - "AppKit_NSFileWrapperExtensions", - "AppKit_NSFont", - "AppKit_NSFontAssetRequest", - "AppKit_NSFontCollection", - "AppKit_NSFontDescriptor", - "AppKit_NSFontManager", - "AppKit_NSFontPanel", - "AppKit_NSForm", - "AppKit_NSFormCell", - "AppKit_NSGestureRecognizer", - "AppKit_NSGlyphGenerator", - "AppKit_NSGlyphInfo", - "AppKit_NSGradient", - "AppKit_NSGraphics", - "AppKit_NSGraphicsContext", - "AppKit_NSGridView", - "AppKit_NSGroupTouchBarItem", - "AppKit_NSHapticFeedback", - "AppKit_NSHelpManager", - "AppKit_NSImage", - "AppKit_NSImageCell", - "AppKit_NSImageRep", - "AppKit_NSImageView", - "AppKit_NSInputManager", - "AppKit_NSInputServer", - "AppKit_NSInterfaceStyle", - "AppKit_NSItemProvider", - "AppKit_NSKeyValueBinding", - "AppKit_NSLayoutAnchor", - "AppKit_NSLayoutConstraint", - "AppKit_NSLayoutGuide", - "AppKit_NSLayoutManager", - "AppKit_NSLevelIndicator", - "AppKit_NSLevelIndicatorCell", - "AppKit_NSMagnificationGestureRecognizer", - "AppKit_NSMatrix", - "AppKit_NSMediaLibraryBrowserController", - "AppKit_NSMenu", - "AppKit_NSMenuItem", - "AppKit_NSMenuItemBadge", - "AppKit_NSMenuItemCell", - "AppKit_NSMenuToolbarItem", - "AppKit_NSMovie", - "AppKit_NSNib", - "AppKit_NSNibDeclarations", - "AppKit_NSNibLoading", - "AppKit_NSObjectController", - "AppKit_NSOpenGL", - "AppKit_NSOpenGLLayer", - "AppKit_NSOpenGLView", - "AppKit_NSOpenPanel", - "AppKit_NSOutlineView", - "AppKit_NSPDFImageRep", - "AppKit_NSPDFInfo", - "AppKit_NSPDFPanel", - "AppKit_NSPICTImageRep", - "AppKit_NSPageController", - "AppKit_NSPageLayout", - "AppKit_NSPanGestureRecognizer", - "AppKit_NSPanel", - "AppKit_NSParagraphStyle", - "AppKit_NSPasteboard", - "AppKit_NSPasteboardItem", - "AppKit_NSPathCell", - "AppKit_NSPathComponentCell", - "AppKit_NSPathControl", - "AppKit_NSPathControlItem", - "AppKit_NSPersistentDocument", - "AppKit_NSPickerTouchBarItem", - "AppKit_NSPopUpButton", - "AppKit_NSPopUpButtonCell", - "AppKit_NSPopover", - "AppKit_NSPopoverTouchBarItem", - "AppKit_NSPredicateEditor", - "AppKit_NSPredicateEditorRowTemplate", - "AppKit_NSPressGestureRecognizer", - "AppKit_NSPressureConfiguration", - "AppKit_NSPreviewRepresentingActivityItem", - "AppKit_NSPrintInfo", - "AppKit_NSPrintOperation", - "AppKit_NSPrintPanel", - "AppKit_NSPrinter", - "AppKit_NSProgressIndicator", - "AppKit_NSResponder", - "AppKit_NSRotationGestureRecognizer", - "AppKit_NSRuleEditor", - "AppKit_NSRulerMarker", - "AppKit_NSRulerView", - "AppKit_NSRunningApplication", - "AppKit_NSSavePanel", - "AppKit_NSScreen", - "AppKit_NSScrollView", - "AppKit_NSScroller", - "AppKit_NSScrubber", - "AppKit_NSScrubberItemView", - "AppKit_NSScrubberLayout", - "AppKit_NSSearchField", - "AppKit_NSSearchFieldCell", - "AppKit_NSSearchToolbarItem", - "AppKit_NSSecureTextField", - "AppKit_NSSegmentedCell", - "AppKit_NSSegmentedControl", - "AppKit_NSShadow", - "AppKit_NSSharingService", - "AppKit_NSSharingServicePickerToolbarItem", - "AppKit_NSSharingServicePickerTouchBarItem", - "AppKit_NSSlider", - "AppKit_NSSliderAccessory", - "AppKit_NSSliderCell", - "AppKit_NSSliderTouchBarItem", - "AppKit_NSSound", - "AppKit_NSSpeechRecognizer", - "AppKit_NSSpeechSynthesizer", - "AppKit_NSSpellChecker", - "AppKit_NSSpellProtocol", - "AppKit_NSSplitView", - "AppKit_NSSplitViewController", - "AppKit_NSSplitViewItem", - "AppKit_NSStackView", - "AppKit_NSStatusBar", - "AppKit_NSStatusBarButton", - "AppKit_NSStatusItem", - "AppKit_NSStepper", - "AppKit_NSStepperCell", - "AppKit_NSStepperTouchBarItem", - "AppKit_NSStoryboard", - "AppKit_NSStoryboardSegue", - "AppKit_NSStringDrawing", - "AppKit_NSSwitch", - "AppKit_NSTabView", - "AppKit_NSTabViewController", - "AppKit_NSTabViewItem", - "AppKit_NSTableCellView", - "AppKit_NSTableColumn", - "AppKit_NSTableHeaderCell", - "AppKit_NSTableHeaderView", - "AppKit_NSTableRowView", - "AppKit_NSTableView", - "AppKit_NSTableViewDiffableDataSource", - "AppKit_NSTableViewRowAction", - "AppKit_NSText", - "AppKit_NSTextAlternatives", - "AppKit_NSTextAttachment", - "AppKit_NSTextAttachmentCell", - "AppKit_NSTextCheckingClient", - "AppKit_NSTextCheckingController", - "AppKit_NSTextContainer", - "AppKit_NSTextContent", - "AppKit_NSTextContentManager", - "AppKit_NSTextElement", - "AppKit_NSTextField", - "AppKit_NSTextFieldCell", - "AppKit_NSTextFinder", - "AppKit_NSTextInputClient", - "AppKit_NSTextInputContext", - "AppKit_NSTextInsertionIndicator", - "AppKit_NSTextLayoutFragment", - "AppKit_NSTextLayoutManager", - "AppKit_NSTextLineFragment", - "AppKit_NSTextList", - "AppKit_NSTextListElement", - "AppKit_NSTextRange", - "AppKit_NSTextSelection", - "AppKit_NSTextSelectionNavigation", - "AppKit_NSTextStorage", - "AppKit_NSTextStorageScripting", - "AppKit_NSTextTable", - "AppKit_NSTextView", - "AppKit_NSTextViewportLayoutController", - "AppKit_NSTintConfiguration", - "AppKit_NSTitlebarAccessoryViewController", - "AppKit_NSTokenField", - "AppKit_NSTokenFieldCell", - "AppKit_NSToolbar", - "AppKit_NSToolbarItem", - "AppKit_NSToolbarItemGroup", - "AppKit_NSTouch", - "AppKit_NSTouchBar", - "AppKit_NSTouchBarItem", - "AppKit_NSTrackingArea", - "AppKit_NSTrackingSeparatorToolbarItem", - "AppKit_NSTreeController", - "AppKit_NSTreeNode", - "AppKit_NSTypesetter", - "AppKit_NSUserActivity", - "AppKit_NSUserDefaultsController", - "AppKit_NSUserInterfaceCompression", - "AppKit_NSUserInterfaceItemIdentification", - "AppKit_NSUserInterfaceItemSearching", - "AppKit_NSUserInterfaceLayout", - "AppKit_NSUserInterfaceValidation", - "AppKit_NSView", - "AppKit_NSViewController", - "AppKit_NSVisualEffectView", - "AppKit_NSWindow", - "AppKit_NSWindowController", - "AppKit_NSWindowRestoration", - "AppKit_NSWindowScripting", - "AppKit_NSWindowTab", - "AppKit_NSWindowTabGroup", - "AppKit_NSWorkspace", -] -AuthenticationServices = [ - "AppKit", - "Foundation", -] -AuthenticationServices_ASAccountAuthenticationModificationController = [] -AuthenticationServices_ASAccountAuthenticationModificationExtensionContext = [] -AuthenticationServices_ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest = [] -AuthenticationServices_ASAccountAuthenticationModificationRequest = [] -AuthenticationServices_ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest = [] -AuthenticationServices_ASAccountAuthenticationModificationViewController = [] -AuthenticationServices_ASAuthorization = [] -AuthenticationServices_ASAuthorizationAppleIDButton = [] -AuthenticationServices_ASAuthorizationAppleIDCredential = [] -AuthenticationServices_ASAuthorizationAppleIDProvider = [] -AuthenticationServices_ASAuthorizationAppleIDRequest = [] -AuthenticationServices_ASAuthorizationController = [] -AuthenticationServices_ASAuthorizationCredential = [] -AuthenticationServices_ASAuthorizationCustomMethod = [] -AuthenticationServices_ASAuthorizationError = [] -AuthenticationServices_ASAuthorizationOpenIDRequest = [] -AuthenticationServices_ASAuthorizationPasswordProvider = [] -AuthenticationServices_ASAuthorizationPasswordRequest = [] -AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertion = [] -AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertionRequest = [] -AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialDescriptor = [] -AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialProvider = [] -AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistration = [] -AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest = [] -AuthenticationServices_ASAuthorizationProvider = [] -AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationRequest = [] -AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult = [] -AuthenticationServices_ASAuthorizationProviderExtensionLoginConfiguration = [] -AuthenticationServices_ASAuthorizationProviderExtensionLoginManager = [] -AuthenticationServices_ASAuthorizationProviderExtensionRegistrationHandler = [] -AuthenticationServices_ASAuthorizationProviderExtensionUserLoginConfiguration = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertion = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertionRequest = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialConstants = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialDescriptor = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationOutput = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialParameters = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistration = [] -AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistrationRequest = [] -AuthenticationServices_ASAuthorizationRequest = [] -AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertion = [] -AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest = [] -AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor = [] -AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialProvider = [] -AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistration = [] -AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest = [] -AuthenticationServices_ASAuthorizationSingleSignOnCredential = [] -AuthenticationServices_ASAuthorizationSingleSignOnProvider = [] -AuthenticationServices_ASAuthorizationSingleSignOnRequest = [] -AuthenticationServices_ASAuthorizationWebBrowserExternallyAuthenticatableRequest = [] -AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredential = [] -AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialAssertionRequest = [] -AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider = [] -AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialRegistrationRequest = [] -AuthenticationServices_ASAuthorizationWebBrowserPublicKeyCredentialManager = [] -AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialAssertionRequest = [] -AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialProvider = [] -AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialRegistrationRequest = [] -AuthenticationServices_ASCOSEConstants = [] -AuthenticationServices_ASCredentialIdentity = [] -AuthenticationServices_ASCredentialIdentityStore = [] -AuthenticationServices_ASCredentialIdentityStoreState = [] -AuthenticationServices_ASCredentialProviderExtensionContext = [] -AuthenticationServices_ASCredentialProviderViewController = [] -AuthenticationServices_ASCredentialRequest = [] -AuthenticationServices_ASCredentialServiceIdentifier = [] -AuthenticationServices_ASExtensionErrors = [] -AuthenticationServices_ASFoundation = [] -AuthenticationServices_ASPasskeyAssertionCredential = [] -AuthenticationServices_ASPasskeyCredentialIdentity = [] -AuthenticationServices_ASPasskeyCredentialRequest = [] -AuthenticationServices_ASPasskeyCredentialRequestParameters = [] -AuthenticationServices_ASPasskeyRegistrationCredential = [] -AuthenticationServices_ASPasswordCredential = [] -AuthenticationServices_ASPasswordCredentialIdentity = [] -AuthenticationServices_ASPasswordCredentialRequest = [] -AuthenticationServices_ASPublicKeyCredential = [] -AuthenticationServices_ASPublicKeyCredentialClientData = [] -AuthenticationServices_ASSettingsHelper = [] -AuthenticationServices_ASWebAuthenticationSession = [] -AuthenticationServices_ASWebAuthenticationSessionCallback = [] -AuthenticationServices_ASWebAuthenticationSessionRequest = [] -AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionHandling = [] -AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager = [] -AuthenticationServices_all = [ - "AuthenticationServices", - "AuthenticationServices_ASAccountAuthenticationModificationController", - "AuthenticationServices_ASAccountAuthenticationModificationExtensionContext", - "AuthenticationServices_ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest", - "AuthenticationServices_ASAccountAuthenticationModificationRequest", - "AuthenticationServices_ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest", - "AuthenticationServices_ASAccountAuthenticationModificationViewController", - "AuthenticationServices_ASAuthorization", - "AuthenticationServices_ASAuthorizationAppleIDButton", - "AuthenticationServices_ASAuthorizationAppleIDCredential", - "AuthenticationServices_ASAuthorizationAppleIDProvider", - "AuthenticationServices_ASAuthorizationAppleIDRequest", - "AuthenticationServices_ASAuthorizationController", - "AuthenticationServices_ASAuthorizationCredential", - "AuthenticationServices_ASAuthorizationCustomMethod", - "AuthenticationServices_ASAuthorizationError", - "AuthenticationServices_ASAuthorizationOpenIDRequest", - "AuthenticationServices_ASAuthorizationPasswordProvider", - "AuthenticationServices_ASAuthorizationPasswordRequest", - "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertion", - "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertionRequest", - "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialDescriptor", - "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialProvider", - "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistration", - "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest", - "AuthenticationServices_ASAuthorizationProvider", - "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationRequest", - "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult", - "AuthenticationServices_ASAuthorizationProviderExtensionLoginConfiguration", - "AuthenticationServices_ASAuthorizationProviderExtensionLoginManager", - "AuthenticationServices_ASAuthorizationProviderExtensionRegistrationHandler", - "AuthenticationServices_ASAuthorizationProviderExtensionUserLoginConfiguration", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertion", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertionRequest", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialConstants", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialDescriptor", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationOutput", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialParameters", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistration", - "AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistrationRequest", - "AuthenticationServices_ASAuthorizationRequest", - "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertion", - "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest", - "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor", - "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialProvider", - "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistration", - "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest", - "AuthenticationServices_ASAuthorizationSingleSignOnCredential", - "AuthenticationServices_ASAuthorizationSingleSignOnProvider", - "AuthenticationServices_ASAuthorizationSingleSignOnRequest", - "AuthenticationServices_ASAuthorizationWebBrowserExternallyAuthenticatableRequest", - "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredential", - "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialAssertionRequest", - "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider", - "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialRegistrationRequest", - "AuthenticationServices_ASAuthorizationWebBrowserPublicKeyCredentialManager", - "AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialAssertionRequest", - "AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialProvider", - "AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialRegistrationRequest", - "AuthenticationServices_ASCOSEConstants", - "AuthenticationServices_ASCredentialIdentity", - "AuthenticationServices_ASCredentialIdentityStore", - "AuthenticationServices_ASCredentialIdentityStoreState", - "AuthenticationServices_ASCredentialProviderExtensionContext", - "AuthenticationServices_ASCredentialProviderViewController", - "AuthenticationServices_ASCredentialRequest", - "AuthenticationServices_ASCredentialServiceIdentifier", - "AuthenticationServices_ASExtensionErrors", - "AuthenticationServices_ASFoundation", - "AuthenticationServices_ASPasskeyAssertionCredential", - "AuthenticationServices_ASPasskeyCredentialIdentity", - "AuthenticationServices_ASPasskeyCredentialRequest", - "AuthenticationServices_ASPasskeyCredentialRequestParameters", - "AuthenticationServices_ASPasskeyRegistrationCredential", - "AuthenticationServices_ASPasswordCredential", - "AuthenticationServices_ASPasswordCredentialIdentity", - "AuthenticationServices_ASPasswordCredentialRequest", - "AuthenticationServices_ASPublicKeyCredential", - "AuthenticationServices_ASPublicKeyCredentialClientData", - "AuthenticationServices_ASSettingsHelper", - "AuthenticationServices_ASWebAuthenticationSession", - "AuthenticationServices_ASWebAuthenticationSessionCallback", - "AuthenticationServices_ASWebAuthenticationSessionRequest", - "AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionHandling", - "AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager", -] -AutomaticAssessmentConfiguration = [ - "Foundation", -] -AutomaticAssessmentConfiguration_AEAssessmentApplication = [] -AutomaticAssessmentConfiguration_AEAssessmentConfiguration = [] -AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration = [] -AutomaticAssessmentConfiguration_AEAssessmentSession = [] -AutomaticAssessmentConfiguration_AEAssessmentSessionDelegate = [] -AutomaticAssessmentConfiguration_AEErrors = [] -AutomaticAssessmentConfiguration_AEVisibility = [] -AutomaticAssessmentConfiguration_all = [ - "AutomaticAssessmentConfiguration", - "AutomaticAssessmentConfiguration_AEAssessmentApplication", - "AutomaticAssessmentConfiguration_AEAssessmentConfiguration", - "AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration", - "AutomaticAssessmentConfiguration_AEAssessmentSession", - "AutomaticAssessmentConfiguration_AEAssessmentSessionDelegate", - "AutomaticAssessmentConfiguration_AEErrors", - "AutomaticAssessmentConfiguration_AEVisibility", -] -Automator = [ - "AppKit", - "Foundation", - "OSAKit", -] -Automator_AMAction = [] -Automator_AMAppleScriptAction = [] -Automator_AMAttributesForAnalyzer = [] -Automator_AMBundleAction = [] -Automator_AMShellScriptAction = [] -Automator_AMWorkflow = [] -Automator_AMWorkflowController = [] -Automator_AMWorkflowView = [] -Automator_AMWorkspace = [] -Automator_AutomatorErrors = [] -Automator_all = [ - "Automator", - "Automator_AMAction", - "Automator_AMAppleScriptAction", - "Automator_AMAttributesForAnalyzer", - "Automator_AMBundleAction", - "Automator_AMShellScriptAction", - "Automator_AMWorkflow", - "Automator_AMWorkflowController", - "Automator_AMWorkflowView", - "Automator_AMWorkspace", - "Automator_AutomatorErrors", -] -BackgroundAssets = [ - "Foundation", -] -BackgroundAssets_BAAppExtensionInfo = [] -BackgroundAssets_BABase = [] -BackgroundAssets_BADownload = [] -BackgroundAssets_BADownloadManager = [] -BackgroundAssets_BADownloaderExtension = [] -BackgroundAssets_BAError = [] -BackgroundAssets_BATypes = [] -BackgroundAssets_BAURLDownload = [] -BackgroundAssets_all = [ - "BackgroundAssets", - "BackgroundAssets_BAAppExtensionInfo", - "BackgroundAssets_BABase", - "BackgroundAssets_BADownload", - "BackgroundAssets_BADownloadManager", - "BackgroundAssets_BADownloaderExtension", - "BackgroundAssets_BAError", - "BackgroundAssets_BATypes", - "BackgroundAssets_BAURLDownload", -] -BackgroundTasks = [ - "Foundation", -] -BackgroundTasks_BGDefines = [] -BackgroundTasks_BGTask = [] -BackgroundTasks_BGTaskRequest = [] -BackgroundTasks_BGTaskScheduler = [] -BackgroundTasks_all = [ - "BackgroundTasks", - "BackgroundTasks_BGDefines", - "BackgroundTasks_BGTask", - "BackgroundTasks_BGTaskRequest", - "BackgroundTasks_BGTaskScheduler", -] -BusinessChat = [ - "AppKit", - "Foundation", -] -BusinessChat_BCChatAction = [] -BusinessChat_BCChatButton = [] -BusinessChat_all = [ - "BusinessChat", - "BusinessChat_BCChatAction", - "BusinessChat_BCChatButton", -] -CallKit = [ - "Foundation", -] -CallKit_CXAction = [] -CallKit_CXAnswerCallAction = [] -CallKit_CXBase = [] -CallKit_CXCall = [] -CallKit_CXCallAction = [] -CallKit_CXCallController = [] -CallKit_CXCallDirectory = [] -CallKit_CXCallDirectoryExtensionContext = [] -CallKit_CXCallDirectoryManager = [] -CallKit_CXCallDirectoryProvider = [] -CallKit_CXCallObserver = [] -CallKit_CXCallUpdate = [] -CallKit_CXEndCallAction = [] -CallKit_CXError = [] -CallKit_CXHandle = [] -CallKit_CXPlayDTMFCallAction = [] -CallKit_CXProvider = [] -CallKit_CXProviderConfiguration = [] -CallKit_CXSetGroupCallAction = [] -CallKit_CXSetHeldCallAction = [] -CallKit_CXSetMutedCallAction = [] -CallKit_CXStartCallAction = [] -CallKit_CXTransaction = [] -CallKit_all = [ - "CallKit", - "CallKit_CXAction", - "CallKit_CXAnswerCallAction", - "CallKit_CXBase", - "CallKit_CXCall", - "CallKit_CXCallAction", - "CallKit_CXCallController", - "CallKit_CXCallDirectory", - "CallKit_CXCallDirectoryExtensionContext", - "CallKit_CXCallDirectoryManager", - "CallKit_CXCallDirectoryProvider", - "CallKit_CXCallObserver", - "CallKit_CXCallUpdate", - "CallKit_CXEndCallAction", - "CallKit_CXError", - "CallKit_CXHandle", - "CallKit_CXPlayDTMFCallAction", - "CallKit_CXProvider", - "CallKit_CXProviderConfiguration", - "CallKit_CXSetGroupCallAction", - "CallKit_CXSetHeldCallAction", - "CallKit_CXSetMutedCallAction", - "CallKit_CXStartCallAction", - "CallKit_CXTransaction", -] -ClassKit = [ - "Foundation", -] -ClassKit_CLSActivity = [] -ClassKit_CLSActivityItem = [] -ClassKit_CLSBinaryItem = [] -ClassKit_CLSContext = [] -ClassKit_CLSContextProvider = [] -ClassKit_CLSDataStore = [] -ClassKit_CLSDefines = [] -ClassKit_CLSObject = [] -ClassKit_CLSProgressReportingCapability = [] -ClassKit_CLSQuantityItem = [] -ClassKit_CLSScoreItem = [] -ClassKit_NSUserActivity_CLSDeepLinks = [] -ClassKit_all = [ - "ClassKit", - "ClassKit_CLSActivity", - "ClassKit_CLSActivityItem", - "ClassKit_CLSBinaryItem", - "ClassKit_CLSContext", - "ClassKit_CLSContextProvider", - "ClassKit_CLSDataStore", - "ClassKit_CLSDefines", - "ClassKit_CLSObject", - "ClassKit_CLSProgressReportingCapability", - "ClassKit_CLSQuantityItem", - "ClassKit_CLSScoreItem", - "ClassKit_NSUserActivity_CLSDeepLinks", -] -CloudKit = [ - "CoreLocation", - "Foundation", -] -CloudKit_CKAcceptSharesOperation = [] -CloudKit_CKAllowedSharingOptions = [] -CloudKit_CKAsset = [] -CloudKit_CKContainer = [] -CloudKit_CKDatabase = [] -CloudKit_CKDatabaseOperation = [] -CloudKit_CKDefines = [] -CloudKit_CKDiscoverAllUserIdentitiesOperation = [] -CloudKit_CKDiscoverUserIdentitiesOperation = [] -CloudKit_CKError = [] -CloudKit_CKFetchDatabaseChangesOperation = [] -CloudKit_CKFetchNotificationChangesOperation = [] -CloudKit_CKFetchRecordChangesOperation = [] -CloudKit_CKFetchRecordZoneChangesOperation = [] -CloudKit_CKFetchRecordZonesOperation = [] -CloudKit_CKFetchRecordsOperation = [] -CloudKit_CKFetchShareMetadataOperation = [] -CloudKit_CKFetchShareParticipantsOperation = [] -CloudKit_CKFetchSubscriptionsOperation = [] -CloudKit_CKFetchWebAuthTokenOperation = [] -CloudKit_CKLocationSortDescriptor = [] -CloudKit_CKMarkNotificationsReadOperation = [] -CloudKit_CKModifyBadgeOperation = [] -CloudKit_CKModifyRecordZonesOperation = [] -CloudKit_CKModifyRecordsOperation = [] -CloudKit_CKModifySubscriptionsOperation = [] -CloudKit_CKNotification = [] -CloudKit_CKOperation = [] -CloudKit_CKOperationGroup = [] -CloudKit_CKQuery = [] -CloudKit_CKQueryOperation = [] -CloudKit_CKRecord = [] -CloudKit_CKRecordID = [] -CloudKit_CKRecordZone = [] -CloudKit_CKRecordZoneID = [] -CloudKit_CKReference = [] -CloudKit_CKServerChangeToken = [] -CloudKit_CKShare = [] -CloudKit_CKShareMetadata = [] -CloudKit_CKShareParticipant = [] -CloudKit_CKSubscription = [] -CloudKit_CKSyncEngine = [] -CloudKit_CKSyncEngineConfiguration = [] -CloudKit_CKSyncEngineEvent = [] -CloudKit_CKSyncEngineRecordZoneChangeBatch = [] -CloudKit_CKSyncEngineState = [] -CloudKit_CKSystemSharingUIObserver = [] -CloudKit_CKUserIdentity = [] -CloudKit_CKUserIdentityLookupInfo = [] -CloudKit_NSItemProvider_CKSharingSupport = [] -CloudKit_all = [ - "CloudKit", - "CloudKit_CKAcceptSharesOperation", - "CloudKit_CKAllowedSharingOptions", - "CloudKit_CKAsset", - "CloudKit_CKContainer", - "CloudKit_CKDatabase", - "CloudKit_CKDatabaseOperation", - "CloudKit_CKDefines", - "CloudKit_CKDiscoverAllUserIdentitiesOperation", - "CloudKit_CKDiscoverUserIdentitiesOperation", - "CloudKit_CKError", - "CloudKit_CKFetchDatabaseChangesOperation", - "CloudKit_CKFetchNotificationChangesOperation", - "CloudKit_CKFetchRecordChangesOperation", - "CloudKit_CKFetchRecordZoneChangesOperation", - "CloudKit_CKFetchRecordZonesOperation", - "CloudKit_CKFetchRecordsOperation", - "CloudKit_CKFetchShareMetadataOperation", - "CloudKit_CKFetchShareParticipantsOperation", - "CloudKit_CKFetchSubscriptionsOperation", - "CloudKit_CKFetchWebAuthTokenOperation", - "CloudKit_CKLocationSortDescriptor", - "CloudKit_CKMarkNotificationsReadOperation", - "CloudKit_CKModifyBadgeOperation", - "CloudKit_CKModifyRecordZonesOperation", - "CloudKit_CKModifyRecordsOperation", - "CloudKit_CKModifySubscriptionsOperation", - "CloudKit_CKNotification", - "CloudKit_CKOperation", - "CloudKit_CKOperationGroup", - "CloudKit_CKQuery", - "CloudKit_CKQueryOperation", - "CloudKit_CKRecord", - "CloudKit_CKRecordID", - "CloudKit_CKRecordZone", - "CloudKit_CKRecordZoneID", - "CloudKit_CKReference", - "CloudKit_CKServerChangeToken", - "CloudKit_CKShare", - "CloudKit_CKShareMetadata", - "CloudKit_CKShareParticipant", - "CloudKit_CKSubscription", - "CloudKit_CKSyncEngine", - "CloudKit_CKSyncEngineConfiguration", - "CloudKit_CKSyncEngineEvent", - "CloudKit_CKSyncEngineRecordZoneChangeBatch", - "CloudKit_CKSyncEngineState", - "CloudKit_CKSystemSharingUIObserver", - "CloudKit_CKUserIdentity", - "CloudKit_CKUserIdentityLookupInfo", - "CloudKit_NSItemProvider_CKSharingSupport", -] -Contacts = [ - "Foundation", -] -Contacts_CNChangeHistoryEvent = [] -Contacts_CNChangeHistoryFetchRequest = [] -Contacts_CNContact = [] -Contacts_CNContactFetchRequest = [] -Contacts_CNContactFormatter = [] -Contacts_CNContactProperty = [] -Contacts_CNContactRelation = [] -Contacts_CNContactStore = [] -Contacts_CNContactVCardSerialization = [] -Contacts_CNContact_NSItemProvider = [] -Contacts_CNContact_Predicates = [] -Contacts_CNContactsUserDefaults = [] -Contacts_CNContainer = [] -Contacts_CNContainer_Predicates = [] -Contacts_CNError = [] -Contacts_CNFetchRequest = [] -Contacts_CNFetchResult = [] -Contacts_CNGroup = [] -Contacts_CNGroup_Predicates = [] -Contacts_CNInstantMessageAddress = [] -Contacts_CNLabeledValue = [] -Contacts_CNMutableContact = [] -Contacts_CNMutableGroup = [] -Contacts_CNMutablePostalAddress = [] -Contacts_CNPhoneNumber = [] -Contacts_CNPostalAddress = [] -Contacts_CNPostalAddressFormatter = [] -Contacts_CNSaveRequest = [] -Contacts_CNSocialProfile = [] -Contacts_ContactsDefines = [] -Contacts_all = [ - "Contacts", - "Contacts_CNChangeHistoryEvent", - "Contacts_CNChangeHistoryFetchRequest", - "Contacts_CNContact", - "Contacts_CNContactFetchRequest", - "Contacts_CNContactFormatter", - "Contacts_CNContactProperty", - "Contacts_CNContactRelation", - "Contacts_CNContactStore", - "Contacts_CNContactVCardSerialization", - "Contacts_CNContact_NSItemProvider", - "Contacts_CNContact_Predicates", - "Contacts_CNContactsUserDefaults", - "Contacts_CNContainer", - "Contacts_CNContainer_Predicates", - "Contacts_CNError", - "Contacts_CNFetchRequest", - "Contacts_CNFetchResult", - "Contacts_CNGroup", - "Contacts_CNGroup_Predicates", - "Contacts_CNInstantMessageAddress", - "Contacts_CNLabeledValue", - "Contacts_CNMutableContact", - "Contacts_CNMutableGroup", - "Contacts_CNMutablePostalAddress", - "Contacts_CNPhoneNumber", - "Contacts_CNPostalAddress", - "Contacts_CNPostalAddressFormatter", - "Contacts_CNSaveRequest", - "Contacts_CNSocialProfile", - "Contacts_ContactsDefines", -] -CoreData = [ - "Foundation", -] -CoreData_CoreDataDefines = [] -CoreData_CoreDataErrors = [] -CoreData_NSAtomicStore = [] -CoreData_NSAtomicStoreCacheNode = [] -CoreData_NSAttributeDescription = [] -CoreData_NSBatchDeleteRequest = [] -CoreData_NSBatchInsertRequest = [] -CoreData_NSBatchUpdateRequest = [] -CoreData_NSCompositeAttributeDescription = [] -CoreData_NSCoreDataCoreSpotlightDelegate = [] -CoreData_NSCustomMigrationStage = [] -CoreData_NSDerivedAttributeDescription = [] -CoreData_NSEntityDescription = [] -CoreData_NSEntityMapping = [] -CoreData_NSEntityMigrationPolicy = [] -CoreData_NSExpressionDescription = [] -CoreData_NSFetchIndexDescription = [] -CoreData_NSFetchIndexElementDescription = [] -CoreData_NSFetchRequest = [] -CoreData_NSFetchRequestExpression = [] -CoreData_NSFetchedPropertyDescription = [] -CoreData_NSFetchedResultsController = [] -CoreData_NSIncrementalStore = [] -CoreData_NSIncrementalStoreNode = [] -CoreData_NSLightweightMigrationStage = [] -CoreData_NSManagedObject = [] -CoreData_NSManagedObjectContext = [] -CoreData_NSManagedObjectID = [] -CoreData_NSManagedObjectModel = [] -CoreData_NSManagedObjectModelReference = [] -CoreData_NSMappingModel = [] -CoreData_NSMergePolicy = [] -CoreData_NSMigrationManager = [] -CoreData_NSMigrationStage = [] -CoreData_NSPersistentCloudKitContainer = [] -CoreData_NSPersistentCloudKitContainerEvent = [] -CoreData_NSPersistentCloudKitContainerEventRequest = [] -CoreData_NSPersistentCloudKitContainerOptions = [] -CoreData_NSPersistentContainer = [] -CoreData_NSPersistentHistoryChange = [] -CoreData_NSPersistentHistoryChangeRequest = [] -CoreData_NSPersistentHistoryToken = [] -CoreData_NSPersistentHistoryTransaction = [] -CoreData_NSPersistentStore = [] -CoreData_NSPersistentStoreCoordinator = [] -CoreData_NSPersistentStoreDescription = [] -CoreData_NSPersistentStoreRequest = [] -CoreData_NSPersistentStoreResult = [] -CoreData_NSPropertyDescription = [] -CoreData_NSPropertyMapping = [] -CoreData_NSQueryGenerationToken = [] -CoreData_NSRelationshipDescription = [] -CoreData_NSSaveChangesRequest = [] -CoreData_NSStagedMigrationManager = [] -CoreData_all = [ - "CoreData", - "CoreData_CoreDataDefines", - "CoreData_CoreDataErrors", - "CoreData_NSAtomicStore", - "CoreData_NSAtomicStoreCacheNode", - "CoreData_NSAttributeDescription", - "CoreData_NSBatchDeleteRequest", - "CoreData_NSBatchInsertRequest", - "CoreData_NSBatchUpdateRequest", - "CoreData_NSCompositeAttributeDescription", - "CoreData_NSCoreDataCoreSpotlightDelegate", - "CoreData_NSCustomMigrationStage", - "CoreData_NSDerivedAttributeDescription", - "CoreData_NSEntityDescription", - "CoreData_NSEntityMapping", - "CoreData_NSEntityMigrationPolicy", - "CoreData_NSExpressionDescription", - "CoreData_NSFetchIndexDescription", - "CoreData_NSFetchIndexElementDescription", - "CoreData_NSFetchRequest", - "CoreData_NSFetchRequestExpression", - "CoreData_NSFetchedPropertyDescription", - "CoreData_NSFetchedResultsController", - "CoreData_NSIncrementalStore", - "CoreData_NSIncrementalStoreNode", - "CoreData_NSLightweightMigrationStage", - "CoreData_NSManagedObject", - "CoreData_NSManagedObjectContext", - "CoreData_NSManagedObjectID", - "CoreData_NSManagedObjectModel", - "CoreData_NSManagedObjectModelReference", - "CoreData_NSMappingModel", - "CoreData_NSMergePolicy", - "CoreData_NSMigrationManager", - "CoreData_NSMigrationStage", - "CoreData_NSPersistentCloudKitContainer", - "CoreData_NSPersistentCloudKitContainerEvent", - "CoreData_NSPersistentCloudKitContainerEventRequest", - "CoreData_NSPersistentCloudKitContainerOptions", - "CoreData_NSPersistentContainer", - "CoreData_NSPersistentHistoryChange", - "CoreData_NSPersistentHistoryChangeRequest", - "CoreData_NSPersistentHistoryToken", - "CoreData_NSPersistentHistoryTransaction", - "CoreData_NSPersistentStore", - "CoreData_NSPersistentStoreCoordinator", - "CoreData_NSPersistentStoreDescription", - "CoreData_NSPersistentStoreRequest", - "CoreData_NSPersistentStoreResult", - "CoreData_NSPropertyDescription", - "CoreData_NSPropertyMapping", - "CoreData_NSQueryGenerationToken", - "CoreData_NSRelationshipDescription", - "CoreData_NSSaveChangesRequest", - "CoreData_NSStagedMigrationManager", -] -CoreLocation = [ - "Contacts", - "Foundation", -] -CoreLocation_CLAvailability = [] -CoreLocation_CLBackgroundActivitySession = [] -CoreLocation_CLBeaconIdentityCondition = [] -CoreLocation_CLBeaconIdentityConstraint = [] -CoreLocation_CLBeaconRegion = [] -CoreLocation_CLCircularGeographicCondition = [] -CoreLocation_CLCircularRegion = [] -CoreLocation_CLCondition = [] -CoreLocation_CLError = [] -CoreLocation_CLErrorDomain = [] -CoreLocation_CLGeocoder = [] -CoreLocation_CLHeading = [] -CoreLocation_CLLocation = [] -CoreLocation_CLLocationManager = [] -CoreLocation_CLLocationManagerDelegate = [] -CoreLocation_CLLocationManager_CLVisitExtensions = [] -CoreLocation_CLLocationPushServiceError = [] -CoreLocation_CLLocationPushServiceExtension = [] -CoreLocation_CLLocationUpdater = [] -CoreLocation_CLMonitor = [] -CoreLocation_CLMonitorConfiguration = [] -CoreLocation_CLMonitoringEvent = [] -CoreLocation_CLMonitoringRecord = [] -CoreLocation_CLPlacemark = [] -CoreLocation_CLRegion = [] -CoreLocation_CLVisit = [] -CoreLocation_all = [ - "CoreLocation", - "CoreLocation_CLAvailability", - "CoreLocation_CLBackgroundActivitySession", - "CoreLocation_CLBeaconIdentityCondition", - "CoreLocation_CLBeaconIdentityConstraint", - "CoreLocation_CLBeaconRegion", - "CoreLocation_CLCircularGeographicCondition", - "CoreLocation_CLCircularRegion", - "CoreLocation_CLCondition", - "CoreLocation_CLError", - "CoreLocation_CLErrorDomain", - "CoreLocation_CLGeocoder", - "CoreLocation_CLHeading", - "CoreLocation_CLLocation", - "CoreLocation_CLLocationManager", - "CoreLocation_CLLocationManagerDelegate", - "CoreLocation_CLLocationManager_CLVisitExtensions", - "CoreLocation_CLLocationPushServiceError", - "CoreLocation_CLLocationPushServiceExtension", - "CoreLocation_CLLocationUpdater", - "CoreLocation_CLMonitor", - "CoreLocation_CLMonitorConfiguration", - "CoreLocation_CLMonitoringEvent", - "CoreLocation_CLMonitoringRecord", - "CoreLocation_CLPlacemark", - "CoreLocation_CLRegion", - "CoreLocation_CLVisit", -] -CoreWLAN = [ - "Foundation", -] -CoreWLAN_CWChannel = [] -CoreWLAN_CWConfiguration = [] -CoreWLAN_CWInterface = [] -CoreWLAN_CWNetwork = [] -CoreWLAN_CWNetworkProfile = [] -CoreWLAN_CWWiFiClient = [] -CoreWLAN_CoreWLANConstants = [] -CoreWLAN_CoreWLANTypes = [] -CoreWLAN_CoreWLANUtil = [] -CoreWLAN_all = [ - "CoreWLAN", - "CoreWLAN_CWChannel", - "CoreWLAN_CWConfiguration", - "CoreWLAN_CWInterface", - "CoreWLAN_CWNetwork", - "CoreWLAN_CWNetworkProfile", - "CoreWLAN_CWWiFiClient", - "CoreWLAN_CoreWLANConstants", - "CoreWLAN_CoreWLANTypes", - "CoreWLAN_CoreWLANUtil", -] -DataDetection = [ - "Foundation", -] -DataDetection_DDMatch = [] -DataDetection_DataDetectionBase = [] -DataDetection_all = [ - "DataDetection", - "DataDetection_DDMatch", - "DataDetection_DataDetectionBase", -] -DeviceCheck = [ - "Foundation", -] -DeviceCheck_DCAppAttestService = [] -DeviceCheck_DCDevice = [] -DeviceCheck_DCError = [] -DeviceCheck_all = [ - "DeviceCheck", - "DeviceCheck_DCAppAttestService", - "DeviceCheck_DCDevice", - "DeviceCheck_DCError", -] -EventKit = [ - "AppKit", - "CoreLocation", - "Foundation", - "MapKit", -] -EventKit_EKAlarm = [] -EventKit_EKCalendar = [] -EventKit_EKCalendarItem = [] -EventKit_EKError = [] -EventKit_EKEvent = [] -EventKit_EKEventStore = [] -EventKit_EKObject = [] -EventKit_EKParticipant = [] -EventKit_EKRecurrenceDayOfWeek = [] -EventKit_EKRecurrenceEnd = [] -EventKit_EKRecurrenceRule = [] -EventKit_EKReminder = [] -EventKit_EKSource = [] -EventKit_EKStructuredLocation = [] -EventKit_EKTypes = [] -EventKit_EKVirtualConferenceDescriptor = [] -EventKit_EKVirtualConferenceProvider = [] -EventKit_EventKitDefines = [] -EventKit_all = [ - "EventKit", - "EventKit_EKAlarm", - "EventKit_EKCalendar", - "EventKit_EKCalendarItem", - "EventKit_EKError", - "EventKit_EKEvent", - "EventKit_EKEventStore", - "EventKit_EKObject", - "EventKit_EKParticipant", - "EventKit_EKRecurrenceDayOfWeek", - "EventKit_EKRecurrenceEnd", - "EventKit_EKRecurrenceRule", - "EventKit_EKReminder", - "EventKit_EKSource", - "EventKit_EKStructuredLocation", - "EventKit_EKTypes", - "EventKit_EKVirtualConferenceDescriptor", - "EventKit_EKVirtualConferenceProvider", - "EventKit_EventKitDefines", -] -ExceptionHandling = [ - "Foundation", -] -ExceptionHandling_ExceptionHandlingDefines = [] -ExceptionHandling_NSExceptionHandler = [] -ExceptionHandling_all = [ - "ExceptionHandling", - "ExceptionHandling_ExceptionHandlingDefines", - "ExceptionHandling_NSExceptionHandler", -] -ExtensionKit = [ - "AppKit", - "Foundation", -] -ExtensionKit_EXAppExtensionBrowserViewController = [] -ExtensionKit_EXHostViewController = [] -ExtensionKit_all = [ - "ExtensionKit", - "ExtensionKit_EXAppExtensionBrowserViewController", - "ExtensionKit_EXHostViewController", -] -ExternalAccessory = [ - "Foundation", -] -ExternalAccessory_EAAccessory = [] -ExternalAccessory_EAAccessoryManager = [] -ExternalAccessory_EASession = [] -ExternalAccessory_EAWiFiUnconfiguredAccessory = [] -ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser = [] -ExternalAccessory_ExternalAccessoryDefines = [] -ExternalAccessory_all = [ - "ExternalAccessory", - "ExternalAccessory_EAAccessory", - "ExternalAccessory_EAAccessoryManager", - "ExternalAccessory_EASession", - "ExternalAccessory_EAWiFiUnconfiguredAccessory", - "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser", - "ExternalAccessory_ExternalAccessoryDefines", -] -FileProvider = [ - "AppKit", - "Foundation", - "UniformTypeIdentifiers", -] -FileProviderUI = [ - "AppKit", - "FileProvider", - "Foundation", -] -FileProviderUI_FPUIActionExtensionContext = [] -FileProviderUI_FPUIActionExtensionViewController = [] -FileProviderUI_FPUIBase = [] -FileProviderUI_all = [ - "FileProviderUI", - "FileProviderUI_FPUIActionExtensionContext", - "FileProviderUI_FPUIActionExtensionViewController", - "FileProviderUI_FPUIBase", -] -FileProvider_NSFileProviderActions = [] -FileProvider_NSFileProviderDefines = [] -FileProvider_NSFileProviderDomain = [] -FileProvider_NSFileProviderEnumerating = [] -FileProvider_NSFileProviderError = [] -FileProvider_NSFileProviderExtension = [] -FileProvider_NSFileProviderItem = [] -FileProvider_NSFileProviderItemDecoration = [] -FileProvider_NSFileProviderManager = [] -FileProvider_NSFileProviderModifyItemOptions = [] -FileProvider_NSFileProviderReplicatedExtension = [] -FileProvider_NSFileProviderRequest = [] -FileProvider_NSFileProviderService = [] -FileProvider_NSFileProviderTesting = [] -FileProvider_NSFileProviderThumbnailing = [] -FileProvider_all = [ - "FileProvider", - "FileProvider_NSFileProviderActions", - "FileProvider_NSFileProviderDefines", - "FileProvider_NSFileProviderDomain", - "FileProvider_NSFileProviderEnumerating", - "FileProvider_NSFileProviderError", - "FileProvider_NSFileProviderExtension", - "FileProvider_NSFileProviderItem", - "FileProvider_NSFileProviderItemDecoration", - "FileProvider_NSFileProviderManager", - "FileProvider_NSFileProviderModifyItemOptions", - "FileProvider_NSFileProviderReplicatedExtension", - "FileProvider_NSFileProviderRequest", - "FileProvider_NSFileProviderService", - "FileProvider_NSFileProviderTesting", - "FileProvider_NSFileProviderThumbnailing", -] -Foundation = [ - "objc2", - "block2", - "Foundation_NSObjCRuntime", - "Foundation_NSString", - "Foundation_NSDictionary", - "Foundation_NSEnumerator", -] -Foundation_FoundationErrors = [] -Foundation_FoundationLegacySwiftCompatibility = [] -Foundation_NSAffineTransform = [] -Foundation_NSAppleEventDescriptor = [] -Foundation_NSAppleEventManager = [] -Foundation_NSAppleScript = [] -Foundation_NSArchiver = [] -Foundation_NSArray = [] -Foundation_NSAttributedString = [] -Foundation_NSAutoreleasePool = [] -Foundation_NSBackgroundActivityScheduler = [] -Foundation_NSBundle = [] -Foundation_NSByteCountFormatter = [] -Foundation_NSByteOrder = [] -Foundation_NSCache = [] -Foundation_NSCalendar = [] -Foundation_NSCalendarDate = [] -Foundation_NSCharacterSet = [] -Foundation_NSClassDescription = [] -Foundation_NSCoder = [] -Foundation_NSComparisonPredicate = [] -Foundation_NSCompoundPredicate = [] -Foundation_NSConnection = [] -Foundation_NSData = [] -Foundation_NSDate = [] -Foundation_NSDateComponentsFormatter = [] -Foundation_NSDateFormatter = [] -Foundation_NSDateInterval = [] -Foundation_NSDateIntervalFormatter = [] -Foundation_NSDecimal = [] -Foundation_NSDecimalNumber = [] -Foundation_NSDictionary = [] -Foundation_NSDistantObject = [] -Foundation_NSDistributedLock = [] -Foundation_NSDistributedNotificationCenter = [] -Foundation_NSEnergyFormatter = [] -Foundation_NSEnumerator = [] -Foundation_NSError = [] -Foundation_NSException = [] -Foundation_NSExpression = [] -Foundation_NSExtensionContext = [] -Foundation_NSExtensionItem = [] -Foundation_NSExtensionRequestHandling = [] -Foundation_NSFileCoordinator = [] -Foundation_NSFileHandle = [] -Foundation_NSFileManager = [] -Foundation_NSFilePresenter = [] -Foundation_NSFileVersion = [] -Foundation_NSFileWrapper = [] -Foundation_NSFormatter = [] -Foundation_NSGarbageCollector = [] -Foundation_NSGeometry = [] -Foundation_NSHFSFileTypes = [] -Foundation_NSHTTPCookie = [] -Foundation_NSHTTPCookieStorage = [] -Foundation_NSHashTable = [] -Foundation_NSHost = [] -Foundation_NSISO8601DateFormatter = [] -Foundation_NSIndexPath = [] -Foundation_NSIndexSet = [] -Foundation_NSInflectionRule = [] -Foundation_NSInvocation = [] -Foundation_NSItemProvider = [] -Foundation_NSJSONSerialization = [] -Foundation_NSKeyValueCoding = [] -Foundation_NSKeyValueObserving = [] -Foundation_NSKeyedArchiver = [] -Foundation_NSLengthFormatter = [] -Foundation_NSLinguisticTagger = [] -Foundation_NSListFormatter = [] -Foundation_NSLocale = [] -Foundation_NSLock = [] -Foundation_NSMapTable = [] -Foundation_NSMassFormatter = [] -Foundation_NSMeasurement = [] -Foundation_NSMeasurementFormatter = [] -Foundation_NSMetadata = [] -Foundation_NSMetadataAttributes = [] -Foundation_NSMethodSignature = [] -Foundation_NSMorphology = [] -Foundation_NSNetServices = [] -Foundation_NSNotification = [] -Foundation_NSNotificationQueue = [] -Foundation_NSNull = [] -Foundation_NSNumberFormatter = [] -Foundation_NSObjCRuntime = [] -Foundation_NSObject = [] -Foundation_NSObjectScripting = [] -Foundation_NSOperation = [] -Foundation_NSOrderedCollectionChange = [] -Foundation_NSOrderedCollectionDifference = [] -Foundation_NSOrderedSet = [] -Foundation_NSOrthography = [] -Foundation_NSPathUtilities = [] -Foundation_NSPersonNameComponents = [] -Foundation_NSPersonNameComponentsFormatter = [] -Foundation_NSPointerArray = [] -Foundation_NSPointerFunctions = [] -Foundation_NSPort = [] -Foundation_NSPortCoder = [] -Foundation_NSPortMessage = [] -Foundation_NSPortNameServer = [] -Foundation_NSPredicate = [] -Foundation_NSProcessInfo = [] -Foundation_NSProgress = [] -Foundation_NSPropertyList = [] -Foundation_NSProtocolChecker = [] -Foundation_NSProxy = [] -Foundation_NSRange = [] -Foundation_NSRegularExpression = [] -Foundation_NSRelativeDateTimeFormatter = [] -Foundation_NSRunLoop = [] -Foundation_NSScanner = [] -Foundation_NSScriptClassDescription = [] -Foundation_NSScriptCoercionHandler = [] -Foundation_NSScriptCommand = [] -Foundation_NSScriptCommandDescription = [] -Foundation_NSScriptExecutionContext = [] -Foundation_NSScriptKeyValueCoding = [] -Foundation_NSScriptObjectSpecifiers = [] -Foundation_NSScriptStandardSuiteCommands = [] -Foundation_NSScriptSuiteRegistry = [] -Foundation_NSScriptWhoseTests = [] -Foundation_NSSet = [] -Foundation_NSSortDescriptor = [] -Foundation_NSSpellServer = [] -Foundation_NSStream = [] -Foundation_NSString = [] -Foundation_NSTask = [] -Foundation_NSTermOfAddress = [] -Foundation_NSTextCheckingResult = [] -Foundation_NSThread = [] -Foundation_NSTimeZone = [] -Foundation_NSTimer = [] -Foundation_NSURL = [] -Foundation_NSURLAuthenticationChallenge = [] -Foundation_NSURLCache = [] -Foundation_NSURLConnection = [] -Foundation_NSURLCredential = [] -Foundation_NSURLCredentialStorage = [] -Foundation_NSURLDownload = [] -Foundation_NSURLError = [] -Foundation_NSURLHandle = [] -Foundation_NSURLProtectionSpace = [] -Foundation_NSURLProtocol = [] -Foundation_NSURLRequest = [] -Foundation_NSURLResponse = [] -Foundation_NSURLSession = [] -Foundation_NSUUID = [] -Foundation_NSUbiquitousKeyValueStore = [] -Foundation_NSUndoManager = [] -Foundation_NSUnit = [] -Foundation_NSUserActivity = [] -Foundation_NSUserDefaults = [] -Foundation_NSUserNotification = [] -Foundation_NSUserScriptTask = [] -Foundation_NSValue = [] -Foundation_NSValueTransformer = [] -Foundation_NSXMLDTD = [] -Foundation_NSXMLDTDNode = [] -Foundation_NSXMLDocument = [] -Foundation_NSXMLElement = [] -Foundation_NSXMLNode = [] -Foundation_NSXMLNodeOptions = [] -Foundation_NSXMLParser = [] -Foundation_NSXPCConnection = [] -Foundation_NSZone = [] -Foundation_all = [ - "Foundation", - "Foundation_FoundationErrors", - "Foundation_FoundationLegacySwiftCompatibility", - "Foundation_NSAffineTransform", - "Foundation_NSAppleEventDescriptor", - "Foundation_NSAppleEventManager", - "Foundation_NSAppleScript", - "Foundation_NSArchiver", - "Foundation_NSArray", - "Foundation_NSAttributedString", - "Foundation_NSAutoreleasePool", - "Foundation_NSBackgroundActivityScheduler", - "Foundation_NSBundle", - "Foundation_NSByteCountFormatter", - "Foundation_NSByteOrder", - "Foundation_NSCache", - "Foundation_NSCalendar", - "Foundation_NSCalendarDate", - "Foundation_NSCharacterSet", - "Foundation_NSClassDescription", - "Foundation_NSCoder", - "Foundation_NSComparisonPredicate", - "Foundation_NSCompoundPredicate", - "Foundation_NSConnection", - "Foundation_NSData", - "Foundation_NSDate", - "Foundation_NSDateComponentsFormatter", - "Foundation_NSDateFormatter", - "Foundation_NSDateInterval", - "Foundation_NSDateIntervalFormatter", - "Foundation_NSDecimal", - "Foundation_NSDecimalNumber", - "Foundation_NSDictionary", - "Foundation_NSDistantObject", - "Foundation_NSDistributedLock", - "Foundation_NSDistributedNotificationCenter", - "Foundation_NSEnergyFormatter", - "Foundation_NSEnumerator", - "Foundation_NSError", - "Foundation_NSException", - "Foundation_NSExpression", - "Foundation_NSExtensionContext", - "Foundation_NSExtensionItem", - "Foundation_NSExtensionRequestHandling", - "Foundation_NSFileCoordinator", - "Foundation_NSFileHandle", - "Foundation_NSFileManager", - "Foundation_NSFilePresenter", - "Foundation_NSFileVersion", - "Foundation_NSFileWrapper", - "Foundation_NSFormatter", - "Foundation_NSGarbageCollector", - "Foundation_NSGeometry", - "Foundation_NSHFSFileTypes", - "Foundation_NSHTTPCookie", - "Foundation_NSHTTPCookieStorage", - "Foundation_NSHashTable", - "Foundation_NSHost", - "Foundation_NSISO8601DateFormatter", - "Foundation_NSIndexPath", - "Foundation_NSIndexSet", - "Foundation_NSInflectionRule", - "Foundation_NSInvocation", - "Foundation_NSItemProvider", - "Foundation_NSJSONSerialization", - "Foundation_NSKeyValueCoding", - "Foundation_NSKeyValueObserving", - "Foundation_NSKeyedArchiver", - "Foundation_NSLengthFormatter", - "Foundation_NSLinguisticTagger", - "Foundation_NSListFormatter", - "Foundation_NSLocale", - "Foundation_NSLock", - "Foundation_NSMapTable", - "Foundation_NSMassFormatter", - "Foundation_NSMeasurement", - "Foundation_NSMeasurementFormatter", - "Foundation_NSMetadata", - "Foundation_NSMetadataAttributes", - "Foundation_NSMethodSignature", - "Foundation_NSMorphology", - "Foundation_NSNetServices", - "Foundation_NSNotification", - "Foundation_NSNotificationQueue", - "Foundation_NSNull", - "Foundation_NSNumberFormatter", - "Foundation_NSObjCRuntime", - "Foundation_NSObject", - "Foundation_NSObjectScripting", - "Foundation_NSOperation", - "Foundation_NSOrderedCollectionChange", - "Foundation_NSOrderedCollectionDifference", - "Foundation_NSOrderedSet", - "Foundation_NSOrthography", - "Foundation_NSPathUtilities", - "Foundation_NSPersonNameComponents", - "Foundation_NSPersonNameComponentsFormatter", - "Foundation_NSPointerArray", - "Foundation_NSPointerFunctions", - "Foundation_NSPort", - "Foundation_NSPortCoder", - "Foundation_NSPortMessage", - "Foundation_NSPortNameServer", - "Foundation_NSPredicate", - "Foundation_NSProcessInfo", - "Foundation_NSProgress", - "Foundation_NSPropertyList", - "Foundation_NSProtocolChecker", - "Foundation_NSProxy", - "Foundation_NSRange", - "Foundation_NSRegularExpression", - "Foundation_NSRelativeDateTimeFormatter", - "Foundation_NSRunLoop", - "Foundation_NSScanner", - "Foundation_NSScriptClassDescription", - "Foundation_NSScriptCoercionHandler", - "Foundation_NSScriptCommand", - "Foundation_NSScriptCommandDescription", - "Foundation_NSScriptExecutionContext", - "Foundation_NSScriptKeyValueCoding", - "Foundation_NSScriptObjectSpecifiers", - "Foundation_NSScriptStandardSuiteCommands", - "Foundation_NSScriptSuiteRegistry", - "Foundation_NSScriptWhoseTests", - "Foundation_NSSet", - "Foundation_NSSortDescriptor", - "Foundation_NSSpellServer", - "Foundation_NSStream", - "Foundation_NSString", - "Foundation_NSTask", - "Foundation_NSTermOfAddress", - "Foundation_NSTextCheckingResult", - "Foundation_NSThread", - "Foundation_NSTimeZone", - "Foundation_NSTimer", - "Foundation_NSURL", - "Foundation_NSURLAuthenticationChallenge", - "Foundation_NSURLCache", - "Foundation_NSURLConnection", - "Foundation_NSURLCredential", - "Foundation_NSURLCredentialStorage", - "Foundation_NSURLDownload", - "Foundation_NSURLError", - "Foundation_NSURLHandle", - "Foundation_NSURLProtectionSpace", - "Foundation_NSURLProtocol", - "Foundation_NSURLRequest", - "Foundation_NSURLResponse", - "Foundation_NSURLSession", - "Foundation_NSUUID", - "Foundation_NSUbiquitousKeyValueStore", - "Foundation_NSUndoManager", - "Foundation_NSUnit", - "Foundation_NSUserActivity", - "Foundation_NSUserDefaults", - "Foundation_NSUserNotification", - "Foundation_NSUserScriptTask", - "Foundation_NSValue", - "Foundation_NSValueTransformer", - "Foundation_NSXMLDTD", - "Foundation_NSXMLDTDNode", - "Foundation_NSXMLDocument", - "Foundation_NSXMLElement", - "Foundation_NSXMLNode", - "Foundation_NSXMLNodeOptions", - "Foundation_NSXMLParser", - "Foundation_NSXPCConnection", - "Foundation_NSZone", -] -GameController = [ - "AppKit", - "Foundation", -] -GameController_GCAxis2DInput = [] -GameController_GCAxisElement = [] -GameController_GCAxisInput = [] -GameController_GCButtonElement = [] -GameController_GCColor = [] -GameController_GCController = [] -GameController_GCControllerAxisInput = [] -GameController_GCControllerButtonInput = [] -GameController_GCControllerDirectionPad = [] -GameController_GCControllerElement = [] -GameController_GCControllerInput = [] -GameController_GCControllerTouchpad = [] -GameController_GCDevice = [] -GameController_GCDeviceBattery = [] -GameController_GCDeviceCursor = [] -GameController_GCDeviceHaptics = [] -GameController_GCDeviceLight = [] -GameController_GCDevicePhysicalInput = [] -GameController_GCDevicePhysicalInputState = [] -GameController_GCDevicePhysicalInputStateDiff = [] -GameController_GCDirectionPadElement = [] -GameController_GCDirectionalGamepad = [] -GameController_GCDualSenseAdaptiveTrigger = [] -GameController_GCDualSenseGamepad = [] -GameController_GCDualShockGamepad = [] -GameController_GCEventViewController = [] -GameController_GCExtendedGamepad = [] -GameController_GCExtendedGamepadSnapshot = [] -GameController_GCExtern = [] -GameController_GCGamepad = [] -GameController_GCGamepadSnapshot = [] -GameController_GCGearShifterElement = [] -GameController_GCInputNames = [] -GameController_GCKeyCodes = [] -GameController_GCKeyNames = [] -GameController_GCKeyboard = [] -GameController_GCKeyboardInput = [] -GameController_GCLinearInput = [] -GameController_GCMicroGamepad = [] -GameController_GCMicroGamepadSnapshot = [] -GameController_GCMotion = [] -GameController_GCMouse = [] -GameController_GCMouseInput = [] -GameController_GCPhysicalInputElement = [] -GameController_GCPhysicalInputProfile = [] -GameController_GCPhysicalInputSource = [] -GameController_GCPressedStateInput = [] -GameController_GCProductCategories = [] -GameController_GCRacingWheel = [] -GameController_GCRacingWheelInput = [] -GameController_GCRelativeInput = [] -GameController_GCSteeringWheelElement = [] -GameController_GCSwitchElement = [] -GameController_GCSwitchPositionInput = [] -GameController_GCSyntheticDeviceKeys = [] -GameController_GCTouchedStateInput = [] -GameController_GCTypes = [] -GameController_GCXboxGamepad = [] -GameController_all = [ - "GameController", - "GameController_GCAxis2DInput", - "GameController_GCAxisElement", - "GameController_GCAxisInput", - "GameController_GCButtonElement", - "GameController_GCColor", - "GameController_GCController", - "GameController_GCControllerAxisInput", - "GameController_GCControllerButtonInput", - "GameController_GCControllerDirectionPad", - "GameController_GCControllerElement", - "GameController_GCControllerInput", - "GameController_GCControllerTouchpad", - "GameController_GCDevice", - "GameController_GCDeviceBattery", - "GameController_GCDeviceCursor", - "GameController_GCDeviceHaptics", - "GameController_GCDeviceLight", - "GameController_GCDevicePhysicalInput", - "GameController_GCDevicePhysicalInputState", - "GameController_GCDevicePhysicalInputStateDiff", - "GameController_GCDirectionPadElement", - "GameController_GCDirectionalGamepad", - "GameController_GCDualSenseAdaptiveTrigger", - "GameController_GCDualSenseGamepad", - "GameController_GCDualShockGamepad", - "GameController_GCEventViewController", - "GameController_GCExtendedGamepad", - "GameController_GCExtendedGamepadSnapshot", - "GameController_GCExtern", - "GameController_GCGamepad", - "GameController_GCGamepadSnapshot", - "GameController_GCGearShifterElement", - "GameController_GCInputNames", - "GameController_GCKeyCodes", - "GameController_GCKeyNames", - "GameController_GCKeyboard", - "GameController_GCKeyboardInput", - "GameController_GCLinearInput", - "GameController_GCMicroGamepad", - "GameController_GCMicroGamepadSnapshot", - "GameController_GCMotion", - "GameController_GCMouse", - "GameController_GCMouseInput", - "GameController_GCPhysicalInputElement", - "GameController_GCPhysicalInputProfile", - "GameController_GCPhysicalInputSource", - "GameController_GCPressedStateInput", - "GameController_GCProductCategories", - "GameController_GCRacingWheel", - "GameController_GCRacingWheelInput", - "GameController_GCRelativeInput", - "GameController_GCSteeringWheelElement", - "GameController_GCSwitchElement", - "GameController_GCSwitchPositionInput", - "GameController_GCSyntheticDeviceKeys", - "GameController_GCTouchedStateInput", - "GameController_GCTypes", - "GameController_GCXboxGamepad", -] -GameKit = [ - "AppKit", - "Foundation", -] -GameKit_GKAccessPoint = [] -GameKit_GKAchievement = [] -GameKit_GKAchievementDescription = [] -GameKit_GKAchievementViewController = [] -GameKit_GKBasePlayer = [] -GameKit_GKChallenge = [] -GameKit_GKChallengeEventHandler = [] -GameKit_GKChallengesViewController = [] -GameKit_GKCloudPlayer = [] -GameKit_GKDefines = [] -GameKit_GKDialogController = [] -GameKit_GKError = [] -GameKit_GKEventListener = [] -GameKit_GKFriendRequestComposeViewController = [] -GameKit_GKGameCenterViewController = [] -GameKit_GKGameSession = [] -GameKit_GKGameSessionError = [] -GameKit_GKGameSessionEventListener = [] -GameKit_GKGameSessionSharingViewController = [] -GameKit_GKLeaderboard = [] -GameKit_GKLeaderboardEntry = [] -GameKit_GKLeaderboardScore = [] -GameKit_GKLeaderboardSet = [] -GameKit_GKLeaderboardViewController = [] -GameKit_GKLocalPlayer = [] -GameKit_GKMatch = [] -GameKit_GKMatchmaker = [] -GameKit_GKMatchmakerViewController = [] -GameKit_GKNotificationBanner = [] -GameKit_GKPeerPickerController = [] -GameKit_GKPlayer = [] -GameKit_GKPublicConstants = [] -GameKit_GKPublicProtocols = [] -GameKit_GKSavedGame = [] -GameKit_GKSavedGameListener = [] -GameKit_GKScore = [] -GameKit_GKSession = [] -GameKit_GKSessionError = [] -GameKit_GKTurnBasedMatch = [] -GameKit_GKTurnBasedMatchmakerViewController = [] -GameKit_GKVoiceChat = [] -GameKit_GKVoiceChatService = [] -GameKit_all = [ - "GameKit", - "GameKit_GKAccessPoint", - "GameKit_GKAchievement", - "GameKit_GKAchievementDescription", - "GameKit_GKAchievementViewController", - "GameKit_GKBasePlayer", - "GameKit_GKChallenge", - "GameKit_GKChallengeEventHandler", - "GameKit_GKChallengesViewController", - "GameKit_GKCloudPlayer", - "GameKit_GKDefines", - "GameKit_GKDialogController", - "GameKit_GKError", - "GameKit_GKEventListener", - "GameKit_GKFriendRequestComposeViewController", - "GameKit_GKGameCenterViewController", - "GameKit_GKGameSession", - "GameKit_GKGameSessionError", - "GameKit_GKGameSessionEventListener", - "GameKit_GKGameSessionSharingViewController", - "GameKit_GKLeaderboard", - "GameKit_GKLeaderboardEntry", - "GameKit_GKLeaderboardScore", - "GameKit_GKLeaderboardSet", - "GameKit_GKLeaderboardViewController", - "GameKit_GKLocalPlayer", - "GameKit_GKMatch", - "GameKit_GKMatchmaker", - "GameKit_GKMatchmakerViewController", - "GameKit_GKNotificationBanner", - "GameKit_GKPeerPickerController", - "GameKit_GKPlayer", - "GameKit_GKPublicConstants", - "GameKit_GKPublicProtocols", - "GameKit_GKSavedGame", - "GameKit_GKSavedGameListener", - "GameKit_GKScore", - "GameKit_GKSession", - "GameKit_GKSessionError", - "GameKit_GKTurnBasedMatch", - "GameKit_GKTurnBasedMatchmakerViewController", - "GameKit_GKVoiceChat", - "GameKit_GKVoiceChatService", -] -HealthKit = [ - "CoreLocation", - "Foundation", - "UniformTypeIdentifiers", -] -HealthKit_HKActivitySummary = [] -HealthKit_HKActivitySummaryQuery = [] -HealthKit_HKAnchoredObjectQuery = [] -HealthKit_HKAppleWalkingSteadinessClassification = [] -HealthKit_HKAttachment = [] -HealthKit_HKAttachmentStore = [] -HealthKit_HKAudiogramSample = [] -HealthKit_HKCDADocumentSample = [] -HealthKit_HKCategorySample = [] -HealthKit_HKCategoryValues = [] -HealthKit_HKCharacteristicObjects = [] -HealthKit_HKCharacteristicValues = [] -HealthKit_HKClinicalRecord = [] -HealthKit_HKClinicalType = [] -HealthKit_HKContactsLensSpecification = [] -HealthKit_HKContactsPrescription = [] -HealthKit_HKCorrelation = [] -HealthKit_HKCorrelationQuery = [] -HealthKit_HKCumulativeQuantitySample = [] -HealthKit_HKCumulativeQuantitySeriesSample = [] -HealthKit_HKDefines = [] -HealthKit_HKDeletedObject = [] -HealthKit_HKDevice = [] -HealthKit_HKDiscreteQuantitySample = [] -HealthKit_HKDocumentQuery = [] -HealthKit_HKDocumentSample = [] -HealthKit_HKElectrocardiogram = [] -HealthKit_HKElectrocardiogramQuery = [] -HealthKit_HKFHIRRelease = [] -HealthKit_HKFHIRResource = [] -HealthKit_HKFHIRVersion = [] -HealthKit_HKGlassesLensSpecification = [] -HealthKit_HKGlassesPrescription = [] -HealthKit_HKHealthStore = [] -HealthKit_HKHeartbeatSeriesBuilder = [] -HealthKit_HKHeartbeatSeriesQuery = [] -HealthKit_HKHeartbeatSeriesSample = [] -HealthKit_HKLensSpecification = [] -HealthKit_HKLiveWorkoutBuilder = [] -HealthKit_HKLiveWorkoutDataSource = [] -HealthKit_HKMetadata = [] -HealthKit_HKObject = [] -HealthKit_HKObjectType = [] -HealthKit_HKObserverQuery = [] -HealthKit_HKQuantity = [] -HealthKit_HKQuantityAggregationStyle = [] -HealthKit_HKQuantitySample = [] -HealthKit_HKQuantitySeriesSampleBuilder = [] -HealthKit_HKQuantitySeriesSampleQuery = [] -HealthKit_HKQuery = [] -HealthKit_HKQueryAnchor = [] -HealthKit_HKQueryDescriptor = [] -HealthKit_HKSample = [] -HealthKit_HKSampleQuery = [] -HealthKit_HKSeriesBuilder = [] -HealthKit_HKSeriesSample = [] -HealthKit_HKSource = [] -HealthKit_HKSourceQuery = [] -HealthKit_HKSourceRevision = [] -HealthKit_HKStatistics = [] -HealthKit_HKStatisticsCollectionQuery = [] -HealthKit_HKStatisticsQuery = [] -HealthKit_HKTypeIdentifiers = [] -HealthKit_HKUnit = [] -HealthKit_HKVerifiableClinicalRecord = [] -HealthKit_HKVerifiableClinicalRecordQuery = [] -HealthKit_HKVerifiableClinicalRecordSubject = [] -HealthKit_HKVisionPrescription = [] -HealthKit_HKVisionPrism = [] -HealthKit_HKWorkout = [] -HealthKit_HKWorkoutActivity = [] -HealthKit_HKWorkoutBuilder = [] -HealthKit_HKWorkoutConfiguration = [] -HealthKit_HKWorkoutRoute = [] -HealthKit_HKWorkoutRouteBuilder = [] -HealthKit_HKWorkoutRouteQuery = [] -HealthKit_HKWorkoutSession = [] -HealthKit_all = [ - "HealthKit", - "HealthKit_HKActivitySummary", - "HealthKit_HKActivitySummaryQuery", - "HealthKit_HKAnchoredObjectQuery", - "HealthKit_HKAppleWalkingSteadinessClassification", - "HealthKit_HKAttachment", - "HealthKit_HKAttachmentStore", - "HealthKit_HKAudiogramSample", - "HealthKit_HKCDADocumentSample", - "HealthKit_HKCategorySample", - "HealthKit_HKCategoryValues", - "HealthKit_HKCharacteristicObjects", - "HealthKit_HKCharacteristicValues", - "HealthKit_HKClinicalRecord", - "HealthKit_HKClinicalType", - "HealthKit_HKContactsLensSpecification", - "HealthKit_HKContactsPrescription", - "HealthKit_HKCorrelation", - "HealthKit_HKCorrelationQuery", - "HealthKit_HKCumulativeQuantitySample", - "HealthKit_HKCumulativeQuantitySeriesSample", - "HealthKit_HKDefines", - "HealthKit_HKDeletedObject", - "HealthKit_HKDevice", - "HealthKit_HKDiscreteQuantitySample", - "HealthKit_HKDocumentQuery", - "HealthKit_HKDocumentSample", - "HealthKit_HKElectrocardiogram", - "HealthKit_HKElectrocardiogramQuery", - "HealthKit_HKFHIRRelease", - "HealthKit_HKFHIRResource", - "HealthKit_HKFHIRVersion", - "HealthKit_HKGlassesLensSpecification", - "HealthKit_HKGlassesPrescription", - "HealthKit_HKHealthStore", - "HealthKit_HKHeartbeatSeriesBuilder", - "HealthKit_HKHeartbeatSeriesQuery", - "HealthKit_HKHeartbeatSeriesSample", - "HealthKit_HKLensSpecification", - "HealthKit_HKLiveWorkoutBuilder", - "HealthKit_HKLiveWorkoutDataSource", - "HealthKit_HKMetadata", - "HealthKit_HKObject", - "HealthKit_HKObjectType", - "HealthKit_HKObserverQuery", - "HealthKit_HKQuantity", - "HealthKit_HKQuantityAggregationStyle", - "HealthKit_HKQuantitySample", - "HealthKit_HKQuantitySeriesSampleBuilder", - "HealthKit_HKQuantitySeriesSampleQuery", - "HealthKit_HKQuery", - "HealthKit_HKQueryAnchor", - "HealthKit_HKQueryDescriptor", - "HealthKit_HKSample", - "HealthKit_HKSampleQuery", - "HealthKit_HKSeriesBuilder", - "HealthKit_HKSeriesSample", - "HealthKit_HKSource", - "HealthKit_HKSourceQuery", - "HealthKit_HKSourceRevision", - "HealthKit_HKStatistics", - "HealthKit_HKStatisticsCollectionQuery", - "HealthKit_HKStatisticsQuery", - "HealthKit_HKTypeIdentifiers", - "HealthKit_HKUnit", - "HealthKit_HKVerifiableClinicalRecord", - "HealthKit_HKVerifiableClinicalRecordQuery", - "HealthKit_HKVerifiableClinicalRecordSubject", - "HealthKit_HKVisionPrescription", - "HealthKit_HKVisionPrism", - "HealthKit_HKWorkout", - "HealthKit_HKWorkoutActivity", - "HealthKit_HKWorkoutBuilder", - "HealthKit_HKWorkoutConfiguration", - "HealthKit_HKWorkoutRoute", - "HealthKit_HKWorkoutRouteBuilder", - "HealthKit_HKWorkoutRouteQuery", - "HealthKit_HKWorkoutSession", -] -IdentityLookup = [ - "Foundation", -] -IdentityLookup_ILBase = [] -IdentityLookup_ILCallClassificationRequest = [] -IdentityLookup_ILCallCommunication = [] -IdentityLookup_ILClassificationActions = [] -IdentityLookup_ILClassificationRequest = [] -IdentityLookup_ILClassificationResponse = [] -IdentityLookup_ILCommunication = [] -IdentityLookup_ILMessageClassificationRequest = [] -IdentityLookup_ILMessageCommunication = [] -IdentityLookup_ILMessageFilterAction = [] -IdentityLookup_ILMessageFilterCapabilitiesQueryHandling = [] -IdentityLookup_ILMessageFilterCapabilitiesQueryRequest = [] -IdentityLookup_ILMessageFilterCapabilitiesQueryResponse = [] -IdentityLookup_ILMessageFilterError = [] -IdentityLookup_ILMessageFilterExtension = [] -IdentityLookup_ILMessageFilterExtensionContext = [] -IdentityLookup_ILMessageFilterQueryHandling = [] -IdentityLookup_ILMessageFilterQueryRequest = [] -IdentityLookup_ILMessageFilterQueryResponse = [] -IdentityLookup_ILNetworkResponse = [] -IdentityLookup_all = [ - "IdentityLookup", - "IdentityLookup_ILBase", - "IdentityLookup_ILCallClassificationRequest", - "IdentityLookup_ILCallCommunication", - "IdentityLookup_ILClassificationActions", - "IdentityLookup_ILClassificationRequest", - "IdentityLookup_ILClassificationResponse", - "IdentityLookup_ILCommunication", - "IdentityLookup_ILMessageClassificationRequest", - "IdentityLookup_ILMessageCommunication", - "IdentityLookup_ILMessageFilterAction", - "IdentityLookup_ILMessageFilterCapabilitiesQueryHandling", - "IdentityLookup_ILMessageFilterCapabilitiesQueryRequest", - "IdentityLookup_ILMessageFilterCapabilitiesQueryResponse", - "IdentityLookup_ILMessageFilterError", - "IdentityLookup_ILMessageFilterExtension", - "IdentityLookup_ILMessageFilterExtensionContext", - "IdentityLookup_ILMessageFilterQueryHandling", - "IdentityLookup_ILMessageFilterQueryRequest", - "IdentityLookup_ILMessageFilterQueryResponse", - "IdentityLookup_ILNetworkResponse", -] -InputMethodKit = [ - "AppKit", - "Foundation", -] -InputMethodKit_IMKCandidates = [] -InputMethodKit_IMKInputController = [] -InputMethodKit_IMKServer = [] -InputMethodKit_all = [ - "InputMethodKit", - "InputMethodKit_IMKCandidates", - "InputMethodKit_IMKInputController", - "InputMethodKit_IMKServer", -] -LinkPresentation = [ - "AppKit", - "Foundation", -] -LinkPresentation_LPError = [] -LinkPresentation_LPFoundation = [] -LinkPresentation_LPLinkMetadata = [] -LinkPresentation_LPLinkView = [] -LinkPresentation_LPMetadataProvider = [] -LinkPresentation_all = [ - "LinkPresentation", - "LinkPresentation_LPError", - "LinkPresentation_LPFoundation", - "LinkPresentation_LPLinkMetadata", - "LinkPresentation_LPLinkView", - "LinkPresentation_LPMetadataProvider", -] -LocalAuthentication = [ - "Foundation", -] -LocalAuthenticationEmbeddedUI = [ - "AppKit", - "Foundation", - "LocalAuthentication", -] -LocalAuthenticationEmbeddedUI_LAAuthenticationView = [] -LocalAuthenticationEmbeddedUI_LAPresentationContext = [] -LocalAuthenticationEmbeddedUI_LARight_UI = [] -LocalAuthenticationEmbeddedUI_all = [ - "LocalAuthenticationEmbeddedUI", - "LocalAuthenticationEmbeddedUI_LAAuthenticationView", - "LocalAuthenticationEmbeddedUI_LAPresentationContext", - "LocalAuthenticationEmbeddedUI_LARight_UI", -] -LocalAuthentication_LABase = [] -LocalAuthentication_LAContext = [] -LocalAuthentication_LAError = [] -LocalAuthentication_LAPersistedRight = [] -LocalAuthentication_LAPrivateKey = [] -LocalAuthentication_LAPublicDefines = [] -LocalAuthentication_LAPublicKey = [] -LocalAuthentication_LARequirement = [] -LocalAuthentication_LARight = [] -LocalAuthentication_LARightStore = [] -LocalAuthentication_LASecret = [] -LocalAuthentication_all = [ - "LocalAuthentication", - "LocalAuthentication_LABase", - "LocalAuthentication_LAContext", - "LocalAuthentication_LAError", - "LocalAuthentication_LAPersistedRight", - "LocalAuthentication_LAPrivateKey", - "LocalAuthentication_LAPublicDefines", - "LocalAuthentication_LAPublicKey", - "LocalAuthentication_LARequirement", - "LocalAuthentication_LARight", - "LocalAuthentication_LARightStore", - "LocalAuthentication_LASecret", -] -MailKit = [ - "AppKit", - "Foundation", -] -MailKit_MEAddressAnnotation = [] -MailKit_MEComposeContext = [] -MailKit_MEComposeSession = [] -MailKit_MEContentBlocker = [] -MailKit_MEDecodedMessage = [] -MailKit_MEDecodedMessageBanner = [] -MailKit_MEEmailAddress = [] -MailKit_MEEncodedOutgoingMessage = [] -MailKit_MEExtension = [] -MailKit_MEExtensionManager = [] -MailKit_MEExtensionViewController = [] -MailKit_MEMessage = [] -MailKit_MEMessageAction = [] -MailKit_MEMessageActionDecision = [] -MailKit_MEMessageActionHandler = [] -MailKit_MEMessageDecoder = [] -MailKit_MEMessageEncoder = [] -MailKit_MEMessageEncodingResult = [] -MailKit_MEMessageSecurityHandler = [] -MailKit_MEMessageSecurityInformation = [] -MailKit_MEMessageSigner = [] -MailKit_MEOutgoingMessageEncodingStatus = [] -MailKit_all = [ - "MailKit", - "MailKit_MEAddressAnnotation", - "MailKit_MEComposeContext", - "MailKit_MEComposeSession", - "MailKit_MEContentBlocker", - "MailKit_MEDecodedMessage", - "MailKit_MEDecodedMessageBanner", - "MailKit_MEEmailAddress", - "MailKit_MEEncodedOutgoingMessage", - "MailKit_MEExtension", - "MailKit_MEExtensionManager", - "MailKit_MEExtensionViewController", - "MailKit_MEMessage", - "MailKit_MEMessageAction", - "MailKit_MEMessageActionDecision", - "MailKit_MEMessageActionHandler", - "MailKit_MEMessageDecoder", - "MailKit_MEMessageEncoder", - "MailKit_MEMessageEncodingResult", - "MailKit_MEMessageSecurityHandler", - "MailKit_MEMessageSecurityInformation", - "MailKit_MEMessageSigner", - "MailKit_MEOutgoingMessageEncodingStatus", -] -MapKit = [ - "AppKit", - "Contacts", - "CoreLocation", - "Foundation", -] -MapKit_MKAnnotation = [] -MapKit_MKAnnotationView = [] -MapKit_MKCircle = [] -MapKit_MKCircleRenderer = [] -MapKit_MKClusterAnnotation = [] -MapKit_MKCompassButton = [] -MapKit_MKDirections = [] -MapKit_MKDirectionsRequest = [] -MapKit_MKDirectionsResponse = [] -MapKit_MKDirectionsTypes = [] -MapKit_MKDistanceFormatter = [] -MapKit_MKFoundation = [] -MapKit_MKGeoJSONSerialization = [] -MapKit_MKGeodesicPolyline = [] -MapKit_MKGeometry = [] -MapKit_MKGradientPolylineRenderer = [] -MapKit_MKHybridMapConfiguration = [] -MapKit_MKImageryMapConfiguration = [] -MapKit_MKLocalPointsOfInterestRequest = [] -MapKit_MKLocalSearch = [] -MapKit_MKLocalSearchCompleter = [] -MapKit_MKLocalSearchRequest = [] -MapKit_MKLocalSearchResponse = [] -MapKit_MKLookAroundScene = [] -MapKit_MKLookAroundSceneRequest = [] -MapKit_MKLookAroundSnapshot = [] -MapKit_MKLookAroundSnapshotOptions = [] -MapKit_MKLookAroundSnapshotter = [] -MapKit_MKLookAroundViewController = [] -MapKit_MKMapCamera = [] -MapKit_MKMapCameraBoundary = [] -MapKit_MKMapCameraZoomRange = [] -MapKit_MKMapConfiguration = [] -MapKit_MKMapItem = [] -MapKit_MKMapSnapshot = [] -MapKit_MKMapSnapshotOptions = [] -MapKit_MKMapSnapshotter = [] -MapKit_MKMapView = [] -MapKit_MKMarkerAnnotationView = [] -MapKit_MKMultiPoint = [] -MapKit_MKMultiPolygon = [] -MapKit_MKMultiPolygonRenderer = [] -MapKit_MKMultiPolyline = [] -MapKit_MKMultiPolylineRenderer = [] -MapKit_MKOverlay = [] -MapKit_MKOverlayPathRenderer = [] -MapKit_MKOverlayRenderer = [] -MapKit_MKPinAnnotationView = [] -MapKit_MKPitchControl = [] -MapKit_MKPlacemark = [] -MapKit_MKPointAnnotation = [] -MapKit_MKPointOfInterestCategory = [] -MapKit_MKPointOfInterestFilter = [] -MapKit_MKPolygon = [] -MapKit_MKPolygonRenderer = [] -MapKit_MKPolyline = [] -MapKit_MKPolylineRenderer = [] -MapKit_MKShape = [] -MapKit_MKStandardMapConfiguration = [] -MapKit_MKTileOverlay = [] -MapKit_MKTileOverlayRenderer = [] -MapKit_MKTypes = [] -MapKit_MKUserLocation = [] -MapKit_MKUserLocationView = [] -MapKit_MKZoomControl = [] -MapKit_NSUserActivity_MKMapItem = [] -MapKit_all = [ - "MapKit", - "MapKit_MKAnnotation", - "MapKit_MKAnnotationView", - "MapKit_MKCircle", - "MapKit_MKCircleRenderer", - "MapKit_MKClusterAnnotation", - "MapKit_MKCompassButton", - "MapKit_MKDirections", - "MapKit_MKDirectionsRequest", - "MapKit_MKDirectionsResponse", - "MapKit_MKDirectionsTypes", - "MapKit_MKDistanceFormatter", - "MapKit_MKFoundation", - "MapKit_MKGeoJSONSerialization", - "MapKit_MKGeodesicPolyline", - "MapKit_MKGeometry", - "MapKit_MKGradientPolylineRenderer", - "MapKit_MKHybridMapConfiguration", - "MapKit_MKImageryMapConfiguration", - "MapKit_MKLocalPointsOfInterestRequest", - "MapKit_MKLocalSearch", - "MapKit_MKLocalSearchCompleter", - "MapKit_MKLocalSearchRequest", - "MapKit_MKLocalSearchResponse", - "MapKit_MKLookAroundScene", - "MapKit_MKLookAroundSceneRequest", - "MapKit_MKLookAroundSnapshot", - "MapKit_MKLookAroundSnapshotOptions", - "MapKit_MKLookAroundSnapshotter", - "MapKit_MKLookAroundViewController", - "MapKit_MKMapCamera", - "MapKit_MKMapCameraBoundary", - "MapKit_MKMapCameraZoomRange", - "MapKit_MKMapConfiguration", - "MapKit_MKMapItem", - "MapKit_MKMapSnapshot", - "MapKit_MKMapSnapshotOptions", - "MapKit_MKMapSnapshotter", - "MapKit_MKMapView", - "MapKit_MKMarkerAnnotationView", - "MapKit_MKMultiPoint", - "MapKit_MKMultiPolygon", - "MapKit_MKMultiPolygonRenderer", - "MapKit_MKMultiPolyline", - "MapKit_MKMultiPolylineRenderer", - "MapKit_MKOverlay", - "MapKit_MKOverlayPathRenderer", - "MapKit_MKOverlayRenderer", - "MapKit_MKPinAnnotationView", - "MapKit_MKPitchControl", - "MapKit_MKPlacemark", - "MapKit_MKPointAnnotation", - "MapKit_MKPointOfInterestCategory", - "MapKit_MKPointOfInterestFilter", - "MapKit_MKPolygon", - "MapKit_MKPolygonRenderer", - "MapKit_MKPolyline", - "MapKit_MKPolylineRenderer", - "MapKit_MKShape", - "MapKit_MKStandardMapConfiguration", - "MapKit_MKTileOverlay", - "MapKit_MKTileOverlayRenderer", - "MapKit_MKTypes", - "MapKit_MKUserLocation", - "MapKit_MKUserLocationView", - "MapKit_MKZoomControl", - "MapKit_NSUserActivity_MKMapItem", -] -MediaPlayer = [ - "AppKit", - "Foundation", -] -MediaPlayer_AVFoundation_MPNowPlayingInfoLanguageOptionAdditions = [] -MediaPlayer_AVPlayerItem_MediaPlayerAdditions = [] -MediaPlayer_MPContentItem = [] -MediaPlayer_MPError = [] -MediaPlayer_MPMediaEntity = [] -MediaPlayer_MPMediaItem = [] -MediaPlayer_MPMediaItemCollection = [] -MediaPlayer_MPMediaLibrary = [] -MediaPlayer_MPMediaPickerController = [] -MediaPlayer_MPMediaPlayback = [] -MediaPlayer_MPMediaPlaylist = [] -MediaPlayer_MPMediaQuery = [] -MediaPlayer_MPMediaQuerySection = [] -MediaPlayer_MPMoviePlayerController = [] -MediaPlayer_MPMoviePlayerViewController = [] -MediaPlayer_MPMusicPlayerApplicationController = [] -MediaPlayer_MPMusicPlayerController = [] -MediaPlayer_MPMusicPlayerQueueDescriptor = [] -MediaPlayer_MPNowPlayingInfoCenter = [] -MediaPlayer_MPNowPlayingInfoLanguageOption = [] -MediaPlayer_MPNowPlayingSession = [] -MediaPlayer_MPPlayableContentDataSource = [] -MediaPlayer_MPPlayableContentDelegate = [] -MediaPlayer_MPPlayableContentManager = [] -MediaPlayer_MPPlayableContentManagerContext = [] -MediaPlayer_MPRemoteCommand = [] -MediaPlayer_MPRemoteCommandCenter = [] -MediaPlayer_MPRemoteCommandEvent = [] -MediaPlayer_MPRemoteControlTypes = [] -MediaPlayer_MPVolumeSettings = [] -MediaPlayer_MPVolumeView = [] -MediaPlayer_MediaPlayerDefines = [] -MediaPlayer_NSUserActivity_MediaPlayerAdditions = [] -MediaPlayer_all = [ - "MediaPlayer", - "MediaPlayer_AVFoundation_MPNowPlayingInfoLanguageOptionAdditions", - "MediaPlayer_AVPlayerItem_MediaPlayerAdditions", - "MediaPlayer_MPContentItem", - "MediaPlayer_MPError", - "MediaPlayer_MPMediaEntity", - "MediaPlayer_MPMediaItem", - "MediaPlayer_MPMediaItemCollection", - "MediaPlayer_MPMediaLibrary", - "MediaPlayer_MPMediaPickerController", - "MediaPlayer_MPMediaPlayback", - "MediaPlayer_MPMediaPlaylist", - "MediaPlayer_MPMediaQuery", - "MediaPlayer_MPMediaQuerySection", - "MediaPlayer_MPMoviePlayerController", - "MediaPlayer_MPMoviePlayerViewController", - "MediaPlayer_MPMusicPlayerApplicationController", - "MediaPlayer_MPMusicPlayerController", - "MediaPlayer_MPMusicPlayerQueueDescriptor", - "MediaPlayer_MPNowPlayingInfoCenter", - "MediaPlayer_MPNowPlayingInfoLanguageOption", - "MediaPlayer_MPNowPlayingSession", - "MediaPlayer_MPPlayableContentDataSource", - "MediaPlayer_MPPlayableContentDelegate", - "MediaPlayer_MPPlayableContentManager", - "MediaPlayer_MPPlayableContentManagerContext", - "MediaPlayer_MPRemoteCommand", - "MediaPlayer_MPRemoteCommandCenter", - "MediaPlayer_MPRemoteCommandEvent", - "MediaPlayer_MPRemoteControlTypes", - "MediaPlayer_MPVolumeSettings", - "MediaPlayer_MPVolumeView", - "MediaPlayer_MediaPlayerDefines", - "MediaPlayer_NSUserActivity_MediaPlayerAdditions", -] -Metal = [ - "Foundation", -] -MetalFX = [ - "Foundation", - "Metal", -] -MetalFX_MTLFXDefines = [] -MetalFX_MTLFXSpatialScaler = [] -MetalFX_MTLFXTemporalScaler = [] -MetalFX_all = [ - "MetalFX", - "MetalFX_MTLFXDefines", - "MetalFX_MTLFXSpatialScaler", - "MetalFX_MTLFXTemporalScaler", -] -MetalKit = [ - "AppKit", - "Foundation", - "Metal", -] -MetalKit_MTKDefines = [] -MetalKit_MTKModel = [] -MetalKit_MTKTextureLoader = [] -MetalKit_MTKView = [] -MetalKit_all = [ - "MetalKit", - "MetalKit_MTKDefines", - "MetalKit_MTKModel", - "MetalKit_MTKTextureLoader", - "MetalKit_MTKView", -] -Metal_MTLAccelerationStructure = [] -Metal_MTLAccelerationStructureCommandEncoder = [] -Metal_MTLAccelerationStructureTypes = [] -Metal_MTLArgument = [] -Metal_MTLArgumentEncoder = [] -Metal_MTLBinaryArchive = [] -Metal_MTLBlitCommandEncoder = [] -Metal_MTLBlitPass = [] -Metal_MTLBuffer = [] -Metal_MTLCaptureManager = [] -Metal_MTLCaptureScope = [] -Metal_MTLCommandBuffer = [] -Metal_MTLCommandEncoder = [] -Metal_MTLCommandQueue = [] -Metal_MTLComputeCommandEncoder = [] -Metal_MTLComputePass = [] -Metal_MTLComputePipeline = [] -Metal_MTLCounters = [] -Metal_MTLDefines = [] -Metal_MTLDepthStencil = [] -Metal_MTLDevice = [] -Metal_MTLDrawable = [] -Metal_MTLDynamicLibrary = [] -Metal_MTLEvent = [] -Metal_MTLFence = [] -Metal_MTLFunctionConstantValues = [] -Metal_MTLFunctionDescriptor = [] -Metal_MTLFunctionHandle = [] -Metal_MTLFunctionLog = [] -Metal_MTLFunctionStitching = [] -Metal_MTLHeap = [] -Metal_MTLIOCommandBuffer = [] -Metal_MTLIOCommandQueue = [] -Metal_MTLIOCompressor = [] -Metal_MTLIndirectCommandBuffer = [] -Metal_MTLIndirectCommandEncoder = [] -Metal_MTLIntersectionFunctionTable = [] -Metal_MTLLibrary = [] -Metal_MTLLinkedFunctions = [] -Metal_MTLParallelRenderCommandEncoder = [] -Metal_MTLPipeline = [] -Metal_MTLPixelFormat = [] -Metal_MTLRasterizationRate = [] -Metal_MTLRenderCommandEncoder = [] -Metal_MTLRenderPass = [] -Metal_MTLRenderPipeline = [] -Metal_MTLResource = [] -Metal_MTLResourceStateCommandEncoder = [] -Metal_MTLResourceStatePass = [] -Metal_MTLSampler = [] -Metal_MTLStageInputOutputDescriptor = [] -Metal_MTLTexture = [] -Metal_MTLTypes = [] -Metal_MTLVertexDescriptor = [] -Metal_MTLVisibleFunctionTable = [] -Metal_all = [ - "Metal", - "Metal_MTLAccelerationStructure", - "Metal_MTLAccelerationStructureCommandEncoder", - "Metal_MTLAccelerationStructureTypes", - "Metal_MTLArgument", - "Metal_MTLArgumentEncoder", - "Metal_MTLBinaryArchive", - "Metal_MTLBlitCommandEncoder", - "Metal_MTLBlitPass", - "Metal_MTLBuffer", - "Metal_MTLCaptureManager", - "Metal_MTLCaptureScope", - "Metal_MTLCommandBuffer", - "Metal_MTLCommandEncoder", - "Metal_MTLCommandQueue", - "Metal_MTLComputeCommandEncoder", - "Metal_MTLComputePass", - "Metal_MTLComputePipeline", - "Metal_MTLCounters", - "Metal_MTLDefines", - "Metal_MTLDepthStencil", - "Metal_MTLDevice", - "Metal_MTLDrawable", - "Metal_MTLDynamicLibrary", - "Metal_MTLEvent", - "Metal_MTLFence", - "Metal_MTLFunctionConstantValues", - "Metal_MTLFunctionDescriptor", - "Metal_MTLFunctionHandle", - "Metal_MTLFunctionLog", - "Metal_MTLFunctionStitching", - "Metal_MTLHeap", - "Metal_MTLIOCommandBuffer", - "Metal_MTLIOCommandQueue", - "Metal_MTLIOCompressor", - "Metal_MTLIndirectCommandBuffer", - "Metal_MTLIndirectCommandEncoder", - "Metal_MTLIntersectionFunctionTable", - "Metal_MTLLibrary", - "Metal_MTLLinkedFunctions", - "Metal_MTLParallelRenderCommandEncoder", - "Metal_MTLPipeline", - "Metal_MTLPixelFormat", - "Metal_MTLRasterizationRate", - "Metal_MTLRenderCommandEncoder", - "Metal_MTLRenderPass", - "Metal_MTLRenderPipeline", - "Metal_MTLResource", - "Metal_MTLResourceStateCommandEncoder", - "Metal_MTLResourceStatePass", - "Metal_MTLSampler", - "Metal_MTLStageInputOutputDescriptor", - "Metal_MTLTexture", - "Metal_MTLTypes", - "Metal_MTLVertexDescriptor", - "Metal_MTLVisibleFunctionTable", -] -MetricKit = [ - "Foundation", -] -MetricKit_MXAnimationMetric = [] -MetricKit_MXAppExitMetric = [] -MetricKit_MXAppLaunchDiagnostic = [] -MetricKit_MXAppLaunchMetric = [] -MetricKit_MXAppResponsivenessMetric = [] -MetricKit_MXAppRunTimeMetric = [] -MetricKit_MXAverage = [] -MetricKit_MXCPUExceptionDiagnostic = [] -MetricKit_MXCPUMetric = [] -MetricKit_MXCallStackTree = [] -MetricKit_MXCellularConditionMetric = [] -MetricKit_MXCrashDiagnostic = [] -MetricKit_MXCrashDiagnosticObjectiveCExceptionReason = [] -MetricKit_MXDiagnostic = [] -MetricKit_MXDiagnosticPayload = [] -MetricKit_MXDiskIOMetric = [] -MetricKit_MXDiskWriteExceptionDiagnostic = [] -MetricKit_MXDisplayMetric = [] -MetricKit_MXError = [] -MetricKit_MXGPUMetric = [] -MetricKit_MXHangDiagnostic = [] -MetricKit_MXHistogram = [] -MetricKit_MXLocationActivityMetric = [] -MetricKit_MXMemoryMetric = [] -MetricKit_MXMetaData = [] -MetricKit_MXMetric = [] -MetricKit_MXMetricManager = [] -MetricKit_MXMetricPayload = [] -MetricKit_MXNetworkTransferMetric = [] -MetricKit_MXSignpost = [] -MetricKit_MXSignpostMetric = [] -MetricKit_MXSignpostRecord = [] -MetricKit_MXSignpost_Private = [] -MetricKit_MXUnit = [] -MetricKit_all = [ - "MetricKit", - "MetricKit_MXAnimationMetric", - "MetricKit_MXAppExitMetric", - "MetricKit_MXAppLaunchDiagnostic", - "MetricKit_MXAppLaunchMetric", - "MetricKit_MXAppResponsivenessMetric", - "MetricKit_MXAppRunTimeMetric", - "MetricKit_MXAverage", - "MetricKit_MXCPUExceptionDiagnostic", - "MetricKit_MXCPUMetric", - "MetricKit_MXCallStackTree", - "MetricKit_MXCellularConditionMetric", - "MetricKit_MXCrashDiagnostic", - "MetricKit_MXCrashDiagnosticObjectiveCExceptionReason", - "MetricKit_MXDiagnostic", - "MetricKit_MXDiagnosticPayload", - "MetricKit_MXDiskIOMetric", - "MetricKit_MXDiskWriteExceptionDiagnostic", - "MetricKit_MXDisplayMetric", - "MetricKit_MXError", - "MetricKit_MXGPUMetric", - "MetricKit_MXHangDiagnostic", - "MetricKit_MXHistogram", - "MetricKit_MXLocationActivityMetric", - "MetricKit_MXMemoryMetric", - "MetricKit_MXMetaData", - "MetricKit_MXMetric", - "MetricKit_MXMetricManager", - "MetricKit_MXMetricPayload", - "MetricKit_MXNetworkTransferMetric", - "MetricKit_MXSignpost", - "MetricKit_MXSignpostMetric", - "MetricKit_MXSignpostRecord", - "MetricKit_MXSignpost_Private", - "MetricKit_MXUnit", -] -OSAKit = [ - "AppKit", - "Foundation", -] -OSAKit_OSALanguage = [] -OSAKit_OSALanguageInstance = [] -OSAKit_OSAScript = [] -OSAKit_OSAScriptController = [] -OSAKit_OSAScriptView = [] -OSAKit_all = [ - "OSAKit", - "OSAKit_OSALanguage", - "OSAKit_OSALanguageInstance", - "OSAKit_OSAScript", - "OSAKit_OSAScriptController", - "OSAKit_OSAScriptView", -] -Photos = [ - "AppKit", - "CoreLocation", - "Foundation", - "UniformTypeIdentifiers", -] -Photos_PHAdjustmentData = [] -Photos_PHAsset = [] -Photos_PHAssetChangeRequest = [] -Photos_PHAssetCollectionChangeRequest = [] -Photos_PHAssetCreationRequest = [] -Photos_PHAssetResource = [] -Photos_PHAssetResourceManager = [] -Photos_PHChange = [] -Photos_PHChangeRequest = [] -Photos_PHCloudIdentifier = [] -Photos_PHCollection = [] -Photos_PHCollectionListChangeRequest = [] -Photos_PHContentEditingInput = [] -Photos_PHContentEditingOutput = [] -Photos_PHError = [] -Photos_PHFetchOptions = [] -Photos_PHFetchResult = [] -Photos_PHImageManager = [] -Photos_PHLivePhoto = [] -Photos_PHLivePhotoEditingContext = [] -Photos_PHObject = [] -Photos_PHPersistentChange = [] -Photos_PHPersistentChangeFetchResult = [] -Photos_PHPersistentChangeToken = [] -Photos_PHPersistentObjectChangeDetails = [] -Photos_PHPhotoLibrary = [] -Photos_PHProject = [] -Photos_PHProjectChangeRequest = [] -Photos_PhotosTypes = [] -Photos_all = [ - "Photos", - "Photos_PHAdjustmentData", - "Photos_PHAsset", - "Photos_PHAssetChangeRequest", - "Photos_PHAssetCollectionChangeRequest", - "Photos_PHAssetCreationRequest", - "Photos_PHAssetResource", - "Photos_PHAssetResourceManager", - "Photos_PHChange", - "Photos_PHChangeRequest", - "Photos_PHCloudIdentifier", - "Photos_PHCollection", - "Photos_PHCollectionListChangeRequest", - "Photos_PHContentEditingInput", - "Photos_PHContentEditingOutput", - "Photos_PHError", - "Photos_PHFetchOptions", - "Photos_PHFetchResult", - "Photos_PHImageManager", - "Photos_PHLivePhoto", - "Photos_PHLivePhotoEditingContext", - "Photos_PHObject", - "Photos_PHPersistentChange", - "Photos_PHPersistentChangeFetchResult", - "Photos_PHPersistentChangeToken", - "Photos_PHPersistentObjectChangeDetails", - "Photos_PHPhotoLibrary", - "Photos_PHProject", - "Photos_PHProjectChangeRequest", - "Photos_PhotosTypes", -] -QuartzCore = [ - "Foundation", -] -QuartzCore_CAAnimation = [] -QuartzCore_CABase = [] -QuartzCore_CAConstraintLayoutManager = [] -QuartzCore_CADisplayLink = [] -QuartzCore_CAEDRMetadata = [] -QuartzCore_CAEmitterCell = [] -QuartzCore_CAEmitterLayer = [] -QuartzCore_CAFrameRateRange = [] -QuartzCore_CAGradientLayer = [] -QuartzCore_CALayer = [] -QuartzCore_CAMediaTiming = [] -QuartzCore_CAMediaTimingFunction = [] -QuartzCore_CAMetalDisplayLink = [] -QuartzCore_CAMetalLayer = [] -QuartzCore_CAOpenGLLayer = [] -QuartzCore_CARemoteLayerClient = [] -QuartzCore_CARemoteLayerServer = [] -QuartzCore_CARenderer = [] -QuartzCore_CAReplicatorLayer = [] -QuartzCore_CAScrollLayer = [] -QuartzCore_CAShapeLayer = [] -QuartzCore_CATextLayer = [] -QuartzCore_CATiledLayer = [] -QuartzCore_CATransaction = [] -QuartzCore_CATransform3D = [] -QuartzCore_CATransformLayer = [] -QuartzCore_CAValueFunction = [] -QuartzCore_CoreAnimation = [] -QuartzCore_CoreImage = [] -QuartzCore_CoreVideo = [] -QuartzCore_all = [ - "QuartzCore", - "QuartzCore_CAAnimation", - "QuartzCore_CABase", - "QuartzCore_CAConstraintLayoutManager", - "QuartzCore_CADisplayLink", - "QuartzCore_CAEDRMetadata", - "QuartzCore_CAEmitterCell", - "QuartzCore_CAEmitterLayer", - "QuartzCore_CAFrameRateRange", - "QuartzCore_CAGradientLayer", - "QuartzCore_CALayer", - "QuartzCore_CAMediaTiming", - "QuartzCore_CAMediaTimingFunction", - "QuartzCore_CAMetalDisplayLink", - "QuartzCore_CAMetalLayer", - "QuartzCore_CAOpenGLLayer", - "QuartzCore_CARemoteLayerClient", - "QuartzCore_CARemoteLayerServer", - "QuartzCore_CARenderer", - "QuartzCore_CAReplicatorLayer", - "QuartzCore_CAScrollLayer", - "QuartzCore_CAShapeLayer", - "QuartzCore_CATextLayer", - "QuartzCore_CATiledLayer", - "QuartzCore_CATransaction", - "QuartzCore_CATransform3D", - "QuartzCore_CATransformLayer", - "QuartzCore_CAValueFunction", - "QuartzCore_CoreAnimation", - "QuartzCore_CoreImage", - "QuartzCore_CoreVideo", -] -ServiceManagement = [ - "Foundation", -] -ServiceManagement_SMAppService = [] -ServiceManagement_SMErrors = [] -ServiceManagement_SMLoginItem = [] -ServiceManagement_all = [ - "ServiceManagement", - "ServiceManagement_SMAppService", - "ServiceManagement_SMErrors", - "ServiceManagement_SMLoginItem", -] -SoundAnalysis = [ - "Foundation", -] -SoundAnalysis_SNAnalyzer = [] -SoundAnalysis_SNClassificationResult = [] -SoundAnalysis_SNClassifySoundRequest = [] -SoundAnalysis_SNDefines = [] -SoundAnalysis_SNError = [] -SoundAnalysis_SNRequest = [] -SoundAnalysis_SNResult = [] -SoundAnalysis_SNTimeDurationConstraint = [] -SoundAnalysis_SNTypes = [] -SoundAnalysis_all = [ - "SoundAnalysis", - "SoundAnalysis_SNAnalyzer", - "SoundAnalysis_SNClassificationResult", - "SoundAnalysis_SNClassifySoundRequest", - "SoundAnalysis_SNDefines", - "SoundAnalysis_SNError", - "SoundAnalysis_SNRequest", - "SoundAnalysis_SNResult", - "SoundAnalysis_SNTimeDurationConstraint", - "SoundAnalysis_SNTypes", -] -Speech = [ - "Foundation", -] -Speech_SFErrors = [] -Speech_SFSpeechLanguageModel = [] -Speech_SFSpeechRecognitionMetadata = [] -Speech_SFSpeechRecognitionRequest = [] -Speech_SFSpeechRecognitionResult = [] -Speech_SFSpeechRecognitionTask = [] -Speech_SFSpeechRecognitionTaskHint = [] -Speech_SFSpeechRecognizer = [] -Speech_SFTranscription = [] -Speech_SFTranscriptionSegment = [] -Speech_SFVoiceAnalytics = [] -Speech_all = [ - "Speech", - "Speech_SFErrors", - "Speech_SFSpeechLanguageModel", - "Speech_SFSpeechRecognitionMetadata", - "Speech_SFSpeechRecognitionRequest", - "Speech_SFSpeechRecognitionResult", - "Speech_SFSpeechRecognitionTask", - "Speech_SFSpeechRecognitionTaskHint", - "Speech_SFSpeechRecognizer", - "Speech_SFTranscription", - "Speech_SFTranscriptionSegment", - "Speech_SFVoiceAnalytics", -] -StoreKit = [ - "AppKit", - "Foundation", -] -StoreKit_SKANError = [] -StoreKit_SKAdImpression = [] -StoreKit_SKAdNetwork = [] -StoreKit_SKArcadeService = [] -StoreKit_SKCloudServiceController = [] -StoreKit_SKCloudServiceSetupViewController = [] -StoreKit_SKDownload = [] -StoreKit_SKError = [] -StoreKit_SKOverlay = [] -StoreKit_SKOverlayConfiguration = [] -StoreKit_SKOverlayTransitionContext = [] -StoreKit_SKPayment = [] -StoreKit_SKPaymentDiscount = [] -StoreKit_SKPaymentQueue = [] -StoreKit_SKPaymentTransaction = [] -StoreKit_SKProduct = [] -StoreKit_SKProductDiscount = [] -StoreKit_SKProductStorePromotionController = [] -StoreKit_SKProductsRequest = [] -StoreKit_SKReceiptRefreshRequest = [] -StoreKit_SKRequest = [] -StoreKit_SKStoreProductViewController = [] -StoreKit_SKStoreReviewController = [] -StoreKit_SKStorefront = [] -StoreKit_StoreKitDefines = [] -StoreKit_all = [ - "StoreKit", - "StoreKit_SKANError", - "StoreKit_SKAdImpression", - "StoreKit_SKAdNetwork", - "StoreKit_SKArcadeService", - "StoreKit_SKCloudServiceController", - "StoreKit_SKCloudServiceSetupViewController", - "StoreKit_SKDownload", - "StoreKit_SKError", - "StoreKit_SKOverlay", - "StoreKit_SKOverlayConfiguration", - "StoreKit_SKOverlayTransitionContext", - "StoreKit_SKPayment", - "StoreKit_SKPaymentDiscount", - "StoreKit_SKPaymentQueue", - "StoreKit_SKPaymentTransaction", - "StoreKit_SKProduct", - "StoreKit_SKProductDiscount", - "StoreKit_SKProductStorePromotionController", - "StoreKit_SKProductsRequest", - "StoreKit_SKReceiptRefreshRequest", - "StoreKit_SKRequest", - "StoreKit_SKStoreProductViewController", - "StoreKit_SKStoreReviewController", - "StoreKit_SKStorefront", - "StoreKit_StoreKitDefines", -] -UniformTypeIdentifiers = [ - "Foundation", -] -UniformTypeIdentifiers_NSItemProvider_UTType = [] -UniformTypeIdentifiers_UTAdditions = [] -UniformTypeIdentifiers_UTCoreTypes = [] -UniformTypeIdentifiers_UTDefines = [] -UniformTypeIdentifiers_UTTagClass = [] -UniformTypeIdentifiers_UTType = [] -UniformTypeIdentifiers_all = [ - "UniformTypeIdentifiers", - "UniformTypeIdentifiers_NSItemProvider_UTType", - "UniformTypeIdentifiers_UTAdditions", - "UniformTypeIdentifiers_UTCoreTypes", - "UniformTypeIdentifiers_UTDefines", - "UniformTypeIdentifiers_UTTagClass", - "UniformTypeIdentifiers_UTType", -] -UserNotifications = [ - "CoreLocation", - "Foundation", -] -UserNotifications_NSString_UserNotifications = [] -UserNotifications_UNError = [] -UserNotifications_UNNotification = [] -UserNotifications_UNNotificationAction = [] -UserNotifications_UNNotificationActionIcon = [] -UserNotifications_UNNotificationAttachment = [] -UserNotifications_UNNotificationCategory = [] -UserNotifications_UNNotificationContent = [] -UserNotifications_UNNotificationRequest = [] -UserNotifications_UNNotificationResponse = [] -UserNotifications_UNNotificationServiceExtension = [] -UserNotifications_UNNotificationSettings = [] -UserNotifications_UNNotificationSound = [] -UserNotifications_UNNotificationTrigger = [] -UserNotifications_UNUserNotificationCenter = [] -UserNotifications_all = [ - "UserNotifications", - "UserNotifications_NSString_UserNotifications", - "UserNotifications_UNError", - "UserNotifications_UNNotification", - "UserNotifications_UNNotificationAction", - "UserNotifications_UNNotificationActionIcon", - "UserNotifications_UNNotificationAttachment", - "UserNotifications_UNNotificationCategory", - "UserNotifications_UNNotificationContent", - "UserNotifications_UNNotificationRequest", - "UserNotifications_UNNotificationResponse", - "UserNotifications_UNNotificationServiceExtension", - "UserNotifications_UNNotificationSettings", - "UserNotifications_UNNotificationSound", - "UserNotifications_UNNotificationTrigger", - "UserNotifications_UNUserNotificationCenter", -] -WebKit = [ - "AppKit", - "Foundation", -] -WebKit_DOM = [] -WebKit_DOMAbstractView = [] -WebKit_DOMAttr = [] -WebKit_DOMBlob = [] -WebKit_DOMCDATASection = [] -WebKit_DOMCSS = [] -WebKit_DOMCSSCharsetRule = [] -WebKit_DOMCSSFontFaceRule = [] -WebKit_DOMCSSImportRule = [] -WebKit_DOMCSSMediaRule = [] -WebKit_DOMCSSPageRule = [] -WebKit_DOMCSSPrimitiveValue = [] -WebKit_DOMCSSRule = [] -WebKit_DOMCSSRuleList = [] -WebKit_DOMCSSStyleDeclaration = [] -WebKit_DOMCSSStyleRule = [] -WebKit_DOMCSSStyleSheet = [] -WebKit_DOMCSSUnknownRule = [] -WebKit_DOMCSSValue = [] -WebKit_DOMCSSValueList = [] -WebKit_DOMCharacterData = [] -WebKit_DOMComment = [] -WebKit_DOMCore = [] -WebKit_DOMCounter = [] -WebKit_DOMDocument = [] -WebKit_DOMDocumentFragment = [] -WebKit_DOMDocumentType = [] -WebKit_DOMElement = [] -WebKit_DOMEntity = [] -WebKit_DOMEntityReference = [] -WebKit_DOMEvent = [] -WebKit_DOMEventException = [] -WebKit_DOMEventListener = [] -WebKit_DOMEventTarget = [] -WebKit_DOMEvents = [] -WebKit_DOMException = [] -WebKit_DOMExtensions = [] -WebKit_DOMFile = [] -WebKit_DOMFileList = [] -WebKit_DOMHTML = [] -WebKit_DOMHTMLAnchorElement = [] -WebKit_DOMHTMLAppletElement = [] -WebKit_DOMHTMLAreaElement = [] -WebKit_DOMHTMLBRElement = [] -WebKit_DOMHTMLBaseElement = [] -WebKit_DOMHTMLBaseFontElement = [] -WebKit_DOMHTMLBodyElement = [] -WebKit_DOMHTMLButtonElement = [] -WebKit_DOMHTMLCollection = [] -WebKit_DOMHTMLDListElement = [] -WebKit_DOMHTMLDirectoryElement = [] -WebKit_DOMHTMLDivElement = [] -WebKit_DOMHTMLDocument = [] -WebKit_DOMHTMLElement = [] -WebKit_DOMHTMLEmbedElement = [] -WebKit_DOMHTMLFieldSetElement = [] -WebKit_DOMHTMLFontElement = [] -WebKit_DOMHTMLFormElement = [] -WebKit_DOMHTMLFrameElement = [] -WebKit_DOMHTMLFrameSetElement = [] -WebKit_DOMHTMLHRElement = [] -WebKit_DOMHTMLHeadElement = [] -WebKit_DOMHTMLHeadingElement = [] -WebKit_DOMHTMLHtmlElement = [] -WebKit_DOMHTMLIFrameElement = [] -WebKit_DOMHTMLImageElement = [] -WebKit_DOMHTMLInputElement = [] -WebKit_DOMHTMLLIElement = [] -WebKit_DOMHTMLLabelElement = [] -WebKit_DOMHTMLLegendElement = [] -WebKit_DOMHTMLLinkElement = [] -WebKit_DOMHTMLMapElement = [] -WebKit_DOMHTMLMarqueeElement = [] -WebKit_DOMHTMLMenuElement = [] -WebKit_DOMHTMLMetaElement = [] -WebKit_DOMHTMLModElement = [] -WebKit_DOMHTMLOListElement = [] -WebKit_DOMHTMLObjectElement = [] -WebKit_DOMHTMLOptGroupElement = [] -WebKit_DOMHTMLOptionElement = [] -WebKit_DOMHTMLOptionsCollection = [] -WebKit_DOMHTMLParagraphElement = [] -WebKit_DOMHTMLParamElement = [] -WebKit_DOMHTMLPreElement = [] -WebKit_DOMHTMLQuoteElement = [] -WebKit_DOMHTMLScriptElement = [] -WebKit_DOMHTMLSelectElement = [] -WebKit_DOMHTMLStyleElement = [] -WebKit_DOMHTMLTableCaptionElement = [] -WebKit_DOMHTMLTableCellElement = [] -WebKit_DOMHTMLTableColElement = [] -WebKit_DOMHTMLTableElement = [] -WebKit_DOMHTMLTableRowElement = [] -WebKit_DOMHTMLTableSectionElement = [] -WebKit_DOMHTMLTextAreaElement = [] -WebKit_DOMHTMLTitleElement = [] -WebKit_DOMHTMLUListElement = [] -WebKit_DOMImplementation = [] -WebKit_DOMKeyboardEvent = [] -WebKit_DOMMediaList = [] -WebKit_DOMMouseEvent = [] -WebKit_DOMMutationEvent = [] -WebKit_DOMNamedNodeMap = [] -WebKit_DOMNode = [] -WebKit_DOMNodeFilter = [] -WebKit_DOMNodeIterator = [] -WebKit_DOMNodeList = [] -WebKit_DOMObject = [] -WebKit_DOMOverflowEvent = [] -WebKit_DOMProcessingInstruction = [] -WebKit_DOMProgressEvent = [] -WebKit_DOMRGBColor = [] -WebKit_DOMRange = [] -WebKit_DOMRangeException = [] -WebKit_DOMRanges = [] -WebKit_DOMRect = [] -WebKit_DOMStyleSheet = [] -WebKit_DOMStyleSheetList = [] -WebKit_DOMStylesheets = [] -WebKit_DOMText = [] -WebKit_DOMTraversal = [] -WebKit_DOMTreeWalker = [] -WebKit_DOMUIEvent = [] -WebKit_DOMViews = [] -WebKit_DOMWheelEvent = [] -WebKit_DOMXPath = [] -WebKit_DOMXPathException = [] -WebKit_DOMXPathExpression = [] -WebKit_DOMXPathNSResolver = [] -WebKit_DOMXPathResult = [] -WebKit_NSAttributedString = [] -WebKit_WKBackForwardList = [] -WebKit_WKBackForwardListItem = [] -WebKit_WKContentRuleList = [] -WebKit_WKContentRuleListStore = [] -WebKit_WKContentWorld = [] -WebKit_WKContextMenuElementInfo = [] -WebKit_WKDataDetectorTypes = [] -WebKit_WKDownload = [] -WebKit_WKDownloadDelegate = [] -WebKit_WKError = [] -WebKit_WKFindConfiguration = [] -WebKit_WKFindResult = [] -WebKit_WKFoundation = [] -WebKit_WKFrameInfo = [] -WebKit_WKHTTPCookieStore = [] -WebKit_WKNavigation = [] -WebKit_WKNavigationAction = [] -WebKit_WKNavigationDelegate = [] -WebKit_WKNavigationResponse = [] -WebKit_WKOpenPanelParameters = [] -WebKit_WKPDFConfiguration = [] -WebKit_WKPreferences = [] -WebKit_WKPreviewActionItem = [] -WebKit_WKPreviewActionItemIdentifiers = [] -WebKit_WKPreviewElementInfo = [] -WebKit_WKProcessPool = [] -WebKit_WKScriptMessage = [] -WebKit_WKScriptMessageHandler = [] -WebKit_WKScriptMessageHandlerWithReply = [] -WebKit_WKSecurityOrigin = [] -WebKit_WKSnapshotConfiguration = [] -WebKit_WKUIDelegate = [] -WebKit_WKURLSchemeHandler = [] -WebKit_WKURLSchemeTask = [] -WebKit_WKUserContentController = [] -WebKit_WKUserScript = [] -WebKit_WKWebView = [] -WebKit_WKWebViewConfiguration = [] -WebKit_WKWebpagePreferences = [] -WebKit_WKWebsiteDataRecord = [] -WebKit_WKWebsiteDataStore = [] -WebKit_WKWindowFeatures = [] -WebKit_WebArchive = [] -WebKit_WebBackForwardList = [] -WebKit_WebDOMOperations = [] -WebKit_WebDataSource = [] -WebKit_WebDocument = [] -WebKit_WebDownload = [] -WebKit_WebEditingDelegate = [] -WebKit_WebFrame = [] -WebKit_WebFrameLoadDelegate = [] -WebKit_WebFrameView = [] -WebKit_WebHistory = [] -WebKit_WebHistoryItem = [] -WebKit_WebKitAvailability = [] -WebKit_WebKitErrors = [] -WebKit_WebKitLegacy = [] -WebKit_WebPlugin = [] -WebKit_WebPluginContainer = [] -WebKit_WebPluginViewFactory = [] -WebKit_WebPolicyDelegate = [] -WebKit_WebPreferences = [] -WebKit_WebResource = [] -WebKit_WebResourceLoadDelegate = [] -WebKit_WebScriptObject = [] -WebKit_WebUIDelegate = [] -WebKit_WebView = [] -WebKit_all = [ - "WebKit", - "WebKit_DOM", - "WebKit_DOMAbstractView", - "WebKit_DOMAttr", - "WebKit_DOMBlob", - "WebKit_DOMCDATASection", - "WebKit_DOMCSS", - "WebKit_DOMCSSCharsetRule", - "WebKit_DOMCSSFontFaceRule", - "WebKit_DOMCSSImportRule", - "WebKit_DOMCSSMediaRule", - "WebKit_DOMCSSPageRule", - "WebKit_DOMCSSPrimitiveValue", - "WebKit_DOMCSSRule", - "WebKit_DOMCSSRuleList", - "WebKit_DOMCSSStyleDeclaration", - "WebKit_DOMCSSStyleRule", - "WebKit_DOMCSSStyleSheet", - "WebKit_DOMCSSUnknownRule", - "WebKit_DOMCSSValue", - "WebKit_DOMCSSValueList", - "WebKit_DOMCharacterData", - "WebKit_DOMComment", - "WebKit_DOMCore", - "WebKit_DOMCounter", - "WebKit_DOMDocument", - "WebKit_DOMDocumentFragment", - "WebKit_DOMDocumentType", - "WebKit_DOMElement", - "WebKit_DOMEntity", - "WebKit_DOMEntityReference", - "WebKit_DOMEvent", - "WebKit_DOMEventException", - "WebKit_DOMEventListener", - "WebKit_DOMEventTarget", - "WebKit_DOMEvents", - "WebKit_DOMException", - "WebKit_DOMExtensions", - "WebKit_DOMFile", - "WebKit_DOMFileList", - "WebKit_DOMHTML", - "WebKit_DOMHTMLAnchorElement", - "WebKit_DOMHTMLAppletElement", - "WebKit_DOMHTMLAreaElement", - "WebKit_DOMHTMLBRElement", - "WebKit_DOMHTMLBaseElement", - "WebKit_DOMHTMLBaseFontElement", - "WebKit_DOMHTMLBodyElement", - "WebKit_DOMHTMLButtonElement", - "WebKit_DOMHTMLCollection", - "WebKit_DOMHTMLDListElement", - "WebKit_DOMHTMLDirectoryElement", - "WebKit_DOMHTMLDivElement", - "WebKit_DOMHTMLDocument", - "WebKit_DOMHTMLElement", - "WebKit_DOMHTMLEmbedElement", - "WebKit_DOMHTMLFieldSetElement", - "WebKit_DOMHTMLFontElement", - "WebKit_DOMHTMLFormElement", - "WebKit_DOMHTMLFrameElement", - "WebKit_DOMHTMLFrameSetElement", - "WebKit_DOMHTMLHRElement", - "WebKit_DOMHTMLHeadElement", - "WebKit_DOMHTMLHeadingElement", - "WebKit_DOMHTMLHtmlElement", - "WebKit_DOMHTMLIFrameElement", - "WebKit_DOMHTMLImageElement", - "WebKit_DOMHTMLInputElement", - "WebKit_DOMHTMLLIElement", - "WebKit_DOMHTMLLabelElement", - "WebKit_DOMHTMLLegendElement", - "WebKit_DOMHTMLLinkElement", - "WebKit_DOMHTMLMapElement", - "WebKit_DOMHTMLMarqueeElement", - "WebKit_DOMHTMLMenuElement", - "WebKit_DOMHTMLMetaElement", - "WebKit_DOMHTMLModElement", - "WebKit_DOMHTMLOListElement", - "WebKit_DOMHTMLObjectElement", - "WebKit_DOMHTMLOptGroupElement", - "WebKit_DOMHTMLOptionElement", - "WebKit_DOMHTMLOptionsCollection", - "WebKit_DOMHTMLParagraphElement", - "WebKit_DOMHTMLParamElement", - "WebKit_DOMHTMLPreElement", - "WebKit_DOMHTMLQuoteElement", - "WebKit_DOMHTMLScriptElement", - "WebKit_DOMHTMLSelectElement", - "WebKit_DOMHTMLStyleElement", - "WebKit_DOMHTMLTableCaptionElement", - "WebKit_DOMHTMLTableCellElement", - "WebKit_DOMHTMLTableColElement", - "WebKit_DOMHTMLTableElement", - "WebKit_DOMHTMLTableRowElement", - "WebKit_DOMHTMLTableSectionElement", - "WebKit_DOMHTMLTextAreaElement", - "WebKit_DOMHTMLTitleElement", - "WebKit_DOMHTMLUListElement", - "WebKit_DOMImplementation", - "WebKit_DOMKeyboardEvent", - "WebKit_DOMMediaList", - "WebKit_DOMMouseEvent", - "WebKit_DOMMutationEvent", - "WebKit_DOMNamedNodeMap", - "WebKit_DOMNode", - "WebKit_DOMNodeFilter", - "WebKit_DOMNodeIterator", - "WebKit_DOMNodeList", - "WebKit_DOMObject", - "WebKit_DOMOverflowEvent", - "WebKit_DOMProcessingInstruction", - "WebKit_DOMProgressEvent", - "WebKit_DOMRGBColor", - "WebKit_DOMRange", - "WebKit_DOMRangeException", - "WebKit_DOMRanges", - "WebKit_DOMRect", - "WebKit_DOMStyleSheet", - "WebKit_DOMStyleSheetList", - "WebKit_DOMStylesheets", - "WebKit_DOMText", - "WebKit_DOMTraversal", - "WebKit_DOMTreeWalker", - "WebKit_DOMUIEvent", - "WebKit_DOMViews", - "WebKit_DOMWheelEvent", - "WebKit_DOMXPath", - "WebKit_DOMXPathException", - "WebKit_DOMXPathExpression", - "WebKit_DOMXPathNSResolver", - "WebKit_DOMXPathResult", - "WebKit_NSAttributedString", - "WebKit_WKBackForwardList", - "WebKit_WKBackForwardListItem", - "WebKit_WKContentRuleList", - "WebKit_WKContentRuleListStore", - "WebKit_WKContentWorld", - "WebKit_WKContextMenuElementInfo", - "WebKit_WKDataDetectorTypes", - "WebKit_WKDownload", - "WebKit_WKDownloadDelegate", - "WebKit_WKError", - "WebKit_WKFindConfiguration", - "WebKit_WKFindResult", - "WebKit_WKFoundation", - "WebKit_WKFrameInfo", - "WebKit_WKHTTPCookieStore", - "WebKit_WKNavigation", - "WebKit_WKNavigationAction", - "WebKit_WKNavigationDelegate", - "WebKit_WKNavigationResponse", - "WebKit_WKOpenPanelParameters", - "WebKit_WKPDFConfiguration", - "WebKit_WKPreferences", - "WebKit_WKPreviewActionItem", - "WebKit_WKPreviewActionItemIdentifiers", - "WebKit_WKPreviewElementInfo", - "WebKit_WKProcessPool", - "WebKit_WKScriptMessage", - "WebKit_WKScriptMessageHandler", - "WebKit_WKScriptMessageHandlerWithReply", - "WebKit_WKSecurityOrigin", - "WebKit_WKSnapshotConfiguration", - "WebKit_WKUIDelegate", - "WebKit_WKURLSchemeHandler", - "WebKit_WKURLSchemeTask", - "WebKit_WKUserContentController", - "WebKit_WKUserScript", - "WebKit_WKWebView", - "WebKit_WKWebViewConfiguration", - "WebKit_WKWebpagePreferences", - "WebKit_WKWebsiteDataRecord", - "WebKit_WKWebsiteDataStore", - "WebKit_WKWindowFeatures", - "WebKit_WebArchive", - "WebKit_WebBackForwardList", - "WebKit_WebDOMOperations", - "WebKit_WebDataSource", - "WebKit_WebDocument", - "WebKit_WebDownload", - "WebKit_WebEditingDelegate", - "WebKit_WebFrame", - "WebKit_WebFrameLoadDelegate", - "WebKit_WebFrameView", - "WebKit_WebHistory", - "WebKit_WebHistoryItem", - "WebKit_WebKitAvailability", - "WebKit_WebKitErrors", - "WebKit_WebKitLegacy", - "WebKit_WebPlugin", - "WebKit_WebPluginContainer", - "WebKit_WebPluginViewFactory", - "WebKit_WebPolicyDelegate", - "WebKit_WebPreferences", - "WebKit_WebResource", - "WebKit_WebResourceLoadDelegate", - "WebKit_WebScriptObject", - "WebKit_WebUIDelegate", - "WebKit_WebView", -] -unstable-frameworks-macos-10-12 = [ - "AppKit_all", - "Automator_all", - "CloudKit_all", - "Contacts_all", - "CoreData_all", - "CoreLocation_all", - "CoreWLAN_all", - "EventKit_all", - "ExceptionHandling_all", - "Foundation_all", - "GameController_all", - "GameKit_all", - "InputMethodKit_all", - "LocalAuthentication_all", - "MapKit_all", - "MediaPlayer_all", - "MetalKit_all", - "Metal_all", - "OSAKit_all", - "Photos_all", - "QuartzCore_all", - "ServiceManagement_all", - "StoreKit_all", - "WebKit_all", - "unstable-example-basic_usage", -] -unstable-frameworks-macos-10-13 = [ - "ExternalAccessory_all", - "unstable-example-delegate", - "unstable-example-metal", - "unstable-example-nspasteboard", - "unstable-example-speech_synthesis", - "unstable-frameworks-macos-10-12", -] -unstable-frameworks-macos-11 = [ - "Accessibility_all", - "AdSupport_all", - "AuthenticationServices_all", - "AutomaticAssessmentConfiguration_all", - "BusinessChat_all", - "ClassKit_all", - "DeviceCheck_all", - "FileProviderUI_all", - "FileProvider_all", - "IdentityLookup_all", - "LinkPresentation_all", - "SoundAnalysis_all", - "Speech_all", - "UniformTypeIdentifiers_all", - "UserNotifications_all", - "unstable-frameworks-macos-10-13", -] -unstable-frameworks-macos-12 = [ - "AdServices_all", - "DataDetection_all", - "LocalAuthenticationEmbeddedUI_all", - "MailKit_all", - "MetricKit_all", - "unstable-frameworks-macos-11", -] -unstable-frameworks-macos-13 = [ - "BackgroundAssets_all", - "CallKit_all", - "ExtensionKit_all", - "HealthKit_all", - "MetalFX_all", - "unstable-example-browser", - "unstable-frameworks-macos-12", -] -unstable-frameworks-macos-14 = [ - "unstable-frameworks-macos-13", -] diff --git a/crates/icrate/README.md b/crates/icrate/README.md deleted file mode 100644 index ccd9e17a8..000000000 --- a/crates/icrate/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# `icrate` - -[![Latest version](https://badgen.net/crates/v/icrate)](https://crates.io/crates/icrate) -[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) -[![Documentation](https://docs.rs/icrate/badge.svg)](https://docs.rs/icrate/) -[![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 frameworks. - -This README is kept intentionally small in an effort to consolidate the -documentation, see [the Rust docs](https://docs.rs/icrate/) for more details. - -This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2), -see that for related crates. diff --git a/crates/icrate/examples/README.md b/crates/icrate/examples/README.md deleted file mode 100644 index 6489b867a..000000000 --- a/crates/icrate/examples/README.md +++ /dev/null @@ -1,8 +0,0 @@ -#### Running the examples - -The examples can be run as follows: - -```sh -cargo run --package=icrate --example=basic_usage --features=unstable-example-basic_usage -cargo run --package=icrate --example=delegate --features=unstable-example-delegate -``` diff --git a/crates/icrate/src/additions/AppKit/application.rs b/crates/icrate/src/additions/AppKit/application.rs deleted file mode 100644 index 69890a911..000000000 --- a/crates/icrate/src/additions/AppKit/application.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[cfg(feature = "AppKit_NSResponder")] -pub fn NSApp( - mtm: crate::Foundation::MainThreadMarker, -) -> objc2::rc::Id { - // TODO: Use the `NSApp` static - crate::AppKit::NSApplication::sharedApplication(mtm) -} diff --git a/crates/icrate/src/additions/AuthenticationServices/mod.rs b/crates/icrate/src/additions/AuthenticationServices/mod.rs deleted file mode 100644 index 709b6eb7e..000000000 --- a/crates/icrate/src/additions/AuthenticationServices/mod.rs +++ /dev/null @@ -1,81 +0,0 @@ -//! # Bindings to the `AuthenticationServices` framework -pub use crate::generated::AuthenticationServices::*; - -use objc2::runtime::NSObject; -use objc2::{extern_class, mutability, ClassType}; - -// TODO: UIViewController on iOS, NSViewController on macOS -#[cfg(all(feature = "AppKit_NSResponder", feature = "AppKit_NSViewController"))] -pub type ASViewController = NSObject; -// TODO: UIWindow on iOS, NSWindow on macOS -#[cfg(all(feature = "AppKit_NSResponder", feature = "AppKit_NSWindow"))] -pub type ASPresentationAnchor = NSObject; -// TODO: UIImage on iOS, NSImage on macOS -#[cfg(feature = "AppKit_NSImage")] -pub type ASImage = NSObject; - -// TODO: UIControl on iOS, NSControl on macOS -#[cfg(feature = "AuthenticationServices_ASAuthorizationAppleIDButton")] -type ASControl = NSObject; - -extern_class!( - #[derive(Debug, PartialEq, Eq, Hash)] - #[cfg(all( - feature = "AuthenticationServices_ASCredentialProviderViewController", - feature = "AppKit_NSResponder", - feature = "AppKit_NSViewController" - ))] - pub struct ASCredentialProviderViewController; - - #[cfg(all( - feature = "AuthenticationServices_ASCredentialProviderViewController", - feature = "AppKit_NSResponder", - feature = "AppKit_NSViewController" - ))] - unsafe impl ClassType for ASCredentialProviderViewController { - type Super = ASViewController; - type Mutability = mutability::MainThreadOnly; - } -); - -extern_class!( - #[derive(Debug, PartialEq, Eq, Hash)] - #[cfg(all( - feature = "AuthenticationServices_ASAccountAuthenticationModificationViewController", - feature = "AppKit_NSResponder", - feature = "AppKit_NSViewController" - ))] - pub struct ASAccountAuthenticationModificationViewController; - - #[cfg(all( - feature = "AuthenticationServices_ASAccountAuthenticationModificationViewController", - feature = "AppKit_NSResponder", - feature = "AppKit_NSViewController" - ))] - unsafe impl ClassType for ASAccountAuthenticationModificationViewController { - type Super = ASViewController; - type Mutability = mutability::MainThreadOnly; - } -); - -extern_class!( - #[derive(Debug, PartialEq, Eq, Hash)] - #[cfg(all( - feature = "AuthenticationServices_ASAuthorizationAppleIDButton", - feature = "AppKit_NSControl", - feature = "AppKit_NSResponder", - feature = "AppKit_NSView" - ))] - pub struct ASAuthorizationAppleIDButton; - - #[cfg(all( - feature = "AuthenticationServices_ASAuthorizationAppleIDButton", - feature = "AppKit_NSControl", - feature = "AppKit_NSResponder", - feature = "AppKit_NSView" - ))] - unsafe impl ClassType for ASAuthorizationAppleIDButton { - type Super = ASControl; - type Mutability = mutability::MainThreadOnly; - } -); diff --git a/crates/icrate/src/additions/CallKit/mod.rs b/crates/icrate/src/additions/CallKit/mod.rs deleted file mode 100644 index 2703c03a4..000000000 --- a/crates/icrate/src/additions/CallKit/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -//! # Bindings to the `CallKit` framework -pub use crate::generated::CallKit::*; - -pub(crate) const INT64_MAX: i64 = i64::MAX; diff --git a/crates/icrate/src/additions/GameController/mod.rs b/crates/icrate/src/additions/GameController/mod.rs deleted file mode 100644 index 2100e06c3..000000000 --- a/crates/icrate/src/additions/GameController/mod.rs +++ /dev/null @@ -1,26 +0,0 @@ -//! # Bindings to the `GameController` framework -#![allow(non_upper_case_globals)] -#![allow(non_snake_case)] -pub use crate::generated::GameController::*; - -#[cfg(feature = "GameController_GCExtendedGamepadSnapshot")] -mod extended_gamepad_snapshot; -#[cfg(all( - feature = "GameController_GCInputNames", - feature = "Foundation_NSString" -))] -mod input_names; - -#[cfg(feature = "GameController_GCExtendedGamepadSnapshot")] -#[allow(deprecated)] -pub use self::extended_gamepad_snapshot::GCExtendedGamepadSnapshotData; -#[cfg(all( - feature = "GameController_GCInputNames", - feature = "Foundation_NSString" -))] -pub use self::input_names::*; - -// TODO: GCKeyCode = CFIndex -// NOTE: CFIndex is c_long_long on __LLP64__ / Windows 64-bit (doesn't matter for us) -#[cfg(feature = "GameController_GCKeyCodes")] -pub type GCKeyCode = std::os::raw::c_long; diff --git a/crates/icrate/src/additions/MapKit/mod.rs b/crates/icrate/src/additions/MapKit/mod.rs deleted file mode 100644 index 1052c9c7b..000000000 --- a/crates/icrate/src/additions/MapKit/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! # Bindings to the `MapKit` framework - -pub use crate::generated::MapKit::*; - -#[cfg(all(feature = "Foundation_NSObject", feature = "MapKit_MKMapItem"))] -unsafe impl crate::Foundation::NSCoding for crate::MapKit::MKMapItem {} diff --git a/crates/icrate/src/additions/MetricKit/mod.rs b/crates/icrate/src/additions/MetricKit/mod.rs deleted file mode 100644 index 4637ce9bc..000000000 --- a/crates/icrate/src/additions/MetricKit/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -//! # Bindings to the `MetricKit` framework -#![allow(non_snake_case)] -pub use crate::generated::MetricKit::*; - -#[cfg(feature = "MetricKit_MXMetricManager")] -mod manager; - -#[cfg(feature = "MetricKit_MXMetricManager")] -pub use self::manager::*; diff --git a/crates/icrate/src/additions/Photos/mod.rs b/crates/icrate/src/additions/Photos/mod.rs deleted file mode 100644 index 8b9dc2d2b..000000000 --- a/crates/icrate/src/additions/Photos/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! # Bindings to the `PhotoKit` framework -//! -//! This actually lives in the `Photos` framework, but `PhotoKit` is the name -//! that people use to refer to it. -#![doc(alias = "PhotoKit")] - -pub use crate::generated::Photos::*; diff --git a/crates/icrate/src/additions/QuartzCore/mod.rs b/crates/icrate/src/additions/QuartzCore/mod.rs deleted file mode 100644 index a090a4cac..000000000 --- a/crates/icrate/src/additions/QuartzCore/mod.rs +++ /dev/null @@ -1,10 +0,0 @@ -//! # Bindings to the `CoreAnimation` framework -//! -//! This actually lives in the `QuartzCore` framework, but `CoreAnimation` is -//! the name that people use to refer to it. -#![doc(alias = "CoreAnimation")] - -pub use crate::generated::QuartzCore::*; - -// CoreFoundation -pub(crate) type CFTimeInterval = std::os::raw::c_double; diff --git a/crates/icrate/src/additions/WebKit/mod.rs b/crates/icrate/src/additions/WebKit/mod.rs deleted file mode 100644 index f670c42be..000000000 --- a/crates/icrate/src/additions/WebKit/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -//! # Bindings to the `WebKit` framework -//! -//! -//! ## Example -//! -//! ```ignore -#![doc = include_str!("../../../examples/browser.rs")] -//! ``` -#![allow(non_snake_case)] - -pub use crate::generated::WebKit::*; -use objc2::extern_methods; - -extern_methods!( - #[cfg(feature = "WebKit_WKNavigationAction")] - unsafe impl WKNavigationAction { - #[cfg(feature = "WebKit_WKFrameInfo")] - #[method_id(@__retain_semantics Other sourceFrame)] - pub unsafe fn sourceFrame(&self) -> Option>; - } -); diff --git a/crates/icrate/src/additions/mod.rs b/crates/icrate/src/additions/mod.rs deleted file mode 100644 index 34fd81ae7..000000000 --- a/crates/icrate/src/additions/mod.rs +++ /dev/null @@ -1,25 +0,0 @@ -#![allow(non_snake_case)] -#[cfg(feature = "AppKit")] -pub mod AppKit; -#[cfg(feature = "AuthenticationServices")] -pub mod AuthenticationServices; -#[cfg(feature = "CallKit")] -pub mod CallKit; -#[cfg(feature = "Foundation")] -pub mod Foundation; -#[cfg(feature = "GameController")] -pub mod GameController; -#[cfg(feature = "InputMethodKit")] -pub mod InputMethodKit; -#[cfg(feature = "MapKit")] -pub mod MapKit; -#[cfg(feature = "Metal")] -pub mod Metal; -#[cfg(feature = "MetricKit")] -pub mod MetricKit; -#[cfg(feature = "Photos")] -pub mod Photos; -#[cfg(feature = "QuartzCore")] -pub mod QuartzCore; -#[cfg(feature = "WebKit")] -pub mod WebKit; diff --git a/crates/icrate/src/common.rs b/crates/icrate/src/common.rs deleted file mode 100644 index 410fd6b5a..000000000 --- a/crates/icrate/src/common.rs +++ /dev/null @@ -1,47 +0,0 @@ -#![allow(unused_imports)] -#![allow(dead_code)] - -pub(crate) use core::ffi::c_void; -pub(crate) use core::marker::PhantomData; -pub(crate) use core::ptr::NonNull; -#[cfg(feature = "std")] -pub(crate) use std::os::raw::{ - c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint, - c_ulong, c_ulonglong, c_ushort, -}; - -#[cfg(feature = "objc2")] -pub(crate) use objc2::encode::{Encode, Encoding, RefEncode}; -#[cfg(feature = "objc2")] -pub(crate) use objc2::ffi::{NSInteger, NSIntegerMax, NSUInteger, NSUIntegerMax, IMP}; -#[cfg(feature = "objc2")] -pub(crate) use objc2::mutability::{ - Immutable, ImmutableWithMutableSubclass, InteriorMutable, IsIdCloneable, IsMainThreadOnly, - MainThreadOnly, Mutable, MutableWithImmutableSuperclass, -}; -#[cfg(feature = "objc2")] -pub(crate) use objc2::rc::{Allocated, DefaultId, Id}; -#[cfg(feature = "objc2")] -pub(crate) use objc2::runtime::{AnyClass, AnyObject, Bool, Sel}; -#[cfg(feature = "objc2")] -pub(crate) use objc2::runtime::{NSObject, NSObjectProtocol, ProtocolObject}; -#[cfg(feature = "objc2")] -pub(crate) use objc2::{ - __inner_extern_class, extern_category, extern_class, extern_methods, extern_protocol, - ClassType, Message, ProtocolType, -}; - -#[cfg(feature = "block2")] -pub(crate) use block2::Block; - -// TODO -#[cfg(feature = "objc2")] -pub(crate) type AnyProtocol = AnyObject; -pub(crate) type TodoFunction = *const c_void; -#[cfg(feature = "objc2")] -pub(crate) type TodoClass = AnyObject; -#[cfg(feature = "objc2")] -pub(crate) type TodoProtocols = AnyObject; - -#[cfg(feature = "Foundation")] -pub(crate) use crate::Foundation::MainThreadMarker; diff --git a/crates/icrate/src/generated b/crates/icrate/src/generated deleted file mode 160000 index 8395fdece..000000000 --- a/crates/icrate/src/generated +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8395fdecef3beb4aa516117d349b319ba669aab0 diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs deleted file mode 100644 index 3adae32f6..000000000 --- a/crates/icrate/src/lib.rs +++ /dev/null @@ -1,258 +0,0 @@ -//! # Bindings to Apple's frameworks -//! -//! `icrate` is an autogenerated interface to Apple's Objective-C frameworks -//! like AppKit, Foundation, Metal, WebKit, and so on. -//! -//! The bindings currently contain very little documentation, you should view -//! [Apple's developer documentation][apple-doc-index] for detailed -//! information about each API. (There are [plans][#309] for importing that -//! documentation here). -//! -//! This crate uses [`objc2`] to declare the external interface to the -//! Objective-C classes and protocols. It is highly recommended that you read -//! the documentation there for details on how the Objective-C interop works. -//! -//! It also uses [`block2::Block`] in the public API, check out the [`block2`] -//! crate for how to call such methods using a closure. -//! -//! A common mistake is to specify a different [`objc2`] or [`block2`] version -//! in your `Cargo.toml` than the one your version of `icrate` uses. The -//! versions that `icrate` currently uses is exported as `icrate::objc2` and -//! `icrate::block2` for convenience. -//! -//! [apple-doc-index]: https://developer.apple.com/documentation/technologies -//! [#309]: https://github.com/madsmtm/objc2/issues/309 -//! -//! -//! ## Supported versions -//! -//! - macOS: `10.12-14.4` -//! - iOS/iPadOS: `10.0-17.4` (WIP) -//! - tvOS: `10.0-17.4` (WIP) -//! - watchOS: `5.0-10.4` (WIP) -//! - visionOS: `1.0-1.1` (WIP) -//! -//! These bindings are currently generated from the SDKs in Xcode 15.3. -//! The Xcode version will be periodically updated. -//! -//! -//! ## Use of `Deref` -//! -//! `icrate` uses the [`Deref`] trait in a bit special way: All objects deref -//! to their superclasses. For example, `NSMutableArray` derefs to `NSArray`, -//! which in turn derefs to `NSObject`. -//! -//! Note that this is explicitly recommended against in [the -//! documentation][`Deref`] and [the Rust Design patterns -//! book][anti-pattern-deref] (see those links for details). -//! -//! Due to Objective-C objects only ever being accessible behind pointers in -//! the first place, the problems stated there are less severe, and having the -//! implementation just means that everything is much nicer when you actually -//! want to use the objects! -//! -//! All objects also implement [`AsRef`] and [`AsMut`] to their superclass, -//! and can be used in [`Id::into_super`], so if you favour explicit -//! conversion, that is a possibility too. -//! -//! [`Deref`]: std::ops::Deref -//! [`ClassType`]: crate::objc2::ClassType -//! [anti-pattern-deref]: https://rust-unofficial.github.io/patterns/anti_patterns/deref.html -//! [`Id::into_super`]: objc2::rc::Id::into_super -//! -//! -//! ## Rust vs. Objective-C types -//! -//! A quick overview of some types you will encounter often in Objective-C, -//! and their approximate Rust equivalent. -//! -//! | Objective-C | (approximately) equivalent Rust | -//! | --- | --- | -//! | `NSData*` | `Arc<[u8]>` | -//! | `NSMutableData*` | `Vec` | -//! | `NSString*` | `Arc` | -//! | `NSMutableString*` | `String` | -//! | `NSValue*` | `Arc` | -//! | `NSNumber*` | `Arc` | -//! | `NSError*` | `Arc` | -//! | `NSException*` | `Arc` | -//! | `NSRange` | `ops::Range` | -//! | `NSComparisonResult` | `cmp::Ordering` | -//! | `NSArray*` | `Arc<[T]>` | -//! | `NSMutableArray*` | `Vec` | -//! | `NSDictionary*` | `Arc>` | -//! | `NSMutableDictionary*` | `HashMap` | -//! | `NSEnumerator*` | `Box>` | -//! | `NSCopying*` | `Box` | -//! -//! -//! ## Example -//! -//! ```console -//! $ cargo add icrate --features=Foundation,Foundation_all -//! ``` -//! -#![cfg_attr( - all( - feature = "Foundation", - feature = "Foundation_NSArray", - feature = "Foundation_NSString" - ), - doc = "```" -)] -#![cfg_attr( - not(all( - feature = "Foundation", - feature = "Foundation_NSArray", - feature = "Foundation_NSString" - )), - doc = "```ignore" -)] -//! use icrate::Foundation::{ns_string, NSCopying, NSArray}; -//! -//! let string = ns_string!("world"); -//! println!("hello {string}"); -//! -//! let array = NSArray::from_id_slice(&[string.copy()]); -//! println!("{array:?}"); -//! ``` -#![no_std] -#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] -// Update in Cargo.toml as well. -#![doc(html_root_url = "https://docs.rs/icrate/0.1.0")] -#![recursion_limit = "512"] - -#[cfg(feature = "alloc")] -extern crate alloc; - -#[cfg(feature = "std")] -extern crate std; - -#[cfg(doctest)] -#[doc = include_str!("../README.md")] -extern "C" {} - -#[cfg(feature = "objc2")] -pub extern crate objc2; - -#[cfg(feature = "block2")] -pub extern crate block2; - -mod additions; -mod common; -#[allow(unreachable_pub)] -mod generated; - -/// Deprecated alias of [`Foundation::ns_string`]. -#[macro_export] -#[deprecated = "use icrate::Foundation::ns_string instead"] -#[cfg(feature = "Foundation_NSString")] -macro_rules! ns_string { - ($s:expr) => { - $crate::Foundation::ns_string!($s) - }; -} - -#[cfg(feature = "AppKit")] -pub use self::additions::AppKit; -#[cfg(feature = "AuthenticationServices")] -pub use self::additions::AuthenticationServices; -#[cfg(feature = "CallKit")] -pub use self::additions::CallKit; -#[cfg(feature = "Foundation")] -pub use self::additions::Foundation; -#[cfg(feature = "GameController")] -pub use self::additions::GameController; -#[cfg(feature = "InputMethodKit")] -pub use self::additions::InputMethodKit; -#[cfg(feature = "MapKit")] -pub use self::additions::MapKit; -#[cfg(feature = "Metal")] -pub use self::additions::Metal; -#[cfg(feature = "MetricKit")] -pub use self::additions::MetricKit; -#[cfg(feature = "Photos")] -pub use self::additions::Photos; -#[cfg(feature = "QuartzCore")] -pub use self::additions::QuartzCore; -#[cfg(feature = "WebKit")] -pub use self::additions::WebKit; - -#[cfg(feature = "Accessibility")] -pub use self::generated::Accessibility; -#[cfg(feature = "AdServices")] -pub use self::generated::AdServices; -#[cfg(feature = "AdSupport")] -pub use self::generated::AdSupport; -#[cfg(feature = "AutomaticAssessmentConfiguration")] -pub use self::generated::AutomaticAssessmentConfiguration; -#[cfg(feature = "Automator")] -pub use self::generated::Automator; -#[cfg(feature = "BackgroundAssets")] -pub use self::generated::BackgroundAssets; -#[cfg(feature = "BackgroundTasks")] -pub use self::generated::BackgroundTasks; -#[cfg(feature = "BusinessChat")] -pub use self::generated::BusinessChat; -#[cfg(feature = "ClassKit")] -pub use self::generated::ClassKit; -#[cfg(feature = "CloudKit")] -pub use self::generated::CloudKit; -#[cfg(feature = "Contacts")] -pub use self::generated::Contacts; -#[cfg(feature = "CoreData")] -pub use self::generated::CoreData; -#[cfg(feature = "CoreLocation")] -pub use self::generated::CoreLocation; -#[cfg(feature = "CoreWLAN")] -pub use self::generated::CoreWLAN; -#[cfg(feature = "DataDetection")] -pub use self::generated::DataDetection; -#[cfg(feature = "DeviceCheck")] -pub use self::generated::DeviceCheck; -#[cfg(feature = "EventKit")] -pub use self::generated::EventKit; -#[cfg(feature = "ExceptionHandling")] -pub use self::generated::ExceptionHandling; -#[cfg(feature = "ExtensionKit")] -pub use self::generated::ExtensionKit; -#[cfg(feature = "ExternalAccessory")] -pub use self::generated::ExternalAccessory; -#[cfg(feature = "FileProvider")] -pub use self::generated::FileProvider; -#[cfg(feature = "FileProviderUI")] -pub use self::generated::FileProviderUI; -#[cfg(feature = "GameKit")] -pub use self::generated::GameKit; -#[cfg(feature = "HealthKit")] -pub use self::generated::HealthKit; -#[cfg(feature = "IdentityLookup")] -pub use self::generated::IdentityLookup; -#[cfg(feature = "LinkPresentation")] -pub use self::generated::LinkPresentation; -#[cfg(feature = "LocalAuthentication")] -pub use self::generated::LocalAuthentication; -#[cfg(feature = "LocalAuthenticationEmbeddedUI")] -pub use self::generated::LocalAuthenticationEmbeddedUI; -#[cfg(feature = "MailKit")] -pub use self::generated::MailKit; -#[cfg(feature = "MediaPlayer")] -pub use self::generated::MediaPlayer; -#[cfg(feature = "MetalFX")] -pub use self::generated::MetalFX; -#[cfg(feature = "MetalKit")] -pub use self::generated::MetalKit; -#[cfg(feature = "OSAKit")] -pub use self::generated::OSAKit; -#[cfg(feature = "ServiceManagement")] -pub use self::generated::ServiceManagement; -#[cfg(feature = "SoundAnalysis")] -pub use self::generated::SoundAnalysis; -#[cfg(feature = "Speech")] -pub use self::generated::Speech; -#[cfg(feature = "StoreKit")] -pub use self::generated::StoreKit; -#[cfg(feature = "UniformTypeIdentifiers")] -pub use self::generated::UniformTypeIdentifiers; -#[cfg(feature = "UserNotifications")] -pub use self::generated::UserNotifications; diff --git a/crates/objc-sys/Cargo.toml b/crates/objc-sys/Cargo.toml index 191ac61ad..1cef852fa 100644 --- a/crates/objc-sys/Cargo.toml +++ b/crates/objc-sys/Cargo.toml @@ -67,22 +67,17 @@ unstable-docsrs = [] cc = { version = "1.0.80", optional = true } [package.metadata.docs.rs] -default-target = "x86_64-apple-darwin" +default-target = "aarch64-apple-darwin" no-default-features = true features = ["std", "unstable-docsrs"] - targets = [ - # MacOS - "x86_64-apple-darwin", "aarch64-apple-darwin", - # "i686-apple-darwin", - # iOS + "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios", - # "i386-apple-ios", - # GNUStep + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", "x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", - # Windows - "x86_64-pc-windows-msvc", ] diff --git a/crates/objc-sys/src/lib.rs b/crates/objc-sys/src/lib.rs index 67eeb36af..ee52e627f 100644 --- a/crates/objc-sys/src/lib.rs +++ b/crates/objc-sys/src/lib.rs @@ -29,7 +29,7 @@ //! - Feature flag: `apple`. //! //! This is used by default, and has the highest support priority (all of -//! `objc2`/`icrate` will work with this runtime). +//! `objc2` will work with this runtime). //! //! The supported runtime version (higher versions lets the compiler enable //! newer optimizations, at the cost of not supporting older operating diff --git a/crates/objc-sys/src/types.rs b/crates/objc-sys/src/types.rs index e1aad5d46..88393c56b 100644 --- a/crates/objc-sys/src/types.rs +++ b/crates/objc-sys/src/types.rs @@ -209,7 +209,7 @@ pub type SEL = *const objc_selector; /// A mutable pointer to an object / instance. /// /// Type alias provided for convenience. You'll likely want to use one of: -/// - `icrate::Foundation::NS[...]` for when you know the class of the object +/// - `objc2_foundation::NS[...]` for when you know the class of the object /// you're dealing with. /// - `objc2::rc::Id` for a proper way of doing memory management. /// - `objc2::runtime::AnyObject` for a bit safer representation of this. diff --git a/crates/objc2-encode/Cargo.toml b/crates/objc2-encode/Cargo.toml index 1fb358659..ce5cf7ca5 100644 --- a/crates/objc2-encode/Cargo.toml +++ b/crates/objc2-encode/Cargo.toml @@ -30,20 +30,15 @@ std = ["alloc"] alloc = [] [package.metadata.docs.rs] -default-target = "x86_64-apple-darwin" - +default-target = "aarch64-apple-darwin" targets = [ - # MacOS - "x86_64-apple-darwin", "aarch64-apple-darwin", - # "i686-apple-darwin", - # iOS + "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios", - # "i386-apple-ios", - # GNUStep + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", "x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", - # Windows - "x86_64-pc-windows-msvc", ] diff --git a/crates/objc2-proc-macros/Cargo.toml b/crates/objc2-proc-macros/Cargo.toml index 61ca38a29..b256dd0db 100644 --- a/crates/objc2-proc-macros/Cargo.toml +++ b/crates/objc2-proc-macros/Cargo.toml @@ -35,4 +35,15 @@ gnustep-2-0 = ["gnustep-1-9"] gnustep-2-1 = ["gnustep-2-0"] [package.metadata.docs.rs] -default-target = "x86_64-apple-darwin" +default-target = "aarch64-apple-darwin" +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "x86_64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", + "x86_64-unknown-linux-gnu", + "i686-unknown-linux-gnu", +] diff --git a/crates/objc2/CHANGELOG.md b/crates/objc2/CHANGELOG.md index e6b80f187..5fd254475 100644 --- a/crates/objc2/CHANGELOG.md +++ b/crates/objc2/CHANGELOG.md @@ -296,7 +296,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). An example: ```rust // Before - use icrate::Foundation::NSObject; + use objc2::runtime::NSObject; use objc2::{declare_class, ClassType}; declare_class!( @@ -310,7 +310,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ); // After - use icrate::Foundation::NSObject; + use objc2::runtime::NSObject; use objc2::mutability::InteriorMutable; use objc2::{declare_class, ClassType}; diff --git a/crates/objc2/Cargo.toml b/crates/objc2/Cargo.toml index b67f16c9b..23cb03f2b 100644 --- a/crates/objc2/Cargo.toml +++ b/crates/objc2/Cargo.toml @@ -117,21 +117,16 @@ name = "autorelease" harness = false [package.metadata.docs.rs] -default-target = "x86_64-apple-darwin" +default-target = "aarch64-apple-darwin" features = ["exception", "unstable-docsrs"] - targets = [ - # MacOS - "x86_64-apple-darwin", "aarch64-apple-darwin", - # "i686-apple-darwin", - # iOS + "x86_64-apple-darwin", "aarch64-apple-ios", "x86_64-apple-ios", - # "i386-apple-ios", - # GNUStep + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", "x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", - # Windows - "x86_64-pc-windows-msvc", ] diff --git a/crates/objc2/src/__framework_prelude.rs b/crates/objc2/src/__framework_prelude.rs new file mode 100644 index 000000000..1b38f575c --- /dev/null +++ b/crates/objc2/src/__framework_prelude.rs @@ -0,0 +1,33 @@ +//! Helper import prelude for framework crates. + +// Note: While this is not public, it is still a breaking change to remove +// entries in here, since framework crates rely on it. + +pub use core::ffi::c_void; +pub use core::marker::PhantomData; +pub use core::ptr::NonNull; +pub use std::os::raw::{ + c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint, + c_ulong, c_ulonglong, c_ushort, +}; + +pub use crate::encode::{Encode, Encoding, RefEncode}; +pub use crate::ffi::{NSInteger, NSIntegerMax, NSUInteger, NSUIntegerMax, IMP}; +pub use crate::mutability::{ + Immutable, ImmutableWithMutableSubclass, InteriorMutable, IsIdCloneable, IsMainThreadOnly, + MainThreadOnly, Mutable, MutableWithImmutableSuperclass, +}; +pub use crate::rc::{Allocated, DefaultId, Id}; +pub use crate::runtime::{ + AnyClass, AnyObject, Bool, NSObject, NSObjectProtocol, ProtocolObject, Sel, +}; +pub use crate::{ + __inner_extern_class, extern_category, extern_class, extern_methods, extern_protocol, + ClassType, Message, ProtocolType, +}; + +// TODO +pub type AnyProtocol = AnyObject; +pub type TodoFunction = *const c_void; +pub type TodoClass = AnyObject; +pub type TodoProtocols = AnyObject; diff --git a/crates/objc2/src/encode.rs b/crates/objc2/src/encode.rs index 3930c22be..90993c0f1 100644 --- a/crates/objc2/src/encode.rs +++ b/crates/objc2/src/encode.rs @@ -45,8 +45,8 @@ //! //! Implementing [`Encode`] for a few core-graphics types. //! -//! Note that these are available in `icrate`, so the implementation here is -//! mostly for demonstration. +//! Note that these are available in `objc2-foundation`, so the implementation +//! here is mostly for demonstration. //! //! ``` #![doc = include_str!("../examples/encode_core_graphics.rs")] diff --git a/crates/objc2/src/lib.rs b/crates/objc2/src/lib.rs index da2660589..e2f69ab2d 100644 --- a/crates/objc2/src/lib.rs +++ b/crates/objc2/src/lib.rs @@ -1,7 +1,9 @@ //! # Objective-C interface and runtime bindings //! //! Quick links: -//! - [Topics][crate::topics]. +//! - [All Topics][crate::topics]. +//! - [About framework crates][crate::topics::about_generated]. +//! - [List of framework crates][crate::topics::about_generated::list]. //! //! Objective-C was the standard programming language on Apple platforms like //! macOS, iOS, iPadOS, tvOS and watchOS. It is an object-oriented language @@ -14,13 +16,6 @@ //! using Rust. This crate enables you to do that, in as safe a manner as //! possible. //! -//! See [the document on "Layered Safety"][layered_safety] for a bit of an -//! introduction to how the safety in this crate works, and see [`icrate`] for -//! higher-level bindings to Apple's frameworks. -//! -//! [layered_safety]: crate::topics::layered_safety -//! [`icrate`]: https://docs.rs/icrate/latest/icrate/ -//! //! //! ## Basic usage //! @@ -74,7 +69,7 @@ //! have accidentally made `hash` an `f32`, or any other type, and this would //! trigger undefined behaviour! //! -//! See the `icrate` crate for much more ergonomic usage of the system +//! See [the framework crates] for much more ergonomic usage of the system //! frameworks like `Foundation`, `AppKit`, `UIKit` and so on. //! //! Anyhow, all of this `unsafe` nicely leads us to another feature that this @@ -82,6 +77,7 @@ //! //! [`NSObject`]: crate::runtime::NSObject //! [`rc::Id`]: crate::rc::Id +//! [the framework crates]: crate::topics::about_generated //! //! //! ## Encodings and message type verification @@ -199,6 +195,10 @@ macro_rules! __hash_idents { }; } +// Note: While this is not public, it is still a breaking change to change, +// since framework crates rely on it. +#[doc(hidden)] +pub mod __framework_prelude; #[doc(hidden)] pub mod __macro_helpers; pub mod encode; diff --git a/crates/objc2/src/macros/declare_class.rs b/crates/objc2/src/macros/declare_class.rs index 47c03f97e..12003b1e5 100644 --- a/crates/objc2/src/macros/declare_class.rs +++ b/crates/objc2/src/macros/declare_class.rs @@ -203,8 +203,8 @@ /// use std::os::raw::c_int; /// /// # use objc2::runtime::{NSObject, NSObjectProtocol, NSZone}; -/// # #[cfg(available_in_icrate)] -/// use icrate::Foundation::{NSCopying, NSObject, NSObjectProtocol, NSZone}; +/// # #[cfg(available_in_foundation)] +/// use objc2_foundation::{NSCopying, NSObject, NSObjectProtocol, NSZone}; /// use objc2::rc::{Allocated, Id}; /// use objc2::{ /// declare_class, extern_protocol, msg_send, msg_send_id, mutability, ClassType, @@ -270,7 +270,7 @@ /// /// unsafe impl NSObjectProtocol for MyCustomObject {} /// -/// # #[cfg(available_in_icrate)] +/// # #[cfg(available_in_foundation)] /// unsafe impl NSCopying for MyCustomObject { /// #[method_id(copyWithZone:)] /// fn copyWithZone(&self, _zone: *const NSZone) -> Id { @@ -308,7 +308,7 @@ /// assert!(obj.ivars().object.is_kind_of::()); /// /// # let obj: Id = unsafe { msg_send_id![&obj, copy] }; -/// # #[cfg(available_in_icrate)] +/// # #[cfg(available_in_foundation)] /// let obj = obj.copy(); /// /// assert_eq!(obj.get_foo(), 3); diff --git a/crates/objc2/src/macros/extern_category.rs b/crates/objc2/src/macros/extern_category.rs index 408a15060..819d16b8c 100644 --- a/crates/objc2/src/macros/extern_category.rs +++ b/crates/objc2/src/macros/extern_category.rs @@ -1,7 +1,7 @@ /// Not yet public API. // // Note: While this is not public, it is still a breaking change to change -// the API for this, since `icrate` relies on it. +// the API for this, since framework crates rely on it. #[doc(hidden)] #[macro_export] macro_rules! extern_category { diff --git a/crates/objc2/src/macros/extern_class.rs b/crates/objc2/src/macros/extern_class.rs index 93edafd1e..35918bc57 100644 --- a/crates/objc2/src/macros/extern_class.rs +++ b/crates/objc2/src/macros/extern_class.rs @@ -2,10 +2,10 @@ /// /// This is similar to an `@interface` declaration in Objective-C. /// -/// It is useful for things like `icrate`, which needs to create interfaces to -/// existing, externally defined classes like `NSString`, `NSURL` and so on, -/// but can also be useful for users that have custom classes written in -/// Objective-C that they want to access from Rust. +/// It is useful for things like `objc2-foundation`, which needs to create +/// interfaces to existing, externally defined classes like `NSString`, +/// `NSURL` and so on, but can also be useful for users that have custom +/// classes written in Objective-C that they want to access from Rust. /// /// /// # Specification @@ -87,11 +87,11 @@ /// # Examples /// /// Create a new type to represent the `NSFormatter` class (for demonstration, -/// `icrate::Foundation::NSFormatter` exist for exactly this purpose). +/// `objc2_foundation::NSFormatter` exist for exactly this purpose). /// /// ``` /// # #[cfg(not_available)] -/// use icrate::Foundation::{NSCoding, NSCopying, NSObjectProtocol}; +/// use objc2_foundation::{NSCoding, NSCopying, NSObjectProtocol}; /// # use objc2::runtime::NSObjectProtocol; /// use objc2::rc::Id; /// use objc2::runtime::NSObject; @@ -135,7 +135,7 @@ /// /// ``` /// # #[cfg(not_available)] -/// use icrate::Foundation::{NSCoding, NSCopying, NSObjectProtocol}; +/// use objc2_foundation::{NSCoding, NSCopying, NSObjectProtocol}; /// # use objc2::runtime::NSObjectProtocol; /// use objc2::runtime::NSObject; /// use objc2::{extern_class, mutability, ClassType}; @@ -170,7 +170,7 @@ /// unsafe impl NSCoding for NSDateFormatter {} /// ``` /// -/// See the source code of `icrate` for many more examples. +/// See the source code of `objc2-foundation` for many more examples. #[doc(alias = "@interface")] #[macro_export] macro_rules! extern_class { @@ -314,7 +314,7 @@ macro_rules! __impl_as_ref_borrow { } /// Note: While this is not public, it is still a breaking change to change -/// this, since `icrate` relies on it. +/// this, since framework crates rely on it. #[doc(hidden)] #[macro_export] macro_rules! __inner_extern_class { diff --git a/crates/objc2/src/macros/extern_methods.rs b/crates/objc2/src/macros/extern_methods.rs index ae4f2c5c9..83ad96277 100644 --- a/crates/objc2/src/macros/extern_methods.rs +++ b/crates/objc2/src/macros/extern_methods.rs @@ -26,7 +26,7 @@ /// [`Result`]. See the error section in [`msg_send!`] and [`msg_send_id!`] /// for details. /// -/// If you use `icrate::Foundation::MainThreadMarker` as a parameter type, the +/// If you use `objc2_foundation::MainThreadMarker` as a parameter type, the /// macro will ignore it, allowing you to neatly specify "this method must be /// run on the main thread". Note that due to type-system limitations, this is /// currently a textual match on `MainThreadMarker`; so you must use that @@ -181,7 +181,7 @@ /// } /// ``` /// -/// See the source code of `icrate` for many more examples. +/// See the source code of `objc2-foundation` for many more examples. #[macro_export] macro_rules! extern_methods { // Generic impls diff --git a/crates/objc2/src/macros/extern_protocol.rs b/crates/objc2/src/macros/extern_protocol.rs index 2abf3f0fc..640e24681 100644 --- a/crates/objc2/src/macros/extern_protocol.rs +++ b/crates/objc2/src/macros/extern_protocol.rs @@ -79,7 +79,8 @@ /// use objc2::runtime::{NSObject, NSObjectProtocol}; /// use objc2::{extern_protocol, ProtocolType}; /// -/// // Assume these were correctly define, as if the came from `icrate` +/// // Assume these were correctly defined, as if they came from +/// // `objc2-foundation` /// type NSArray = T; /// type NSString = NSObject; /// type NSProgress = NSObject; @@ -144,7 +145,7 @@ /// // from it as we specified. /// ``` /// -/// See the source code of `icrate` for many more examples. +/// See the source code of `objc2-foundation` for many more examples. #[doc(alias = "@protocol")] #[macro_export] macro_rules! extern_protocol { diff --git a/crates/objc2/src/macros/mod.rs b/crates/objc2/src/macros/mod.rs index 5321f9d05..39b9e2d44 100644 --- a/crates/objc2/src/macros/mod.rs +++ b/crates/objc2/src/macros/mod.rs @@ -777,7 +777,7 @@ macro_rules! __class_inner { /// /// In particular, if you make the last argument the special marker `_`, then /// the macro will return a `Result<(), Id>` (where you must specify `E` -/// yourself, usually you'd use `icrate::Foundation::NSError`). +/// yourself, usually you'd use `objc2_foundation::NSError`). /// /// At runtime, we create the temporary error variable for you on the stack /// and send it as the out-parameter to the method. If the method then returns @@ -1137,7 +1137,7 @@ macro_rules! msg_send_bool { /// /// In particular, you can make the last argument the special marker `_`, and /// then the macro will return a `Result, Id>` (where you must -/// specify `E` yourself, usually you'd use `icrate::Foundation::NSError`). +/// specify `E` yourself, usually you'd use `objc2_foundation::NSError`). /// /// /// # Panics diff --git a/crates/objc2/src/mutability.rs b/crates/objc2/src/mutability.rs index 0bc764084..21ecb3e81 100644 --- a/crates/objc2/src/mutability.rs +++ b/crates/objc2/src/mutability.rs @@ -74,8 +74,8 @@ enum Never {} /// Marker type for root classes. /// -/// This is used for `icrate::Foundation::NSObject` and -/// `icrate::Foundation::NSProxy`, which are the two fundamental types that +/// This is used for `objc2_foundation::NSObject` and +/// `objc2_foundation::NSProxy`, which are the two fundamental types that /// all others inherit from. /// /// Functionality that is provided with this: diff --git a/crates/objc2/src/rc/id.rs b/crates/objc2/src/rc/id.rs index 309160e2b..ee038f694 100644 --- a/crates/objc2/src/rc/id.rs +++ b/crates/objc2/src/rc/id.rs @@ -21,10 +21,10 @@ use crate::{ffi, ClassType, Message}; /// `T`'s [`ClassType`] implementation (if any) determines whether it is /// mutable, and by extension whether `Id` is mutable. /// -/// This can usually be gotten from one of the methods in `icrate`, but can be -/// created manually with the [`msg_send_id!`] macro (or even more manually, -/// with the [`Id::retain`], [`Id::from_raw`] or [`Id::retain_autoreleased`] -/// methods). +/// This can usually be gotten from one of the methods in the framework +/// crates, but can be created manually with the [`msg_send_id!`] macro (or +/// even more manually, with the [`Id::retain`], [`Id::from_raw`] or +/// [`Id::retain_autoreleased`] methods). /// /// [`msg_send_id!`]: crate::msg_send_id /// @@ -84,7 +84,7 @@ use crate::{ffi, ClassType, Message}; /// /// ``` /// # #[cfg(not_available)] -/// use icrate::Foundation::{NSObject, NSString}; +/// use objc2_foundation::{NSObject, NSString}; /// # use objc2::runtime::NSObject; /// use objc2::rc::Id; /// use objc2::{ClassType, msg_send_id}; diff --git a/crates/objc2/src/runtime/__nsstring.rs b/crates/objc2/src/runtime/__nsstring.rs index 6fe142be8..802108f5a 100644 --- a/crates/objc2/src/runtime/__nsstring.rs +++ b/crates/objc2/src/runtime/__nsstring.rs @@ -8,7 +8,7 @@ use crate::rc::AutoreleasePool; use crate::runtime::NSObject; // Note: While this is not public, it is still a breaking change to modify, -// since `icrate` relies on it. +// since `objc2-foundation` relies on it. #[cfg(feature = "apple")] pub const UTF8_ENCODING: usize = 4; #[cfg(feature = "gnustep-1-7")] @@ -21,7 +21,7 @@ pub const UTF8_ENCODING: i32 = 4; /// The object must be an instance of `NSString`. // // Note: While this is not public, it is still a breaking change to modify, -// since `icrate` relies on it. +// since `objc2-foundation` relies on it. pub unsafe fn nsstring_len(obj: &NSObject) -> NSUInteger { unsafe { msg_send![obj, lengthOfBytesUsingEncoding: UTF8_ENCODING] } } @@ -33,7 +33,7 @@ pub unsafe fn nsstring_len(obj: &NSObject) -> NSUInteger { /// The object must be an instance of `NSString`. // // Note: While this is not public, it is still a breaking change to modify, -// since `icrate` relies on it. +// since `objc2-foundation` relies on it. pub unsafe fn nsstring_to_str<'r, 's: 'r, 'p: 'r>( obj: &'s NSObject, pool: AutoreleasePool<'p>, diff --git a/crates/objc2/src/runtime/message_receiver.rs b/crates/objc2/src/runtime/message_receiver.rs index 783d133a7..85c1039b1 100644 --- a/crates/objc2/src/runtime/message_receiver.rs +++ b/crates/objc2/src/runtime/message_receiver.rs @@ -268,7 +268,7 @@ mod msg_send_primitive { } } -/// Help with monomorphizing in `icrate` +/// Help with monomorphizing in framework crates #[cfg(debug_assertions)] #[track_caller] fn msg_send_check( diff --git a/crates/objc2/src/runtime/mod.rs b/crates/objc2/src/runtime/mod.rs index 45ef5200c..8874e5cd7 100644 --- a/crates/objc2/src/runtime/mod.rs +++ b/crates/objc2/src/runtime/mod.rs @@ -25,7 +25,7 @@ use std::os::raw::c_char; use std::os::raw::c_uint; // Note: While this is not public, it is still a breaking change to remove, -// since `icrate` relies on it. +// since `objc2-foundation` relies on it. #[doc(hidden)] pub mod __nsstring; mod bool; @@ -48,7 +48,7 @@ use crate::verify::{verify_method_signature, Inner}; use crate::{ffi, Message}; // Note: While this is not public, it is still a breaking change to remove, -// since `icrate` relies on it. +// since `objc2-foundation` relies on it. #[doc(hidden)] pub use self::nsproxy::NSProxy as __NSProxy; @@ -1180,7 +1180,7 @@ impl fmt::Display for AnyProtocol { pub struct AnyObject(ffi::objc_object); /// Use [`AnyObject`] instead. -#[deprecated = "renamed to `runtime::AnyObject`. Consider using the correct type from `icrate` instead though"] +#[deprecated = "renamed to `runtime::AnyObject`. Consider using the correct type from the autogenerated `objc2-*` framework crates instead though"] pub type Object = AnyObject; unsafe impl RefEncode for AnyObject { diff --git a/crates/objc2/src/runtime/nsobject.rs b/crates/objc2/src/runtime/nsobject.rs index df3ea55b3..bdb09fc06 100644 --- a/crates/objc2/src/runtime/nsobject.rs +++ b/crates/objc2/src/runtime/nsobject.rs @@ -16,7 +16,7 @@ use crate::{ClassType, ProtocolType}; /// Since this class is only available with the `Foundation` framework, /// `objc2` links to it for you. /// -/// This is exported under `icrate::Foundation::NSObject`, you probably +/// This is exported under `objc2_foundation::NSObject`, you probably /// want to use that path instead. /// /// [cls]: https://developer.apple.com/documentation/objectivec/nsobject?language=objc @@ -85,7 +85,7 @@ unsafe impl ClassType for NSObject { /// bound in [`extern_protocol!`], to allow your protocol to implement `Debug` /// `Hash`, `PartialEq` and `Eq`. /// -/// This trait is exported under `icrate::Foundation::NSObjectProtocol`, you +/// This trait is exported under `objc2_foundation::NSObjectProtocol`, you /// probably want to use that path instead. /// /// [proto]: https://developer.apple.com/documentation/objectivec/1418956-nsobject?language=objc @@ -100,7 +100,7 @@ unsafe impl ClassType for NSObject { // Note: Most of the methods on this must remain `unsafe` to override, // including `isEqual` and `hash`, since hashing collections like // `NSDictionary` and `NSSet` rely on it being stable. -#[allow(non_snake_case)] // Follow the naming scheme in `icrate` +#[allow(non_snake_case)] // Follow the naming scheme in framework crates pub unsafe trait NSObjectProtocol { /// Check whether the object is equal to an arbitrary other object. /// @@ -205,15 +205,15 @@ pub unsafe trait NSObjectProtocol { /// method was added. /// /// ``` - /// # #[cfg(available_in_icrate)] - /// use icrate::AppKit::{NSApplication, NSAppearance, NSAppearanceNameAqua}; + /// # #[cfg(available_in_frameworks)] + /// use objc2_app_kit::{NSApplication, NSAppearance, NSAppearanceNameAqua}; /// use objc2::runtime::NSObjectProtocol; /// use objc2::sel; /// /// # let obj = objc2::runtime::NSObject::new(); /// # assert!(!obj.respondsToSelector(sel!(effectiveAppearance))); /// # - /// # #[cfg(available_in_icrate)] { + /// # #[cfg(available_in_frameworks)] { /// let appearance = if obj.respondsToSelector(sel!(effectiveAppearance)) { /// NSApplication::sharedApplication(mtm).effectiveAppearance() /// } else { @@ -247,9 +247,9 @@ pub unsafe trait NSObjectProtocol { /// A textual representation of the object. /// /// The returned class is `NSString`, but since that is defined in - /// `icrate`, and `NSObjectProtocol` is defined in `objc2`, the declared - /// return type is unfortunately restricted to be [`NSObject`]. It is - /// always safe to cast the return value of this to `NSString`. + /// `objc2-foundation`, and `NSObjectProtocol` is defined in `objc2`, the + /// declared return type is unfortunately restricted to be [`NSObject`]. + /// It is always safe to cast the return value of this to `NSString`. /// /// You might want to use the [`Debug`][fmt::Debug] impl of the object /// instead, or if the object implements [`Display`][fmt::Display], the @@ -261,8 +261,8 @@ pub unsafe trait NSObjectProtocol { /// ``` /// use objc2::rc::Id; /// # use objc2::runtime::{NSObjectProtocol, NSObject, NSObject as NSString}; - /// # #[cfg(available_in_icrate)] - /// use icrate::Foundation::{NSString, NSObjectProtocol}; + /// # #[cfg(available_in_foundation)] + /// use objc2_foundation::{NSObject, NSObjectProtocol, NSString}; /// /// # let obj = NSObject::new(); /// // SAFETY: Descriptions are always `NSString`. @@ -383,7 +383,7 @@ where unsafe impl NSObjectProtocol for NSObject {} extern_methods!( - #[allow(non_snake_case)] // Follow the naming scheme in `icrate` + #[allow(non_snake_case)] // Follow the naming scheme in framework crates unsafe impl NSObject { /// Create a new empty `NSObject`. /// diff --git a/crates/icrate/CHANGELOG.md b/crates/objc2/src/topics/about_generated/CHANGELOG.md similarity index 93% rename from crates/icrate/CHANGELOG.md rename to crates/objc2/src/topics/about_generated/CHANGELOG.md index 8d930414a..b5a2d27c4 100644 --- a/crates/icrate/CHANGELOG.md +++ b/crates/objc2/src/topics/about_generated/CHANGELOG.md @@ -1,14 +1,16 @@ -# Changelog +# Framework crate changelog -Changes to `icrate` will be documented in this file. +Changes to `objc2`'s framework crates will be documented in this file. -This previously existed as a separate crate `objc2_foundation`, later it was -integrated into `objc2::foundation`, and later again split out - hence the -confusing versioning. +The history of these crates are a bit convoluted; the Foundation parts +originally existed as `objc2-foundation`, but later it was integrated into +`objc2` under `objc2::foundation`, later again moved into `icrate::Foundation` +as part of the larger `icrate`, and finally `icrate` was split back out into +`objc2-foundation` and other smaller crates - hence the confusing versioning. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## icrate Unreleased - YYYY-MM-DD +## Unreleased - YYYY-MM-DD ### Added * Added `NSObject` categories, notably those used by key-value coding and @@ -30,12 +32,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * **BREAKING**: Changed how enums are handled; now a newtype is generated for each enum, with the enum variants as constants on that newtype, instead of cluttering the top-level namespace. -* **BREAKING**: Changed how feature flags work, they are now based on the - header file name where the item is defined, instead of being based on the - class name itself. +* **BREAKING**: Split `icrate` into multiple smaller crates all prefixed with + `objc2-`, and changed how feature flags work. - This should decrease compilation times by quite a lot, at the cost of having - to specify more precisely what you need in your `Cargo.toml`. + Feature flags are now based on the header file name where the item is + defined, instead of being based on the class name itself. + + These two things should decrease compilation times by quite a lot, at the + cost of having to specify more precisely what you need in your `Cargo.toml`. An example migration can be seen in the following: @@ -49,37 +53,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). "Foundation_NSString", "Foundation_NSThread", "Foundation_NSArray", - "Foundation_NSMutableArray", # Removed, this is included via. `Foundation_NSArray` + "Foundation_NSMutableArray", "AppKit", "AppKit_NSApplication", ] # After - [dependencies.icrate] - version = "0.2.0" - features = [ - "Foundation", - "Foundation_NSNotification", - "Foundation_NSString", - "Foundation_NSThread", - "Foundation_NSObject", # Added, required to get the `NSCopying` protocol - "Foundation_NSArray", - "AppKit", - "AppKit_NSResponder", # Added, required by `NSApplication` - "AppKit_NSApplication", - "AppKit_NSRunningApplication", # Added, a lot of application constants come from here - ] + # Moved to `objc2-foundation` and `objc2-app-kit` crates. + [dependencies] + # Removed `Foundation_NSMutableArray`, it is included via. `NSArray`. + # Added `NSObject` as the `NSCopying` protocol comes from there. + objc2-foundation = { version = "0.2", features = ["Foundation_NSNotification", "Foundation_NSString", "Foundation_NSThread", "Foundation_NSObject", "Foundation_NSArray"] } + # Added `NSResponder` as it's required by `NSApplication`. + # Added `NSRunningApplication` as a lot of application constants come from here. + objc2-app-kit = { version = "0.2", features = ["AppKit_NSResponder", "AppKit_NSApplication", "AppKit_NSRunningApplication"] } ``` * Marked `NSView::isFlipped`, `NSView::convertRect_toView`, `NSWindow::convertRectToScreen` and `NSWindow::convertPointFromScreen` as safe. * Renamed the `block` and `objective-c` feature flags to `block2` and `objc2`. - The old feature flags are kept as deprecated. - ### Deprecated * Deprecated `Foundation::MainThreadMarker::run_on_main`, use the new - free-standing function `Foundation::run_on_main` instead. + free-standing function `objc2_foundation::run_on_main` instead. ### Removed * Removed private functionality in the `Speech` framework. This was never @@ -135,7 +131,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This means that they can now only be constructed, retrieved and used on the main thread, meaning you usually have to aquire a `MainThreadMarker` first. - ```rust + ```rust, ignore // Before let app = unsafe { NSApplication::sharedApplication() }; let view = unsafe { NSView::initWithFrame(NSView::alloc(), frame) }; @@ -243,7 +239,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Combined with proper `IntoIterator` implementations for collection types, you can now do: - ```rust + ```rust, ignore let mut array: Id> = ...; for item in &array { diff --git a/crates/objc2/src/topics/about_generated/README.md b/crates/objc2/src/topics/about_generated/README.md new file mode 100644 index 000000000..64858360d --- /dev/null +++ b/crates/objc2/src/topics/about_generated/README.md @@ -0,0 +1,32 @@ +# About the generated framework crates + +The `objc2` project provides (mostly) autogenerated interfaces to Apple's +Objective-C frameworks like AppKit, Foundation, Metal, WebKit, and so on. + +The bindings currently contain very little documentation, you should view +[Apple's developer documentation][apple-doc-index] for detailed +information about each API. (There are [plans][#309] for importing that +documentation here). + +These crates uses `objc2` to declare the external interface to the +Objective-C classes and protocols. It is highly recommended that you read +the documentation here for details on how the Objective-C interop works. + +They also use `block2::Block` in the public API, check out the documentation +for the [`block2`] crate for how to call such methods using a closure. + +[apple-doc-index]: https://developer.apple.com/documentation/technologies +[#309]: https://github.com/madsmtm/objc2/issues/309 +[`block2`]: https://docs.rs/block2 + + +## Currently supported versions + +- macOS: `10.12-14.4` +- iOS/iPadOS: `10.0-17.4` (WIP) +- tvOS: `10.0-17.4` (WIP) +- watchOS: `5.0-10.4` (WIP) +- visionOS: `1.0-1.1` (WIP) + +These bindings are currently generated from the SDKs in Xcode 15.3. +The Xcode version will be periodically updated. diff --git a/crates/objc2/src/topics/about_generated/cargo_features.md b/crates/objc2/src/topics/about_generated/cargo_features.md new file mode 100644 index 000000000..9fd7bfcf3 --- /dev/null +++ b/crates/objc2/src/topics/about_generated/cargo_features.md @@ -0,0 +1,43 @@ +# Cargo features in framework crates + +Each framework crate has a set of Cargo features that control which parts of +it that is enabled. These are split into two categories; file and dependency +features. + +This is quite important for compilation speed, but if you don't want to bother +with it, such as when just starting a new project and experimenting or when +running an example, use the `"all"` feature. + + +## File features + +Each framework C header corresponds to one Cargo feature, and everything that +was declared inside of that header is locked behind that Cargo feature. + +As an example, let's use `MetalKit`. This framework has four public C headers, +`MTKDefines.h`, `MTKModel.h`, `MTKTextureLoader.h` and `MTKView.h`. This in +turn means we get four Cargo features in `objc2-metal-kit`, +`MetalKit_MTKDefines`, `MetalKit_MTKModel`, `MetalKit_MTKTextureLoader` and +`MetalKit_MTKView`, that enables the functionality exposed by each of those +headers, as well as any required dependency features (e.g. `MTKModel.h` uses +`MTLDevice`, so `objc2-metal/Metal_MTLDevice` is enabled for you). + + +## Dependency features + +As you can see above, frameworks rarely stand alone, instead they often have +some sort of dependency on other frameworks. Some of these dependencies are +considered required, and enabled by default (often `objc2-foundation`), while +for some it makes sense to allow control of whether the dependency is enabled. + +Let's keep using `MetalKit` as the example. By default, `objc2-metal-kit` will +import the dependencies `objc2`, `objc2-foundation` and `objc2-metal`, since +those are central to how the `MetalKit` works. + +But it also has an optional dependency on `objc2-app-kit` and `block2`, since +those are not always required; in this case, `objc2-app-kit` is only needed if +you want to use the `MTKView` class, so it would be wasteful to enable the +dependency if you didn't need that class. + +Such optional dependencies can be enabled with Cargo features of the same name +as the dependency. diff --git a/crates/objc2/src/topics/about_generated/deref.md b/crates/objc2/src/topics/about_generated/deref.md new file mode 100644 index 000000000..770d3bbb4 --- /dev/null +++ b/crates/objc2/src/topics/about_generated/deref.md @@ -0,0 +1,23 @@ +# Use of `Deref` + +Framework crates uses the [`Deref`] trait in a bit special way: All objects +deref to their superclasses. For example, `NSMutableArray` derefs to +`NSArray`, which in turn derefs to `NSObject`. + +Note that this is explicitly recommended against in [the +documentation][`Deref`] and [the Rust Design patterns +book][anti-pattern-deref] (see those links for details). + +Due to Objective-C objects only ever being accessible behind pointers in +the first place, the problems stated there are less severe, and having the +implementation just means that everything is much nicer when you actually +want to use the objects! + +All objects also implement [`AsRef`] and [`AsMut`] to their superclass, +and can be used in [`Id::into_super`], so if you favour explicit +conversion, that is a possibility too. + +[`Deref`]: std::ops::Deref +[`ClassType`]: crate::ClassType +[anti-pattern-deref]: https://rust-unofficial.github.io/patterns/anti_patterns/deref.html +[`Id::into_super`]: crate::rc::Id::into_super diff --git a/crates/objc2/src/topics/about_generated/list.md b/crates/objc2/src/topics/about_generated/list.md new file mode 100644 index 000000000..1c6269bda --- /dev/null +++ b/crates/objc2/src/topics/about_generated/list.md @@ -0,0 +1,12 @@ +# List of framework crates + +The following is a full list of currently supported framework crates. + +See [#393] if the framework that you need is not here. Note that a lot of +frameworks are CoreFoundation-like, those are more difficult to support, see +[#556] for more information. + +[#393]: https://github.com/madsmtm/objc2/issues/393 +[#556]: https://github.com/madsmtm/objc2/issues/556 + + diff --git a/crates/objc2/src/topics/about_generated/list_data.md b/crates/objc2/src/topics/about_generated/list_data.md new file mode 100644 index 000000000..448797c48 --- /dev/null +++ b/crates/objc2/src/topics/about_generated/list_data.md @@ -0,0 +1,53 @@ +| Framework | Crate | Documentation | +| --- | --- | --- | +| `Accessibility` | [![`objc2-accessibility`](https://badgen.net/crates/v/objc2-accessibility)](https://crates.io/crates/objc2-accessibility) | [![docs.rs](https://docs.rs/objc2-accessibility/badge.svg)](https://docs.rs/objc2-accessibility/) | +| `AdServices` | [![`objc2-ad-services`](https://badgen.net/crates/v/objc2-ad-services)](https://crates.io/crates/objc2-ad-services) | [![docs.rs](https://docs.rs/objc2-ad-services/badge.svg)](https://docs.rs/objc2-ad-services/) | +| `AdSupport` | [![`objc2-ad-support`](https://badgen.net/crates/v/objc2-ad-support)](https://crates.io/crates/objc2-ad-support) | [![docs.rs](https://docs.rs/objc2-ad-support/badge.svg)](https://docs.rs/objc2-ad-support/) | +| `AppKit` | [![`objc2-app-kit`](https://badgen.net/crates/v/objc2-app-kit)](https://crates.io/crates/objc2-app-kit) | [![docs.rs](https://docs.rs/objc2-app-kit/badge.svg)](https://docs.rs/objc2-app-kit/) | +| `AuthenticationServices` | [![`objc2-authentication-services`](https://badgen.net/crates/v/objc2-authentication-services)](https://crates.io/crates/objc2-authentication-services) | [![docs.rs](https://docs.rs/objc2-authentication-services/badge.svg)](https://docs.rs/objc2-authentication-services/) | +| `AutomaticAssessmentConfiguration` | [![`objc2-automatic-assessment-configuration`](https://badgen.net/crates/v/objc2-automatic-assessment-configuration)](https://crates.io/crates/objc2-automatic-assessment-configuration) | [![docs.rs](https://docs.rs/objc2-automatic-assessment-configuration/badge.svg)](https://docs.rs/objc2-automatic-assessment-configuration/) | +| `Automator` | [![`objc2-automator`](https://badgen.net/crates/v/objc2-automator)](https://crates.io/crates/objc2-automator) | [![docs.rs](https://docs.rs/objc2-automator/badge.svg)](https://docs.rs/objc2-automator/) | +| `BackgroundAssets` | [![`objc2-background-assets`](https://badgen.net/crates/v/objc2-background-assets)](https://crates.io/crates/objc2-background-assets) | [![docs.rs](https://docs.rs/objc2-background-assets/badge.svg)](https://docs.rs/objc2-background-assets/) | +| `BackgroundTasks` | [![`objc2-background-tasks`](https://badgen.net/crates/v/objc2-background-tasks)](https://crates.io/crates/objc2-background-tasks) | [![docs.rs](https://docs.rs/objc2-background-tasks/badge.svg)](https://docs.rs/objc2-background-tasks/) | +| `BusinessChat` | [![`objc2-business-chat`](https://badgen.net/crates/v/objc2-business-chat)](https://crates.io/crates/objc2-business-chat) | [![docs.rs](https://docs.rs/objc2-business-chat/badge.svg)](https://docs.rs/objc2-business-chat/) | +| `CallKit` | [![`objc2-call-kit`](https://badgen.net/crates/v/objc2-call-kit)](https://crates.io/crates/objc2-call-kit) | [![docs.rs](https://docs.rs/objc2-call-kit/badge.svg)](https://docs.rs/objc2-call-kit/) | +| `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/) | +| `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/) | +| `CoreData` | [![`objc2-core-data`](https://badgen.net/crates/v/objc2-core-data)](https://crates.io/crates/objc2-core-data) | [![docs.rs](https://docs.rs/objc2-core-data/badge.svg)](https://docs.rs/objc2-core-data/) | +| `CoreLocation` | [![`objc2-core-location`](https://badgen.net/crates/v/objc2-core-location)](https://crates.io/crates/objc2-core-location) | [![docs.rs](https://docs.rs/objc2-core-location/badge.svg)](https://docs.rs/objc2-core-location/) | +| `CoreWLAN` | [![`objc2-core-wlan`](https://badgen.net/crates/v/objc2-core-wlan)](https://crates.io/crates/objc2-core-wlan) | [![docs.rs](https://docs.rs/objc2-core-wlan/badge.svg)](https://docs.rs/objc2-core-wlan/) | +| `DataDetection` | [![`objc2-data-detection`](https://badgen.net/crates/v/objc2-data-detection)](https://crates.io/crates/objc2-data-detection) | [![docs.rs](https://docs.rs/objc2-data-detection/badge.svg)](https://docs.rs/objc2-data-detection/) | +| `DeviceCheck` | [![`objc2-device-check`](https://badgen.net/crates/v/objc2-device-check)](https://crates.io/crates/objc2-device-check) | [![docs.rs](https://docs.rs/objc2-device-check/badge.svg)](https://docs.rs/objc2-device-check/) | +| `EventKit` | [![`objc2-event-kit`](https://badgen.net/crates/v/objc2-event-kit)](https://crates.io/crates/objc2-event-kit) | [![docs.rs](https://docs.rs/objc2-event-kit/badge.svg)](https://docs.rs/objc2-event-kit/) | +| `ExceptionHandling` | [![`objc2-exception-handling`](https://badgen.net/crates/v/objc2-exception-handling)](https://crates.io/crates/objc2-exception-handling) | [![docs.rs](https://docs.rs/objc2-exception-handling/badge.svg)](https://docs.rs/objc2-exception-handling/) | +| `ExtensionKit` | [![`objc2-extension-kit`](https://badgen.net/crates/v/objc2-extension-kit)](https://crates.io/crates/objc2-extension-kit) | [![docs.rs](https://docs.rs/objc2-extension-kit/badge.svg)](https://docs.rs/objc2-extension-kit/) | +| `ExternalAccessory` | [![`objc2-external-accessory`](https://badgen.net/crates/v/objc2-external-accessory)](https://crates.io/crates/objc2-external-accessory) | [![docs.rs](https://docs.rs/objc2-external-accessory/badge.svg)](https://docs.rs/objc2-external-accessory/) | +| `FileProvider` | [![`objc2-file-provider`](https://badgen.net/crates/v/objc2-file-provider)](https://crates.io/crates/objc2-file-provider) | [![docs.rs](https://docs.rs/objc2-file-provider/badge.svg)](https://docs.rs/objc2-file-provider/) | +| `FileProviderUI` | [![`objc2-file-provider-ui`](https://badgen.net/crates/v/objc2-file-provider-ui)](https://crates.io/crates/objc2-file-provider-ui) | [![docs.rs](https://docs.rs/objc2-file-provider-ui/badge.svg)](https://docs.rs/objc2-file-provider-ui/) | +| `Foundation` | [![`objc2-foundation`](https://badgen.net/crates/v/objc2-foundation)](https://crates.io/crates/objc2-foundation) | [![docs.rs](https://docs.rs/objc2-foundation/badge.svg)](https://docs.rs/objc2-foundation/) | +| `GameController` | [![`objc2-game-controller`](https://badgen.net/crates/v/objc2-game-controller)](https://crates.io/crates/objc2-game-controller) | [![docs.rs](https://docs.rs/objc2-game-controller/badge.svg)](https://docs.rs/objc2-game-controller/) | +| `GameKit` | [![`objc2-game-kit`](https://badgen.net/crates/v/objc2-game-kit)](https://crates.io/crates/objc2-game-kit) | [![docs.rs](https://docs.rs/objc2-game-kit/badge.svg)](https://docs.rs/objc2-game-kit/) | +| `HealthKit` | [![`objc2-health-kit`](https://badgen.net/crates/v/objc2-health-kit)](https://crates.io/crates/objc2-health-kit) | [![docs.rs](https://docs.rs/objc2-health-kit/badge.svg)](https://docs.rs/objc2-health-kit/) | +| `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/) | +| `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/) | +| `LinkPresentation` | [![`objc2-link-presentation`](https://badgen.net/crates/v/objc2-link-presentation)](https://crates.io/crates/objc2-link-presentation) | [![docs.rs](https://docs.rs/objc2-link-presentation/badge.svg)](https://docs.rs/objc2-link-presentation/) | +| `LocalAuthentication` | [![`objc2-local-authentication`](https://badgen.net/crates/v/objc2-local-authentication)](https://crates.io/crates/objc2-local-authentication) | [![docs.rs](https://docs.rs/objc2-local-authentication/badge.svg)](https://docs.rs/objc2-local-authentication/) | +| `LocalAuthenticationEmbeddedUI` | [![`objc2-local-authentication-embedded-ui`](https://badgen.net/crates/v/objc2-local-authentication-embedded-ui)](https://crates.io/crates/objc2-local-authentication-embedded-ui) | [![docs.rs](https://docs.rs/objc2-local-authentication-embedded-ui/badge.svg)](https://docs.rs/objc2-local-authentication-embedded-ui/) | +| `MailKit` | [![`objc2-mail-kit`](https://badgen.net/crates/v/objc2-mail-kit)](https://crates.io/crates/objc2-mail-kit) | [![docs.rs](https://docs.rs/objc2-mail-kit/badge.svg)](https://docs.rs/objc2-mail-kit/) | +| `MapKit` | [![`objc2-map-kit`](https://badgen.net/crates/v/objc2-map-kit)](https://crates.io/crates/objc2-map-kit) | [![docs.rs](https://docs.rs/objc2-map-kit/badge.svg)](https://docs.rs/objc2-map-kit/) | +| `MediaPlayer` | [![`objc2-media-player`](https://badgen.net/crates/v/objc2-media-player)](https://crates.io/crates/objc2-media-player) | [![docs.rs](https://docs.rs/objc2-media-player/badge.svg)](https://docs.rs/objc2-media-player/) | +| `Metal` | [![`objc2-metal`](https://badgen.net/crates/v/objc2-metal)](https://crates.io/crates/objc2-metal) | [![docs.rs](https://docs.rs/objc2-metal/badge.svg)](https://docs.rs/objc2-metal/) | +| `MetalFX` | [![`objc2-metal-fx`](https://badgen.net/crates/v/objc2-metal-fx)](https://crates.io/crates/objc2-metal-fx) | [![docs.rs](https://docs.rs/objc2-metal-fx/badge.svg)](https://docs.rs/objc2-metal-fx/) | +| `MetalKit` | [![`objc2-metal-kit`](https://badgen.net/crates/v/objc2-metal-kit)](https://crates.io/crates/objc2-metal-kit) | [![docs.rs](https://docs.rs/objc2-metal-kit/badge.svg)](https://docs.rs/objc2-metal-kit/) | +| `MetricKit` | [![`objc2-metric-kit`](https://badgen.net/crates/v/objc2-metric-kit)](https://crates.io/crates/objc2-metric-kit) | [![docs.rs](https://docs.rs/objc2-metric-kit/badge.svg)](https://docs.rs/objc2-metric-kit/) | +| `OSAKit` | [![`objc2-osa-kit`](https://badgen.net/crates/v/objc2-osa-kit)](https://crates.io/crates/objc2-osa-kit) | [![docs.rs](https://docs.rs/objc2-osa-kit/badge.svg)](https://docs.rs/objc2-osa-kit/) | +| `Photos` | [![`objc2-photos`](https://badgen.net/crates/v/objc2-photos)](https://crates.io/crates/objc2-photos) | [![docs.rs](https://docs.rs/objc2-photos/badge.svg)](https://docs.rs/objc2-photos/) | +| `QuartzCore` | [![`objc2-quartz-core`](https://badgen.net/crates/v/objc2-quartz-core)](https://crates.io/crates/objc2-quartz-core) | [![docs.rs](https://docs.rs/objc2-quartz-core/badge.svg)](https://docs.rs/objc2-quartz-core/) | +| `ServiceManagement` | [![`objc2-service-management`](https://badgen.net/crates/v/objc2-service-management)](https://crates.io/crates/objc2-service-management) | [![docs.rs](https://docs.rs/objc2-service-management/badge.svg)](https://docs.rs/objc2-service-management/) | +| `SoundAnalysis` | [![`objc2-sound-analysis`](https://badgen.net/crates/v/objc2-sound-analysis)](https://crates.io/crates/objc2-sound-analysis) | [![docs.rs](https://docs.rs/objc2-sound-analysis/badge.svg)](https://docs.rs/objc2-sound-analysis/) | +| `Speech` | [![`objc2-speech`](https://badgen.net/crates/v/objc2-speech)](https://crates.io/crates/objc2-speech) | [![docs.rs](https://docs.rs/objc2-speech/badge.svg)](https://docs.rs/objc2-speech/) | +| `StoreKit` | [![`objc2-store-kit`](https://badgen.net/crates/v/objc2-store-kit)](https://crates.io/crates/objc2-store-kit) | [![docs.rs](https://docs.rs/objc2-store-kit/badge.svg)](https://docs.rs/objc2-store-kit/) | +| `UniformTypeIdentifiers` | [![`objc2-uniform-type-identifiers`](https://badgen.net/crates/v/objc2-uniform-type-identifiers)](https://crates.io/crates/objc2-uniform-type-identifiers) | [![docs.rs](https://docs.rs/objc2-uniform-type-identifiers/badge.svg)](https://docs.rs/objc2-uniform-type-identifiers/) | +| `UserNotifications` | [![`objc2-user-notifications`](https://badgen.net/crates/v/objc2-user-notifications)](https://crates.io/crates/objc2-user-notifications) | [![docs.rs](https://docs.rs/objc2-user-notifications/badge.svg)](https://docs.rs/objc2-user-notifications/) | +| `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/objc2/src/topics/about_generated/mod.rs b/crates/objc2/src/topics/about_generated/mod.rs new file mode 100644 index 000000000..f87e6f8ad --- /dev/null +++ b/crates/objc2/src/topics/about_generated/mod.rs @@ -0,0 +1,14 @@ +#![doc = include_str!("README.md")] + +#[doc = include_str!("deref.md")] +pub mod deref {} + +#[doc = include_str!("list.md")] +#[doc = include_str!("list_data.md")] +pub mod list {} + +#[doc = include_str!("CHANGELOG.md")] +pub mod changelog {} + +#[doc = include_str!("cargo_features.md")] +pub mod cargo_features {} diff --git a/crates/objc2/src/topics/layered_safety.md b/crates/objc2/src/topics/layered_safety.md index d7a973a79..b0932e7d2 100644 --- a/crates/objc2/src/topics/layered_safety.md +++ b/crates/objc2/src/topics/layered_safety.md @@ -4,24 +4,26 @@ Objective-C is different from Rust[citation needed]. In particular, Rust has a concept of "safety" (see the [nomicon] for details), which Objective-C completely lacks. -You will find when using `icrate` that basically everything (that has not been -manually audited) is `unsafe`. So you might rightfully ask: What's the point -then? Can't I just use `msg_send!`, and save the extra dependency? -Yes, you could, but in fact `icrate` is much safer than doing method calling -manually, even though you may end up writing `unsafe` just as many times. I -dub this "layered safety"1 to capture the fact that _not all usage -of `unsafe` is created equally_! - -Simply put, when using an `unsafe` method in `icrate`, you have to ensure the -compiler of much fewer things than when doing method calling manually. +You will find when using the framework crates that basically everything (that +has not been manually audited) is `unsafe`. So you might rightfully ask: +What's the point then? Can't I just use `msg_send!`, and save the extra +dependency? +Yes, you could, but in fact the framework crates are much safer than doing +method calling manually, even though you may end up writing `unsafe` just as +many times. I dub this "layered safety"1 to capture the fact that +_not all usage of `unsafe` is created equally_! + +Simply put, when using an `unsafe` method in e.g. `objc2-foundation`, you have +to ensure the compiler of much fewer things than when doing method calling +manually. To see why this is the case, let me guide you through the various abstraction -layers that `icrate` and `objc2` provide, and we'll see how each step makes -things safer! +layers that the framework crates and `objc2` provide, and we'll see how each +step makes things safer! -`icrate` is not perfect, and there may be cases where you have to drop down -into lower-level details; luckily though, the fact that we have this layered -architecture with each step exposed along the way allows you to do exactly -that! +The framework crates are not perfect though, and there may be cases where you +have to drop down into lower-level details; luckily though, the fact that we +have this layered architecture with each step exposed along the way allows you +to do exactly that! 1: I haven't heard this concept named before, if you know of prior art on this please let me know. @@ -230,7 +232,7 @@ let length = obj.length(); ``` -## Layer 5: `icrate` +## Layer 5: Framework crates Apple has a _lot_ of Objective-C code, and manually defining an interface to all of it would take a lifetime. Especially keeping track of which methods are @@ -246,7 +248,7 @@ that it is correct! The `NSData` example again. ```rust, ignore -use icrate::Foundation::NSData; +use objc2_foundation::NSData; let obj = NSData::new(); let length = obj.length(); diff --git a/crates/objc2/src/topics/mod.rs b/crates/objc2/src/topics/mod.rs index a023f6b01..b6585f9ac 100644 --- a/crates/objc2/src/topics/mod.rs +++ b/crates/objc2/src/topics/mod.rs @@ -1,4 +1,6 @@ //! Various explanations and topics of discussion. +pub mod about_generated; + #[doc = include_str!("layered_safety.md")] pub mod layered_safety {} diff --git a/crates/objc2/tests/macros_mainthreadmarker.rs b/crates/objc2/tests/macros_mainthreadmarker.rs index 488ba02d0..cf56c8f80 100644 --- a/crates/objc2/tests/macros_mainthreadmarker.rs +++ b/crates/objc2/tests/macros_mainthreadmarker.rs @@ -48,7 +48,7 @@ declare_class!( unsafe impl NSObjectProtocol for Cls {} // The macro does a textual match; but when users actually use -// `icrate::Foundation::MainThreadMarker` to ensure soundness, they will not +// `objc2_foundation::MainThreadMarker` to ensure soundness, they will not // do this! #[derive(Clone, Copy)] struct MainThreadMarker { diff --git a/crates/test-assembly/crates/test_declare_class/Cargo.toml b/crates/test-assembly/crates/test_declare_class/Cargo.toml index ddfad0fcc..51bb32a76 100644 --- a/crates/test-assembly/crates/test_declare_class/Cargo.toml +++ b/crates/test-assembly/crates/test_declare_class/Cargo.toml @@ -9,21 +9,20 @@ path = "lib.rs" [dependencies] objc2 = { path = "../../../objc2", default-features = false, optional = true } -icrate = { path = "../../../icrate", default-features = false, optional = true } +objc2-foundation = { path = "../../../../framework-crates/objc2-foundation", default-features = false, optional = true } [features] -default = ["apple", "std", "Foundation", "Foundation_all"] -std = ["icrate?/std", "icrate?/std"] +default = ["apple", "std", "all", "objc2", "objc2-foundation"] +std = ["objc2?/std", "objc2-foundation?/std"] # Runtime -apple = ["objc2", "icrate", "icrate?/apple"] -gnustep-1-7 = ["icrate?/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "icrate?/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "icrate?/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "icrate?/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "icrate?/gnustep-2-1"] +apple = ["objc2?/apple", "objc2-foundation?/apple"] +gnustep-1-7 = ["objc2?/gnustep-1-7", "objc2-foundation?/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2?/gnustep-1-8", "objc2-foundation?/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2?/gnustep-1-9", "objc2-foundation?/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2?/gnustep-2-0", "objc2-foundation?/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2?/gnustep-2-1", "objc2-foundation?/gnustep-2-1"] -Foundation = ["icrate?/Foundation"] -Foundation_all = ["icrate?/Foundation_NSObject", "icrate?/Foundation_NSZone"] +all = ["objc2-foundation?/block2", "objc2-foundation?/Foundation_NSObject", "objc2-foundation?/Foundation_NSZone"] # Hack to prevent the feature flag from being enabled in the entire project -assembly-features = ["objc2?/unstable-static-sel-inlined", "objc2?/unstable-static-class-inlined"] +assembly-features = ["all", "objc2?/unstable-static-sel-inlined", "objc2?/unstable-static-class-inlined"] diff --git a/crates/test-assembly/crates/test_declare_class/expected/apple-aarch64.s b/crates/test-assembly/crates/test_declare_class/expected/apple-aarch64.s index 15df3cd19..a9c00a2a6 100644 --- a/crates/test-assembly/crates/test_declare_class/expected/apple-aarch64.s +++ b/crates/test-assembly/crates/test_declare_class/expected/apple-aarch64.s @@ -86,9 +86,9 @@ Lloh11: cbz x0, LBB4_8 str x0, [sp, #8] Lloh12: - adrp x8, L_OBJC_SELECTOR_REFERENCES_03fd85b0462f54e9@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_8133d8db0dbd5a6c@PAGE Lloh13: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_03fd85b0462f54e9@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_8133d8db0dbd5a6c@PAGEOFF] Lloh14: adrp x19, l_anon.[ID].3@PAGE Lloh15: @@ -106,9 +106,9 @@ Lloh19: mov x3, #0 bl SYM(objc2::runtime::declare::ClassBuilder::add_class_method_inner::GENERATED_ID, 0) Lloh20: - adrp x8, L_OBJC_SELECTOR_REFERENCES_cf773331f3cfba54@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_4ba7d4eed2507268@PAGE Lloh21: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_cf773331f3cfba54@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_4ba7d4eed2507268@PAGEOFF] Lloh22: adrp x4, l_anon.[ID].5@PAGE Lloh23: @@ -122,9 +122,9 @@ Lloh25: mov x3, #0 bl SYM(objc2::runtime::declare::ClassBuilder::add_method_inner::GENERATED_ID, 0) Lloh26: - adrp x8, L_OBJC_SELECTOR_REFERENCES_abdcbb85641cd990@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_5fec96f298828442@PAGE Lloh27: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_abdcbb85641cd990@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_5fec96f298828442@PAGEOFF] Lloh28: adrp x20, l_anon.[ID].6@PAGE Lloh29: @@ -139,9 +139,9 @@ Lloh31: mov x4, x20 bl SYM(objc2::runtime::declare::ClassBuilder::add_method_inner::GENERATED_ID, 0) Lloh32: - adrp x8, L_OBJC_SELECTOR_REFERENCES_ef8de92414f2d9c8@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_42dbb7df8d4c487f@PAGE Lloh33: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_ef8de92414f2d9c8@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_42dbb7df8d4c487f@PAGEOFF] Lloh34: adrp x21, l_anon.[ID].4@PAGE Lloh35: @@ -156,9 +156,9 @@ Lloh37: mov x4, x21 bl SYM(objc2::runtime::declare::ClassBuilder::add_method_inner::GENERATED_ID, 0) Lloh38: - adrp x8, L_OBJC_SELECTOR_REFERENCES_4a611090161f3fae@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_ce9d002a68dcdd8d@PAGE Lloh39: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_4a611090161f3fae@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_ce9d002a68dcdd8d@PAGEOFF] Lloh40: adrp x5, _method_id_with_param@PAGE Lloh41: @@ -191,9 +191,9 @@ Lloh45: bl SYM(objc2::runtime::declare::ClassBuilder::add_protocol::GENERATED_ID, 0) LBB4_6: Lloh46: - adrp x8, L_OBJC_SELECTOR_REFERENCES_2837f061c311eb14@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_1854be99a3992537@PAGE Lloh47: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_2837f061c311eb14@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_1854be99a3992537@PAGEOFF] Lloh48: adrp x2, l_anon.[ID].9@PAGE Lloh49: @@ -1045,9 +1045,9 @@ LBB23_2: stp x29, x30, [sp, #16] add x29, sp, #16 Lloh218: - adrp x8, L_OBJC_SELECTOR_REFERENCES_af8966656b8b2b6c@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_3f2e1585b90fd3ca@PAGE Lloh219: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_af8966656b8b2b6c@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_3f2e1585b90fd3ca@PAGEOFF] Lloh220: adrp x8, L_OBJC_CLASSLIST_REFERENCES_$_NSObject@GOTPAGE Lloh221: @@ -1149,9 +1149,9 @@ LBB25_2: bl _objc_release LBB25_3: Lloh237: - adrp x8, L_OBJC_SELECTOR_REFERENCES_6edddcebbded8f32@PAGE + adrp x8, L_OBJC_SELECTOR_REFERENCES_7cd02e622fff4e1e@PAGE Lloh238: - ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_6edddcebbded8f32@PAGEOFF] + ldr x1, [x8, L_OBJC_SELECTOR_REFERENCES_7cd02e622fff4e1e@PAGEOFF] Lloh239: adrp x8, L_OBJC_CLASSLIST_REFERENCES_$_NSObject@GOTPAGE Lloh240: @@ -1306,105 +1306,105 @@ l_anon.[ID].24: .ascii "NSCopying" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_03fd85b0462f54e9 -L_OBJC_METH_VAR_NAME_03fd85b0462f54e9: + .globl L_OBJC_METH_VAR_NAME_8133d8db0dbd5a6c +L_OBJC_METH_VAR_NAME_8133d8db0dbd5a6c: .asciz "classMethod" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_03fd85b0462f54e9 + .globl L_OBJC_SELECTOR_REFERENCES_8133d8db0dbd5a6c .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_03fd85b0462f54e9: - .quad L_OBJC_METH_VAR_NAME_03fd85b0462f54e9 +L_OBJC_SELECTOR_REFERENCES_8133d8db0dbd5a6c: + .quad L_OBJC_METH_VAR_NAME_8133d8db0dbd5a6c .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_03fd85b0462f54e9 + .globl L_OBJC_IMAGE_INFO_8133d8db0dbd5a6c .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_03fd85b0462f54e9: +L_OBJC_IMAGE_INFO_8133d8db0dbd5a6c: .asciz "\000\000\000\000@\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_cf773331f3cfba54 -L_OBJC_METH_VAR_NAME_cf773331f3cfba54: + .globl L_OBJC_METH_VAR_NAME_4ba7d4eed2507268 +L_OBJC_METH_VAR_NAME_4ba7d4eed2507268: .asciz "method" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_cf773331f3cfba54 + .globl L_OBJC_SELECTOR_REFERENCES_4ba7d4eed2507268 .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_cf773331f3cfba54: - .quad L_OBJC_METH_VAR_NAME_cf773331f3cfba54 +L_OBJC_SELECTOR_REFERENCES_4ba7d4eed2507268: + .quad L_OBJC_METH_VAR_NAME_4ba7d4eed2507268 .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_cf773331f3cfba54 + .globl L_OBJC_IMAGE_INFO_4ba7d4eed2507268 .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_cf773331f3cfba54: +L_OBJC_IMAGE_INFO_4ba7d4eed2507268: .asciz "\000\000\000\000@\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_abdcbb85641cd990 -L_OBJC_METH_VAR_NAME_abdcbb85641cd990: + .globl L_OBJC_METH_VAR_NAME_5fec96f298828442 +L_OBJC_METH_VAR_NAME_5fec96f298828442: .asciz "methodBool:" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_abdcbb85641cd990 + .globl L_OBJC_SELECTOR_REFERENCES_5fec96f298828442 .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_abdcbb85641cd990: - .quad L_OBJC_METH_VAR_NAME_abdcbb85641cd990 +L_OBJC_SELECTOR_REFERENCES_5fec96f298828442: + .quad L_OBJC_METH_VAR_NAME_5fec96f298828442 .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_abdcbb85641cd990 + .globl L_OBJC_IMAGE_INFO_5fec96f298828442 .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_abdcbb85641cd990: +L_OBJC_IMAGE_INFO_5fec96f298828442: .asciz "\000\000\000\000@\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_ef8de92414f2d9c8 -L_OBJC_METH_VAR_NAME_ef8de92414f2d9c8: + .globl L_OBJC_METH_VAR_NAME_42dbb7df8d4c487f +L_OBJC_METH_VAR_NAME_42dbb7df8d4c487f: .asciz "methodId" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_ef8de92414f2d9c8 + .globl L_OBJC_SELECTOR_REFERENCES_42dbb7df8d4c487f .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_ef8de92414f2d9c8: - .quad L_OBJC_METH_VAR_NAME_ef8de92414f2d9c8 +L_OBJC_SELECTOR_REFERENCES_42dbb7df8d4c487f: + .quad L_OBJC_METH_VAR_NAME_42dbb7df8d4c487f .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_ef8de92414f2d9c8 + .globl L_OBJC_IMAGE_INFO_42dbb7df8d4c487f .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_ef8de92414f2d9c8: +L_OBJC_IMAGE_INFO_42dbb7df8d4c487f: .asciz "\000\000\000\000@\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_4a611090161f3fae -L_OBJC_METH_VAR_NAME_4a611090161f3fae: + .globl L_OBJC_METH_VAR_NAME_ce9d002a68dcdd8d +L_OBJC_METH_VAR_NAME_ce9d002a68dcdd8d: .asciz "methodIdWithParam:" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_4a611090161f3fae + .globl L_OBJC_SELECTOR_REFERENCES_ce9d002a68dcdd8d .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_4a611090161f3fae: - .quad L_OBJC_METH_VAR_NAME_4a611090161f3fae +L_OBJC_SELECTOR_REFERENCES_ce9d002a68dcdd8d: + .quad L_OBJC_METH_VAR_NAME_ce9d002a68dcdd8d .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_4a611090161f3fae + .globl L_OBJC_IMAGE_INFO_ce9d002a68dcdd8d .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_4a611090161f3fae: +L_OBJC_IMAGE_INFO_ce9d002a68dcdd8d: .asciz "\000\000\000\000@\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_2837f061c311eb14 -L_OBJC_METH_VAR_NAME_2837f061c311eb14: + .globl L_OBJC_METH_VAR_NAME_1854be99a3992537 +L_OBJC_METH_VAR_NAME_1854be99a3992537: .asciz "copyWithZone:" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_2837f061c311eb14 + .globl L_OBJC_SELECTOR_REFERENCES_1854be99a3992537 .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_2837f061c311eb14: - .quad L_OBJC_METH_VAR_NAME_2837f061c311eb14 +L_OBJC_SELECTOR_REFERENCES_1854be99a3992537: + .quad L_OBJC_METH_VAR_NAME_1854be99a3992537 .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_2837f061c311eb14 + .globl L_OBJC_IMAGE_INFO_1854be99a3992537 .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_2837f061c311eb14: +L_OBJC_IMAGE_INFO_1854be99a3992537: .asciz "\000\000\000\000@\000\000" .globl SYM(test_declare_class[CRATE_ID]::_::__OBJC2_IVAR_OFFSET, 1) @@ -1418,20 +1418,20 @@ l_anon.[ID].25: .asciz "5\000\000\000\000\000\000\000O\000\000\000\001\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_af8966656b8b2b6c -L_OBJC_METH_VAR_NAME_af8966656b8b2b6c: + .globl L_OBJC_METH_VAR_NAME_3f2e1585b90fd3ca +L_OBJC_METH_VAR_NAME_3f2e1585b90fd3ca: .asciz "init" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_af8966656b8b2b6c + .globl L_OBJC_SELECTOR_REFERENCES_3f2e1585b90fd3ca .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_af8966656b8b2b6c: - .quad L_OBJC_METH_VAR_NAME_af8966656b8b2b6c +L_OBJC_SELECTOR_REFERENCES_3f2e1585b90fd3ca: + .quad L_OBJC_METH_VAR_NAME_3f2e1585b90fd3ca .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_af8966656b8b2b6c + .globl L_OBJC_IMAGE_INFO_3f2e1585b90fd3ca .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_af8966656b8b2b6c: +L_OBJC_IMAGE_INFO_3f2e1585b90fd3ca: .asciz "\000\000\000\000@\000\000" .globl SYM(test_declare_class[CRATE_ID]::_::__OBJC2_IVAR_OFFSET, 0) @@ -1445,20 +1445,20 @@ l_anon.[ID].26: .asciz "5\000\000\000\000\000\000\000x\000\000\000\001\000\000" .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_6edddcebbded8f32 -L_OBJC_METH_VAR_NAME_6edddcebbded8f32: + .globl L_OBJC_METH_VAR_NAME_7cd02e622fff4e1e +L_OBJC_METH_VAR_NAME_7cd02e622fff4e1e: .asciz "init" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_6edddcebbded8f32 + .globl L_OBJC_SELECTOR_REFERENCES_7cd02e622fff4e1e .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_6edddcebbded8f32: - .quad L_OBJC_METH_VAR_NAME_6edddcebbded8f32 +L_OBJC_SELECTOR_REFERENCES_7cd02e622fff4e1e: + .quad L_OBJC_METH_VAR_NAME_7cd02e622fff4e1e .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_6edddcebbded8f32 + .globl L_OBJC_IMAGE_INFO_7cd02e622fff4e1e .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_6edddcebbded8f32: +L_OBJC_IMAGE_INFO_7cd02e622fff4e1e: .asciz "\000\000\000\000@\000\000" .zerofill __DATA,__bss,__MergedGlobals,48,3 diff --git a/crates/test-assembly/crates/test_declare_class/expected/apple-x86_64.s b/crates/test-assembly/crates/test_declare_class/expected/apple-x86_64.s index 601bbc48b..38354bbde 100644 --- a/crates/test-assembly/crates/test_declare_class/expected/apple-x86_64.s +++ b/crates/test-assembly/crates/test_declare_class/expected/apple-x86_64.s @@ -83,7 +83,7 @@ SYM(::call_once::<::call_once::<::call_once::<::call_once::<::class::REGISTER_CLASS, 0),8,3 .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_af8966656b8b2b6c -L_OBJC_METH_VAR_NAME_af8966656b8b2b6c: + .globl L_OBJC_METH_VAR_NAME_3f2e1585b90fd3ca +L_OBJC_METH_VAR_NAME_3f2e1585b90fd3ca: .asciz "init" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_af8966656b8b2b6c + .globl L_OBJC_SELECTOR_REFERENCES_3f2e1585b90fd3ca .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_af8966656b8b2b6c: - .quad L_OBJC_METH_VAR_NAME_af8966656b8b2b6c +L_OBJC_SELECTOR_REFERENCES_3f2e1585b90fd3ca: + .quad L_OBJC_METH_VAR_NAME_3f2e1585b90fd3ca .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_af8966656b8b2b6c + .globl L_OBJC_IMAGE_INFO_3f2e1585b90fd3ca .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_af8966656b8b2b6c: +L_OBJC_IMAGE_INFO_3f2e1585b90fd3ca: .asciz "\000\000\000\000@\000\000" .zerofill __DATA,__bss,SYM(test_declare_class[CRATE_ID]::_::__OBJC2_CLASS, 1).0,8,3 @@ -1012,20 +1012,20 @@ l_anon.[ID].26: .zerofill __DATA,__bss,SYM(::class::REGISTER_CLASS, 0),8,3 .section __TEXT,__objc_methname,cstring_literals - .globl L_OBJC_METH_VAR_NAME_6edddcebbded8f32 -L_OBJC_METH_VAR_NAME_6edddcebbded8f32: + .globl L_OBJC_METH_VAR_NAME_7cd02e622fff4e1e +L_OBJC_METH_VAR_NAME_7cd02e622fff4e1e: .asciz "init" .section __DATA,__objc_selrefs,literal_pointers,no_dead_strip - .globl L_OBJC_SELECTOR_REFERENCES_6edddcebbded8f32 + .globl L_OBJC_SELECTOR_REFERENCES_7cd02e622fff4e1e .p2align 3, 0x0 -L_OBJC_SELECTOR_REFERENCES_6edddcebbded8f32: - .quad L_OBJC_METH_VAR_NAME_6edddcebbded8f32 +L_OBJC_SELECTOR_REFERENCES_7cd02e622fff4e1e: + .quad L_OBJC_METH_VAR_NAME_7cd02e622fff4e1e .section __DATA,__objc_imageinfo,regular,no_dead_strip - .globl L_OBJC_IMAGE_INFO_6edddcebbded8f32 + .globl L_OBJC_IMAGE_INFO_7cd02e622fff4e1e .p2align 2, 0x0 -L_OBJC_IMAGE_INFO_6edddcebbded8f32: +L_OBJC_IMAGE_INFO_7cd02e622fff4e1e: .asciz "\000\000\000\000@\000\000" .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_declare_class/lib.rs b/crates/test-assembly/crates/test_declare_class/lib.rs index e65c67d18..3fef23cf9 100644 --- a/crates/test-assembly/crates/test_declare_class/lib.rs +++ b/crates/test-assembly/crates/test_declare_class/lib.rs @@ -6,10 +6,10 @@ #![cfg(target_pointer_width = "64")] use core::ptr; -use icrate::Foundation::{NSCopying, NSObject, NSObjectProtocol, NSZone}; use objc2::rc::{Allocated, Id}; use objc2::runtime::AnyClass; use objc2::{declare_class, msg_send_id, mutability, ClassType, DeclaredClass}; +use objc2_foundation::{NSCopying, NSObject, NSObjectProtocol, NSZone}; declare_class!( #[no_mangle] diff --git a/crates/test-assembly/crates/test_fast_enumeration/Cargo.toml b/crates/test-assembly/crates/test_fast_enumeration/Cargo.toml index c8d398be9..fa9486fa1 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/Cargo.toml +++ b/crates/test-assembly/crates/test_fast_enumeration/Cargo.toml @@ -8,23 +8,22 @@ publish = false path = "lib.rs" [dependencies] -objc2 = { path = "../../../objc2", default-features = false, optional = true } -icrate = { path = "../../../icrate", default-features = false, optional = true } +objc2 = { path = "../../../objc2", default-features = false } +objc2-foundation = { path = "../../../../framework-crates/objc2-foundation", default-features = false } [features] -default = ["apple", "std", "icrate", "objc2", "Foundation", "Foundation_NSArray"] -std = ["icrate?/std"] +default = ["apple", "std", "all"] +std = ["objc2-foundation/std"] # Runtime -apple = ["icrate?/apple"] -gnustep-1-7 = ["icrate?/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "icrate?/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "icrate?/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "icrate?/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "icrate?/gnustep-2-1"] +apple = ["objc2-foundation/apple"] +gnustep-1-7 = ["objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2-foundation/gnustep-2-1"] -Foundation = ["icrate/Foundation"] -Foundation_NSArray = ["icrate/Foundation_NSArray"] +all = ["objc2-foundation/block2", "objc2-foundation/Foundation_NSEnumerator", "objc2-foundation/Foundation_NSArray"] # Hack -assembly-features = ["Foundation", "Foundation_NSArray", "objc2"] # "objc2?/unstable-static-sel-inlined" +assembly-features = ["all"] # "objc2/unstable-static-sel-inlined" diff --git a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-aarch64.s b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-aarch64.s index 88a2eb34f..3ab1e70c0 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-aarch64.s +++ b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-aarch64.s @@ -31,9 +31,9 @@ _iter_once: b.lo LBB1_3 ldr x0, [x19] Lloh0: - adrp x8, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE + adrp x8, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE Lloh1: - ldr x8, [x8, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] + ldr x8, [x8, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] ldr x1, [x8] cbz x1, LBB1_5 LBB1_2: @@ -107,9 +107,9 @@ Lloh4: Lloh5: add x19, x19, l_anon.[ID].0@PAGEOFF Lloh6: - adrp x20, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE + adrp x20, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE Lloh7: - ldr x20, [x20, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] + ldr x20, [x20, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] b LBB3_2 LBB3_1: ldr x9, [sp, #152] @@ -185,9 +185,9 @@ Lloh8: Lloh9: add x19, x19, l_anon.[ID].0@PAGEOFF Lloh10: - adrp x20, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE + adrp x20, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE Lloh11: - ldr x20, [x20, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] + ldr x20, [x20, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] b LBB4_2 LBB4_1: add x9, x9, #1 @@ -260,9 +260,9 @@ Lloh12: Lloh13: add x19, x19, l_anon.[ID].0@PAGEOFF Lloh14: - adrp x20, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE + adrp x20, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGE Lloh15: - ldr x20, [x20, SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] + ldr x20, [x20, SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPAGEOFF] b LBB5_2 LBB5_1: ldr x9, [sp, #152] diff --git a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-armv7s.s b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-armv7s.s index 22e4f63b9..aeb56c94b 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-armv7s.s +++ b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-armv7s.s @@ -30,8 +30,8 @@ _iter_once: cmp r0, r1 blo LBB1_3 add r3, r4, #4 - movw r1, :lower16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_0+8)) - movt r1, :upper16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_0+8)) + movw r1, :lower16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_0+8)) + movt r1, :upper16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_0+8)) LPC1_0: ldr r1, [pc, r1] ldr r0, [r4] @@ -57,8 +57,8 @@ LBB1_4: sub sp, r7, #12 pop {r4, r5, r6, r7, pc} LBB1_5: - movw r2, :lower16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_1+8)) - movt r2, :upper16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_1+8)) + movw r2, :lower16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_1+8)) + movt r2, :upper16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC1_1+8)) LPC1_1: ldr r2, [pc, r2] movw r1, :lower16:(l_anon.[ID].0-(LPC1_2+8)) @@ -112,8 +112,8 @@ _iter: str r1, [sp, #80] str r1, [sp, #84] str r1, [sp, #108] - movw r6, :lower16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC3_0+8)) - movt r6, :upper16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC3_0+8)) + movw r6, :lower16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC3_0+8)) + movt r6, :upper16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC3_0+8)) LPC3_0: ldr r6, [pc, r6] movw r8, :lower16:(l_anon.[ID].0-(LPC3_1+8)) @@ -186,8 +186,8 @@ _iter_noop: str r1, [sp, #80] str r1, [sp, #84] str r1, [sp, #108] - movw r6, :lower16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC4_0+8)) - movt r6, :upper16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC4_0+8)) + movw r6, :lower16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC4_0+8)) + movt r6, :upper16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC4_0+8)) LPC4_0: ldr r6, [pc, r6] movw r8, :lower16:(l_anon.[ID].0-(LPC4_1+8)) @@ -258,8 +258,8 @@ _iter_retained: str r1, [sp, #80] str r1, [sp, #84] str r1, [sp, #108] - movw r10, :lower16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) - movt r10, :upper16:(LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) + movw r10, :lower16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) + movt r10, :upper16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) LPC5_0: ldr r10, [pc, r10] movw r8, :lower16:(l_anon.[ID].0-(LPC5_1+8)) @@ -316,8 +316,8 @@ l_anon.[ID].0: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers .p2align 2, 0x0 -LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr: - .indirect_symbol SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0) +LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr: + .indirect_symbol SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0) .long 0 .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86.s b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86.s index 53a8f7ada..84ee189e0 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86.s +++ b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86.s @@ -43,7 +43,7 @@ L1$pb: jb LBB1_4 lea ebx, [esi + 4] mov edi, dword ptr [esi] - mov edx, dword ptr [ecx + LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L1$pb] + mov edx, dword ptr [ecx + LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L1$pb] mov eax, dword ptr [edx] test eax, eax je LBB1_2 @@ -130,7 +130,7 @@ L3$pb: mov dword ptr [ebp - 48], 0 mov dword ptr [ebp - 24], 0 mov dword ptr [ebp - 20], 0 - mov esi, dword ptr [eax + LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L3$pb] + mov esi, dword ptr [eax + LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L3$pb] lea eax, [eax + l_anon.[ID].0-L3$pb] mov dword ptr [ebp - 16], eax xor eax, eax @@ -213,7 +213,7 @@ L4$pb: mov dword ptr [ebp - 48], 0 mov dword ptr [ebp - 24], 0 mov dword ptr [ebp - 20], 0 - mov esi, dword ptr [eax + LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L4$pb] + mov esi, dword ptr [eax + LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L4$pb] lea eax, [eax + l_anon.[ID].0-L4$pb] mov dword ptr [ebp - 16], eax xor eax, eax @@ -291,7 +291,7 @@ L5$pb: mov dword ptr [ebp - 48], 0 mov dword ptr [ebp - 24], 0 mov dword ptr [ebp - 20], 0 - mov edi, dword ptr [eax + LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L5$pb] + mov edi, dword ptr [eax + LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-L5$pb] lea eax, [eax + l_anon.[ID].0-L5$pb] mov dword ptr [ebp - 16], eax xor eax, eax @@ -356,8 +356,8 @@ l_anon.[ID].0: .asciz "countByEnumeratingWithState:objects:count:" .section __IMPORT,__pointers,non_lazy_symbol_pointers -LSYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr: - .indirect_symbol SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0) +LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr: + .indirect_symbol SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0) .long 0 .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86_64.s b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86_64.s index eaa0a3a29..abbba3232 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86_64.s +++ b/crates/test-assembly/crates/test_fast_enumeration/expected/apple-x86_64.s @@ -33,7 +33,7 @@ _iter_once: jb LBB1_4 lea rcx, [rbx + 8] mov rdi, qword ptr [rbx] - mov rax, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov rax, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] mov rsi, qword ptr [rax] test rsi, rsi je LBB1_2 @@ -60,7 +60,7 @@ LBB1_5: pop rbp ret LBB1_2: - mov rax, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov rax, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] lea rsi, [rip + l_anon.[ID].0] mov r14, rdi mov rdi, rax @@ -124,7 +124,7 @@ _iter: mov qword ptr [rbp - 48], 0 mov qword ptr [rbp - 56], 0 xor ecx, ecx - mov r15, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov r15, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] lea r12, [rip + l_anon.[ID].0] xor eax, eax jmp LBB3_1 @@ -213,7 +213,7 @@ _iter_noop: mov qword ptr [rbp - 48], 0 mov qword ptr [rbp - 56], 0 xor eax, eax - mov r15, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov r15, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] lea r12, [rip + l_anon.[ID].0] xor ecx, ecx jmp LBB4_1 @@ -297,7 +297,7 @@ _iter_retained: mov qword ptr [rbp - 48], 0 mov qword ptr [rbp - 56], 0 xor ecx, ecx - mov r15, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov r15, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] lea r12, [rip + l_anon.[ID].0] xor eax, eax jmp LBB5_1 diff --git a/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86.s b/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86.s index 0c52b92dc..90f4065d1 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86.s +++ b/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86.s @@ -48,7 +48,7 @@ iter_once: lea eax, [edi + 4] mov ebp, dword ptr [edi] mov dword ptr [esp + 8], eax - mov eax, dword ptr [ebx + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] + mov eax, dword ptr [ebx + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] mov esi, dword ptr [eax] test esi, esi je .LBB1_2 @@ -134,7 +134,7 @@ iter: add ebx, offset _GLOBAL_OFFSET_TABLE_+(.Ltmp1-.L3$pb) movsd qword ptr [esp + 104], xmm0 movsd qword ptr [esp + 96], xmm0 - mov edi, dword ptr [ebx + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] + mov edi, dword ptr [ebx + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] lea ecx, [ebx + .Lanon.[ID].0@GOTOFF] mov dword ptr [esp + 12], ecx xor ecx, ecx @@ -227,7 +227,7 @@ iter_noop: add ebx, offset _GLOBAL_OFFSET_TABLE_+(.Ltmp2-.L4$pb) movsd qword ptr [esp + 104], xmm0 movsd qword ptr [esp + 96], xmm0 - mov ebp, dword ptr [ebx + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] + mov ebp, dword ptr [ebx + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] lea ecx, [ebx + .Lanon.[ID].0@GOTOFF] mov dword ptr [esp + 12], ecx xor ecx, ecx @@ -315,7 +315,7 @@ iter_retained: add ebx, offset _GLOBAL_OFFSET_TABLE_+(.Ltmp3-.L5$pb) movsd qword ptr [esp + 104], xmm0 movsd qword ptr [esp + 96], xmm0 - mov edi, dword ptr [ebx + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] + mov edi, dword ptr [ebx + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOT] lea ecx, [ebx + .Lanon.[ID].0@GOTOFF] mov dword ptr [esp + 12], ecx xor ecx, ecx diff --git a/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86_64.s b/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86_64.s index c20af4fca..090f259f4 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86_64.s +++ b/crates/test-assembly/crates/test_fast_enumeration/expected/gnustep-x86_64.s @@ -41,7 +41,7 @@ iter_once: jb .LBB1_4 lea r14, [rbx + 8] mov r15, qword ptr [rbx] - mov rax, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov rax, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] mov r12, qword ptr [rax] test r12, r12 je .LBB1_2 @@ -75,7 +75,7 @@ iter_once: pop r15 ret .LBB1_2: - mov rdi, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov rdi, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] lea rsi, [rip + .Lanon.[ID].0] call qword ptr [rip + SYM(objc2::__macro_helpers::cache::CachedSel::fetch::GENERATED_ID, 0)@GOTPCREL] mov r12, rax @@ -128,7 +128,7 @@ iter: movups xmmword ptr [rsp + 200], xmm0 xor ecx, ecx mov r12, qword ptr [rip + use_obj@GOTPCREL] - mov r15, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov r15, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] mov rbx, qword ptr [rip + objc_msg_lookup@GOTPCREL] xor eax, eax jmp .LBB3_1 @@ -213,7 +213,7 @@ iter_noop: mov qword ptr [rsp + 152], 0 movups xmmword ptr [rsp + 200], xmm0 xor eax, eax - mov r12, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov r12, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] mov r13, qword ptr [rip + objc_msg_lookup@GOTPCREL] xor ecx, ecx jmp .LBB4_1 @@ -294,7 +294,7 @@ iter_retained: mov r12, qword ptr [rip + objc_retain@GOTPCREL] mov rbx, qword ptr [rip + use_obj@GOTPCREL] mov r14, qword ptr [rip + objc_release@GOTPCREL] - mov r15, qword ptr [rip + SYM(icrate::generated::Foundation::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] + mov r15, qword ptr [rip + SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)@GOTPCREL] xor eax, eax jmp .LBB5_1 .p2align 4, 0x90 diff --git a/crates/test-assembly/crates/test_fast_enumeration/lib.rs b/crates/test-assembly/crates/test_fast_enumeration/lib.rs index d66c41388..5134a14a7 100644 --- a/crates/test-assembly/crates/test_fast_enumeration/lib.rs +++ b/crates/test-assembly/crates/test_fast_enumeration/lib.rs @@ -1,9 +1,9 @@ //! Test that fast enumeration is handled efficiently. -#![cfg(feature = "Foundation_NSArray")] +#![cfg(feature = "all")] use core::hint::black_box; -use icrate::Foundation::array::Iter; -use icrate::Foundation::{NSArray, NSObject}; +use objc2_foundation::array::Iter; +use objc2_foundation::{NSArray, NSObject}; // Should ideally be a fast zero-initialization. #[no_mangle] diff --git a/crates/test-assembly/crates/test_ns_string/Cargo.toml b/crates/test-assembly/crates/test_ns_string/Cargo.toml index d29df5db0..41dfae783 100644 --- a/crates/test-assembly/crates/test_ns_string/Cargo.toml +++ b/crates/test-assembly/crates/test_ns_string/Cargo.toml @@ -8,22 +8,21 @@ publish = false path = "lib.rs" [dependencies] -icrate = { path = "../../../icrate", default-features = false } +objc2-foundation = { path = "../../../../framework-crates/objc2-foundation", default-features = false } [features] -default = ["apple", "std", "Foundation", "Foundation_NSString"] -std = ["icrate/std"] +default = ["apple", "std", "all"] +std = ["objc2-foundation/std"] # Runtime -apple = ["icrate/apple"] -gnustep-1-7 = ["icrate/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "icrate/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "icrate/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "icrate/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "icrate/gnustep-2-1"] +apple = ["objc2-foundation/apple"] +gnustep-1-7 = ["objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2-foundation/gnustep-2-1"] -Foundation = ["icrate/Foundation"] -Foundation_NSString = ["icrate/Foundation_NSString"] +all = ["objc2-foundation/block2", "objc2-foundation/Foundation_NSString"] # Hack -assembly-features = ["Foundation", "Foundation_NSString", "icrate/unstable-static-nsstring"] +assembly-features = ["all", "objc2-foundation/unstable-static-nsstring"] diff --git a/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86.s b/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86.s index 00fd979a3..e26a0ecdd 100644 --- a/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86.s +++ b/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86.s @@ -23,7 +23,7 @@ get_ascii: lea eax, [ebx + .Lanon.[ID].0@GOTOFF] push 3 push eax - call SYM(icrate::additions::Foundation::string::::from_str::GENERATED_ID, 0)@PLT + call SYM(objc2_foundation::string::::from_str::GENERATED_ID, 0)@PLT add esp, 16 mov ecx, eax xchg dword ptr [ebx + SYM(test_ns_string[CRATE_ID]::get_ascii::CACHED_NSSTRING, 0).0@GOTOFF], ecx @@ -56,7 +56,7 @@ get_utf16: lea eax, [ebx + .Lanon.[ID].1@GOTOFF] push 5 push eax - call SYM(icrate::additions::Foundation::string::::from_str::GENERATED_ID, 0)@PLT + call SYM(objc2_foundation::string::::from_str::GENERATED_ID, 0)@PLT add esp, 16 mov ecx, eax xchg dword ptr [ebx + SYM(test_ns_string[CRATE_ID]::get_utf16::CACHED_NSSTRING, 0).0@GOTOFF], ecx @@ -89,7 +89,7 @@ get_with_nul: lea eax, [ebx + .Lanon.[ID].2@GOTOFF] push 6 push eax - call SYM(icrate::additions::Foundation::string::::from_str::GENERATED_ID, 0)@PLT + call SYM(objc2_foundation::string::::from_str::GENERATED_ID, 0)@PLT add esp, 16 mov ecx, eax xchg dword ptr [ebx + SYM(test_ns_string[CRATE_ID]::get_with_nul::CACHED_NSSTRING, 0).0@GOTOFF], ecx diff --git a/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86_64.s b/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86_64.s index 294c088be..d6caf9288 100644 --- a/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86_64.s +++ b/crates/test-assembly/crates/test_ns_string/expected/gnustep-x86_64.s @@ -13,7 +13,7 @@ get_ascii: push rax lea rdi, [rip + .Lanon.[ID].0] mov esi, 3 - call qword ptr [rip + SYM(icrate::additions::Foundation::string::::from_str::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM(objc2_foundation::string::::from_str::GENERATED_ID, 0)@GOTPCREL] mov rcx, rax xchg qword ptr [rip + SYM(test_ns_string[CRATE_ID]::get_ascii::CACHED_NSSTRING, 0).0], rcx add rsp, 8 @@ -34,7 +34,7 @@ get_utf16: push rax lea rdi, [rip + .Lanon.[ID].1] mov esi, 5 - call qword ptr [rip + SYM(icrate::additions::Foundation::string::::from_str::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM(objc2_foundation::string::::from_str::GENERATED_ID, 0)@GOTPCREL] mov rcx, rax xchg qword ptr [rip + SYM(test_ns_string[CRATE_ID]::get_utf16::CACHED_NSSTRING, 0).0], rcx add rsp, 8 @@ -55,7 +55,7 @@ get_with_nul: push rax lea rdi, [rip + .Lanon.[ID].2] mov esi, 6 - call qword ptr [rip + SYM(icrate::additions::Foundation::string::::from_str::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM(objc2_foundation::string::::from_str::GENERATED_ID, 0)@GOTPCREL] mov rcx, rax xchg qword ptr [rip + SYM(test_ns_string[CRATE_ID]::get_with_nul::CACHED_NSSTRING, 0).0], rcx add rsp, 8 diff --git a/crates/test-assembly/crates/test_ns_string/lib.rs b/crates/test-assembly/crates/test_ns_string/lib.rs index 6db020c7a..7c162875e 100644 --- a/crates/test-assembly/crates/test_ns_string/lib.rs +++ b/crates/test-assembly/crates/test_ns_string/lib.rs @@ -1,7 +1,7 @@ //! Test the output of the `ns_string!` macro. -#![cfg(feature = "Foundation_NSString")] +#![cfg(feature = "all")] -use icrate::Foundation::{ns_string, NSString}; +use objc2_foundation::{ns_string, NSString}; // Temporary to allow testing putting string references in statics. // This doesn't yet compile on other platforms, but could in the future! @@ -9,14 +9,14 @@ use icrate::Foundation::{ns_string, NSString}; #[no_mangle] static EMPTY: &NSString = { const INPUT: &[u8] = b""; - icrate::__ns_string_static!(INPUT); + objc2_foundation::__ns_string_static!(INPUT); CFSTRING.as_nsstring_const() }; #[cfg(all(feature = "apple", feature = "assembly-features"))] #[no_mangle] static XYZ: &NSString = { const INPUT: &[u8] = b"xyz"; - icrate::__ns_string_static!(INPUT); + objc2_foundation::__ns_string_static!(INPUT); CFSTRING.as_nsstring_const() }; diff --git a/crates/test-assembly/src/lib.rs b/crates/test-assembly/src/lib.rs index 36135e9e2..ca3d5c981 100644 --- a/crates/test-assembly/src/lib.rs +++ b/crates/test-assembly/src/lib.rs @@ -217,23 +217,23 @@ mod tests { use super::*; let before = r#" - movw r10, :lower16:(L__ZN6icrate10Foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17h32db0c71005d38edE$non_lazy_ptr-(LPC5_0+8)) - movt r10, :upper16:(L__ZN6icrate10Foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17h32db0c71005d38edE$non_lazy_ptr-(LPC5_0+8)) + movw r10, :lower16:(L__ZN16objc2_foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17hb82d9a01a97e5b26E$non_lazy_ptr-(LPC5_0+8)) + movt r10, :upper16:(L__ZN16objc2_foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17hb82d9a01a97e5b26E$non_lazy_ptr-(LPC5_0+8)) .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers .p2align 2, 0x0 -L__ZN6icrate10Foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17h32db0c71005d38edE$non_lazy_ptr: - .indirect_symbol __ZN6icrate10Foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17h86a0ced45445d2c5E +L__ZN16objc2_foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17hb82d9a01a97e5b26E$non_lazy_ptr: + .indirect_symbol __ZN16objc2_foundation9generated14__NSEnumerator17NSFastEnumeration41countByEnumeratingWithState_objects_count10CACHED_SEL17hb82d9a01a97e5b26E .long 0 "#; let after = r#" - movw r10, :lower16:(LSYM(icrate::Foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) - movt r10, :upper16:(LSYM(icrate::Foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) + movw r10, :lower16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) + movt r10, :upper16:(LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr-(LPC5_0+8)) .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers .p2align 2, 0x0 -LSYM(icrate::Foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr: - .indirect_symbol SYM(icrate::Foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 1) +LSYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0)$non_lazy_ptr: + .indirect_symbol SYM(objc2_foundation::generated::__NSEnumerator::NSFastEnumeration::countByEnumeratingWithState_objects_count::CACHED_SEL::GENERATED_ID, 0) .long 0 "#; let output = demangle_assembly(before); diff --git a/crates/test-fuzz/Cargo.toml b/crates/test-fuzz/Cargo.toml index 35d7b0b08..82bb429fa 100644 --- a/crates/test-fuzz/Cargo.toml +++ b/crates/test-fuzz/Cargo.toml @@ -13,21 +13,21 @@ cargo-fuzz = true [dependencies] libfuzzer-sys = "0.4" objc2 = { path = "../objc2", default-features = false } -icrate = { path = "../icrate", default-features = false } +objc2-foundation = { path = "../../framework-crates/objc2-foundation", default-features = false } [features] default = ["apple", "std"] -std = ["icrate/std"] +std = ["objc2-foundation/std"] # Runtime -apple = ["icrate/apple"] -gnustep-1-7 = ["icrate/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "icrate/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "icrate/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "icrate/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "icrate/gnustep-2-1"] +apple = ["objc2-foundation/apple"] +gnustep-1-7 = ["objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2-foundation/gnustep-2-1"] # The features required for fuzzing all targets (used by CI) -fuzz-all = ["icrate/Foundation", "icrate/Foundation_NSString"] +fuzz-all = ["objc2-foundation/Foundation_NSString"] [[bin]] name = "class" @@ -52,4 +52,4 @@ name = "nsstring" path = "fuzz_targets/nsstring.rs" test = false doc = false -required-features = ["icrate/Foundation", "icrate/Foundation_NSString"] +required-features = ["objc2-foundation/Foundation_NSString"] diff --git a/crates/test-fuzz/fuzz_targets/nsstring.rs b/crates/test-fuzz/fuzz_targets/nsstring.rs index 9db678e14..6f6bb7a56 100644 --- a/crates/test-fuzz/fuzz_targets/nsstring.rs +++ b/crates/test-fuzz/fuzz_targets/nsstring.rs @@ -1,7 +1,7 @@ #![no_main] -use icrate::Foundation::NSString; use libfuzzer_sys::fuzz_target; use objc2::rc::autoreleasepool; +use objc2_foundation::NSString; fuzz_target!(|s: &str| { autoreleasepool(|pool| { diff --git a/crates/test-ui/Cargo.toml b/crates/test-ui/Cargo.toml index ba1f01ead..c740a0b0f 100644 --- a/crates/test-ui/Cargo.toml +++ b/crates/test-ui/Cargo.toml @@ -16,26 +16,29 @@ workspace = true default = [ "apple", "std", - "icrate/Foundation", - "icrate/Foundation_NSString", - "icrate/Foundation_NSNotification", - "icrate/Foundation_NSThread", - "icrate/Foundation_NSError", - "icrate/Foundation_NSArray", - "icrate/Foundation_NSValue", - "icrate/Foundation_NSSet", - "icrate/Foundation_NSObject", - "icrate/Foundation_NSURLSession", + "objc2-foundation/block2", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSThread", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSValue", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURLSession", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSDictionary", "objc2/unstable-msg-send-always-comma", ] -std = ["block2/std", "objc2/std", "icrate/std"] +std = ["block2/std", "objc2/std", "objc2-foundation/std"] -apple = ["block2/apple", "objc2/apple", "icrate/apple"] -gnustep-1-7 = ["block2/gnustep-1-7", "objc2/gnustep-1-7", "icrate/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "block2/gnustep-1-8", "objc2/gnustep-1-8", "icrate/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "block2/gnustep-1-9", "objc2/gnustep-1-9", "icrate/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "block2/gnustep-2-0", "objc2/gnustep-2-0", "icrate/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2/gnustep-2-1", "icrate/gnustep-2-1"] +apple = ["block2/apple", "objc2/apple", "objc2-foundation/apple"] +gnustep-1-7 = ["block2/gnustep-1-7", "objc2/gnustep-1-7", "objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "block2/gnustep-1-8", "objc2/gnustep-1-8", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "block2/gnustep-1-9", "objc2/gnustep-1-9", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "block2/gnustep-2-0", "objc2/gnustep-2-0", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2/gnustep-2-1", "objc2-foundation/gnustep-2-1"] run = ["trybuild"] @@ -43,7 +46,7 @@ run = ["trybuild"] trybuild = { version = "1.0.72", optional = true } block2 = { path = "../block2", default-features = false } objc2 = { path = "../objc2", default-features = false } -icrate = { path = "../icrate", default-features = false } +objc2-foundation = { path = "../../framework-crates/objc2-foundation", default-features = false } [[bin]] name = "test-ui" diff --git a/crates/test-ui/ui/array_iter_correct_lifetime.rs b/crates/test-ui/ui/array_iter_correct_lifetime.rs index d6d40cadb..62807f829 100644 --- a/crates/test-ui/ui/array_iter_correct_lifetime.rs +++ b/crates/test-ui/ui/array_iter_correct_lifetime.rs @@ -1,4 +1,4 @@ -use icrate::Foundation::{NSArray, NSCopying, NSMutableArray, NSMutableString, NSString}; +use objc2_foundation::{NSArray, NSCopying, NSMutableArray, NSMutableString, NSString}; fn main() { let arr: &mut NSArray = &mut NSMutableArray::new(); diff --git a/crates/test-ui/ui/array_iter_invalid.rs b/crates/test-ui/ui/array_iter_invalid.rs index 299b85515..7a45c9b86 100644 --- a/crates/test-ui/ui/array_iter_invalid.rs +++ b/crates/test-ui/ui/array_iter_invalid.rs @@ -1,5 +1,5 @@ -use icrate::Foundation::{NSArray, NSMutableArray, NSMutableString, NSString}; use objc2::rc::Id; +use objc2_foundation::{NSArray, NSMutableArray, NSMutableString, NSString}; fn main() { let arr: Id> = NSArray::new(); diff --git a/crates/test-ui/ui/declare_class_delegate_not_mainthreadonly.rs b/crates/test-ui/ui/declare_class_delegate_not_mainthreadonly.rs index 389ee4bfb..084580321 100644 --- a/crates/test-ui/ui/declare_class_delegate_not_mainthreadonly.rs +++ b/crates/test-ui/ui/declare_class_delegate_not_mainthreadonly.rs @@ -1,12 +1,12 @@ //! Test that implementing `NSApplicationDelegate` and similar requires //! a `MainThreadOnly` class. -use icrate::Foundation::{MainThreadMarker, NSNotification, NSObject, NSObjectProtocol}; use objc2::mutability::IsMainThreadOnly; use objc2::rc::Id; use objc2::{ declare_class, extern_methods, extern_protocol, mutability, ClassType, DeclaredClass, ProtocolType, }; +use objc2_foundation::{MainThreadMarker, NSNotification, NSObject, NSObjectProtocol}; // Use fake `NSApplicationDelegate` so that this works on iOS too. extern_protocol!( diff --git a/crates/test-ui/ui/extern_methods_invalid_type.rs b/crates/test-ui/ui/extern_methods_invalid_type.rs index ee7f3e28d..b5b8e95fe 100644 --- a/crates/test-ui/ui/extern_methods_invalid_type.rs +++ b/crates/test-ui/ui/extern_methods_invalid_type.rs @@ -1,7 +1,7 @@ -use icrate::Foundation::MainThreadMarker; use objc2::rc::Id; use objc2::runtime::NSObject; use objc2::{extern_class, extern_methods, mutability, ClassType}; +use objc2_foundation::MainThreadMarker; extern_class!( pub struct MyObject; diff --git a/crates/test-ui/ui/extern_methods_wrong_arguments_error.rs b/crates/test-ui/ui/extern_methods_wrong_arguments_error.rs index e126e2cae..e99566f25 100644 --- a/crates/test-ui/ui/extern_methods_wrong_arguments_error.rs +++ b/crates/test-ui/ui/extern_methods_wrong_arguments_error.rs @@ -1,7 +1,7 @@ -use icrate::Foundation::MainThreadMarker; use objc2::rc::Id; use objc2::runtime::NSObject; use objc2::{extern_class, extern_methods, mutability, ClassType}; +use objc2_foundation::MainThreadMarker; extern_class!( pub struct MyObject; diff --git a/crates/test-ui/ui/implement_protocol_missing_super.rs b/crates/test-ui/ui/implement_protocol_missing_super.rs index eec257fd3..1047dbd1c 100644 --- a/crates/test-ui/ui/implement_protocol_missing_super.rs +++ b/crates/test-ui/ui/implement_protocol_missing_super.rs @@ -1,7 +1,7 @@ //! Test that implementing certain traits like `NSURLSessionDelegate` requires //! super protocols like `NSObjectProtocol` to also be implemented. -use icrate::Foundation::{NSObject, NSURLSessionDelegate}; use objc2::{declare_class, mutability, ClassType, DeclaredClass}; +use objc2_foundation::{NSObject, NSURLSessionDelegate}; declare_class!( struct CustomObject; diff --git a/crates/test-ui/ui/implement_protocol_missing_super.stderr b/crates/test-ui/ui/implement_protocol_missing_super.stderr index 80d63638a..e4fec8d09 100644 --- a/crates/test-ui/ui/implement_protocol_missing_super.stderr +++ b/crates/test-ui/ui/implement_protocol_missing_super.stderr @@ -8,14 +8,14 @@ error[E0277]: the trait bound `CustomObject: NSObjectProtocol` is not satisfied NSObject __NSProxy ProtocolObject - NSArray - NSMutableArray - NSDictionary - NSMutableDictionary - NSSet + NSError + NSNotification + NSNotificationCenter + NSString + NSMutableString and $N others note: required by a bound in `NSURLSessionDelegate` - --> $WORKSPACE/crates/icrate/src/generated/Foundation/NSURLSession.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generated/NSURLSession.rs | | / extern_protocol!( | | pub unsafe trait NSURLSessionDelegate: NSObjectProtocol { diff --git a/crates/test-ui/ui/invalid_ns_string_input.rs b/crates/test-ui/ui/invalid_ns_string_input.rs index 28225dff4..4617543f7 100644 --- a/crates/test-ui/ui/invalid_ns_string_input.rs +++ b/crates/test-ui/ui/invalid_ns_string_input.rs @@ -1,4 +1,4 @@ -use icrate::Foundation::ns_string; +use objc2_foundation::ns_string; fn main() { let _ = ns_string!(1u8); diff --git a/crates/test-ui/ui/invalid_ns_string_output.rs b/crates/test-ui/ui/invalid_ns_string_output.rs index b248979f6..455e0b9b4 100644 --- a/crates/test-ui/ui/invalid_ns_string_output.rs +++ b/crates/test-ui/ui/invalid_ns_string_output.rs @@ -1,4 +1,4 @@ -use icrate::Foundation::ns_string; +use objc2_foundation::ns_string; fn main() { let _: u8 = ns_string!("abc"); diff --git a/crates/test-ui/ui/mainthreadmarker_from_nsobject.rs b/crates/test-ui/ui/mainthreadmarker_from_nsobject.rs index 1ce912cd3..0ff3915d0 100644 --- a/crates/test-ui/ui/mainthreadmarker_from_nsobject.rs +++ b/crates/test-ui/ui/mainthreadmarker_from_nsobject.rs @@ -1,4 +1,4 @@ -use icrate::Foundation::{MainThreadMarker, NSObject}; +use objc2_foundation::{MainThreadMarker, NSObject}; fn main() { let obj = NSObject::new(); diff --git a/crates/test-ui/ui/mainthreadmarker_from_nsobject.stderr b/crates/test-ui/ui/mainthreadmarker_from_nsobject.stderr index 6527868eb..664c35c79 100644 --- a/crates/test-ui/ui/mainthreadmarker_from_nsobject.stderr +++ b/crates/test-ui/ui/mainthreadmarker_from_nsobject.stderr @@ -1,9 +1,9 @@ -error[E0277]: the trait bound `Root: mutability::MutabilityIsMainThreadOnly` is not satisfied +error[E0277]: the trait bound `objc2::mutability::Root: objc2::mutability::MutabilityIsMainThreadOnly` is not satisfied --> ui/mainthreadmarker_from_nsobject.rs | | let mtm = MainThreadMarker::from(&*obj); - | ^^^^^^^^^^^^^^^^ the trait `mutability::MutabilityIsMainThreadOnly` is not implemented for `Root`, which is required by `MainThreadMarker: From<&NSObject>` + | ^^^^^^^^^^^^^^^^ the trait `objc2::mutability::MutabilityIsMainThreadOnly` is not implemented for `objc2::mutability::Root`, which is required by `MainThreadMarker: From<&NSObject>` | - = help: the trait `mutability::MutabilityIsMainThreadOnly` is implemented for `MainThreadOnly` - = note: required for `NSObject` to implement `IsMainThreadOnly` + = help: the trait `objc2::mutability::MutabilityIsMainThreadOnly` is implemented for `objc2::mutability::MainThreadOnly` + = note: required for `NSObject` to implement `objc2::mutability::IsMainThreadOnly` = note: required for `MainThreadMarker` to implement `From<&NSObject>` diff --git a/crates/test-ui/ui/mainthreadmarker_not_send_sync.rs b/crates/test-ui/ui/mainthreadmarker_not_send_sync.rs index 3d01be9e8..863e475bf 100644 --- a/crates/test-ui/ui/mainthreadmarker_not_send_sync.rs +++ b/crates/test-ui/ui/mainthreadmarker_not_send_sync.rs @@ -1,5 +1,5 @@ //! Test that MainThreadMarker is neither Send nor Sync. -use icrate::Foundation::MainThreadMarker; +use objc2_foundation::MainThreadMarker; fn needs_sync() {} fn needs_send() {} diff --git a/crates/test-ui/ui/mainthreadmarker_not_send_sync.stderr b/crates/test-ui/ui/mainthreadmarker_not_send_sync.stderr index 2ce31cf13..fce08f63e 100644 --- a/crates/test-ui/ui/mainthreadmarker_not_send_sync.stderr +++ b/crates/test-ui/ui/mainthreadmarker_not_send_sync.stderr @@ -11,7 +11,7 @@ note: required because it appears within the type `PhantomData<*mut ()>` | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `MainThreadMarker` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/thread.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/thread.rs | | pub struct MainThreadMarker { | ^^^^^^^^^^^^^^^^ @@ -34,7 +34,7 @@ note: required because it appears within the type `PhantomData<*mut ()>` | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `MainThreadMarker` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/thread.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/thread.rs | | pub struct MainThreadMarker { | ^^^^^^^^^^^^^^^^ diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error1.rs b/crates/test-ui/ui/msg_send_id_underspecified_error1.rs index 04aee3b44..651b6c20c 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified_error1.rs +++ b/crates/test-ui/ui/msg_send_id_underspecified_error1.rs @@ -1,7 +1,7 @@ //! Test underspecified msg_send_id! errors. -use icrate::Foundation::NSString; use objc2::msg_send_id; use objc2::rc::Id; +use objc2_foundation::NSString; fn main() { let obj: &NSString; diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error2.rs b/crates/test-ui/ui/msg_send_id_underspecified_error2.rs index 2d8a5282e..d9e858b9a 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified_error2.rs +++ b/crates/test-ui/ui/msg_send_id_underspecified_error2.rs @@ -1,7 +1,7 @@ //! Test underspecified msg_send_id! errors. -use icrate::Foundation::{NSError, NSString}; use objc2::msg_send_id; use objc2::rc::Id; +use objc2_foundation::{NSError, NSString}; fn main() { let obj: &NSString; diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error3.rs b/crates/test-ui/ui/msg_send_id_underspecified_error3.rs index fd4cf5796..a493334f6 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified_error3.rs +++ b/crates/test-ui/ui/msg_send_id_underspecified_error3.rs @@ -1,6 +1,6 @@ //! Test underspecified msg_send_id! errors. -use icrate::Foundation::NSString; use objc2::msg_send_id; +use objc2_foundation::NSString; fn main() { let obj: &NSString; diff --git a/crates/test-ui/ui/msg_send_invalid_error.rs b/crates/test-ui/ui/msg_send_invalid_error.rs index f87effd14..dda7cfdc7 100644 --- a/crates/test-ui/ui/msg_send_invalid_error.rs +++ b/crates/test-ui/ui/msg_send_invalid_error.rs @@ -1,7 +1,7 @@ //! Test that msg_send! error handling works correctly. -use icrate::Foundation::NSString; use objc2::rc::Id; use objc2::{msg_send, ClassType}; +use objc2_foundation::NSString; fn main() { let obj: &NSString; diff --git a/crates/test-ui/ui/msg_send_invalid_error.stderr b/crates/test-ui/ui/msg_send_invalid_error.stderr index 7fff62bf5..1b588d19b 100644 --- a/crates/test-ui/ui/msg_send_invalid_error.stderr +++ b/crates/test-ui/ui/msg_send_invalid_error.stderr @@ -44,10 +44,10 @@ error[E0277]: the trait bound `i32: Message` is not satisfied NSObject __NSProxy ProtocolObject

- NSArray AnyObject - NSMutableArray - NSDictionary + NSError + NSNotification + NSNotificationCenter and $N others note: required by a bound in `send_message_error` --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send.rs diff --git a/crates/test-ui/ui/msg_send_missing_comma.rs b/crates/test-ui/ui/msg_send_missing_comma.rs index 314581fbb..5132d0cbd 100644 --- a/crates/test-ui/ui/msg_send_missing_comma.rs +++ b/crates/test-ui/ui/msg_send_missing_comma.rs @@ -1,8 +1,8 @@ //! Test msg_send! syntax with missing commas. #![deny(deprecated)] -use icrate::Foundation::NSString; use objc2::rc::Id; use objc2::{msg_send, msg_send_bool, msg_send_id, ClassType}; +use objc2_foundation::NSString; fn main() { let obj: &NSString = &NSString::new(); diff --git a/crates/test-ui/ui/msg_send_not_allowed_mutable.rs b/crates/test-ui/ui/msg_send_not_allowed_mutable.rs index df7f9fabe..8b605a67d 100644 --- a/crates/test-ui/ui/msg_send_not_allowed_mutable.rs +++ b/crates/test-ui/ui/msg_send_not_allowed_mutable.rs @@ -1,7 +1,7 @@ //! Test msg_send! with mutable receivers that are not IsAllowedMutable. -use icrate::Foundation::NSThread; use objc2::rc::Id; use objc2::{msg_send, msg_send_id}; +use objc2_foundation::NSThread; fn main() { let obj: &mut NSThread; diff --git a/crates/test-ui/ui/msg_send_underspecified_error.rs b/crates/test-ui/ui/msg_send_underspecified_error.rs index de3194e3e..759885553 100644 --- a/crates/test-ui/ui/msg_send_underspecified_error.rs +++ b/crates/test-ui/ui/msg_send_underspecified_error.rs @@ -1,6 +1,6 @@ //! Test underspecified msg_send! errors. -use icrate::Foundation::NSString; use objc2::msg_send; +use objc2_foundation::NSString; fn main() { let obj: &NSString; diff --git a/crates/test-ui/ui/ns_string_not_const.rs b/crates/test-ui/ui/ns_string_not_const.rs index 6d100b108..827b4fb8b 100644 --- a/crates/test-ui/ui/ns_string_not_const.rs +++ b/crates/test-ui/ui/ns_string_not_const.rs @@ -1,5 +1,5 @@ #![allow(unused_variables)] -use icrate::Foundation::ns_string; +use objc2_foundation::ns_string; fn main() { let s: &str = "abc"; diff --git a/crates/test-ui/ui/ns_string_output_not_const.rs b/crates/test-ui/ui/ns_string_output_not_const.rs index 08396d70d..7a4f273f3 100644 --- a/crates/test-ui/ui/ns_string_output_not_const.rs +++ b/crates/test-ui/ui/ns_string_output_not_const.rs @@ -1,4 +1,4 @@ -use icrate::Foundation::{ns_string, NSString}; +use objc2_foundation::{ns_string, NSString}; fn main() { static STRING: &NSString = ns_string!("abc"); diff --git a/crates/test-ui/ui/ns_string_output_not_const.stderr b/crates/test-ui/ui/ns_string_output_not_const.stderr index c25235933..16bfbc45e 100644 --- a/crates/test-ui/ui/ns_string_output_not_const.stderr +++ b/crates/test-ui/ui/ns_string_output_not_const.stderr @@ -1,4 +1,4 @@ -error[E0015]: cannot call non-const fn `CachedId::::get::<{closure@$WORKSPACE/crates/icrate/src/additions/Foundation/macros/ns_string.rs:194:29: 194:31}>` in statics +error[E0015]: cannot call non-const fn `CachedId::::get::<{closure@$WORKSPACE/framework-crates/objc2-foundation/src/macros/ns_string.rs:189:29: 189:31}>` in statics --> ui/ns_string_output_not_const.rs | | static STRING: &NSString = ns_string!("abc"); diff --git a/crates/test-ui/ui/nsarray_bound_not_send_sync.rs b/crates/test-ui/ui/nsarray_bound_not_send_sync.rs index d7ef28fb9..04b35b5e0 100644 --- a/crates/test-ui/ui/nsarray_bound_not_send_sync.rs +++ b/crates/test-ui/ui/nsarray_bound_not_send_sync.rs @@ -1,4 +1,4 @@ -use icrate::Foundation::{NSArray, NSMutableArray, NSObject}; +use objc2_foundation::{NSArray, NSMutableArray, NSObject}; fn needs_sync() {} fn needs_send() {} diff --git a/crates/test-ui/ui/nsarray_bound_not_send_sync.stderr b/crates/test-ui/ui/nsarray_bound_not_send_sync.stderr index cb4588a31..6a55abec8 100644 --- a/crates/test-ui/ui/nsarray_bound_not_send_sync.stderr +++ b/crates/test-ui/ui/nsarray_bound_not_send_sync.stderr @@ -4,25 +4,25 @@ error[E0277]: `*const NSObject` cannot be shared between threads safely | needs_sync::>(); | ^^^^^^^^^^^^^^^^^ `*const NSObject` cannot be shared between threads safely | - = help: within `icrate::objc2::rc::id::private::EquivalentType`, the trait `Sync` is not implemented for `*const NSObject`, which is required by `NSArray: Sync` -note: required because it appears within the type `icrate::objc2::rc::id::private::UnknownStorage` + = help: within `objc2::rc::id::private::EquivalentType`, the trait `Sync` is not implemented for `*const NSObject`, which is required by `NSArray: Sync` +note: required because it appears within the type `objc2::rc::id::private::UnknownStorage` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct UnknownStorage(*const T, AnyObject); | ^^^^^^^^^^^^^^ -note: required because it appears within the type `icrate::objc2::rc::id::private::EquivalentType` +note: required because it appears within the type `objc2::rc::id::private::EquivalentType` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct EquivalentType( | ^^^^^^^^^^^^^^ - = note: required for `Id` to implement `Sync` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Sync` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ @@ -39,12 +39,12 @@ error[E0277]: `UnsafeCell, PhantomPinned)>>` | ^^^^^^^^^^^^^^^^^ `UnsafeCell, PhantomPinned)>>` cannot be shared between threads safely | = help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell, PhantomPinned)>>`, which is required by `NSArray: Sync` -note: required because it appears within the type `objc_object` +note: required because it appears within the type `objc_sys::object::objc_object` --> $WORKSPACE/crates/objc-sys/src/object.rs | | pub struct objc_object { | ^^^^^^^^^^^ -note: required because it appears within the type `AnyObject` +note: required because it appears within the type `objc2::runtime::AnyObject` --> $WORKSPACE/crates/objc2/src/runtime/mod.rs | | pub struct AnyObject(ffi::objc_object); @@ -54,14 +54,14 @@ note: required because it appears within the type `NSObject` | | pub struct NSObject { | ^^^^^^^^ - = note: required for `Id` to implement `Sync` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Sync` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ @@ -77,25 +77,25 @@ error[E0277]: `*const NSObject` cannot be sent between threads safely | needs_send::>(); | ^^^^^^^^^^^^^^^^^ `*const NSObject` cannot be sent between threads safely | - = help: within `icrate::objc2::rc::id::private::EquivalentType`, the trait `Send` is not implemented for `*const NSObject`, which is required by `NSArray: Send` -note: required because it appears within the type `icrate::objc2::rc::id::private::UnknownStorage` + = help: within `objc2::rc::id::private::EquivalentType`, the trait `Send` is not implemented for `*const NSObject`, which is required by `NSArray: Send` +note: required because it appears within the type `objc2::rc::id::private::UnknownStorage` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct UnknownStorage(*const T, AnyObject); | ^^^^^^^^^^^^^^ -note: required because it appears within the type `icrate::objc2::rc::id::private::EquivalentType` +note: required because it appears within the type `objc2::rc::id::private::EquivalentType` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct EquivalentType( | ^^^^^^^^^^^^^^ - = note: required for `Id` to implement `Send` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Send` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ @@ -123,12 +123,12 @@ note: required because it appears within the type `UnsafeCell { | ^^^^^^^^^^ -note: required because it appears within the type `objc_object` +note: required because it appears within the type `objc_sys::object::objc_object` --> $WORKSPACE/crates/objc-sys/src/object.rs | | pub struct objc_object { | ^^^^^^^^^^^ -note: required because it appears within the type `AnyObject` +note: required because it appears within the type `objc2::runtime::AnyObject` --> $WORKSPACE/crates/objc2/src/runtime/mod.rs | | pub struct AnyObject(ffi::objc_object); @@ -138,14 +138,14 @@ note: required because it appears within the type `NSObject` | | pub struct NSObject { | ^^^^^^^^ - = note: required for `Id` to implement `Send` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Send` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ @@ -161,30 +161,30 @@ error[E0277]: `*const NSObject` cannot be shared between threads safely | needs_sync::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `*const NSObject` cannot be shared between threads safely | - = help: within `icrate::objc2::rc::id::private::EquivalentType`, the trait `Sync` is not implemented for `*const NSObject`, which is required by `NSMutableArray: Sync` -note: required because it appears within the type `icrate::objc2::rc::id::private::UnknownStorage` + = help: within `objc2::rc::id::private::EquivalentType`, the trait `Sync` is not implemented for `*const NSObject`, which is required by `NSMutableArray: Sync` +note: required because it appears within the type `objc2::rc::id::private::UnknownStorage` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct UnknownStorage(*const T, AnyObject); | ^^^^^^^^^^^^^^ -note: required because it appears within the type `icrate::objc2::rc::id::private::EquivalentType` +note: required because it appears within the type `objc2::rc::id::private::EquivalentType` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct EquivalentType( | ^^^^^^^^^^^^^^ - = note: required for `Id` to implement `Sync` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Sync` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ note: required because it appears within the type `NSMutableArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSMutableArray { | ^^^^^^^^^^^^^^ @@ -201,12 +201,12 @@ error[E0277]: `UnsafeCell, PhantomPinned)>>` | ^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell, PhantomPinned)>>` cannot be shared between threads safely | = help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell, PhantomPinned)>>`, which is required by `NSMutableArray: Sync` -note: required because it appears within the type `objc_object` +note: required because it appears within the type `objc_sys::object::objc_object` --> $WORKSPACE/crates/objc-sys/src/object.rs | | pub struct objc_object { | ^^^^^^^^^^^ -note: required because it appears within the type `AnyObject` +note: required because it appears within the type `objc2::runtime::AnyObject` --> $WORKSPACE/crates/objc2/src/runtime/mod.rs | | pub struct AnyObject(ffi::objc_object); @@ -216,19 +216,19 @@ note: required because it appears within the type `NSObject` | | pub struct NSObject { | ^^^^^^^^ - = note: required for `Id` to implement `Sync` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Sync` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ note: required because it appears within the type `NSMutableArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSMutableArray { | ^^^^^^^^^^^^^^ @@ -244,30 +244,30 @@ error[E0277]: `*const NSObject` cannot be sent between threads safely | needs_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `*const NSObject` cannot be sent between threads safely | - = help: within `icrate::objc2::rc::id::private::EquivalentType`, the trait `Send` is not implemented for `*const NSObject`, which is required by `NSMutableArray: Send` -note: required because it appears within the type `icrate::objc2::rc::id::private::UnknownStorage` + = help: within `objc2::rc::id::private::EquivalentType`, the trait `Send` is not implemented for `*const NSObject`, which is required by `NSMutableArray: Send` +note: required because it appears within the type `objc2::rc::id::private::UnknownStorage` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct UnknownStorage(*const T, AnyObject); | ^^^^^^^^^^^^^^ -note: required because it appears within the type `icrate::objc2::rc::id::private::EquivalentType` +note: required because it appears within the type `objc2::rc::id::private::EquivalentType` --> $WORKSPACE/crates/objc2/src/rc/id.rs | | pub struct EquivalentType( | ^^^^^^^^^^^^^^ - = note: required for `Id` to implement `Send` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Send` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ note: required because it appears within the type `NSMutableArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSMutableArray { | ^^^^^^^^^^^^^^ @@ -295,12 +295,12 @@ note: required because it appears within the type `UnsafeCell { | ^^^^^^^^^^ -note: required because it appears within the type `objc_object` +note: required because it appears within the type `objc_sys::object::objc_object` --> $WORKSPACE/crates/objc-sys/src/object.rs | | pub struct objc_object { | ^^^^^^^^^^^ -note: required because it appears within the type `AnyObject` +note: required because it appears within the type `objc2::runtime::AnyObject` --> $WORKSPACE/crates/objc2/src/runtime/mod.rs | | pub struct AnyObject(ffi::objc_object); @@ -310,19 +310,19 @@ note: required because it appears within the type `NSObject` | | pub struct NSObject { | ^^^^^^^^ - = note: required for `Id` to implement `Send` -note: required because it appears within the type `PhantomData>` + = note: required for `objc2::rc::id::Id` to implement `Send` +note: required because it appears within the type `PhantomData>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `NSArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSArray { | ^^^^^^^ note: required because it appears within the type `NSMutableArray` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/generics.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generics.rs | | pub struct NSMutableArray { | ^^^^^^^^^^^^^^ diff --git a/crates/test-ui/ui/nsarray_not_message.rs b/crates/test-ui/ui/nsarray_not_message.rs index 55c600220..2e163b65f 100644 --- a/crates/test-ui/ui/nsarray_not_message.rs +++ b/crates/test-ui/ui/nsarray_not_message.rs @@ -1,6 +1,6 @@ //! Test output of creating `NSArray` from a non-`Message` type. -use icrate::Foundation::{NSArray, NSObject}; use objc2::rc::Id; +use objc2_foundation::{NSArray, NSObject}; fn main() { let _: Id> = NSArray::new(); diff --git a/crates/test-ui/ui/nsarray_not_message.stderr b/crates/test-ui/ui/nsarray_not_message.stderr index c44a33692..7901d29f0 100644 --- a/crates/test-ui/ui/nsarray_not_message.stderr +++ b/crates/test-ui/ui/nsarray_not_message.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `i32: Message` is not satisfied NSObject __NSProxy ProtocolObject

- NSArray AnyObject - NSMutableArray - NSDictionary + NSError + NSNotification + NSNotificationCenter and $N others -note: required by a bound in `icrate::generated::Foundation::__NSArray::>::new` - --> $WORKSPACE/crates/icrate/src/generated/Foundation/NSArray.rs +note: required by a bound in `objc2_foundation::generated::__NSArray::>::new` + --> $WORKSPACE/framework-crates/objc2-foundation/src/generated/NSArray.rs | | / extern_methods!( | | /// Methods declared on superclass `NSObject` @@ -25,7 +25,7 @@ note: required by a bound in `icrate::generated::Foundation::__NSArray::>::new` + | |_^ required by this bound in `objc2_foundation::generated::__NSArray::>::new` = note: this error originates in the macro `extern_methods` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Id: IsRetainable` is not satisfied @@ -38,11 +38,11 @@ error[E0277]: the trait bound `Id: IsRetainable` is not satisfied | = help: the trait `IsRetainable` is implemented for `ProtocolObject

` = note: required for `Id` to implement `IsRetainable` -note: required by a bound in `icrate::Foundation::array::>::from_slice` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/array.rs +note: required by a bound in `objc2_foundation::array::>::from_slice` + --> $WORKSPACE/framework-crates/objc2-foundation/src/array.rs | | pub fn from_slice(slice: &[&T]) -> Id | ---------- required by a bound in this associated function | where | T: IsRetainable, - | ^^^^^^^^^^^^ required by this bound in `icrate::Foundation::array::>::from_slice` + | ^^^^^^^^^^^^ required by this bound in `objc2_foundation::array::>::from_slice` diff --git a/crates/test-ui/ui/nsset_from_nsobject.rs b/crates/test-ui/ui/nsset_from_nsobject.rs index 955e2a08a..a05ba9fb0 100644 --- a/crates/test-ui/ui/nsset_from_nsobject.rs +++ b/crates/test-ui/ui/nsset_from_nsobject.rs @@ -1,5 +1,5 @@ //! Test that `NSSet` can't be created from types with an unknown stable hash. -use icrate::Foundation::{NSObject, NSSet}; +use objc2_foundation::{NSObject, NSSet}; fn main() { let _ = NSSet::from_vec(vec![NSObject::new()]); diff --git a/crates/test-ui/ui/nsset_from_nsobject.stderr b/crates/test-ui/ui/nsset_from_nsobject.stderr index dfcad406f..7e2122664 100644 --- a/crates/test-ui/ui/nsset_from_nsobject.stderr +++ b/crates/test-ui/ui/nsset_from_nsobject.stderr @@ -1,19 +1,19 @@ -error[E0277]: the trait bound `Root: mutability::MutabilityHashIsStable` is not satisfied +error[E0277]: the trait bound `objc2::mutability::Root: objc2::mutability::MutabilityHashIsStable` is not satisfied --> ui/nsset_from_nsobject.rs | | let _ = NSSet::from_vec(vec![NSObject::new()]); - | --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `mutability::MutabilityHashIsStable` is not implemented for `Root`, which is required by `NSObject: HasStableHash` + | --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `objc2::mutability::MutabilityHashIsStable` is not implemented for `objc2::mutability::Root`, which is required by `NSObject: objc2::mutability::HasStableHash` | | | required by a bound introduced by this call | - = help: the following other types implement trait `mutability::MutabilityHashIsStable`: - Immutable - Mutable - ImmutableWithMutableSubclass - MutableWithImmutableSuperclass - = note: required for `NSObject` to implement `HasStableHash` + = help: the following other types implement trait `objc2::mutability::MutabilityHashIsStable`: + objc2::mutability::Immutable + objc2::mutability::Mutable + objc2::mutability::ImmutableWithMutableSubclass + objc2::mutability::MutableWithImmutableSuperclass + = note: required for `NSObject` to implement `objc2::mutability::HasStableHash` note: required by a bound in `set::>::from_vec` - --> $WORKSPACE/crates/icrate/src/additions/Foundation/set.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/set.rs | | pub fn from_vec(mut vec: Vec>) -> Id | -------- required by a bound in this associated function diff --git a/crates/test-ui/ui/nsstring_as_str_use_after_release.rs b/crates/test-ui/ui/nsstring_as_str_use_after_release.rs index ca1af26fa..6cb06e1b3 100644 --- a/crates/test-ui/ui/nsstring_as_str_use_after_release.rs +++ b/crates/test-ui/ui/nsstring_as_str_use_after_release.rs @@ -1,6 +1,6 @@ //! Test that the lifetime of `NSString::as_str` is bound to the string. -use icrate::Foundation::NSString; use objc2::rc::autoreleasepool; +use objc2_foundation::NSString; fn main() { autoreleasepool(|pool| { diff --git a/crates/test-ui/ui/nsstring_as_str_use_outside_pool.rs b/crates/test-ui/ui/nsstring_as_str_use_outside_pool.rs index e9f6a1afe..510520c28 100644 --- a/crates/test-ui/ui/nsstring_as_str_use_outside_pool.rs +++ b/crates/test-ui/ui/nsstring_as_str_use_outside_pool.rs @@ -1,6 +1,6 @@ //! Test that the lifetime of `NSString::as_str` is bound to the pool. -use icrate::Foundation::NSString; use objc2::rc::autoreleasepool; +use objc2_foundation::NSString; fn main() { let ns_string = NSString::new(); diff --git a/crates/test-ui/ui/object_not_send_sync.rs b/crates/test-ui/ui/object_not_send_sync.rs index c1d2cdcaf..a0e5f8f3f 100644 --- a/crates/test-ui/ui/object_not_send_sync.rs +++ b/crates/test-ui/ui/object_not_send_sync.rs @@ -3,8 +3,8 @@ //! //! Also test that `NSValue` is not Send nor Sync, because its contained value //! might not be. -use icrate::Foundation::NSValue; -use objc2::runtime::{NSObject, AnyObject}; +use objc2::runtime::{AnyObject, NSObject}; +use objc2_foundation::NSValue; fn needs_sync() {} fn needs_send() {} diff --git a/crates/test-ui/ui/object_not_send_sync.stderr b/crates/test-ui/ui/object_not_send_sync.stderr index 1bc2ed5a6..0a8998065 100644 --- a/crates/test-ui/ui/object_not_send_sync.stderr +++ b/crates/test-ui/ui/object_not_send_sync.stderr @@ -145,7 +145,7 @@ note: required because it appears within the type `NSObject` | pub struct NSObject { | ^^^^^^^^ note: required because it appears within the type `NSValue` - --> $WORKSPACE/crates/icrate/src/generated/Foundation/NSValue.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generated/NSValue.rs | | pub struct NSValue; | ^^^^^^^ @@ -189,7 +189,7 @@ note: required because it appears within the type `NSObject` | pub struct NSObject { | ^^^^^^^^ note: required because it appears within the type `NSValue` - --> $WORKSPACE/crates/icrate/src/generated/Foundation/NSValue.rs + --> $WORKSPACE/framework-crates/objc2-foundation/src/generated/NSValue.rs | | pub struct NSValue; | ^^^^^^^ diff --git a/crates/test-ui/ui/protocol_object_only_protocols.rs b/crates/test-ui/ui/protocol_object_only_protocols.rs index 03980b90d..f49283ffd 100644 --- a/crates/test-ui/ui/protocol_object_only_protocols.rs +++ b/crates/test-ui/ui/protocol_object_only_protocols.rs @@ -1,6 +1,6 @@ //! Ensure that `ProtocolObject` cannot be incorrectly constructed. -use icrate::Foundation::NSCopying; use objc2::runtime::{NSObject, NSObjectProtocol, ProtocolObject}; +use objc2_foundation::NSCopying; trait Foo { fn foo(&self) {} diff --git a/crates/test-ui/ui/protocol_object_only_protocols.stderr b/crates/test-ui/ui/protocol_object_only_protocols.stderr index f12f72374..59565efaf 100644 --- a/crates/test-ui/ui/protocol_object_only_protocols.stderr +++ b/crates/test-ui/ui/protocol_object_only_protocols.stderr @@ -7,12 +7,12 @@ error[E0277]: the trait bound `NSObject: ImplementedBy` is not satisfi | required by a bound introduced by this call | = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -34,12 +34,12 @@ error[E0277]: the trait bound `dyn Send: ImplementedBy` is not satisfi | required by a bound introduced by this call | = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -61,12 +61,12 @@ error[E0277]: the trait bound `dyn Foo: ImplementedBy` is not satisfie | required by a bound introduced by this call | = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -89,12 +89,12 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely | = help: within `NSObject`, the trait `Send` is not implemented for `*const UnsafeCell<()>`, which is required by `dyn NSObjectProtocol + Send: ImplementedBy` = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -144,12 +144,12 @@ error[E0277]: `UnsafeCell, PhantomPinned)>>` | = help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell, PhantomPinned)>>`, which is required by `dyn NSObjectProtocol + Sync: ImplementedBy` = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -188,12 +188,12 @@ error[E0277]: `UnsafeCell, PhantomPinned)>>` | = help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell, PhantomPinned)>>`, which is required by `dyn NSObjectProtocol + Send + Sync: ImplementedBy` = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -232,12 +232,12 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely | = help: within `NSObject`, the trait `Send` is not implemented for `*const UnsafeCell<()>`, which is required by `dyn NSObjectProtocol + Send + Sync: ImplementedBy` = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others @@ -287,13 +287,13 @@ error[E0277]: the trait bound `NSObject: NSCopying` is not satisfied | = help: the following other types implement trait `NSCopying`: ProtocolObject - NSArray - NSMutableArray - NSDictionary - NSMutableDictionary - NSSet - NSMutableSet - NSCountedSet + NSError + NSNotification + NSString + NSMutableString + NSURLSessionTask + NSURLSessionDataTask + NSURLSessionUploadTask and $N others = note: required for `dyn NSCopying` to implement `ImplementedBy` note: required by a bound in `ProtocolObject::

::from_ref` @@ -314,12 +314,12 @@ error[E0277]: the trait bound `dyn NSCopying + Send: ImplementedBy` is | required by a bound introduced by this call | = help: the following other types implement trait `ImplementedBy`: + (dyn NSCopying + 'static) + (dyn NSMutableCopying + 'static) (dyn NSObjectProtocol + 'static) (dyn NSObjectProtocol + Sync + 'static) (dyn NSObjectProtocol + Send + 'static) (dyn NSObjectProtocol + Send + Sync + 'static) - (dyn NSCopying + 'static) - (dyn NSMutableCopying + 'static) (dyn NSFastEnumeration + 'static) (dyn NSCoding + 'static) and $N others diff --git a/crates/tests/Cargo.toml b/crates/tests/Cargo.toml index 9c1b578e3..bd8cb4473 100644 --- a/crates/tests/Cargo.toml +++ b/crates/tests/Cargo.toml @@ -13,35 +13,34 @@ build = "build.rs" workspace = true [features] -default = ["apple", "std", "Foundation_all"] -std = ["block2/std", "objc2/std", "icrate/std"] -exception = ["objc2/exception", "Foundation_all"] +default = ["apple", "std", "all"] +std = ["block2/std", "objc2/std", "objc2-foundation/std"] +exception = ["objc2/exception", "all"] catch-all = ["objc2/catch-all", "exception"] # TODO: Fix this -Foundation_all = [ - "icrate/Foundation", - "icrate/Foundation_NSException", - "icrate/Foundation_NSArray", - "icrate/Foundation_NSString", - "icrate/Foundation_NSSet", - "icrate/Foundation_NSDictionary", - "icrate/Foundation_NSValue", - "icrate/Foundation_NSObject", +all = [ + "objc2-foundation/Foundation_NSException", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSValue", + "objc2-foundation/Foundation_NSObject", ] -apple = ["block2/apple", "objc2/apple", "icrate/apple"] -gnustep-1-7 = ["block2/gnustep-1-7", "objc2/gnustep-1-7", "icrate/gnustep-1-7"] -gnustep-1-8 = ["gnustep-1-7", "block2/gnustep-1-8", "objc2/gnustep-1-8", "icrate/gnustep-1-8"] -gnustep-1-9 = ["gnustep-1-8", "block2/gnustep-1-9", "objc2/gnustep-1-9", "icrate/gnustep-1-9"] -gnustep-2-0 = ["gnustep-1-9", "block2/gnustep-2-0", "objc2/gnustep-2-0", "icrate/gnustep-2-0"] -gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2/gnustep-2-1", "icrate/gnustep-2-1"] +apple = ["block2/apple", "objc2/apple", "objc2-foundation/apple"] +gnustep-1-7 = ["block2/gnustep-1-7", "objc2/gnustep-1-7", "objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "block2/gnustep-1-8", "objc2/gnustep-1-8", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "block2/gnustep-1-9", "objc2/gnustep-1-9", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "block2/gnustep-2-0", "objc2/gnustep-2-0", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2/gnustep-2-1", "objc2-foundation/gnustep-2-1"] unstable-objfw = ["block2/unstable-objfw", "objc-sys/unstable-objfw"] [dependencies] block2 = { path = "../block2", default-features = false } objc-sys = { path = "../objc-sys", default-features = false } objc2 = { path = "../objc2", default-features = false } -icrate = { path = "../icrate", default-features = false } +objc2-foundation = { path = "../../framework-crates/objc2-foundation", default-features = false } [build-dependencies] cc = "1.0" diff --git a/crates/tests/src/exception.rs b/crates/tests/src/exception.rs index 301d1ade7..d82abef2c 100644 --- a/crates/tests/src/exception.rs +++ b/crates/tests/src/exception.rs @@ -1,11 +1,11 @@ use alloc::format; use alloc::string::ToString; -use icrate::Foundation::{NSArray, NSException, NSString}; use objc2::exception::{catch, throw}; use objc2::msg_send; use objc2::rc::{autoreleasepool, Id}; use objc2::runtime::{NSObject, NSObjectProtocol}; +use objc2_foundation::{NSArray, NSException, NSString}; #[test] #[cfg_attr( diff --git a/crates/tests/src/lib.rs b/crates/tests/src/lib.rs index a7c6738d5..4d60934ec 100644 --- a/crates/tests/src/lib.rs +++ b/crates/tests/src/lib.rs @@ -18,7 +18,7 @@ mod test_declare_class_protocol; #[cfg(test)] mod test_encode_utils; #[cfg(test)] -mod test_icrate_retain_semantics; +mod test_foundation_retain_semantics; #[cfg(test)] mod test_object; diff --git a/crates/tests/src/test_declare_class_protocol.rs b/crates/tests/src/test_declare_class_protocol.rs index c82e520c4..d287120ba 100644 --- a/crates/tests/src/test_declare_class_protocol.rs +++ b/crates/tests/src/test_declare_class_protocol.rs @@ -1,9 +1,9 @@ -#![cfg(feature = "Foundation_all")] -use icrate::Foundation::NSCopying; +#![cfg(feature = "all")] use objc2::mutability::Immutable; use objc2::rc::Id; use objc2::runtime::{NSObject, NSZone}; use objc2::{declare_class, ClassType, DeclaredClass, ProtocolType}; +use objc2_foundation::NSCopying; #[test] #[should_panic = "could not create new class TestDeclareClassDuplicate. Perhaps a class with that name already exists?"] diff --git a/crates/tests/src/test_icrate_retain_semantics.rs b/crates/tests/src/test_foundation_retain_semantics.rs similarity index 99% rename from crates/tests/src/test_icrate_retain_semantics.rs rename to crates/tests/src/test_foundation_retain_semantics.rs index 6a66d91b9..05effc8d4 100644 --- a/crates/tests/src/test_icrate_retain_semantics.rs +++ b/crates/tests/src/test_foundation_retain_semantics.rs @@ -1,14 +1,14 @@ -#![cfg(feature = "Foundation_all")] +#![cfg(feature = "all")] use std::ptr; use std::vec::Vec; -use icrate::Foundation::{ - NSArray, NSCopying, NSMutableArray, NSMutableCopying, NSMutableDictionary, NSMutableSet, - NSNumber, NSSet, NSValue, -}; use objc2::mutability::Immutable; use objc2::rc::{Id, __RcTestObject, __ThreadTestData}; use objc2::{declare_class, extern_methods, ClassType, DeclaredClass}; +use objc2_foundation::{ + NSArray, NSCopying, NSMutableArray, NSMutableCopying, NSMutableDictionary, NSMutableSet, + NSNumber, NSSet, NSValue, +}; #[test] fn array_retains_stored() { diff --git a/crates/tests/src/test_object.rs b/crates/tests/src/test_object.rs index bd2f4a245..5538f40ff 100644 --- a/crates/tests/src/test_object.rs +++ b/crates/tests/src/test_object.rs @@ -2,8 +2,6 @@ use core::mem::{size_of, ManuallyDrop}; use std::os::raw::c_int; -#[cfg(feature = "Foundation_all")] -use icrate::Foundation::NSNumber; use objc2::encode::{Encoding, RefEncode}; use objc2::rc::{autoreleasepool, AutoreleasePool, Id}; use objc2::runtime::{ @@ -13,6 +11,8 @@ use objc2::sel; use objc2::{ class, extern_protocol, msg_send, msg_send_id, mutability, ClassType, Message, ProtocolType, }; +#[cfg(feature = "all")] +use objc2_foundation::NSNumber; extern_protocol!( unsafe trait MyTestProtocol: NSObjectProtocol { @@ -22,11 +22,11 @@ extern_protocol!( #[method(b)] fn b() -> c_int; - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] #[method_id(c)] fn c(&self) -> Id; - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] #[method_id(d)] fn d() -> Id; @@ -38,12 +38,12 @@ extern_protocol!( #[optional] fn f() -> c_int; - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] #[optional] #[method_id(g)] fn g(&self) -> Id; - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] #[optional] #[method_id(h)] fn h() -> Id; @@ -309,15 +309,15 @@ fn test_protocol() { let proto: Id> = ProtocolObject::from_id(obj); assert_eq!(proto.a(), 1); assert_eq!(MyTestObject::b(), 2); - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] assert_eq!(proto.c().as_i32(), 3); - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] assert_eq!(MyTestObject::d().as_i32(), 4); assert_eq!(proto.e(), 5); assert_eq!(MyTestObject::f(), 6); - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] assert_eq!(proto.g().as_i32(), 7); - #[cfg(feature = "Foundation_all")] + #[cfg(feature = "all")] assert_eq!(MyTestObject::h().as_i32(), 8); // Check that transforming to `NSObjectProtocol` works diff --git a/framework-crates/.gitattributes b/framework-crates/.gitattributes new file mode 100644 index 000000000..b3e7ac745 --- /dev/null +++ b/framework-crates/.gitattributes @@ -0,0 +1,3 @@ +*/Cargo.toml linguist-generated +*/README.md linguist-generated +*/src/generated linguist-generated diff --git a/framework-crates/CHANGELOG.md b/framework-crates/CHANGELOG.md new file mode 120000 index 000000000..0262efc43 --- /dev/null +++ b/framework-crates/CHANGELOG.md @@ -0,0 +1 @@ +../crates/objc2/src/topics/about_generated/CHANGELOG.md \ No newline at end of file diff --git a/framework-crates/objc2-accessibility/Cargo.toml b/framework-crates/objc2-accessibility/Cargo.toml new file mode 100644 index 000000000..189e035ad --- /dev/null +++ b/framework-crates/objc2-accessibility/Cargo.toml @@ -0,0 +1,90 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-accessibility" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Accessibility framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +Accessibility_AXAudiograph = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +Accessibility_AXBrailleMap = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +Accessibility_AXColorUtilities = [] +Accessibility_AXCustomContent = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Accessibility_AXFoundation = [] +Accessibility_AXHearingUtilities = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +Accessibility_AXSettings = [ + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +all = [ + "Accessibility_AXAudiograph", + "Accessibility_AXBrailleMap", + "Accessibility_AXColorUtilities", + "Accessibility_AXCustomContent", + "Accessibility_AXFoundation", + "Accessibility_AXHearingUtilities", + "Accessibility_AXSettings", + "block2", +] diff --git a/framework-crates/objc2-accessibility/README.md b/framework-crates/objc2-accessibility/README.md new file mode 100644 index 000000000..fc5d31da4 --- /dev/null +++ b/framework-crates/objc2-accessibility/README.md @@ -0,0 +1,14 @@ +# `objc2-accessibility` + +[![Latest version](https://badgen.net/crates/v/objc2-accessibility)](https://crates.io/crates/objc2-accessibility) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-accessibility/badge.svg)](https://docs.rs/objc2-accessibility/) +[![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 Accessibility. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-accessibility/) 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-accessibility/src/generated b/framework-crates/objc2-accessibility/src/generated new file mode 120000 index 000000000..735be3f27 --- /dev/null +++ b/framework-crates/objc2-accessibility/src/generated @@ -0,0 +1 @@ +../../../generated/Accessibility \ No newline at end of file diff --git a/framework-crates/objc2-accessibility/src/lib.rs b/framework-crates/objc2-accessibility/src/lib.rs new file mode 100644 index 000000000..1508bef4c --- /dev/null +++ b/framework-crates/objc2-accessibility/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `Accessibility` 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/accessibility/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-accessibility/0.2.0")] + +#[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-ad-services/Cargo.toml b/framework-crates/objc2-ad-services/Cargo.toml new file mode 100644 index 000000000..fcd5b7622 --- /dev/null +++ b/framework-crates/objc2-ad-services/Cargo.toml @@ -0,0 +1,51 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-ad-services" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the AdServices framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +AdServices_AAAttribution = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +all = ["AdServices_AAAttribution"] diff --git a/framework-crates/objc2-ad-services/README.md b/framework-crates/objc2-ad-services/README.md new file mode 100644 index 000000000..c986008f3 --- /dev/null +++ b/framework-crates/objc2-ad-services/README.md @@ -0,0 +1,14 @@ +# `objc2-ad-services` + +[![Latest version](https://badgen.net/crates/v/objc2-ad-services)](https://crates.io/crates/objc2-ad-services) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-ad-services/badge.svg)](https://docs.rs/objc2-ad-services/) +[![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 AdServices. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-ad-services/) 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-ad-services/src/generated b/framework-crates/objc2-ad-services/src/generated new file mode 120000 index 000000000..70f623974 --- /dev/null +++ b/framework-crates/objc2-ad-services/src/generated @@ -0,0 +1 @@ +../../../generated/AdServices \ No newline at end of file diff --git a/framework-crates/objc2-ad-services/src/lib.rs b/framework-crates/objc2-ad-services/src/lib.rs new file mode 100644 index 000000000..8ef7b2043 --- /dev/null +++ b/framework-crates/objc2-ad-services/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `AdServices` 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/adservices/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-ad-services/0.2.0")] + +#[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-ad-support/Cargo.toml b/framework-crates/objc2-ad-support/Cargo.toml new file mode 100644 index 000000000..a5eec71ef --- /dev/null +++ b/framework-crates/objc2-ad-support/Cargo.toml @@ -0,0 +1,49 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-ad-support" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the AdSupport framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +AdSupport_ASIdentifierManager = ["objc2-foundation/Foundation_NSUUID"] +all = ["AdSupport_ASIdentifierManager"] diff --git a/framework-crates/objc2-ad-support/README.md b/framework-crates/objc2-ad-support/README.md new file mode 100644 index 000000000..92dee59ac --- /dev/null +++ b/framework-crates/objc2-ad-support/README.md @@ -0,0 +1,14 @@ +# `objc2-ad-support` + +[![Latest version](https://badgen.net/crates/v/objc2-ad-support)](https://crates.io/crates/objc2-ad-support) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-ad-support/badge.svg)](https://docs.rs/objc2-ad-support/) +[![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 AdSupport. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-ad-support/) 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-ad-support/src/generated b/framework-crates/objc2-ad-support/src/generated new file mode 120000 index 000000000..af8da0783 --- /dev/null +++ b/framework-crates/objc2-ad-support/src/generated @@ -0,0 +1 @@ +../../../generated/AdSupport \ No newline at end of file diff --git a/framework-crates/objc2-ad-support/src/lib.rs b/framework-crates/objc2-ad-support/src/lib.rs new file mode 100644 index 000000000..72e252cab --- /dev/null +++ b/framework-crates/objc2-ad-support/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `AdSupport` 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/adsupport/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-ad-support/0.2.0")] + +#[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-app-kit/Cargo.modified.toml b/framework-crates/objc2-app-kit/Cargo.modified.toml new file mode 100644 index 000000000..1fa485cea --- /dev/null +++ b/framework-crates/objc2-app-kit/Cargo.modified.toml @@ -0,0 +1,41 @@ +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false } +block2 = { path = "../../crates/block2", version = "0.4.0", default-features = false, optional = true } + +[features] +default = ["std", "apple"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std", "objc2-core-data?/std"] +alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc", "objc2-core-data?/alloc"] + +# Runtime selection. See `objc-sys` for details. +apple = ["objc2/apple", "block2?/apple", "objc2-foundation/apple", "objc2-core-data?/apple"] +gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7", "objc2-core-data?/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8", "objc2-core-data?/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9", "objc2-foundation/gnustep-1-9", "objc2-core-data?/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0", "objc2-foundation/gnustep-2-0", "objc2-core-data?/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1", "objc2-foundation/gnustep-2-1", "objc2-core-data?/gnustep-2-1"] + +[[example]] +name = "delegate" +required-features = [ + "apple", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSThread", + "AppKit_NSResponder", + "AppKit_NSApplication", + "AppKit_NSRunningApplication", +] + +[[example]] +name = "nspasteboard" +required-features = [ + "apple", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSObject", + "AppKit_NSPasteboard", +] diff --git a/framework-crates/objc2-app-kit/Cargo.toml b/framework-crates/objc2-app-kit/Cargo.toml new file mode 100644 index 000000000..cb68e48dd --- /dev/null +++ b/framework-crates/objc2-app-kit/Cargo.toml @@ -0,0 +1,2077 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-app-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the AppKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false } +block2 = { path = "../../crates/block2", version = "0.4.0", default-features = false, optional = true } +objc2-core-data = { path = "../objc2-core-data", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios-macabi", + "x86_64-unknown-linux-gnu", + "i686-unknown-linux-gnu", +] + +[features] +default = ["std", "apple"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std", "objc2-core-data?/std"] +alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc", "objc2-core-data?/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +apple = ["objc2/apple", "block2?/apple", "objc2-foundation/apple", "objc2-core-data?/apple"] +gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7", "objc2-core-data?/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8", "objc2-core-data?/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9", "objc2-foundation/gnustep-1-9", "objc2-core-data?/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0", "objc2-foundation/gnustep-2-0", "objc2-core-data?/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1", "objc2-foundation/gnustep-2-1", "objc2-core-data?/gnustep-2-1"] +block2 = ["dep:block2"] +objc2-core-data = ["dep:objc2-core-data"] + +AppKit_AppKitDefines = [] +AppKit_AppKitErrors = [] +AppKit_NSATSTypesetter = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", +] +AppKit_NSAccessibility = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAccessibilityColor = ["objc2-foundation/Foundation_NSString"] +AppKit_NSAccessibilityConstants = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAccessibilityCustomAction = ["objc2-foundation/Foundation_NSString"] +AppKit_NSAccessibilityCustomRotor = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAccessibilityElement = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAccessibilityProtocols = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSActionCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAffineTransform = ["objc2-foundation/Foundation_NSAffineTransform"] +AppKit_NSAlert = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAlignmentFeedbackFilter = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", +] +AppKit_NSAnimation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSAnimationContext = ["objc2-foundation/Foundation_NSDate"] +AppKit_NSAppearance = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAppleScriptExtensions = [ + "objc2-foundation/Foundation_NSAppleScript", + "objc2-foundation/Foundation_NSAttributedString", +] +AppKit_NSApplication = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSException", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSUserActivity", +] +AppKit_NSApplicationScripting = ["objc2-foundation/Foundation_NSArray"] +AppKit_NSArrayController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSAttributedString = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSFileWrapper", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSBezierPath = [ + "objc2-foundation/Foundation_NSAffineTransform", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSBitmapImageRep = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSBox = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSBrowser = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSBrowserCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSButton = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSButtonCell = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSButtonTouchBarItem = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSCIImageRep = [] +AppKit_NSCachedImageRep = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSCandidateListTouchBarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSFormatter", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSClickGestureRecognizer = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSClipView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSCollectionView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSCollectionViewCompositionalLayout = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSCollectionViewFlowLayout = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSCollectionViewGridLayout = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSCollectionViewLayout = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSCollectionViewTransitionLayout = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColorList = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSColorPanel = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColorPicker = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColorPickerTouchBarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColorPicking = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColorSampler = [] +AppKit_NSColorSpace = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSColorWell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSComboBox = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSComboBoxCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSComboButton = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSControl = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSFormatter", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSController = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSCursor = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSCustomImageRep = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSCustomTouchBarItem = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDataAsset = [ + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDatePicker = [ + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSTimeZone", +] +AppKit_NSDatePickerCell = [ + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTimeZone", +] +AppKit_NSDictionaryController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDiffableDataSource = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDockTile = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDocument = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSFilePresenter", + "objc2-foundation/Foundation_NSFileVersion", + "objc2-foundation/Foundation_NSFileWrapper", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSUndoManager", +] +AppKit_NSDocumentController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSDocumentScripting = [ + "objc2-foundation/Foundation_NSScriptCommand", + "objc2-foundation/Foundation_NSScriptObjectSpecifiers", + "objc2-foundation/Foundation_NSScriptStandardSuiteCommands", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDragging = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSDraggingItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDraggingSession = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSDrawer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSEPSImageRep = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSErrors = [ + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSEvent = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSFilePromiseProvider = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSFilePromiseReceiver = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSFileWrapperExtensions = ["objc2-foundation/Foundation_NSFileWrapper"] +AppKit_NSFont = [ + "objc2-foundation/Foundation_NSAffineTransform", + "objc2-foundation/Foundation_NSCharacterSet", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSFontAssetRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSProgress", +] +AppKit_NSFontCollection = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSFontDescriptor = [ + "objc2-foundation/Foundation_NSAffineTransform", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSFontManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSFontPanel = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSForm = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSFormCell = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSGestureRecognizer = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSGlyphGenerator = ["objc2-foundation/Foundation_NSAttributedString"] +AppKit_NSGlyphInfo = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSGradient = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSGraphics = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSGraphicsContext = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSGridView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", +] +AppKit_NSGroupTouchBarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSHapticFeedback = [] +AppKit_NSHelpManager = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSImage = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSImageCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSImageRep = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSImageView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSInputManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSInputServer = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSInterfaceStyle = ["objc2-foundation/Foundation_NSString"] +AppKit_NSItemProvider = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSKeyValueBinding = [ + "objc2-core-data?/CoreData_NSAttributeDescription", + "objc2-core-data?/CoreData_NSPropertyDescription", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSLayoutAnchor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSLayoutConstraint = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSLayoutGuide = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSLayoutManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSLevelIndicator = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSLevelIndicatorCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSMagnificationGestureRecognizer = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSMatrix = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSMediaLibraryBrowserController = ["objc2-foundation/Foundation_NSGeometry"] +AppKit_NSMenu = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSZone", +] +AppKit_NSMenuItem = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSMenuItemBadge = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSMenuItemCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSMenuToolbarItem = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSMovie = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSNib = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSNibDeclarations = [] +AppKit_NSNibLoading = [] +AppKit_NSObjectController = [ + "objc2-core-data?/CoreData_NSFetchRequest", + "objc2-core-data?/CoreData_NSManagedObjectContext", + "objc2-core-data?/CoreData_NSPersistentStoreRequest", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSOpenGL = [] +AppKit_NSOpenGLLayer = [] +AppKit_NSOpenGLView = [] +AppKit_NSOpenPanel = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSOutlineView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPDFImageRep = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSPDFInfo = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPDFPanel = ["objc2-foundation/Foundation_NSString"] +AppKit_NSPICTImageRep = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSPageController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPageLayout = ["objc2-foundation/Foundation_NSArray"] +AppKit_NSPanGestureRecognizer = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSPanel = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSParagraphStyle = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCharacterSet", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPasteboard = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSFileWrapper", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPasteboardItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPathCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPathComponentCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPathControl = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPathControlItem = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPersistentDocument = [ + "objc2-core-data?/CoreData_NSManagedObjectContext", + "objc2-core-data?/CoreData_NSManagedObjectModel", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSFilePresenter", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSPickerTouchBarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPopUpButton = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPopUpButtonCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPopover = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPopoverTouchBarItem = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPredicateEditor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSPredicateEditorRowTemplate = [ + "objc2-core-data?/CoreData_NSAttributeDescription", + "objc2-core-data?/CoreData_NSEntityDescription", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSComparisonPredicate", + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSPressGestureRecognizer = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSPressureConfiguration = [] +AppKit_NSPreviewRepresentingActivityItem = [ + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPrintInfo = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPrintOperation = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPrintPanel = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSPrinter = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSProgressIndicator = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSProgress", +] +AppKit_NSResponder = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUndoManager", +] +AppKit_NSRotationGestureRecognizer = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSRuleEditor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSRulerMarker = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSRulerView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSRunningApplication = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSSavePanel = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSScreen = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSScrollView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSScroller = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSScrubber = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSScrubberItemView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSScrubberLayout = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", +] +AppKit_NSSearchField = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSearchFieldCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSearchToolbarItem = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSecureTextField = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSegmentedCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSegmentedControl = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSShadow = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSSharingService = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSSharingServicePickerToolbarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSharingServicePickerTouchBarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSlider = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSliderAccessory = ["objc2-foundation/Foundation_NSObject"] +AppKit_NSSliderCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSliderTouchBarItem = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSound = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSSpeechRecognizer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSpeechSynthesizer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSSpellChecker = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSOrthography", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTextCheckingResult", +] +AppKit_NSSpellProtocol = [] +AppKit_NSSplitView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSplitViewController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSplitViewItem = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSStackView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSStatusBar = ["objc2-foundation/Foundation_NSGeometry"] +AppKit_NSStatusBarButton = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSStatusItem = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSStepper = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSStepperCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSStepperTouchBarItem = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSFormatter", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSStoryboard = [ + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSStoryboardSegue = ["objc2-foundation/Foundation_NSString"] +AppKit_NSStringDrawing = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSSwitch = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTabView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTabViewController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTabViewItem = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTableCellView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTableColumn = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTableHeaderCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTableHeaderView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTableRowView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTableView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AppKit_NSTableViewDiffableDataSource = [] +AppKit_NSTableViewRowAction = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSText = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextAlternatives = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextAttachment = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSFileWrapper", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextAttachmentCell = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextCheckingClient = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextCheckingController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTextCheckingResult", +] +AppKit_NSTextContainer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTextContent = ["objc2-foundation/Foundation_NSString"] +AppKit_NSTextContentManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextElement = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", +] +AppKit_NSTextField = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTextCheckingResult", +] +AppKit_NSTextFieldCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextFinder = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSTextInputClient = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextInputContext = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextInsertionIndicator = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTextLayoutFragment = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSOperation", +] +AppKit_NSTextLayoutManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextLineFragment = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextList = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextListElement = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextRange = ["objc2-foundation/Foundation_NSObjCRuntime"] +AppKit_NSTextSelection = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextSelectionNavigation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextStorage = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTextStorageScripting = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", +] +AppKit_NSTextTable = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", +] +AppKit_NSTextView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSOrthography", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTextCheckingResult", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSUndoManager", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSTextViewportLayoutController = ["objc2-foundation/Foundation_NSGeometry"] +AppKit_NSTintConfiguration = ["objc2-foundation/Foundation_NSObject"] +AppKit_NSTitlebarAccessoryViewController = [ + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTokenField = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCharacterSet", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTokenFieldCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCharacterSet", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSToolbar = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSToolbarItem = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSToolbarItemGroup = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTouch = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTouchBar = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTouchBarItem = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTrackingArea = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSTrackingSeparatorToolbarItem = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTreeController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSTreeNode = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSSortDescriptor", +] +AppKit_NSTypesetter = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSUserActivity = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUserActivity", +] +AppKit_NSUserDefaultsController = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUserDefaults", +] +AppKit_NSUserInterfaceCompression = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSUserInterfaceItemIdentification = ["objc2-foundation/Foundation_NSString"] +AppKit_NSUserInterfaceItemSearching = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSUserInterfaceLayout = [] +AppKit_NSUserInterfaceValidation = [] +AppKit_NSView = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSViewController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSExtensionRequestHandling", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSVisualEffectView = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AppKit_NSWindow = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSUndoManager", + "objc2-foundation/Foundation_NSValue", +] +AppKit_NSWindowController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSWindowRestoration = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSWindowScripting = [ + "objc2-foundation/Foundation_NSScriptCommand", + "objc2-foundation/Foundation_NSScriptStandardSuiteCommands", +] +AppKit_NSWindowTab = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSWindowTabGroup = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +AppKit_NSWorkspace = [ + "objc2-foundation/Foundation_NSAppleEventDescriptor", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSFileManager", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +all = [ + "AppKit_AppKitDefines", + "AppKit_AppKitErrors", + "AppKit_NSATSTypesetter", + "AppKit_NSAccessibility", + "AppKit_NSAccessibilityColor", + "AppKit_NSAccessibilityConstants", + "AppKit_NSAccessibilityCustomAction", + "AppKit_NSAccessibilityCustomRotor", + "AppKit_NSAccessibilityElement", + "AppKit_NSAccessibilityProtocols", + "AppKit_NSActionCell", + "AppKit_NSAffineTransform", + "AppKit_NSAlert", + "AppKit_NSAlignmentFeedbackFilter", + "AppKit_NSAnimation", + "AppKit_NSAnimationContext", + "AppKit_NSAppearance", + "AppKit_NSAppleScriptExtensions", + "AppKit_NSApplication", + "AppKit_NSApplicationScripting", + "AppKit_NSArrayController", + "AppKit_NSAttributedString", + "AppKit_NSBezierPath", + "AppKit_NSBitmapImageRep", + "AppKit_NSBox", + "AppKit_NSBrowser", + "AppKit_NSBrowserCell", + "AppKit_NSButton", + "AppKit_NSButtonCell", + "AppKit_NSButtonTouchBarItem", + "AppKit_NSCIImageRep", + "AppKit_NSCachedImageRep", + "AppKit_NSCandidateListTouchBarItem", + "AppKit_NSCell", + "AppKit_NSClickGestureRecognizer", + "AppKit_NSClipView", + "AppKit_NSCollectionView", + "AppKit_NSCollectionViewCompositionalLayout", + "AppKit_NSCollectionViewFlowLayout", + "AppKit_NSCollectionViewGridLayout", + "AppKit_NSCollectionViewLayout", + "AppKit_NSCollectionViewTransitionLayout", + "AppKit_NSColor", + "AppKit_NSColorList", + "AppKit_NSColorPanel", + "AppKit_NSColorPicker", + "AppKit_NSColorPickerTouchBarItem", + "AppKit_NSColorPicking", + "AppKit_NSColorSampler", + "AppKit_NSColorSpace", + "AppKit_NSColorWell", + "AppKit_NSComboBox", + "AppKit_NSComboBoxCell", + "AppKit_NSComboButton", + "AppKit_NSControl", + "AppKit_NSController", + "AppKit_NSCursor", + "AppKit_NSCustomImageRep", + "AppKit_NSCustomTouchBarItem", + "AppKit_NSDataAsset", + "AppKit_NSDatePicker", + "AppKit_NSDatePickerCell", + "AppKit_NSDictionaryController", + "AppKit_NSDiffableDataSource", + "AppKit_NSDockTile", + "AppKit_NSDocument", + "AppKit_NSDocumentController", + "AppKit_NSDocumentScripting", + "AppKit_NSDragging", + "AppKit_NSDraggingItem", + "AppKit_NSDraggingSession", + "AppKit_NSDrawer", + "AppKit_NSEPSImageRep", + "AppKit_NSErrors", + "AppKit_NSEvent", + "AppKit_NSFilePromiseProvider", + "AppKit_NSFilePromiseReceiver", + "AppKit_NSFileWrapperExtensions", + "AppKit_NSFont", + "AppKit_NSFontAssetRequest", + "AppKit_NSFontCollection", + "AppKit_NSFontDescriptor", + "AppKit_NSFontManager", + "AppKit_NSFontPanel", + "AppKit_NSForm", + "AppKit_NSFormCell", + "AppKit_NSGestureRecognizer", + "AppKit_NSGlyphGenerator", + "AppKit_NSGlyphInfo", + "AppKit_NSGradient", + "AppKit_NSGraphics", + "AppKit_NSGraphicsContext", + "AppKit_NSGridView", + "AppKit_NSGroupTouchBarItem", + "AppKit_NSHapticFeedback", + "AppKit_NSHelpManager", + "AppKit_NSImage", + "AppKit_NSImageCell", + "AppKit_NSImageRep", + "AppKit_NSImageView", + "AppKit_NSInputManager", + "AppKit_NSInputServer", + "AppKit_NSInterfaceStyle", + "AppKit_NSItemProvider", + "AppKit_NSKeyValueBinding", + "AppKit_NSLayoutAnchor", + "AppKit_NSLayoutConstraint", + "AppKit_NSLayoutGuide", + "AppKit_NSLayoutManager", + "AppKit_NSLevelIndicator", + "AppKit_NSLevelIndicatorCell", + "AppKit_NSMagnificationGestureRecognizer", + "AppKit_NSMatrix", + "AppKit_NSMediaLibraryBrowserController", + "AppKit_NSMenu", + "AppKit_NSMenuItem", + "AppKit_NSMenuItemBadge", + "AppKit_NSMenuItemCell", + "AppKit_NSMenuToolbarItem", + "AppKit_NSMovie", + "AppKit_NSNib", + "AppKit_NSNibDeclarations", + "AppKit_NSNibLoading", + "AppKit_NSObjectController", + "AppKit_NSOpenGL", + "AppKit_NSOpenGLLayer", + "AppKit_NSOpenGLView", + "AppKit_NSOpenPanel", + "AppKit_NSOutlineView", + "AppKit_NSPDFImageRep", + "AppKit_NSPDFInfo", + "AppKit_NSPDFPanel", + "AppKit_NSPICTImageRep", + "AppKit_NSPageController", + "AppKit_NSPageLayout", + "AppKit_NSPanGestureRecognizer", + "AppKit_NSPanel", + "AppKit_NSParagraphStyle", + "AppKit_NSPasteboard", + "AppKit_NSPasteboardItem", + "AppKit_NSPathCell", + "AppKit_NSPathComponentCell", + "AppKit_NSPathControl", + "AppKit_NSPathControlItem", + "AppKit_NSPersistentDocument", + "AppKit_NSPickerTouchBarItem", + "AppKit_NSPopUpButton", + "AppKit_NSPopUpButtonCell", + "AppKit_NSPopover", + "AppKit_NSPopoverTouchBarItem", + "AppKit_NSPredicateEditor", + "AppKit_NSPredicateEditorRowTemplate", + "AppKit_NSPressGestureRecognizer", + "AppKit_NSPressureConfiguration", + "AppKit_NSPreviewRepresentingActivityItem", + "AppKit_NSPrintInfo", + "AppKit_NSPrintOperation", + "AppKit_NSPrintPanel", + "AppKit_NSPrinter", + "AppKit_NSProgressIndicator", + "AppKit_NSResponder", + "AppKit_NSRotationGestureRecognizer", + "AppKit_NSRuleEditor", + "AppKit_NSRulerMarker", + "AppKit_NSRulerView", + "AppKit_NSRunningApplication", + "AppKit_NSSavePanel", + "AppKit_NSScreen", + "AppKit_NSScrollView", + "AppKit_NSScroller", + "AppKit_NSScrubber", + "AppKit_NSScrubberItemView", + "AppKit_NSScrubberLayout", + "AppKit_NSSearchField", + "AppKit_NSSearchFieldCell", + "AppKit_NSSearchToolbarItem", + "AppKit_NSSecureTextField", + "AppKit_NSSegmentedCell", + "AppKit_NSSegmentedControl", + "AppKit_NSShadow", + "AppKit_NSSharingService", + "AppKit_NSSharingServicePickerToolbarItem", + "AppKit_NSSharingServicePickerTouchBarItem", + "AppKit_NSSlider", + "AppKit_NSSliderAccessory", + "AppKit_NSSliderCell", + "AppKit_NSSliderTouchBarItem", + "AppKit_NSSound", + "AppKit_NSSpeechRecognizer", + "AppKit_NSSpeechSynthesizer", + "AppKit_NSSpellChecker", + "AppKit_NSSpellProtocol", + "AppKit_NSSplitView", + "AppKit_NSSplitViewController", + "AppKit_NSSplitViewItem", + "AppKit_NSStackView", + "AppKit_NSStatusBar", + "AppKit_NSStatusBarButton", + "AppKit_NSStatusItem", + "AppKit_NSStepper", + "AppKit_NSStepperCell", + "AppKit_NSStepperTouchBarItem", + "AppKit_NSStoryboard", + "AppKit_NSStoryboardSegue", + "AppKit_NSStringDrawing", + "AppKit_NSSwitch", + "AppKit_NSTabView", + "AppKit_NSTabViewController", + "AppKit_NSTabViewItem", + "AppKit_NSTableCellView", + "AppKit_NSTableColumn", + "AppKit_NSTableHeaderCell", + "AppKit_NSTableHeaderView", + "AppKit_NSTableRowView", + "AppKit_NSTableView", + "AppKit_NSTableViewDiffableDataSource", + "AppKit_NSTableViewRowAction", + "AppKit_NSText", + "AppKit_NSTextAlternatives", + "AppKit_NSTextAttachment", + "AppKit_NSTextAttachmentCell", + "AppKit_NSTextCheckingClient", + "AppKit_NSTextCheckingController", + "AppKit_NSTextContainer", + "AppKit_NSTextContent", + "AppKit_NSTextContentManager", + "AppKit_NSTextElement", + "AppKit_NSTextField", + "AppKit_NSTextFieldCell", + "AppKit_NSTextFinder", + "AppKit_NSTextInputClient", + "AppKit_NSTextInputContext", + "AppKit_NSTextInsertionIndicator", + "AppKit_NSTextLayoutFragment", + "AppKit_NSTextLayoutManager", + "AppKit_NSTextLineFragment", + "AppKit_NSTextList", + "AppKit_NSTextListElement", + "AppKit_NSTextRange", + "AppKit_NSTextSelection", + "AppKit_NSTextSelectionNavigation", + "AppKit_NSTextStorage", + "AppKit_NSTextStorageScripting", + "AppKit_NSTextTable", + "AppKit_NSTextView", + "AppKit_NSTextViewportLayoutController", + "AppKit_NSTintConfiguration", + "AppKit_NSTitlebarAccessoryViewController", + "AppKit_NSTokenField", + "AppKit_NSTokenFieldCell", + "AppKit_NSToolbar", + "AppKit_NSToolbarItem", + "AppKit_NSToolbarItemGroup", + "AppKit_NSTouch", + "AppKit_NSTouchBar", + "AppKit_NSTouchBarItem", + "AppKit_NSTrackingArea", + "AppKit_NSTrackingSeparatorToolbarItem", + "AppKit_NSTreeController", + "AppKit_NSTreeNode", + "AppKit_NSTypesetter", + "AppKit_NSUserActivity", + "AppKit_NSUserDefaultsController", + "AppKit_NSUserInterfaceCompression", + "AppKit_NSUserInterfaceItemIdentification", + "AppKit_NSUserInterfaceItemSearching", + "AppKit_NSUserInterfaceLayout", + "AppKit_NSUserInterfaceValidation", + "AppKit_NSView", + "AppKit_NSViewController", + "AppKit_NSVisualEffectView", + "AppKit_NSWindow", + "AppKit_NSWindowController", + "AppKit_NSWindowRestoration", + "AppKit_NSWindowScripting", + "AppKit_NSWindowTab", + "AppKit_NSWindowTabGroup", + "AppKit_NSWorkspace", + "block2", + "objc2-core-data", +] + +[[example]] +name = "delegate" +required-features = [ + "apple", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSThread", + "AppKit_NSResponder", + "AppKit_NSApplication", + "AppKit_NSRunningApplication", +] + +[[example]] +name = "nspasteboard" +required-features = [ + "apple", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSObject", + "AppKit_NSPasteboard", +] diff --git a/framework-crates/objc2-app-kit/README.md b/framework-crates/objc2-app-kit/README.md new file mode 100644 index 000000000..1d8408213 --- /dev/null +++ b/framework-crates/objc2-app-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-app-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-app-kit)](https://crates.io/crates/objc2-app-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-app-kit/badge.svg)](https://docs.rs/objc2-app-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 AppKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-app-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/crates/icrate/examples/delegate.rs b/framework-crates/objc2-app-kit/examples/delegate.rs similarity index 95% rename from crates/icrate/examples/delegate.rs rename to framework-crates/objc2-app-kit/examples/delegate.rs index b93409c76..36c7ceba2 100644 --- a/crates/icrate/examples/delegate.rs +++ b/framework-crates/objc2-app-kit/examples/delegate.rs @@ -1,11 +1,11 @@ #![deny(unsafe_op_in_unsafe_fn)] -use icrate::AppKit::{NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate}; -use icrate::Foundation::{ - ns_string, MainThreadMarker, NSCopying, NSNotification, NSObject, NSObjectProtocol, NSString, -}; use objc2::rc::Id; use objc2::runtime::ProtocolObject; use objc2::{declare_class, msg_send_id, mutability, ClassType, DeclaredClass}; +use objc2_app_kit::{NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate}; +use objc2_foundation::{ + ns_string, MainThreadMarker, NSCopying, NSNotification, NSObject, NSObjectProtocol, NSString, +}; #[derive(Debug)] #[allow(unused)] diff --git a/crates/icrate/examples/nspasteboard.rs b/framework-crates/objc2-app-kit/examples/nspasteboard.rs similarity index 90% rename from crates/icrate/examples/nspasteboard.rs rename to framework-crates/objc2-app-kit/examples/nspasteboard.rs index afa8d7377..6040660b5 100644 --- a/crates/icrate/examples/nspasteboard.rs +++ b/framework-crates/objc2-app-kit/examples/nspasteboard.rs @@ -3,11 +3,11 @@ //! Works on macOS 10.7+ #![deny(unsafe_op_in_unsafe_fn)] -use icrate::AppKit::{NSPasteboard, NSPasteboardTypeString}; -use icrate::Foundation::{NSArray, NSCopying, NSString}; use objc2::rc::Id; use objc2::runtime::{AnyClass, AnyObject, ProtocolObject}; use objc2::ClassType; +use objc2_app_kit::{NSPasteboard, NSPasteboardTypeString}; +use objc2_foundation::{NSArray, NSCopying, NSString}; /// Simplest implementation pub fn get_text_1(pasteboard: &NSPasteboard) -> Option> { @@ -19,8 +19,8 @@ pub fn get_text_1(pasteboard: &NSPasteboard) -> Option> { /// nitty-gritty details. pub fn get_text_2(pasteboard: &NSPasteboard) -> Option> { // The NSPasteboard API is a bit weird, it requires you to pass classes as - // objects, which `icrate::Foundation::NSArray` was not really made for - - // so we convert the class to an `AnyObject` type instead. + // objects, which `objc2_foundation::NSArray` was not really made for - so + // we convert the class to an `AnyObject` type instead. // // TODO: Investigate and find a better way to express this in `objc2`. let string_class = { diff --git a/framework-crates/objc2-app-kit/src/application.rs b/framework-crates/objc2-app-kit/src/application.rs new file mode 100644 index 000000000..eec4658ea --- /dev/null +++ b/framework-crates/objc2-app-kit/src/application.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "AppKit_NSResponder")] +pub fn NSApp(mtm: objc2_foundation::MainThreadMarker) -> objc2::rc::Id { + // TODO: Use the `NSApp` static + crate::NSApplication::sharedApplication(mtm) +} diff --git a/framework-crates/objc2-app-kit/src/generated b/framework-crates/objc2-app-kit/src/generated new file mode 120000 index 000000000..b15ea6531 --- /dev/null +++ b/framework-crates/objc2-app-kit/src/generated @@ -0,0 +1 @@ +../../../generated/AppKit \ No newline at end of file diff --git a/crates/icrate/src/additions/AppKit/image.rs b/framework-crates/objc2-app-kit/src/image.rs similarity index 81% rename from crates/icrate/src/additions/AppKit/image.rs rename to framework-crates/objc2-app-kit/src/image.rs index f5fd9f9ef..a14a9d140 100644 --- a/crates/icrate/src/additions/AppKit/image.rs +++ b/framework-crates/objc2-app-kit/src/image.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "objc2")] use objc2::encode::{Encode, Encoding, RefEncode}; use objc2::ffi::NSInteger; @@ -9,12 +8,10 @@ use super::TARGET_ABI_USES_IOS_VALUES; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct NSImageResizingMode(pub NSInteger); -#[cfg(feature = "objc2")] unsafe impl Encode for NSImageResizingMode { const ENCODING: Encoding = NSInteger::ENCODING; } -#[cfg(feature = "objc2")] unsafe impl RefEncode for NSImageResizingMode { const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } @@ -28,5 +25,4 @@ impl NSImageResizingMode { pub const Tile: Self = Self(if TARGET_ABI_USES_IOS_VALUES { 1 } else { 0 }); } -#[cfg(feature = "Foundation_NSObject")] -unsafe impl crate::Foundation::NSCoding for crate::AppKit::NSImage {} +unsafe impl objc2_foundation::NSCoding for crate::NSImage {} diff --git a/crates/icrate/src/additions/AppKit/mod.rs b/framework-crates/objc2-app-kit/src/lib.rs similarity index 69% rename from crates/icrate/src/additions/AppKit/mod.rs rename to framework-crates/objc2-app-kit/src/lib.rs index 62ad2afe2..7d1f59cc0 100644 --- a/crates/icrate/src/additions/AppKit/mod.rs +++ b/framework-crates/objc2-app-kit/src/lib.rs @@ -1,5 +1,10 @@ //! # Bindings to the `AppKit` 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/appkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +//! //! Note that a lot of functionality in AppKit requires that the application //! has initialized properly, which is only done after the application //! delegate has received `applicationDidFinishLaunching`. @@ -20,21 +25,28 @@ //! Implementing `NSApplicationDelegate` for a custom class. //! //! ```ignore -#![doc = include_str!("../../../examples/delegate.rs")] +#![doc = include_str!("../examples/delegate.rs")] //! ``` //! //! An example showing basic and a bit more advanced usage of `NSPasteboard`. //! //! ```ignore -#![doc = include_str!("../../../examples/nspasteboard.rs")] +#![doc = include_str!("../examples/nspasteboard.rs")] //! ``` +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-app-kit/0.2.0")] +#![recursion_limit = "512"] #![allow(non_snake_case)] #![allow(unused_imports)] #![allow(unreachable_pub)] -#[allow(unreachable_pub)] -#[allow(unused_imports)] -pub use crate::generated::AppKit::*; +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; #[cfg_attr(feature = "gnustep-1-7", link(name = "gnustep-gui", kind = "dylib"))] extern "C" {} @@ -49,6 +61,7 @@ pub(crate) const TARGET_ABI_USES_IOS_VALUES: bool = #[cfg(feature = "AppKit_NSApplication")] mod application; +mod generated; #[cfg(feature = "AppKit_NSImage")] mod image; #[cfg(feature = "AppKit_NSText")] @@ -56,17 +69,22 @@ mod text; #[cfg(feature = "AppKit_NSApplication")] pub use self::application::*; +pub use self::generated::*; #[cfg(feature = "AppKit_NSImage")] pub use self::image::*; #[cfg(feature = "AppKit_NSText")] pub use self::text::*; +// MacTypes.h +#[allow(unused)] +pub(crate) type UTF32Char = u32; // Or maybe Rust's char? + #[cfg(test)] mod tests { #[test] #[cfg(feature = "AppKit_NSAccessibilityProtocols")] fn accessibility_element_protocol() { - use crate::AppKit::NSAccessibilityElementProtocol; + use crate::NSAccessibilityElementProtocol; use objc2::ProtocolType; let actual = ::NAME; assert_eq!(actual, "NSAccessibilityElement"); diff --git a/crates/icrate/src/additions/AppKit/text.rs b/framework-crates/objc2-app-kit/src/text.rs similarity index 93% rename from crates/icrate/src/additions/AppKit/text.rs rename to framework-crates/objc2-app-kit/src/text.rs index 4033f1b1f..c378093e4 100644 --- a/crates/icrate/src/additions/AppKit/text.rs +++ b/framework-crates/objc2-app-kit/src/text.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "objc2")] use objc2::encode::{Encode, Encoding, RefEncode}; use objc2::ffi::NSInteger; @@ -9,12 +8,10 @@ use super::TARGET_ABI_USES_IOS_VALUES; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct NSTextAlignment(pub NSInteger); -#[cfg(feature = "objc2")] unsafe impl Encode for NSTextAlignment { const ENCODING: Encoding = NSInteger::ENCODING; } -#[cfg(feature = "objc2")] unsafe impl RefEncode for NSTextAlignment { const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } diff --git a/framework-crates/objc2-authentication-services/Cargo.toml b/framework-crates/objc2-authentication-services/Cargo.toml new file mode 100644 index 000000000..7f17b83b4 --- /dev/null +++ b/framework-crates/objc2-authentication-services/Cargo.toml @@ -0,0 +1,469 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-authentication-services" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the AuthenticationServices framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +AuthenticationServices_ASAccountAuthenticationModificationController = [ + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSWindow", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", +] +AuthenticationServices_ASAccountAuthenticationModificationExtensionContext = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAccountAuthenticationModificationRequest = [] +AuthenticationServices_ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAccountAuthenticationModificationViewController = [ + "objc2-app-kit/AppKit_NSKeyValueBinding", + "objc2-app-kit/AppKit_NSNib", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSStoryboardSegue", + "objc2-app-kit/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorization = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationAppleIDButton = [ + "objc2-app-kit/AppKit_NSAccessibilityProtocols", + "objc2-app-kit/AppKit_NSAnimation", + "objc2-app-kit/AppKit_NSAppearance", + "objc2-app-kit/AppKit_NSControl", + "objc2-app-kit/AppKit_NSDragging", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationAppleIDCredential = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPersonNameComponents", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationAppleIDProvider = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationAppleIDRequest = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationController = [ + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSWindow", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationCredential = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationCustomMethod = ["objc2-foundation/Foundation_NSString"] +AuthenticationServices_ASAuthorizationError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationOpenIDRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationPasswordProvider = [] +AuthenticationServices_ASAuthorizationPasswordRequest = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertion = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertionRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialDescriptor = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialProvider = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistration = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationProvider = [] +AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationRequest = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLResponse", +] +AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLResponse", +] +AuthenticationServices_ASAuthorizationProviderExtensionLoginConfiguration = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AuthenticationServices_ASAuthorizationProviderExtensionLoginManager = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationProviderExtensionRegistrationHandler = ["objc2-foundation/Foundation_NSString"] +AuthenticationServices_ASAuthorizationProviderExtensionUserLoginConfiguration = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertion = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertionRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationPublicKeyCredentialConstants = ["objc2-foundation/Foundation_NSString"] +AuthenticationServices_ASAuthorizationPublicKeyCredentialDescriptor = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput = ["objc2-foundation/Foundation_NSData"] +AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput = ["objc2-foundation/Foundation_NSData"] +AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput = [] +AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationOutput = [] +AuthenticationServices_ASAuthorizationPublicKeyCredentialParameters = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistration = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistrationRequest = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationRequest = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertion = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialProvider = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistration = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationSingleSignOnCredential = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLResponse", +] +AuthenticationServices_ASAuthorizationSingleSignOnProvider = ["objc2-foundation/Foundation_NSURL"] +AuthenticationServices_ASAuthorizationSingleSignOnRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURL", +] +AuthenticationServices_ASAuthorizationWebBrowserExternallyAuthenticatableRequest = [] +AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredential = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialAssertionRequest = [] +AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialRegistrationRequest = ["objc2-foundation/Foundation_NSArray"] +AuthenticationServices_ASAuthorizationWebBrowserPublicKeyCredentialManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialAssertionRequest = [] +AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialProvider = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialRegistrationRequest = [] +AuthenticationServices_ASCOSEConstants = [] +AuthenticationServices_ASCredentialIdentity = ["objc2-foundation/Foundation_NSString"] +AuthenticationServices_ASCredentialIdentityStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASCredentialIdentityStoreState = [] +AuthenticationServices_ASCredentialProviderExtensionContext = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionContext", +] +AuthenticationServices_ASCredentialProviderViewController = [ + "objc2-app-kit/AppKit_NSKeyValueBinding", + "objc2-app-kit/AppKit_NSNib", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSStoryboardSegue", + "objc2-app-kit/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit/AppKit_NSViewController", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASCredentialRequest = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASCredentialServiceIdentifier = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASExtensionErrors = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASFoundation = [] +AuthenticationServices_ASPasskeyAssertionCredential = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASPasskeyCredentialIdentity = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASPasskeyCredentialRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +AuthenticationServices_ASPasskeyCredentialRequestParameters = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASPasskeyRegistrationCredential = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASPasswordCredential = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASPasswordCredentialIdentity = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASPasswordCredentialRequest = ["objc2-foundation/Foundation_NSObject"] +AuthenticationServices_ASPublicKeyCredential = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +AuthenticationServices_ASPublicKeyCredentialClientData = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +AuthenticationServices_ASSettingsHelper = ["objc2-foundation/Foundation_NSError"] +AuthenticationServices_ASWebAuthenticationSession = [ + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSWindow", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AuthenticationServices_ASWebAuthenticationSessionCallback = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +AuthenticationServices_ASWebAuthenticationSessionRequest = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSUUID", +] +AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionHandling = [] +AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager = [] +all = [ + "AuthenticationServices_ASAccountAuthenticationModificationController", + "AuthenticationServices_ASAccountAuthenticationModificationExtensionContext", + "AuthenticationServices_ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest", + "AuthenticationServices_ASAccountAuthenticationModificationRequest", + "AuthenticationServices_ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest", + "AuthenticationServices_ASAccountAuthenticationModificationViewController", + "AuthenticationServices_ASAuthorization", + "AuthenticationServices_ASAuthorizationAppleIDButton", + "AuthenticationServices_ASAuthorizationAppleIDCredential", + "AuthenticationServices_ASAuthorizationAppleIDProvider", + "AuthenticationServices_ASAuthorizationAppleIDRequest", + "AuthenticationServices_ASAuthorizationController", + "AuthenticationServices_ASAuthorizationCredential", + "AuthenticationServices_ASAuthorizationCustomMethod", + "AuthenticationServices_ASAuthorizationError", + "AuthenticationServices_ASAuthorizationOpenIDRequest", + "AuthenticationServices_ASAuthorizationPasswordProvider", + "AuthenticationServices_ASAuthorizationPasswordRequest", + "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertion", + "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertionRequest", + "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialDescriptor", + "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialProvider", + "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistration", + "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest", + "AuthenticationServices_ASAuthorizationProvider", + "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationRequest", + "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult", + "AuthenticationServices_ASAuthorizationProviderExtensionLoginConfiguration", + "AuthenticationServices_ASAuthorizationProviderExtensionLoginManager", + "AuthenticationServices_ASAuthorizationProviderExtensionRegistrationHandler", + "AuthenticationServices_ASAuthorizationProviderExtensionUserLoginConfiguration", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertion", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialAssertionRequest", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialConstants", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialDescriptor", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialLargeBlobRegistrationOutput", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialParameters", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistration", + "AuthenticationServices_ASAuthorizationPublicKeyCredentialRegistrationRequest", + "AuthenticationServices_ASAuthorizationRequest", + "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertion", + "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest", + "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor", + "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialProvider", + "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistration", + "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest", + "AuthenticationServices_ASAuthorizationSingleSignOnCredential", + "AuthenticationServices_ASAuthorizationSingleSignOnProvider", + "AuthenticationServices_ASAuthorizationSingleSignOnRequest", + "AuthenticationServices_ASAuthorizationWebBrowserExternallyAuthenticatableRequest", + "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredential", + "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialAssertionRequest", + "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider", + "AuthenticationServices_ASAuthorizationWebBrowserPlatformPublicKeyCredentialRegistrationRequest", + "AuthenticationServices_ASAuthorizationWebBrowserPublicKeyCredentialManager", + "AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialAssertionRequest", + "AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialProvider", + "AuthenticationServices_ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialRegistrationRequest", + "AuthenticationServices_ASCOSEConstants", + "AuthenticationServices_ASCredentialIdentity", + "AuthenticationServices_ASCredentialIdentityStore", + "AuthenticationServices_ASCredentialIdentityStoreState", + "AuthenticationServices_ASCredentialProviderExtensionContext", + "AuthenticationServices_ASCredentialProviderViewController", + "AuthenticationServices_ASCredentialRequest", + "AuthenticationServices_ASCredentialServiceIdentifier", + "AuthenticationServices_ASExtensionErrors", + "AuthenticationServices_ASFoundation", + "AuthenticationServices_ASPasskeyAssertionCredential", + "AuthenticationServices_ASPasskeyCredentialIdentity", + "AuthenticationServices_ASPasskeyCredentialRequest", + "AuthenticationServices_ASPasskeyCredentialRequestParameters", + "AuthenticationServices_ASPasskeyRegistrationCredential", + "AuthenticationServices_ASPasswordCredential", + "AuthenticationServices_ASPasswordCredentialIdentity", + "AuthenticationServices_ASPasswordCredentialRequest", + "AuthenticationServices_ASPublicKeyCredential", + "AuthenticationServices_ASPublicKeyCredentialClientData", + "AuthenticationServices_ASSettingsHelper", + "AuthenticationServices_ASWebAuthenticationSession", + "AuthenticationServices_ASWebAuthenticationSessionCallback", + "AuthenticationServices_ASWebAuthenticationSessionRequest", + "AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionHandling", + "AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager", + "block2", +] diff --git a/framework-crates/objc2-authentication-services/README.md b/framework-crates/objc2-authentication-services/README.md new file mode 100644 index 000000000..5feaecdb1 --- /dev/null +++ b/framework-crates/objc2-authentication-services/README.md @@ -0,0 +1,14 @@ +# `objc2-authentication-services` + +[![Latest version](https://badgen.net/crates/v/objc2-authentication-services)](https://crates.io/crates/objc2-authentication-services) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-authentication-services/badge.svg)](https://docs.rs/objc2-authentication-services/) +[![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 AuthenticationServices. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-authentication-services/) 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-authentication-services/src/generated b/framework-crates/objc2-authentication-services/src/generated new file mode 120000 index 000000000..db2452181 --- /dev/null +++ b/framework-crates/objc2-authentication-services/src/generated @@ -0,0 +1 @@ +../../../generated/AuthenticationServices \ No newline at end of file diff --git a/framework-crates/objc2-authentication-services/src/lib.rs b/framework-crates/objc2-authentication-services/src/lib.rs new file mode 100644 index 000000000..08fd902d7 --- /dev/null +++ b/framework-crates/objc2-authentication-services/src/lib.rs @@ -0,0 +1,72 @@ +//! # Bindings to the `AuthenticationServices` 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/authenticationservices/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-authentication-services/0.2.0")] +#![allow(unused_imports)] +#![allow(dead_code)] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; + +use objc2::runtime::NSObject; +use objc2::{extern_class, mutability, ClassType}; + +// TODO: UIViewController on iOS, NSViewController on macOS +pub type ASViewController = NSObject; +// TODO: UIWindow on iOS, NSWindow on macOS +pub type ASPresentationAnchor = NSObject; +// TODO: UIImage on iOS, NSImage on macOS +pub type ASImage = NSObject; + +// TODO: UIControl on iOS, NSControl on macOS +#[cfg(feature = "AuthenticationServices_ASAuthorizationAppleIDButton")] +type ASControl = NSObject; + +extern_class!( + #[derive(Debug, PartialEq, Eq, Hash)] + #[cfg(feature = "AuthenticationServices_ASCredentialProviderViewController")] + pub struct ASCredentialProviderViewController; + + #[cfg(feature = "AuthenticationServices_ASCredentialProviderViewController")] + unsafe impl ClassType for ASCredentialProviderViewController { + type Super = ASViewController; + type Mutability = mutability::MainThreadOnly; + } +); + +extern_class!( + #[derive(Debug, PartialEq, Eq, Hash)] + #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationViewController")] + pub struct ASAccountAuthenticationModificationViewController; + + #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationViewController")] + unsafe impl ClassType for ASAccountAuthenticationModificationViewController { + type Super = ASViewController; + type Mutability = mutability::MainThreadOnly; + } +); + +extern_class!( + #[derive(Debug, PartialEq, Eq, Hash)] + #[cfg(feature = "AuthenticationServices_ASAuthorizationAppleIDButton")] + pub struct ASAuthorizationAppleIDButton; + + #[cfg(feature = "AuthenticationServices_ASAuthorizationAppleIDButton")] + unsafe impl ClassType for ASAuthorizationAppleIDButton { + type Super = ASControl; + type Mutability = mutability::MainThreadOnly; + } +); diff --git a/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml b/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml new file mode 100644 index 000000000..84518e40e --- /dev/null +++ b/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml @@ -0,0 +1,71 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-automatic-assessment-configuration" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the AutomaticAssessmentConfiguration framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +AutomaticAssessmentConfiguration_AEAssessmentApplication = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +AutomaticAssessmentConfiguration_AEAssessmentConfiguration = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", +] +AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration = ["objc2-foundation/Foundation_NSObject"] +AutomaticAssessmentConfiguration_AEAssessmentSession = [] +AutomaticAssessmentConfiguration_AEAssessmentSessionDelegate = ["objc2-foundation/Foundation_NSError"] +AutomaticAssessmentConfiguration_AEErrors = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +AutomaticAssessmentConfiguration_AEVisibility = [] +all = [ + "AutomaticAssessmentConfiguration_AEAssessmentApplication", + "AutomaticAssessmentConfiguration_AEAssessmentConfiguration", + "AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration", + "AutomaticAssessmentConfiguration_AEAssessmentSession", + "AutomaticAssessmentConfiguration_AEAssessmentSessionDelegate", + "AutomaticAssessmentConfiguration_AEErrors", + "AutomaticAssessmentConfiguration_AEVisibility", +] diff --git a/framework-crates/objc2-automatic-assessment-configuration/README.md b/framework-crates/objc2-automatic-assessment-configuration/README.md new file mode 100644 index 000000000..b76963142 --- /dev/null +++ b/framework-crates/objc2-automatic-assessment-configuration/README.md @@ -0,0 +1,14 @@ +# `objc2-automatic-assessment-configuration` + +[![Latest version](https://badgen.net/crates/v/objc2-automatic-assessment-configuration)](https://crates.io/crates/objc2-automatic-assessment-configuration) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-automatic-assessment-configuration/badge.svg)](https://docs.rs/objc2-automatic-assessment-configuration/) +[![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 AutomaticAssessmentConfiguration. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-automatic-assessment-configuration/) 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-automatic-assessment-configuration/src/generated b/framework-crates/objc2-automatic-assessment-configuration/src/generated new file mode 120000 index 000000000..3f292a2fd --- /dev/null +++ b/framework-crates/objc2-automatic-assessment-configuration/src/generated @@ -0,0 +1 @@ +../../../generated/AutomaticAssessmentConfiguration \ No newline at end of file diff --git a/framework-crates/objc2-automatic-assessment-configuration/src/lib.rs b/framework-crates/objc2-automatic-assessment-configuration/src/lib.rs new file mode 100644 index 000000000..684e219bd --- /dev/null +++ b/framework-crates/objc2-automatic-assessment-configuration/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `AutomaticAssessmentConfiguration` 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/automaticassessmentconfiguration/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-automatic-assessment-configuration/0.2.0")] + +#[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-automator/Cargo.toml b/framework-crates/objc2-automator/Cargo.toml new file mode 100644 index 000000000..a6f911413 --- /dev/null +++ b/framework-crates/objc2-automator/Cargo.toml @@ -0,0 +1,127 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-automator" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Automator framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-osa-kit = { path = "../objc2-osa-kit", version = "0.2.0", optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +objc2-app-kit = ["dep:objc2-app-kit"] +objc2-osa-kit = ["dep:objc2-osa-kit"] + +Automator_AMAction = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Automator_AMAppleScriptAction = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-osa-kit?/OSAKit_OSAScript", +] +Automator_AMAttributesForAnalyzer = [] +Automator_AMBundleAction = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Automator_AMShellScriptAction = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Automator_AMWorkflow = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Automator_AMWorkflowController = [ + "objc2-app-kit?/AppKit_NSController", + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", +] +Automator_AMWorkflowView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSController", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +Automator_AMWorkspace = [] +Automator_AutomatorErrors = [] +all = [ + "Automator_AMAction", + "Automator_AMAppleScriptAction", + "Automator_AMAttributesForAnalyzer", + "Automator_AMBundleAction", + "Automator_AMShellScriptAction", + "Automator_AMWorkflow", + "Automator_AMWorkflowController", + "Automator_AMWorkflowView", + "Automator_AMWorkspace", + "Automator_AutomatorErrors", + "objc2-app-kit", + "objc2-osa-kit", +] diff --git a/framework-crates/objc2-automator/README.md b/framework-crates/objc2-automator/README.md new file mode 100644 index 000000000..ce06ce9b0 --- /dev/null +++ b/framework-crates/objc2-automator/README.md @@ -0,0 +1,14 @@ +# `objc2-automator` + +[![Latest version](https://badgen.net/crates/v/objc2-automator)](https://crates.io/crates/objc2-automator) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-automator/badge.svg)](https://docs.rs/objc2-automator/) +[![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 Automator. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-automator/) 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-automator/src/generated b/framework-crates/objc2-automator/src/generated new file mode 120000 index 000000000..12af18239 --- /dev/null +++ b/framework-crates/objc2-automator/src/generated @@ -0,0 +1 @@ +../../../generated/Automator \ No newline at end of file diff --git a/framework-crates/objc2-automator/src/lib.rs b/framework-crates/objc2-automator/src/lib.rs new file mode 100644 index 000000000..13d25eb9f --- /dev/null +++ b/framework-crates/objc2-automator/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `Automator` 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/automator/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-automator/0.2.0")] + +#[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-background-assets/Cargo.toml b/framework-crates/objc2-background-assets/Cargo.toml new file mode 100644 index 000000000..f6911fade --- /dev/null +++ b/framework-crates/objc2-background-assets/Cargo.toml @@ -0,0 +1,92 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-background-assets" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the BackgroundAssets framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +BackgroundAssets_BAAppExtensionInfo = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSValue", +] +BackgroundAssets_BABase = [] +BackgroundAssets_BADownload = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +BackgroundAssets_BADownloadManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLAuthenticationChallenge", + "objc2-foundation/Foundation_NSURLCredential", + "objc2-foundation/Foundation_NSURLSession", +] +BackgroundAssets_BADownloaderExtension = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLAuthenticationChallenge", + "objc2-foundation/Foundation_NSURLCredential", + "objc2-foundation/Foundation_NSURLSession", +] +BackgroundAssets_BAError = ["objc2-foundation/Foundation_NSString"] +BackgroundAssets_BATypes = [] +BackgroundAssets_BAURLDownload = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLRequest", +] +all = [ + "BackgroundAssets_BAAppExtensionInfo", + "BackgroundAssets_BABase", + "BackgroundAssets_BADownload", + "BackgroundAssets_BADownloadManager", + "BackgroundAssets_BADownloaderExtension", + "BackgroundAssets_BAError", + "BackgroundAssets_BATypes", + "BackgroundAssets_BAURLDownload", + "block2", +] diff --git a/framework-crates/objc2-background-assets/README.md b/framework-crates/objc2-background-assets/README.md new file mode 100644 index 000000000..d7a4caa07 --- /dev/null +++ b/framework-crates/objc2-background-assets/README.md @@ -0,0 +1,14 @@ +# `objc2-background-assets` + +[![Latest version](https://badgen.net/crates/v/objc2-background-assets)](https://crates.io/crates/objc2-background-assets) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-background-assets/badge.svg)](https://docs.rs/objc2-background-assets/) +[![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 BackgroundAssets. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-background-assets/) 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-background-assets/src/generated b/framework-crates/objc2-background-assets/src/generated new file mode 120000 index 000000000..70086887a --- /dev/null +++ b/framework-crates/objc2-background-assets/src/generated @@ -0,0 +1 @@ +../../../generated/BackgroundAssets \ No newline at end of file diff --git a/framework-crates/objc2-background-assets/src/lib.rs b/framework-crates/objc2-background-assets/src/lib.rs new file mode 100644 index 000000000..cf0814d8f --- /dev/null +++ b/framework-crates/objc2-background-assets/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `BackgroundAssets` 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/backgroundassets/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-background-assets/0.2.0")] + +#[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-background-tasks/Cargo.toml b/framework-crates/objc2-background-tasks/Cargo.toml new file mode 100644 index 000000000..785f94cbf --- /dev/null +++ b/framework-crates/objc2-background-tasks/Cargo.toml @@ -0,0 +1,68 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-background-tasks" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the BackgroundTasks framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-ios" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-ios", + "x86_64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +BackgroundTasks_BGDefines = [] +BackgroundTasks_BGTask = ["objc2-foundation/Foundation_NSString"] +BackgroundTasks_BGTaskRequest = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSFileManager", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +BackgroundTasks_BGTaskScheduler = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +all = [ + "BackgroundTasks_BGDefines", + "BackgroundTasks_BGTask", + "BackgroundTasks_BGTaskRequest", + "BackgroundTasks_BGTaskScheduler", + "block2", +] diff --git a/framework-crates/objc2-background-tasks/README.md b/framework-crates/objc2-background-tasks/README.md new file mode 100644 index 000000000..7288e4a33 --- /dev/null +++ b/framework-crates/objc2-background-tasks/README.md @@ -0,0 +1,14 @@ +# `objc2-background-tasks` + +[![Latest version](https://badgen.net/crates/v/objc2-background-tasks)](https://crates.io/crates/objc2-background-tasks) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-background-tasks/badge.svg)](https://docs.rs/objc2-background-tasks/) +[![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 BackgroundTasks. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-background-tasks/) 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-background-tasks/src/generated b/framework-crates/objc2-background-tasks/src/generated new file mode 120000 index 000000000..17abd8487 --- /dev/null +++ b/framework-crates/objc2-background-tasks/src/generated @@ -0,0 +1 @@ +../../../generated/BackgroundTasks \ No newline at end of file diff --git a/framework-crates/objc2-background-tasks/src/lib.rs b/framework-crates/objc2-background-tasks/src/lib.rs new file mode 100644 index 000000000..d9f76fed9 --- /dev/null +++ b/framework-crates/objc2-background-tasks/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `BackgroundTasks` 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/backgroundtasks/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-background-tasks/0.2.0")] + +#[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-business-chat/Cargo.toml b/framework-crates/objc2-business-chat/Cargo.toml new file mode 100644 index 000000000..40ad2d28e --- /dev/null +++ b/framework-crates/objc2-business-chat/Cargo.toml @@ -0,0 +1,68 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-business-chat" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the BusinessChat framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +BusinessChat_BCChatAction = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +BusinessChat_BCChatButton = [ + "objc2-app-kit/AppKit_NSAccessibilityProtocols", + "objc2-app-kit/AppKit_NSAnimation", + "objc2-app-kit/AppKit_NSAppearance", + "objc2-app-kit/AppKit_NSControl", + "objc2-app-kit/AppKit_NSDragging", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +all = [ + "BusinessChat_BCChatAction", + "BusinessChat_BCChatButton", +] diff --git a/framework-crates/objc2-business-chat/README.md b/framework-crates/objc2-business-chat/README.md new file mode 100644 index 000000000..1a0031027 --- /dev/null +++ b/framework-crates/objc2-business-chat/README.md @@ -0,0 +1,14 @@ +# `objc2-business-chat` + +[![Latest version](https://badgen.net/crates/v/objc2-business-chat)](https://crates.io/crates/objc2-business-chat) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-business-chat/badge.svg)](https://docs.rs/objc2-business-chat/) +[![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 BusinessChat. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-business-chat/) 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-business-chat/src/generated b/framework-crates/objc2-business-chat/src/generated new file mode 120000 index 000000000..260bf668d --- /dev/null +++ b/framework-crates/objc2-business-chat/src/generated @@ -0,0 +1 @@ +../../../generated/BusinessChat \ No newline at end of file diff --git a/framework-crates/objc2-business-chat/src/lib.rs b/framework-crates/objc2-business-chat/src/lib.rs new file mode 100644 index 000000000..0f35cfa91 --- /dev/null +++ b/framework-crates/objc2-business-chat/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `BusinessChat` 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/businesschat/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-business-chat/0.2.0")] + +#[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-call-kit/Cargo.toml b/framework-crates/objc2-call-kit/Cargo.toml new file mode 100644 index 000000000..af121b1b6 --- /dev/null +++ b/framework-crates/objc2-call-kit/Cargo.toml @@ -0,0 +1,179 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-call-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the CallKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +CallKit_CXAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXAnswerCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXBase = [] +CallKit_CXCall = ["objc2-foundation/Foundation_NSUUID"] +CallKit_CXCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXCallController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", +] +CallKit_CXCallDirectory = [] +CallKit_CXCallDirectoryExtensionContext = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSString", +] +CallKit_CXCallDirectoryManager = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CallKit_CXCallDirectoryProvider = [ + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSExtensionRequestHandling", +] +CallKit_CXCallObserver = ["objc2-foundation/Foundation_NSArray"] +CallKit_CXCallUpdate = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CallKit_CXEndCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CallKit_CXHandle = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CallKit_CXPlayDTMFCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXProvider = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXProviderConfiguration = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +CallKit_CXSetGroupCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXSetHeldCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXSetMutedCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXStartCallAction = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +CallKit_CXTransaction = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +all = [ + "CallKit_CXAction", + "CallKit_CXAnswerCallAction", + "CallKit_CXBase", + "CallKit_CXCall", + "CallKit_CXCallAction", + "CallKit_CXCallController", + "CallKit_CXCallDirectory", + "CallKit_CXCallDirectoryExtensionContext", + "CallKit_CXCallDirectoryManager", + "CallKit_CXCallDirectoryProvider", + "CallKit_CXCallObserver", + "CallKit_CXCallUpdate", + "CallKit_CXEndCallAction", + "CallKit_CXError", + "CallKit_CXHandle", + "CallKit_CXPlayDTMFCallAction", + "CallKit_CXProvider", + "CallKit_CXProviderConfiguration", + "CallKit_CXSetGroupCallAction", + "CallKit_CXSetHeldCallAction", + "CallKit_CXSetMutedCallAction", + "CallKit_CXStartCallAction", + "CallKit_CXTransaction", + "block2", +] diff --git a/framework-crates/objc2-call-kit/README.md b/framework-crates/objc2-call-kit/README.md new file mode 100644 index 000000000..529a47d3c --- /dev/null +++ b/framework-crates/objc2-call-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-call-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-call-kit)](https://crates.io/crates/objc2-call-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-call-kit/badge.svg)](https://docs.rs/objc2-call-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 CallKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-call-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-call-kit/src/generated b/framework-crates/objc2-call-kit/src/generated new file mode 120000 index 000000000..2d4d4815b --- /dev/null +++ b/framework-crates/objc2-call-kit/src/generated @@ -0,0 +1 @@ +../../../generated/CallKit \ No newline at end of file diff --git a/framework-crates/objc2-call-kit/src/lib.rs b/framework-crates/objc2-call-kit/src/lib.rs new file mode 100644 index 000000000..3ef3b5f1c --- /dev/null +++ b/framework-crates/objc2-call-kit/src/lib.rs @@ -0,0 +1,23 @@ +//! # Bindings to the `CallKit` 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/callkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-call-kit/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; + +#[allow(dead_code)] +pub(crate) const INT64_MAX: i64 = i64::MAX; diff --git a/framework-crates/objc2-class-kit/Cargo.toml b/framework-crates/objc2-class-kit/Cargo.toml new file mode 100644 index 000000000..70f6e6e7d --- /dev/null +++ b/framework-crates/objc2-class-kit/Cargo.toml @@ -0,0 +1,115 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-class-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the ClassKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +ClassKit_CLSActivity = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +ClassKit_CLSActivityItem = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +ClassKit_CLSBinaryItem = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +ClassKit_CLSContext = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +ClassKit_CLSContextProvider = ["objc2-foundation/Foundation_NSError"] +ClassKit_CLSDataStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +ClassKit_CLSDefines = ["objc2-foundation/Foundation_NSString"] +ClassKit_CLSObject = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +ClassKit_CLSProgressReportingCapability = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +ClassKit_CLSQuantityItem = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +ClassKit_CLSScoreItem = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +ClassKit_NSUserActivity_CLSDeepLinks = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUserActivity", +] +all = [ + "ClassKit_CLSActivity", + "ClassKit_CLSActivityItem", + "ClassKit_CLSBinaryItem", + "ClassKit_CLSContext", + "ClassKit_CLSContextProvider", + "ClassKit_CLSDataStore", + "ClassKit_CLSDefines", + "ClassKit_CLSObject", + "ClassKit_CLSProgressReportingCapability", + "ClassKit_CLSQuantityItem", + "ClassKit_CLSScoreItem", + "ClassKit_NSUserActivity_CLSDeepLinks", + "block2", +] diff --git a/framework-crates/objc2-class-kit/README.md b/framework-crates/objc2-class-kit/README.md new file mode 100644 index 000000000..e103496e5 --- /dev/null +++ b/framework-crates/objc2-class-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-class-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-class-kit)](https://crates.io/crates/objc2-class-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-class-kit/badge.svg)](https://docs.rs/objc2-class-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 ClassKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-class-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-class-kit/src/generated b/framework-crates/objc2-class-kit/src/generated new file mode 120000 index 000000000..0fb613a05 --- /dev/null +++ b/framework-crates/objc2-class-kit/src/generated @@ -0,0 +1 @@ +../../../generated/ClassKit \ No newline at end of file diff --git a/framework-crates/objc2-class-kit/src/lib.rs b/framework-crates/objc2-class-kit/src/lib.rs new file mode 100644 index 000000000..60398b89f --- /dev/null +++ b/framework-crates/objc2-class-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `ClassKit` 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/classkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-class-kit/0.2.0")] + +#[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-cloud-kit/Cargo.toml b/framework-crates/objc2-cloud-kit/Cargo.toml new file mode 100644 index 000000000..a3850a327 --- /dev/null +++ b/framework-crates/objc2-cloud-kit/Cargo.toml @@ -0,0 +1,343 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-cloud-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the CloudKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-core-location = ["dep:objc2-core-location"] + +CloudKit_CKAcceptSharesOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKAllowedSharingOptions = ["objc2-foundation/Foundation_NSObject"] +CloudKit_CKAsset = ["objc2-foundation/Foundation_NSURL"] +CloudKit_CKContainer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CloudKit_CKDatabase = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKDatabaseOperation = ["objc2-foundation/Foundation_NSOperation"] +CloudKit_CKDefines = [] +CloudKit_CKDiscoverAllUserIdentitiesOperation = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKDiscoverUserIdentitiesOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKError = ["objc2-foundation/Foundation_NSString"] +CloudKit_CKFetchDatabaseChangesOperation = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKFetchNotificationChangesOperation = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKFetchRecordChangesOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKFetchRecordZoneChangesOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKFetchRecordZonesOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKFetchRecordsOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKFetchShareMetadataOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CloudKit_CKFetchShareParticipantsOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKFetchSubscriptionsOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKFetchWebAuthTokenOperation = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKLocationSortDescriptor = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKMarkNotificationsReadOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKModifyBadgeOperation = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKModifyRecordZonesOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKModifyRecordsOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", +] +CloudKit_CKModifySubscriptionsOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKNotification = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +CloudKit_CKOperation = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKOperationGroup = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKQueryOperation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKRecord = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +CloudKit_CKRecordID = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKRecordZone = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKRecordZoneID = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKReference = ["objc2-foundation/Foundation_NSObject"] +CloudKit_CKServerChangeToken = ["objc2-foundation/Foundation_NSObject"] +CloudKit_CKShare = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CloudKit_CKShareMetadata = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKShareParticipant = ["objc2-foundation/Foundation_NSObject"] +CloudKit_CKSubscription = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKSyncEngine = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", +] +CloudKit_CKSyncEngineConfiguration = ["objc2-foundation/Foundation_NSString"] +CloudKit_CKSyncEngineEvent = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKSyncEngineRecordZoneChangeBatch = ["objc2-foundation/Foundation_NSArray"] +CloudKit_CKSyncEngineState = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +CloudKit_CKSystemSharingUIObserver = ["objc2-foundation/Foundation_NSError"] +CloudKit_CKUserIdentity = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPersonNameComponents", + "objc2-foundation/Foundation_NSString", +] +CloudKit_CKUserIdentityLookupInfo = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CloudKit_NSItemProvider_CKSharingSupport = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSItemProvider", +] +all = [ + "CloudKit_CKAcceptSharesOperation", + "CloudKit_CKAllowedSharingOptions", + "CloudKit_CKAsset", + "CloudKit_CKContainer", + "CloudKit_CKDatabase", + "CloudKit_CKDatabaseOperation", + "CloudKit_CKDefines", + "CloudKit_CKDiscoverAllUserIdentitiesOperation", + "CloudKit_CKDiscoverUserIdentitiesOperation", + "CloudKit_CKError", + "CloudKit_CKFetchDatabaseChangesOperation", + "CloudKit_CKFetchNotificationChangesOperation", + "CloudKit_CKFetchRecordChangesOperation", + "CloudKit_CKFetchRecordZoneChangesOperation", + "CloudKit_CKFetchRecordZonesOperation", + "CloudKit_CKFetchRecordsOperation", + "CloudKit_CKFetchShareMetadataOperation", + "CloudKit_CKFetchShareParticipantsOperation", + "CloudKit_CKFetchSubscriptionsOperation", + "CloudKit_CKFetchWebAuthTokenOperation", + "CloudKit_CKLocationSortDescriptor", + "CloudKit_CKMarkNotificationsReadOperation", + "CloudKit_CKModifyBadgeOperation", + "CloudKit_CKModifyRecordZonesOperation", + "CloudKit_CKModifyRecordsOperation", + "CloudKit_CKModifySubscriptionsOperation", + "CloudKit_CKNotification", + "CloudKit_CKOperation", + "CloudKit_CKOperationGroup", + "CloudKit_CKQuery", + "CloudKit_CKQueryOperation", + "CloudKit_CKRecord", + "CloudKit_CKRecordID", + "CloudKit_CKRecordZone", + "CloudKit_CKRecordZoneID", + "CloudKit_CKReference", + "CloudKit_CKServerChangeToken", + "CloudKit_CKShare", + "CloudKit_CKShareMetadata", + "CloudKit_CKShareParticipant", + "CloudKit_CKSubscription", + "CloudKit_CKSyncEngine", + "CloudKit_CKSyncEngineConfiguration", + "CloudKit_CKSyncEngineEvent", + "CloudKit_CKSyncEngineRecordZoneChangeBatch", + "CloudKit_CKSyncEngineState", + "CloudKit_CKSystemSharingUIObserver", + "CloudKit_CKUserIdentity", + "CloudKit_CKUserIdentityLookupInfo", + "CloudKit_NSItemProvider_CKSharingSupport", + "block2", + "objc2-core-location", +] diff --git a/framework-crates/objc2-cloud-kit/README.md b/framework-crates/objc2-cloud-kit/README.md new file mode 100644 index 000000000..b1295d745 --- /dev/null +++ b/framework-crates/objc2-cloud-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-cloud-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-cloud-kit)](https://crates.io/crates/objc2-cloud-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-cloud-kit/badge.svg)](https://docs.rs/objc2-cloud-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 CloudKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-cloud-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-cloud-kit/src/generated b/framework-crates/objc2-cloud-kit/src/generated new file mode 120000 index 000000000..2933b1749 --- /dev/null +++ b/framework-crates/objc2-cloud-kit/src/generated @@ -0,0 +1 @@ +../../../generated/CloudKit \ No newline at end of file diff --git a/framework-crates/objc2-cloud-kit/src/lib.rs b/framework-crates/objc2-cloud-kit/src/lib.rs new file mode 100644 index 000000000..84f2cf71c --- /dev/null +++ b/framework-crates/objc2-cloud-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `CloudKit` 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/cloudkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-cloud-kit/0.2.0")] + +#[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-contacts/Cargo.toml b/framework-crates/objc2-contacts/Cargo.toml new file mode 100644 index 000000000..6032f10f1 --- /dev/null +++ b/framework-crates/objc2-contacts/Cargo.toml @@ -0,0 +1,207 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-contacts" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Contacts framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +Contacts_CNChangeHistoryEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNChangeHistoryFetchRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContact = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContactFetchRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", +] +Contacts_CNContactFormatter = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSFormatter", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContactProperty = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContactRelation = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContactStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContactVCardSerialization = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", +] +Contacts_CNContact_NSItemProvider = ["objc2-foundation/Foundation_NSItemProvider"] +Contacts_CNContact_Predicates = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContactsUserDefaults = ["objc2-foundation/Foundation_NSString"] +Contacts_CNContainer = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNContainer_Predicates = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNError = ["objc2-foundation/Foundation_NSString"] +Contacts_CNFetchRequest = [] +Contacts_CNFetchResult = ["objc2-foundation/Foundation_NSData"] +Contacts_CNGroup = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNGroup_Predicates = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNInstantMessageAddress = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNLabeledValue = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNMutableContact = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNMutableGroup = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNMutablePostalAddress = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNPhoneNumber = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNPostalAddress = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNPostalAddressFormatter = [ + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSFormatter", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_CNSaveRequest = ["objc2-foundation/Foundation_NSString"] +Contacts_CNSocialProfile = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Contacts_ContactsDefines = [] +all = [ + "Contacts_CNChangeHistoryEvent", + "Contacts_CNChangeHistoryFetchRequest", + "Contacts_CNContact", + "Contacts_CNContactFetchRequest", + "Contacts_CNContactFormatter", + "Contacts_CNContactProperty", + "Contacts_CNContactRelation", + "Contacts_CNContactStore", + "Contacts_CNContactVCardSerialization", + "Contacts_CNContact_NSItemProvider", + "Contacts_CNContact_Predicates", + "Contacts_CNContactsUserDefaults", + "Contacts_CNContainer", + "Contacts_CNContainer_Predicates", + "Contacts_CNError", + "Contacts_CNFetchRequest", + "Contacts_CNFetchResult", + "Contacts_CNGroup", + "Contacts_CNGroup_Predicates", + "Contacts_CNInstantMessageAddress", + "Contacts_CNLabeledValue", + "Contacts_CNMutableContact", + "Contacts_CNMutableGroup", + "Contacts_CNMutablePostalAddress", + "Contacts_CNPhoneNumber", + "Contacts_CNPostalAddress", + "Contacts_CNPostalAddressFormatter", + "Contacts_CNSaveRequest", + "Contacts_CNSocialProfile", + "Contacts_ContactsDefines", + "block2", +] diff --git a/framework-crates/objc2-contacts/README.md b/framework-crates/objc2-contacts/README.md new file mode 100644 index 000000000..cf0cfbfdd --- /dev/null +++ b/framework-crates/objc2-contacts/README.md @@ -0,0 +1,14 @@ +# `objc2-contacts` + +[![Latest version](https://badgen.net/crates/v/objc2-contacts)](https://crates.io/crates/objc2-contacts) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-contacts/badge.svg)](https://docs.rs/objc2-contacts/) +[![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 Contacts. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-contacts/) 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-contacts/src/generated b/framework-crates/objc2-contacts/src/generated new file mode 120000 index 000000000..5e3d77a67 --- /dev/null +++ b/framework-crates/objc2-contacts/src/generated @@ -0,0 +1 @@ +../../../generated/Contacts \ No newline at end of file diff --git a/framework-crates/objc2-contacts/src/lib.rs b/framework-crates/objc2-contacts/src/lib.rs new file mode 100644 index 000000000..cecec60e8 --- /dev/null +++ b/framework-crates/objc2-contacts/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `Contacts` 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/contacts/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-contacts/0.2.0")] + +#[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-core-data/Cargo.modified.toml b/framework-crates/objc2-core-data/Cargo.modified.toml new file mode 100644 index 000000000..30fc8ca82 --- /dev/null +++ b/framework-crates/objc2-core-data/Cargo.modified.toml @@ -0,0 +1,18 @@ +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false } +block2 = { path = "../../crates/block2", version = "0.4.0", default-features = false, optional = true } + +[features] +default = ["std", "apple"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc"] + +# Runtime selection. See `objc-sys` for details. +apple = ["objc2/apple", "block2?/apple", "objc2-foundation/apple"] +gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1", "objc2-foundation/gnustep-2-1"] diff --git a/framework-crates/objc2-core-data/Cargo.toml b/framework-crates/objc2-core-data/Cargo.toml new file mode 100644 index 000000000..a2a5c8ea9 --- /dev/null +++ b/framework-crates/objc2-core-data/Cargo.toml @@ -0,0 +1,393 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-core-data" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the CoreData framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false } +block2 = { path = "../../crates/block2", version = "0.4.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", + "x86_64-unknown-linux-gnu", + "i686-unknown-linux-gnu", +] + +[features] +default = ["std", "apple"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +apple = ["objc2/apple", "block2?/apple", "objc2-foundation/apple"] +gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9", "objc2-foundation/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0", "objc2-foundation/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1", "objc2-foundation/gnustep-2-1"] +block2 = ["dep:block2"] + +CoreData_CoreDataDefines = [] +CoreData_CoreDataErrors = ["objc2-foundation/Foundation_NSString"] +CoreData_NSAtomicStore = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSAtomicStoreCacheNode = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSAttributeDescription = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSBatchDeleteRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSBatchInsertRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSBatchUpdateRequest = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSCompositeAttributeDescription = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSCoreDataCoreSpotlightDelegate = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSCustomMigrationStage = ["objc2-foundation/Foundation_NSError"] +CoreData_NSDerivedAttributeDescription = [ + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSEntityDescription = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSEntityMapping = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSEntityMigrationPolicy = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSExpressionDescription = [ + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSFetchIndexDescription = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSFetchIndexElementDescription = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSFetchRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSortDescriptor", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +CoreData_NSFetchRequestExpression = [ + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSFetchedPropertyDescription = ["objc2-foundation/Foundation_NSObject"] +CoreData_NSFetchedResultsController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSOrderedCollectionDifference", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSIncrementalStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSIncrementalStoreNode = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSLightweightMigrationStage = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSManagedObject = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSKeyValueObserving", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSManagedObjectContext = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSLock", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUndoManager", +] +CoreData_NSManagedObjectID = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSManagedObjectModel = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSManagedObjectModelReference = [ + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSMappingModel = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSMergePolicy = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSMigrationManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSMigrationStage = ["objc2-foundation/Foundation_NSString"] +CoreData_NSPersistentCloudKitContainer = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSPersistentCloudKitContainerEvent = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +CoreData_NSPersistentCloudKitContainerEventRequest = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSPersistentCloudKitContainerOptions = ["objc2-foundation/Foundation_NSString"] +CoreData_NSPersistentContainer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSPersistentHistoryChange = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", +] +CoreData_NSPersistentHistoryChangeRequest = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSPersistentHistoryToken = ["objc2-foundation/Foundation_NSObject"] +CoreData_NSPersistentHistoryTransaction = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSPersistentStore = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSPersistentStoreCoordinator = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSLock", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +CoreData_NSPersistentStoreDescription = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +CoreData_NSPersistentStoreRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSPersistentStoreResult = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSProgress", +] +CoreData_NSPropertyDescription = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSPropertyMapping = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSExpression", + "objc2-foundation/Foundation_NSString", +] +CoreData_NSQueryGenerationToken = ["objc2-foundation/Foundation_NSObject"] +CoreData_NSRelationshipDescription = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +CoreData_NSSaveChangesRequest = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", +] +CoreData_NSStagedMigrationManager = ["objc2-foundation/Foundation_NSArray"] +all = [ + "CoreData_CoreDataDefines", + "CoreData_CoreDataErrors", + "CoreData_NSAtomicStore", + "CoreData_NSAtomicStoreCacheNode", + "CoreData_NSAttributeDescription", + "CoreData_NSBatchDeleteRequest", + "CoreData_NSBatchInsertRequest", + "CoreData_NSBatchUpdateRequest", + "CoreData_NSCompositeAttributeDescription", + "CoreData_NSCoreDataCoreSpotlightDelegate", + "CoreData_NSCustomMigrationStage", + "CoreData_NSDerivedAttributeDescription", + "CoreData_NSEntityDescription", + "CoreData_NSEntityMapping", + "CoreData_NSEntityMigrationPolicy", + "CoreData_NSExpressionDescription", + "CoreData_NSFetchIndexDescription", + "CoreData_NSFetchIndexElementDescription", + "CoreData_NSFetchRequest", + "CoreData_NSFetchRequestExpression", + "CoreData_NSFetchedPropertyDescription", + "CoreData_NSFetchedResultsController", + "CoreData_NSIncrementalStore", + "CoreData_NSIncrementalStoreNode", + "CoreData_NSLightweightMigrationStage", + "CoreData_NSManagedObject", + "CoreData_NSManagedObjectContext", + "CoreData_NSManagedObjectID", + "CoreData_NSManagedObjectModel", + "CoreData_NSManagedObjectModelReference", + "CoreData_NSMappingModel", + "CoreData_NSMergePolicy", + "CoreData_NSMigrationManager", + "CoreData_NSMigrationStage", + "CoreData_NSPersistentCloudKitContainer", + "CoreData_NSPersistentCloudKitContainerEvent", + "CoreData_NSPersistentCloudKitContainerEventRequest", + "CoreData_NSPersistentCloudKitContainerOptions", + "CoreData_NSPersistentContainer", + "CoreData_NSPersistentHistoryChange", + "CoreData_NSPersistentHistoryChangeRequest", + "CoreData_NSPersistentHistoryToken", + "CoreData_NSPersistentHistoryTransaction", + "CoreData_NSPersistentStore", + "CoreData_NSPersistentStoreCoordinator", + "CoreData_NSPersistentStoreDescription", + "CoreData_NSPersistentStoreRequest", + "CoreData_NSPersistentStoreResult", + "CoreData_NSPropertyDescription", + "CoreData_NSPropertyMapping", + "CoreData_NSQueryGenerationToken", + "CoreData_NSRelationshipDescription", + "CoreData_NSSaveChangesRequest", + "CoreData_NSStagedMigrationManager", + "block2", +] diff --git a/framework-crates/objc2-core-data/README.md b/framework-crates/objc2-core-data/README.md new file mode 100644 index 000000000..0753fb8fa --- /dev/null +++ b/framework-crates/objc2-core-data/README.md @@ -0,0 +1,14 @@ +# `objc2-core-data` + +[![Latest version](https://badgen.net/crates/v/objc2-core-data)](https://crates.io/crates/objc2-core-data) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-core-data/badge.svg)](https://docs.rs/objc2-core-data/) +[![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 CoreData. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-core-data/) 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-core-data/src/generated b/framework-crates/objc2-core-data/src/generated new file mode 120000 index 000000000..07527aebb --- /dev/null +++ b/framework-crates/objc2-core-data/src/generated @@ -0,0 +1 @@ +../../../generated/CoreData \ No newline at end of file diff --git a/framework-crates/objc2-core-data/src/lib.rs b/framework-crates/objc2-core-data/src/lib.rs new file mode 100644 index 000000000..a74bce8f6 --- /dev/null +++ b/framework-crates/objc2-core-data/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `CoreData` 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/coredata/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-core-data/0.2.0")] + +#[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-core-location/Cargo.toml b/framework-crates/objc2-core-location/Cargo.toml new file mode 100644 index 000000000..b6450e114 --- /dev/null +++ b/framework-crates/objc2-core-location/Cargo.toml @@ -0,0 +1,174 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-core-location" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the CoreLocation framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-contacts = ["dep:objc2-contacts"] + +CoreLocation_CLAvailability = [] +CoreLocation_CLBackgroundActivitySession = [] +CoreLocation_CLBeaconIdentityCondition = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", + "objc2-foundation/Foundation_NSValue", +] +CoreLocation_CLBeaconIdentityConstraint = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUUID", +] +CoreLocation_CLBeaconRegion = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", + "objc2-foundation/Foundation_NSValue", +] +CoreLocation_CLCircularGeographicCondition = ["objc2-foundation/Foundation_NSObject"] +CoreLocation_CLCircularRegion = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLCondition = ["objc2-foundation/Foundation_NSObject"] +CoreLocation_CLError = ["objc2-foundation/Foundation_NSString"] +CoreLocation_CLErrorDomain = ["objc2-foundation/Foundation_NSString"] +CoreLocation_CLGeocoder = [ + "objc2-contacts?/Contacts_CNPostalAddress", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLHeading = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +CoreLocation_CLLocation = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +CoreLocation_CLLocationManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLLocationManagerDelegate = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", +] +CoreLocation_CLLocationManager_CLVisitExtensions = [] +CoreLocation_CLLocationPushServiceError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLLocationPushServiceExtension = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLLocationUpdater = [] +CoreLocation_CLMonitor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLMonitorConfiguration = ["objc2-foundation/Foundation_NSString"] +CoreLocation_CLMonitoringEvent = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLMonitoringRecord = ["objc2-foundation/Foundation_NSObject"] +CoreLocation_CLPlacemark = [ + "objc2-contacts?/Contacts_CNPostalAddress", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTimeZone", +] +CoreLocation_CLRegion = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreLocation_CLVisit = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +all = [ + "CoreLocation_CLAvailability", + "CoreLocation_CLBackgroundActivitySession", + "CoreLocation_CLBeaconIdentityCondition", + "CoreLocation_CLBeaconIdentityConstraint", + "CoreLocation_CLBeaconRegion", + "CoreLocation_CLCircularGeographicCondition", + "CoreLocation_CLCircularRegion", + "CoreLocation_CLCondition", + "CoreLocation_CLError", + "CoreLocation_CLErrorDomain", + "CoreLocation_CLGeocoder", + "CoreLocation_CLHeading", + "CoreLocation_CLLocation", + "CoreLocation_CLLocationManager", + "CoreLocation_CLLocationManagerDelegate", + "CoreLocation_CLLocationManager_CLVisitExtensions", + "CoreLocation_CLLocationPushServiceError", + "CoreLocation_CLLocationPushServiceExtension", + "CoreLocation_CLLocationUpdater", + "CoreLocation_CLMonitor", + "CoreLocation_CLMonitorConfiguration", + "CoreLocation_CLMonitoringEvent", + "CoreLocation_CLMonitoringRecord", + "CoreLocation_CLPlacemark", + "CoreLocation_CLRegion", + "CoreLocation_CLVisit", + "block2", + "objc2-contacts", +] diff --git a/framework-crates/objc2-core-location/README.md b/framework-crates/objc2-core-location/README.md new file mode 100644 index 000000000..21a6ecd54 --- /dev/null +++ b/framework-crates/objc2-core-location/README.md @@ -0,0 +1,14 @@ +# `objc2-core-location` + +[![Latest version](https://badgen.net/crates/v/objc2-core-location)](https://crates.io/crates/objc2-core-location) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-core-location/badge.svg)](https://docs.rs/objc2-core-location/) +[![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 CoreLocation. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-core-location/) 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-core-location/src/generated b/framework-crates/objc2-core-location/src/generated new file mode 120000 index 000000000..5933b00df --- /dev/null +++ b/framework-crates/objc2-core-location/src/generated @@ -0,0 +1 @@ +../../../generated/CoreLocation \ No newline at end of file diff --git a/framework-crates/objc2-core-location/src/lib.rs b/framework-crates/objc2-core-location/src/lib.rs new file mode 100644 index 000000000..ee1a72aa2 --- /dev/null +++ b/framework-crates/objc2-core-location/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `CoreLocation` 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/corelocation/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-core-location/0.2.0")] + +#[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-core-wlan/Cargo.toml b/framework-crates/objc2-core-wlan/Cargo.toml new file mode 100644 index 000000000..0d48ba72a --- /dev/null +++ b/framework-crates/objc2-core-wlan/Cargo.toml @@ -0,0 +1,85 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-core-wlan" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the CoreWLAN framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +CoreWLAN_CWChannel = ["objc2-foundation/Foundation_NSObject"] +CoreWLAN_CWConfiguration = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSOrderedSet", +] +CoreWLAN_CWInterface = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +CoreWLAN_CWNetwork = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreWLAN_CWNetworkProfile = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +CoreWLAN_CWWiFiClient = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +CoreWLAN_CoreWLANConstants = ["objc2-foundation/Foundation_NSString"] +CoreWLAN_CoreWLANTypes = [] +CoreWLAN_CoreWLANUtil = ["objc2-foundation/Foundation_NSSet"] +all = [ + "CoreWLAN_CWChannel", + "CoreWLAN_CWConfiguration", + "CoreWLAN_CWInterface", + "CoreWLAN_CWNetwork", + "CoreWLAN_CWNetworkProfile", + "CoreWLAN_CWWiFiClient", + "CoreWLAN_CoreWLANConstants", + "CoreWLAN_CoreWLANTypes", + "CoreWLAN_CoreWLANUtil", +] diff --git a/framework-crates/objc2-core-wlan/README.md b/framework-crates/objc2-core-wlan/README.md new file mode 100644 index 000000000..5072600d9 --- /dev/null +++ b/framework-crates/objc2-core-wlan/README.md @@ -0,0 +1,14 @@ +# `objc2-core-wlan` + +[![Latest version](https://badgen.net/crates/v/objc2-core-wlan)](https://crates.io/crates/objc2-core-wlan) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-core-wlan/badge.svg)](https://docs.rs/objc2-core-wlan/) +[![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 CoreWLAN. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-core-wlan/) 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-core-wlan/src/generated b/framework-crates/objc2-core-wlan/src/generated new file mode 120000 index 000000000..848d22142 --- /dev/null +++ b/framework-crates/objc2-core-wlan/src/generated @@ -0,0 +1 @@ +../../../generated/CoreWLAN \ No newline at end of file diff --git a/framework-crates/objc2-core-wlan/src/lib.rs b/framework-crates/objc2-core-wlan/src/lib.rs new file mode 100644 index 000000000..a0b5f1030 --- /dev/null +++ b/framework-crates/objc2-core-wlan/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `CoreWLAN` 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/corewlan/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-core-wlan/0.2.0")] + +#[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-data-detection/Cargo.toml b/framework-crates/objc2-data-detection/Cargo.toml new file mode 100644 index 000000000..0a59a5afe --- /dev/null +++ b/framework-crates/objc2-data-detection/Cargo.toml @@ -0,0 +1,59 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-data-detection" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the DataDetection framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +DataDetection_DDMatch = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTimeZone", + "objc2-foundation/Foundation_NSURL", +] +DataDetection_DataDetectionBase = [] +all = [ + "DataDetection_DDMatch", + "DataDetection_DataDetectionBase", +] diff --git a/framework-crates/objc2-data-detection/README.md b/framework-crates/objc2-data-detection/README.md new file mode 100644 index 000000000..7124e3ff5 --- /dev/null +++ b/framework-crates/objc2-data-detection/README.md @@ -0,0 +1,14 @@ +# `objc2-data-detection` + +[![Latest version](https://badgen.net/crates/v/objc2-data-detection)](https://crates.io/crates/objc2-data-detection) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-data-detection/badge.svg)](https://docs.rs/objc2-data-detection/) +[![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 DataDetection. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-data-detection/) 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-data-detection/src/generated b/framework-crates/objc2-data-detection/src/generated new file mode 120000 index 000000000..4c5dfa489 --- /dev/null +++ b/framework-crates/objc2-data-detection/src/generated @@ -0,0 +1 @@ +../../../generated/DataDetection \ No newline at end of file diff --git a/framework-crates/objc2-data-detection/src/lib.rs b/framework-crates/objc2-data-detection/src/lib.rs new file mode 100644 index 000000000..12052320f --- /dev/null +++ b/framework-crates/objc2-data-detection/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `DataDetection` 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/datadetection/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-data-detection/0.2.0")] + +#[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-device-check/Cargo.toml b/framework-crates/objc2-device-check/Cargo.toml new file mode 100644 index 000000000..cd352d71e --- /dev/null +++ b/framework-crates/objc2-device-check/Cargo.toml @@ -0,0 +1,69 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-device-check" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the DeviceCheck framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +DeviceCheck_DCAppAttestService = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +DeviceCheck_DCDevice = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", +] +DeviceCheck_DCError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +all = [ + "DeviceCheck_DCAppAttestService", + "DeviceCheck_DCDevice", + "DeviceCheck_DCError", + "block2", +] diff --git a/framework-crates/objc2-device-check/README.md b/framework-crates/objc2-device-check/README.md new file mode 100644 index 000000000..7cd6ee0ed --- /dev/null +++ b/framework-crates/objc2-device-check/README.md @@ -0,0 +1,14 @@ +# `objc2-device-check` + +[![Latest version](https://badgen.net/crates/v/objc2-device-check)](https://crates.io/crates/objc2-device-check) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-device-check/badge.svg)](https://docs.rs/objc2-device-check/) +[![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 DeviceCheck. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-device-check/) 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-device-check/src/generated b/framework-crates/objc2-device-check/src/generated new file mode 120000 index 000000000..2af7b5d45 --- /dev/null +++ b/framework-crates/objc2-device-check/src/generated @@ -0,0 +1 @@ +../../../generated/DeviceCheck \ No newline at end of file diff --git a/framework-crates/objc2-device-check/src/lib.rs b/framework-crates/objc2-device-check/src/lib.rs new file mode 100644 index 000000000..d9087e81e --- /dev/null +++ b/framework-crates/objc2-device-check/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `DeviceCheck` 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/devicecheck/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-device-check/0.2.0")] + +#[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-event-kit/Cargo.toml b/framework-crates/objc2-event-kit/Cargo.toml new file mode 100644 index 000000000..71b5f003b --- /dev/null +++ b/framework-crates/objc2-event-kit/Cargo.toml @@ -0,0 +1,154 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-event-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the EventKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-map-kit = { path = "../objc2-map-kit", version = "0.2.0", optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] +objc2-core-location = ["dep:objc2-core-location"] +objc2-map-kit = ["dep:objc2-map-kit"] + +EventKit_EKAlarm = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +EventKit_EKCalendar = [ + "objc2-app-kit?/AppKit_NSColor", + "objc2-foundation/Foundation_NSString", +] +EventKit_EKCalendarItem = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTimeZone", + "objc2-foundation/Foundation_NSURL", +] +EventKit_EKError = ["objc2-foundation/Foundation_NSString"] +EventKit_EKEvent = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSString", +] +EventKit_EKEventStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +EventKit_EKObject = [] +EventKit_EKParticipant = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +EventKit_EKRecurrenceDayOfWeek = ["objc2-foundation/Foundation_NSObject"] +EventKit_EKRecurrenceEnd = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +EventKit_EKRecurrenceRule = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +EventKit_EKReminder = [ + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSDate", +] +EventKit_EKSource = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +EventKit_EKStructuredLocation = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-map-kit?/MapKit_MKMapItem", +] +EventKit_EKTypes = [] +EventKit_EKVirtualConferenceDescriptor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +EventKit_EKVirtualConferenceProvider = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionRequestHandling", + "objc2-foundation/Foundation_NSString", +] +EventKit_EventKitDefines = [] +all = [ + "EventKit_EKAlarm", + "EventKit_EKCalendar", + "EventKit_EKCalendarItem", + "EventKit_EKError", + "EventKit_EKEvent", + "EventKit_EKEventStore", + "EventKit_EKObject", + "EventKit_EKParticipant", + "EventKit_EKRecurrenceDayOfWeek", + "EventKit_EKRecurrenceEnd", + "EventKit_EKRecurrenceRule", + "EventKit_EKReminder", + "EventKit_EKSource", + "EventKit_EKStructuredLocation", + "EventKit_EKTypes", + "EventKit_EKVirtualConferenceDescriptor", + "EventKit_EKVirtualConferenceProvider", + "EventKit_EventKitDefines", + "block2", + "objc2-app-kit", + "objc2-core-location", + "objc2-map-kit", +] diff --git a/framework-crates/objc2-event-kit/README.md b/framework-crates/objc2-event-kit/README.md new file mode 100644 index 000000000..afea2d225 --- /dev/null +++ b/framework-crates/objc2-event-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-event-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-event-kit)](https://crates.io/crates/objc2-event-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-event-kit/badge.svg)](https://docs.rs/objc2-event-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 EventKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-event-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-event-kit/src/generated b/framework-crates/objc2-event-kit/src/generated new file mode 120000 index 000000000..aac0fe458 --- /dev/null +++ b/framework-crates/objc2-event-kit/src/generated @@ -0,0 +1 @@ +../../../generated/EventKit \ No newline at end of file diff --git a/framework-crates/objc2-event-kit/src/lib.rs b/framework-crates/objc2-event-kit/src/lib.rs new file mode 100644 index 000000000..06abe33fc --- /dev/null +++ b/framework-crates/objc2-event-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `EventKit` 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/eventkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-event-kit/0.2.0")] + +#[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-exception-handling/Cargo.toml b/framework-crates/objc2-exception-handling/Cargo.toml new file mode 100644 index 000000000..b0394fe3e --- /dev/null +++ b/framework-crates/objc2-exception-handling/Cargo.toml @@ -0,0 +1,54 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-exception-handling" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the ExceptionHandling framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +ExceptionHandling_ExceptionHandlingDefines = [] +ExceptionHandling_NSExceptionHandler = [ + "objc2-foundation/Foundation_NSException", + "objc2-foundation/Foundation_NSString", +] +all = [ + "ExceptionHandling_ExceptionHandlingDefines", + "ExceptionHandling_NSExceptionHandler", +] diff --git a/framework-crates/objc2-exception-handling/README.md b/framework-crates/objc2-exception-handling/README.md new file mode 100644 index 000000000..1cd0b9cef --- /dev/null +++ b/framework-crates/objc2-exception-handling/README.md @@ -0,0 +1,14 @@ +# `objc2-exception-handling` + +[![Latest version](https://badgen.net/crates/v/objc2-exception-handling)](https://crates.io/crates/objc2-exception-handling) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-exception-handling/badge.svg)](https://docs.rs/objc2-exception-handling/) +[![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 ExceptionHandling. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-exception-handling/) 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-exception-handling/src/generated b/framework-crates/objc2-exception-handling/src/generated new file mode 120000 index 000000000..2e636b7b0 --- /dev/null +++ b/framework-crates/objc2-exception-handling/src/generated @@ -0,0 +1 @@ +../../../generated/ExceptionHandling \ No newline at end of file diff --git a/framework-crates/objc2-exception-handling/src/lib.rs b/framework-crates/objc2-exception-handling/src/lib.rs new file mode 100644 index 000000000..9f7b93794 --- /dev/null +++ b/framework-crates/objc2-exception-handling/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `ExceptionHandling` 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/exceptionhandling/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-exception-handling/0.2.0")] + +#[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-extension-kit/Cargo.toml b/framework-crates/objc2-extension-kit/Cargo.toml new file mode 100644 index 000000000..71fc3797a --- /dev/null +++ b/framework-crates/objc2-extension-kit/Cargo.toml @@ -0,0 +1,82 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-extension-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the ExtensionKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +objc2-app-kit = ["dep:objc2-app-kit"] + +ExtensionKit_EXAppExtensionBrowserViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +ExtensionKit_EXHostViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSXPCConnection", +] +all = [ + "ExtensionKit_EXAppExtensionBrowserViewController", + "ExtensionKit_EXHostViewController", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-extension-kit/README.md b/framework-crates/objc2-extension-kit/README.md new file mode 100644 index 000000000..e2318ba5e --- /dev/null +++ b/framework-crates/objc2-extension-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-extension-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-extension-kit)](https://crates.io/crates/objc2-extension-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-extension-kit/badge.svg)](https://docs.rs/objc2-extension-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 ExtensionKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-extension-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-extension-kit/src/generated b/framework-crates/objc2-extension-kit/src/generated new file mode 120000 index 000000000..84ca0bffb --- /dev/null +++ b/framework-crates/objc2-extension-kit/src/generated @@ -0,0 +1 @@ +../../../generated/ExtensionKit \ No newline at end of file diff --git a/framework-crates/objc2-extension-kit/src/lib.rs b/framework-crates/objc2-extension-kit/src/lib.rs new file mode 100644 index 000000000..8eb1d3196 --- /dev/null +++ b/framework-crates/objc2-extension-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `ExtensionKit` 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/extensionkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-extension-kit/0.2.0")] + +#[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-external-accessory/Cargo.toml b/framework-crates/objc2-external-accessory/Cargo.toml new file mode 100644 index 000000000..2b84ae389 --- /dev/null +++ b/framework-crates/objc2-external-accessory/Cargo.toml @@ -0,0 +1,78 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-external-accessory" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the ExternalAccessory framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +ExternalAccessory_EAAccessory = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +ExternalAccessory_EAAccessoryManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +ExternalAccessory_EASession = [ + "objc2-foundation/Foundation_NSStream", + "objc2-foundation/Foundation_NSString", +] +ExternalAccessory_EAWiFiUnconfiguredAccessory = ["objc2-foundation/Foundation_NSString"] +ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser = [ + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", +] +ExternalAccessory_ExternalAccessoryDefines = [] +all = [ + "ExternalAccessory_EAAccessory", + "ExternalAccessory_EAAccessoryManager", + "ExternalAccessory_EASession", + "ExternalAccessory_EAWiFiUnconfiguredAccessory", + "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser", + "ExternalAccessory_ExternalAccessoryDefines", + "block2", +] diff --git a/framework-crates/objc2-external-accessory/README.md b/framework-crates/objc2-external-accessory/README.md new file mode 100644 index 000000000..8985297b1 --- /dev/null +++ b/framework-crates/objc2-external-accessory/README.md @@ -0,0 +1,14 @@ +# `objc2-external-accessory` + +[![Latest version](https://badgen.net/crates/v/objc2-external-accessory)](https://crates.io/crates/objc2-external-accessory) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-external-accessory/badge.svg)](https://docs.rs/objc2-external-accessory/) +[![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 ExternalAccessory. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-external-accessory/) 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-external-accessory/src/generated b/framework-crates/objc2-external-accessory/src/generated new file mode 120000 index 000000000..dbda897a8 --- /dev/null +++ b/framework-crates/objc2-external-accessory/src/generated @@ -0,0 +1 @@ +../../../generated/ExternalAccessory \ No newline at end of file diff --git a/framework-crates/objc2-external-accessory/src/lib.rs b/framework-crates/objc2-external-accessory/src/lib.rs new file mode 100644 index 000000000..e1c7e610b --- /dev/null +++ b/framework-crates/objc2-external-accessory/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `ExternalAccessory` 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/externalaccessory/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-external-accessory/0.2.0")] + +#[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-file-provider-ui/Cargo.toml b/framework-crates/objc2-file-provider-ui/Cargo.toml new file mode 100644 index 000000000..6ef0a4ce4 --- /dev/null +++ b/framework-crates/objc2-file-provider-ui/Cargo.toml @@ -0,0 +1,82 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-file-provider-ui" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the FileProviderUI framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-file-provider = { path = "../objc2-file-provider", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +FileProviderUI_FPUIActionExtensionContext = [ + "objc2-file-provider/FileProvider_NSFileProviderDomain", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSString", +] +FileProviderUI_FPUIActionExtensionViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-file-provider/FileProvider_NSFileProviderItem", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionContext", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +FileProviderUI_FPUIBase = [] +all = [ + "FileProviderUI_FPUIActionExtensionContext", + "FileProviderUI_FPUIActionExtensionViewController", + "FileProviderUI_FPUIBase", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-file-provider-ui/README.md b/framework-crates/objc2-file-provider-ui/README.md new file mode 100644 index 000000000..1a0337666 --- /dev/null +++ b/framework-crates/objc2-file-provider-ui/README.md @@ -0,0 +1,14 @@ +# `objc2-file-provider-ui` + +[![Latest version](https://badgen.net/crates/v/objc2-file-provider-ui)](https://crates.io/crates/objc2-file-provider-ui) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-file-provider-ui/badge.svg)](https://docs.rs/objc2-file-provider-ui/) +[![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 FileProviderUI. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-file-provider-ui/) 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-file-provider-ui/src/generated b/framework-crates/objc2-file-provider-ui/src/generated new file mode 120000 index 000000000..eebc0c4d2 --- /dev/null +++ b/framework-crates/objc2-file-provider-ui/src/generated @@ -0,0 +1 @@ +../../../generated/FileProviderUI \ No newline at end of file diff --git a/framework-crates/objc2-file-provider-ui/src/lib.rs b/framework-crates/objc2-file-provider-ui/src/lib.rs new file mode 100644 index 000000000..4d30e8f70 --- /dev/null +++ b/framework-crates/objc2-file-provider-ui/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `FileProviderUI` 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/fileproviderui/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-file-provider-ui/0.2.0")] + +#[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-file-provider/Cargo.toml b/framework-crates/objc2-file-provider/Cargo.toml new file mode 100644 index 000000000..239ae7551 --- /dev/null +++ b/framework-crates/objc2-file-provider/Cargo.toml @@ -0,0 +1,159 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-file-provider" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the FileProvider framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-uniform-type-identifiers = ["dep:objc2-uniform-type-identifiers"] + +FileProvider_NSFileProviderActions = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +FileProvider_NSFileProviderDefines = [] +FileProvider_NSFileProviderDomain = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +FileProvider_NSFileProviderEnumerating = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +FileProvider_NSFileProviderError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +FileProvider_NSFileProviderExtension = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +FileProvider_NSFileProviderItem = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPersonNameComponents", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", + "objc2-uniform-type-identifiers?/UniformTypeIdentifiers_UTType", +] +FileProvider_NSFileProviderItemDecoration = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +FileProvider_NSFileProviderManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSProgress", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLSession", +] +FileProvider_NSFileProviderModifyItemOptions = [] +FileProvider_NSFileProviderReplicatedExtension = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSProgress", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +FileProvider_NSFileProviderRequest = ["objc2-foundation/Foundation_NSURL"] +FileProvider_NSFileProviderService = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSFileManager", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSXPCConnection", +] +FileProvider_NSFileProviderTesting = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +FileProvider_NSFileProviderThumbnailing = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSProgress", + "objc2-foundation/Foundation_NSString", +] +all = [ + "FileProvider_NSFileProviderActions", + "FileProvider_NSFileProviderDefines", + "FileProvider_NSFileProviderDomain", + "FileProvider_NSFileProviderEnumerating", + "FileProvider_NSFileProviderError", + "FileProvider_NSFileProviderExtension", + "FileProvider_NSFileProviderItem", + "FileProvider_NSFileProviderItemDecoration", + "FileProvider_NSFileProviderManager", + "FileProvider_NSFileProviderModifyItemOptions", + "FileProvider_NSFileProviderReplicatedExtension", + "FileProvider_NSFileProviderRequest", + "FileProvider_NSFileProviderService", + "FileProvider_NSFileProviderTesting", + "FileProvider_NSFileProviderThumbnailing", + "block2", + "objc2-uniform-type-identifiers", +] diff --git a/framework-crates/objc2-file-provider/README.md b/framework-crates/objc2-file-provider/README.md new file mode 100644 index 000000000..6dfb33553 --- /dev/null +++ b/framework-crates/objc2-file-provider/README.md @@ -0,0 +1,14 @@ +# `objc2-file-provider` + +[![Latest version](https://badgen.net/crates/v/objc2-file-provider)](https://crates.io/crates/objc2-file-provider) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-file-provider/badge.svg)](https://docs.rs/objc2-file-provider/) +[![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 FileProvider. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-file-provider/) 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-file-provider/src/generated b/framework-crates/objc2-file-provider/src/generated new file mode 120000 index 000000000..47b86d901 --- /dev/null +++ b/framework-crates/objc2-file-provider/src/generated @@ -0,0 +1 @@ +../../../generated/FileProvider \ No newline at end of file diff --git a/framework-crates/objc2-file-provider/src/lib.rs b/framework-crates/objc2-file-provider/src/lib.rs new file mode 100644 index 000000000..ad6465b9c --- /dev/null +++ b/framework-crates/objc2-file-provider/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `FileProvider` 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/fileprovider/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-file-provider/0.2.0")] + +#[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-foundation/Cargo.modified.toml b/framework-crates/objc2-foundation/Cargo.modified.toml new file mode 100644 index 000000000..258540041 --- /dev/null +++ b/framework-crates/objc2-foundation/Cargo.modified.toml @@ -0,0 +1,48 @@ +[dependencies] +dispatch = { version = "0.2.0", optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false } +block2 = { path = "../../crates/block2", version = "0.4.0", default-features = false, optional = true } + +[dev-dependencies] +static_assertions = "1.1.0" + +[package.metadata.docs.rs] +features = ["dispatch", "all", "unstable-docsrs"] + +[[example]] +name = "basic_usage" +required-features = [ + "Foundation_NSArray", + "Foundation_NSDictionary", + "Foundation_NSEnumerator", + "Foundation_NSRange", + "Foundation_NSObject", +] + +[[example]] +name = "speech_synthesis" +required-features = [ + "apple", + "Foundation_NSString", + "Foundation_NSObject", +] + +[features] +default = ["std", "apple"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std", "block2?/std"] +alloc = ["objc2/alloc", "block2?/alloc"] + +# Runtime selection. See `objc-sys` for details. +apple = ["objc2/apple", "block2?/apple"] +gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1"] + +# Make the `ns_string!` macro create the string statically +unstable-static-nsstring = [] + +dispatch = ["dep:dispatch"] diff --git a/framework-crates/objc2-foundation/Cargo.toml b/framework-crates/objc2-foundation/Cargo.toml new file mode 100644 index 000000000..8eb6719f4 --- /dev/null +++ b/framework-crates/objc2-foundation/Cargo.toml @@ -0,0 +1,418 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-foundation" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Foundation framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false } +block2 = { path = "../../crates/block2", version = "0.4.0", default-features = false, optional = true } +dispatch = { version = "0.2.0", optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["dispatch", "all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", + "x86_64-unknown-linux-gnu", + "i686-unknown-linux-gnu", +] + +[features] +default = ["std", "apple"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std", "block2?/std"] +alloc = ["objc2/alloc", "block2?/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +apple = ["objc2/apple", "block2?/apple"] +gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7"] +gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8"] +gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9", "block2?/gnustep-1-9"] +gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0", "block2?/gnustep-2-0"] +gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1", "block2?/gnustep-2-1"] +unstable-static-nsstring = [] +dispatch = ["dep:dispatch"] +block2 = ["dep:block2"] + +Foundation_FoundationErrors = [] +Foundation_FoundationLegacySwiftCompatibility = [] +Foundation_NSAffineTransform = [] +Foundation_NSAppleEventDescriptor = [] +Foundation_NSAppleEventManager = [] +Foundation_NSAppleScript = [] +Foundation_NSArchiver = [] +Foundation_NSArray = [] +Foundation_NSAttributedString = [] +Foundation_NSAutoreleasePool = [] +Foundation_NSBackgroundActivityScheduler = [] +Foundation_NSBundle = [] +Foundation_NSByteCountFormatter = [] +Foundation_NSByteOrder = [] +Foundation_NSCache = [] +Foundation_NSCalendar = [] +Foundation_NSCalendarDate = [] +Foundation_NSCharacterSet = [] +Foundation_NSClassDescription = [] +Foundation_NSCoder = [] +Foundation_NSComparisonPredicate = [] +Foundation_NSCompoundPredicate = [] +Foundation_NSConnection = [] +Foundation_NSData = [] +Foundation_NSDate = [] +Foundation_NSDateComponentsFormatter = [] +Foundation_NSDateFormatter = [] +Foundation_NSDateInterval = [] +Foundation_NSDateIntervalFormatter = [] +Foundation_NSDecimal = [] +Foundation_NSDecimalNumber = [] +Foundation_NSDictionary = [] +Foundation_NSDistantObject = [] +Foundation_NSDistributedLock = [] +Foundation_NSDistributedNotificationCenter = [] +Foundation_NSEnergyFormatter = [] +Foundation_NSEnumerator = [] +Foundation_NSError = [] +Foundation_NSException = [] +Foundation_NSExpression = [] +Foundation_NSExtensionContext = [] +Foundation_NSExtensionItem = [] +Foundation_NSExtensionRequestHandling = [] +Foundation_NSFileCoordinator = [] +Foundation_NSFileHandle = [] +Foundation_NSFileManager = [] +Foundation_NSFilePresenter = [] +Foundation_NSFileVersion = [] +Foundation_NSFileWrapper = [] +Foundation_NSFormatter = [] +Foundation_NSGarbageCollector = [] +Foundation_NSGeometry = [] +Foundation_NSHFSFileTypes = [] +Foundation_NSHTTPCookie = [] +Foundation_NSHTTPCookieStorage = [] +Foundation_NSHashTable = [] +Foundation_NSHost = [] +Foundation_NSISO8601DateFormatter = [] +Foundation_NSIndexPath = [] +Foundation_NSIndexSet = [] +Foundation_NSInflectionRule = [] +Foundation_NSInvocation = [] +Foundation_NSItemProvider = [] +Foundation_NSJSONSerialization = [] +Foundation_NSKeyValueCoding = [] +Foundation_NSKeyValueObserving = [] +Foundation_NSKeyedArchiver = [] +Foundation_NSLengthFormatter = [] +Foundation_NSLinguisticTagger = [] +Foundation_NSListFormatter = [] +Foundation_NSLocale = [] +Foundation_NSLock = [] +Foundation_NSMapTable = [] +Foundation_NSMassFormatter = [] +Foundation_NSMeasurement = [] +Foundation_NSMeasurementFormatter = [] +Foundation_NSMetadata = [] +Foundation_NSMetadataAttributes = [] +Foundation_NSMethodSignature = [] +Foundation_NSMorphology = [] +Foundation_NSNetServices = [] +Foundation_NSNotification = [] +Foundation_NSNotificationQueue = [] +Foundation_NSNull = [] +Foundation_NSNumberFormatter = [] +Foundation_NSObjCRuntime = [] +Foundation_NSObject = [] +Foundation_NSObjectScripting = [] +Foundation_NSOperation = [] +Foundation_NSOrderedCollectionChange = [] +Foundation_NSOrderedCollectionDifference = [] +Foundation_NSOrderedSet = [] +Foundation_NSOrthography = [] +Foundation_NSPathUtilities = [] +Foundation_NSPersonNameComponents = [] +Foundation_NSPersonNameComponentsFormatter = [] +Foundation_NSPointerArray = [] +Foundation_NSPointerFunctions = [] +Foundation_NSPort = [] +Foundation_NSPortCoder = [] +Foundation_NSPortMessage = [] +Foundation_NSPortNameServer = [] +Foundation_NSPredicate = [] +Foundation_NSProcessInfo = [] +Foundation_NSProgress = [] +Foundation_NSPropertyList = [] +Foundation_NSProtocolChecker = [] +Foundation_NSProxy = [] +Foundation_NSRange = [] +Foundation_NSRegularExpression = [] +Foundation_NSRelativeDateTimeFormatter = [] +Foundation_NSRunLoop = [] +Foundation_NSScanner = [] +Foundation_NSScriptClassDescription = [] +Foundation_NSScriptCoercionHandler = [] +Foundation_NSScriptCommand = [] +Foundation_NSScriptCommandDescription = [] +Foundation_NSScriptExecutionContext = [] +Foundation_NSScriptKeyValueCoding = [] +Foundation_NSScriptObjectSpecifiers = [] +Foundation_NSScriptStandardSuiteCommands = [] +Foundation_NSScriptSuiteRegistry = [] +Foundation_NSScriptWhoseTests = [] +Foundation_NSSet = [] +Foundation_NSSortDescriptor = [] +Foundation_NSSpellServer = [] +Foundation_NSStream = [] +Foundation_NSString = [] +Foundation_NSTask = [] +Foundation_NSTermOfAddress = [] +Foundation_NSTextCheckingResult = [] +Foundation_NSThread = [] +Foundation_NSTimeZone = [] +Foundation_NSTimer = [] +Foundation_NSURL = [] +Foundation_NSURLAuthenticationChallenge = [] +Foundation_NSURLCache = [] +Foundation_NSURLConnection = [] +Foundation_NSURLCredential = [] +Foundation_NSURLCredentialStorage = [] +Foundation_NSURLDownload = [] +Foundation_NSURLError = [] +Foundation_NSURLHandle = [] +Foundation_NSURLProtectionSpace = [] +Foundation_NSURLProtocol = [] +Foundation_NSURLRequest = [] +Foundation_NSURLResponse = [] +Foundation_NSURLSession = [] +Foundation_NSUUID = [] +Foundation_NSUbiquitousKeyValueStore = [] +Foundation_NSUndoManager = [] +Foundation_NSUnit = [] +Foundation_NSUserActivity = [] +Foundation_NSUserDefaults = [] +Foundation_NSUserNotification = [] +Foundation_NSUserScriptTask = [] +Foundation_NSValue = [] +Foundation_NSValueTransformer = [] +Foundation_NSXMLDTD = [] +Foundation_NSXMLDTDNode = [] +Foundation_NSXMLDocument = [] +Foundation_NSXMLElement = [] +Foundation_NSXMLNode = [] +Foundation_NSXMLNodeOptions = [] +Foundation_NSXMLParser = [] +Foundation_NSXPCConnection = [] +Foundation_NSZone = [] +all = [ + "Foundation_FoundationErrors", + "Foundation_FoundationLegacySwiftCompatibility", + "Foundation_NSAffineTransform", + "Foundation_NSAppleEventDescriptor", + "Foundation_NSAppleEventManager", + "Foundation_NSAppleScript", + "Foundation_NSArchiver", + "Foundation_NSArray", + "Foundation_NSAttributedString", + "Foundation_NSAutoreleasePool", + "Foundation_NSBackgroundActivityScheduler", + "Foundation_NSBundle", + "Foundation_NSByteCountFormatter", + "Foundation_NSByteOrder", + "Foundation_NSCache", + "Foundation_NSCalendar", + "Foundation_NSCalendarDate", + "Foundation_NSCharacterSet", + "Foundation_NSClassDescription", + "Foundation_NSCoder", + "Foundation_NSComparisonPredicate", + "Foundation_NSCompoundPredicate", + "Foundation_NSConnection", + "Foundation_NSData", + "Foundation_NSDate", + "Foundation_NSDateComponentsFormatter", + "Foundation_NSDateFormatter", + "Foundation_NSDateInterval", + "Foundation_NSDateIntervalFormatter", + "Foundation_NSDecimal", + "Foundation_NSDecimalNumber", + "Foundation_NSDictionary", + "Foundation_NSDistantObject", + "Foundation_NSDistributedLock", + "Foundation_NSDistributedNotificationCenter", + "Foundation_NSEnergyFormatter", + "Foundation_NSEnumerator", + "Foundation_NSError", + "Foundation_NSException", + "Foundation_NSExpression", + "Foundation_NSExtensionContext", + "Foundation_NSExtensionItem", + "Foundation_NSExtensionRequestHandling", + "Foundation_NSFileCoordinator", + "Foundation_NSFileHandle", + "Foundation_NSFileManager", + "Foundation_NSFilePresenter", + "Foundation_NSFileVersion", + "Foundation_NSFileWrapper", + "Foundation_NSFormatter", + "Foundation_NSGarbageCollector", + "Foundation_NSGeometry", + "Foundation_NSHFSFileTypes", + "Foundation_NSHTTPCookie", + "Foundation_NSHTTPCookieStorage", + "Foundation_NSHashTable", + "Foundation_NSHost", + "Foundation_NSISO8601DateFormatter", + "Foundation_NSIndexPath", + "Foundation_NSIndexSet", + "Foundation_NSInflectionRule", + "Foundation_NSInvocation", + "Foundation_NSItemProvider", + "Foundation_NSJSONSerialization", + "Foundation_NSKeyValueCoding", + "Foundation_NSKeyValueObserving", + "Foundation_NSKeyedArchiver", + "Foundation_NSLengthFormatter", + "Foundation_NSLinguisticTagger", + "Foundation_NSListFormatter", + "Foundation_NSLocale", + "Foundation_NSLock", + "Foundation_NSMapTable", + "Foundation_NSMassFormatter", + "Foundation_NSMeasurement", + "Foundation_NSMeasurementFormatter", + "Foundation_NSMetadata", + "Foundation_NSMetadataAttributes", + "Foundation_NSMethodSignature", + "Foundation_NSMorphology", + "Foundation_NSNetServices", + "Foundation_NSNotification", + "Foundation_NSNotificationQueue", + "Foundation_NSNull", + "Foundation_NSNumberFormatter", + "Foundation_NSObjCRuntime", + "Foundation_NSObject", + "Foundation_NSObjectScripting", + "Foundation_NSOperation", + "Foundation_NSOrderedCollectionChange", + "Foundation_NSOrderedCollectionDifference", + "Foundation_NSOrderedSet", + "Foundation_NSOrthography", + "Foundation_NSPathUtilities", + "Foundation_NSPersonNameComponents", + "Foundation_NSPersonNameComponentsFormatter", + "Foundation_NSPointerArray", + "Foundation_NSPointerFunctions", + "Foundation_NSPort", + "Foundation_NSPortCoder", + "Foundation_NSPortMessage", + "Foundation_NSPortNameServer", + "Foundation_NSPredicate", + "Foundation_NSProcessInfo", + "Foundation_NSProgress", + "Foundation_NSPropertyList", + "Foundation_NSProtocolChecker", + "Foundation_NSProxy", + "Foundation_NSRange", + "Foundation_NSRegularExpression", + "Foundation_NSRelativeDateTimeFormatter", + "Foundation_NSRunLoop", + "Foundation_NSScanner", + "Foundation_NSScriptClassDescription", + "Foundation_NSScriptCoercionHandler", + "Foundation_NSScriptCommand", + "Foundation_NSScriptCommandDescription", + "Foundation_NSScriptExecutionContext", + "Foundation_NSScriptKeyValueCoding", + "Foundation_NSScriptObjectSpecifiers", + "Foundation_NSScriptStandardSuiteCommands", + "Foundation_NSScriptSuiteRegistry", + "Foundation_NSScriptWhoseTests", + "Foundation_NSSet", + "Foundation_NSSortDescriptor", + "Foundation_NSSpellServer", + "Foundation_NSStream", + "Foundation_NSString", + "Foundation_NSTask", + "Foundation_NSTermOfAddress", + "Foundation_NSTextCheckingResult", + "Foundation_NSThread", + "Foundation_NSTimeZone", + "Foundation_NSTimer", + "Foundation_NSURL", + "Foundation_NSURLAuthenticationChallenge", + "Foundation_NSURLCache", + "Foundation_NSURLConnection", + "Foundation_NSURLCredential", + "Foundation_NSURLCredentialStorage", + "Foundation_NSURLDownload", + "Foundation_NSURLError", + "Foundation_NSURLHandle", + "Foundation_NSURLProtectionSpace", + "Foundation_NSURLProtocol", + "Foundation_NSURLRequest", + "Foundation_NSURLResponse", + "Foundation_NSURLSession", + "Foundation_NSUUID", + "Foundation_NSUbiquitousKeyValueStore", + "Foundation_NSUndoManager", + "Foundation_NSUnit", + "Foundation_NSUserActivity", + "Foundation_NSUserDefaults", + "Foundation_NSUserNotification", + "Foundation_NSUserScriptTask", + "Foundation_NSValue", + "Foundation_NSValueTransformer", + "Foundation_NSXMLDTD", + "Foundation_NSXMLDTDNode", + "Foundation_NSXMLDocument", + "Foundation_NSXMLElement", + "Foundation_NSXMLNode", + "Foundation_NSXMLNodeOptions", + "Foundation_NSXMLParser", + "Foundation_NSXPCConnection", + "Foundation_NSZone", + "block2", +] + +[dev-dependencies] +static_assertions = "1.1.0" + +[[example]] +name = "basic_usage" +required-features = [ + "Foundation_NSArray", + "Foundation_NSDictionary", + "Foundation_NSEnumerator", + "Foundation_NSRange", + "Foundation_NSObject", +] + +[[example]] +name = "speech_synthesis" +required-features = [ + "apple", + "Foundation_NSString", + "Foundation_NSObject", +] diff --git a/framework-crates/objc2-foundation/README.md b/framework-crates/objc2-foundation/README.md new file mode 100644 index 000000000..ac3a29655 --- /dev/null +++ b/framework-crates/objc2-foundation/README.md @@ -0,0 +1,14 @@ +# `objc2-foundation` + +[![Latest version](https://badgen.net/crates/v/objc2-foundation)](https://crates.io/crates/objc2-foundation) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-foundation/badge.svg)](https://docs.rs/objc2-foundation/) +[![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 Foundation. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-foundation/) 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/crates/icrate/examples/basic_usage.rs b/framework-crates/objc2-foundation/examples/basic_usage.rs similarity index 91% rename from crates/icrate/examples/basic_usage.rs rename to framework-crates/objc2-foundation/examples/basic_usage.rs index 7b40c67b4..eb73b6221 100644 --- a/crates/icrate/examples/basic_usage.rs +++ b/framework-crates/objc2-foundation/examples/basic_usage.rs @@ -1,5 +1,5 @@ -use icrate::objc2::rc::autoreleasepool; -use icrate::Foundation::{ns_string, NSArray, NSDictionary, NSObject}; +use objc2::rc::autoreleasepool; +use objc2_foundation::{ns_string, NSArray, NSDictionary, NSObject}; fn main() { // Create and compare NSObjects diff --git a/crates/icrate/examples/speech_synthesis.rs b/framework-crates/objc2-foundation/examples/speech_synthesis.rs similarity index 98% rename from crates/icrate/examples/speech_synthesis.rs rename to framework-crates/objc2-foundation/examples/speech_synthesis.rs index 0d0880801..87750d534 100644 --- a/crates/icrate/examples/speech_synthesis.rs +++ b/framework-crates/objc2-foundation/examples/speech_synthesis.rs @@ -10,14 +10,14 @@ use std::thread; use std::time::Duration; -use icrate::Foundation::{ns_string, NSObject, NSString}; use objc2::mutability::InteriorMutable; use objc2::rc::Id; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2_foundation::{ns_string, NSObject, NSString}; #[cfg(target_os = "macos")] mod appkit { - use icrate::Foundation::NSCopying; + use objc2_foundation::NSCopying; use std::cell::Cell; use super::*; diff --git a/crates/icrate/src/additions/Foundation/__macro_helpers/cached.rs b/framework-crates/objc2-foundation/src/__macro_helpers/cached.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/__macro_helpers/cached.rs rename to framework-crates/objc2-foundation/src/__macro_helpers/cached.rs diff --git a/crates/icrate/src/additions/Foundation/__macro_helpers/mod.rs b/framework-crates/objc2-foundation/src/__macro_helpers/mod.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/__macro_helpers/mod.rs rename to framework-crates/objc2-foundation/src/__macro_helpers/mod.rs diff --git a/crates/icrate/src/additions/Foundation/__macro_helpers/ns_string.rs b/framework-crates/objc2-foundation/src/__macro_helpers/ns_string.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/__macro_helpers/ns_string.rs rename to framework-crates/objc2-foundation/src/__macro_helpers/ns_string.rs diff --git a/crates/icrate/src/additions/Foundation/array.rs b/framework-crates/objc2-foundation/src/array.rs similarity index 92% rename from crates/icrate/src/additions/Foundation/array.rs rename to framework-crates/objc2-foundation/src/array.rs index 6ef25a3e4..09e0413ff 100644 --- a/crates/icrate/src/additions/Foundation/array.rs +++ b/framework-crates/objc2-foundation/src/array.rs @@ -1,20 +1,19 @@ //! Utilities for the `NSArray` and `NSMutableArray` classes. use alloc::vec::Vec; +#[cfg(feature = "Foundation_NSEnumerator")] use core::fmt; #[cfg(feature = "Foundation_NSRange")] use core::ops::Range; use core::ops::{Index, IndexMut}; -use core::ptr::NonNull; -use std::os::raw::c_void; use objc2::mutability::{IsIdCloneable, IsMutable, IsRetainable}; use objc2::rc::{Id, IdFromIterator}; use objc2::{extern_methods, ClassType, Message}; +#[cfg(feature = "Foundation_NSEnumerator")] use super::iter; use super::util; -use crate::Foundation::NSMutableArray; -use crate::Foundation::{self, NSArray}; +use crate::Foundation::{NSArray, NSMutableArray}; impl NSArray { pub fn from_vec(mut vec: Vec>) -> Id { @@ -226,10 +225,10 @@ extern_methods!( impl NSArray { #[cfg(feature = "Foundation_NSRange")] unsafe fn objects_in_range_unchecked(&self, range: Range) -> Vec<&T> { - let range = Foundation::NSRange::from(range); - let mut vec: Vec> = Vec::with_capacity(range.length); + let range = crate::Foundation::NSRange::from(range); + let mut vec: Vec> = Vec::with_capacity(range.length); unsafe { - self.getObjects_range(NonNull::new(vec.as_mut_ptr()).unwrap(), range); + self.getObjects_range(core::ptr::NonNull::new(vec.as_mut_ptr()).unwrap(), range); vec.set_len(range.length); core::mem::transmute(vec) } @@ -303,13 +302,14 @@ impl NSMutableArray { Some(obj) } + #[cfg(feature = "Foundation_NSObjCRuntime")] #[doc(alias = "sortUsingFunction:context:")] pub fn sort_by core::cmp::Ordering>(&mut self, compare: F) { // TODO: "C-unwind" unsafe extern "C" fn compare_with_closure core::cmp::Ordering>( - obj1: NonNull, - obj2: NonNull, - context: *mut c_void, + obj1: core::ptr::NonNull, + obj2: core::ptr::NonNull, + context: *mut std::os::raw::c_void, ) -> isize { let context: *mut F = context.cast(); // Bring back a reference to the closure. @@ -320,7 +320,7 @@ impl NSMutableArray { // SAFETY: The objects are guaranteed to be valid let (obj1, obj2) = unsafe { (obj1.as_ref(), obj2.as_ref()) }; - Foundation::NSComparisonResult::from((*closure)(obj1, obj2)) as _ + crate::Foundation::NSComparisonResult::from((*closure)(obj1, obj2)) as _ } // Create function pointer @@ -337,12 +337,14 @@ impl NSMutableArray { } impl NSArray { + #[cfg(feature = "Foundation_NSEnumerator")] #[doc(alias = "objectEnumerator")] #[inline] pub fn iter(&self) -> Iter<'_, T> { Iter(super::iter::Iter::new(self)) } + #[cfg(feature = "Foundation_NSEnumerator")] #[doc(alias = "objectEnumerator")] #[inline] pub fn iter_mut(&mut self) -> IterMut<'_, T> @@ -352,6 +354,7 @@ impl NSArray { IterMut(super::iter::IterMut::new(self)) } + #[cfg(feature = "Foundation_NSEnumerator")] #[doc(alias = "objectEnumerator")] #[inline] pub fn iter_retained(&self) -> IterRetained<'_, T> @@ -362,6 +365,7 @@ impl NSArray { } } +#[cfg(feature = "Foundation_NSEnumerator")] unsafe impl iter::FastEnumerationHelper for NSArray { type Item = T; @@ -371,6 +375,7 @@ unsafe impl iter::FastEnumerationHelper for NSArray { } } +#[cfg(feature = "Foundation_NSEnumerator")] unsafe impl iter::FastEnumerationHelper for NSMutableArray { type Item = T; @@ -382,36 +387,45 @@ unsafe impl iter::FastEnumerationHelper for NSMutableArray { /// An iterator over the items of a `NSArray`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct Iter<'a, T: Message>(iter::Iter<'a, NSArray>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message> Iterator for Iter<'a, T> { ... } } /// A mutable iterator over the items of a `NSArray`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct IterMut<'a, T: Message>(iter::IterMut<'a, NSArray>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message + IsMutable> Iterator for IterMut<'a, T> { ... } } /// An iterator that retains the items of a `NSArray`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct IterRetained<'a, T: Message>(iter::IterRetained<'a, NSArray>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message + IsIdCloneable> Iterator> for IterRetained<'a, T> { ... } } /// A consuming iterator over the items of a `NSArray`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct IntoIter(iter::IntoIter>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message> Iterator> for IntoIter { ... } } +#[cfg(feature = "Foundation_NSEnumerator")] __impl_into_iter! { impl IntoIterator for &NSArray { type IntoIter = Iter<'_, T>; @@ -466,6 +480,7 @@ impl IndexMut for NSMutableArray { } } +#[cfg(feature = "Foundation_NSEnumerator")] impl fmt::Debug for NSArray { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -473,6 +488,7 @@ impl fmt::Debug for NSArray { } } +#[cfg(feature = "Foundation_NSEnumerator")] impl fmt::Debug for NSMutableArray { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/crates/icrate/src/additions/Foundation/attributed_string.rs b/framework-crates/objc2-foundation/src/attributed_string.rs similarity index 95% rename from crates/icrate/src/additions/Foundation/attributed_string.rs rename to framework-crates/objc2-foundation/src/attributed_string.rs index b5954f1a1..2ad415212 100644 --- a/crates/icrate/src/additions/Foundation/attributed_string.rs +++ b/framework-crates/objc2-foundation/src/attributed_string.rs @@ -2,7 +2,6 @@ use core::fmt; use core::panic::{RefUnwindSafe, UnwindSafe}; use objc2::rc::Id; -use objc2::runtime::AnyObject; use objc2::ClassType; use crate::Foundation::*; @@ -30,7 +29,7 @@ impl NSAttributedString { #[cfg(feature = "Foundation_NSString")] pub unsafe fn new_with_attributes( string: &NSString, - attributes: &NSDictionary, + attributes: &NSDictionary, ) -> Id { unsafe { Self::initWithString_attributes(Self::alloc(), string, Some(attributes)) } } diff --git a/crates/icrate/src/additions/Foundation/bundle.rs b/framework-crates/objc2-foundation/src/bundle.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/bundle.rs rename to framework-crates/objc2-foundation/src/bundle.rs diff --git a/crates/icrate/src/additions/Foundation/comparison_result.rs b/framework-crates/objc2-foundation/src/comparison_result.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/comparison_result.rs rename to framework-crates/objc2-foundation/src/comparison_result.rs diff --git a/crates/icrate/src/additions/Foundation/copying.rs b/framework-crates/objc2-foundation/src/copying.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/copying.rs rename to framework-crates/objc2-foundation/src/copying.rs diff --git a/crates/icrate/src/additions/Foundation/data.rs b/framework-crates/objc2-foundation/src/data.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/data.rs rename to framework-crates/objc2-foundation/src/data.rs diff --git a/crates/icrate/src/additions/Foundation/decimal.rs b/framework-crates/objc2-foundation/src/decimal.rs similarity index 88% rename from crates/icrate/src/additions/Foundation/decimal.rs rename to framework-crates/objc2-foundation/src/decimal.rs index 7ce5b2a6d..5fc445f08 100644 --- a/crates/icrate/src/additions/Foundation/decimal.rs +++ b/framework-crates/objc2-foundation/src/decimal.rs @@ -1,6 +1,5 @@ use std::os::raw::c_ushort; -#[cfg(feature = "objc2")] use objc2::encode::{Encode, Encoding, RefEncode}; #[repr(C)] @@ -15,12 +14,10 @@ pub struct NSDecimal { _mantissa: [c_ushort; 8], } -#[cfg(feature = "objc2")] unsafe impl Encode for NSDecimal { const ENCODING: Encoding = Encoding::Struct("NSDecimal", &[]); } -#[cfg(feature = "objc2")] unsafe impl RefEncode for NSDecimal { const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } diff --git a/crates/icrate/src/additions/Foundation/dictionary.rs b/framework-crates/objc2-foundation/src/dictionary.rs similarity index 97% rename from crates/icrate/src/additions/Foundation/dictionary.rs rename to framework-crates/objc2-foundation/src/dictionary.rs index 2e55a6d57..f03d425ce 100644 --- a/crates/icrate/src/additions/Foundation/dictionary.rs +++ b/framework-crates/objc2-foundation/src/dictionary.rs @@ -18,6 +18,7 @@ use objc2::runtime::ProtocolObject; use objc2::ClassType; use objc2::{extern_methods, Message}; +#[cfg(feature = "Foundation_NSEnumerator")] use super::iter; use super::util; #[cfg(feature = "Foundation_NSObject")] @@ -186,7 +187,7 @@ extern_methods!( not(all(feature = "Foundation_NSString", feature = "Foundation_NSObject")), doc = "```ignore" )] - /// use icrate::Foundation::{ns_string, NSMutableDictionary, NSMutableString, NSString}; + /// use objc2_foundation::{ns_string, NSMutableDictionary, NSMutableString, NSString}; /// /// let mut dict = NSMutableDictionary::new(); /// dict.insert_id(ns_string!("one"), NSMutableString::new()); @@ -247,7 +248,7 @@ impl NSDictionary { not(all(feature = "Foundation_NSString", feature = "Foundation_NSObject")), doc = "```ignore" )] - /// use icrate::Foundation::{ns_string, NSMutableDictionary, NSMutableString, NSString}; + /// use objc2_foundation::{ns_string, NSMutableDictionary, NSMutableString, NSString}; /// /// let mut dict = NSMutableDictionary::new(); /// dict.insert_id(ns_string!("one"), NSMutableString::from_str("two")); @@ -292,7 +293,7 @@ impl NSDictionary { /// # Examples /// /// ``` - /// use icrate::Foundation::{ns_string, NSMutableDictionary, NSObject, NSString}; + /// use objc2_foundation::{ns_string, NSMutableDictionary, NSObject, NSString}; /// /// let mut dict = NSMutableDictionary::new(); /// dict.insert_id(ns_string!("one"), NSObject::new()); @@ -320,7 +321,7 @@ impl NSMutableDictionary NSMutableDictionary NSMutableDictionary NSDictionary { } } +#[cfg(feature = "Foundation_NSEnumerator")] unsafe impl iter::FastEnumerationHelper for NSDictionary { // Fast enumeration for dictionaries returns the keys. type Item = K; @@ -482,6 +484,7 @@ unsafe impl iter::FastEnumerationHelper for NSDictionary } } +#[cfg(feature = "Foundation_NSEnumerator")] unsafe impl iter::FastEnumerationHelper for NSMutableDictionary { // The same goes for mutable dictionaries. type Item = K; diff --git a/crates/icrate/src/additions/Foundation/enumerator.rs b/framework-crates/objc2-foundation/src/enumerator.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/enumerator.rs rename to framework-crates/objc2-foundation/src/enumerator.rs diff --git a/crates/icrate/src/additions/Foundation/error.rs b/framework-crates/objc2-foundation/src/error.rs similarity index 70% rename from crates/icrate/src/additions/Foundation/error.rs rename to framework-crates/objc2-foundation/src/error.rs index 5ca5c162d..d064f2f44 100644 --- a/crates/icrate/src/additions/Foundation/error.rs +++ b/framework-crates/objc2-foundation/src/error.rs @@ -1,12 +1,8 @@ +#[cfg(feature = "Foundation_NSString")] use core::fmt; use core::panic::{RefUnwindSafe, UnwindSafe}; -use objc2::rc::Id; -use objc2::ClassType; - -use crate::Foundation::{ - self, NSError, NSErrorDomain, NSErrorUserInfoKey, NSInteger, NSLocalizedDescriptionKey, -}; +use crate::Foundation::NSError; impl UnwindSafe for NSError {} impl RefUnwindSafe for NSError {} @@ -14,7 +10,10 @@ impl RefUnwindSafe for NSError {} /// Creation methods. impl NSError { /// Construct a new [`NSError`] with the given code in the given domain. - pub fn new(code: NSInteger, domain: &NSErrorDomain) -> Id { + #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(feature = "Foundation_NSString")] + pub fn new(code: objc2::ffi::NSInteger, domain: &crate::NSErrorDomain) -> objc2::rc::Id { + use objc2::ClassType; // SAFETY: `domain` and `user_info` are copied to the error object, so // even if the `&NSString` came from a `&mut NSMutableString`, we're // still good! @@ -24,15 +23,15 @@ impl NSError { /// Accessor methods. impl NSError { - #[allow(non_snake_case)] - pub fn NSLocalizedDescriptionKey() -> &'static NSErrorUserInfoKey { - unsafe { NSLocalizedDescriptionKey } + #[cfg(feature = "Foundation_NSString")] + pub fn NSLocalizedDescriptionKey() -> &'static crate::NSErrorUserInfoKey { + unsafe { crate::NSLocalizedDescriptionKey } } } #[cfg(feature = "Foundation_NSString")] #[cfg(feature = "Foundation_NSDictionary")] -impl std::error::Error for Foundation::NSError {} +impl std::error::Error for NSError {} #[cfg(feature = "Foundation_NSString")] #[cfg(feature = "Foundation_NSDictionary")] diff --git a/crates/icrate/src/additions/Foundation/exception.rs b/framework-crates/objc2-foundation/src/exception.rs similarity index 86% rename from crates/icrate/src/additions/Foundation/exception.rs rename to framework-crates/objc2-foundation/src/exception.rs index 495ec9ea0..de9f7c594 100644 --- a/crates/icrate/src/additions/Foundation/exception.rs +++ b/framework-crates/objc2-foundation/src/exception.rs @@ -1,12 +1,12 @@ -#[cfg(feature = "Foundation_NSString")] +#[cfg(all(feature = "Foundation_NSObjCRuntime", feature = "Foundation_NSString"))] use core::fmt; use core::hint::unreachable_unchecked; use core::panic::{RefUnwindSafe, UnwindSafe}; use objc2::exception::Exception; use objc2::rc::Id; -use objc2::runtime::{AnyObject, NSObject, NSObjectProtocol}; -use objc2::{extern_methods, sel, ClassType}; +use objc2::runtime::{NSObject, NSObjectProtocol}; +use objc2::{extern_methods, sel}; use crate::Foundation::NSException; @@ -30,13 +30,15 @@ impl NSException { /// /// Returns `None` if the exception couldn't be created (example: If the /// process is out of memory). - #[cfg(feature = "Foundation_NSString")] + #[cfg(all(feature = "Foundation_NSObjCRuntime", feature = "Foundation_NSString"))] #[cfg(feature = "Foundation_NSDictionary")] pub fn new( name: &crate::Foundation::NSExceptionName, reason: Option<&crate::Foundation::NSString>, - user_info: Option<&crate::Foundation::NSDictionary>, + user_info: Option<&crate::Foundation::NSDictionary>, ) -> Option> { + use objc2::ClassType; + unsafe { objc2::msg_send_id![ Self::alloc(), @@ -96,10 +98,10 @@ impl NSException { } } -#[cfg(feature = "Foundation_NSString")] +#[cfg(all(feature = "Foundation_NSObjCRuntime", feature = "Foundation_NSString"))] impl fmt::Debug for NSException { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let obj: &AnyObject = self.as_ref(); + let obj: &objc2::runtime::AnyObject = self.as_ref(); write!(f, "{obj:?} '{}'", self.name())?; if let Some(reason) = self.reason() { write!(f, " reason:{reason}")?; diff --git a/crates/icrate/src/additions/Foundation/fast_enumeration_state.rs b/framework-crates/objc2-foundation/src/fast_enumeration_state.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/fast_enumeration_state.rs rename to framework-crates/objc2-foundation/src/fast_enumeration_state.rs diff --git a/framework-crates/objc2-foundation/src/generated b/framework-crates/objc2-foundation/src/generated new file mode 120000 index 000000000..22549d50d --- /dev/null +++ b/framework-crates/objc2-foundation/src/generated @@ -0,0 +1 @@ +../../../generated/Foundation \ No newline at end of file diff --git a/crates/icrate/src/additions/Foundation/generics.rs b/framework-crates/objc2-foundation/src/generics.rs similarity index 99% rename from crates/icrate/src/additions/Foundation/generics.rs rename to framework-crates/objc2-foundation/src/generics.rs index 0a6a4ea36..b32ede160 100644 --- a/crates/icrate/src/additions/Foundation/generics.rs +++ b/framework-crates/objc2-foundation/src/generics.rs @@ -1,4 +1,4 @@ -#![allow(dead_code)] +#![allow(dead_code, unused_imports)] use core::marker::PhantomData; use core::panic::{RefUnwindSafe, UnwindSafe}; diff --git a/crates/icrate/src/additions/Foundation/geometry.rs b/framework-crates/objc2-foundation/src/geometry.rs similarity index 96% rename from crates/icrate/src/additions/Foundation/geometry.rs rename to framework-crates/objc2-foundation/src/geometry.rs index 37c4bbaec..f3cbaea33 100644 --- a/crates/icrate/src/additions/Foundation/geometry.rs +++ b/framework-crates/objc2-foundation/src/geometry.rs @@ -74,7 +74,7 @@ impl CGPoint { /// # Examples /// /// ``` - /// use icrate::Foundation::CGPoint; + /// use objc2_foundation::CGPoint; /// assert_eq!(CGPoint::new(10.0, -2.3), CGPoint { x: 10.0, y: -2.3 }); /// ``` #[inline] @@ -90,7 +90,7 @@ impl CGPoint { /// # Examples /// /// ``` - /// use icrate::Foundation::CGPoint; + /// use objc2_foundation::CGPoint; /// assert_eq!(CGPoint::ZERO, CGPoint { x: 0.0, y: 0.0 }); /// ``` #[doc(alias = "NSZeroPoint")] @@ -135,7 +135,7 @@ impl CGSize { /// # Examples /// /// ``` - /// use icrate::Foundation::CGSize; + /// use objc2_foundation::CGSize; /// let size = CGSize::new(10.0, 2.3); /// assert_eq!(size.width, 10.0); /// assert_eq!(size.height, 2.3); @@ -144,7 +144,7 @@ impl CGSize { /// Negative values are allowed (though often undesired). /// /// ``` - /// use icrate::Foundation::CGSize; + /// use objc2_foundation::CGSize; /// let size = CGSize::new(-1.0, 0.0); /// assert_eq!(size.width, -1.0); /// ``` @@ -169,7 +169,7 @@ impl CGSize { /// # Examples /// /// ``` - /// use icrate::Foundation::CGSize; + /// use objc2_foundation::CGSize; /// assert_eq!(CGSize::new(-1.0, 1.0).abs(), CGSize::new(1.0, 1.0)); /// ``` #[inline] @@ -183,7 +183,7 @@ impl CGSize { /// # Examples /// /// ``` - /// use icrate::Foundation::CGSize; + /// use objc2_foundation::CGSize; /// assert_eq!(CGSize::ZERO, CGSize { width: 0.0, height: 0.0 }); /// ``` #[doc(alias = "NSZeroSize")] @@ -230,7 +230,7 @@ impl CGRect { /// # Examples /// /// ``` - /// use icrate::Foundation::{CGPoint, CGRect, CGSize}; + /// use objc2_foundation::{CGPoint, CGRect, CGSize}; /// let origin = CGPoint::new(10.0, -2.3); /// let size = CGSize::new(5.0, 0.0); /// let rect = CGRect::new(origin, size); @@ -255,7 +255,7 @@ impl CGRect { /// # Examples /// /// ``` - /// use icrate::Foundation::{CGPoint, CGRect, CGSize}; + /// use objc2_foundation::{CGPoint, CGRect, CGSize}; /// let origin = CGPoint::new(1.0, 1.0); /// let size = CGSize::new(-5.0, -2.0); /// let rect = CGRect::new(origin, size); @@ -309,7 +309,7 @@ impl CGRect { /// # Examples /// /// ``` - /// use icrate::Foundation::{CGPoint, CGRect, CGSize}; + /// use objc2_foundation::{CGPoint, CGRect, CGSize}; /// assert!(CGRect::ZERO.is_empty()); /// let point = CGPoint::new(1.0, 2.0); /// assert!(CGRect::new(point, CGSize::ZERO).is_empty()); @@ -373,12 +373,10 @@ pub type NSRect = CGRect; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct NSRectEdge(pub NSUInteger); -#[cfg(feature = "objc2")] unsafe impl Encode for NSRectEdge { const ENCODING: Encoding = NSUInteger::ENCODING; } -#[cfg(feature = "objc2")] unsafe impl RefEncode for NSRectEdge { const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } diff --git a/crates/icrate/src/additions/Foundation/iter.rs b/framework-crates/objc2-foundation/src/iter.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/iter.rs rename to framework-crates/objc2-foundation/src/iter.rs diff --git a/crates/icrate/src/additions/Foundation/mod.rs b/framework-crates/objc2-foundation/src/lib.rs similarity index 59% rename from crates/icrate/src/additions/Foundation/mod.rs rename to framework-crates/objc2-foundation/src/lib.rs index c4cc2fb51..4a4d0e012 100644 --- a/crates/icrate/src/additions/Foundation/mod.rs +++ b/framework-crates/objc2-foundation/src/lib.rs @@ -1,28 +1,83 @@ //! # Bindings to the `Foundation` 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/foundation/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +//! //! This is the [`std`] equivalent for Objective-C, containing essential data //! types, collections, and operating-system services. //! -//! See [Apple's documentation](https://developer.apple.com/documentation/foundation?language=objc). +//! +//! ## Rust vs. Objective-C types +//! +//! A quick overview of some types you will encounter often in Objective-C, +//! and their approximate Rust equivalent. +//! +//! | Objective-C | (approximately) equivalent Rust | +//! | --- | --- | +//! | `NSData*` | `Arc<[u8]>` | +//! | `NSMutableData*` | `Vec` | +//! | `NSString*` | `Arc` | +//! | `NSMutableString*` | `String` | +//! | `NSValue*` | `Arc` | +//! | `NSNumber*` | `Arc` | +//! | `NSError*` | `Arc` | +//! | `NSException*` | `Arc` | +//! | `NSRange` | `ops::Range` | +//! | `NSComparisonResult` | `cmp::Ordering` | +//! | `NSArray*` | `Arc<[T]>` | +//! | `NSMutableArray*` | `Vec` | +//! | `NSDictionary*` | `Arc>` | +//! | `NSMutableDictionary*` | `HashMap` | +//! | `NSEnumerator*` | `Box>` | +//! | `NSCopying*` | `Box` | //! //! //! ## Examples //! //! Basic usage of a few Foundation types. //! +//! ```console +//! $ cargo add objc2-foundation --features=all +//! ``` +//! +//! ```ignore +//! use objc2_foundation::{ns_string, NSCopying, NSArray}; +//! +//! let string = ns_string!("world"); +//! println!("hello {string}"); +//! +//! let array = NSArray::from_id_slice(&[string.copy()]); +//! println!("{array:?}"); +//! ``` +//! //! ```ignore -#![doc = include_str!("../../../examples/basic_usage.rs")] +#![doc = include_str!("../examples/basic_usage.rs")] //! ``` //! -//! An example showing how to define your own interfaces to parts that may be missing in `icrate`. +//! An example showing how to define your own interfaces to parts that may be +//! missing in the autogenerated interface. //! //! ```ignore -#![doc = include_str!("../../../examples/speech_synthesis.rs")] +#![doc = include_str!("../examples/speech_synthesis.rs")] //! ``` +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-foundation/0.2.0")] #![allow(non_snake_case)] +#![recursion_limit = "256"] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; #[doc(hidden)] pub mod __macro_helpers; +#[cfg(feature = "Foundation_NSEnumerator")] #[macro_use] mod iter; #[cfg(feature = "Foundation_NSArray")] @@ -49,6 +104,7 @@ mod error; mod exception; #[cfg(feature = "Foundation_NSEnumerator")] mod fast_enumeration_state; +mod generated; mod generics; #[cfg(feature = "Foundation_NSGeometry")] mod geometry; @@ -75,8 +131,6 @@ mod uuid; #[cfg(feature = "Foundation_NSValue")] mod value; -pub use crate::generated::Foundation::*; - #[cfg(feature = "Foundation_NSObjCRuntime")] pub use self::comparison_result::NSComparisonResult; #[cfg(feature = "Foundation_NSObject")] @@ -85,6 +139,9 @@ pub use self::copying::{NSCopying, NSMutableCopying}; pub use self::decimal::NSDecimal; #[cfg(feature = "Foundation_NSEnumerator")] pub use self::fast_enumeration_state::NSFastEnumerationState; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; +#[allow(unused_imports, unreachable_pub)] pub use self::generics::*; #[cfg(feature = "Foundation_NSGeometry")] pub use self::geometry::{CGFloat, CGPoint, CGRect, CGSize, NSPoint, NSRect, NSRectEdge, NSSize}; @@ -99,10 +156,6 @@ pub use self::thread::{is_main_thread, is_multi_threaded}; #[cfg(feature = "dispatch")] pub use self::thread::{run_on_main, MainThreadBound}; -#[cfg(feature = "Foundation_NSString")] -#[doc(inline)] -pub use crate::__ns_string as ns_string; - // Available under Foundation, so makes sense here as well: // https://developer.apple.com/documentation/foundation/numbers_data_and_basic_values?language=objc pub use objc2::ffi::{NSInteger, NSUInteger}; @@ -125,6 +178,12 @@ pub(crate) type Boolean = u8; // unsigned char #[allow(unused)] pub(crate) type FourCharCode = u32; #[allow(unused)] -pub(crate) type OSType = FourCharCode; +pub type OSType = FourCharCode; #[allow(unused)] pub(crate) type UTF32Char = u32; // Or maybe Rust's char? + +// Temporary +#[allow(non_snake_case, unused, unreachable_pub)] +mod Foundation { + pub use crate::*; +} diff --git a/crates/icrate/src/additions/Foundation/macros/mod.rs b/framework-crates/objc2-foundation/src/macros/mod.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/macros/mod.rs rename to framework-crates/objc2-foundation/src/macros/mod.rs diff --git a/crates/icrate/src/additions/Foundation/macros/ns_string.rs b/framework-crates/objc2-foundation/src/macros/ns_string.rs similarity index 81% rename from crates/icrate/src/additions/Foundation/macros/ns_string.rs rename to framework-crates/objc2-foundation/src/macros/ns_string.rs index 4ba6410a4..708b500e8 100644 --- a/crates/icrate/src/additions/Foundation/macros/ns_string.rs +++ b/framework-crates/objc2-foundation/src/macros/ns_string.rs @@ -35,7 +35,7 @@ /// Creating a static `NSString`. /// /// ``` -/// use icrate::Foundation::{ns_string, NSString}; +/// use objc2_foundation::{ns_string, NSString}; /// /// let hello: &'static NSString = ns_string!("hello"); /// assert_eq!(hello.to_string(), "hello"); @@ -44,7 +44,7 @@ /// Creating a `NSString` from a `const` `&str`. /// /// ``` -/// # use icrate::Foundation::ns_string; +/// # use objc2_foundation::ns_string; /// const EXAMPLE: &str = "example"; /// assert_eq!(ns_string!(EXAMPLE).to_string(), EXAMPLE); /// ``` @@ -52,7 +52,7 @@ /// Creating unicode strings. /// /// ``` -/// # use icrate::Foundation::ns_string; +/// # use objc2_foundation::ns_string; /// let hello_ru = ns_string!("Привет"); /// assert_eq!(hello_ru.to_string(), "Привет"); /// ``` @@ -60,18 +60,14 @@ /// Creating a string containing a NUL byte: /// /// ``` -/// # use icrate::Foundation::ns_string; +/// # use objc2_foundation::ns_string; /// assert_eq!(ns_string!("example\0").to_string(), "example\0"); /// assert_eq!(ns_string!("exa\0mple").to_string(), "exa\0mple"); /// ``` // For auto_doc_cfg #[cfg(feature = "Foundation_NSString")] #[macro_export] -// `macro_export` places the macro in the crate root, while we'd rather have -// it scoped under `Foundation`; so let's call this something private, and -// export it there with `#[doc(inline)]` instead. -#[doc(hidden)] -macro_rules! __ns_string { +macro_rules! ns_string { ($s:expr) => {{ // Immediately place in constant for better UI const INPUT: &str = $s; @@ -124,7 +120,7 @@ macro_rules! __ns_string_static { // The full UTF-16 contents along with the written length. const UTF16_FULL: (&[u16; $inp.len()], usize) = { let mut out = [0u16; $inp.len()]; - let mut iter = $crate::Foundation::__macro_helpers::EncodeUtf16Iter::new($inp); + let mut iter = $crate::__macro_helpers::EncodeUtf16Iter::new($inp); let mut written = 0; while let Some((state, chars)) = iter.next() { @@ -165,17 +161,17 @@ macro_rules! __ns_string_static { // The section is the same as what clang sets, see: // https://github.com/llvm/llvm-project/blob/release/13.x/clang/lib/CodeGen/CodeGenModule.cpp#L5243 #[link_section = "__DATA,__cfstring"] - static CFSTRING: $crate::Foundation::__macro_helpers::CFConstString = unsafe { - if $crate::Foundation::__macro_helpers::is_ascii_no_nul($inp) { + static CFSTRING: $crate::__macro_helpers::CFConstString = unsafe { + if $crate::__macro_helpers::is_ascii_no_nul($inp) { // This is technically an optimization (UTF-16 strings are // always valid), but it's a fairly important one! - $crate::Foundation::__macro_helpers::CFConstString::new_ascii( - &$crate::Foundation::__macro_helpers::__CFConstantStringClassReference, + $crate::__macro_helpers::CFConstString::new_ascii( + &$crate::__macro_helpers::__CFConstantStringClassReference, &ASCII, ) } else { - $crate::Foundation::__macro_helpers::CFConstString::new_utf16( - &$crate::Foundation::__macro_helpers::__CFConstantStringClassReference, + $crate::__macro_helpers::CFConstString::new_utf16( + &$crate::__macro_helpers::__CFConstantStringClassReference, &UTF16, ) } @@ -188,9 +184,8 @@ macro_rules! __ns_string_static { #[macro_export] macro_rules! __ns_string_inner { ($inp:ident) => {{ - static CACHED_NSSTRING: $crate::Foundation::__macro_helpers::CachedId< - $crate::Foundation::NSString, - > = $crate::Foundation::__macro_helpers::CachedId::new(); - CACHED_NSSTRING.get(|| $crate::Foundation::NSString::from_str($inp)) + static CACHED_NSSTRING: $crate::__macro_helpers::CachedId<$crate::NSString> = + $crate::__macro_helpers::CachedId::new(); + CACHED_NSSTRING.get(|| $crate::NSString::from_str($inp)) }}; } diff --git a/crates/icrate/src/additions/Foundation/ns_consumed.rs b/framework-crates/objc2-foundation/src/ns_consumed.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/ns_consumed.rs rename to framework-crates/objc2-foundation/src/ns_consumed.rs diff --git a/crates/icrate/src/additions/Foundation/number.rs b/framework-crates/objc2-foundation/src/number.rs similarity index 97% rename from crates/icrate/src/additions/Foundation/number.rs rename to framework-crates/objc2-foundation/src/number.rs index 7fd480d23..0131d6008 100644 --- a/crates/icrate/src/additions/Foundation/number.rs +++ b/framework-crates/objc2-foundation/src/number.rs @@ -15,6 +15,7 @@ //! //! //! (Same goes for `NSNull`). +#[cfg(feature = "Foundation_NSObjCRuntime")] use core::cmp::Ordering; use core::fmt; use core::hash; @@ -138,9 +139,9 @@ impl NSNumber { /// number properties. /// /// ``` - /// use icrate::Foundation::NSNumber; - /// use icrate::objc2::Encoding; - /// use icrate::objc2::rc::Id; + /// use objc2_foundation::NSNumber; + /// use objc2::encode::Encoding; + /// use objc2::rc::Id; /// /// // Note: `bool` would convert to either `Signed` or `Unsigned`, /// // depending on platform @@ -237,6 +238,7 @@ impl Eq for NSNumber {} /// Beware: This uses the Objective-C method "compare:", which has different /// floating point NaN semantics than Rust! +#[cfg(feature = "Foundation_NSObjCRuntime")] impl PartialOrd for NSNumber { #[doc(alias = "compare:")] fn partial_cmp(&self, other: &Self) -> Option { @@ -246,6 +248,7 @@ impl PartialOrd for NSNumber { /// Beware: This uses the Objective-C method "compare:", which has different /// floating point NaN semantics than Rust! +#[cfg(feature = "Foundation_NSObjCRuntime")] impl Ord for NSNumber { #[doc(alias = "compare:")] fn cmp(&self, other: &Self) -> Ordering { diff --git a/crates/icrate/src/additions/Foundation/process_info.rs b/framework-crates/objc2-foundation/src/process_info.rs similarity index 94% rename from crates/icrate/src/additions/Foundation/process_info.rs rename to framework-crates/objc2-foundation/src/process_info.rs index fd441b2b5..421bd5694 100644 --- a/crates/icrate/src/additions/Foundation/process_info.rs +++ b/framework-crates/objc2-foundation/src/process_info.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "Foundation_NSString")] use core::fmt; use core::panic::{RefUnwindSafe, UnwindSafe}; diff --git a/crates/icrate/src/additions/Foundation/range.rs b/framework-crates/objc2-foundation/src/range.rs similarity index 97% rename from crates/icrate/src/additions/Foundation/range.rs rename to framework-crates/objc2-foundation/src/range.rs index 23413f3fb..b02053bf1 100644 --- a/crates/icrate/src/additions/Foundation/range.rs +++ b/framework-crates/objc2-foundation/src/range.rs @@ -23,7 +23,7 @@ impl NSRange { /// # Examples /// /// ``` - /// use icrate::Foundation::NSRange; + /// use objc2_foundation::NSRange; /// assert_eq!(NSRange::new(3, 2), NSRange::from(3..5)); /// ``` #[inline] @@ -38,7 +38,7 @@ impl NSRange { /// # Examples /// /// ``` - /// use icrate::Foundation::NSRange; + /// use objc2_foundation::NSRange; /// /// assert!(!NSRange::from(3..5).is_empty()); /// assert!( NSRange::from(3..3).is_empty()); @@ -53,7 +53,7 @@ impl NSRange { /// # Examples /// /// ``` - /// use icrate::Foundation::NSRange; + /// use objc2_foundation::NSRange; /// /// assert!(!NSRange::from(3..5).contains(2)); /// assert!( NSRange::from(3..5).contains(3)); diff --git a/crates/icrate/src/additions/Foundation/set.rs b/framework-crates/objc2-foundation/src/set.rs similarity index 89% rename from crates/icrate/src/additions/Foundation/set.rs rename to framework-crates/objc2-foundation/src/set.rs index 4c0443c69..cfd823924 100644 --- a/crates/icrate/src/additions/Foundation/set.rs +++ b/framework-crates/objc2-foundation/src/set.rs @@ -1,5 +1,6 @@ //! Utilities for the `NSSet` and `NSMutableSet` classes. use alloc::vec::Vec; +#[cfg(feature = "Foundation_NSEnumerator")] use core::fmt; use core::hash::Hash; @@ -7,9 +8,10 @@ use objc2::mutability::{HasStableHash, IsIdCloneable, IsRetainable}; use objc2::rc::{Id, IdFromIterator}; use objc2::{extern_methods, ClassType, Message}; +#[cfg(feature = "Foundation_NSEnumerator")] use super::iter; use super::util; -use crate::Foundation::{NSCountedSet, NSMutableSet, NSSet}; +use crate::Foundation::{NSMutableSet, NSSet}; impl NSSet { /// Returns the number of elements in the set. @@ -17,7 +19,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSSet::from_id_slice(&strs); @@ -33,7 +35,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let set = NSSet::::new(); /// assert!(set.is_empty()); @@ -49,7 +51,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str).to_vec(); /// let set = NSSet::from_vec(strs); @@ -69,7 +71,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSSet::from_id_slice(&strs); @@ -99,7 +101,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSMutableString, NSSet}; + /// use objc2_foundation::{NSMutableString, NSSet}; /// /// let strs = vec![ /// NSMutableString::from_str("one"), @@ -110,11 +112,12 @@ impl NSSet { /// let vec = set.to_vec(); /// assert_eq!(vec.len(), 3); /// ``` + #[cfg(feature = "Foundation_NSEnumerator")] pub fn to_vec(&self) -> Vec<&T> { self.into_iter().collect() } - #[doc(alias = "getObjects:range:")] + #[cfg(feature = "Foundation_NSEnumerator")] pub fn to_vec_retained(&self) -> Vec> where T: IsIdCloneable, @@ -133,7 +136,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSNumber, NSSet, NSString}; + /// use objc2_foundation::{NSNumber, NSSet, NSString}; /// /// let nums = [1, 2, 3]; /// let set = NSSet::from_id_slice(&nums.map(NSNumber::new_i32)); @@ -163,7 +166,7 @@ impl NSMutableSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSMutableSet, NSString}; + /// use objc2_foundation::{NSMutableSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str).to_vec(); /// let set = NSMutableSet::from_vec(strs); @@ -183,7 +186,7 @@ impl NSMutableSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSMutableSet, NSString}; + /// use objc2_foundation::{NSMutableSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSMutableSet::from_id_slice(&strs); @@ -213,7 +216,7 @@ impl NSMutableSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSMutableSet, NSMutableString}; + /// use objc2_foundation::{NSMutableSet, NSMutableString}; /// /// let strs = vec![ /// NSMutableString::from_str("one"), @@ -224,6 +227,7 @@ impl NSMutableSet { /// let vec = NSMutableSet::into_vec(set); /// assert_eq!(vec.len(), 3); /// ``` + #[cfg(feature = "Foundation_NSEnumerator")] pub fn into_vec(set: Id) -> Vec> { set.into_iter().collect() } @@ -237,7 +241,7 @@ extern_methods!( /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSSet::from_id_slice(&strs); @@ -255,7 +259,7 @@ extern_methods!( /// # Examples /// /// ``` - /// use icrate::Foundation::{ns_string, NSSet, NSString}; + /// use objc2_foundation::{ns_string, NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSSet::from_id_slice(&strs); @@ -272,7 +276,7 @@ extern_methods!( /// # Examples /// /// ``` - /// use icrate::Foundation::{ns_string, NSSet, NSString}; + /// use objc2_foundation::{ns_string, NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSSet::from_id_slice(&strs); @@ -301,7 +305,7 @@ extern_methods!( /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let set1 = NSSet::from_id_slice(&["one", "two"].map(NSString::from_str)); /// let set2 = NSSet::from_id_slice(&["one", "two", "three"].map(NSString::from_str)); @@ -320,7 +324,7 @@ extern_methods!( /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let set1 = NSSet::from_id_slice(&["one", "two"].map(NSString::from_str)); /// let set2 = NSSet::from_id_slice(&["one", "two", "three"].map(NSString::from_str)); @@ -337,7 +341,7 @@ extern_methods!( /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let set1 = NSSet::from_id_slice(&["one", "two"].map(NSString::from_str)); /// let set2 = NSSet::from_id_slice(&["one", "two", "three"].map(NSString::from_str)); @@ -361,7 +365,7 @@ impl NSMutableSet { /// #[cfg_attr(feature = "Foundation_NSValue", doc = "```")] #[cfg_attr(not(feature = "Foundation_NSValue"), doc = "```ignore")] - /// use icrate::Foundation::{NSNumber, NSMutableSet}; + /// use objc2_foundation::{NSNumber, NSMutableSet}; /// /// let mut set = NSMutableSet::new(); /// @@ -387,7 +391,7 @@ impl NSMutableSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSMutableSet, NSString}; + /// use objc2_foundation::{NSMutableSet, NSString}; /// /// let mut set = NSMutableSet::new(); /// @@ -412,7 +416,7 @@ impl NSMutableSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{ns_string, NSMutableSet, NSString}; + /// use objc2_foundation::{ns_string, NSMutableSet, NSString}; /// /// let mut set = NSMutableSet::new(); /// @@ -440,7 +444,7 @@ impl NSSet { /// # Examples /// /// ``` - /// use icrate::Foundation::{NSSet, NSString}; + /// use objc2_foundation::{NSSet, NSString}; /// /// let strs = ["one", "two", "three"].map(NSString::from_str); /// let set = NSSet::from_id_slice(&strs); @@ -449,12 +453,14 @@ impl NSSet { /// } /// ``` #[doc(alias = "objectEnumerator")] + #[cfg(feature = "Foundation_NSEnumerator")] #[inline] pub fn iter(&self) -> Iter<'_, T> { Iter(super::iter::Iter::new(self)) } #[doc(alias = "objectEnumerator")] + #[cfg(feature = "Foundation_NSEnumerator")] #[inline] pub fn iter_retained(&self) -> IterRetained<'_, T> where @@ -464,6 +470,7 @@ impl NSSet { } } +#[cfg(feature = "Foundation_NSEnumerator")] unsafe impl iter::FastEnumerationHelper for NSSet { type Item = T; @@ -473,6 +480,7 @@ unsafe impl iter::FastEnumerationHelper for NSSet { } } +#[cfg(feature = "Foundation_NSEnumerator")] unsafe impl iter::FastEnumerationHelper for NSMutableSet { type Item = T; @@ -484,28 +492,35 @@ unsafe impl iter::FastEnumerationHelper for NSMutableSet { /// An iterator over the items of a `NSSet`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct Iter<'a, T: Message>(iter::Iter<'a, NSSet>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message> Iterator for Iter<'a, T> { ... } } /// An iterator that retains the items of a `NSSet`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct IterRetained<'a, T: Message>(iter::IterRetained<'a, NSSet>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message + IsIdCloneable> Iterator> for IterRetained<'a, T> { ... } } /// A consuming iterator over the items of a `NSSet`. #[derive(Debug)] +#[cfg(feature = "Foundation_NSEnumerator")] pub struct IntoIter(iter::IntoIter>); +#[cfg(feature = "Foundation_NSEnumerator")] __impl_iter! { impl<'a, T: Message> Iterator> for IntoIter { ... } } +#[cfg(feature = "Foundation_NSEnumerator")] __impl_into_iter! { impl IntoIterator for &NSSet { type IntoIter = Iter<'_, T>; @@ -524,6 +539,7 @@ __impl_into_iter! { } } +#[cfg(feature = "Foundation_NSEnumerator")] impl fmt::Debug for NSSet { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -531,6 +547,7 @@ impl fmt::Debug for NSSet { } } +#[cfg(feature = "Foundation_NSEnumerator")] impl fmt::Debug for NSMutableSet { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -538,7 +555,8 @@ impl fmt::Debug for NSMutableSet { } } -impl fmt::Debug for NSCountedSet { +#[cfg(feature = "Foundation_NSEnumerator")] +impl fmt::Debug for crate::Foundation::NSCountedSet { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Debug::fmt(&**self, f) diff --git a/crates/icrate/src/additions/Foundation/string.rs b/framework-crates/objc2-foundation/src/string.rs similarity index 94% rename from crates/icrate/src/additions/Foundation/string.rs rename to framework-crates/objc2-foundation/src/string.rs index 612277748..e0642ecb1 100644 --- a/crates/icrate/src/additions/Foundation/string.rs +++ b/framework-crates/objc2-foundation/src/string.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "Foundation_NSObjCRuntime")] use core::cmp; use core::fmt; use core::ops::AddAssign; @@ -13,7 +14,7 @@ use objc2::rc::{autoreleasepool_leaking, Allocated, AutoreleasePool, Id}; use objc2::runtime::__nsstring::{nsstring_len, nsstring_to_str, UTF8_ENCODING}; use objc2::{ClassType, Message}; -use crate::Foundation::{NSMutableString, NSString}; +use crate::{NSMutableString, NSString}; // SAFETY: `NSString` is immutable and `NSMutableString` can only be mutated // from `&mut` methods. @@ -142,9 +143,8 @@ impl NSMutableString { unsafe fn init_with_str(obj: Allocated, string: &str) -> Id { let bytes: *const c_void = string.as_ptr().cast(); - // We use `msg_send_id` instead of the generated method from `icrate`, - // since that assumes the encoding is `usize`, whereas GNUStep assumes - // `i32`. + // We use `msg_send_id` instead of the generated method, since that + // assumes the encoding is `usize`, whereas GNUStep assumes `i32`. unsafe { msg_send_id![ obj, @@ -169,6 +169,7 @@ impl PartialEq for NSString { } } +#[cfg(feature = "Foundation_NSObjCRuntime")] impl PartialOrd for NSString { #[inline] fn partial_cmp(&self, other: &Self) -> Option { @@ -176,12 +177,14 @@ impl PartialOrd for NSString { } } +#[cfg(feature = "Foundation_NSObjCRuntime")] impl Ord for NSString { fn cmp(&self, other: &Self) -> cmp::Ordering { self.compare(other).into() } } +#[cfg(feature = "Foundation_NSObjCRuntime")] impl PartialOrd for NSMutableString { #[inline] fn partial_cmp(&self, other: &Self) -> Option { @@ -189,6 +192,7 @@ impl PartialOrd for NSMutableString { } } +#[cfg(feature = "Foundation_NSObjCRuntime")] impl PartialOrd for NSMutableString { #[inline] fn partial_cmp(&self, other: &NSString) -> Option { @@ -196,6 +200,7 @@ impl PartialOrd for NSMutableString { } } +#[cfg(feature = "Foundation_NSObjCRuntime")] impl PartialOrd for NSString { #[inline] fn partial_cmp(&self, other: &NSMutableString) -> Option { @@ -203,6 +208,7 @@ impl PartialOrd for NSString { } } +#[cfg(feature = "Foundation_NSObjCRuntime")] impl Ord for NSMutableString { #[inline] fn cmp(&self, other: &Self) -> cmp::Ordering { diff --git a/crates/icrate/src/additions/Foundation/tests/array.rs b/framework-crates/objc2-foundation/src/tests/array.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/array.rs rename to framework-crates/objc2-foundation/src/tests/array.rs diff --git a/crates/icrate/src/additions/Foundation/tests/attributed_string.rs b/framework-crates/objc2-foundation/src/tests/attributed_string.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/attributed_string.rs rename to framework-crates/objc2-foundation/src/tests/attributed_string.rs diff --git a/crates/icrate/src/additions/Foundation/tests/auto_traits.rs b/framework-crates/objc2-foundation/src/tests/auto_traits.rs similarity index 99% rename from crates/icrate/src/additions/Foundation/tests/auto_traits.rs rename to framework-crates/objc2-foundation/src/tests/auto_traits.rs index 12799cbec..6efa8ac5c 100644 --- a/crates/icrate/src/additions/Foundation/tests/auto_traits.rs +++ b/framework-crates/objc2-foundation/src/tests/auto_traits.rs @@ -1,4 +1,4 @@ -#![cfg(feature = "Foundation_all")] // TODO: More precise +#![cfg(feature = "all")] // TODO: More precise use core::panic::{RefUnwindSafe, UnwindSafe}; use static_assertions::{assert_impl_all, assert_not_impl_any}; diff --git a/crates/icrate/src/additions/Foundation/tests/bundle.rs b/framework-crates/objc2-foundation/src/tests/bundle.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/bundle.rs rename to framework-crates/objc2-foundation/src/tests/bundle.rs diff --git a/crates/icrate/src/additions/Foundation/tests/copying.rs b/framework-crates/objc2-foundation/src/tests/copying.rs similarity index 89% rename from crates/icrate/src/additions/Foundation/tests/copying.rs rename to framework-crates/objc2-foundation/src/tests/copying.rs index d0652343c..2f67f2438 100644 --- a/crates/icrate/src/additions/Foundation/tests/copying.rs +++ b/framework-crates/objc2-foundation/src/tests/copying.rs @@ -1,6 +1,6 @@ #![cfg(feature = "Foundation_NSString")] -use icrate::Foundation::{NSCopying, NSMutableCopying, NSString}; use objc2::{rc::Id, runtime::ProtocolObject}; +use objc2_foundation::{NSCopying, NSMutableCopying, NSString}; #[test] fn copy() { diff --git a/crates/icrate/src/additions/Foundation/tests/data.rs b/framework-crates/objc2-foundation/src/tests/data.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/data.rs rename to framework-crates/objc2-foundation/src/tests/data.rs diff --git a/crates/icrate/src/additions/Foundation/tests/dictionary.rs b/framework-crates/objc2-foundation/src/tests/dictionary.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/dictionary.rs rename to framework-crates/objc2-foundation/src/tests/dictionary.rs diff --git a/crates/icrate/src/additions/Foundation/tests/error.rs b/framework-crates/objc2-foundation/src/tests/error.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/error.rs rename to framework-crates/objc2-foundation/src/tests/error.rs diff --git a/crates/icrate/src/additions/Foundation/tests/exception.rs b/framework-crates/objc2-foundation/src/tests/exception.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/exception.rs rename to framework-crates/objc2-foundation/src/tests/exception.rs diff --git a/crates/icrate/src/additions/Foundation/tests/lock.rs b/framework-crates/objc2-foundation/src/tests/lock.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/lock.rs rename to framework-crates/objc2-foundation/src/tests/lock.rs diff --git a/crates/icrate/src/additions/Foundation/tests/mod.rs b/framework-crates/objc2-foundation/src/tests/mod.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/mod.rs rename to framework-crates/objc2-foundation/src/tests/mod.rs diff --git a/crates/icrate/src/additions/Foundation/tests/mutable_array.rs b/framework-crates/objc2-foundation/src/tests/mutable_array.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/mutable_array.rs rename to framework-crates/objc2-foundation/src/tests/mutable_array.rs diff --git a/crates/icrate/src/additions/Foundation/tests/mutable_data.rs b/framework-crates/objc2-foundation/src/tests/mutable_data.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/mutable_data.rs rename to framework-crates/objc2-foundation/src/tests/mutable_data.rs diff --git a/crates/icrate/src/additions/Foundation/tests/mutable_dictionary.rs b/framework-crates/objc2-foundation/src/tests/mutable_dictionary.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/mutable_dictionary.rs rename to framework-crates/objc2-foundation/src/tests/mutable_dictionary.rs diff --git a/crates/icrate/src/additions/Foundation/tests/mutable_set.rs b/framework-crates/objc2-foundation/src/tests/mutable_set.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/mutable_set.rs rename to framework-crates/objc2-foundation/src/tests/mutable_set.rs diff --git a/crates/icrate/src/additions/Foundation/tests/mutable_string.rs b/framework-crates/objc2-foundation/src/tests/mutable_string.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/mutable_string.rs rename to framework-crates/objc2-foundation/src/tests/mutable_string.rs diff --git a/crates/icrate/src/additions/Foundation/tests/number.rs b/framework-crates/objc2-foundation/src/tests/number.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/number.rs rename to framework-crates/objc2-foundation/src/tests/number.rs diff --git a/crates/icrate/src/additions/Foundation/tests/process_info.rs b/framework-crates/objc2-foundation/src/tests/process_info.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/process_info.rs rename to framework-crates/objc2-foundation/src/tests/process_info.rs diff --git a/crates/icrate/src/additions/Foundation/tests/proxy.rs b/framework-crates/objc2-foundation/src/tests/proxy.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/proxy.rs rename to framework-crates/objc2-foundation/src/tests/proxy.rs diff --git a/crates/icrate/src/additions/Foundation/tests/set.rs b/framework-crates/objc2-foundation/src/tests/set.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/set.rs rename to framework-crates/objc2-foundation/src/tests/set.rs diff --git a/crates/icrate/src/additions/Foundation/tests/string.rs b/framework-crates/objc2-foundation/src/tests/string.rs similarity index 99% rename from crates/icrate/src/additions/Foundation/tests/string.rs rename to framework-crates/objc2-foundation/src/tests/string.rs index 44c68b169..48ba739f3 100644 --- a/crates/icrate/src/additions/Foundation/tests/string.rs +++ b/framework-crates/objc2-foundation/src/tests/string.rs @@ -156,6 +156,7 @@ fn test_prefix_suffix() { #[test] #[allow(clippy::nonminimal_bool)] +#[cfg(feature = "Foundation_NSObjCRuntime")] fn test_cmp() { let s1 = NSString::from_str("aa"); assert!(s1 <= s1); diff --git a/crates/icrate/src/additions/Foundation/tests/thread.rs b/framework-crates/objc2-foundation/src/tests/thread.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/thread.rs rename to framework-crates/objc2-foundation/src/tests/thread.rs diff --git a/crates/icrate/src/additions/Foundation/tests/uuid.rs b/framework-crates/objc2-foundation/src/tests/uuid.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/uuid.rs rename to framework-crates/objc2-foundation/src/tests/uuid.rs diff --git a/crates/icrate/src/additions/Foundation/tests/value.rs b/framework-crates/objc2-foundation/src/tests/value.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/tests/value.rs rename to framework-crates/objc2-foundation/src/tests/value.rs diff --git a/crates/icrate/src/additions/Foundation/thread.rs b/framework-crates/objc2-foundation/src/thread.rs similarity index 97% rename from crates/icrate/src/additions/Foundation/thread.rs rename to framework-crates/objc2-foundation/src/thread.rs index 9bab247db..61ca648f8 100644 --- a/crates/icrate/src/additions/Foundation/thread.rs +++ b/framework-crates/objc2-foundation/src/thread.rs @@ -68,7 +68,7 @@ fn make_multithreaded() { /// # Example /// /// ```no_run -/// use icrate::Foundation::run_on_main; +/// use objc2_foundation::run_on_main; /// run_on_main(|mtm| { /// // Do something on the main thread with the given marker /// }); @@ -144,8 +144,8 @@ where /// Use when designing APIs that are only safe to use on the main thread: /// /// ```no_run -/// use icrate::Foundation::{MainThreadMarker, NSObject}; -/// use icrate::objc2::msg_send; +/// use objc2_foundation::{MainThreadMarker, NSObject}; +/// use objc2::msg_send; /// # let obj = 0 as *const NSObject; /// /// // This action requires the main thread, so we take a marker as parameter. @@ -222,10 +222,10 @@ impl MainThreadMarker { /// Create an object on the main thread. /// /// ``` - /// use icrate::Foundation::MainThreadMarker; - /// # use icrate::Foundation::NSObject as SomeClass; + /// use objc2_foundation::MainThreadMarker; + /// # use objc2_foundation::NSObject as SomeClass; /// # #[cfg(for_example)] - /// use icrate::SomeFramework::SomeClass; + /// use objc2_app_kit::NSView as SomeClass; // An example class /// use objc2::rc::Id; /// use objc2::msg_send_id; /// @@ -354,7 +354,7 @@ impl MainThreadBound { /// # Example /// /// ```no_run - /// use icrate::Foundation::{MainThreadMarker, MainThreadBound}; + /// use objc2_foundation::{MainThreadMarker, MainThreadBound}; /// /// let foo; /// # foo = (); diff --git a/crates/icrate/src/additions/Foundation/to_owned.rs b/framework-crates/objc2-foundation/src/to_owned.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/to_owned.rs rename to framework-crates/objc2-foundation/src/to_owned.rs diff --git a/crates/icrate/src/additions/Foundation/util.rs b/framework-crates/objc2-foundation/src/util.rs similarity index 100% rename from crates/icrate/src/additions/Foundation/util.rs rename to framework-crates/objc2-foundation/src/util.rs diff --git a/crates/icrate/src/additions/Foundation/uuid.rs b/framework-crates/objc2-foundation/src/uuid.rs similarity index 93% rename from crates/icrate/src/additions/Foundation/uuid.rs rename to framework-crates/objc2-foundation/src/uuid.rs index 4e116e240..0a021f39f 100644 --- a/crates/icrate/src/additions/Foundation/uuid.rs +++ b/framework-crates/objc2-foundation/src/uuid.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "Foundation_NSString")] use core::fmt; use core::panic::{RefUnwindSafe, UnwindSafe}; @@ -5,7 +6,7 @@ use objc2::encode::{Encode, Encoding, RefEncode}; use objc2::rc::{Allocated, Id}; use objc2::{extern_methods, ClassType}; -use crate::Foundation::{self, NSUUID}; +use crate::Foundation::NSUUID; impl UnwindSafe for NSUUID {} impl RefUnwindSafe for NSUUID {} @@ -51,7 +52,7 @@ impl NSUUID { /// /// ```ignore /// use uuid::Uuid; - /// use icrate::Foundation::NSUUID; + /// use objc2_foundation::NSUUID; /// /// let uuid: Uuid; /// # uuid = todo!(); @@ -64,7 +65,7 @@ impl NSUUID { } #[cfg(feature = "Foundation_NSString")] - pub fn from_string(string: &Foundation::NSString) -> Option> { + pub fn from_string(string: &crate::NSString) -> Option> { Self::initWithUUIDString(Self::alloc(), string) } diff --git a/crates/icrate/src/additions/Foundation/value.rs b/framework-crates/objc2-foundation/src/value.rs similarity index 98% rename from crates/icrate/src/additions/Foundation/value.rs rename to framework-crates/objc2-foundation/src/value.rs index 455238f0e..1f3001a98 100644 --- a/crates/icrate/src/additions/Foundation/value.rs +++ b/framework-crates/objc2-foundation/src/value.rs @@ -28,7 +28,7 @@ impl NSValue { /// Create an `NSValue` containing an `i32`. /// /// ``` - /// use icrate::Foundation::NSValue; + /// use objc2_foundation::NSValue; /// /// let val = NSValue::new(42i32); /// ``` @@ -78,7 +78,7 @@ impl NSValue { /// ``` /// use std::ffi::c_void; /// use std::ptr; - /// use icrate::Foundation::NSValue; + /// use objc2_foundation::NSValue; /// /// let val = NSValue::new::<*const c_void>(ptr::null()); /// // SAFETY: The value was just created with a pointer diff --git a/framework-crates/objc2-game-controller/Cargo.toml b/framework-crates/objc2-game-controller/Cargo.toml new file mode 100644 index 000000000..f2b49453b --- /dev/null +++ b/framework-crates/objc2-game-controller/Cargo.toml @@ -0,0 +1,238 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-game-controller" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the GameController framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +GameController_GCAxis2DInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCAxisElement = [] +GameController_GCAxisInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCButtonElement = [] +GameController_GCColor = ["objc2-foundation/Foundation_NSObject"] +GameController_GCController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +GameController_GCControllerAxisInput = [] +GameController_GCControllerButtonInput = [] +GameController_GCControllerDirectionPad = [] +GameController_GCControllerElement = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +GameController_GCControllerInput = [] +GameController_GCControllerTouchpad = [] +GameController_GCDevice = ["objc2-foundation/Foundation_NSString"] +GameController_GCDeviceBattery = [] +GameController_GCDeviceCursor = [] +GameController_GCDeviceHaptics = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +GameController_GCDeviceLight = [] +GameController_GCDevicePhysicalInput = [] +GameController_GCDevicePhysicalInputState = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", +] +GameController_GCDevicePhysicalInputStateDiff = ["objc2-foundation/Foundation_NSEnumerator"] +GameController_GCDirectionPadElement = [] +GameController_GCDirectionalGamepad = ["objc2-foundation/Foundation_NSString"] +GameController_GCDualSenseAdaptiveTrigger = [] +GameController_GCDualSenseGamepad = [] +GameController_GCDualShockGamepad = [] +GameController_GCEventViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameController_GCExtendedGamepad = [] +GameController_GCExtendedGamepadSnapshot = ["objc2-foundation/Foundation_NSData"] +GameController_GCExtern = [] +GameController_GCGamepad = [] +GameController_GCGamepadSnapshot = ["objc2-foundation/Foundation_NSData"] +GameController_GCGearShifterElement = [] +GameController_GCInputNames = ["objc2-foundation/Foundation_NSString"] +GameController_GCKeyCodes = [] +GameController_GCKeyNames = ["objc2-foundation/Foundation_NSString"] +GameController_GCKeyboard = ["objc2-foundation/Foundation_NSString"] +GameController_GCKeyboardInput = [] +GameController_GCLinearInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCMicroGamepad = ["objc2-foundation/Foundation_NSString"] +GameController_GCMicroGamepadSnapshot = ["objc2-foundation/Foundation_NSData"] +GameController_GCMotion = [] +GameController_GCMouse = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +GameController_GCMouseInput = ["objc2-foundation/Foundation_NSArray"] +GameController_GCPhysicalInputElement = [ + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +GameController_GCPhysicalInputProfile = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +GameController_GCPhysicalInputSource = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +GameController_GCPressedStateInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCProductCategories = ["objc2-foundation/Foundation_NSString"] +GameController_GCRacingWheel = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +GameController_GCRacingWheelInput = [] +GameController_GCRelativeInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCSteeringWheelElement = [] +GameController_GCSwitchElement = [] +GameController_GCSwitchPositionInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCSyntheticDeviceKeys = [] +GameController_GCTouchedStateInput = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +GameController_GCTypes = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +GameController_GCXboxGamepad = [] +all = [ + "GameController_GCAxis2DInput", + "GameController_GCAxisElement", + "GameController_GCAxisInput", + "GameController_GCButtonElement", + "GameController_GCColor", + "GameController_GCController", + "GameController_GCControllerAxisInput", + "GameController_GCControllerButtonInput", + "GameController_GCControllerDirectionPad", + "GameController_GCControllerElement", + "GameController_GCControllerInput", + "GameController_GCControllerTouchpad", + "GameController_GCDevice", + "GameController_GCDeviceBattery", + "GameController_GCDeviceCursor", + "GameController_GCDeviceHaptics", + "GameController_GCDeviceLight", + "GameController_GCDevicePhysicalInput", + "GameController_GCDevicePhysicalInputState", + "GameController_GCDevicePhysicalInputStateDiff", + "GameController_GCDirectionPadElement", + "GameController_GCDirectionalGamepad", + "GameController_GCDualSenseAdaptiveTrigger", + "GameController_GCDualSenseGamepad", + "GameController_GCDualShockGamepad", + "GameController_GCEventViewController", + "GameController_GCExtendedGamepad", + "GameController_GCExtendedGamepadSnapshot", + "GameController_GCExtern", + "GameController_GCGamepad", + "GameController_GCGamepadSnapshot", + "GameController_GCGearShifterElement", + "GameController_GCInputNames", + "GameController_GCKeyCodes", + "GameController_GCKeyNames", + "GameController_GCKeyboard", + "GameController_GCKeyboardInput", + "GameController_GCLinearInput", + "GameController_GCMicroGamepad", + "GameController_GCMicroGamepadSnapshot", + "GameController_GCMotion", + "GameController_GCMouse", + "GameController_GCMouseInput", + "GameController_GCPhysicalInputElement", + "GameController_GCPhysicalInputProfile", + "GameController_GCPhysicalInputSource", + "GameController_GCPressedStateInput", + "GameController_GCProductCategories", + "GameController_GCRacingWheel", + "GameController_GCRacingWheelInput", + "GameController_GCRelativeInput", + "GameController_GCSteeringWheelElement", + "GameController_GCSwitchElement", + "GameController_GCSwitchPositionInput", + "GameController_GCSyntheticDeviceKeys", + "GameController_GCTouchedStateInput", + "GameController_GCTypes", + "GameController_GCXboxGamepad", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-game-controller/README.md b/framework-crates/objc2-game-controller/README.md new file mode 100644 index 000000000..691340cba --- /dev/null +++ b/framework-crates/objc2-game-controller/README.md @@ -0,0 +1,14 @@ +# `objc2-game-controller` + +[![Latest version](https://badgen.net/crates/v/objc2-game-controller)](https://crates.io/crates/objc2-game-controller) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-game-controller/badge.svg)](https://docs.rs/objc2-game-controller/) +[![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 GameController. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-game-controller/) 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/crates/icrate/src/additions/GameController/extended_gamepad_snapshot.rs b/framework-crates/objc2-game-controller/src/extended_gamepad_snapshot.rs similarity index 95% rename from crates/icrate/src/additions/GameController/extended_gamepad_snapshot.rs rename to framework-crates/objc2-game-controller/src/extended_gamepad_snapshot.rs index dbe7a4a71..64be5a723 100644 --- a/crates/icrate/src/additions/GameController/extended_gamepad_snapshot.rs +++ b/framework-crates/objc2-game-controller/src/extended_gamepad_snapshot.rs @@ -1,6 +1,6 @@ +#![allow(non_snake_case)] use std::os::raw::c_float; -#[cfg(feature = "objc2")] use objc2::encode::{Encode, Encoding, RefEncode}; use objc2::runtime::Bool; @@ -29,7 +29,6 @@ pub struct GCExtendedGamepadSnapshotData { pub rightThumbstickButton: Bool, } -#[cfg(feature = "objc2")] #[allow(deprecated)] unsafe impl Encode for GCExtendedGamepadSnapshotData { const ENCODING: Encoding = Encoding::Struct( @@ -58,7 +57,6 @@ unsafe impl Encode for GCExtendedGamepadSnapshotData { ); } -#[cfg(feature = "objc2")] #[allow(deprecated)] unsafe impl RefEncode for GCExtendedGamepadSnapshotData { const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); diff --git a/framework-crates/objc2-game-controller/src/generated b/framework-crates/objc2-game-controller/src/generated new file mode 120000 index 000000000..4a1c54475 --- /dev/null +++ b/framework-crates/objc2-game-controller/src/generated @@ -0,0 +1 @@ +../../../generated/GameController \ No newline at end of file diff --git a/crates/icrate/src/additions/GameController/input_names.rs b/framework-crates/objc2-game-controller/src/input_names.rs similarity index 98% rename from crates/icrate/src/additions/GameController/input_names.rs rename to framework-crates/objc2-game-controller/src/input_names.rs index a1a0a8c67..b607b653e 100644 --- a/crates/icrate/src/additions/GameController/input_names.rs +++ b/framework-crates/objc2-game-controller/src/input_names.rs @@ -1,4 +1,4 @@ -use crate::Foundation::NSString; +use objc2_foundation::NSString; // NS_TYPED_EXTENSIBLE_ENUM pub type GCInputElementName = NSString; diff --git a/framework-crates/objc2-game-controller/src/lib.rs b/framework-crates/objc2-game-controller/src/lib.rs new file mode 100644 index 000000000..eb434842e --- /dev/null +++ b/framework-crates/objc2-game-controller/src/lib.rs @@ -0,0 +1,35 @@ +//! # Bindings to the `GameController` 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/gamecontroller/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-game-controller/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +#[cfg(feature = "GameController_GCExtendedGamepadSnapshot")] +mod extended_gamepad_snapshot; +mod generated; +#[cfg(feature = "GameController_GCInputNames")] +mod input_names; + +#[cfg(feature = "GameController_GCExtendedGamepadSnapshot")] +#[allow(deprecated)] +pub use self::extended_gamepad_snapshot::GCExtendedGamepadSnapshotData; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; +#[cfg(feature = "GameController_GCInputNames")] +pub use self::input_names::*; + +// TODO: GCKeyCode = CFIndex +// NOTE: CFIndex is c_long_long on __LLP64__ / Windows 64-bit (doesn't matter for us) +#[cfg(feature = "GameController_GCKeyCodes")] +pub type GCKeyCode = std::os::raw::c_long; diff --git a/framework-crates/objc2-game-kit/Cargo.toml b/framework-crates/objc2-game-kit/Cargo.toml new file mode 100644 index 000000000..d9490b03f --- /dev/null +++ b/framework-crates/objc2-game-kit/Cargo.toml @@ -0,0 +1,348 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-game-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the GameKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +GameKit_GKAccessPoint = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSGeometry", +] +GameKit_GKAchievement = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKAchievementDescription = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +GameKit_GKAchievementViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKBasePlayer = ["objc2-foundation/Foundation_NSString"] +GameKit_GKChallenge = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKChallengeEventHandler = [] +GameKit_GKChallengesViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKCloudPlayer = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKDefines = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKDialogController = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", +] +GameKit_GKError = ["objc2-foundation/Foundation_NSString"] +GameKit_GKEventListener = [] +GameKit_GKFriendRequestComposeViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKGameCenterViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKGameSession = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +GameKit_GKGameSessionError = ["objc2-foundation/Foundation_NSString"] +GameKit_GKGameSessionEventListener = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKGameSessionSharingViewController = [] +GameKit_GKLeaderboard = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKLeaderboardEntry = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKLeaderboardScore = ["objc2-foundation/Foundation_NSString"] +GameKit_GKLeaderboardSet = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKLeaderboardViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKLocalPlayer = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +GameKit_GKMatch = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKMatchmaker = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKMatchmakerViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKNotificationBanner = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKPeerPickerController = [] +GameKit_GKPlayer = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKPublicConstants = ["objc2-foundation/Foundation_NSString"] +GameKit_GKPublicProtocols = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKSavedGame = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKSavedGameListener = ["objc2-foundation/Foundation_NSArray"] +GameKit_GKScore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKSession = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKSessionError = ["objc2-foundation/Foundation_NSString"] +GameKit_GKTurnBasedMatch = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKTurnBasedMatchmakerViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKVoiceChat = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +GameKit_GKVoiceChatService = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +all = [ + "GameKit_GKAccessPoint", + "GameKit_GKAchievement", + "GameKit_GKAchievementDescription", + "GameKit_GKAchievementViewController", + "GameKit_GKBasePlayer", + "GameKit_GKChallenge", + "GameKit_GKChallengeEventHandler", + "GameKit_GKChallengesViewController", + "GameKit_GKCloudPlayer", + "GameKit_GKDefines", + "GameKit_GKDialogController", + "GameKit_GKError", + "GameKit_GKEventListener", + "GameKit_GKFriendRequestComposeViewController", + "GameKit_GKGameCenterViewController", + "GameKit_GKGameSession", + "GameKit_GKGameSessionError", + "GameKit_GKGameSessionEventListener", + "GameKit_GKGameSessionSharingViewController", + "GameKit_GKLeaderboard", + "GameKit_GKLeaderboardEntry", + "GameKit_GKLeaderboardScore", + "GameKit_GKLeaderboardSet", + "GameKit_GKLeaderboardViewController", + "GameKit_GKLocalPlayer", + "GameKit_GKMatch", + "GameKit_GKMatchmaker", + "GameKit_GKMatchmakerViewController", + "GameKit_GKNotificationBanner", + "GameKit_GKPeerPickerController", + "GameKit_GKPlayer", + "GameKit_GKPublicConstants", + "GameKit_GKPublicProtocols", + "GameKit_GKSavedGame", + "GameKit_GKSavedGameListener", + "GameKit_GKScore", + "GameKit_GKSession", + "GameKit_GKSessionError", + "GameKit_GKTurnBasedMatch", + "GameKit_GKTurnBasedMatchmakerViewController", + "GameKit_GKVoiceChat", + "GameKit_GKVoiceChatService", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-game-kit/README.md b/framework-crates/objc2-game-kit/README.md new file mode 100644 index 000000000..72c0b3f1a --- /dev/null +++ b/framework-crates/objc2-game-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-game-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-game-kit)](https://crates.io/crates/objc2-game-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-game-kit/badge.svg)](https://docs.rs/objc2-game-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 GameKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-game-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-game-kit/src/generated b/framework-crates/objc2-game-kit/src/generated new file mode 120000 index 000000000..1891047ab --- /dev/null +++ b/framework-crates/objc2-game-kit/src/generated @@ -0,0 +1 @@ +../../../generated/GameKit \ No newline at end of file diff --git a/framework-crates/objc2-game-kit/src/lib.rs b/framework-crates/objc2-game-kit/src/lib.rs new file mode 100644 index 000000000..d77e0eab1 --- /dev/null +++ b/framework-crates/objc2-game-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `GameKit` 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/gamekit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-game-kit/0.2.0")] + +#[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-health-kit/Cargo.toml b/framework-crates/objc2-health-kit/Cargo.toml new file mode 100644 index 000000000..6e308b676 --- /dev/null +++ b/framework-crates/objc2-health-kit/Cargo.toml @@ -0,0 +1,507 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-health-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the HealthKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-core-location = ["dep:objc2-core-location"] +objc2-uniform-type-identifiers = ["dep:objc2-uniform-type-identifiers"] + +HealthKit_HKActivitySummary = [ + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKActivitySummaryQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", +] +HealthKit_HKAnchoredObjectQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", +] +HealthKit_HKAppleWalkingSteadinessClassification = ["objc2-foundation/Foundation_NSError"] +HealthKit_HKAttachment = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", + "objc2-uniform-type-identifiers?/UniformTypeIdentifiers_UTType", +] +HealthKit_HKAttachmentStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSProgress", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-uniform-type-identifiers?/UniformTypeIdentifiers_UTType", +] +HealthKit_HKAudiogramSample = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKCDADocumentSample = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKCategorySample = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKCategoryValues = [] +HealthKit_HKCharacteristicObjects = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKCharacteristicValues = [] +HealthKit_HKClinicalRecord = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKClinicalType = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKContactsLensSpecification = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKContactsPrescription = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKCorrelation = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKCorrelationQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", +] +HealthKit_HKCumulativeQuantitySample = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKCumulativeQuantitySeriesSample = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKDefines = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +HealthKit_HKDeletedObject = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +HealthKit_HKDevice = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKDiscreteQuantitySample = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKDocumentQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSortDescriptor", +] +HealthKit_HKDocumentSample = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKElectrocardiogram = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKElectrocardiogramQuery = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", +] +HealthKit_HKFHIRRelease = ["objc2-foundation/Foundation_NSString"] +HealthKit_HKFHIRResource = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +HealthKit_HKFHIRVersion = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKGlassesLensSpecification = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKGlassesPrescription = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKHealthStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKHeartbeatSeriesBuilder = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKHeartbeatSeriesQuery = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", +] +HealthKit_HKHeartbeatSeriesSample = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKLensSpecification = [] +HealthKit_HKLiveWorkoutBuilder = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSSet", +] +HealthKit_HKLiveWorkoutDataSource = [ + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", +] +HealthKit_HKMetadata = ["objc2-foundation/Foundation_NSString"] +HealthKit_HKObject = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +HealthKit_HKObjectType = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKObserverQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", +] +HealthKit_HKQuantity = [ + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", +] +HealthKit_HKQuantityAggregationStyle = [] +HealthKit_HKQuantitySample = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKQuantitySeriesSampleBuilder = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKQuantitySeriesSampleQuery = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", +] +HealthKit_HKQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSComparisonPredicate", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", + "objc2-foundation/Foundation_NSValue", +] +HealthKit_HKQueryAnchor = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKQueryDescriptor = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", +] +HealthKit_HKSample = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKSampleQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSortDescriptor", +] +HealthKit_HKSeriesBuilder = [] +HealthKit_HKSeriesSample = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKSource = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKSourceQuery = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", +] +HealthKit_HKSourceRevision = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSProcessInfo", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKStatistics = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSObject", +] +HealthKit_HKStatisticsCollectionQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSet", +] +HealthKit_HKStatisticsQuery = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", +] +HealthKit_HKTypeIdentifiers = ["objc2-foundation/Foundation_NSString"] +HealthKit_HKUnit = [ + "objc2-foundation/Foundation_NSEnergyFormatter", + "objc2-foundation/Foundation_NSLengthFormatter", + "objc2-foundation/Foundation_NSMassFormatter", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKVerifiableClinicalRecord = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKVerifiableClinicalRecordQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKVerifiableClinicalRecordSubject = [ + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKVisionPrescription = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKVisionPrism = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKWorkout = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKWorkoutActivity = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +HealthKit_HKWorkoutBuilder = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +HealthKit_HKWorkoutConfiguration = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKWorkoutRoute = ["objc2-foundation/Foundation_NSObject"] +HealthKit_HKWorkoutRouteBuilder = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +HealthKit_HKWorkoutRouteQuery = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDateInterval", + "objc2-foundation/Foundation_NSError", +] +HealthKit_HKWorkoutSession = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +all = [ + "HealthKit_HKActivitySummary", + "HealthKit_HKActivitySummaryQuery", + "HealthKit_HKAnchoredObjectQuery", + "HealthKit_HKAppleWalkingSteadinessClassification", + "HealthKit_HKAttachment", + "HealthKit_HKAttachmentStore", + "HealthKit_HKAudiogramSample", + "HealthKit_HKCDADocumentSample", + "HealthKit_HKCategorySample", + "HealthKit_HKCategoryValues", + "HealthKit_HKCharacteristicObjects", + "HealthKit_HKCharacteristicValues", + "HealthKit_HKClinicalRecord", + "HealthKit_HKClinicalType", + "HealthKit_HKContactsLensSpecification", + "HealthKit_HKContactsPrescription", + "HealthKit_HKCorrelation", + "HealthKit_HKCorrelationQuery", + "HealthKit_HKCumulativeQuantitySample", + "HealthKit_HKCumulativeQuantitySeriesSample", + "HealthKit_HKDefines", + "HealthKit_HKDeletedObject", + "HealthKit_HKDevice", + "HealthKit_HKDiscreteQuantitySample", + "HealthKit_HKDocumentQuery", + "HealthKit_HKDocumentSample", + "HealthKit_HKElectrocardiogram", + "HealthKit_HKElectrocardiogramQuery", + "HealthKit_HKFHIRRelease", + "HealthKit_HKFHIRResource", + "HealthKit_HKFHIRVersion", + "HealthKit_HKGlassesLensSpecification", + "HealthKit_HKGlassesPrescription", + "HealthKit_HKHealthStore", + "HealthKit_HKHeartbeatSeriesBuilder", + "HealthKit_HKHeartbeatSeriesQuery", + "HealthKit_HKHeartbeatSeriesSample", + "HealthKit_HKLensSpecification", + "HealthKit_HKLiveWorkoutBuilder", + "HealthKit_HKLiveWorkoutDataSource", + "HealthKit_HKMetadata", + "HealthKit_HKObject", + "HealthKit_HKObjectType", + "HealthKit_HKObserverQuery", + "HealthKit_HKQuantity", + "HealthKit_HKQuantityAggregationStyle", + "HealthKit_HKQuantitySample", + "HealthKit_HKQuantitySeriesSampleBuilder", + "HealthKit_HKQuantitySeriesSampleQuery", + "HealthKit_HKQuery", + "HealthKit_HKQueryAnchor", + "HealthKit_HKQueryDescriptor", + "HealthKit_HKSample", + "HealthKit_HKSampleQuery", + "HealthKit_HKSeriesBuilder", + "HealthKit_HKSeriesSample", + "HealthKit_HKSource", + "HealthKit_HKSourceQuery", + "HealthKit_HKSourceRevision", + "HealthKit_HKStatistics", + "HealthKit_HKStatisticsCollectionQuery", + "HealthKit_HKStatisticsQuery", + "HealthKit_HKTypeIdentifiers", + "HealthKit_HKUnit", + "HealthKit_HKVerifiableClinicalRecord", + "HealthKit_HKVerifiableClinicalRecordQuery", + "HealthKit_HKVerifiableClinicalRecordSubject", + "HealthKit_HKVisionPrescription", + "HealthKit_HKVisionPrism", + "HealthKit_HKWorkout", + "HealthKit_HKWorkoutActivity", + "HealthKit_HKWorkoutBuilder", + "HealthKit_HKWorkoutConfiguration", + "HealthKit_HKWorkoutRoute", + "HealthKit_HKWorkoutRouteBuilder", + "HealthKit_HKWorkoutRouteQuery", + "HealthKit_HKWorkoutSession", + "block2", + "objc2-core-location", + "objc2-uniform-type-identifiers", +] diff --git a/framework-crates/objc2-health-kit/README.md b/framework-crates/objc2-health-kit/README.md new file mode 100644 index 000000000..872aafab3 --- /dev/null +++ b/framework-crates/objc2-health-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-health-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-health-kit)](https://crates.io/crates/objc2-health-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-health-kit/badge.svg)](https://docs.rs/objc2-health-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 HealthKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-health-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-health-kit/src/generated b/framework-crates/objc2-health-kit/src/generated new file mode 120000 index 000000000..ec91deffc --- /dev/null +++ b/framework-crates/objc2-health-kit/src/generated @@ -0,0 +1 @@ +../../../generated/HealthKit \ No newline at end of file diff --git a/framework-crates/objc2-health-kit/src/lib.rs b/framework-crates/objc2-health-kit/src/lib.rs new file mode 100644 index 000000000..479a859c9 --- /dev/null +++ b/framework-crates/objc2-health-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `HealthKit` 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/healthkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-health-kit/0.2.0")] + +#[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-identity-lookup/Cargo.toml b/framework-crates/objc2-identity-lookup/Cargo.toml new file mode 100644 index 000000000..7a0680388 --- /dev/null +++ b/framework-crates/objc2-identity-lookup/Cargo.toml @@ -0,0 +1,125 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-identity-lookup" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the IdentityLookup framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +IdentityLookup_ILBase = [] +IdentityLookup_ILCallClassificationRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +IdentityLookup_ILCallCommunication = ["objc2-foundation/Foundation_NSObject"] +IdentityLookup_ILClassificationActions = [] +IdentityLookup_ILClassificationRequest = ["objc2-foundation/Foundation_NSObject"] +IdentityLookup_ILClassificationResponse = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +IdentityLookup_ILCommunication = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +IdentityLookup_ILMessageClassificationRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +IdentityLookup_ILMessageCommunication = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +IdentityLookup_ILMessageFilterAction = [] +IdentityLookup_ILMessageFilterCapabilitiesQueryHandling = ["objc2-foundation/Foundation_NSExtensionContext"] +IdentityLookup_ILMessageFilterCapabilitiesQueryRequest = ["objc2-foundation/Foundation_NSObject"] +IdentityLookup_ILMessageFilterCapabilitiesQueryResponse = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSValue", +] +IdentityLookup_ILMessageFilterError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +IdentityLookup_ILMessageFilterExtension = [] +IdentityLookup_ILMessageFilterExtensionContext = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSExtensionContext", +] +IdentityLookup_ILMessageFilterQueryHandling = ["objc2-foundation/Foundation_NSExtensionContext"] +IdentityLookup_ILMessageFilterQueryRequest = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +IdentityLookup_ILMessageFilterQueryResponse = ["objc2-foundation/Foundation_NSObject"] +IdentityLookup_ILNetworkResponse = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURLResponse", +] +all = [ + "IdentityLookup_ILBase", + "IdentityLookup_ILCallClassificationRequest", + "IdentityLookup_ILCallCommunication", + "IdentityLookup_ILClassificationActions", + "IdentityLookup_ILClassificationRequest", + "IdentityLookup_ILClassificationResponse", + "IdentityLookup_ILCommunication", + "IdentityLookup_ILMessageClassificationRequest", + "IdentityLookup_ILMessageCommunication", + "IdentityLookup_ILMessageFilterAction", + "IdentityLookup_ILMessageFilterCapabilitiesQueryHandling", + "IdentityLookup_ILMessageFilterCapabilitiesQueryRequest", + "IdentityLookup_ILMessageFilterCapabilitiesQueryResponse", + "IdentityLookup_ILMessageFilterError", + "IdentityLookup_ILMessageFilterExtension", + "IdentityLookup_ILMessageFilterExtensionContext", + "IdentityLookup_ILMessageFilterQueryHandling", + "IdentityLookup_ILMessageFilterQueryRequest", + "IdentityLookup_ILMessageFilterQueryResponse", + "IdentityLookup_ILNetworkResponse", + "block2", +] diff --git a/framework-crates/objc2-identity-lookup/README.md b/framework-crates/objc2-identity-lookup/README.md new file mode 100644 index 000000000..422bf06ef --- /dev/null +++ b/framework-crates/objc2-identity-lookup/README.md @@ -0,0 +1,14 @@ +# `objc2-identity-lookup` + +[![Latest version](https://badgen.net/crates/v/objc2-identity-lookup)](https://crates.io/crates/objc2-identity-lookup) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-identity-lookup/badge.svg)](https://docs.rs/objc2-identity-lookup/) +[![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 IdentityLookup. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-identity-lookup/) 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-identity-lookup/src/generated b/framework-crates/objc2-identity-lookup/src/generated new file mode 120000 index 000000000..a5c6e94fb --- /dev/null +++ b/framework-crates/objc2-identity-lookup/src/generated @@ -0,0 +1 @@ +../../../generated/IdentityLookup \ No newline at end of file diff --git a/framework-crates/objc2-identity-lookup/src/lib.rs b/framework-crates/objc2-identity-lookup/src/lib.rs new file mode 100644 index 000000000..0eb46e4ff --- /dev/null +++ b/framework-crates/objc2-identity-lookup/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `IdentityLookup` 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/identitylookup/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-identity-lookup/0.2.0")] + +#[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-input-method-kit/Cargo.toml b/framework-crates/objc2-input-method-kit/Cargo.toml new file mode 100644 index 000000000..78c445376 --- /dev/null +++ b/framework-crates/objc2-input-method-kit/Cargo.toml @@ -0,0 +1,76 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-input-method-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the InputMethodKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +objc2-app-kit = ["dep:objc2-app-kit"] + +InputMethodKit_IMKCandidates = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +InputMethodKit_IMKInputController = [ + "objc2-app-kit?/AppKit_NSEvent", + "objc2-app-kit?/AppKit_NSMenu", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +InputMethodKit_IMKServer = [ + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSString", +] +all = [ + "InputMethodKit_IMKCandidates", + "InputMethodKit_IMKInputController", + "InputMethodKit_IMKServer", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-input-method-kit/README.md b/framework-crates/objc2-input-method-kit/README.md new file mode 100644 index 000000000..2580790fa --- /dev/null +++ b/framework-crates/objc2-input-method-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-input-method-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-input-method-kit)](https://crates.io/crates/objc2-input-method-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-input-method-kit/badge.svg)](https://docs.rs/objc2-input-method-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 InputMethodKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-input-method-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-input-method-kit/src/generated b/framework-crates/objc2-input-method-kit/src/generated new file mode 120000 index 000000000..3a0216a95 --- /dev/null +++ b/framework-crates/objc2-input-method-kit/src/generated @@ -0,0 +1 @@ +../../../generated/InputMethodKit \ No newline at end of file diff --git a/crates/icrate/src/additions/InputMethodKit/mod.rs b/framework-crates/objc2-input-method-kit/src/lib.rs similarity index 65% rename from crates/icrate/src/additions/InputMethodKit/mod.rs rename to framework-crates/objc2-input-method-kit/src/lib.rs index 0168a6243..0dcca422e 100644 --- a/crates/icrate/src/additions/InputMethodKit/mod.rs +++ b/framework-crates/objc2-input-method-kit/src/lib.rs @@ -1,11 +1,28 @@ //! # Bindings to the `InputMethodKit` 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/inputmethodkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-input-method-kit/0.2.0")] #![allow(non_upper_case_globals)] -pub use crate::generated::InputMethodKit::*; +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; #[cfg(feature = "Foundation_NSString")] #[allow(unused_imports)] -use crate::Foundation::NSString; +use objc2_foundation::NSString; extern "C" { #[cfg(all( diff --git a/framework-crates/objc2-link-presentation/Cargo.toml b/framework-crates/objc2-link-presentation/Cargo.toml new file mode 100644 index 000000000..011ce9cfd --- /dev/null +++ b/framework-crates/objc2-link-presentation/Cargo.toml @@ -0,0 +1,90 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-link-presentation" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the LinkPresentation framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +LinkPresentation_LPError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +LinkPresentation_LPFoundation = [] +LinkPresentation_LPLinkMetadata = [ + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +LinkPresentation_LPLinkView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURL", +] +LinkPresentation_LPMetadataProvider = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", +] +all = [ + "LinkPresentation_LPError", + "LinkPresentation_LPFoundation", + "LinkPresentation_LPLinkMetadata", + "LinkPresentation_LPLinkView", + "LinkPresentation_LPMetadataProvider", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-link-presentation/README.md b/framework-crates/objc2-link-presentation/README.md new file mode 100644 index 000000000..d910b2492 --- /dev/null +++ b/framework-crates/objc2-link-presentation/README.md @@ -0,0 +1,14 @@ +# `objc2-link-presentation` + +[![Latest version](https://badgen.net/crates/v/objc2-link-presentation)](https://crates.io/crates/objc2-link-presentation) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-link-presentation/badge.svg)](https://docs.rs/objc2-link-presentation/) +[![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 LinkPresentation. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-link-presentation/) 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-link-presentation/src/generated b/framework-crates/objc2-link-presentation/src/generated new file mode 120000 index 000000000..40edea8dd --- /dev/null +++ b/framework-crates/objc2-link-presentation/src/generated @@ -0,0 +1 @@ +../../../generated/LinkPresentation \ No newline at end of file diff --git a/framework-crates/objc2-link-presentation/src/lib.rs b/framework-crates/objc2-link-presentation/src/lib.rs new file mode 100644 index 000000000..6d6c1f755 --- /dev/null +++ b/framework-crates/objc2-link-presentation/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `LinkPresentation` 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/linkpresentation/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-link-presentation/0.2.0")] + +#[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-local-authentication-embedded-ui/Cargo.toml b/framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml new file mode 100644 index 000000000..66d9ed18b --- /dev/null +++ b/framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml @@ -0,0 +1,83 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-local-authentication-embedded-ui" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the LocalAuthenticationEmbeddedUI framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-local-authentication = { path = "../objc2-local-authentication", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +LocalAuthenticationEmbeddedUI_LAAuthenticationView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSCell", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-local-authentication/LocalAuthentication_LAContext", +] +LocalAuthenticationEmbeddedUI_LAPresentationContext = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSWindow", +] +LocalAuthenticationEmbeddedUI_LARight_UI = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-local-authentication/LocalAuthentication_LARight", +] +all = [ + "LocalAuthenticationEmbeddedUI_LAAuthenticationView", + "LocalAuthenticationEmbeddedUI_LAPresentationContext", + "LocalAuthenticationEmbeddedUI_LARight_UI", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-local-authentication-embedded-ui/README.md b/framework-crates/objc2-local-authentication-embedded-ui/README.md new file mode 100644 index 000000000..7a41aa824 --- /dev/null +++ b/framework-crates/objc2-local-authentication-embedded-ui/README.md @@ -0,0 +1,14 @@ +# `objc2-local-authentication-embedded-ui` + +[![Latest version](https://badgen.net/crates/v/objc2-local-authentication-embedded-ui)](https://crates.io/crates/objc2-local-authentication-embedded-ui) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-local-authentication-embedded-ui/badge.svg)](https://docs.rs/objc2-local-authentication-embedded-ui/) +[![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 LocalAuthenticationEmbeddedUI. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-local-authentication-embedded-ui/) 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-local-authentication-embedded-ui/src/generated b/framework-crates/objc2-local-authentication-embedded-ui/src/generated new file mode 120000 index 000000000..6a2e9167a --- /dev/null +++ b/framework-crates/objc2-local-authentication-embedded-ui/src/generated @@ -0,0 +1 @@ +../../../generated/LocalAuthenticationEmbeddedUI \ No newline at end of file diff --git a/framework-crates/objc2-local-authentication-embedded-ui/src/lib.rs b/framework-crates/objc2-local-authentication-embedded-ui/src/lib.rs new file mode 100644 index 000000000..6b13e6481 --- /dev/null +++ b/framework-crates/objc2-local-authentication-embedded-ui/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `LocalAuthenticationEmbeddedUI` 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/localauthenticationembeddedui/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-local-authentication-embedded-ui/0.2.0")] + +#[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-local-authentication/Cargo.toml b/framework-crates/objc2-local-authentication/Cargo.toml new file mode 100644 index 000000000..cc27cbb8f --- /dev/null +++ b/framework-crates/objc2-local-authentication/Cargo.toml @@ -0,0 +1,93 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-local-authentication" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the LocalAuthentication framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +LocalAuthentication_LABase = [] +LocalAuthentication_LAContext = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +LocalAuthentication_LAError = ["objc2-foundation/Foundation_NSString"] +LocalAuthentication_LAPersistedRight = [] +LocalAuthentication_LAPrivateKey = [] +LocalAuthentication_LAPublicDefines = [] +LocalAuthentication_LAPublicKey = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", +] +LocalAuthentication_LARequirement = [] +LocalAuthentication_LARight = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +LocalAuthentication_LARightStore = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +LocalAuthentication_LASecret = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", +] +all = [ + "LocalAuthentication_LABase", + "LocalAuthentication_LAContext", + "LocalAuthentication_LAError", + "LocalAuthentication_LAPersistedRight", + "LocalAuthentication_LAPrivateKey", + "LocalAuthentication_LAPublicDefines", + "LocalAuthentication_LAPublicKey", + "LocalAuthentication_LARequirement", + "LocalAuthentication_LARight", + "LocalAuthentication_LARightStore", + "LocalAuthentication_LASecret", + "block2", +] diff --git a/framework-crates/objc2-local-authentication/README.md b/framework-crates/objc2-local-authentication/README.md new file mode 100644 index 000000000..8cff1a894 --- /dev/null +++ b/framework-crates/objc2-local-authentication/README.md @@ -0,0 +1,14 @@ +# `objc2-local-authentication` + +[![Latest version](https://badgen.net/crates/v/objc2-local-authentication)](https://crates.io/crates/objc2-local-authentication) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-local-authentication/badge.svg)](https://docs.rs/objc2-local-authentication/) +[![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 LocalAuthentication. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-local-authentication/) 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-local-authentication/src/generated b/framework-crates/objc2-local-authentication/src/generated new file mode 120000 index 000000000..759cd865e --- /dev/null +++ b/framework-crates/objc2-local-authentication/src/generated @@ -0,0 +1 @@ +../../../generated/LocalAuthentication \ No newline at end of file diff --git a/framework-crates/objc2-local-authentication/src/lib.rs b/framework-crates/objc2-local-authentication/src/lib.rs new file mode 100644 index 000000000..1ec0830ca --- /dev/null +++ b/framework-crates/objc2-local-authentication/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `LocalAuthentication` 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/localauthentication/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-local-authentication/0.2.0")] + +#[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-mail-kit/Cargo.toml b/framework-crates/objc2-mail-kit/Cargo.toml new file mode 100644 index 000000000..1f0196f76 --- /dev/null +++ b/framework-crates/objc2-mail-kit/Cargo.toml @@ -0,0 +1,171 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-mail-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the MailKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +MailKit_MEAddressAnnotation = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEComposeContext = ["objc2-foundation/Foundation_NSUUID"] +MailKit_MEComposeSession = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +MailKit_MEContentBlocker = ["objc2-foundation/Foundation_NSData"] +MailKit_MEDecodedMessage = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +MailKit_MEDecodedMessageBanner = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEEmailAddress = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEEncodedOutgoingMessage = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +MailKit_MEExtension = [] +MailKit_MEExtensionManager = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEExtensionViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEMessage = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEMessageAction = ["objc2-foundation/Foundation_NSObject"] +MailKit_MEMessageActionDecision = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +MailKit_MEMessageActionHandler = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEMessageDecoder = ["objc2-foundation/Foundation_NSData"] +MailKit_MEMessageEncoder = [] +MailKit_MEMessageEncodingResult = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", +] +MailKit_MEMessageSecurityHandler = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEMessageSecurityInformation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEMessageSigner = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MailKit_MEOutgoingMessageEncodingStatus = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", +] +all = [ + "MailKit_MEAddressAnnotation", + "MailKit_MEComposeContext", + "MailKit_MEComposeSession", + "MailKit_MEContentBlocker", + "MailKit_MEDecodedMessage", + "MailKit_MEDecodedMessageBanner", + "MailKit_MEEmailAddress", + "MailKit_MEEncodedOutgoingMessage", + "MailKit_MEExtension", + "MailKit_MEExtensionManager", + "MailKit_MEExtensionViewController", + "MailKit_MEMessage", + "MailKit_MEMessageAction", + "MailKit_MEMessageActionDecision", + "MailKit_MEMessageActionHandler", + "MailKit_MEMessageDecoder", + "MailKit_MEMessageEncoder", + "MailKit_MEMessageEncodingResult", + "MailKit_MEMessageSecurityHandler", + "MailKit_MEMessageSecurityInformation", + "MailKit_MEMessageSigner", + "MailKit_MEOutgoingMessageEncodingStatus", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-mail-kit/README.md b/framework-crates/objc2-mail-kit/README.md new file mode 100644 index 000000000..adf1c8b9b --- /dev/null +++ b/framework-crates/objc2-mail-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-mail-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-mail-kit)](https://crates.io/crates/objc2-mail-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-mail-kit/badge.svg)](https://docs.rs/objc2-mail-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 MailKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-mail-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-mail-kit/src/generated b/framework-crates/objc2-mail-kit/src/generated new file mode 120000 index 000000000..b367f480d --- /dev/null +++ b/framework-crates/objc2-mail-kit/src/generated @@ -0,0 +1 @@ +../../../generated/MailKit \ No newline at end of file diff --git a/framework-crates/objc2-mail-kit/src/lib.rs b/framework-crates/objc2-mail-kit/src/lib.rs new file mode 100644 index 000000000..4be1f669b --- /dev/null +++ b/framework-crates/objc2-mail-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `MailKit` 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/mailkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-mail-kit/0.2.0")] + +#[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-map-kit/Cargo.toml b/framework-crates/objc2-map-kit/Cargo.toml new file mode 100644 index 000000000..5dff5fe2c --- /dev/null +++ b/framework-crates/objc2-map-kit/Cargo.toml @@ -0,0 +1,425 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-map-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the MapKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] +objc2-contacts = ["dep:objc2-contacts"] +objc2-core-location = ["dep:objc2-core-location"] + +MapKit_MKAnnotation = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKAnnotationView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSImage", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKCircle = ["objc2-core-location?/CoreLocation_CLLocation"] +MapKit_MKCircleRenderer = ["objc2-foundation/Foundation_NSGeometry"] +MapKit_MKClusterAnnotation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKCompassButton = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKDirections = ["objc2-foundation/Foundation_NSError"] +MapKit_MKDirectionsRequest = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSURL", +] +MapKit_MKDirectionsResponse = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKDirectionsTypes = [] +MapKit_MKDistanceFormatter = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSFormatter", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKFoundation = [] +MapKit_MKGeoJSONSerialization = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKGeodesicPolyline = ["objc2-core-location?/CoreLocation_CLLocation"] +MapKit_MKGeometry = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSValue", +] +MapKit_MKGradientPolylineRenderer = [ + "objc2-app-kit?/AppKit_NSColor", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSValue", +] +MapKit_MKHybridMapConfiguration = ["objc2-foundation/Foundation_NSObject"] +MapKit_MKImageryMapConfiguration = ["objc2-foundation/Foundation_NSObject"] +MapKit_MKLocalPointsOfInterestRequest = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKLocalSearch = ["objc2-foundation/Foundation_NSError"] +MapKit_MKLocalSearchCompleter = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +MapKit_MKLocalSearchRequest = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKLocalSearchResponse = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", +] +MapKit_MKLookAroundScene = ["objc2-foundation/Foundation_NSObject"] +MapKit_MKLookAroundSceneRequest = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSError", +] +MapKit_MKLookAroundSnapshot = ["objc2-app-kit?/AppKit_NSImage"] +MapKit_MKLookAroundSnapshotOptions = ["objc2-foundation/Foundation_NSGeometry"] +MapKit_MKLookAroundSnapshotter = ["objc2-foundation/Foundation_NSError"] +MapKit_MKLookAroundViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKMapCamera = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKMapCameraBoundary = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKMapCameraZoomRange = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKMapConfiguration = ["objc2-foundation/Foundation_NSObject"] +MapKit_MKMapItem = [ + "objc2-core-location?/CoreLocation_CLPlacemark", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSTimeZone", + "objc2-foundation/Foundation_NSURL", +] +MapKit_MKMapSnapshot = [ + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSImage", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSGeometry", +] +MapKit_MKMapSnapshotOptions = [ + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKMapSnapshotter = ["objc2-foundation/Foundation_NSError"] +MapKit_MKMapView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKMarkerAnnotationView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSColor", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSImage", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKMultiPoint = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSValue", +] +MapKit_MKMultiPolygon = ["objc2-foundation/Foundation_NSArray"] +MapKit_MKMultiPolygonRenderer = [] +MapKit_MKMultiPolyline = ["objc2-foundation/Foundation_NSArray"] +MapKit_MKMultiPolylineRenderer = [] +MapKit_MKOverlay = ["objc2-core-location?/CoreLocation_CLLocation"] +MapKit_MKOverlayPathRenderer = [ + "objc2-app-kit?/AppKit_NSColor", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSValue", +] +MapKit_MKOverlayRenderer = ["objc2-foundation/Foundation_NSGeometry"] +MapKit_MKPinAnnotationView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSColor", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKPitchControl = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +MapKit_MKPlacemark = [ + "objc2-contacts?/Contacts_CNPostalAddress", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-core-location?/CoreLocation_CLPlacemark", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKPointAnnotation = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKPointOfInterestCategory = ["objc2-foundation/Foundation_NSString"] +MapKit_MKPointOfInterestFilter = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKPolygon = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", +] +MapKit_MKPolygonRenderer = ["objc2-foundation/Foundation_NSGeometry"] +MapKit_MKPolyline = ["objc2-core-location?/CoreLocation_CLLocation"] +MapKit_MKPolylineRenderer = ["objc2-foundation/Foundation_NSGeometry"] +MapKit_MKShape = ["objc2-foundation/Foundation_NSString"] +MapKit_MKStandardMapConfiguration = ["objc2-foundation/Foundation_NSObject"] +MapKit_MKTileOverlay = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +MapKit_MKTileOverlayRenderer = [] +MapKit_MKTypes = ["objc2-foundation/Foundation_NSString"] +MapKit_MKUserLocation = [ + "objc2-core-location?/CoreLocation_CLHeading", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKUserLocationView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MapKit_MKZoomControl = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +MapKit_NSUserActivity_MKMapItem = ["objc2-foundation/Foundation_NSUserActivity"] +all = [ + "MapKit_MKAnnotation", + "MapKit_MKAnnotationView", + "MapKit_MKCircle", + "MapKit_MKCircleRenderer", + "MapKit_MKClusterAnnotation", + "MapKit_MKCompassButton", + "MapKit_MKDirections", + "MapKit_MKDirectionsRequest", + "MapKit_MKDirectionsResponse", + "MapKit_MKDirectionsTypes", + "MapKit_MKDistanceFormatter", + "MapKit_MKFoundation", + "MapKit_MKGeoJSONSerialization", + "MapKit_MKGeodesicPolyline", + "MapKit_MKGeometry", + "MapKit_MKGradientPolylineRenderer", + "MapKit_MKHybridMapConfiguration", + "MapKit_MKImageryMapConfiguration", + "MapKit_MKLocalPointsOfInterestRequest", + "MapKit_MKLocalSearch", + "MapKit_MKLocalSearchCompleter", + "MapKit_MKLocalSearchRequest", + "MapKit_MKLocalSearchResponse", + "MapKit_MKLookAroundScene", + "MapKit_MKLookAroundSceneRequest", + "MapKit_MKLookAroundSnapshot", + "MapKit_MKLookAroundSnapshotOptions", + "MapKit_MKLookAroundSnapshotter", + "MapKit_MKLookAroundViewController", + "MapKit_MKMapCamera", + "MapKit_MKMapCameraBoundary", + "MapKit_MKMapCameraZoomRange", + "MapKit_MKMapConfiguration", + "MapKit_MKMapItem", + "MapKit_MKMapSnapshot", + "MapKit_MKMapSnapshotOptions", + "MapKit_MKMapSnapshotter", + "MapKit_MKMapView", + "MapKit_MKMarkerAnnotationView", + "MapKit_MKMultiPoint", + "MapKit_MKMultiPolygon", + "MapKit_MKMultiPolygonRenderer", + "MapKit_MKMultiPolyline", + "MapKit_MKMultiPolylineRenderer", + "MapKit_MKOverlay", + "MapKit_MKOverlayPathRenderer", + "MapKit_MKOverlayRenderer", + "MapKit_MKPinAnnotationView", + "MapKit_MKPitchControl", + "MapKit_MKPlacemark", + "MapKit_MKPointAnnotation", + "MapKit_MKPointOfInterestCategory", + "MapKit_MKPointOfInterestFilter", + "MapKit_MKPolygon", + "MapKit_MKPolygonRenderer", + "MapKit_MKPolyline", + "MapKit_MKPolylineRenderer", + "MapKit_MKShape", + "MapKit_MKStandardMapConfiguration", + "MapKit_MKTileOverlay", + "MapKit_MKTileOverlayRenderer", + "MapKit_MKTypes", + "MapKit_MKUserLocation", + "MapKit_MKUserLocationView", + "MapKit_MKZoomControl", + "MapKit_NSUserActivity_MKMapItem", + "block2", + "objc2-app-kit", + "objc2-contacts", + "objc2-core-location", +] diff --git a/framework-crates/objc2-map-kit/README.md b/framework-crates/objc2-map-kit/README.md new file mode 100644 index 000000000..950430e9e --- /dev/null +++ b/framework-crates/objc2-map-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-map-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-map-kit)](https://crates.io/crates/objc2-map-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-map-kit/badge.svg)](https://docs.rs/objc2-map-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 MapKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-map-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-map-kit/src/generated b/framework-crates/objc2-map-kit/src/generated new file mode 120000 index 000000000..636381179 --- /dev/null +++ b/framework-crates/objc2-map-kit/src/generated @@ -0,0 +1 @@ +../../../generated/MapKit \ No newline at end of file diff --git a/framework-crates/objc2-map-kit/src/lib.rs b/framework-crates/objc2-map-kit/src/lib.rs new file mode 100644 index 000000000..b4aa7af64 --- /dev/null +++ b/framework-crates/objc2-map-kit/src/lib.rs @@ -0,0 +1,23 @@ +//! # Bindings to the `MapKit` 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/mapkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-map-kit/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; + +#[cfg(feature = "MapKit_MKMapItem")] +unsafe impl objc2_foundation::NSCoding for crate::MKMapItem {} diff --git a/framework-crates/objc2-media-player/Cargo.toml b/framework-crates/objc2-media-player/Cargo.toml new file mode 100644 index 000000000..56bd890ff --- /dev/null +++ b/framework-crates/objc2-media-player/Cargo.toml @@ -0,0 +1,198 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-media-player" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the MediaPlayer framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +MediaPlayer_AVFoundation_MPNowPlayingInfoLanguageOptionAdditions = [] +MediaPlayer_AVPlayerItem_MediaPlayerAdditions = [] +MediaPlayer_MPContentItem = ["objc2-foundation/Foundation_NSString"] +MediaPlayer_MPError = ["objc2-foundation/Foundation_NSString"] +MediaPlayer_MPMediaEntity = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMediaItem = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +MediaPlayer_MPMediaItemCollection = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +MediaPlayer_MPMediaLibrary = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +MediaPlayer_MPMediaPickerController = [] +MediaPlayer_MPMediaPlayback = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMediaPlaylist = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMediaQuery = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMediaQuerySection = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMoviePlayerController = [] +MediaPlayer_MPMoviePlayerViewController = [] +MediaPlayer_MPMusicPlayerApplicationController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMusicPlayerController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPMusicPlayerQueueDescriptor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPNowPlayingInfoCenter = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPNowPlayingInfoLanguageOption = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPNowPlayingSession = ["objc2-foundation/Foundation_NSObject"] +MediaPlayer_MPPlayableContentDataSource = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSIndexPath", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPPlayableContentDelegate = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSIndexPath", +] +MediaPlayer_MPPlayableContentManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +MediaPlayer_MPPlayableContentManagerContext = [] +MediaPlayer_MPRemoteCommand = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +MediaPlayer_MPRemoteCommandCenter = [] +MediaPlayer_MPRemoteCommandEvent = ["objc2-foundation/Foundation_NSDate"] +MediaPlayer_MPRemoteControlTypes = [] +MediaPlayer_MPVolumeSettings = [] +MediaPlayer_MPVolumeView = [] +MediaPlayer_MediaPlayerDefines = [] +MediaPlayer_NSUserActivity_MediaPlayerAdditions = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUserActivity", +] +all = [ + "MediaPlayer_AVFoundation_MPNowPlayingInfoLanguageOptionAdditions", + "MediaPlayer_AVPlayerItem_MediaPlayerAdditions", + "MediaPlayer_MPContentItem", + "MediaPlayer_MPError", + "MediaPlayer_MPMediaEntity", + "MediaPlayer_MPMediaItem", + "MediaPlayer_MPMediaItemCollection", + "MediaPlayer_MPMediaLibrary", + "MediaPlayer_MPMediaPickerController", + "MediaPlayer_MPMediaPlayback", + "MediaPlayer_MPMediaPlaylist", + "MediaPlayer_MPMediaQuery", + "MediaPlayer_MPMediaQuerySection", + "MediaPlayer_MPMoviePlayerController", + "MediaPlayer_MPMoviePlayerViewController", + "MediaPlayer_MPMusicPlayerApplicationController", + "MediaPlayer_MPMusicPlayerController", + "MediaPlayer_MPMusicPlayerQueueDescriptor", + "MediaPlayer_MPNowPlayingInfoCenter", + "MediaPlayer_MPNowPlayingInfoLanguageOption", + "MediaPlayer_MPNowPlayingSession", + "MediaPlayer_MPPlayableContentDataSource", + "MediaPlayer_MPPlayableContentDelegate", + "MediaPlayer_MPPlayableContentManager", + "MediaPlayer_MPPlayableContentManagerContext", + "MediaPlayer_MPRemoteCommand", + "MediaPlayer_MPRemoteCommandCenter", + "MediaPlayer_MPRemoteCommandEvent", + "MediaPlayer_MPRemoteControlTypes", + "MediaPlayer_MPVolumeSettings", + "MediaPlayer_MPVolumeView", + "MediaPlayer_MediaPlayerDefines", + "MediaPlayer_NSUserActivity_MediaPlayerAdditions", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-media-player/README.md b/framework-crates/objc2-media-player/README.md new file mode 100644 index 000000000..355b4894a --- /dev/null +++ b/framework-crates/objc2-media-player/README.md @@ -0,0 +1,14 @@ +# `objc2-media-player` + +[![Latest version](https://badgen.net/crates/v/objc2-media-player)](https://crates.io/crates/objc2-media-player) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-media-player/badge.svg)](https://docs.rs/objc2-media-player/) +[![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 MediaPlayer. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-media-player/) 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-media-player/src/generated b/framework-crates/objc2-media-player/src/generated new file mode 120000 index 000000000..b9ef896f1 --- /dev/null +++ b/framework-crates/objc2-media-player/src/generated @@ -0,0 +1 @@ +../../../generated/MediaPlayer \ No newline at end of file diff --git a/framework-crates/objc2-media-player/src/lib.rs b/framework-crates/objc2-media-player/src/lib.rs new file mode 100644 index 000000000..c4f15ac8c --- /dev/null +++ b/framework-crates/objc2-media-player/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `MediaPlayer` 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/mediaplayer/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-media-player/0.2.0")] + +#[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-metal-fx/Cargo.toml b/framework-crates/objc2-metal-fx/Cargo.toml new file mode 100644 index 000000000..93203b633 --- /dev/null +++ b/framework-crates/objc2-metal-fx/Cargo.toml @@ -0,0 +1,71 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-metal-fx" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the MetalFX framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-metal = { path = "../objc2-metal", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +MetalFX_MTLFXDefines = [] +MetalFX_MTLFXSpatialScaler = [ + "objc2-foundation/Foundation_NSObject", + "objc2-metal/Metal_MTLCommandBuffer", + "objc2-metal/Metal_MTLDevice", + "objc2-metal/Metal_MTLFence", + "objc2-metal/Metal_MTLPixelFormat", + "objc2-metal/Metal_MTLResource", + "objc2-metal/Metal_MTLTexture", +] +MetalFX_MTLFXTemporalScaler = [ + "objc2-foundation/Foundation_NSObject", + "objc2-metal/Metal_MTLCommandBuffer", + "objc2-metal/Metal_MTLDevice", + "objc2-metal/Metal_MTLFence", + "objc2-metal/Metal_MTLPixelFormat", + "objc2-metal/Metal_MTLResource", + "objc2-metal/Metal_MTLTexture", +] +all = [ + "MetalFX_MTLFXDefines", + "MetalFX_MTLFXSpatialScaler", + "MetalFX_MTLFXTemporalScaler", +] diff --git a/framework-crates/objc2-metal-fx/README.md b/framework-crates/objc2-metal-fx/README.md new file mode 100644 index 000000000..8e6dd3b48 --- /dev/null +++ b/framework-crates/objc2-metal-fx/README.md @@ -0,0 +1,14 @@ +# `objc2-metal-fx` + +[![Latest version](https://badgen.net/crates/v/objc2-metal-fx)](https://crates.io/crates/objc2-metal-fx) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-metal-fx/badge.svg)](https://docs.rs/objc2-metal-fx/) +[![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 MetalFX. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-metal-fx/) 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-metal-fx/src/generated b/framework-crates/objc2-metal-fx/src/generated new file mode 120000 index 000000000..eac47c59e --- /dev/null +++ b/framework-crates/objc2-metal-fx/src/generated @@ -0,0 +1 @@ +../../../generated/MetalFX \ No newline at end of file diff --git a/framework-crates/objc2-metal-fx/src/lib.rs b/framework-crates/objc2-metal-fx/src/lib.rs new file mode 100644 index 000000000..f0a4d4395 --- /dev/null +++ b/framework-crates/objc2-metal-fx/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `MetalFX` 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/metalfx/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-metal-fx/0.2.0")] + +#[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-metal-kit/Cargo.toml b/framework-crates/objc2-metal-kit/Cargo.toml new file mode 100644 index 000000000..557e658d7 --- /dev/null +++ b/framework-crates/objc2-metal-kit/Cargo.toml @@ -0,0 +1,102 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-metal-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the MetalKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-metal = { path = "../objc2-metal", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +MetalKit_MTKDefines = [] +MetalKit_MTKModel = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-metal/Metal_MTLBuffer", + "objc2-metal/Metal_MTLDevice", + "objc2-metal/Metal_MTLRenderCommandEncoder", + "objc2-metal/Metal_MTLResource", + "objc2-metal/Metal_MTLStageInputOutputDescriptor", +] +MetalKit_MTKTextureLoader = [ + "objc2-app-kit?/AppKit_NSGraphics", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-metal/Metal_MTLDevice", + "objc2-metal/Metal_MTLResource", + "objc2-metal/Metal_MTLTexture", +] +MetalKit_MTKView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-metal/Metal_MTLDevice", + "objc2-metal/Metal_MTLPixelFormat", + "objc2-metal/Metal_MTLRenderPass", + "objc2-metal/Metal_MTLResource", + "objc2-metal/Metal_MTLTexture", +] +all = [ + "MetalKit_MTKDefines", + "MetalKit_MTKModel", + "MetalKit_MTKTextureLoader", + "MetalKit_MTKView", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-metal-kit/README.md b/framework-crates/objc2-metal-kit/README.md new file mode 100644 index 000000000..b5627e349 --- /dev/null +++ b/framework-crates/objc2-metal-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-metal-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-metal-kit)](https://crates.io/crates/objc2-metal-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-metal-kit/badge.svg)](https://docs.rs/objc2-metal-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 MetalKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-metal-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-metal-kit/src/generated b/framework-crates/objc2-metal-kit/src/generated new file mode 120000 index 000000000..529b9ca46 --- /dev/null +++ b/framework-crates/objc2-metal-kit/src/generated @@ -0,0 +1 @@ +../../../generated/MetalKit \ No newline at end of file diff --git a/framework-crates/objc2-metal-kit/src/lib.rs b/framework-crates/objc2-metal-kit/src/lib.rs new file mode 100644 index 000000000..acb687929 --- /dev/null +++ b/framework-crates/objc2-metal-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `MetalKit` 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/metalkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-metal-kit/0.2.0")] + +#[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-metal/Cargo.modified.toml b/framework-crates/objc2-metal/Cargo.modified.toml new file mode 100644 index 000000000..361a9061d --- /dev/null +++ b/framework-crates/objc2-metal/Cargo.modified.toml @@ -0,0 +1,42 @@ +[[example]] +name = "triangle" +required-features = [ + "objc2-app-kit/AppKit_NSGraphics", + "objc2-app-kit/AppKit_NSWindow", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSApplication", + "objc2-app-kit/AppKit_NSRunningApplication", + "objc2-app-kit/AppKit_NSView", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSThread", + "objc2-foundation/Foundation_NSGeometry", + "Metal_MTLLibrary", + "Metal_MTLRenderPipeline", + "Metal_MTLRenderCommandEncoder", + "Metal_MTLCommandBuffer", + "Metal_MTLCommandEncoder", + "Metal_MTLCommandQueue", + "Metal_MTLPixelFormat", + "Metal_MTLDevice", + "Metal_MTLDrawable", + "Metal_MTLRenderPass", + "objc2-metal-kit/MetalKit_MTKView", + "objc2-metal-kit/objc2-app-kit", +] + +[features] +# Private framework functionality +# +# These functions/methods are all marked `unsafe`, since they may not always +# exist. +unstable-private = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSError", +] + +[dev-dependencies] +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } +objc2-metal-kit = { path = "../objc2-metal-kit", version = "0.2.0" } diff --git a/framework-crates/objc2-metal/Cargo.toml b/framework-crates/objc2-metal/Cargo.toml new file mode 100644 index 000000000..e7dac90c0 --- /dev/null +++ b/framework-crates/objc2-metal/Cargo.toml @@ -0,0 +1,319 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-metal" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Metal framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +unstable-private = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSError", +] +block2 = ["dep:block2"] + +Metal_MTLAccelerationStructure = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLAccelerationStructureCommandEncoder = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLAccelerationStructureTypes = [] +Metal_MTLArgument = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLArgumentEncoder = [ + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLBinaryArchive = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Metal_MTLBlitCommandEncoder = ["objc2-foundation/Foundation_NSRange"] +Metal_MTLBlitPass = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLBuffer = [ + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLCaptureManager = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Metal_MTLCaptureScope = ["objc2-foundation/Foundation_NSString"] +Metal_MTLCommandBuffer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLCommandEncoder = ["objc2-foundation/Foundation_NSString"] +Metal_MTLCommandQueue = ["objc2-foundation/Foundation_NSString"] +Metal_MTLComputeCommandEncoder = ["objc2-foundation/Foundation_NSRange"] +Metal_MTLComputePass = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLComputePipeline = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLCounters = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLDefines = [] +Metal_MTLDepthStencil = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLDevice = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Metal_MTLDrawable = [] +Metal_MTLDynamicLibrary = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Metal_MTLEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLFence = ["objc2-foundation/Foundation_NSString"] +Metal_MTLFunctionConstantValues = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLFunctionDescriptor = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLFunctionHandle = ["objc2-foundation/Foundation_NSString"] +Metal_MTLFunctionLog = [ + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Metal_MTLFunctionStitching = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLHeap = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLIOCommandBuffer = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLIOCommandQueue = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLIOCompressor = [] +Metal_MTLIndirectCommandBuffer = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", +] +Metal_MTLIndirectCommandEncoder = [] +Metal_MTLIntersectionFunctionTable = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", +] +Metal_MTLLibrary = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLLinkedFunctions = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLParallelRenderCommandEncoder = [] +Metal_MTLPipeline = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLPixelFormat = [] +Metal_MTLRasterizationRate = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +Metal_MTLRenderCommandEncoder = ["objc2-foundation/Foundation_NSRange"] +Metal_MTLRenderPass = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLRenderPipeline = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLResource = ["objc2-foundation/Foundation_NSString"] +Metal_MTLResourceStateCommandEncoder = [] +Metal_MTLResourceStatePass = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLSampler = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLStageInputOutputDescriptor = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLTexture = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +Metal_MTLTypes = [] +Metal_MTLVertexDescriptor = ["objc2-foundation/Foundation_NSObject"] +Metal_MTLVisibleFunctionTable = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", +] +all = [ + "Metal_MTLAccelerationStructure", + "Metal_MTLAccelerationStructureCommandEncoder", + "Metal_MTLAccelerationStructureTypes", + "Metal_MTLArgument", + "Metal_MTLArgumentEncoder", + "Metal_MTLBinaryArchive", + "Metal_MTLBlitCommandEncoder", + "Metal_MTLBlitPass", + "Metal_MTLBuffer", + "Metal_MTLCaptureManager", + "Metal_MTLCaptureScope", + "Metal_MTLCommandBuffer", + "Metal_MTLCommandEncoder", + "Metal_MTLCommandQueue", + "Metal_MTLComputeCommandEncoder", + "Metal_MTLComputePass", + "Metal_MTLComputePipeline", + "Metal_MTLCounters", + "Metal_MTLDefines", + "Metal_MTLDepthStencil", + "Metal_MTLDevice", + "Metal_MTLDrawable", + "Metal_MTLDynamicLibrary", + "Metal_MTLEvent", + "Metal_MTLFence", + "Metal_MTLFunctionConstantValues", + "Metal_MTLFunctionDescriptor", + "Metal_MTLFunctionHandle", + "Metal_MTLFunctionLog", + "Metal_MTLFunctionStitching", + "Metal_MTLHeap", + "Metal_MTLIOCommandBuffer", + "Metal_MTLIOCommandQueue", + "Metal_MTLIOCompressor", + "Metal_MTLIndirectCommandBuffer", + "Metal_MTLIndirectCommandEncoder", + "Metal_MTLIntersectionFunctionTable", + "Metal_MTLLibrary", + "Metal_MTLLinkedFunctions", + "Metal_MTLParallelRenderCommandEncoder", + "Metal_MTLPipeline", + "Metal_MTLPixelFormat", + "Metal_MTLRasterizationRate", + "Metal_MTLRenderCommandEncoder", + "Metal_MTLRenderPass", + "Metal_MTLRenderPipeline", + "Metal_MTLResource", + "Metal_MTLResourceStateCommandEncoder", + "Metal_MTLResourceStatePass", + "Metal_MTLSampler", + "Metal_MTLStageInputOutputDescriptor", + "Metal_MTLTexture", + "Metal_MTLTypes", + "Metal_MTLVertexDescriptor", + "Metal_MTLVisibleFunctionTable", + "block2", +] + +[[example]] +name = "triangle" +required-features = [ + "objc2-app-kit/AppKit_NSGraphics", + "objc2-app-kit/AppKit_NSWindow", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSApplication", + "objc2-app-kit/AppKit_NSRunningApplication", + "objc2-app-kit/AppKit_NSView", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSThread", + "objc2-foundation/Foundation_NSGeometry", + "Metal_MTLLibrary", + "Metal_MTLRenderPipeline", + "Metal_MTLRenderCommandEncoder", + "Metal_MTLCommandBuffer", + "Metal_MTLCommandEncoder", + "Metal_MTLCommandQueue", + "Metal_MTLPixelFormat", + "Metal_MTLDevice", + "Metal_MTLDrawable", + "Metal_MTLRenderPass", + "objc2-metal-kit/MetalKit_MTKView", + "objc2-metal-kit/objc2-app-kit", +] + +[dev-dependencies] +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } +objc2-metal-kit = { path = "../objc2-metal-kit", version = "0.2.0" } diff --git a/framework-crates/objc2-metal/README.md b/framework-crates/objc2-metal/README.md new file mode 100644 index 000000000..481302830 --- /dev/null +++ b/framework-crates/objc2-metal/README.md @@ -0,0 +1,14 @@ +# `objc2-metal` + +[![Latest version](https://badgen.net/crates/v/objc2-metal)](https://crates.io/crates/objc2-metal) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-metal/badge.svg)](https://docs.rs/objc2-metal/) +[![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 Metal. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-metal/) 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/crates/icrate/examples/metal.rs b/framework-crates/objc2-metal/examples/triangle.rs similarity index 94% rename from crates/icrate/examples/metal.rs rename to framework-crates/objc2-metal/examples/triangle.rs index 2f84f8ea1..8cd80b46c 100644 --- a/crates/icrate/examples/metal.rs +++ b/framework-crates/objc2-metal/examples/triangle.rs @@ -3,26 +3,24 @@ use core::{cell::OnceCell, ptr::NonNull}; -use icrate::{ - AppKit::{ - NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate, NSBackingStoreType, - NSWindow, NSWindowStyleMask, - }, - Foundation::{ - ns_string, MainThreadMarker, NSDate, NSNotification, NSObject, NSObjectProtocol, NSPoint, - NSRect, NSSize, - }, - Metal::{ - MTLCommandBuffer, MTLCommandEncoder, MTLCommandQueue, MTLCreateSystemDefaultDevice, - MTLDevice, MTLDrawable, MTLLibrary, MTLPrimitiveType, MTLRenderCommandEncoder, - MTLRenderPipelineDescriptor, MTLRenderPipelineState, - }, - MetalKit::{MTKView, MTKViewDelegate}, -}; use objc2::{ declare_class, msg_send_id, mutability::MainThreadOnly, rc::Id, runtime::ProtocolObject, ClassType, DeclaredClass, }; +use objc2_app_kit::{ + NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate, NSBackingStoreType, + NSWindow, NSWindowStyleMask, +}; +use objc2_foundation::{ + ns_string, MainThreadMarker, NSDate, NSNotification, NSObject, NSObjectProtocol, NSPoint, + NSRect, NSSize, +}; +use objc2_metal::{ + MTLCommandBuffer, MTLCommandEncoder, MTLCommandQueue, MTLCreateSystemDefaultDevice, MTLDevice, + MTLDrawable, MTLLibrary, MTLPrimitiveType, MTLRenderCommandEncoder, + MTLRenderPipelineDescriptor, MTLRenderPipelineState, +}; +use objc2_metal_kit::{MTKView, MTKViewDelegate}; #[rustfmt::skip] const SHADERS: &str = r#" @@ -242,7 +240,7 @@ declare_class!( idcell!(command_queue <= self); idcell!(pipeline_state <= self); - // FIXME: icrate `MTKView` doesn't have a generated binding for `currentDrawable` yet + // FIXME: `MTKView` doesn't have a generated binding for `currentDrawable` yet // (because it needs a definition of `CAMetalDrawable`, which we don't support yet) so // we have to use a raw `msg_send_id` call here instead. let current_drawable: Option>> = diff --git a/crates/icrate/src/additions/Metal/capture.rs b/framework-crates/objc2-metal/src/capture.rs similarity index 98% rename from crates/icrate/src/additions/Metal/capture.rs rename to framework-crates/objc2-metal/src/capture.rs index c44da3c14..4ad81ed82 100644 --- a/crates/icrate/src/additions/Metal/capture.rs +++ b/framework-crates/objc2-metal/src/capture.rs @@ -1,5 +1,5 @@ #![allow(unused_imports)] -use crate::Metal::*; +use crate::*; use objc2::runtime::{AnyObject, ProtocolObject}; // SAFETY: The documentation for captureObject specifies that the object diff --git a/crates/icrate/src/additions/Metal/device.rs b/framework-crates/objc2-metal/src/device.rs similarity index 93% rename from crates/icrate/src/additions/Metal/device.rs rename to framework-crates/objc2-metal/src/device.rs index 39622d561..bc8f1be92 100644 --- a/crates/icrate/src/additions/Metal/device.rs +++ b/framework-crates/objc2-metal/src/device.rs @@ -1,5 +1,5 @@ #![cfg(commented_out)] -use crate::Metal::MTLDevice; +use crate::MTLDevice; pub trait MTLDeviceExtension { // pub fn system_default() -> Option { diff --git a/framework-crates/objc2-metal/src/generated b/framework-crates/objc2-metal/src/generated new file mode 120000 index 000000000..6cbf628c3 --- /dev/null +++ b/framework-crates/objc2-metal/src/generated @@ -0,0 +1 @@ +../../../generated/Metal \ No newline at end of file diff --git a/crates/icrate/src/additions/Metal/mod.rs b/framework-crates/objc2-metal/src/lib.rs similarity index 55% rename from crates/icrate/src/additions/Metal/mod.rs rename to framework-crates/objc2-metal/src/lib.rs index c763bedf4..7e5da0187 100644 --- a/crates/icrate/src/additions/Metal/mod.rs +++ b/framework-crates/objc2-metal/src/lib.rs @@ -1,8 +1,13 @@ //! # Bindings to the `Metal` 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/metal/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +//! //! Metal has tools for validating that you're using it correctly, using these -//! is highly recommended! See [Apple's documentation][apple-doc], or run -//! `man MetalValidation` to get information on environment variables. +//! is highly recommended! See [Apple's documentation on it][apple-doc], or +//! run `man MetalValidation` to get information on environment variables. //! //! [apple-doc]: https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/. //! @@ -12,13 +17,26 @@ //! Drawing a rotating triangle. //! //! ```ignore -#![doc = include_str!("../../../examples/metal.rs")] +#![doc = include_str!("../examples/triangle.rs")] //! ``` +#![recursion_limit = "256"] +#![allow(non_snake_case)] +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-metal/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; #[cfg(feature = "Metal_MTLCaptureManager")] mod capture; #[cfg(feature = "Metal_MTLDevice")] mod device; +mod generated; #[cfg(feature = "Metal_MTLAccelerationStructureTypes")] mod packed; #[cfg(feature = "unstable-private")] @@ -27,10 +45,8 @@ mod private; mod resource; mod slice; -#[allow(unreachable_pub)] -#[allow(unused_imports)] -pub use crate::generated::Metal::*; - +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; #[cfg(feature = "Metal_MTLAccelerationStructureTypes")] pub use self::packed::{MTLPackedFloat3, __MTLPackedFloat3}; #[cfg(feature = "unstable-private")] diff --git a/crates/icrate/src/additions/Metal/packed.rs b/framework-crates/objc2-metal/src/packed.rs similarity index 93% rename from crates/icrate/src/additions/Metal/packed.rs rename to framework-crates/objc2-metal/src/packed.rs index b9c739014..f8bf20dda 100644 --- a/crates/icrate/src/additions/Metal/packed.rs +++ b/framework-crates/objc2-metal/src/packed.rs @@ -1,7 +1,6 @@ use core::fmt; use std::os::raw::c_float; -#[cfg(feature = "objc2")] use objc2::encode::{Encode, Encoding, RefEncode}; // TODO: Investigate the need for this helper struct? @@ -40,7 +39,6 @@ impl fmt::Debug for MTLPackedFloat3 { } } -#[cfg(feature = "objc2")] unsafe impl Encode for MTLPackedFloat3 { const ENCODING: Encoding = Encoding::Struct( "_MTLPackedFloat3", @@ -57,7 +55,6 @@ unsafe impl Encode for MTLPackedFloat3 { ); } -#[cfg(feature = "objc2")] unsafe impl RefEncode for MTLPackedFloat3 { const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } @@ -67,7 +64,7 @@ mod tests { use alloc::string::ToString; use objc2::encode::Encode; - use crate::Metal::MTLPackedFloat4x3; + use crate::MTLPackedFloat4x3; #[test] fn test_packed_float() { diff --git a/crates/icrate/src/additions/Metal/private.rs b/framework-crates/objc2-metal/src/private.rs similarity index 83% rename from crates/icrate/src/additions/Metal/private.rs rename to framework-crates/objc2-metal/src/private.rs index 96e5b4ad5..9b36e347c 100644 --- a/crates/icrate/src/additions/Metal/private.rs +++ b/framework-crates/objc2-metal/src/private.rs @@ -7,21 +7,18 @@ #![allow(unused_imports)] use std::ffi::c_void; -use crate::Foundation::*; -use crate::Metal::*; +use crate::*; use objc2::rc::{Allocated, Id}; use objc2::runtime::{AnyObject, ProtocolObject}; use objc2::{extern_methods, msg_send_id, Message}; -pub unsafe trait MTLDevicePrivate: MTLDevice + Message { - #[cfg(feature = "Foundation_NSString")] - unsafe fn vendorName(&self) -> Id { +pub unsafe trait MTLDevicePrivate: Message { + unsafe fn vendorName(&self) -> Id { unsafe { msg_send_id![self, vendorName] } } - #[cfg(feature = "Foundation_NSString")] - unsafe fn familyName(&self) -> Id { + unsafe fn familyName(&self) -> Id { unsafe { msg_send_id![self, familyName] } } } @@ -44,12 +41,11 @@ extern_methods!( flags: u64, ) -> Option>; - #[cfg(feature = "Foundation_NSError")] #[method_id(newSerializedVertexDataWithFlags:error:_)] pub unsafe fn newSerializedVertexDataWithFlags_error( &self, flags: u64, - ) -> Result, Id>; + ) -> Result, Id>; #[method(serializeFragmentData)] pub unsafe fn serializeFragmentData(&self) -> *mut c_void; diff --git a/crates/icrate/src/additions/Metal/resource.rs b/framework-crates/objc2-metal/src/resource.rs similarity index 100% rename from crates/icrate/src/additions/Metal/resource.rs rename to framework-crates/objc2-metal/src/resource.rs diff --git a/crates/icrate/src/additions/Metal/slice.rs b/framework-crates/objc2-metal/src/slice.rs similarity index 98% rename from crates/icrate/src/additions/Metal/slice.rs rename to framework-crates/objc2-metal/src/slice.rs index c7f98379d..f834fa48c 100644 --- a/crates/icrate/src/additions/Metal/slice.rs +++ b/framework-crates/objc2-metal/src/slice.rs @@ -2,7 +2,7 @@ #![allow(clippy::missing_safety_doc)] use std::ptr::NonNull; -use crate::Metal::*; +use crate::*; #[allow(dead_code)] fn slice_to_ptr_count(slice: &[T]) -> (NonNull, usize) { diff --git a/framework-crates/objc2-metric-kit/Cargo.toml b/framework-crates/objc2-metric-kit/Cargo.toml new file mode 100644 index 000000000..2e383b092 --- /dev/null +++ b/framework-crates/objc2-metric-kit/Cargo.toml @@ -0,0 +1,244 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-metric-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the MetricKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +MetricKit_MXAnimationMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXAppExitMetric = ["objc2-foundation/Foundation_NSObject"] +MetricKit_MXAppLaunchDiagnostic = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXAppLaunchMetric = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXAppResponsivenessMetric = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXAppRunTimeMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXAverage = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", +] +MetricKit_MXCPUExceptionDiagnostic = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXCPUMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXCallStackTree = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +MetricKit_MXCellularConditionMetric = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXCrashDiagnostic = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +MetricKit_MXCrashDiagnosticObjectiveCExceptionReason = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MetricKit_MXDiagnostic = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MetricKit_MXDiagnosticPayload = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", +] +MetricKit_MXDiskIOMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXDiskWriteExceptionDiagnostic = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXDisplayMetric = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +MetricKit_MXGPUMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXHangDiagnostic = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXHistogram = [ + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", +] +MetricKit_MXLocationActivityMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXMemoryMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXMetaData = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MetricKit_MXMetric = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", +] +MetricKit_MXMetricManager = ["objc2-foundation/Foundation_NSArray"] +MetricKit_MXMetricPayload = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +MetricKit_MXNetworkTransferMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXSignpost = [] +MetricKit_MXSignpostMetric = [ + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXSignpostRecord = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSMeasurement", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUnit", +] +MetricKit_MXSignpost_Private = [] +MetricKit_MXUnit = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUnit", +] +all = [ + "MetricKit_MXAnimationMetric", + "MetricKit_MXAppExitMetric", + "MetricKit_MXAppLaunchDiagnostic", + "MetricKit_MXAppLaunchMetric", + "MetricKit_MXAppResponsivenessMetric", + "MetricKit_MXAppRunTimeMetric", + "MetricKit_MXAverage", + "MetricKit_MXCPUExceptionDiagnostic", + "MetricKit_MXCPUMetric", + "MetricKit_MXCallStackTree", + "MetricKit_MXCellularConditionMetric", + "MetricKit_MXCrashDiagnostic", + "MetricKit_MXCrashDiagnosticObjectiveCExceptionReason", + "MetricKit_MXDiagnostic", + "MetricKit_MXDiagnosticPayload", + "MetricKit_MXDiskIOMetric", + "MetricKit_MXDiskWriteExceptionDiagnostic", + "MetricKit_MXDisplayMetric", + "MetricKit_MXError", + "MetricKit_MXGPUMetric", + "MetricKit_MXHangDiagnostic", + "MetricKit_MXHistogram", + "MetricKit_MXLocationActivityMetric", + "MetricKit_MXMemoryMetric", + "MetricKit_MXMetaData", + "MetricKit_MXMetric", + "MetricKit_MXMetricManager", + "MetricKit_MXMetricPayload", + "MetricKit_MXNetworkTransferMetric", + "MetricKit_MXSignpost", + "MetricKit_MXSignpostMetric", + "MetricKit_MXSignpostRecord", + "MetricKit_MXSignpost_Private", + "MetricKit_MXUnit", +] diff --git a/framework-crates/objc2-metric-kit/README.md b/framework-crates/objc2-metric-kit/README.md new file mode 100644 index 000000000..7fbc5ee3f --- /dev/null +++ b/framework-crates/objc2-metric-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-metric-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-metric-kit)](https://crates.io/crates/objc2-metric-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-metric-kit/badge.svg)](https://docs.rs/objc2-metric-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 MetricKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-metric-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-metric-kit/src/generated b/framework-crates/objc2-metric-kit/src/generated new file mode 120000 index 000000000..0891344ae --- /dev/null +++ b/framework-crates/objc2-metric-kit/src/generated @@ -0,0 +1 @@ +../../../generated/MetricKit \ No newline at end of file diff --git a/framework-crates/objc2-metric-kit/src/lib.rs b/framework-crates/objc2-metric-kit/src/lib.rs new file mode 100644 index 000000000..0a625d810 --- /dev/null +++ b/framework-crates/objc2-metric-kit/src/lib.rs @@ -0,0 +1,26 @@ +//! # Bindings to the `MetricKit` 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/metrickit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-metric-kit/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[cfg(feature = "MetricKit_MXMetricManager")] +mod manager; + +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; +#[cfg(feature = "MetricKit_MXMetricManager")] +#[allow(unused_imports, unreachable_pub)] +pub use self::manager::*; diff --git a/crates/icrate/src/additions/MetricKit/manager.rs b/framework-crates/objc2-metric-kit/src/manager.rs similarity index 51% rename from crates/icrate/src/additions/MetricKit/manager.rs rename to framework-crates/objc2-metric-kit/src/manager.rs index 9125eea42..924b48100 100644 --- a/crates/icrate/src/additions/MetricKit/manager.rs +++ b/framework-crates/objc2-metric-kit/src/manager.rs @@ -1,5 +1,5 @@ -#[cfg(feature = "Foundation_NSString")] -pub type MXLaunchTaskID = crate::Foundation::NSString; +#![allow(non_snake_case)] +pub type MXLaunchTaskID = objc2_foundation::NSString; // pub type os_log_t = ProtocolObject; @@ -9,23 +9,20 @@ pub type MXLaunchTaskID = crate::Foundation::NSString; // ); objc2::extern_methods!( - unsafe impl crate::MetricKit::MXMetricManager { - #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] + unsafe impl crate::MXMetricManager { #[method(extendLaunchMeasurementForTaskID:error:_)] pub unsafe fn extendLaunchMeasurementForTaskID_error( &self, task_id: &MXLaunchTaskID, - ) -> Result<(), objc2::rc::Id>; + ) -> Result<(), objc2::rc::Id>; - #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] #[method(finishExtendedLaunchMeasurementForTaskID:error:_)] pub unsafe fn finishExtendedLaunchMeasurementForTaskID_error( &self, task_id: &MXLaunchTaskID, - ) -> Result<(), objc2::rc::Id>; + ) -> Result<(), objc2::rc::Id>; - // #[cfg(feature = "Foundation_NSString")] // #[method(makeLogHandleWithCategory:)] - // pub unsafe fn makeLogHandleWithCategory(category: &crate::Foundation::NSString) -> Id; + // pub unsafe fn makeLogHandleWithCategory(category: &objc2_foundation::NSString) -> Id; } ); diff --git a/framework-crates/objc2-osa-kit/Cargo.toml b/framework-crates/objc2-osa-kit/Cargo.toml new file mode 100644 index 000000000..576d9779c --- /dev/null +++ b/framework-crates/objc2-osa-kit/Cargo.toml @@ -0,0 +1,106 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-osa-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the OSAKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +OSAKit_OSALanguage = [ + "objc2-foundation/Foundation_NSAppleEventDescriptor", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +OSAKit_OSALanguageInstance = [ + "objc2-foundation/Foundation_NSAppleEventDescriptor", + "objc2-foundation/Foundation_NSAttributedString", +] +OSAKit_OSAScript = [ + "objc2-foundation/Foundation_NSAppleEventDescriptor", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +OSAKit_OSAScriptController = [ + "objc2-app-kit/AppKit_NSController", + "objc2-app-kit/AppKit_NSKeyValueBinding", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSText", + "objc2-app-kit/AppKit_NSTextView", + "objc2-app-kit/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSObject", +] +OSAKit_OSAScriptView = [ + "objc2-app-kit/AppKit_NSAccessibilityProtocols", + "objc2-app-kit/AppKit_NSAnimation", + "objc2-app-kit/AppKit_NSAppearance", + "objc2-app-kit/AppKit_NSColorPanel", + "objc2-app-kit/AppKit_NSDragging", + "objc2-app-kit/AppKit_NSInputManager", + "objc2-app-kit/AppKit_NSLayoutManager", + "objc2-app-kit/AppKit_NSMenu", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSSpellProtocol", + "objc2-app-kit/AppKit_NSText", + "objc2-app-kit/AppKit_NSTextContainer", + "objc2-app-kit/AppKit_NSTextContent", + "objc2-app-kit/AppKit_NSTextInputClient", + "objc2-app-kit/AppKit_NSTextView", + "objc2-app-kit/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit/AppKit_NSUserInterfaceValidation", + "objc2-app-kit/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +all = [ + "OSAKit_OSALanguage", + "OSAKit_OSALanguageInstance", + "OSAKit_OSAScript", + "OSAKit_OSAScriptController", + "OSAKit_OSAScriptView", +] diff --git a/framework-crates/objc2-osa-kit/README.md b/framework-crates/objc2-osa-kit/README.md new file mode 100644 index 000000000..30c3084fa --- /dev/null +++ b/framework-crates/objc2-osa-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-osa-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-osa-kit)](https://crates.io/crates/objc2-osa-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-osa-kit/badge.svg)](https://docs.rs/objc2-osa-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 OSAKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-osa-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-osa-kit/src/generated b/framework-crates/objc2-osa-kit/src/generated new file mode 120000 index 000000000..db37a625c --- /dev/null +++ b/framework-crates/objc2-osa-kit/src/generated @@ -0,0 +1 @@ +../../../generated/OSAKit \ No newline at end of file diff --git a/framework-crates/objc2-osa-kit/src/lib.rs b/framework-crates/objc2-osa-kit/src/lib.rs new file mode 100644 index 000000000..f64e3df2f --- /dev/null +++ b/framework-crates/objc2-osa-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `OSAKit` 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/osakit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-osa-kit/0.2.0")] + +#[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-photos/Cargo.modified.toml b/framework-crates/objc2-photos/Cargo.modified.toml new file mode 100644 index 000000000..f53305ec2 --- /dev/null +++ b/framework-crates/objc2-photos/Cargo.modified.toml @@ -0,0 +1,2 @@ +[package] +description = "Bindings to the Photos/PhotoKit framework" diff --git a/framework-crates/objc2-photos/Cargo.toml b/framework-crates/objc2-photos/Cargo.toml new file mode 100644 index 000000000..8e51b3b73 --- /dev/null +++ b/framework-crates/objc2-photos/Cargo.toml @@ -0,0 +1,240 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-photos" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Photos/PhotoKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] +objc2-core-location = ["dep:objc2-core-location"] +objc2-uniform-type-identifiers = ["dep:objc2-uniform-type-identifiers"] + +Photos_PHAdjustmentData = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", +] +Photos_PHAsset = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Photos_PHAssetChangeRequest = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Photos_PHAssetCollectionChangeRequest = [ + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSString", +] +Photos_PHAssetCreationRequest = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +Photos_PHAssetResource = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +Photos_PHAssetResourceManager = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURL", +] +Photos_PHChange = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSIndexSet", +] +Photos_PHChangeRequest = [] +Photos_PHCloudIdentifier = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Photos_PHCollection = [ + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Photos_PHCollectionListChangeRequest = [ + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSString", +] +Photos_PHContentEditingInput = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-core-location?/CoreLocation_CLLocation", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Photos_PHContentEditingOutput = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURL", + "objc2-uniform-type-identifiers?/UniformTypeIdentifiers_UTType", +] +Photos_PHError = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +Photos_PHFetchOptions = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSPredicate", + "objc2-foundation/Foundation_NSSortDescriptor", +] +Photos_PHFetchResult = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSIndexSet", + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", +] +Photos_PHImageManager = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Photos_PHLivePhoto = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Photos_PHLivePhotoEditingContext = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +Photos_PHObject = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Photos_PHPersistentChange = ["objc2-foundation/Foundation_NSError"] +Photos_PHPersistentChangeFetchResult = [] +Photos_PHPersistentChangeToken = ["objc2-foundation/Foundation_NSObject"] +Photos_PHPersistentObjectChangeDetails = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +Photos_PHPhotoLibrary = ["objc2-foundation/Foundation_NSError"] +Photos_PHProject = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +Photos_PHProjectChangeRequest = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSEnumerator", + "objc2-foundation/Foundation_NSString", +] +Photos_PhotosTypes = [] +all = [ + "Photos_PHAdjustmentData", + "Photos_PHAsset", + "Photos_PHAssetChangeRequest", + "Photos_PHAssetCollectionChangeRequest", + "Photos_PHAssetCreationRequest", + "Photos_PHAssetResource", + "Photos_PHAssetResourceManager", + "Photos_PHChange", + "Photos_PHChangeRequest", + "Photos_PHCloudIdentifier", + "Photos_PHCollection", + "Photos_PHCollectionListChangeRequest", + "Photos_PHContentEditingInput", + "Photos_PHContentEditingOutput", + "Photos_PHError", + "Photos_PHFetchOptions", + "Photos_PHFetchResult", + "Photos_PHImageManager", + "Photos_PHLivePhoto", + "Photos_PHLivePhotoEditingContext", + "Photos_PHObject", + "Photos_PHPersistentChange", + "Photos_PHPersistentChangeFetchResult", + "Photos_PHPersistentChangeToken", + "Photos_PHPersistentObjectChangeDetails", + "Photos_PHPhotoLibrary", + "Photos_PHProject", + "Photos_PHProjectChangeRequest", + "Photos_PhotosTypes", + "block2", + "objc2-app-kit", + "objc2-core-location", + "objc2-uniform-type-identifiers", +] diff --git a/framework-crates/objc2-photos/README.md b/framework-crates/objc2-photos/README.md new file mode 100644 index 000000000..efc324971 --- /dev/null +++ b/framework-crates/objc2-photos/README.md @@ -0,0 +1,14 @@ +# `objc2-photos` + +[![Latest version](https://badgen.net/crates/v/objc2-photos)](https://crates.io/crates/objc2-photos) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-photos/badge.svg)](https://docs.rs/objc2-photos/) +[![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 Photos. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-photos/) 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-photos/src/generated b/framework-crates/objc2-photos/src/generated new file mode 120000 index 000000000..92c3876c6 --- /dev/null +++ b/framework-crates/objc2-photos/src/generated @@ -0,0 +1 @@ +../../../generated/Photos \ No newline at end of file diff --git a/framework-crates/objc2-photos/src/lib.rs b/framework-crates/objc2-photos/src/lib.rs new file mode 100644 index 000000000..4326c28b7 --- /dev/null +++ b/framework-crates/objc2-photos/src/lib.rs @@ -0,0 +1,23 @@ +//! # Bindings to the `PhotoKit` 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/photos/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +//! +//! This actually lives in the `Photos` framework, but `PhotoKit` is the name +//! that people use to refer to it. +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-photos/0.2.0")] + +#[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-quartz-core/Cargo.modified.toml b/framework-crates/objc2-quartz-core/Cargo.modified.toml new file mode 100644 index 000000000..0a2ce38d1 --- /dev/null +++ b/framework-crates/objc2-quartz-core/Cargo.modified.toml @@ -0,0 +1,2 @@ +[package] +description = "Bindings to the QuartzCore/CoreAnimation framework" diff --git a/framework-crates/objc2-quartz-core/Cargo.toml b/framework-crates/objc2-quartz-core/Cargo.toml new file mode 100644 index 000000000..9a44e11c3 --- /dev/null +++ b/framework-crates/objc2-quartz-core/Cargo.toml @@ -0,0 +1,191 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-quartz-core" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the QuartzCore/CoreAnimation framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +QuartzCore_CAAnimation = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +QuartzCore_CABase = [] +QuartzCore_CAConstraintLayoutManager = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CADisplayLink = [ + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSRunLoop", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAEDRMetadata = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", +] +QuartzCore_CAEmitterCell = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAEmitterLayer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAFrameRateRange = [] +QuartzCore_CAGradientLayer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +QuartzCore_CALayer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNull", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAMediaTiming = ["objc2-foundation/Foundation_NSString"] +QuartzCore_CAMediaTimingFunction = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAMetalDisplayLink = [ + "objc2-foundation/Foundation_NSObjCRuntime", + "objc2-foundation/Foundation_NSRunLoop", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAMetalLayer = [] +QuartzCore_CAOpenGLLayer = [] +QuartzCore_CARemoteLayerClient = [] +QuartzCore_CARemoteLayerServer = [] +QuartzCore_CARenderer = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAReplicatorLayer = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +QuartzCore_CAScrollLayer = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CAShapeLayer = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +QuartzCore_CATextLayer = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CATiledLayer = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +QuartzCore_CATransaction = ["objc2-foundation/Foundation_NSString"] +QuartzCore_CATransform3D = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSValue", +] +QuartzCore_CATransformLayer = ["objc2-foundation/Foundation_NSObject"] +QuartzCore_CAValueFunction = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +QuartzCore_CoreAnimation = [] +QuartzCore_CoreImage = [] +QuartzCore_CoreVideo = [] +all = [ + "QuartzCore_CAAnimation", + "QuartzCore_CABase", + "QuartzCore_CAConstraintLayoutManager", + "QuartzCore_CADisplayLink", + "QuartzCore_CAEDRMetadata", + "QuartzCore_CAEmitterCell", + "QuartzCore_CAEmitterLayer", + "QuartzCore_CAFrameRateRange", + "QuartzCore_CAGradientLayer", + "QuartzCore_CALayer", + "QuartzCore_CAMediaTiming", + "QuartzCore_CAMediaTimingFunction", + "QuartzCore_CAMetalDisplayLink", + "QuartzCore_CAMetalLayer", + "QuartzCore_CAOpenGLLayer", + "QuartzCore_CARemoteLayerClient", + "QuartzCore_CARemoteLayerServer", + "QuartzCore_CARenderer", + "QuartzCore_CAReplicatorLayer", + "QuartzCore_CAScrollLayer", + "QuartzCore_CAShapeLayer", + "QuartzCore_CATextLayer", + "QuartzCore_CATiledLayer", + "QuartzCore_CATransaction", + "QuartzCore_CATransform3D", + "QuartzCore_CATransformLayer", + "QuartzCore_CAValueFunction", + "QuartzCore_CoreAnimation", + "QuartzCore_CoreImage", + "QuartzCore_CoreVideo", + "block2", +] diff --git a/framework-crates/objc2-quartz-core/README.md b/framework-crates/objc2-quartz-core/README.md new file mode 100644 index 000000000..c2d7d2473 --- /dev/null +++ b/framework-crates/objc2-quartz-core/README.md @@ -0,0 +1,14 @@ +# `objc2-quartz-core` + +[![Latest version](https://badgen.net/crates/v/objc2-quartz-core)](https://crates.io/crates/objc2-quartz-core) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-quartz-core/badge.svg)](https://docs.rs/objc2-quartz-core/) +[![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 QuartzCore. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-quartz-core/) 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-quartz-core/src/generated b/framework-crates/objc2-quartz-core/src/generated new file mode 120000 index 000000000..80147ec86 --- /dev/null +++ b/framework-crates/objc2-quartz-core/src/generated @@ -0,0 +1 @@ +../../../generated/QuartzCore \ No newline at end of file diff --git a/framework-crates/objc2-quartz-core/src/lib.rs b/framework-crates/objc2-quartz-core/src/lib.rs new file mode 100644 index 000000000..8c5df4feb --- /dev/null +++ b/framework-crates/objc2-quartz-core/src/lib.rs @@ -0,0 +1,28 @@ +//! # Bindings to the `CoreAnimation` 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/quartzcore/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +//! +//! This actually lives in the `QuartzCore` framework, but `CoreAnimation` is +//! the name that people use to refer to it. +#![recursion_limit = "256"] +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-quartz-core/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; + +// CoreFoundation +#[allow(dead_code)] +pub(crate) type CFTimeInterval = std::os::raw::c_double; diff --git a/framework-crates/objc2-service-management/Cargo.toml b/framework-crates/objc2-service-management/Cargo.toml new file mode 100644 index 000000000..0e8dff7e6 --- /dev/null +++ b/framework-crates/objc2-service-management/Cargo.toml @@ -0,0 +1,60 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-service-management" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the ServiceManagement framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +ServiceManagement_SMAppService = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +ServiceManagement_SMErrors = [] +ServiceManagement_SMLoginItem = [] +all = [ + "ServiceManagement_SMAppService", + "ServiceManagement_SMErrors", + "ServiceManagement_SMLoginItem", + "block2", +] diff --git a/framework-crates/objc2-service-management/README.md b/framework-crates/objc2-service-management/README.md new file mode 100644 index 000000000..0badc3817 --- /dev/null +++ b/framework-crates/objc2-service-management/README.md @@ -0,0 +1,14 @@ +# `objc2-service-management` + +[![Latest version](https://badgen.net/crates/v/objc2-service-management)](https://crates.io/crates/objc2-service-management) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-service-management/badge.svg)](https://docs.rs/objc2-service-management/) +[![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 ServiceManagement. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-service-management/) 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-service-management/src/generated b/framework-crates/objc2-service-management/src/generated new file mode 120000 index 000000000..3c3a4a14b --- /dev/null +++ b/framework-crates/objc2-service-management/src/generated @@ -0,0 +1 @@ +../../../generated/ServiceManagement \ No newline at end of file diff --git a/framework-crates/objc2-service-management/src/lib.rs b/framework-crates/objc2-service-management/src/lib.rs new file mode 100644 index 000000000..14b6e02bb --- /dev/null +++ b/framework-crates/objc2-service-management/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `ServiceManagement` 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/servicemanagement/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-service-management/0.2.0")] + +#[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-sound-analysis/Cargo.toml b/framework-crates/objc2-sound-analysis/Cargo.toml new file mode 100644 index 000000000..1ab1a8553 --- /dev/null +++ b/framework-crates/objc2-sound-analysis/Cargo.toml @@ -0,0 +1,84 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-sound-analysis" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the SoundAnalysis framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +SoundAnalysis_SNAnalyzer = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURL", +] +SoundAnalysis_SNClassificationResult = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +SoundAnalysis_SNClassifySoundRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +SoundAnalysis_SNDefines = [] +SoundAnalysis_SNError = ["objc2-foundation/Foundation_NSString"] +SoundAnalysis_SNRequest = [] +SoundAnalysis_SNResult = ["objc2-foundation/Foundation_NSError"] +SoundAnalysis_SNTimeDurationConstraint = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSValue", +] +SoundAnalysis_SNTypes = ["objc2-foundation/Foundation_NSString"] +all = [ + "SoundAnalysis_SNAnalyzer", + "SoundAnalysis_SNClassificationResult", + "SoundAnalysis_SNClassifySoundRequest", + "SoundAnalysis_SNDefines", + "SoundAnalysis_SNError", + "SoundAnalysis_SNRequest", + "SoundAnalysis_SNResult", + "SoundAnalysis_SNTimeDurationConstraint", + "SoundAnalysis_SNTypes", + "block2", +] diff --git a/framework-crates/objc2-sound-analysis/README.md b/framework-crates/objc2-sound-analysis/README.md new file mode 100644 index 000000000..52ffb4805 --- /dev/null +++ b/framework-crates/objc2-sound-analysis/README.md @@ -0,0 +1,14 @@ +# `objc2-sound-analysis` + +[![Latest version](https://badgen.net/crates/v/objc2-sound-analysis)](https://crates.io/crates/objc2-sound-analysis) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-sound-analysis/badge.svg)](https://docs.rs/objc2-sound-analysis/) +[![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 SoundAnalysis. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-sound-analysis/) 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-sound-analysis/src/generated b/framework-crates/objc2-sound-analysis/src/generated new file mode 120000 index 000000000..6e8c2c31f --- /dev/null +++ b/framework-crates/objc2-sound-analysis/src/generated @@ -0,0 +1 @@ +../../../generated/SoundAnalysis \ No newline at end of file diff --git a/framework-crates/objc2-sound-analysis/src/lib.rs b/framework-crates/objc2-sound-analysis/src/lib.rs new file mode 100644 index 000000000..36fe25af2 --- /dev/null +++ b/framework-crates/objc2-sound-analysis/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `SoundAnalysis` 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/soundanalysis/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-sound-analysis/0.2.0")] + +#[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-speech/Cargo.toml b/framework-crates/objc2-speech/Cargo.toml new file mode 100644 index 000000000..3ac21447e --- /dev/null +++ b/framework-crates/objc2-speech/Cargo.toml @@ -0,0 +1,112 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-speech" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the Speech framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +Speech_SFErrors = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +Speech_SFSpeechLanguageModel = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Speech_SFSpeechRecognitionMetadata = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +Speech_SFSpeechRecognitionRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +Speech_SFSpeechRecognitionResult = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", +] +Speech_SFSpeechRecognitionTask = ["objc2-foundation/Foundation_NSError"] +Speech_SFSpeechRecognitionTaskHint = [] +Speech_SFSpeechRecognizer = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSOperation", + "objc2-foundation/Foundation_NSSet", +] +Speech_SFTranscription = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +Speech_SFTranscriptionSegment = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSRange", + "objc2-foundation/Foundation_NSString", +] +Speech_SFVoiceAnalytics = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSValue", +] +all = [ + "Speech_SFErrors", + "Speech_SFSpeechLanguageModel", + "Speech_SFSpeechRecognitionMetadata", + "Speech_SFSpeechRecognitionRequest", + "Speech_SFSpeechRecognitionResult", + "Speech_SFSpeechRecognitionTask", + "Speech_SFSpeechRecognitionTaskHint", + "Speech_SFSpeechRecognizer", + "Speech_SFTranscription", + "Speech_SFTranscriptionSegment", + "Speech_SFVoiceAnalytics", + "block2", +] diff --git a/framework-crates/objc2-speech/README.md b/framework-crates/objc2-speech/README.md new file mode 100644 index 000000000..1063a4d80 --- /dev/null +++ b/framework-crates/objc2-speech/README.md @@ -0,0 +1,14 @@ +# `objc2-speech` + +[![Latest version](https://badgen.net/crates/v/objc2-speech)](https://crates.io/crates/objc2-speech) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-speech/badge.svg)](https://docs.rs/objc2-speech/) +[![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 Speech. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-speech/) 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-speech/src/generated b/framework-crates/objc2-speech/src/generated new file mode 120000 index 000000000..fbb2a8331 --- /dev/null +++ b/framework-crates/objc2-speech/src/generated @@ -0,0 +1 @@ +../../../generated/Speech \ No newline at end of file diff --git a/framework-crates/objc2-speech/src/lib.rs b/framework-crates/objc2-speech/src/lib.rs new file mode 100644 index 000000000..10c76068f --- /dev/null +++ b/framework-crates/objc2-speech/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `Speech` 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/speech/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-speech/0.2.0")] + +#[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-store-kit/Cargo.toml b/framework-crates/objc2-store-kit/Cargo.toml new file mode 100644 index 000000000..964d3a961 --- /dev/null +++ b/framework-crates/objc2-store-kit/Cargo.toml @@ -0,0 +1,190 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-store-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the StoreKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +StoreKit_SKANError = ["objc2-foundation/Foundation_NSString"] +StoreKit_SKAdImpression = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +StoreKit_SKAdNetwork = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKArcadeService = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", +] +StoreKit_SKCloudServiceController = [ + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKCloudServiceSetupViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKDownload = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +StoreKit_SKError = ["objc2-foundation/Foundation_NSString"] +StoreKit_SKOverlay = ["objc2-foundation/Foundation_NSError"] +StoreKit_SKOverlayConfiguration = ["objc2-foundation/Foundation_NSString"] +StoreKit_SKOverlayTransitionContext = ["objc2-foundation/Foundation_NSGeometry"] +StoreKit_SKPayment = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKPaymentDiscount = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", + "objc2-foundation/Foundation_NSValue", +] +StoreKit_SKPaymentQueue = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKPaymentTransaction = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKProduct = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDecimalNumber", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +StoreKit_SKProductDiscount = [ + "objc2-foundation/Foundation_NSDecimalNumber", + "objc2-foundation/Foundation_NSLocale", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +StoreKit_SKProductStorePromotionController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", +] +StoreKit_SKProductsRequest = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKReceiptRefreshRequest = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKRequest = ["objc2-foundation/Foundation_NSError"] +StoreKit_SKStoreProductViewController = [ + "objc2-app-kit?/AppKit_NSKeyValueBinding", + "objc2-app-kit?/AppKit_NSNib", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSStoryboardSegue", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSViewController", + "objc2-foundation/Foundation_NSBundle", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +StoreKit_SKStoreReviewController = [] +StoreKit_SKStorefront = ["objc2-foundation/Foundation_NSString"] +StoreKit_StoreKitDefines = [] +all = [ + "StoreKit_SKANError", + "StoreKit_SKAdImpression", + "StoreKit_SKAdNetwork", + "StoreKit_SKArcadeService", + "StoreKit_SKCloudServiceController", + "StoreKit_SKCloudServiceSetupViewController", + "StoreKit_SKDownload", + "StoreKit_SKError", + "StoreKit_SKOverlay", + "StoreKit_SKOverlayConfiguration", + "StoreKit_SKOverlayTransitionContext", + "StoreKit_SKPayment", + "StoreKit_SKPaymentDiscount", + "StoreKit_SKPaymentQueue", + "StoreKit_SKPaymentTransaction", + "StoreKit_SKProduct", + "StoreKit_SKProductDiscount", + "StoreKit_SKProductStorePromotionController", + "StoreKit_SKProductsRequest", + "StoreKit_SKReceiptRefreshRequest", + "StoreKit_SKRequest", + "StoreKit_SKStoreProductViewController", + "StoreKit_SKStoreReviewController", + "StoreKit_SKStorefront", + "StoreKit_StoreKitDefines", + "block2", + "objc2-app-kit", +] diff --git a/framework-crates/objc2-store-kit/README.md b/framework-crates/objc2-store-kit/README.md new file mode 100644 index 000000000..7e9a877d1 --- /dev/null +++ b/framework-crates/objc2-store-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-store-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-store-kit)](https://crates.io/crates/objc2-store-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-store-kit/badge.svg)](https://docs.rs/objc2-store-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 StoreKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-store-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-store-kit/src/generated b/framework-crates/objc2-store-kit/src/generated new file mode 120000 index 000000000..d2ae1674b --- /dev/null +++ b/framework-crates/objc2-store-kit/src/generated @@ -0,0 +1 @@ +../../../generated/StoreKit \ No newline at end of file diff --git a/framework-crates/objc2-store-kit/src/lib.rs b/framework-crates/objc2-store-kit/src/lib.rs new file mode 100644 index 000000000..36847c756 --- /dev/null +++ b/framework-crates/objc2-store-kit/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `StoreKit` 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/storekit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-store-kit/0.2.0")] + +#[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-uniform-type-identifiers/Cargo.toml b/framework-crates/objc2-uniform-type-identifiers/Cargo.toml new file mode 100644 index 000000000..ec2721463 --- /dev/null +++ b/framework-crates/objc2-uniform-type-identifiers/Cargo.toml @@ -0,0 +1,83 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-uniform-type-identifiers" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the UniformTypeIdentifiers framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] + +UniformTypeIdentifiers_NSItemProvider_UTType = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSItemProvider", + "objc2-foundation/Foundation_NSProgress", + "objc2-foundation/Foundation_NSURL", +] +UniformTypeIdentifiers_UTAdditions = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +UniformTypeIdentifiers_UTCoreTypes = [] +UniformTypeIdentifiers_UTDefines = [] +UniformTypeIdentifiers_UTTagClass = ["objc2-foundation/Foundation_NSString"] +UniformTypeIdentifiers_UTType = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSValue", +] +all = [ + "UniformTypeIdentifiers_NSItemProvider_UTType", + "UniformTypeIdentifiers_UTAdditions", + "UniformTypeIdentifiers_UTCoreTypes", + "UniformTypeIdentifiers_UTDefines", + "UniformTypeIdentifiers_UTTagClass", + "UniformTypeIdentifiers_UTType", + "block2", +] diff --git a/framework-crates/objc2-uniform-type-identifiers/README.md b/framework-crates/objc2-uniform-type-identifiers/README.md new file mode 100644 index 000000000..1e5b23e56 --- /dev/null +++ b/framework-crates/objc2-uniform-type-identifiers/README.md @@ -0,0 +1,14 @@ +# `objc2-uniform-type-identifiers` + +[![Latest version](https://badgen.net/crates/v/objc2-uniform-type-identifiers)](https://crates.io/crates/objc2-uniform-type-identifiers) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-uniform-type-identifiers/badge.svg)](https://docs.rs/objc2-uniform-type-identifiers/) +[![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 UniformTypeIdentifiers. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-uniform-type-identifiers/) 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-uniform-type-identifiers/src/generated b/framework-crates/objc2-uniform-type-identifiers/src/generated new file mode 120000 index 000000000..94c6e999a --- /dev/null +++ b/framework-crates/objc2-uniform-type-identifiers/src/generated @@ -0,0 +1 @@ +../../../generated/UniformTypeIdentifiers \ No newline at end of file diff --git a/framework-crates/objc2-uniform-type-identifiers/src/lib.rs b/framework-crates/objc2-uniform-type-identifiers/src/lib.rs new file mode 100644 index 000000000..715df6422 --- /dev/null +++ b/framework-crates/objc2-uniform-type-identifiers/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `UniformTypeIdentifiers` 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/uniformtypeidentifiers/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-uniform-type-identifiers/0.2.0")] + +#[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-user-notifications/Cargo.toml b/framework-crates/objc2-user-notifications/Cargo.toml new file mode 100644 index 000000000..c82fb64b3 --- /dev/null +++ b/framework-crates/objc2-user-notifications/Cargo.toml @@ -0,0 +1,134 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-user-notifications" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the UserNotifications framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-tvos", + "aarch64-apple-watchos", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-core-location = ["dep:objc2-core-location"] + +UserNotifications_NSString_UserNotifications = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNError = ["objc2-foundation/Foundation_NSString"] +UserNotifications_UNNotification = [ + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +UserNotifications_UNNotificationAction = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNNotificationActionIcon = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNNotificationAttachment = [ + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +UserNotifications_UNNotificationCategory = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNNotificationContent = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSValue", +] +UserNotifications_UNNotificationRequest = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNNotificationResponse = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNNotificationServiceExtension = [] +UserNotifications_UNNotificationSettings = ["objc2-foundation/Foundation_NSObject"] +UserNotifications_UNNotificationSound = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +UserNotifications_UNNotificationTrigger = [ + "objc2-core-location?/CoreLocation_CLRegion", + "objc2-foundation/Foundation_NSCalendar", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", +] +UserNotifications_UNUserNotificationCenter = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +all = [ + "UserNotifications_NSString_UserNotifications", + "UserNotifications_UNError", + "UserNotifications_UNNotification", + "UserNotifications_UNNotificationAction", + "UserNotifications_UNNotificationActionIcon", + "UserNotifications_UNNotificationAttachment", + "UserNotifications_UNNotificationCategory", + "UserNotifications_UNNotificationContent", + "UserNotifications_UNNotificationRequest", + "UserNotifications_UNNotificationResponse", + "UserNotifications_UNNotificationServiceExtension", + "UserNotifications_UNNotificationSettings", + "UserNotifications_UNNotificationSound", + "UserNotifications_UNNotificationTrigger", + "UserNotifications_UNUserNotificationCenter", + "block2", + "objc2-core-location", +] diff --git a/framework-crates/objc2-user-notifications/README.md b/framework-crates/objc2-user-notifications/README.md new file mode 100644 index 000000000..af2eb8a86 --- /dev/null +++ b/framework-crates/objc2-user-notifications/README.md @@ -0,0 +1,14 @@ +# `objc2-user-notifications` + +[![Latest version](https://badgen.net/crates/v/objc2-user-notifications)](https://crates.io/crates/objc2-user-notifications) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-user-notifications/badge.svg)](https://docs.rs/objc2-user-notifications/) +[![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 UserNotifications. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-user-notifications/) 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-user-notifications/src/generated b/framework-crates/objc2-user-notifications/src/generated new file mode 120000 index 000000000..9d7838005 --- /dev/null +++ b/framework-crates/objc2-user-notifications/src/generated @@ -0,0 +1 @@ +../../../generated/UserNotifications \ No newline at end of file diff --git a/framework-crates/objc2-user-notifications/src/lib.rs b/framework-crates/objc2-user-notifications/src/lib.rs new file mode 100644 index 000000000..4c833f8b4 --- /dev/null +++ b/framework-crates/objc2-user-notifications/src/lib.rs @@ -0,0 +1,20 @@ +//! # Bindings to the `UserNotifications` 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/usernotifications/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-user-notifications/0.2.0")] + +#[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-web-kit/Cargo.modified.toml b/framework-crates/objc2-web-kit/Cargo.modified.toml new file mode 100644 index 000000000..82e7b2bea --- /dev/null +++ b/framework-crates/objc2-web-kit/Cargo.modified.toml @@ -0,0 +1,32 @@ +[[example]] +name = "browser" +required-features = [ + "objc2-app-kit", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSView", + "objc2-app-kit/AppKit_NSColor", + "objc2-app-kit/AppKit_NSButton", + "objc2-app-kit/AppKit_NSButtonCell", + "objc2-app-kit/AppKit_NSMenu", + "objc2-app-kit/AppKit_NSMenuItem", + "objc2-app-kit/AppKit_NSStackView", + "objc2-app-kit/AppKit_NSText", + "objc2-app-kit/AppKit_NSTextField", + "objc2-app-kit/AppKit_NSTextView", + "objc2-app-kit/AppKit_NSWindow", + "objc2-app-kit/AppKit_NSControl", + "objc2-app-kit/AppKit_NSApplication", + "objc2-app-kit/AppKit_NSRunningApplication", + "objc2-app-kit/AppKit_NSGraphics", + "objc2-app-kit/AppKit_NSLayoutConstraint", + "objc2-app-kit/AppKit_NSUserInterfaceLayout", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSThread", + "WebKit_WKNavigation", + "WebKit_WKNavigationDelegate", + "WebKit_WKWebView", +] diff --git a/framework-crates/objc2-web-kit/Cargo.toml b/framework-crates/objc2-web-kit/Cargo.toml new file mode 100644 index 000000000..6abdce78c --- /dev/null +++ b/framework-crates/objc2-web-kit/Cargo.toml @@ -0,0 +1,1024 @@ +# This file has been automatically generated by `objc2`'s `header-translator`. +# DO NOT EDIT + +[package] +name = "objc2-web-kit" +version = "0.2.0" # Remember to update html_root_url in lib.rs +description = "Bindings to the WebKit framework" +edition = "2021" +rust-version = "1.60" +keywords = ["cocoa", "apple", "framework", "macos", "ios"] +categories = [ + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +repository = "https://github.com/madsmtm/objc2" +license = "MIT" + +[lints] +workspace = true + +[dependencies] +objc2 = { path = "../../crates/objc2", version = "0.5.0", default-features = false, features = ["apple"] } +block2 = { path = "../../crates/block2", version = "0.4.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } + +[package.metadata.docs.rs] +default-target = "aarch64-apple-darwin" +features = ["all", "unstable-docsrs"] +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-macabi", +] + +[features] +default = ["std"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2/std"] +alloc = ["objc2/alloc"] + +# For better documentation on docs.rs +unstable-docsrs = [] +block2 = ["dep:block2"] +objc2-app-kit = ["dep:objc2-app-kit"] + +WebKit_DOM = [] +WebKit_DOMAbstractView = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMAttr = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMBlob = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCDATASection = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCSS = ["objc2-foundation/Foundation_NSString"] +WebKit_DOMCSSCharsetRule = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSFontFaceRule = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCSSImportRule = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSMediaRule = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSPageRule = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSPrimitiveValue = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSRule = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSRuleList = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCSSStyleDeclaration = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSStyleRule = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSStyleSheet = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSUnknownRule = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCSSValue = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMCSSValueList = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCharacterData = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMComment = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMCore = [] +WebKit_DOMCounter = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMDocument = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMDocumentFragment = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMDocumentType = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMEntity = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMEntityReference = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMEventException = ["objc2-foundation/Foundation_NSString"] +WebKit_DOMEventListener = [] +WebKit_DOMEventTarget = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMEvents = [] +WebKit_DOMException = ["objc2-foundation/Foundation_NSString"] +WebKit_DOMExtensions = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMFile = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMFileList = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTML = [] +WebKit_DOMHTMLAnchorElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMHTMLAppletElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLAreaElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMHTMLBRElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLBaseElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLBaseFontElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLBodyElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLButtonElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLCollection = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLDListElement = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTMLDirectoryElement = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTMLDivElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLDocument = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLEmbedElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLFieldSetElement = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTMLFontElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLFormElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLFrameElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLFrameSetElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLHRElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLHeadElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLHeadingElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLHtmlElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLIFrameElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLImageElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMHTMLInputElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMHTMLLIElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLLabelElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLLegendElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLLinkElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMHTMLMapElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLMarqueeElement = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTMLMenuElement = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTMLMetaElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLModElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLOListElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLObjectElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_DOMHTMLOptGroupElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLOptionElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLOptionsCollection = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLParagraphElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLParamElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLPreElement = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMHTMLQuoteElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLScriptElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLSelectElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLStyleElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTableCaptionElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTableCellElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTableColElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTableElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTableRowElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTableSectionElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTextAreaElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLTitleElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMHTMLUListElement = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMImplementation = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMKeyboardEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMMediaList = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMMouseEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMMutationEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMNamedNodeMap = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMNode = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMNodeFilter = [] +WebKit_DOMNodeIterator = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMNodeList = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMObject = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMOverflowEvent = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMProcessingInstruction = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMProgressEvent = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMRGBColor = [ + "objc2-app-kit?/AppKit_NSColor", + "objc2-foundation/Foundation_NSObject", +] +WebKit_DOMRange = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMRangeException = ["objc2-foundation/Foundation_NSString"] +WebKit_DOMRanges = [] +WebKit_DOMRect = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMStyleSheet = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMStyleSheetList = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMStylesheets = [] +WebKit_DOMText = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMTraversal = [] +WebKit_DOMTreeWalker = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMUIEvent = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_DOMViews = [] +WebKit_DOMWheelEvent = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMXPath = [] +WebKit_DOMXPathException = ["objc2-foundation/Foundation_NSString"] +WebKit_DOMXPathExpression = ["objc2-foundation/Foundation_NSObject"] +WebKit_DOMXPathNSResolver = ["objc2-foundation/Foundation_NSString"] +WebKit_DOMXPathResult = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_NSAttributedString = [ + "objc2-app-kit?/AppKit_NSAttributedString", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WKBackForwardList = ["objc2-foundation/Foundation_NSArray"] +WebKit_WKBackForwardListItem = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WKContentRuleList = ["objc2-foundation/Foundation_NSString"] +WebKit_WKContentRuleListStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WKContentWorld = ["objc2-foundation/Foundation_NSString"] +WebKit_WKContextMenuElementInfo = [] +WebKit_WKDataDetectorTypes = [] +WebKit_WKDownload = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSProgress", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WKDownloadDelegate = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLAuthenticationChallenge", + "objc2-foundation/Foundation_NSURLCredential", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSURLResponse", + "objc2-foundation/Foundation_NSURLSession", +] +WebKit_WKError = ["objc2-foundation/Foundation_NSString"] +WebKit_WKFindConfiguration = ["objc2-foundation/Foundation_NSObject"] +WebKit_WKFindResult = ["objc2-foundation/Foundation_NSObject"] +WebKit_WKFoundation = [] +WebKit_WKFrameInfo = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WKHTTPCookieStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSHTTPCookie", +] +WebKit_WKNavigation = [] +WebKit_WKNavigationAction = [ + "objc2-app-kit?/AppKit_NSEvent", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WKNavigationDelegate = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURLAuthenticationChallenge", + "objc2-foundation/Foundation_NSURLCredential", + "objc2-foundation/Foundation_NSURLSession", +] +WebKit_WKNavigationResponse = ["objc2-foundation/Foundation_NSURLResponse"] +WebKit_WKOpenPanelParameters = [] +WebKit_WKPDFConfiguration = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +WebKit_WKPreferences = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +WebKit_WKPreviewActionItem = [] +WebKit_WKPreviewActionItemIdentifiers = [] +WebKit_WKPreviewElementInfo = [] +WebKit_WKProcessPool = ["objc2-foundation/Foundation_NSObject"] +WebKit_WKScriptMessage = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSString", +] +WebKit_WKScriptMessageHandler = [] +WebKit_WKScriptMessageHandlerWithReply = ["objc2-foundation/Foundation_NSString"] +WebKit_WKSecurityOrigin = ["objc2-foundation/Foundation_NSString"] +WebKit_WKSnapshotConfiguration = [ + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSValue", +] +WebKit_WKUIDelegate = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WKURLSchemeHandler = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", +] +WebKit_WKURLSchemeTask = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSURLResponse", +] +WebKit_WKUserContentController = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_WKUserScript = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_WKWebView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSColor", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSImage", + "objc2-app-kit?/AppKit_NSPrintInfo", + "objc2-app-kit?/AppKit_NSPrintOperation", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSTextFinder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSUserInterfaceValidation", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSURLResponse", +] +WebKit_WKWebViewConfiguration = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_WKWebpagePreferences = [] +WebKit_WKWebsiteDataRecord = [ + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", +] +WebKit_WKWebsiteDataStore = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSSet", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUUID", +] +WebKit_WKWindowFeatures = ["objc2-foundation/Foundation_NSValue"] +WebKit_WebArchive = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_WebBackForwardList = ["objc2-foundation/Foundation_NSArray"] +WebKit_WebDOMOperations = [ + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WebDataSource = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSURLResponse", +] +WebKit_WebDocument = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSAttributedString", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", +] +WebKit_WebDownload = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLDownload", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WebEditingDelegate = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSTextView", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSUndoManager", +] +WebKit_WebFrame = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WebFrameLoadDelegate = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WebFrameView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSPrintInfo", + "objc2-app-kit?/AppKit_NSPrintOperation", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", +] +WebKit_WebHistory = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCalendarDate", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WebHistoryItem = [ + "objc2-app-kit?/AppKit_NSImage", + "objc2-foundation/Foundation_NSDate", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_WebKitAvailability = [] +WebKit_WebKitErrors = ["objc2-foundation/Foundation_NSString"] +WebKit_WebKitLegacy = [] +WebKit_WebPlugin = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURLResponse", +] +WebKit_WebPluginContainer = [ + "objc2-app-kit?/AppKit_NSColor", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WebPluginViewFactory = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSString", +] +WebKit_WebPolicyDelegate = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WebPreferences = [ + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WebResource = [ + "objc2-foundation/Foundation_NSData", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", +] +WebKit_WebResourceLoadDelegate = [ + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSError", + "objc2-foundation/Foundation_NSURLAuthenticationChallenge", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSURLResponse", +] +WebKit_WebScriptObject = [ + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", +] +WebKit_WebUIDelegate = [ + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSPasteboard", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSUserInterfaceValidation", + "objc2-app-kit?/AppKit_NSView", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURLRequest", +] +WebKit_WebView = [ + "objc2-app-kit?/AppKit_NSAccessibilityProtocols", + "objc2-app-kit?/AppKit_NSAnimation", + "objc2-app-kit?/AppKit_NSAppearance", + "objc2-app-kit?/AppKit_NSDragging", + "objc2-app-kit?/AppKit_NSImage", + "objc2-app-kit?/AppKit_NSPasteboard", + "objc2-app-kit?/AppKit_NSResponder", + "objc2-app-kit?/AppKit_NSTextView", + "objc2-app-kit?/AppKit_NSUserInterfaceItemIdentification", + "objc2-app-kit?/AppKit_NSUserInterfaceValidation", + "objc2-app-kit?/AppKit_NSView", + "objc2-app-kit?/AppKit_NSWindow", + "objc2-foundation/Foundation_NSArray", + "objc2-foundation/Foundation_NSCoder", + "objc2-foundation/Foundation_NSDictionary", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSObject", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLDownload", + "objc2-foundation/Foundation_NSUndoManager", +] +all = [ + "WebKit_DOM", + "WebKit_DOMAbstractView", + "WebKit_DOMAttr", + "WebKit_DOMBlob", + "WebKit_DOMCDATASection", + "WebKit_DOMCSS", + "WebKit_DOMCSSCharsetRule", + "WebKit_DOMCSSFontFaceRule", + "WebKit_DOMCSSImportRule", + "WebKit_DOMCSSMediaRule", + "WebKit_DOMCSSPageRule", + "WebKit_DOMCSSPrimitiveValue", + "WebKit_DOMCSSRule", + "WebKit_DOMCSSRuleList", + "WebKit_DOMCSSStyleDeclaration", + "WebKit_DOMCSSStyleRule", + "WebKit_DOMCSSStyleSheet", + "WebKit_DOMCSSUnknownRule", + "WebKit_DOMCSSValue", + "WebKit_DOMCSSValueList", + "WebKit_DOMCharacterData", + "WebKit_DOMComment", + "WebKit_DOMCore", + "WebKit_DOMCounter", + "WebKit_DOMDocument", + "WebKit_DOMDocumentFragment", + "WebKit_DOMDocumentType", + "WebKit_DOMElement", + "WebKit_DOMEntity", + "WebKit_DOMEntityReference", + "WebKit_DOMEvent", + "WebKit_DOMEventException", + "WebKit_DOMEventListener", + "WebKit_DOMEventTarget", + "WebKit_DOMEvents", + "WebKit_DOMException", + "WebKit_DOMExtensions", + "WebKit_DOMFile", + "WebKit_DOMFileList", + "WebKit_DOMHTML", + "WebKit_DOMHTMLAnchorElement", + "WebKit_DOMHTMLAppletElement", + "WebKit_DOMHTMLAreaElement", + "WebKit_DOMHTMLBRElement", + "WebKit_DOMHTMLBaseElement", + "WebKit_DOMHTMLBaseFontElement", + "WebKit_DOMHTMLBodyElement", + "WebKit_DOMHTMLButtonElement", + "WebKit_DOMHTMLCollection", + "WebKit_DOMHTMLDListElement", + "WebKit_DOMHTMLDirectoryElement", + "WebKit_DOMHTMLDivElement", + "WebKit_DOMHTMLDocument", + "WebKit_DOMHTMLElement", + "WebKit_DOMHTMLEmbedElement", + "WebKit_DOMHTMLFieldSetElement", + "WebKit_DOMHTMLFontElement", + "WebKit_DOMHTMLFormElement", + "WebKit_DOMHTMLFrameElement", + "WebKit_DOMHTMLFrameSetElement", + "WebKit_DOMHTMLHRElement", + "WebKit_DOMHTMLHeadElement", + "WebKit_DOMHTMLHeadingElement", + "WebKit_DOMHTMLHtmlElement", + "WebKit_DOMHTMLIFrameElement", + "WebKit_DOMHTMLImageElement", + "WebKit_DOMHTMLInputElement", + "WebKit_DOMHTMLLIElement", + "WebKit_DOMHTMLLabelElement", + "WebKit_DOMHTMLLegendElement", + "WebKit_DOMHTMLLinkElement", + "WebKit_DOMHTMLMapElement", + "WebKit_DOMHTMLMarqueeElement", + "WebKit_DOMHTMLMenuElement", + "WebKit_DOMHTMLMetaElement", + "WebKit_DOMHTMLModElement", + "WebKit_DOMHTMLOListElement", + "WebKit_DOMHTMLObjectElement", + "WebKit_DOMHTMLOptGroupElement", + "WebKit_DOMHTMLOptionElement", + "WebKit_DOMHTMLOptionsCollection", + "WebKit_DOMHTMLParagraphElement", + "WebKit_DOMHTMLParamElement", + "WebKit_DOMHTMLPreElement", + "WebKit_DOMHTMLQuoteElement", + "WebKit_DOMHTMLScriptElement", + "WebKit_DOMHTMLSelectElement", + "WebKit_DOMHTMLStyleElement", + "WebKit_DOMHTMLTableCaptionElement", + "WebKit_DOMHTMLTableCellElement", + "WebKit_DOMHTMLTableColElement", + "WebKit_DOMHTMLTableElement", + "WebKit_DOMHTMLTableRowElement", + "WebKit_DOMHTMLTableSectionElement", + "WebKit_DOMHTMLTextAreaElement", + "WebKit_DOMHTMLTitleElement", + "WebKit_DOMHTMLUListElement", + "WebKit_DOMImplementation", + "WebKit_DOMKeyboardEvent", + "WebKit_DOMMediaList", + "WebKit_DOMMouseEvent", + "WebKit_DOMMutationEvent", + "WebKit_DOMNamedNodeMap", + "WebKit_DOMNode", + "WebKit_DOMNodeFilter", + "WebKit_DOMNodeIterator", + "WebKit_DOMNodeList", + "WebKit_DOMObject", + "WebKit_DOMOverflowEvent", + "WebKit_DOMProcessingInstruction", + "WebKit_DOMProgressEvent", + "WebKit_DOMRGBColor", + "WebKit_DOMRange", + "WebKit_DOMRangeException", + "WebKit_DOMRanges", + "WebKit_DOMRect", + "WebKit_DOMStyleSheet", + "WebKit_DOMStyleSheetList", + "WebKit_DOMStylesheets", + "WebKit_DOMText", + "WebKit_DOMTraversal", + "WebKit_DOMTreeWalker", + "WebKit_DOMUIEvent", + "WebKit_DOMViews", + "WebKit_DOMWheelEvent", + "WebKit_DOMXPath", + "WebKit_DOMXPathException", + "WebKit_DOMXPathExpression", + "WebKit_DOMXPathNSResolver", + "WebKit_DOMXPathResult", + "WebKit_NSAttributedString", + "WebKit_WKBackForwardList", + "WebKit_WKBackForwardListItem", + "WebKit_WKContentRuleList", + "WebKit_WKContentRuleListStore", + "WebKit_WKContentWorld", + "WebKit_WKContextMenuElementInfo", + "WebKit_WKDataDetectorTypes", + "WebKit_WKDownload", + "WebKit_WKDownloadDelegate", + "WebKit_WKError", + "WebKit_WKFindConfiguration", + "WebKit_WKFindResult", + "WebKit_WKFoundation", + "WebKit_WKFrameInfo", + "WebKit_WKHTTPCookieStore", + "WebKit_WKNavigation", + "WebKit_WKNavigationAction", + "WebKit_WKNavigationDelegate", + "WebKit_WKNavigationResponse", + "WebKit_WKOpenPanelParameters", + "WebKit_WKPDFConfiguration", + "WebKit_WKPreferences", + "WebKit_WKPreviewActionItem", + "WebKit_WKPreviewActionItemIdentifiers", + "WebKit_WKPreviewElementInfo", + "WebKit_WKProcessPool", + "WebKit_WKScriptMessage", + "WebKit_WKScriptMessageHandler", + "WebKit_WKScriptMessageHandlerWithReply", + "WebKit_WKSecurityOrigin", + "WebKit_WKSnapshotConfiguration", + "WebKit_WKUIDelegate", + "WebKit_WKURLSchemeHandler", + "WebKit_WKURLSchemeTask", + "WebKit_WKUserContentController", + "WebKit_WKUserScript", + "WebKit_WKWebView", + "WebKit_WKWebViewConfiguration", + "WebKit_WKWebpagePreferences", + "WebKit_WKWebsiteDataRecord", + "WebKit_WKWebsiteDataStore", + "WebKit_WKWindowFeatures", + "WebKit_WebArchive", + "WebKit_WebBackForwardList", + "WebKit_WebDOMOperations", + "WebKit_WebDataSource", + "WebKit_WebDocument", + "WebKit_WebDownload", + "WebKit_WebEditingDelegate", + "WebKit_WebFrame", + "WebKit_WebFrameLoadDelegate", + "WebKit_WebFrameView", + "WebKit_WebHistory", + "WebKit_WebHistoryItem", + "WebKit_WebKitAvailability", + "WebKit_WebKitErrors", + "WebKit_WebKitLegacy", + "WebKit_WebPlugin", + "WebKit_WebPluginContainer", + "WebKit_WebPluginViewFactory", + "WebKit_WebPolicyDelegate", + "WebKit_WebPreferences", + "WebKit_WebResource", + "WebKit_WebResourceLoadDelegate", + "WebKit_WebScriptObject", + "WebKit_WebUIDelegate", + "WebKit_WebView", + "block2", + "objc2-app-kit", +] + +[[example]] +name = "browser" +required-features = [ + "objc2-app-kit", + "objc2-app-kit/AppKit_NSResponder", + "objc2-app-kit/AppKit_NSView", + "objc2-app-kit/AppKit_NSColor", + "objc2-app-kit/AppKit_NSButton", + "objc2-app-kit/AppKit_NSButtonCell", + "objc2-app-kit/AppKit_NSMenu", + "objc2-app-kit/AppKit_NSMenuItem", + "objc2-app-kit/AppKit_NSStackView", + "objc2-app-kit/AppKit_NSText", + "objc2-app-kit/AppKit_NSTextField", + "objc2-app-kit/AppKit_NSTextView", + "objc2-app-kit/AppKit_NSWindow", + "objc2-app-kit/AppKit_NSControl", + "objc2-app-kit/AppKit_NSApplication", + "objc2-app-kit/AppKit_NSRunningApplication", + "objc2-app-kit/AppKit_NSGraphics", + "objc2-app-kit/AppKit_NSLayoutConstraint", + "objc2-app-kit/AppKit_NSUserInterfaceLayout", + "objc2-foundation/Foundation_NSString", + "objc2-foundation/Foundation_NSGeometry", + "objc2-foundation/Foundation_NSNotification", + "objc2-foundation/Foundation_NSURL", + "objc2-foundation/Foundation_NSURLRequest", + "objc2-foundation/Foundation_NSThread", + "WebKit_WKNavigation", + "WebKit_WKNavigationDelegate", + "WebKit_WKWebView", +] diff --git a/framework-crates/objc2-web-kit/README.md b/framework-crates/objc2-web-kit/README.md new file mode 100644 index 000000000..40b891285 --- /dev/null +++ b/framework-crates/objc2-web-kit/README.md @@ -0,0 +1,14 @@ +# `objc2-web-kit` + +[![Latest version](https://badgen.net/crates/v/objc2-web-kit)](https://crates.io/crates/objc2-web-kit) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/objc2-web-kit/badge.svg)](https://docs.rs/objc2-web-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 WebKit. + +This README is kept intentionally small to consolidate the documentation, see +[the Rust docs](https://docs.rs/objc2-web-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/crates/icrate/examples/browser.rs b/framework-crates/objc2-web-kit/examples/browser.rs similarity index 94% rename from crates/icrate/examples/browser.rs rename to framework-crates/objc2-web-kit/examples/browser.rs index cb04b4fb5..55f64b463 100644 --- a/crates/icrate/examples/browser.rs +++ b/framework-crates/objc2-web-kit/examples/browser.rs @@ -2,21 +2,6 @@ #![allow(clippy::incompatible_msrv)] use core::cell::OnceCell; -#[allow(deprecated)] -use icrate::{ - AppKit::{ - NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate, NSBackingStoreType, - NSBezelStyle, NSButton, NSColor, NSControl, NSControlTextEditingDelegate, - NSLayoutAttribute, NSMenu, NSMenuItem, NSStackView, NSStackViewDistribution, NSTextField, - NSTextFieldDelegate, NSTextView, NSUserInterfaceLayoutOrientation, NSWindow, - NSWindowStyleMask, - }, - Foundation::{ - ns_string, MainThreadMarker, NSNotification, NSObject, NSObjectProtocol, NSPoint, NSRect, - NSSize, NSURLRequest, NSURL, - }, - WebKit::{WKNavigation, WKNavigationDelegate, WKWebView}, -}; use objc2::{ declare_class, msg_send_id, mutability::MainThreadOnly, @@ -24,6 +9,18 @@ use objc2::{ runtime::{AnyObject, ProtocolObject, Sel}, sel, ClassType, DeclaredClass, }; +#[allow(deprecated)] +use objc2_app_kit::{ + NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate, NSBackingStoreType, + NSBezelStyle, NSButton, NSColor, NSControl, NSControlTextEditingDelegate, NSLayoutAttribute, + NSMenu, NSMenuItem, NSStackView, NSStackViewDistribution, NSTextField, NSTextFieldDelegate, + NSTextView, NSUserInterfaceLayoutOrientation, NSWindow, NSWindowStyleMask, +}; +use objc2_foundation::{ + ns_string, MainThreadMarker, NSNotification, NSObject, NSObjectProtocol, NSPoint, NSRect, + NSSize, NSURLRequest, NSURL, +}; +use objc2_web_kit::{WKNavigation, WKNavigationDelegate, WKWebView}; macro_rules! idcell { ($name:ident => $this:expr) => { diff --git a/framework-crates/objc2-web-kit/src/generated b/framework-crates/objc2-web-kit/src/generated new file mode 120000 index 000000000..f5bdaaccb --- /dev/null +++ b/framework-crates/objc2-web-kit/src/generated @@ -0,0 +1 @@ +../../../generated/WebKit \ No newline at end of file diff --git a/framework-crates/objc2-web-kit/src/lib.rs b/framework-crates/objc2-web-kit/src/lib.rs new file mode 100644 index 000000000..b403667bd --- /dev/null +++ b/framework-crates/objc2-web-kit/src/lib.rs @@ -0,0 +1,40 @@ +//! # Bindings to the `WebKit` 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/webkit/ +//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html +//! +//! +//! ## Example +//! +//! ```ignore +#![doc = include_str!("../examples/browser.rs")] +//! ``` +#![recursion_limit = "512"] +#![allow(non_snake_case)] +#![no_std] +#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/objc2-web-kit/0.2.0")] + +#[cfg(feature = "alloc")] +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + +mod generated; +#[allow(unused_imports, unreachable_pub)] +pub use self::generated::*; + +use objc2::extern_methods; + +extern_methods!( + #[cfg(feature = "WebKit_WKNavigationAction")] + unsafe impl WKNavigationAction { + #[cfg(feature = "WebKit_WKFrameInfo")] + #[method_id(@__retain_semantics Other sourceFrame)] + pub unsafe fn sourceFrame(&self) -> Option>; + } +); diff --git a/generated b/generated new file mode 160000 index 000000000..cf3442835 --- /dev/null +++ b/generated @@ -0,0 +1 @@ +Subproject commit cf3442835f6121edbad2336eae871321cabc83a4