Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

View File

@@ -0,0 +1 @@
{"files":{"Cargo.toml":"7ff9e2ca0d2faabac396a4d21d839197dff1074f3796a5fa84ccb4804e368450","README.md":"2731ca4a6fe0038e55efcefcea98ac2b0b0e1da1231154543c63bc2a46656f69","src/generated/CLAvailability.rs":"c2c9ef4610ebc5c298bce3ce70d3e59d266465eefa07b8337f9e8d06315a7387","src/generated/CLBackgroundActivitySession.rs":"99c9a14b57249d152daeac078a368f2318797d72e0fd6f5def3ffe8414b30b7b","src/generated/CLBeaconIdentityCondition.rs":"ceac4d0bb45d9974e48e31948206ce46ddc747ea8cbc39c891ffe8f6aa65b6bd","src/generated/CLBeaconIdentityConstraint.rs":"52185dfd922528591f625f492cf84d1bc21dd8622c2580166720109acef65d61","src/generated/CLBeaconRegion.rs":"a5682cec761f7b139414f42297c54b0528b6d58d3406f53d5a096847d4386341","src/generated/CLCircularGeographicCondition.rs":"0cea4714b639d9e357956a3214c062c70734bfebeefec1ab990fca7092e5c914","src/generated/CLCircularRegion.rs":"507fc3cd5c8fcfa38463c611d814e78341a27bfedd2989691cdf0f5b12fee887","src/generated/CLCondition.rs":"7c967de9876499f17b04c6481186bceb36090d92e78e20f23f9ac1f993580be0","src/generated/CLError.rs":"072475fda1693407f718e51024bee540589fc01c079c9527341726f9bce4d094","src/generated/CLErrorDomain.rs":"5c38e3c928585c00f203ce21ed5a360636f926aeaae7930076d7a4222de76a7f","src/generated/CLGeocoder.rs":"80218b551232cd7f049dce613e233a0188fbe2e316ff4866621f94ad54e3e478","src/generated/CLHeading.rs":"04955912f39807b3d8f98f4db716998af7399158cc15f183e364310d21289bde","src/generated/CLLocation.rs":"7d0e50e6e82c2343672cd18a907904febab7681823f174a58e0ac3d4a9bb8d03","src/generated/CLLocationManager.rs":"9830ff8691f57db0e842f32c55641dd58060f56834d49d8dbb840df2df15cca6","src/generated/CLLocationManagerDelegate.rs":"aa60aa4771aa9b4893b821eff435111777dd8547654276561c05340bb94b80da","src/generated/CLLocationManager_CLVisitExtensions.rs":"9ea8cc104230ac39d6ebad43c3f78ffe4e3f6fd2c4efc44d1efaa3fe4ef846b3","src/generated/CLLocationPushServiceError.rs":"e0d37074795438505683b6cc01a22d0e80d254bd3d691ed0e63c48ef9432a518","src/generated/CLLocationPushServiceExtension.rs":"7c3e3133a426d43a4cac5a60969d67cbe4681ffafeea1e19543c501cca89848c","src/generated/CLLocationUpdater.rs":"f080ba03a5fca880f0b10af539c0b2dc9896fb082736f41a0f389efffcdd4fdc","src/generated/CLMonitor.rs":"b8defa21f3a3679a9931f42aac5037e739e08d14bda9b8b9759f409f42c258c4","src/generated/CLMonitorConfiguration.rs":"4ee64acaf2f59acedab0ba15875343ea2319a7ed4379cf4066fbc8a592b12326","src/generated/CLMonitoringEvent.rs":"0cc3a6e848756cf45ffbe4b0b07204ecfac25d8063adf6cf296b1ced5bee3881","src/generated/CLMonitoringRecord.rs":"5afcbad5d701700ef52c7450e043bd86b6d9c6226d549d284995406b4ccfe057","src/generated/CLPlacemark.rs":"44630931f289bee5c7dd4cd6aa5d1a50023a41818dcce353a57ac6c7d4e57a5a","src/generated/CLRegion.rs":"415b70529259f86dfc41dfb6d0893a1f1de6f1d605ab8a2c4aa98839771d5b53","src/generated/CLVisit.rs":"f89f2feb36e8e0afe491d964343c36ca934b6e6e00669b4124dbc538ba8560c3","src/generated/mod.rs":"3df8022e1c07daacf030c81bd487526f54c7b79bcd4b31fc8cf91d4ddf9b4687","src/lib.rs":"7673fffa623023d80d17b74028caf9476c8260ee461be4cfe317d1c9f426afa1","translation-config.toml":"46c2d21ad1f60c8f4ee1afc016d0580beb1c6a5db935e8c68c5cdc3d60213017"},"package":"000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"}

228
vendor/objc2-core-location/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,228 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.60"
name = "objc2-core-location"
version = "0.2.2"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Bindings to the CoreLocation framework"
readme = "README.md"
keywords = [
"cocoa",
"apple",
"framework",
"macos",
"ios",
]
categories = [
"api-bindings",
"development-tools::ffi",
"external-ffi-bindings",
"os::macos-apis",
]
license = "MIT"
repository = "https://github.com/madsmtm/objc2"
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["all"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
]
[lib]
name = "objc2_core_location"
path = "src/lib.rs"
[dependencies.block2]
version = "0.5.1"
optional = true
default-features = false
[dependencies.objc2]
version = "0.5.2"
default-features = false
[dependencies.objc2-foundation]
version = "0.2.2"
default-features = false
[features]
CLAvailability = []
CLBackgroundActivitySession = []
CLBeaconIdentityCondition = [
"objc2-foundation/NSObject",
"objc2-foundation/NSUUID",
"objc2-foundation/NSValue",
]
CLBeaconIdentityConstraint = [
"objc2-foundation/NSObject",
"objc2-foundation/NSUUID",
]
CLBeaconRegion = [
"objc2-foundation/NSDate",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSUUID",
"objc2-foundation/NSValue",
]
CLCircularGeographicCondition = ["objc2-foundation/NSObject"]
CLCircularRegion = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CLCondition = ["objc2-foundation/NSObject"]
CLError = ["objc2-foundation/NSString"]
CLErrorDomain = ["objc2-foundation/NSString"]
CLGeocoder = [
"objc2-contacts?/CNPostalAddress",
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSLocale",
"objc2-foundation/NSString",
]
CLHeading = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
CLLocation = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
CLLocationManager = [
"objc2-foundation/NSArray",
"objc2-foundation/NSData",
"objc2-foundation/NSDate",
"objc2-foundation/NSError",
"objc2-foundation/NSSet",
"objc2-foundation/NSString",
]
CLLocationManagerDelegate = [
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
]
CLLocationManager_CLVisitExtensions = []
CLLocationPushServiceError = [
"objc2-foundation/NSError",
"objc2-foundation/NSString",
]
CLLocationPushServiceExtension = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSString",
]
CLLocationUpdater = []
CLMonitor = [
"objc2-foundation/NSArray",
"objc2-foundation/NSString",
]
CLMonitorConfiguration = ["objc2-foundation/NSString"]
CLMonitoringEvent = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CLMonitoringRecord = ["objc2-foundation/NSObject"]
CLPlacemark = [
"objc2-contacts?/CNPostalAddress",
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSTimeZone",
]
CLRegion = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
CLVisit = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
all = [
"CLAvailability",
"CLBackgroundActivitySession",
"CLBeaconIdentityCondition",
"CLBeaconIdentityConstraint",
"CLBeaconRegion",
"CLCircularGeographicCondition",
"CLCircularRegion",
"CLCondition",
"CLError",
"CLErrorDomain",
"CLGeocoder",
"CLHeading",
"CLLocation",
"CLLocationManager",
"CLLocationManagerDelegate",
"CLLocationManager_CLVisitExtensions",
"CLLocationPushServiceError",
"CLLocationPushServiceExtension",
"CLLocationUpdater",
"CLMonitor",
"CLMonitorConfiguration",
"CLMonitoringEvent",
"CLMonitoringRecord",
"CLPlacemark",
"CLRegion",
"CLVisit",
"block2",
"objc2-contacts",
]
alloc = [
"block2?/alloc",
"objc2/alloc",
"objc2-contacts?/alloc",
"objc2-foundation/alloc",
]
block2 = [
"dep:block2",
"objc2-contacts?/block2",
"objc2-foundation/block2",
]
default = ["std"]
objc2-contacts = ["dep:objc2-contacts"]
std = [
"alloc",
"block2?/std",
"objc2/std",
"objc2-contacts?/std",
"objc2-foundation/std",
]
[target."cfg(not(target_os = \"tvos\"))".dependencies.objc2-contacts]
version = "0.2.2"
optional = true
default-features = false
[lints.clippy]
cargo = "warn"
ptr_as_ptr = "warn"
[lints.rust]
elided_lifetimes_in_paths = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
non_ascii_idents = "deny"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"

14
vendor/objc2-core-location/README.md vendored Normal file
View File

