objc2_map_kit/generated/
MKPointAnnotation.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(MKShape, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "MKShape")]
17 pub struct MKPointAnnotation;
18);
19
20#[cfg(all(feature = "MKAnnotation", feature = "MKShape"))]
21unsafe impl MKAnnotation for MKPointAnnotation {}
22
23#[cfg(feature = "MKShape")]
24unsafe impl NSObjectProtocol for MKPointAnnotation {}
25
26#[cfg(feature = "MKShape")]
27impl MKPointAnnotation {
28 extern_methods!(
29 #[unsafe(method(init))]
30 #[unsafe(method_family = init)]
31 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33 #[cfg(feature = "objc2-core-location")]
34 #[unsafe(method(initWithCoordinate:))]
35 #[unsafe(method_family = init)]
36 pub unsafe fn initWithCoordinate(
37 this: Allocated<Self>,
38 coordinate: CLLocationCoordinate2D,
39 ) -> Retained<Self>;
40
41 #[cfg(feature = "objc2-core-location")]
42 #[unsafe(method(initWithCoordinate:title:subtitle:))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn initWithCoordinate_title_subtitle(
45 this: Allocated<Self>,
46 coordinate: CLLocationCoordinate2D,
47 title: Option<&NSString>,
48 subtitle: Option<&NSString>,
49 ) -> Retained<Self>;
50
51 #[cfg(feature = "objc2-core-location")]
52 #[unsafe(method(coordinate))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
55
56 #[cfg(feature = "objc2-core-location")]
57 #[unsafe(method(setCoordinate:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setCoordinate(&self, coordinate: CLLocationCoordinate2D);
61 );
62}
63
64#[cfg(feature = "MKShape")]
66impl MKPointAnnotation {
67 extern_methods!(
68 #[unsafe(method(new))]
69 #[unsafe(method_family = new)]
70 pub unsafe fn new() -> Retained<Self>;
71 );
72}