objc2_ui_kit/generated/
UISearchDisplayController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
16 pub struct UISearchDisplayController;
17);
18
19extern_conformance!(
20 unsafe impl NSObjectProtocol for UISearchDisplayController {}
21);
22
23impl UISearchDisplayController {
24 extern_methods!(
25 #[cfg(all(
26 feature = "UIResponder",
27 feature = "UISearchBar",
28 feature = "UIView",
29 feature = "UIViewController"
30 ))]
31 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
32 #[unsafe(method(initWithSearchBar:contentsController:))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn initWithSearchBar_contentsController(
35 this: Allocated<Self>,
36 search_bar: &UISearchBar,
37 view_controller: &UIViewController,
38 ) -> Retained<Self>;
39
40 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
41 #[unsafe(method(delegate))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn delegate(
44 &self,
45 ) -> Option<Retained<ProtocolObject<dyn UISearchDisplayDelegate>>>;
46
47 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
49 #[unsafe(method(setDelegate:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setDelegate(
52 &self,
53 delegate: Option<&ProtocolObject<dyn UISearchDisplayDelegate>>,
54 );
55
56 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
57 #[unsafe(method(isActive))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn isActive(&self) -> bool;
60
61 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
63 #[unsafe(method(setActive:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setActive(&self, active: bool);
66
67 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
68 #[unsafe(method(setActive:animated:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn setActive_animated(&self, visible: bool, animated: bool);
71
72 #[cfg(all(feature = "UIResponder", feature = "UISearchBar", feature = "UIView"))]
73 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
74 #[unsafe(method(searchBar))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn searchBar(&self) -> Retained<UISearchBar>;
77
78 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
79 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
80 #[unsafe(method(searchContentsController))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn searchContentsController(&self) -> Retained<UIViewController>;
83
84 #[cfg(all(
85 feature = "UIResponder",
86 feature = "UIScrollView",
87 feature = "UITableView",
88 feature = "UIView"
89 ))]
90 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
91 #[unsafe(method(searchResultsTableView))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn searchResultsTableView(&self) -> Retained<UITableView>;
94
95 #[cfg(feature = "UITableView")]
96 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
97 #[unsafe(method(searchResultsDataSource))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn searchResultsDataSource(
100 &self,
101 ) -> Option<Retained<ProtocolObject<dyn UITableViewDataSource>>>;
102
103 #[cfg(feature = "UITableView")]
104 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
107 #[unsafe(method(setSearchResultsDataSource:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setSearchResultsDataSource(
110 &self,
111 search_results_data_source: Option<&ProtocolObject<dyn UITableViewDataSource>>,
112 );
113
114 #[cfg(all(feature = "UIScrollView", feature = "UITableView"))]
115 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
116 #[unsafe(method(searchResultsDelegate))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn searchResultsDelegate(
119 &self,
120 ) -> Option<Retained<ProtocolObject<dyn UITableViewDelegate>>>;
121
122 #[cfg(all(feature = "UIScrollView", feature = "UITableView"))]
123 #[deprecated = "UISearchDisplayController has been replaced with UISearchController"]
126 #[unsafe(method(setSearchResultsDelegate:))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn setSearchResultsDelegate(
129 &self,
130 search_results_delegate: Option<&ProtocolObject<dyn UITableViewDelegate>>,
131 );
132
133 #[unsafe(method(searchResultsTitle))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn searchResultsTitle(&self) -> Option<Retained<NSString>>;
136
137 #[unsafe(method(setSearchResultsTitle:))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn setSearchResultsTitle(&self, search_results_title: Option<&NSString>);
141
142 #[unsafe(method(displaysSearchBarInNavigationBar))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn displaysSearchBarInNavigationBar(&self) -> bool;
145
146 #[unsafe(method(setDisplaysSearchBarInNavigationBar:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setDisplaysSearchBarInNavigationBar(
150 &self,
151 displays_search_bar_in_navigation_bar: bool,
152 );
153
154 #[cfg(feature = "UINavigationItem")]
155 #[unsafe(method(navigationItem))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn navigationItem(&self) -> Option<Retained<UINavigationItem>>;
158 );
159}
160
161impl UISearchDisplayController {
163 extern_methods!(
164 #[unsafe(method(init))]
165 #[unsafe(method_family = init)]
166 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
167
168 #[unsafe(method(new))]
169 #[unsafe(method_family = new)]
170 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
171 );
172}
173
174extern_protocol!(
175 pub unsafe trait UISearchDisplayDelegate: NSObjectProtocol + MainThreadOnly {
177 #[deprecated]
178 #[optional]
179 #[unsafe(method(searchDisplayControllerWillBeginSearch:))]
180 #[unsafe(method_family = none)]
181 unsafe fn searchDisplayControllerWillBeginSearch(
182 &self,
183 controller: &UISearchDisplayController,
184 );
185
186 #[deprecated]
187 #[optional]
188 #[unsafe(method(searchDisplayControllerDidBeginSearch:))]
189 #[unsafe(method_family = none)]
190 unsafe fn searchDisplayControllerDidBeginSearch(
191 &self,
192 controller: &UISearchDisplayController,
193 );
194
195 #[deprecated]
196 #[optional]
197 #[unsafe(method(searchDisplayControllerWillEndSearch:))]
198 #[unsafe(method_family = none)]
199 unsafe fn searchDisplayControllerWillEndSearch(
200 &self,
201 controller: &UISearchDisplayController,
202 );
203
204 #[deprecated]
205 #[optional]
206 #[unsafe(method(searchDisplayControllerDidEndSearch:))]
207 #[unsafe(method_family = none)]
208 unsafe fn searchDisplayControllerDidEndSearch(
209 &self,
210 controller: &UISearchDisplayController,
211 );
212
213 #[cfg(all(
214 feature = "UIResponder",
215 feature = "UIScrollView",
216 feature = "UITableView",
217 feature = "UIView"
218 ))]
219 #[deprecated]
220 #[optional]
221 #[unsafe(method(searchDisplayController:didLoadSearchResultsTableView:))]
222 #[unsafe(method_family = none)]
223 unsafe fn searchDisplayController_didLoadSearchResultsTableView(
224 &self,
225 controller: &UISearchDisplayController,
226 table_view: &UITableView,
227 );
228
229 #[cfg(all(
230 feature = "UIResponder",
231 feature = "UIScrollView",
232 feature = "UITableView",
233 feature = "UIView"
234 ))]
235 #[deprecated]
236 #[optional]
237 #[unsafe(method(searchDisplayController:willUnloadSearchResultsTableView:))]
238 #[unsafe(method_family = none)]
239 unsafe fn searchDisplayController_willUnloadSearchResultsTableView(
240 &self,
241 controller: &UISearchDisplayController,
242 table_view: &UITableView,
243 );
244
245 #[cfg(all(
246 feature = "UIResponder",
247 feature = "UIScrollView",
248 feature = "UITableView",
249 feature = "UIView"
250 ))]
251 #[deprecated]
252 #[optional]
253 #[unsafe(method(searchDisplayController:willShowSearchResultsTableView:))]
254 #[unsafe(method_family = none)]
255 unsafe fn searchDisplayController_willShowSearchResultsTableView(
256 &self,
257 controller: &UISearchDisplayController,
258 table_view: &UITableView,
259 );
260
261 #[cfg(all(
262 feature = "UIResponder",
263 feature = "UIScrollView",
264 feature = "UITableView",
265 feature = "UIView"
266 ))]
267 #[deprecated]
268 #[optional]
269 #[unsafe(method(searchDisplayController:didShowSearchResultsTableView:))]
270 #[unsafe(method_family = none)]
271 unsafe fn searchDisplayController_didShowSearchResultsTableView(
272 &self,
273 controller: &UISearchDisplayController,
274 table_view: &UITableView,
275 );
276
277 #[cfg(all(
278 feature = "UIResponder",
279 feature = "UIScrollView",
280 feature = "UITableView",
281 feature = "UIView"
282 ))]
283 #[deprecated]
284 #[optional]
285 #[unsafe(method(searchDisplayController:willHideSearchResultsTableView:))]
286 #[unsafe(method_family = none)]
287 unsafe fn searchDisplayController_willHideSearchResultsTableView(
288 &self,
289 controller: &UISearchDisplayController,
290 table_view: &UITableView,
291 );
292
293 #[cfg(all(
294 feature = "UIResponder",
295 feature = "UIScrollView",
296 feature = "UITableView",
297 feature = "UIView"
298 ))]
299 #[deprecated]
300 #[optional]
301 #[unsafe(method(searchDisplayController:didHideSearchResultsTableView:))]
302 #[unsafe(method_family = none)]
303 unsafe fn searchDisplayController_didHideSearchResultsTableView(
304 &self,
305 controller: &UISearchDisplayController,
306 table_view: &UITableView,
307 );
308
309 #[deprecated]
310 #[optional]
311 #[unsafe(method(searchDisplayController:shouldReloadTableForSearchString:))]
312 #[unsafe(method_family = none)]
313 unsafe fn searchDisplayController_shouldReloadTableForSearchString(
314 &self,
315 controller: &UISearchDisplayController,
316 search_string: Option<&NSString>,
317 ) -> bool;
318
319 #[deprecated]
320 #[optional]
321 #[unsafe(method(searchDisplayController:shouldReloadTableForSearchScope:))]
322 #[unsafe(method_family = none)]
323 unsafe fn searchDisplayController_shouldReloadTableForSearchScope(
324 &self,
325 controller: &UISearchDisplayController,
326 search_option: NSInteger,
327 ) -> bool;
328 }
329);