objc2_ui_kit/generated/
UISearchTab.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UITab, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "UITab")]
16 pub struct UISearchTab;
17);
18
19#[cfg(feature = "UITab")]
20extern_conformance!(
21 unsafe impl NSObjectProtocol for UISearchTab {}
22);
23
24#[cfg(feature = "UITab")]
25impl UISearchTab {
26 extern_methods!(
27 #[unsafe(method(automaticallyActivatesSearch))]
32 #[unsafe(method_family = none)]
33 pub fn automaticallyActivatesSearch(&self) -> bool;
34
35 #[unsafe(method(setAutomaticallyActivatesSearch:))]
37 #[unsafe(method_family = none)]
38 pub fn setAutomaticallyActivatesSearch(&self, automatically_activates_search: bool);
39
40 #[cfg(all(
41 feature = "UIResponder",
42 feature = "UIViewController",
43 feature = "block2"
44 ))]
45 #[unsafe(method(initWithViewControllerProvider:))]
51 #[unsafe(method_family = init)]
52 pub unsafe fn initWithViewControllerProvider(
53 this: Allocated<Self>,
54 view_controller_provider: Option<
55 &block2::DynBlock<dyn Fn(NonNull<UITab>) -> NonNull<UIViewController>>,
56 >,
57 ) -> Retained<Self>;
58 );
59}
60
61#[cfg(feature = "UITab")]
63impl UISearchTab {
64 extern_methods!(
65 #[cfg(all(
66 feature = "UIImage",
67 feature = "UIResponder",
68 feature = "UIViewController",
69 feature = "block2"
70 ))]
71 #[unsafe(method(initWithTitle:image:identifier:viewControllerProvider:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithTitle_image_identifier_viewControllerProvider(
81 this: Allocated<Self>,
82 title: &NSString,
83 image: Option<&UIImage>,
84 identifier: &NSString,
85 view_controller_provider: Option<
86 &block2::DynBlock<dyn Fn(NonNull<UITab>) -> NonNull<UIViewController>>,
87 >,
88 ) -> Retained<Self>;
89
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(mtm: MainThreadMarker) -> Retained<Self>;
97 );
98}