objc2_map_kit/generated/
MKCircle.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7
8use crate::*;
9
10extern_class!(
11 #[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"))]
19extern_conformance!(
20 unsafe impl MKAnnotation for MKCircle {}
21);
22
23#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay", feature = "MKShape"))]
24extern_conformance!(
25 unsafe impl MKOverlay for MKCircle {}
26);
27
28#[cfg(feature = "MKShape")]
29extern_conformance!(
30 unsafe impl NSObjectProtocol for MKCircle {}
31);
32
33#[cfg(feature = "MKShape")]
34impl MKCircle {
35 extern_methods!(
36 #[cfg(feature = "objc2-core-location")]
37 #[unsafe(method(circleWithCenterCoordinate:radius:))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn circleWithCenterCoordinate_radius(
40 coord: CLLocationCoordinate2D,
41 radius: CLLocationDistance,
42 ) -> Retained<Self>;
43
44 #[cfg(feature = "MKGeometry")]
45 #[unsafe(method(circleWithMapRect:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn circleWithMapRect(map_rect: MKMapRect) -> Retained<Self>;
48
49 #[cfg(feature = "objc2-core-location")]
50 #[unsafe(method(coordinate))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
53
54 #[cfg(feature = "objc2-core-location")]
55 #[unsafe(method(radius))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn radius(&self) -> CLLocationDistance;
58
59 #[cfg(feature = "MKGeometry")]
60 #[unsafe(method(boundingMapRect))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn boundingMapRect(&self) -> MKMapRect;
63 );
64}
65
66#[cfg(feature = "MKShape")]
68impl MKCircle {
69 extern_methods!(
70 #[unsafe(method(init))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new() -> Retained<Self>;
77 );
78}