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"))]
23unsafe impl MKAnnotation for MKPlacemark {}
24
25#[cfg(feature = "objc2-core-location")]
26unsafe impl NSCoding for MKPlacemark {}
27
28#[cfg(feature = "objc2-core-location")]
29unsafe impl NSCopying for MKPlacemark {}
30
31#[cfg(feature = "objc2-core-location")]
32unsafe impl CopyingHelper for MKPlacemark {
33 type Result = Self;
34}
35
36#[cfg(feature = "objc2-core-location")]
37unsafe impl NSObjectProtocol for MKPlacemark {}
38
39#[cfg(feature = "objc2-core-location")]
40unsafe impl NSSecureCoding for MKPlacemark {}
41
42#[cfg(feature = "objc2-core-location")]
43impl MKPlacemark {
44 extern_methods!(
45 #[unsafe(method(initWithCoordinate:))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn initWithCoordinate(
48 this: Allocated<Self>,
49 coordinate: CLLocationCoordinate2D,
50 ) -> Retained<Self>;
51
52 #[unsafe(method(initWithCoordinate:addressDictionary:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initWithCoordinate_addressDictionary(
55 this: Allocated<Self>,
56 coordinate: CLLocationCoordinate2D,
57 address_dictionary: Option<&NSDictionary<NSString, AnyObject>>,
58 ) -> Retained<Self>;
59
60 #[cfg(feature = "objc2-contacts")]
61 #[cfg(not(target_os = "tvos"))]
62 #[unsafe(method(initWithCoordinate:postalAddress:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithCoordinate_postalAddress(
65 this: Allocated<Self>,
66 coordinate: CLLocationCoordinate2D,
67 postal_address: &CNPostalAddress,
68 ) -> Retained<Self>;
69
70 #[unsafe(method(countryCode))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn countryCode(&self) -> Option<Retained<NSString>>;
73 );
74}
75
76#[cfg(feature = "objc2-core-location")]
78impl MKPlacemark {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new() -> Retained<Self>;
87
88 #[unsafe(method(initWithPlacemark:))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn initWithPlacemark(
91 this: Allocated<Self>,
92 placemark: &CLPlacemark,
93 ) -> Retained<Self>;
94 );
95}