objc2_map_kit/generated/
MKPointAnnotation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkpointannotation?language=objc)
14    #[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"))]
21extern_conformance!(
22    unsafe impl MKAnnotation for MKPointAnnotation {}
23);
24
25#[cfg(feature = "MKShape")]
26extern_conformance!(
27    unsafe impl NSObjectProtocol for MKPointAnnotation {}
28);
29
30#[cfg(feature = "MKShape")]
31impl MKPointAnnotation {
32    extern_methods!(
33        #[unsafe(method(init))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37        #[cfg(feature = "objc2-core-location")]
38        #[unsafe(method(initWithCoordinate:))]
39        #[unsafe(method_family = init)]
40        pub unsafe fn initWithCoordinate(
41            this: Allocated<Self>,
42            coordinate: CLLocationCoordinate2D,
43        ) -> Retained<Self>;
44
45        #[cfg(feature = "objc2-core-location")]
46        #[unsafe(method(initWithCoordinate:title:subtitle:))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn initWithCoordinate_title_subtitle(
49            this: Allocated<Self>,
50            coordinate: CLLocationCoordinate2D,
51            title: Option<&NSString>,
52            subtitle: Option<&NSString>,
53        ) -> Retained<Self>;
54
55        #[cfg(feature = "objc2-core-location")]
56        #[unsafe(method(coordinate))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
59
60        #[cfg(feature = "objc2-core-location")]
61        /// Setter for [`coordinate`][Self::coordinate].
62        #[unsafe(method(setCoordinate:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn setCoordinate(&self, coordinate: CLLocationCoordinate2D);
65    );
66}
67
68/// Methods declared on superclass `NSObject`.
69#[cfg(feature = "MKShape")]
70impl MKPointAnnotation {
71    extern_methods!(
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new() -> Retained<Self>;
75    );
76}