objc2_map_kit/generated/
MKCircle.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkcircle?language=objc)
12    #[unsafe(super(MKShape, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "MKShape")]
15    pub struct MKCircle;
16);
17
18#[cfg(all(feature = "MKAnnotation", feature = "MKShape"))]
19unsafe impl MKAnnotation for MKCircle {}
20
21#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay", feature = "MKShape"))]
22unsafe impl MKOverlay for MKCircle {}
23
24#[cfg(feature = "MKShape")]
25unsafe impl NSObjectProtocol for MKCircle {}
26
27#[cfg(feature = "MKShape")]
28impl MKCircle {
29    extern_methods!(
30        #[cfg(feature = "objc2-core-location")]
31        #[unsafe(method(circleWithCenterCoordinate:radius:))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn circleWithCenterCoordinate_radius(
34            coord: CLLocationCoordinate2D,
35            radius: CLLocationDistance,
36        ) -> Retained<Self>;
37
38        #[cfg(feature = "MKGeometry")]
39        #[unsafe(method(circleWithMapRect:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn circleWithMapRect(map_rect: MKMapRect) -> Retained<Self>;
42
43        #[cfg(feature = "objc2-core-location")]
44        #[unsafe(method(coordinate))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
47
48        #[cfg(feature = "objc2-core-location")]
49        #[unsafe(method(radius))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn radius(&self) -> CLLocationDistance;
52
53        #[cfg(feature = "MKGeometry")]
54        #[unsafe(method(boundingMapRect))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn boundingMapRect(&self) -> MKMapRect;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61#[cfg(feature = "MKShape")]
62impl MKCircle {
63    extern_methods!(
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71    );
72}