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
18extern_conformance!(
19 unsafe impl NSCopying for UITabSidebarItem {}
20);
21
22unsafe impl CopyingHelper for UITabSidebarItem {
23 type Result = Self;
24}
25
26extern_conformance!(
27 unsafe impl NSObjectProtocol for UITabSidebarItem {}
28);
29
30impl UITabSidebarItem {
31 extern_methods!(
32 #[cfg(feature = "UITab")]
33 #[unsafe(method(tab))]
35 #[unsafe(method_family = none)]
36 pub fn tab(&self) -> Option<Retained<UITab>>;
37
38 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
39 #[unsafe(method(action))]
41 #[unsafe(method_family = none)]
42 pub fn action(&self) -> Option<Retained<UIAction>>;
43
44 #[cfg(all(
45 feature = "UICellConfigurationState",
46 feature = "UIViewConfigurationState"
47 ))]
48 #[unsafe(method(configurationState))]
50 #[unsafe(method_family = none)]
51 pub fn configurationState(&self) -> Retained<UICellConfigurationState>;
52
53 #[cfg(feature = "UIContentConfiguration")]
54 #[unsafe(method(contentConfiguration))]
56 #[unsafe(method_family = none)]
57 pub fn contentConfiguration(&self) -> Retained<ProtocolObject<dyn UIContentConfiguration>>;
58
59 #[cfg(feature = "UIContentConfiguration")]
60 #[unsafe(method(setContentConfiguration:))]
64 #[unsafe(method_family = none)]
65 pub fn setContentConfiguration(
66 &self,
67 content_configuration: &ProtocolObject<dyn UIContentConfiguration>,
68 );
69
70 #[cfg(feature = "UIBackgroundConfiguration")]
71 #[unsafe(method(backgroundConfiguration))]
73 #[unsafe(method_family = none)]
74 pub fn backgroundConfiguration(&self) -> Retained<UIBackgroundConfiguration>;
75
76 #[cfg(feature = "UIBackgroundConfiguration")]
77 #[unsafe(method(setBackgroundConfiguration:))]
81 #[unsafe(method_family = none)]
82 pub fn setBackgroundConfiguration(
83 &self,
84 background_configuration: &UIBackgroundConfiguration,
85 );
86
87 #[cfg(feature = "UICellAccessory")]
88 #[unsafe(method(accessories))]
90 #[unsafe(method_family = none)]
91 pub fn accessories(&self) -> Retained<NSArray<UICellAccessory>>;
92
93 #[cfg(feature = "UICellAccessory")]
94 #[unsafe(method(setAccessories:))]
98 #[unsafe(method_family = none)]
99 pub fn setAccessories(&self, accessories: &NSArray<UICellAccessory>);
100
101 #[cfg(feature = "UIListContentConfiguration")]
102 #[unsafe(method(defaultContentConfiguration))]
104 #[unsafe(method_family = none)]
105 pub fn defaultContentConfiguration(&self) -> Retained<UIListContentConfiguration>;
106
107 #[cfg(feature = "UIBackgroundConfiguration")]
108 #[unsafe(method(defaultBackgroundConfiguration))]
110 #[unsafe(method_family = none)]
111 pub fn defaultBackgroundConfiguration(&self) -> Retained<UIBackgroundConfiguration>;
112
113 #[unsafe(method(itemFromRequest:))]
115 #[unsafe(method_family = none)]
116 pub fn itemFromRequest(request: &UITabSidebarItemRequest) -> Retained<Self>;
117
118 #[unsafe(method(init))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
121
122 #[unsafe(method(new))]
123 #[unsafe(method_family = new)]
124 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
125 );
126}
127
128extern_class!(
129 #[unsafe(super(NSObject))]
131 #[thread_kind = MainThreadOnly]
132 #[derive(Debug, PartialEq, Eq, Hash)]
133 pub struct UITabSidebarItemRequest;
134);
135
136extern_conformance!(
137 unsafe impl NSObjectProtocol for UITabSidebarItemRequest {}
138);
139
140impl UITabSidebarItemRequest {
141 extern_methods!(
142 #[cfg(feature = "UITab")]
143 #[unsafe(method(tab))]
145 #[unsafe(method_family = none)]
146 pub fn tab(&self) -> Option<Retained<UITab>>;
147
148 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
149 #[unsafe(method(action))]
151 #[unsafe(method_family = none)]
152 pub fn action(&self) -> Option<Retained<UIAction>>;
153
154 #[unsafe(method(init))]
155 #[unsafe(method_family = init)]
156 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
157
158 #[unsafe(method(new))]
159 #[unsafe(method_family = new)]
160 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
161 );
162}