objc2_map_kit/generated/
MKLocalSearchRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct MKLocalSearchResultType(pub NSUInteger);
15bitflags::bitflags! {
16 impl MKLocalSearchResultType: NSUInteger {
17 #[doc(alias = "MKLocalSearchResultTypeAddress")]
18 const Address = 1<<0;
19 #[doc(alias = "MKLocalSearchResultTypePointOfInterest")]
20 const PointOfInterest = 1<<1;
21 #[doc(alias = "MKLocalSearchResultTypePhysicalFeature")]
22 const PhysicalFeature = 1<<2;
23 }
24}
25
26unsafe impl Encode for MKLocalSearchResultType {
27 const ENCODING: Encoding = NSUInteger::ENCODING;
28}
29
30unsafe impl RefEncode for MKLocalSearchResultType {
31 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34extern_class!(
35 #[unsafe(super(NSObject))]
37 #[derive(Debug, PartialEq, Eq, Hash)]
38 pub struct MKLocalSearchRequest;
39);
40
41extern_conformance!(
42 unsafe impl NSCopying for MKLocalSearchRequest {}
43);
44
45unsafe impl CopyingHelper for MKLocalSearchRequest {
46 type Result = Self;
47}
48
49extern_conformance!(
50 unsafe impl NSObjectProtocol for MKLocalSearchRequest {}
51);
52
53impl MKLocalSearchRequest {
54 extern_methods!(
55 #[unsafe(method(init))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59 #[unsafe(method(initWithNaturalLanguageQuery:))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn initWithNaturalLanguageQuery(
62 this: Allocated<Self>,
63 natural_language_query: &NSString,
64 ) -> Retained<Self>;
65
66 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
67 #[unsafe(method(initWithNaturalLanguageQuery:region:))]
68 #[unsafe(method_family = init)]
69 pub unsafe fn initWithNaturalLanguageQuery_region(
70 this: Allocated<Self>,
71 natural_language_query: &NSString,
72 region: MKCoordinateRegion,
73 ) -> Retained<Self>;
74
75 #[unsafe(method(naturalLanguageQuery))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn naturalLanguageQuery(&self) -> Option<Retained<NSString>>;
78
79 #[unsafe(method(setNaturalLanguageQuery:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setNaturalLanguageQuery(&self, natural_language_query: Option<&NSString>);
83
84 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
85 #[unsafe(method(region))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn region(&self) -> MKCoordinateRegion;
88
89 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
90 #[unsafe(method(setRegion:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setRegion(&self, region: MKCoordinateRegion);
94
95 #[cfg(feature = "MKTypes")]
96 #[unsafe(method(regionPriority))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn regionPriority(&self) -> MKLocalSearchRegionPriority;
99
100 #[cfg(feature = "MKTypes")]
101 #[unsafe(method(setRegionPriority:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn setRegionPriority(&self, region_priority: MKLocalSearchRegionPriority);
105
106 #[unsafe(method(resultTypes))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn resultTypes(&self) -> MKLocalSearchResultType;
109
110 #[unsafe(method(setResultTypes:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn setResultTypes(&self, result_types: MKLocalSearchResultType);
114
115 #[cfg(feature = "MKPointOfInterestFilter")]
116 #[unsafe(method(pointOfInterestFilter))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
119
120 #[cfg(feature = "MKPointOfInterestFilter")]
121 #[unsafe(method(setPointOfInterestFilter:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setPointOfInterestFilter(
125 &self,
126 point_of_interest_filter: Option<&MKPointOfInterestFilter>,
127 );
128
129 #[cfg(feature = "MKAddressFilter")]
130 #[unsafe(method(addressFilter))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn addressFilter(&self) -> Option<Retained<MKAddressFilter>>;
133
134 #[cfg(feature = "MKAddressFilter")]
135 #[unsafe(method(setAddressFilter:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setAddressFilter(&self, address_filter: Option<&MKAddressFilter>);
139 );
140}
141
142impl MKLocalSearchRequest {
144 extern_methods!(
145 #[unsafe(method(new))]
146 #[unsafe(method_family = new)]
147 pub unsafe fn new() -> Retained<Self>;
148 );
149}