objc2_app_kit/generated/
NSDictionaryController.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 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct NSDictionaryControllerKeyValuePair;
15);
16
17extern_conformance!(
18 unsafe impl NSObjectProtocol for NSDictionaryControllerKeyValuePair {}
19);
20
21impl NSDictionaryControllerKeyValuePair {
22 extern_methods!(
23 #[unsafe(method(init))]
24 #[unsafe(method_family = init)]
25 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27 #[unsafe(method(key))]
28 #[unsafe(method_family = none)]
29 pub fn key(&self) -> Option<Retained<NSString>>;
30
31 #[unsafe(method(setKey:))]
35 #[unsafe(method_family = none)]
36 pub fn setKey(&self, key: Option<&NSString>);
37
38 #[unsafe(method(value))]
39 #[unsafe(method_family = none)]
40 pub fn value(&self) -> Option<Retained<AnyObject>>;
41
42 #[unsafe(method(setValue:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn setValue(&self, value: Option<&AnyObject>);
50
51 #[unsafe(method(localizedKey))]
52 #[unsafe(method_family = none)]
53 pub fn localizedKey(&self) -> Option<Retained<NSString>>;
54
55 #[unsafe(method(setLocalizedKey:))]
59 #[unsafe(method_family = none)]
60 pub fn setLocalizedKey(&self, localized_key: Option<&NSString>);
61
62 #[unsafe(method(isExplicitlyIncluded))]
63 #[unsafe(method_family = none)]
64 pub fn isExplicitlyIncluded(&self) -> bool;
65 );
66}
67
68impl NSDictionaryControllerKeyValuePair {
70 extern_methods!(
71 #[unsafe(method(new))]
72 #[unsafe(method_family = new)]
73 pub unsafe fn new() -> Retained<Self>;
74 );
75}
76
77extern_class!(
78 #[unsafe(super(NSArrayController, NSObjectController, NSController, NSObject))]
80 #[thread_kind = MainThreadOnly]
81 #[derive(Debug, PartialEq, Eq, Hash)]
82 #[cfg(all(
83 feature = "NSArrayController",
84 feature = "NSController",
85 feature = "NSObjectController"
86 ))]
87 pub struct NSDictionaryController;
88);
89
90#[cfg(all(
91 feature = "NSArrayController",
92 feature = "NSController",
93 feature = "NSObjectController"
94))]
95extern_conformance!(
96 unsafe impl NSCoding for NSDictionaryController {}
97);
98
99#[cfg(all(
100 feature = "NSArrayController",
101 feature = "NSController",
102 feature = "NSKeyValueBinding",
103 feature = "NSObjectController"
104))]
105extern_conformance!(
106 unsafe impl NSEditor for NSDictionaryController {}
107);
108
109#[cfg(all(
110 feature = "NSArrayController",
111 feature = "NSController",
112 feature = "NSKeyValueBinding",
113 feature = "NSObjectController"
114))]
115extern_conformance!(
116 unsafe impl NSEditorRegistration for NSDictionaryController {}
117);
118
119#[cfg(all(
120 feature = "NSArrayController",
121 feature = "NSController",
122 feature = "NSObjectController"
123))]
124extern_conformance!(
125 unsafe impl NSObjectProtocol for NSDictionaryController {}
126);
127
128#[cfg(all(
129 feature = "NSArrayController",
130 feature = "NSController",
131 feature = "NSObjectController"
132))]
133impl NSDictionaryController {
134 extern_methods!(
135 #[unsafe(method(newObject))]
136 #[unsafe(method_family = new)]
137 pub fn newObject(&self) -> Retained<NSDictionaryControllerKeyValuePair>;
138
139 #[unsafe(method(initialKey))]
140 #[unsafe(method_family = none)]
141 pub fn initialKey(&self) -> Retained<NSString>;
142
143 #[unsafe(method(setInitialKey:))]
147 #[unsafe(method_family = none)]
148 pub fn setInitialKey(&self, initial_key: &NSString);
149
150 #[unsafe(method(initialValue))]
151 #[unsafe(method_family = none)]
152 pub fn initialValue(&self) -> Retained<AnyObject>;
153
154 #[unsafe(method(setInitialValue:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn setInitialValue(&self, initial_value: &AnyObject);
162
163 #[unsafe(method(includedKeys))]
164 #[unsafe(method_family = none)]
165 pub fn includedKeys(&self) -> Retained<NSArray<NSString>>;
166
167 #[unsafe(method(setIncludedKeys:))]
171 #[unsafe(method_family = none)]
172 pub fn setIncludedKeys(&self, included_keys: &NSArray<NSString>);
173
174 #[unsafe(method(excludedKeys))]
175 #[unsafe(method_family = none)]
176 pub fn excludedKeys(&self) -> Retained<NSArray<NSString>>;
177
178 #[unsafe(method(setExcludedKeys:))]
182 #[unsafe(method_family = none)]
183 pub fn setExcludedKeys(&self, excluded_keys: &NSArray<NSString>);
184
185 #[unsafe(method(localizedKeyDictionary))]
186 #[unsafe(method_family = none)]
187 pub fn localizedKeyDictionary(&self) -> Retained<NSDictionary<NSString, NSString>>;
188
189 #[unsafe(method(setLocalizedKeyDictionary:))]
193 #[unsafe(method_family = none)]
194 pub fn setLocalizedKeyDictionary(
195 &self,
196 localized_key_dictionary: &NSDictionary<NSString, NSString>,
197 );
198
199 #[unsafe(method(localizedKeyTable))]
200 #[unsafe(method_family = none)]
201 pub fn localizedKeyTable(&self) -> Option<Retained<NSString>>;
202
203 #[unsafe(method(setLocalizedKeyTable:))]
207 #[unsafe(method_family = none)]
208 pub fn setLocalizedKeyTable(&self, localized_key_table: Option<&NSString>);
209 );
210}
211
212#[cfg(all(
214 feature = "NSArrayController",
215 feature = "NSController",
216 feature = "NSObjectController"
217))]
218impl NSDictionaryController {
219 extern_methods!(
220 #[unsafe(method(initWithContent:))]
224 #[unsafe(method_family = init)]
225 pub unsafe fn initWithContent(
226 this: Allocated<Self>,
227 content: Option<&AnyObject>,
228 ) -> Retained<Self>;
229
230 #[unsafe(method(initWithCoder:))]
234 #[unsafe(method_family = init)]
235 pub unsafe fn initWithCoder(
236 this: Allocated<Self>,
237 coder: &NSCoder,
238 ) -> Option<Retained<Self>>;
239 );
240}
241
242#[cfg(all(
244 feature = "NSArrayController",
245 feature = "NSController",
246 feature = "NSObjectController"
247))]
248impl NSDictionaryController {
249 extern_methods!(
250 #[unsafe(method(init))]
251 #[unsafe(method_family = init)]
252 pub fn init(this: Allocated<Self>) -> Retained<Self>;
253 );
254}
255
256#[cfg(all(
258 feature = "NSArrayController",
259 feature = "NSController",
260 feature = "NSObjectController"
261))]
262impl NSDictionaryController {
263 extern_methods!(
264 #[unsafe(method(new))]
265 #[unsafe(method_family = new)]
266 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
267 );
268}