@@ -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.

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,33 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLBackgroundActivitySession;
unsafe impl ClassType for CLBackgroundActivitySession {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CLBackgroundActivitySession {}
extern_methods!(
unsafe impl CLBackgroundActivitySession {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
#[method(invalidate)]
pub unsafe fn invalidate(&self);
#[method_id(@__retain_semantics Other backgroundActivitySession)]
pub unsafe fn backgroundActivitySession() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,79 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type CLBeaconMajorValue = u16;
pub type CLBeaconMinorValue = u16;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CLCondition")]
pub struct CLBeaconIdentityCondition;
#[cfg(feature = "CLCondition")]
unsafe impl ClassType for CLBeaconIdentityCondition {
#[inherits(NSObject)]
type Super = CLCondition;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CLCondition")]
unsafe impl NSCoding for CLBeaconIdentityCondition {}
#[cfg(feature = "CLCondition")]
unsafe impl NSCopying for CLBeaconIdentityCondition {}
#[cfg(feature = "CLCondition")]
unsafe impl NSObjectProtocol for CLBeaconIdentityCondition {}
#[cfg(feature = "CLCondition")]
unsafe impl NSSecureCoding for CLBeaconIdentityCondition {}
extern_methods!(
#[cfg(feature = "CLCondition")]
unsafe impl CLBeaconIdentityCondition {
#[method_id(@__retain_semantics Other UUID)]
pub unsafe fn UUID(&self) -> Retained<NSUUID>;
#[method_id(@__retain_semantics Other major)]
pub unsafe fn major(&self) -> Option<Retained<NSNumber>>;
#[method_id(@__retain_semantics Other minor)]
pub unsafe fn minor(&self) -> Option<Retained<NSNumber>>;
#[method_id(@__retain_semantics Init initWithUUID:)]
pub unsafe fn initWithUUID(this: Allocated<Self>, uuid: &NSUUID) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithUUID:major:)]
pub unsafe fn initWithUUID_major(
this: Allocated<Self>,
uuid: &NSUUID,
major: CLBeaconMajorValue,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithUUID:major:minor:)]
pub unsafe fn initWithUUID_major_minor(
this: Allocated<Self>,
uuid: &NSUUID,
major: CLBeaconMajorValue,
minor: CLBeaconMinorValue,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CLCondition`
#[cfg(feature = "CLCondition")]
unsafe impl CLBeaconIdentityCondition {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,73 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
#[deprecated]
pub struct CLBeaconIdentityConstraint;
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl ClassType for CLBeaconIdentityConstraint {
#[inherits(CLCondition, NSObject)]
type Super = CLBeaconIdentityCondition;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl NSCoding for CLBeaconIdentityConstraint {}
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl NSCopying for CLBeaconIdentityConstraint {}
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl NSObjectProtocol for CLBeaconIdentityConstraint {}
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl NSSecureCoding for CLBeaconIdentityConstraint {}
extern_methods!(
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl CLBeaconIdentityConstraint {}
);
extern_methods!(
/// Methods declared on superclass `CLBeaconIdentityCondition`
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl CLBeaconIdentityConstraint {
#[method_id(@__retain_semantics Init initWithUUID:)]
pub unsafe fn initWithUUID(this: Allocated<Self>, uuid: &NSUUID) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithUUID:major:)]
pub unsafe fn initWithUUID_major(
this: Allocated<Self>,
uuid: &NSUUID,
major: CLBeaconMajorValue,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithUUID:major:minor:)]
pub unsafe fn initWithUUID_major_minor(
this: Allocated<Self>,
uuid: &NSUUID,
major: CLBeaconMajorValue,
minor: CLBeaconMinorValue,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CLCondition`
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
unsafe impl CLBeaconIdentityConstraint {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,230 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CLRegion")]
#[deprecated]
pub struct CLBeaconRegion;
#[cfg(feature = "CLRegion")]
unsafe impl ClassType for CLBeaconRegion {
#[inherits(NSObject)]
type Super = CLRegion;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CLRegion")]
unsafe impl NSCoding for CLBeaconRegion {}
#[cfg(feature = "CLRegion")]
unsafe impl NSCopying for CLBeaconRegion {}
#[cfg(feature = "CLRegion")]
unsafe impl NSObjectProtocol for CLBeaconRegion {}
#[cfg(feature = "CLRegion")]
unsafe impl NSSecureCoding for CLBeaconRegion {}
extern_methods!(
#[cfg(feature = "CLRegion")]
unsafe impl CLBeaconRegion {
#[method_id(@__retain_semantics Init initWithUUID:identifier:)]
pub unsafe fn initWithUUID_identifier(
this: Allocated<Self>,
uuid: &NSUUID,
identifier: &NSString,
) -> Retained<Self>;
#[deprecated]
#[method_id(@__retain_semantics Init initWithProximityUUID:identifier:)]
pub unsafe fn initWithProximityUUID_identifier(
this: Allocated<Self>,
proximity_uuid: &NSUUID,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CLBeaconIdentityCondition")]
#[method_id(@__retain_semantics Init initWithUUID:major:identifier:)]
pub unsafe fn initWithUUID_major_identifier(
this: Allocated<Self>,
uuid: &NSUUID,
major: CLBeaconMajorValue,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CLBeaconIdentityCondition")]
#[deprecated]
#[method_id(@__retain_semantics Init initWithProximityUUID:major:identifier:)]
pub unsafe fn initWithProximityUUID_major_identifier(
this: Allocated<Self>,
proximity_uuid: &NSUUID,
major: CLBeaconMajorValue,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CLBeaconIdentityCondition")]
#[method_id(@__retain_semantics Init initWithUUID:major:minor:identifier:)]
pub unsafe fn initWithUUID_major_minor_identifier(
this: Allocated<Self>,
uuid: &NSUUID,
major: CLBeaconMajorValue,
minor: CLBeaconMinorValue,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CLBeaconIdentityCondition")]
#[deprecated]
#[method_id(@__retain_semantics Init initWithProximityUUID:major:minor:identifier:)]
pub unsafe fn initWithProximityUUID_major_minor_identifier(
this: Allocated<Self>,
proximity_uuid: &NSUUID,
major: CLBeaconMajorValue,
minor: CLBeaconMinorValue,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition"
))]
#[method_id(@__retain_semantics Init initWithBeaconIdentityConstraint:identifier:)]
pub unsafe fn initWithBeaconIdentityConstraint_identifier(
this: Allocated<Self>,
beacon_identity_constraint: &CLBeaconIdentityConstraint,
identifier: &NSString,
) -> Retained<Self>;
#[deprecated]
#[method_id(@__retain_semantics Other peripheralDataWithMeasuredPower:)]
pub unsafe fn peripheralDataWithMeasuredPower(
&self,
measured_power: Option<&NSNumber>,
) -> Retained<NSMutableDictionary<NSString, AnyObject>>;
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition"
))]
#[method_id(@__retain_semantics Other beaconIdentityConstraint)]
pub unsafe fn beaconIdentityConstraint(&self) -> Retained<CLBeaconIdentityConstraint>;
#[method_id(@__retain_semantics Other UUID)]
pub unsafe fn UUID(&self) -> Retained<NSUUID>;
#[deprecated]
#[method_id(@__retain_semantics Other proximityUUID)]
pub unsafe fn proximityUUID(&self) -> Retained<NSUUID>;
#[deprecated]
#[method_id(@__retain_semantics Other major)]
pub unsafe fn major(&self) -> Option<Retained<NSNumber>>;
#[deprecated]
#[method_id(@__retain_semantics Other minor)]
pub unsafe fn minor(&self) -> Option<Retained<NSNumber>>;
#[deprecated]
#[method(notifyEntryStateOnDisplay)]
pub unsafe fn notifyEntryStateOnDisplay(&self) -> bool;
#[deprecated]
#[method(setNotifyEntryStateOnDisplay:)]
pub unsafe fn setNotifyEntryStateOnDisplay(&self, notify_entry_state_on_display: bool);
}
);
extern_methods!(
/// Methods declared on superclass `CLRegion`
#[cfg(feature = "CLRegion")]
unsafe impl CLBeaconRegion {
#[cfg(feature = "CLLocation")]
#[deprecated = "Please see CLCircularRegion"]
#[method_id(@__retain_semantics Init initCircularRegionWithCenter:radius:identifier:)]
pub unsafe fn initCircularRegionWithCenter_radius_identifier(
this: Allocated<Self>,
center: CLLocationCoordinate2D,
radius: CLLocationDistance,
identifier: &NSString,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CLRegion")]
unsafe impl CLBeaconRegion {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLBeacon;
unsafe impl ClassType for CLBeacon {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLBeacon {}
unsafe impl NSCopying for CLBeacon {}
unsafe impl NSObjectProtocol for CLBeacon {}
unsafe impl NSSecureCoding for CLBeacon {}
extern_methods!(
unsafe impl CLBeacon {
#[method_id(@__retain_semantics Other timestamp)]
pub unsafe fn timestamp(&self) -> Retained<NSDate>;
#[method_id(@__retain_semantics Other UUID)]
pub unsafe fn UUID(&self) -> Retained<NSUUID>;
#[deprecated]
#[method_id(@__retain_semantics Other proximityUUID)]
pub unsafe fn proximityUUID(&self) -> Retained<NSUUID>;
#[method_id(@__retain_semantics Other major)]
pub unsafe fn major(&self) -> Retained<NSNumber>;
#[method_id(@__retain_semantics Other minor)]
pub unsafe fn minor(&self) -> Retained<NSNumber>;
#[cfg(feature = "CLRegion")]
#[method(proximity)]
pub unsafe fn proximity(&self) -> CLProximity;
#[cfg(feature = "CLLocation")]
#[method(accuracy)]
pub unsafe fn accuracy(&self) -> CLLocationAccuracy;
#[method(rssi)]
pub unsafe fn rssi(&self) -> NSInteger;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLBeacon {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,64 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CLCondition")]
pub struct CLCircularGeographicCondition;
#[cfg(feature = "CLCondition")]
unsafe impl ClassType for CLCircularGeographicCondition {
#[inherits(NSObject)]
type Super = CLCondition;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CLCondition")]
unsafe impl NSCoding for CLCircularGeographicCondition {}
#[cfg(feature = "CLCondition")]
unsafe impl NSCopying for CLCircularGeographicCondition {}
#[cfg(feature = "CLCondition")]
unsafe impl NSObjectProtocol for CLCircularGeographicCondition {}
#[cfg(feature = "CLCondition")]
unsafe impl NSSecureCoding for CLCircularGeographicCondition {}
extern_methods!(
#[cfg(feature = "CLCondition")]
unsafe impl CLCircularGeographicCondition {
#[cfg(feature = "CLLocation")]
#[method(center)]
pub unsafe fn center(&self) -> CLLocationCoordinate2D;
#[cfg(feature = "CLLocation")]
#[method(radius)]
pub unsafe fn radius(&self) -> CLLocationDistance;
#[cfg(feature = "CLLocation")]
#[method_id(@__retain_semantics Init initWithCenter:radius:)]
pub unsafe fn initWithCenter_radius(
this: Allocated<Self>,
center: CLLocationCoordinate2D,
radius: CLLocationDistance,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `CLCondition`
#[cfg(feature = "CLCondition")]
unsafe impl CLCircularGeographicCondition {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,90 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CLRegion")]
#[deprecated]
pub struct CLCircularRegion;
#[cfg(feature = "CLRegion")]
unsafe impl ClassType for CLCircularRegion {
#[inherits(NSObject)]
type Super = CLRegion;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CLRegion")]
unsafe impl NSCoding for CLCircularRegion {}
#[cfg(feature = "CLRegion")]
unsafe impl NSCopying for CLCircularRegion {}
#[cfg(feature = "CLRegion")]
unsafe impl NSObjectProtocol for CLCircularRegion {}
#[cfg(feature = "CLRegion")]
unsafe impl NSSecureCoding for CLCircularRegion {}
extern_methods!(
#[cfg(feature = "CLRegion")]
unsafe impl CLCircularRegion {
#[cfg(feature = "CLLocation")]
#[deprecated]
#[method_id(@__retain_semantics Init initWithCenter:radius:identifier:)]
pub unsafe fn initWithCenter_radius_identifier(
this: Allocated<Self>,
center: CLLocationCoordinate2D,
radius: CLLocationDistance,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CLLocation")]
#[deprecated]
#[method(center)]
pub unsafe fn center(&self) -> CLLocationCoordinate2D;
#[cfg(feature = "CLLocation")]
#[deprecated]
#[method(radius)]
pub unsafe fn radius(&self) -> CLLocationDistance;
#[cfg(feature = "CLLocation")]
#[deprecated]
#[method(containsCoordinate:)]
pub unsafe fn containsCoordinate(&self, coordinate: CLLocationCoordinate2D) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `CLRegion`
#[cfg(feature = "CLRegion")]
unsafe impl CLCircularRegion {
#[cfg(feature = "CLLocation")]
#[deprecated = "Please see CLCircularRegion"]
#[method_id(@__retain_semantics Init initCircularRegionWithCenter:radius:identifier:)]
pub unsafe fn initCircularRegionWithCenter_radius_identifier(
this: Allocated<Self>,
center: CLLocationCoordinate2D,
radius: CLLocationDistance,
identifier: &NSString,
) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "CLRegion")]
unsafe impl CLCircularRegion {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,38 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLCondition;
unsafe impl ClassType for CLCondition {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CLCondition {}
unsafe impl Sync for CLCondition {}
unsafe impl NSCoding for CLCondition {}
unsafe impl NSCopying for CLCondition {}
unsafe impl NSObjectProtocol for CLCondition {}
unsafe impl NSSecureCoding for CLCondition {}
extern_methods!(
unsafe impl CLCondition {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,45 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLError(pub NSInteger);
impl CLError {
pub const kCLErrorLocationUnknown: Self = Self(0);
pub const kCLErrorDenied: Self = Self(1);
pub const kCLErrorNetwork: Self = Self(2);
pub const kCLErrorHeadingFailure: Self = Self(3);
pub const kCLErrorRegionMonitoringDenied: Self = Self(4);
pub const kCLErrorRegionMonitoringFailure: Self = Self(5);
pub const kCLErrorRegionMonitoringSetupDelayed: Self = Self(6);
pub const kCLErrorRegionMonitoringResponseDelayed: Self = Self(7);
pub const kCLErrorGeocodeFoundNoResult: Self = Self(8);
pub const kCLErrorGeocodeFoundPartialResult: Self = Self(9);
pub const kCLErrorGeocodeCanceled: Self = Self(10);
pub const kCLErrorDeferredFailed: Self = Self(11);
pub const kCLErrorDeferredNotUpdatingLocation: Self = Self(12);
pub const kCLErrorDeferredAccuracyTooLow: Self = Self(13);
pub const kCLErrorDeferredDistanceFiltered: Self = Self(14);
pub const kCLErrorDeferredCanceled: Self = Self(15);
pub const kCLErrorRangingUnavailable: Self = Self(16);
pub const kCLErrorRangingFailure: Self = Self(17);
pub const kCLErrorPromptDeclined: Self = Self(18);
pub const kCLErrorHistoricalLocationError: Self = Self(19);
}
unsafe impl Encode for CLError {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLError {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static kCLErrorUserInfoAlternateRegionKey: &'static NSString;
}

View File

@@ -0,0 +1,10 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static kCLErrorDomain: &'static NSString;
}

View File

@@ -0,0 +1,131 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
use objc2_contacts::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(feature = "CLPlacemark", feature = "block2"))]
pub type CLGeocodeCompletionHandler =
*mut block2::Block<dyn Fn(*mut NSArray<CLPlacemark>, *mut NSError)>;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLGeocoder;
unsafe impl ClassType for CLGeocoder {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CLGeocoder {}
extern_methods!(
unsafe impl CLGeocoder {
#[method(isGeocoding)]
pub unsafe fn isGeocoding(&self) -> bool;
#[cfg(all(feature = "CLLocation", feature = "CLPlacemark", feature = "block2"))]
#[method(reverseGeocodeLocation:completionHandler:)]
pub unsafe fn reverseGeocodeLocation_completionHandler(
&self,
location: &CLLocation,
completion_handler: CLGeocodeCompletionHandler,
);
#[cfg(all(feature = "CLLocation", feature = "CLPlacemark", feature = "block2"))]
#[method(reverseGeocodeLocation:preferredLocale:completionHandler:)]
pub unsafe fn reverseGeocodeLocation_preferredLocale_completionHandler(
&self,
location: &CLLocation,
locale: Option<&NSLocale>,
completion_handler: CLGeocodeCompletionHandler,
);
#[cfg(all(feature = "CLPlacemark", feature = "block2"))]
#[deprecated = "Use -geocodePostalAddress:completionHandler:"]
#[method(geocodeAddressDictionary:completionHandler:)]
pub unsafe fn geocodeAddressDictionary_completionHandler(
&self,
address_dictionary: &NSDictionary,
completion_handler: CLGeocodeCompletionHandler,
);
#[cfg(all(feature = "CLPlacemark", feature = "CLRegion", feature = "block2"))]
#[method(geocodeAddressString:inRegion:completionHandler:)]
pub unsafe fn geocodeAddressString_inRegion_completionHandler(
&self,
address_string: &NSString,
region: Option<&CLRegion>,
completion_handler: CLGeocodeCompletionHandler,
);
#[cfg(all(feature = "CLPlacemark", feature = "CLRegion", feature = "block2"))]
#[method(geocodeAddressString:inRegion:preferredLocale:completionHandler:)]
pub unsafe fn geocodeAddressString_inRegion_preferredLocale_completionHandler(
&self,
address_string: &NSString,
region: Option<&CLRegion>,
locale: Option<&NSLocale>,
completion_handler: CLGeocodeCompletionHandler,
);
#[cfg(all(feature = "CLPlacemark", feature = "block2"))]
#[method(geocodeAddressString:completionHandler:)]
pub unsafe fn geocodeAddressString_completionHandler(
&self,
address_string: &NSString,
completion_handler: CLGeocodeCompletionHandler,
);
#[method(cancelGeocode)]
pub unsafe fn cancelGeocode(&self);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLGeocoder {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
/// ContactsAdditions
unsafe impl CLGeocoder {
#[cfg(all(
feature = "CLPlacemark",
feature = "block2",
feature = "objc2-contacts"
))]
#[cfg(not(target_os = "tvos"))]
#[method(geocodePostalAddress:completionHandler:)]
pub unsafe fn geocodePostalAddress_completionHandler(
&self,
postal_address: &CNPostalAddress,
completion_handler: CLGeocodeCompletionHandler,
);
#[cfg(all(
feature = "CLPlacemark",
feature = "block2",
feature = "objc2-contacts"
))]
#[cfg(not(target_os = "tvos"))]
#[method(geocodePostalAddress:preferredLocale:completionHandler:)]
pub unsafe fn geocodePostalAddress_preferredLocale_completionHandler(
&self,
postal_address: &CNPostalAddress,
locale: Option<&NSLocale>,
completion_handler: CLGeocodeCompletionHandler,
);
}
);

View File

@@ -0,0 +1,70 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type CLHeadingComponentValue = c_double;
extern "C" {
#[cfg(feature = "CLLocation")]
pub static kCLHeadingFilterNone: CLLocationDegrees;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLHeading;
unsafe impl ClassType for CLHeading {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLHeading {}
unsafe impl NSCopying for CLHeading {}
unsafe impl NSObjectProtocol for CLHeading {}
unsafe impl NSSecureCoding for CLHeading {}
extern_methods!(
unsafe impl CLHeading {
#[cfg(feature = "CLLocation")]
#[method(magneticHeading)]
pub unsafe fn magneticHeading(&self) -> CLLocationDirection;
#[cfg(feature = "CLLocation")]
#[method(trueHeading)]
pub unsafe fn trueHeading(&self) -> CLLocationDirection;
#[cfg(feature = "CLLocation")]
#[method(headingAccuracy)]
pub unsafe fn headingAccuracy(&self) -> CLLocationDirection;
#[method(x)]
pub unsafe fn x(&self) -> CLHeadingComponentValue;
#[method(y)]
pub unsafe fn y(&self) -> CLHeadingComponentValue;
#[method(z)]
pub unsafe fn z(&self) -> CLHeadingComponentValue;
#[method_id(@__retain_semantics Other timestamp)]
pub unsafe fn timestamp(&self) -> Retained<NSDate>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLHeading {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,306 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type CLLocationDegrees = c_double;
pub type CLLocationAccuracy = c_double;
pub type CLLocationSpeed = c_double;
pub type CLLocationSpeedAccuracy = c_double;
pub type CLLocationDirection = c_double;
pub type CLLocationDirectionAccuracy = c_double;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CLLocationCoordinate2D {
pub latitude: CLLocationDegrees,
pub longitude: CLLocationDegrees,
}
unsafe impl Encode for CLLocationCoordinate2D {
const ENCODING: Encoding = Encoding::Struct(
"CLLocationCoordinate2D",
&[<CLLocationDegrees>::ENCODING, <CLLocationDegrees>::ENCODING],
);
}
unsafe impl RefEncode for CLLocationCoordinate2D {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type CLLocationDistance = c_double;
extern "C" {
pub static kCLDistanceFilterNone: CLLocationDistance;
}
extern "C" {
pub static kCLLocationAccuracyBestForNavigation: CLLocationAccuracy;
}
extern "C" {
pub static kCLLocationAccuracyBest: CLLocationAccuracy;
}
extern "C" {
pub static kCLLocationAccuracyNearestTenMeters: CLLocationAccuracy;
}
extern "C" {
pub static kCLLocationAccuracyHundredMeters: CLLocationAccuracy;
}
extern "C" {
pub static kCLLocationAccuracyKilometer: CLLocationAccuracy;
}
extern "C" {
pub static kCLLocationAccuracyThreeKilometers: CLLocationAccuracy;
}
extern "C" {
pub static kCLLocationAccuracyReduced: CLLocationAccuracy;
}
extern "C" {
pub static CLLocationDistanceMax: CLLocationDistance;
}
extern "C" {
pub static CLTimeIntervalMax: NSTimeInterval;
}
extern "C" {
pub static kCLLocationCoordinate2DInvalid: CLLocationCoordinate2D;
}
extern "C" {
pub fn CLLocationCoordinate2DIsValid(coord: CLLocationCoordinate2D) -> Bool;
}
extern "C" {
pub fn CLLocationCoordinate2DMake(
latitude: CLLocationDegrees,
longitude: CLLocationDegrees,
) -> CLLocationCoordinate2D;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLFloor;
unsafe impl ClassType for CLFloor {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLFloor {}
unsafe impl NSCopying for CLFloor {}
unsafe impl NSObjectProtocol for CLFloor {}
unsafe impl NSSecureCoding for CLFloor {}
extern_methods!(
unsafe impl CLFloor {
#[method(level)]
pub unsafe fn level(&self) -> NSInteger;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLFloor {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLLocationSourceInformation;
unsafe impl ClassType for CLLocationSourceInformation {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLLocationSourceInformation {}
unsafe impl NSCopying for CLLocationSourceInformation {}
unsafe impl NSObjectProtocol for CLLocationSourceInformation {}
unsafe impl NSSecureCoding for CLLocationSourceInformation {}
extern_methods!(
unsafe impl CLLocationSourceInformation {
#[method_id(@__retain_semantics Init initWithSoftwareSimulationState:andExternalAccessoryState:)]
pub unsafe fn initWithSoftwareSimulationState_andExternalAccessoryState(
this: Allocated<Self>,
is_software: bool,
is_accessory: bool,
) -> Retained<Self>;
#[method(isSimulatedBySoftware)]
pub unsafe fn isSimulatedBySoftware(&self) -> bool;
#[method(isProducedByAccessory)]
pub unsafe fn isProducedByAccessory(&self) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLLocationSourceInformation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLLocation;
unsafe impl ClassType for CLLocation {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CLLocation {}
unsafe impl Sync for CLLocation {}
unsafe impl NSCoding for CLLocation {}
unsafe impl NSCopying for CLLocation {}
unsafe impl NSObjectProtocol for CLLocation {}
unsafe impl NSSecureCoding for CLLocation {}
extern_methods!(
unsafe impl CLLocation {
#[method_id(@__retain_semantics Init initWithLatitude:longitude:)]
pub unsafe fn initWithLatitude_longitude(
this: Allocated<Self>,
latitude: CLLocationDegrees,
longitude: CLLocationDegrees,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:)]
pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_timestamp(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
altitude: CLLocationDistance,
h_accuracy: CLLocationAccuracy,
v_accuracy: CLLocationAccuracy,
timestamp: &NSDate,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:speed:timestamp:)]
pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_course_speed_timestamp(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
altitude: CLLocationDistance,
h_accuracy: CLLocationAccuracy,
v_accuracy: CLLocationAccuracy,
course: CLLocationDirection,
speed: CLLocationSpeed,
timestamp: &NSDate,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:)]
pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_course_courseAccuracy_speed_speedAccuracy_timestamp(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
altitude: CLLocationDistance,
h_accuracy: CLLocationAccuracy,
v_accuracy: CLLocationAccuracy,
course: CLLocationDirection,
course_accuracy: CLLocationDirectionAccuracy,
speed: CLLocationSpeed,
speed_accuracy: CLLocationSpeedAccuracy,
timestamp: &NSDate,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:)]
pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_course_courseAccuracy_speed_speedAccuracy_timestamp_sourceInfo(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
altitude: CLLocationDistance,
h_accuracy: CLLocationAccuracy,
v_accuracy: CLLocationAccuracy,
course: CLLocationDirection,
course_accuracy: CLLocationDirectionAccuracy,
speed: CLLocationSpeed,
speed_accuracy: CLLocationSpeedAccuracy,
timestamp: &NSDate,
source_info: &CLLocationSourceInformation,
) -> Retained<Self>;
#[method(coordinate)]
pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
#[method(altitude)]
pub unsafe fn altitude(&self) -> CLLocationDistance;
#[method(ellipsoidalAltitude)]
pub unsafe fn ellipsoidalAltitude(&self) -> CLLocationDistance;
#[method(horizontalAccuracy)]
pub unsafe fn horizontalAccuracy(&self) -> CLLocationAccuracy;
#[method(verticalAccuracy)]
pub unsafe fn verticalAccuracy(&self) -> CLLocationAccuracy;
#[method(course)]
pub unsafe fn course(&self) -> CLLocationDirection;
#[method(courseAccuracy)]
pub unsafe fn courseAccuracy(&self) -> CLLocationDirectionAccuracy;
#[method(speed)]
pub unsafe fn speed(&self) -> CLLocationSpeed;
#[method(speedAccuracy)]
pub unsafe fn speedAccuracy(&self) -> CLLocationSpeedAccuracy;
#[method_id(@__retain_semantics Other timestamp)]
pub unsafe fn timestamp(&self) -> Retained<NSDate>;
#[method_id(@__retain_semantics Other floor)]
pub unsafe fn floor(&self) -> Option<Retained<CLFloor>>;
#[method_id(@__retain_semantics Other sourceInformation)]
pub unsafe fn sourceInformation(&self) -> Option<Retained<CLLocationSourceInformation>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLLocation {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,423 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLDeviceOrientation(pub c_int);
impl CLDeviceOrientation {
#[doc(alias = "CLDeviceOrientationUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CLDeviceOrientationPortrait")]
pub const Portrait: Self = Self(1);
#[doc(alias = "CLDeviceOrientationPortraitUpsideDown")]
pub const PortraitUpsideDown: Self = Self(2);
#[doc(alias = "CLDeviceOrientationLandscapeLeft")]
pub const LandscapeLeft: Self = Self(3);
#[doc(alias = "CLDeviceOrientationLandscapeRight")]
pub const LandscapeRight: Self = Self(4);
#[doc(alias = "CLDeviceOrientationFaceUp")]
pub const FaceUp: Self = Self(5);
#[doc(alias = "CLDeviceOrientationFaceDown")]
pub const FaceDown: Self = Self(6);
}
unsafe impl Encode for CLDeviceOrientation {
const ENCODING: Encoding = c_int::ENCODING;
}
unsafe impl RefEncode for CLDeviceOrientation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLAuthorizationStatus(pub c_int);
impl CLAuthorizationStatus {
pub const kCLAuthorizationStatusNotDetermined: Self = Self(0);
pub const kCLAuthorizationStatusRestricted: Self = Self(1);
pub const kCLAuthorizationStatusDenied: Self = Self(2);
pub const kCLAuthorizationStatusAuthorizedAlways: Self = Self(3);
pub const kCLAuthorizationStatusAuthorizedWhenInUse: Self = Self(4);
#[deprecated = "Use kCLAuthorizationStatusAuthorizedAlways"]
pub const kCLAuthorizationStatusAuthorized: Self =
Self(CLAuthorizationStatus::kCLAuthorizationStatusAuthorizedAlways.0);
}
unsafe impl Encode for CLAuthorizationStatus {
const ENCODING: Encoding = c_int::ENCODING;
}
unsafe impl RefEncode for CLAuthorizationStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLAccuracyAuthorization(pub NSInteger);
impl CLAccuracyAuthorization {
#[doc(alias = "CLAccuracyAuthorizationFullAccuracy")]
pub const FullAccuracy: Self = Self(0);
#[doc(alias = "CLAccuracyAuthorizationReducedAccuracy")]
pub const ReducedAccuracy: Self = Self(1);
}
unsafe impl Encode for CLAccuracyAuthorization {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLAccuracyAuthorization {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLActivityType(pub NSInteger);
impl CLActivityType {
#[doc(alias = "CLActivityTypeOther")]
pub const Other: Self = Self(1);
#[doc(alias = "CLActivityTypeAutomotiveNavigation")]
pub const AutomotiveNavigation: Self = Self(2);
#[doc(alias = "CLActivityTypeFitness")]
pub const Fitness: Self = Self(3);
#[doc(alias = "CLActivityTypeOtherNavigation")]
pub const OtherNavigation: Self = Self(4);
#[doc(alias = "CLActivityTypeAirborne")]
pub const Airborne: Self = Self(5);
}
unsafe impl Encode for CLActivityType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLActivityType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLLocationManager;
unsafe impl ClassType for CLLocationManager {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CLLocationManager {}
extern_methods!(
unsafe impl CLLocationManager {
#[method(locationServicesEnabled)]
pub unsafe fn locationServicesEnabled_class() -> bool;
#[method(headingAvailable)]
pub unsafe fn headingAvailable_class() -> bool;
#[method(significantLocationChangeMonitoringAvailable)]
pub unsafe fn significantLocationChangeMonitoringAvailable() -> bool;
#[method(isMonitoringAvailableForClass:)]
pub unsafe fn isMonitoringAvailableForClass(region_class: &AnyClass) -> bool;
#[deprecated]
#[method(regionMonitoringAvailable)]
pub unsafe fn regionMonitoringAvailable() -> bool;
#[deprecated = "Use +isMonitoringAvailableForClass: and -authorizationStatus instead"]
#[method(regionMonitoringEnabled)]
pub unsafe fn regionMonitoringEnabled() -> bool;
#[method(isRangingAvailable)]
pub unsafe fn isRangingAvailable() -> bool;
#[method(authorizationStatus)]
pub unsafe fn authorizationStatus(&self) -> CLAuthorizationStatus;
#[deprecated]
#[method(authorizationStatus)]
pub unsafe fn authorizationStatus_class() -> CLAuthorizationStatus;
#[method(accuracyAuthorization)]
pub unsafe fn accuracyAuthorization(&self) -> CLAccuracyAuthorization;
#[method(isAuthorizedForWidgetUpdates)]
pub unsafe fn isAuthorizedForWidgetUpdates(&self) -> bool;
#[cfg(feature = "CLLocationManagerDelegate")]
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn CLLocationManagerDelegate>>>;
#[cfg(feature = "CLLocationManagerDelegate")]
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn CLLocationManagerDelegate>>,
);
#[deprecated]
#[method(locationServicesEnabled)]
pub unsafe fn locationServicesEnabled(&self) -> bool;
#[deprecated = "Set the purpose string in Info.plist using key NSLocationUsageDescription"]
#[method_id(@__retain_semantics Other purpose)]
pub unsafe fn purpose(&self) -> Option<Retained<NSString>>;
#[deprecated = "Set the purpose string in Info.plist using key NSLocationUsageDescription"]
#[method(setPurpose:)]
pub unsafe fn setPurpose(&self, purpose: Option<&NSString>);
#[method(activityType)]
pub unsafe fn activityType(&self) -> CLActivityType;
#[method(setActivityType:)]
pub unsafe fn setActivityType(&self, activity_type: CLActivityType);
#[cfg(feature = "CLLocation")]
#[method(distanceFilter)]
pub unsafe fn distanceFilter(&self) -> CLLocationDistance;
#[cfg(feature = "CLLocation")]
#[method(setDistanceFilter:)]
pub unsafe fn setDistanceFilter(&self, distance_filter: CLLocationDistance);
#[cfg(feature = "CLLocation")]
#[method(desiredAccuracy)]
pub unsafe fn desiredAccuracy(&self) -> CLLocationAccuracy;
#[cfg(feature = "CLLocation")]
#[method(setDesiredAccuracy:)]
pub unsafe fn setDesiredAccuracy(&self, desired_accuracy: CLLocationAccuracy);
#[method(pausesLocationUpdatesAutomatically)]
pub unsafe fn pausesLocationUpdatesAutomatically(&self) -> bool;
#[method(setPausesLocationUpdatesAutomatically:)]
pub unsafe fn setPausesLocationUpdatesAutomatically(
&self,
pauses_location_updates_automatically: bool,
);
#[method(allowsBackgroundLocationUpdates)]
pub unsafe fn allowsBackgroundLocationUpdates(&self) -> bool;
#[method(setAllowsBackgroundLocationUpdates:)]
pub unsafe fn setAllowsBackgroundLocationUpdates(
&self,
allows_background_location_updates: bool,
);
#[method(showsBackgroundLocationIndicator)]
pub unsafe fn showsBackgroundLocationIndicator(&self) -> bool;
#[method(setShowsBackgroundLocationIndicator:)]
pub unsafe fn setShowsBackgroundLocationIndicator(
&self,
shows_background_location_indicator: bool,
);
#[cfg(feature = "CLLocation")]
#[method_id(@__retain_semantics Other location)]
pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
#[deprecated]
#[method(headingAvailable)]
pub unsafe fn headingAvailable(&self) -> bool;
#[cfg(feature = "CLLocation")]
#[method(headingFilter)]
pub unsafe fn headingFilter(&self) -> CLLocationDegrees;
#[cfg(feature = "CLLocation")]
#[method(setHeadingFilter:)]
pub unsafe fn setHeadingFilter(&self, heading_filter: CLLocationDegrees);
#[method(headingOrientation)]
pub unsafe fn headingOrientation(&self) -> CLDeviceOrientation;
#[method(setHeadingOrientation:)]
pub unsafe fn setHeadingOrientation(&self, heading_orientation: CLDeviceOrientation);
#[cfg(feature = "CLHeading")]
#[method_id(@__retain_semantics Other heading)]
pub unsafe fn heading(&self) -> Option<Retained<CLHeading>>;
#[cfg(feature = "CLLocation")]
#[method(maximumRegionMonitoringDistance)]
pub unsafe fn maximumRegionMonitoringDistance(&self) -> CLLocationDistance;
#[cfg(feature = "CLRegion")]
#[method_id(@__retain_semantics Other monitoredRegions)]
pub unsafe fn monitoredRegions(&self) -> Retained<NSSet<CLRegion>>;
#[cfg(feature = "CLRegion")]
#[deprecated = "Use -rangedBeaconConstraints"]
#[method_id(@__retain_semantics Other rangedRegions)]
pub unsafe fn rangedRegions(&self) -> Retained<NSSet<CLRegion>>;
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition"
))]
#[method_id(@__retain_semantics Other rangedBeaconConstraints)]
pub unsafe fn rangedBeaconConstraints(&self)
-> Retained<NSSet<CLBeaconIdentityConstraint>>;
#[method(requestWhenInUseAuthorization)]
pub unsafe fn requestWhenInUseAuthorization(&self);
#[method(requestAlwaysAuthorization)]
pub unsafe fn requestAlwaysAuthorization(&self);
#[cfg(feature = "block2")]
#[method(requestTemporaryFullAccuracyAuthorizationWithPurposeKey:completion:)]
pub unsafe fn requestTemporaryFullAccuracyAuthorizationWithPurposeKey_completion(
&self,
purpose_key: &NSString,
completion: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[method(requestTemporaryFullAccuracyAuthorizationWithPurposeKey:)]
pub unsafe fn requestTemporaryFullAccuracyAuthorizationWithPurposeKey(
&self,
purpose_key: &NSString,
);
#[method(startUpdatingLocation)]
pub unsafe fn startUpdatingLocation(&self);
#[method(stopUpdatingLocation)]
pub unsafe fn stopUpdatingLocation(&self);
#[method(requestLocation)]
pub unsafe fn requestLocation(&self);
#[method(startUpdatingHeading)]
pub unsafe fn startUpdatingHeading(&self);
#[method(stopUpdatingHeading)]
pub unsafe fn stopUpdatingHeading(&self);
#[method(dismissHeadingCalibrationDisplay)]
pub unsafe fn dismissHeadingCalibrationDisplay(&self);
#[method(startMonitoringSignificantLocationChanges)]
pub unsafe fn startMonitoringSignificantLocationChanges(&self);
#[method(stopMonitoringSignificantLocationChanges)]
pub unsafe fn stopMonitoringSignificantLocationChanges(&self);
#[cfg(feature = "block2")]
#[method(startMonitoringLocationPushesWithCompletion:)]
pub unsafe fn startMonitoringLocationPushesWithCompletion(
&self,
completion: Option<&block2::Block<dyn Fn(*mut NSData, *mut NSError)>>,
);
#[method(stopMonitoringLocationPushes)]
pub unsafe fn stopMonitoringLocationPushes(&self);
#[cfg(all(feature = "CLLocation", feature = "CLRegion"))]
#[deprecated]
#[method(startMonitoringForRegion:desiredAccuracy:)]
pub unsafe fn startMonitoringForRegion_desiredAccuracy(
&self,
region: &CLRegion,
accuracy: CLLocationAccuracy,
);
#[cfg(feature = "CLRegion")]
#[deprecated]
#[method(stopMonitoringForRegion:)]
pub unsafe fn stopMonitoringForRegion(&self, region: &CLRegion);
#[cfg(feature = "CLRegion")]
#[deprecated]
#[method(startMonitoringForRegion:)]
pub unsafe fn startMonitoringForRegion(&self, region: &CLRegion);
#[cfg(feature = "CLRegion")]
#[deprecated]
#[method(requestStateForRegion:)]
pub unsafe fn requestStateForRegion(&self, region: &CLRegion);
#[cfg(all(feature = "CLBeaconRegion", feature = "CLRegion"))]
#[deprecated = "Use -startRangingBeaconsSatisfyingConstraint:"]
#[method(startRangingBeaconsInRegion:)]
pub unsafe fn startRangingBeaconsInRegion(&self, region: &CLBeaconRegion);
#[cfg(all(feature = "CLBeaconRegion", feature = "CLRegion"))]
#[deprecated = "Use -stopRangingBeaconsSatisfyingConstraint:"]
#[method(stopRangingBeaconsInRegion:)]
pub unsafe fn stopRangingBeaconsInRegion(&self, region: &CLBeaconRegion);
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition"
))]
#[method(startRangingBeaconsSatisfyingConstraint:)]
pub unsafe fn startRangingBeaconsSatisfyingConstraint(
&self,
constraint: &CLBeaconIdentityConstraint,
);
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition"
))]
#[method(stopRangingBeaconsSatisfyingConstraint:)]
pub unsafe fn stopRangingBeaconsSatisfyingConstraint(
&self,
constraint: &CLBeaconIdentityConstraint,
);
#[cfg(feature = "CLLocation")]
#[deprecated = "You can remove calls to this method"]
#[method(allowDeferredLocationUpdatesUntilTraveled:timeout:)]
pub unsafe fn allowDeferredLocationUpdatesUntilTraveled_timeout(
&self,
distance: CLLocationDistance,
timeout: NSTimeInterval,
);
#[deprecated = "You can remove calls to this method"]
#[method(disallowDeferredLocationUpdates)]
pub unsafe fn disallowDeferredLocationUpdates(&self);
#[deprecated = "You can remove calls to this method"]
#[method(deferredLocationUpdatesAvailable)]
pub unsafe fn deferredLocationUpdatesAvailable() -> bool;
#[cfg(all(feature = "CLLocation", feature = "block2"))]
#[method(requestHistoricalLocationsWithPurposeKey:sampleCount:completionHandler:)]
pub unsafe fn requestHistoricalLocationsWithPurposeKey_sampleCount_completionHandler(
&self,
purpose_key: &NSString,
sample_count: NSInteger,
handler: &block2::Block<dyn Fn(NonNull<NSArray<CLLocation>>, *mut NSError)>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLLocationManager {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,205 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait CLLocationManagerDelegate: NSObjectProtocol {
#[cfg(all(feature = "CLLocation", feature = "CLLocationManager"))]
#[deprecated = "Implement -locationManager:didUpdateLocations: instead"]
#[optional]
#[method(locationManager:didUpdateToLocation:fromLocation:)]
unsafe fn locationManager_didUpdateToLocation_fromLocation(
&self,
manager: &CLLocationManager,
new_location: &CLLocation,
old_location: &CLLocation,
);
#[cfg(all(feature = "CLLocation", feature = "CLLocationManager"))]
#[optional]
#[method(locationManager:didUpdateLocations:)]
unsafe fn locationManager_didUpdateLocations(
&self,
manager: &CLLocationManager,
locations: &NSArray<CLLocation>,
);
#[cfg(all(feature = "CLHeading", feature = "CLLocationManager"))]
#[optional]
#[method(locationManager:didUpdateHeading:)]
unsafe fn locationManager_didUpdateHeading(
&self,
manager: &CLLocationManager,
new_heading: &CLHeading,
);
#[cfg(feature = "CLLocationManager")]
#[optional]
#[method(locationManagerShouldDisplayHeadingCalibration:)]
unsafe fn locationManagerShouldDisplayHeadingCalibration(
&self,
manager: &CLLocationManager,
) -> bool;
#[cfg(all(feature = "CLLocationManager", feature = "CLRegion"))]
#[optional]
#[method(locationManager:didDetermineState:forRegion:)]
unsafe fn locationManager_didDetermineState_forRegion(
&self,
manager: &CLLocationManager,
state: CLRegionState,
region: &CLRegion,
);
#[cfg(all(
feature = "CLBeaconRegion",
feature = "CLLocationManager",
feature = "CLRegion"
))]
#[deprecated]
#[optional]
#[method(locationManager:didRangeBeacons:inRegion:)]
unsafe fn locationManager_didRangeBeacons_inRegion(
&self,
manager: &CLLocationManager,
beacons: &NSArray<CLBeacon>,
region: &CLBeaconRegion,
);
#[cfg(all(
feature = "CLBeaconRegion",
feature = "CLLocationManager",
feature = "CLRegion"
))]
#[deprecated]
#[optional]
#[method(locationManager:rangingBeaconsDidFailForRegion:withError:)]
unsafe fn locationManager_rangingBeaconsDidFailForRegion_withError(
&self,
manager: &CLLocationManager,
region: &CLBeaconRegion,
error: &NSError,
);
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLBeaconRegion",
feature = "CLCondition",
feature = "CLLocationManager"
))]
#[optional]
#[method(locationManager:didRangeBeacons:satisfyingConstraint:)]
unsafe fn locationManager_didRangeBeacons_satisfyingConstraint(
&self,
manager: &CLLocationManager,
beacons: &NSArray<CLBeacon>,
beacon_constraint: &CLBeaconIdentityConstraint,
);
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition",
feature = "CLLocationManager"
))]
#[optional]
#[method(locationManager:didFailRangingBeaconsForConstraint:error:)]
unsafe fn locationManager_didFailRangingBeaconsForConstraint_error(
&self,
manager: &CLLocationManager,
beacon_constraint: &CLBeaconIdentityConstraint,
error: &NSError,
);
#[cfg(all(feature = "CLLocationManager", feature = "CLRegion"))]
#[optional]
#[method(locationManager:didEnterRegion:)]
unsafe fn locationManager_didEnterRegion(
&self,
manager: &CLLocationManager,
region: &CLRegion,
);
#[cfg(all(feature = "CLLocationManager", feature = "CLRegion"))]
#[optional]
#[method(locationManager:didExitRegion:)]
unsafe fn locationManager_didExitRegion(
&self,
manager: &CLLocationManager,
region: &CLRegion,
);
#[cfg(feature = "CLLocationManager")]
#[optional]
#[method(locationManager:didFailWithError:)]
unsafe fn locationManager_didFailWithError(
&self,
manager: &CLLocationManager,
error: &NSError,
);
#[cfg(all(feature = "CLLocationManager", feature = "CLRegion"))]
#[optional]
#[method(locationManager:monitoringDidFailForRegion:withError:)]
unsafe fn locationManager_monitoringDidFailForRegion_withError(
&self,
manager: &CLLocationManager,
region: Option<&CLRegion>,
error: &NSError,
);
#[cfg(feature = "CLLocationManager")]
#[deprecated]
#[optional]
#[method(locationManager:didChangeAuthorizationStatus:)]
unsafe fn locationManager_didChangeAuthorizationStatus(
&self,
manager: &CLLocationManager,
status: CLAuthorizationStatus,
);
#[cfg(feature = "CLLocationManager")]
#[optional]
#[method(locationManagerDidChangeAuthorization:)]
unsafe fn locationManagerDidChangeAuthorization(&self, manager: &CLLocationManager);
#[cfg(all(feature = "CLLocationManager", feature = "CLRegion"))]
#[optional]
#[method(locationManager:didStartMonitoringForRegion:)]
unsafe fn locationManager_didStartMonitoringForRegion(
&self,
manager: &CLLocationManager,
region: &CLRegion,
);
#[cfg(feature = "CLLocationManager")]
#[optional]
#[method(locationManagerDidPauseLocationUpdates:)]
unsafe fn locationManagerDidPauseLocationUpdates(&self, manager: &CLLocationManager);
#[cfg(feature = "CLLocationManager")]
#[optional]
#[method(locationManagerDidResumeLocationUpdates:)]
unsafe fn locationManagerDidResumeLocationUpdates(&self, manager: &CLLocationManager);
#[cfg(feature = "CLLocationManager")]
#[optional]
#[method(locationManager:didFinishDeferredUpdatesWithError:)]
unsafe fn locationManager_didFinishDeferredUpdatesWithError(
&self,
manager: &CLLocationManager,
error: Option<&NSError>,
);
#[cfg(all(feature = "CLLocationManager", feature = "CLVisit"))]
#[optional]
#[method(locationManager:didVisit:)]
unsafe fn locationManager_didVisit(&self, manager: &CLLocationManager, visit: &CLVisit);
}
unsafe impl ProtocolType for dyn CLLocationManagerDelegate {}
);

View File

@@ -0,0 +1,17 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
extern_methods!(
/// CLVisitExtensions
#[cfg(feature = "CLLocationManager")]
unsafe impl CLLocationManager {
#[method(startMonitoringVisits)]
pub unsafe fn startMonitoringVisits(&self);
#[method(stopMonitoringVisits)]
pub unsafe fn stopMonitoringVisits(&self);
}
);

View File

@@ -0,0 +1,35 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static CLLocationPushServiceErrorDomain: Option<&'static NSErrorDomain>;
}
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLLocationPushServiceError(pub NSInteger);
impl CLLocationPushServiceError {
#[doc(alias = "CLLocationPushServiceErrorUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CLLocationPushServiceErrorMissingPushExtension")]
pub const MissingPushExtension: Self = Self(1);
#[doc(alias = "CLLocationPushServiceErrorMissingPushServerEnvironment")]
pub const MissingPushServerEnvironment: Self = Self(2);
#[doc(alias = "CLLocationPushServiceErrorMissingEntitlement")]
pub const MissingEntitlement: Self = Self(3);
#[doc(alias = "CLLocationPushServiceErrorUnsupportedPlatform")]
pub const UnsupportedPlatform: Self = Self(4);
}
unsafe impl Encode for CLLocationPushServiceError {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLLocationPushServiceError {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

View File

@@ -0,0 +1,24 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait CLLocationPushServiceExtension: NSObjectProtocol {
#[cfg(feature = "block2")]
#[method(didReceiveLocationPushPayload:completion:)]
unsafe fn didReceiveLocationPushPayload_completion(
&self,
payload: &NSDictionary<NSString, AnyObject>,
completion: &block2::Block<dyn Fn()>,
);
#[optional]
#[method(serviceExtensionWillTerminate)]
unsafe fn serviceExtensionWillTerminate(&self);
}
unsafe impl ProtocolType for dyn CLLocationPushServiceExtension {}
);

View File

@@ -0,0 +1,95 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLLiveUpdateConfiguration(pub NSInteger);
impl CLLiveUpdateConfiguration {
#[doc(alias = "CLLiveUpdateConfigurationDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "CLLiveUpdateConfigurationAutomotiveNavigation")]
pub const AutomotiveNavigation: Self = Self(1);
#[doc(alias = "CLLiveUpdateConfigurationOtherNavigation")]
pub const OtherNavigation: Self = Self(2);
#[doc(alias = "CLLiveUpdateConfigurationFitness")]
pub const Fitness: Self = Self(3);
#[doc(alias = "CLLiveUpdateConfigurationAirborne")]
pub const Airborne: Self = Self(4);
}
unsafe impl Encode for CLLiveUpdateConfiguration {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLLiveUpdateConfiguration {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLUpdate;
unsafe impl ClassType for CLUpdate {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CLUpdate {}
extern_methods!(
unsafe impl CLUpdate {
#[method(isStationary)]
pub unsafe fn isStationary(&self) -> bool;
#[cfg(feature = "CLLocation")]
#[method_id(@__retain_semantics Other location)]
pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLUpdate {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLLocationUpdater;
unsafe impl ClassType for CLLocationUpdater {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for CLLocationUpdater {}
extern_methods!(
unsafe impl CLLocationUpdater {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
#[method(resume)]
pub unsafe fn resume(&self);
#[method(pause)]
pub unsafe fn pause(&self);
#[method(invalidate)]
pub unsafe fn invalidate(&self);
}
);

View File

@@ -0,0 +1,72 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLMonitor;
unsafe impl ClassType for CLMonitor {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CLMonitor {}
unsafe impl Sync for CLMonitor {}
unsafe impl NSObjectProtocol for CLMonitor {}
extern_methods!(
unsafe impl CLMonitor {
#[cfg(all(feature = "CLMonitorConfiguration", feature = "block2"))]
#[method(requestMonitorWithConfiguration:completion:)]
pub unsafe fn requestMonitorWithConfiguration_completion(
config: &CLMonitorConfiguration,
completion_handler: &block2::Block<dyn Fn(NonNull<CLMonitor>)>,
);
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other monitoredIdentifiers)]
pub unsafe fn monitoredIdentifiers(&self) -> Retained<NSArray<NSString>>;
#[cfg(feature = "CLCondition")]
#[method(addConditionForMonitoring:identifier:)]
pub unsafe fn addConditionForMonitoring_identifier(
&self,
condition: &CLCondition,
identifier: &NSString,
);
#[cfg(all(feature = "CLCondition", feature = "CLMonitoringEvent"))]
#[method(addConditionForMonitoring:identifier:assumedState:)]
pub unsafe fn addConditionForMonitoring_identifier_assumedState(
&self,
condition: &CLCondition,
identifier: &NSString,
state: CLMonitoringState,
);
#[method(removeConditionFromMonitoringWithIdentifier:)]
pub unsafe fn removeConditionFromMonitoringWithIdentifier(&self, identifier: &NSString);
#[cfg(feature = "CLMonitoringRecord")]
#[method_id(@__retain_semantics Other monitoringRecordForIdentifier:)]
pub unsafe fn monitoringRecordForIdentifier(
&self,
identifier: &NSString,
) -> Option<Retained<CLMonitoringRecord>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,50 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLMonitorConfiguration;
unsafe impl ClassType for CLMonitorConfiguration {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl Send for CLMonitorConfiguration {}
unsafe impl Sync for CLMonitorConfiguration {}
unsafe impl NSObjectProtocol for CLMonitorConfiguration {}
extern_methods!(
unsafe impl CLMonitorConfiguration {
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(all(
feature = "CLMonitor",
feature = "CLMonitoringEvent",
feature = "block2"
))]
#[method(eventHandler)]
pub unsafe fn eventHandler(
&self,
) -> NonNull<block2::Block<dyn Fn(NonNull<CLMonitor>, NonNull<CLMonitoringEvent>)>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLMonitorConfiguration {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,68 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLMonitoringState(pub NSUInteger);
impl CLMonitoringState {
#[doc(alias = "CLMonitoringStateUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CLMonitoringStateSatisfied")]
pub const Satisfied: Self = Self(1);
#[doc(alias = "CLMonitoringStateUnsatisfied")]
pub const Unsatisfied: Self = Self(2);
#[doc(alias = "CLMonitoringStateUnmonitored")]
pub const Unmonitored: Self = Self(3);
}
unsafe impl Encode for CLMonitoringState {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for CLMonitoringState {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLMonitoringEvent;
unsafe impl ClassType for CLMonitoringEvent {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLMonitoringEvent {}
unsafe impl NSObjectProtocol for CLMonitoringEvent {}
unsafe impl NSSecureCoding for CLMonitoringEvent {}
extern_methods!(
unsafe impl CLMonitoringEvent {
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[cfg(feature = "CLCondition")]
#[method_id(@__retain_semantics Other refinement)]
pub unsafe fn refinement(&self) -> Option<Retained<CLCondition>>;
#[method(state)]
pub unsafe fn state(&self) -> CLMonitoringState;
#[method_id(@__retain_semantics Other date)]
pub unsafe fn date(&self) -> Retained<NSDate>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,40 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLMonitoringRecord;
unsafe impl ClassType for CLMonitoringRecord {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLMonitoringRecord {}
unsafe impl NSObjectProtocol for CLMonitoringRecord {}
unsafe impl NSSecureCoding for CLMonitoringRecord {}
extern_methods!(
unsafe impl CLMonitoringRecord {
#[cfg(feature = "CLCondition")]
#[method_id(@__retain_semantics Other condition)]
pub unsafe fn condition(&self) -> Retained<CLCondition>;
#[cfg(feature = "CLMonitoringEvent")]
#[method_id(@__retain_semantics Other lastEvent)]
pub unsafe fn lastEvent(&self) -> Retained<CLMonitoringEvent>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,107 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
use objc2_contacts::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLPlacemark;
unsafe impl ClassType for CLPlacemark {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLPlacemark {}
unsafe impl NSCopying for CLPlacemark {}
unsafe impl NSObjectProtocol for CLPlacemark {}
unsafe impl NSSecureCoding for CLPlacemark {}
extern_methods!(
unsafe impl CLPlacemark {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithPlacemark:)]
pub unsafe fn initWithPlacemark(
this: Allocated<Self>,
placemark: &CLPlacemark,
) -> Retained<Self>;
#[cfg(feature = "CLLocation")]
#[method_id(@__retain_semantics Other location)]
pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
#[cfg(feature = "CLRegion")]
#[method_id(@__retain_semantics Other region)]
pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
#[method_id(@__retain_semantics Other timeZone)]
pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
#[deprecated = "Use @properties"]
#[method_id(@__retain_semantics Other addressDictionary)]
pub unsafe fn addressDictionary(&self) -> Option<Retained<NSDictionary>>;
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other thoroughfare)]
pub unsafe fn thoroughfare(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other subThoroughfare)]
pub unsafe fn subThoroughfare(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other locality)]
pub unsafe fn locality(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other subLocality)]
pub unsafe fn subLocality(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other administrativeArea)]
pub unsafe fn administrativeArea(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other subAdministrativeArea)]
pub unsafe fn subAdministrativeArea(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other postalCode)]
pub unsafe fn postalCode(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other ISOcountryCode)]
pub unsafe fn ISOcountryCode(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other country)]
pub unsafe fn country(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other inlandWater)]
pub unsafe fn inlandWater(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other ocean)]
pub unsafe fn ocean(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other areasOfInterest)]
pub unsafe fn areasOfInterest(&self) -> Option<Retained<NSArray<NSString>>>;
}
);
extern_methods!(
/// ContactsAdditions
unsafe impl CLPlacemark {
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
#[method_id(@__retain_semantics Other postalAddress)]
pub unsafe fn postalAddress(&self) -> Option<Retained<CNPostalAddress>>;
}
);

View File

@@ -0,0 +1,122 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_CLOSED_ENUM
#[repr(isize)] // NSInteger
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum CLRegionState {
#[doc(alias = "CLRegionStateUnknown")]
Unknown = 0,
#[doc(alias = "CLRegionStateInside")]
Inside = 1,
#[doc(alias = "CLRegionStateOutside")]
Outside = 2,
}
unsafe impl Encode for CLRegionState {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLRegionState {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLProximity(pub NSInteger);
impl CLProximity {
#[doc(alias = "CLProximityUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "CLProximityImmediate")]
pub const Immediate: Self = Self(1);
#[doc(alias = "CLProximityNear")]
pub const Near: Self = Self(2);
#[doc(alias = "CLProximityFar")]
pub const Far: Self = Self(3);
}
unsafe impl Encode for CLProximity {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLProximity {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLRegion;
unsafe impl ClassType for CLRegion {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLRegion {}
unsafe impl NSCopying for CLRegion {}
unsafe impl NSObjectProtocol for CLRegion {}
unsafe impl NSSecureCoding for CLRegion {}
extern_methods!(
unsafe impl CLRegion {
#[cfg(feature = "CLLocation")]
#[deprecated = "Please see CLCircularRegion"]
#[method_id(@__retain_semantics Init initCircularRegionWithCenter:radius:identifier:)]
pub unsafe fn initCircularRegionWithCenter_radius_identifier(
this: Allocated<Self>,
center: CLLocationCoordinate2D,
radius: CLLocationDistance,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(feature = "CLLocation")]
#[deprecated = "Please see CLCircularRegion"]
#[method(center)]
pub unsafe fn center(&self) -> CLLocationCoordinate2D;
#[cfg(feature = "CLLocation")]
#[deprecated = "Please see CLCircularRegion"]
#[method(radius)]
pub unsafe fn radius(&self) -> CLLocationDistance;
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[method(notifyOnEntry)]
pub unsafe fn notifyOnEntry(&self) -> bool;
#[method(setNotifyOnEntry:)]
pub unsafe fn setNotifyOnEntry(&self, notify_on_entry: bool);
#[method(notifyOnExit)]
pub unsafe fn notifyOnExit(&self) -> bool;
#[method(setNotifyOnExit:)]
pub unsafe fn setNotifyOnExit(&self, notify_on_exit: bool);
#[cfg(feature = "CLLocation")]
#[deprecated = "Please see CLCircularRegion"]
#[method(containsCoordinate:)]
pub unsafe fn containsCoordinate(&self, coordinate: CLLocationCoordinate2D) -> bool;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLRegion {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,53 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CLVisit;
unsafe impl ClassType for CLVisit {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for CLVisit {}
unsafe impl NSCopying for CLVisit {}
unsafe impl NSObjectProtocol for CLVisit {}
unsafe impl NSSecureCoding for CLVisit {}
extern_methods!(
unsafe impl CLVisit {
#[method_id(@__retain_semantics Other arrivalDate)]
pub unsafe fn arrivalDate(&self) -> Retained<NSDate>;
#[method_id(@__retain_semantics Other departureDate)]
pub unsafe fn departureDate(&self) -> Retained<NSDate>;
#[cfg(feature = "CLLocation")]
#[method(coordinate)]
pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
#[cfg(feature = "CLLocation")]
#[method(horizontalAccuracy)]
pub unsafe fn horizontalAccuracy(&self) -> CLLocationAccuracy;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl CLVisit {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,229 @@
// This file has been automatically generated by `objc2`'s `header-translator`.
// DO NOT EDIT
#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#[link(name = "CoreLocation", kind = "framework")]
extern "C" {}
#[cfg(feature = "CLAvailability")]
#[path = "CLAvailability.rs"]
mod __CLAvailability;
#[cfg(feature = "CLBackgroundActivitySession")]
#[path = "CLBackgroundActivitySession.rs"]
mod __CLBackgroundActivitySession;
#[cfg(feature = "CLBeaconIdentityCondition")]
#[path = "CLBeaconIdentityCondition.rs"]
mod __CLBeaconIdentityCondition;
#[cfg(feature = "CLBeaconIdentityConstraint")]
#[path = "CLBeaconIdentityConstraint.rs"]
mod __CLBeaconIdentityConstraint;
#[cfg(feature = "CLBeaconRegion")]
#[path = "CLBeaconRegion.rs"]
mod __CLBeaconRegion;
#[cfg(feature = "CLCircularGeographicCondition")]
#[path = "CLCircularGeographicCondition.rs"]
mod __CLCircularGeographicCondition;
#[cfg(feature = "CLCircularRegion")]
#[path = "CLCircularRegion.rs"]
mod __CLCircularRegion;
#[cfg(feature = "CLCondition")]
#[path = "CLCondition.rs"]
mod __CLCondition;
#[cfg(feature = "CLError")]
#[path = "CLError.rs"]
mod __CLError;
#[cfg(feature = "CLErrorDomain")]
#[path = "CLErrorDomain.rs"]
mod __CLErrorDomain;
#[cfg(feature = "CLGeocoder")]
#[path = "CLGeocoder.rs"]
mod __CLGeocoder;
#[cfg(feature = "CLHeading")]
#[path = "CLHeading.rs"]
mod __CLHeading;
#[cfg(feature = "CLLocation")]
#[path = "CLLocation.rs"]
mod __CLLocation;
#[cfg(feature = "CLLocationManager")]
#[path = "CLLocationManager.rs"]
mod __CLLocationManager;
#[cfg(feature = "CLLocationManagerDelegate")]
#[path = "CLLocationManagerDelegate.rs"]
mod __CLLocationManagerDelegate;
#[cfg(feature = "CLLocationManager_CLVisitExtensions")]
#[path = "CLLocationManager_CLVisitExtensions.rs"]
mod __CLLocationManager_CLVisitExtensions;
#[cfg(feature = "CLLocationPushServiceError")]
#[path = "CLLocationPushServiceError.rs"]
mod __CLLocationPushServiceError;
#[cfg(feature = "CLLocationPushServiceExtension")]
#[path = "CLLocationPushServiceExtension.rs"]
mod __CLLocationPushServiceExtension;
#[cfg(feature = "CLLocationUpdater")]
#[path = "CLLocationUpdater.rs"]
mod __CLLocationUpdater;
#[cfg(feature = "CLMonitor")]
#[path = "CLMonitor.rs"]
mod __CLMonitor;
#[cfg(feature = "CLMonitorConfiguration")]
#[path = "CLMonitorConfiguration.rs"]
mod __CLMonitorConfiguration;
#[cfg(feature = "CLMonitoringEvent")]
#[path = "CLMonitoringEvent.rs"]
mod __CLMonitoringEvent;
#[cfg(feature = "CLMonitoringRecord")]
#[path = "CLMonitoringRecord.rs"]
mod __CLMonitoringRecord;
#[cfg(feature = "CLPlacemark")]
#[path = "CLPlacemark.rs"]
mod __CLPlacemark;
#[cfg(feature = "CLRegion")]
#[path = "CLRegion.rs"]
mod __CLRegion;
#[cfg(feature = "CLVisit")]
#[path = "CLVisit.rs"]
mod __CLVisit;
#[cfg(feature = "CLBackgroundActivitySession")]
pub use self::__CLBackgroundActivitySession::CLBackgroundActivitySession;
#[cfg(all(feature = "CLBeaconIdentityCondition", feature = "CLCondition"))]
pub use self::__CLBeaconIdentityCondition::CLBeaconIdentityCondition;
#[cfg(feature = "CLBeaconIdentityCondition")]
pub use self::__CLBeaconIdentityCondition::CLBeaconMajorValue;
#[cfg(feature = "CLBeaconIdentityCondition")]
pub use self::__CLBeaconIdentityCondition::CLBeaconMinorValue;
#[cfg(all(
feature = "CLBeaconIdentityCondition",
feature = "CLBeaconIdentityConstraint",
feature = "CLCondition"
))]
pub use self::__CLBeaconIdentityConstraint::CLBeaconIdentityConstraint;
#[cfg(feature = "CLBeaconRegion")]
pub use self::__CLBeaconRegion::CLBeacon;
#[cfg(all(feature = "CLBeaconRegion", feature = "CLRegion"))]
pub use self::__CLBeaconRegion::CLBeaconRegion;
#[cfg(all(feature = "CLCircularGeographicCondition", feature = "CLCondition"))]
pub use self::__CLCircularGeographicCondition::CLCircularGeographicCondition;
#[cfg(all(feature = "CLCircularRegion", feature = "CLRegion"))]
pub use self::__CLCircularRegion::CLCircularRegion;
#[cfg(feature = "CLCondition")]
pub use self::__CLCondition::CLCondition;
#[cfg(feature = "CLError")]
pub use self::__CLError::kCLErrorUserInfoAlternateRegionKey;
#[cfg(feature = "CLError")]
pub use self::__CLError::CLError;
#[cfg(feature = "CLErrorDomain")]
pub use self::__CLErrorDomain::kCLErrorDomain;
#[cfg(all(feature = "CLGeocoder", feature = "CLPlacemark", feature = "block2"))]
pub use self::__CLGeocoder::CLGeocodeCompletionHandler;
#[cfg(feature = "CLGeocoder")]
pub use self::__CLGeocoder::CLGeocoder;
#[cfg(all(feature = "CLHeading", feature = "CLLocation"))]
pub use self::__CLHeading::kCLHeadingFilterNone;
#[cfg(feature = "CLHeading")]
pub use self::__CLHeading::CLHeading;
#[cfg(feature = "CLHeading")]
pub use self::__CLHeading::CLHeadingComponentValue;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLDistanceFilterNone;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyBest;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyBestForNavigation;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyHundredMeters;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyKilometer;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyNearestTenMeters;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyReduced;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationAccuracyThreeKilometers;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::kCLLocationCoordinate2DInvalid;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLFloor;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocation;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationAccuracy;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationCoordinate2D;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationCoordinate2DIsValid;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationCoordinate2DMake;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationDegrees;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationDirection;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationDirectionAccuracy;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationDistance;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationDistanceMax;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationSourceInformation;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationSpeed;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLLocationSpeedAccuracy;
#[cfg(feature = "CLLocation")]
pub use self::__CLLocation::CLTimeIntervalMax;
#[cfg(feature = "CLLocationManager")]
pub use self::__CLLocationManager::CLAccuracyAuthorization;
#[cfg(feature = "CLLocationManager")]
pub use self::__CLLocationManager::CLActivityType;
#[cfg(feature = "CLLocationManager")]
pub use self::__CLLocationManager::CLAuthorizationStatus;
#[cfg(feature = "CLLocationManager")]
pub use self::__CLLocationManager::CLDeviceOrientation;
#[cfg(feature = "CLLocationManager")]
pub use self::__CLLocationManager::CLLocationManager;
#[cfg(feature = "CLLocationManagerDelegate")]
pub use self::__CLLocationManagerDelegate::CLLocationManagerDelegate;
#[cfg(feature = "CLLocationPushServiceError")]
pub use self::__CLLocationPushServiceError::CLLocationPushServiceError;
#[cfg(feature = "CLLocationPushServiceError")]
pub use self::__CLLocationPushServiceError::CLLocationPushServiceErrorDomain;
#[cfg(feature = "CLLocationPushServiceExtension")]
pub use self::__CLLocationPushServiceExtension::CLLocationPushServiceExtension;
#[cfg(feature = "CLLocationUpdater")]
pub use self::__CLLocationUpdater::CLLiveUpdateConfiguration;
#[cfg(feature = "CLLocationUpdater")]
pub use self::__CLLocationUpdater::CLLocationUpdater;
#[cfg(feature = "CLLocationUpdater")]
pub use self::__CLLocationUpdater::CLUpdate;
#[cfg(feature = "CLMonitor")]
pub use self::__CLMonitor::CLMonitor;
#[cfg(feature = "CLMonitorConfiguration")]
pub use self::__CLMonitorConfiguration::CLMonitorConfiguration;
#[cfg(feature = "CLMonitoringEvent")]
pub use self::__CLMonitoringEvent::CLMonitoringEvent;
#[cfg(feature = "CLMonitoringEvent")]
pub use self::__CLMonitoringEvent::CLMonitoringState;
#[cfg(feature = "CLMonitoringRecord")]
pub use self::__CLMonitoringRecord::CLMonitoringRecord;
#[cfg(feature = "CLPlacemark")]
pub use self::__CLPlacemark::CLPlacemark;
#[cfg(feature = "CLRegion")]
pub use self::__CLRegion::CLProximity;
#[cfg(feature = "CLRegion")]
pub use self::__CLRegion::CLRegion;
#[cfg(feature = "CLRegion")]
pub use self::__CLRegion::CLRegionState;
#[cfg(feature = "CLVisit")]
pub use self::__CLVisit::CLVisit;

20
vendor/objc2-core-location/src/lib.rs vendored Normal file
View File

@@ -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(docsrs, feature(doc_auto_cfg))]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc2-core-location/0.2.2")]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

View File

@@ -0,0 +1,20 @@
framework = "CoreLocation"
crate = "objc2-core-location"
required-dependencies = ["objc2-foundation"]
# macos = "10.6"
macos = "10.11" # Temporarily raised since `CoreLocation` imports `Contacts`
maccatalyst = "13.0"
ios = "2.0"
tvos = "9.0"
watchos = "2.0"
visionos = "1.0"
# error: translator assertion failure: (left `"CLLocation"`) (right `"const CLLocation"`)
class.CLLocation.methods."getDistanceFrom:".skipped = true
class.CLLocation.methods."distanceFromLocation:".skipped = true
# Needs `dispatch_queue_t`
class.CLLocationUpdater.methods."liveUpdaterWithQueue:handler:".skipped = true
class.CLLocationUpdater.methods."liveUpdaterWithConfiguration:queue:handler:".skipped = true
class.CLMonitorConfiguration.methods.queue.skipped = true
class.CLMonitorConfiguration.methods."configWithMonitorName:queue:eventHandler:".skipped = true