objc2_map_kit/generated/
MKPlacemark.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-contacts")]
6#[cfg(not(target_os = "tvos"))]
7use objc2_contacts::*;
8#[cfg(feature = "objc2-core-location")]
9use objc2_core_location::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15 #[unsafe(super(CLPlacemark, NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 #[cfg(feature = "objc2-core-location")]
19 pub struct MKPlacemark;
20);
21
22#[cfg(all(feature = "MKAnnotation", feature = "objc2-core-location"))]
23extern_conformance!(
24 unsafe impl MKAnnotation for MKPlacemark {}
25);
26
27#[cfg(feature = "objc2-core-location")]
28extern_conformance!(
29 unsafe impl NSCoding for MKPlacemark {}
30);
31
32#[cfg(feature = "objc2-core-location")]
33extern_conformance!(
34 unsafe impl NSCopying for MKPlacemark {}
35);
36
37#[cfg(feature = "objc2-core-location")]
38unsafe impl CopyingHelper for MKPlacemark {
39 type Result = Self;
40}
41
42#[cfg(feature = "objc2-core-location")]
43extern_conformance!(
44 unsafe impl NSObjectProtocol for MKPlacemark {}
45);
46
47#[cfg(feature = "objc2-core-location")]
48extern_conformance!(
49 unsafe impl NSSecureCoding for MKPlacemark {}
50);
51
52#[cfg(feature = "objc2-core-location")]
53impl MKPlacemark {
54 extern_methods!(
55 #[unsafe(method(initWithCoordinate:))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn initWithCoordinate(
58 this: Allocated<Self>,
59 coordinate: CLLocationCoordinate2D,
60 ) -> Retained<Self>;
61
62 #[unsafe(method(initWithCoordinate:addressDictionary:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithCoordinate_addressDictionary(
65 this: Allocated<Self>,
66 coordinate: CLLocationCoordinate2D,
67 address_dictionary: Option<&NSDictionary<NSString, AnyObject>>,
68 ) -> Retained<Self>;
69
70 #[cfg(feature = "objc2-contacts")]
71 #[cfg(not(target_os = "tvos"))]
72 #[unsafe(method(initWithCoordinate:postalAddress:))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn initWithCoordinate_postalAddress(
75 this: Allocated<Self>,
76 coordinate: CLLocationCoordinate2D,
77 postal_address: &CNPostalAddress,
78 ) -> Retained<Self>;
79
80 #[unsafe(method(countryCode))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn countryCode(&self) -> Option<Retained<NSString>>;
83 );
84}
85
86#[cfg(feature = "objc2-core-location")]
88impl MKPlacemark {
89 extern_methods!(
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub unsafe fn new() -> Retained<Self>;
97
98 #[unsafe(method(initWithPlacemark:))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn initWithPlacemark(
101 this: Allocated<Self>,
102 placemark: &CLPlacemark,
103 ) -> Retained<Self>;
104 );
105}