objc2_map_kit/generated/
MKAddressRepresentations.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct MKAddressRepresentationsContextStyle(pub NSInteger);
14impl MKAddressRepresentationsContextStyle {
15 #[doc(alias = "MKAddressRepresentationsContextStyleAutomatic")]
16 pub const Automatic: Self = Self(0);
17 #[doc(alias = "MKAddressRepresentationsContextStyleShort")]
18 pub const Short: Self = Self(1);
19 #[doc(alias = "MKAddressRepresentationsContextStyleFull")]
20 pub const Full: Self = Self(2);
21}
22
23unsafe impl Encode for MKAddressRepresentationsContextStyle {
24 const ENCODING: Encoding = NSInteger::ENCODING;
25}
26
27unsafe impl RefEncode for MKAddressRepresentationsContextStyle {
28 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
29}
30
31extern_class!(
32 #[unsafe(super(NSObject))]
34 #[derive(Debug, PartialEq, Eq, Hash)]
35 pub struct MKAddressRepresentations;
36);
37
38extern_conformance!(
39 unsafe impl NSObjectProtocol for MKAddressRepresentations {}
40);
41
42impl MKAddressRepresentations {
43 extern_methods!(
44 #[unsafe(method(init))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48 #[unsafe(method(new))]
49 #[unsafe(method_family = new)]
50 pub unsafe fn new() -> Retained<Self>;
51
52 #[unsafe(method(fullAddressIncludingRegion:singleLine:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn fullAddressIncludingRegion_singleLine(
55 &self,
56 including_region: bool,
57 single_line: bool,
58 ) -> Option<Retained<NSString>>;
59
60 #[unsafe(method(cityName))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn cityName(&self) -> Option<Retained<NSString>>;
63
64 #[unsafe(method(cityWithContext))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn cityWithContext(&self) -> Option<Retained<NSString>>;
67
68 #[unsafe(method(cityWithContextUsingStyle:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn cityWithContextUsingStyle(
71 &self,
72 style: MKAddressRepresentationsContextStyle,
73 ) -> Option<Retained<NSString>>;
74
75 #[unsafe(method(regionName))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn regionName(&self) -> Option<Retained<NSString>>;
78
79 #[unsafe(method(regionCode))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn regionCode(&self) -> Option<Retained<NSString>>;
82 );
83}