objc2_ui_kit/generated/
UITabSidebarItem.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 pub struct UITabSidebarItem;
16);
17
18unsafe impl NSCopying for UITabSidebarItem {}
19
20unsafe impl CopyingHelper for UITabSidebarItem {
21 type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for UITabSidebarItem {}
25
26impl UITabSidebarItem {
27 extern_methods!(
28 #[cfg(feature = "UITab")]
29 #[unsafe(method(tab))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn tab(&self) -> Option<Retained<UITab>>;
33
34 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
35 #[unsafe(method(action))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn action(&self) -> Option<Retained<UIAction>>;
39
40 #[cfg(all(
41 feature = "UICellConfigurationState",
42 feature = "UIViewConfigurationState"
43 ))]
44 #[unsafe(method(configurationState))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn configurationState(&self) -> Retained<UICellConfigurationState>;
48
49 #[cfg(feature = "UIContentConfiguration")]
50 #[unsafe(method(contentConfiguration))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn contentConfiguration(
54 &self,
55 ) -> Retained<ProtocolObject<dyn UIContentConfiguration>>;
56
57 #[cfg(feature = "UIContentConfiguration")]
58 #[unsafe(method(setContentConfiguration:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setContentConfiguration(
62 &self,
63 content_configuration: &ProtocolObject<dyn UIContentConfiguration>,
64 );
65
66 #[cfg(feature = "UIBackgroundConfiguration")]
67 #[unsafe(method(backgroundConfiguration))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn backgroundConfiguration(&self) -> Retained<UIBackgroundConfiguration>;
71
72 #[cfg(feature = "UIBackgroundConfiguration")]
73 #[unsafe(method(setBackgroundConfiguration:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setBackgroundConfiguration(
77 &self,
78 background_configuration: &UIBackgroundConfiguration,
79 );
80
81 #[cfg(feature = "UICellAccessory")]
82 #[unsafe(method(accessories))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn accessories(&self) -> Retained<NSArray<UICellAccessory>>;
86
87 #[cfg(feature = "UICellAccessory")]
88 #[unsafe(method(setAccessories:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setAccessories(&self, accessories: &NSArray<UICellAccessory>);
92
93 #[cfg(feature = "UIListContentConfiguration")]
94 #[unsafe(method(defaultContentConfiguration))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn defaultContentConfiguration(&self) -> Retained<UIListContentConfiguration>;
98
99 #[cfg(feature = "UIBackgroundConfiguration")]
100 #[unsafe(method(defaultBackgroundConfiguration))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn defaultBackgroundConfiguration(&self) -> Retained<UIBackgroundConfiguration>;
104
105 #[unsafe(method(itemFromRequest:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn itemFromRequest(request: &UITabSidebarItemRequest) -> Retained<Self>;
109
110 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
117 );
118}
119
120extern_class!(
121 #[unsafe(super(NSObject))]
123 #[thread_kind = MainThreadOnly]
124 #[derive(Debug, PartialEq, Eq, Hash)]
125 pub struct UITabSidebarItemRequest;
126);
127
128unsafe impl NSObjectProtocol for UITabSidebarItemRequest {}
129
130impl UITabSidebarItemRequest {
131 extern_methods!(
132 #[cfg(feature = "UITab")]
133 #[unsafe(method(tab))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn tab(&self) -> Option<Retained<UITab>>;
137
138 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
139 #[unsafe(method(action))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn action(&self) -> Option<Retained<UIAction>>;
143
144 #[unsafe(method(init))]
145 #[unsafe(method_family = init)]
146 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
147
148 #[unsafe(method(new))]
149 #[unsafe(method_family = new)]
150 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
151 );
152}