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 unsafe fn key(&self) -> Option<Retained<NSString>>;
30
31 #[unsafe(method(setKey:))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn setKey(&self, key: Option<&NSString>);
35
36 #[unsafe(method(value))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn value(&self) -> Option<Retained<AnyObject>>;
39
40 #[unsafe(method(setValue:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setValue(&self, value: Option<&AnyObject>);
44
45 #[unsafe(method(localizedKey))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn localizedKey(&self) -> Option<Retained<NSString>>;
48
49 #[unsafe(method(setLocalizedKey:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setLocalizedKey(&self, localized_key: Option<&NSString>);
53
54 #[unsafe(method(isExplicitlyIncluded))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn isExplicitlyIncluded(&self) -> bool;
57 );
58}
59
60impl NSDictionaryControllerKeyValuePair {
62 extern_methods!(
63 #[unsafe(method(new))]
64 #[unsafe(method_family = new)]
65 pub unsafe fn new() -> Retained<Self>;
66 );
67}
68
69extern_class!(
70 #[unsafe(super(NSArrayController, NSObjectController, NSController, NSObject))]
72 #[thread_kind = MainThreadOnly]
73 #[derive(Debug, PartialEq, Eq, Hash)]
74 #[cfg(all(
75 feature = "NSArrayController",
76 feature = "NSController",
77 feature = "NSObjectController"
78 ))]
79 pub struct NSDictionaryController;
80);
81
82#[cfg(all(
83 feature = "NSArrayController",
84 feature = "NSController",
85 feature = "NSObjectController"
86))]
87extern_conformance!(
88 unsafe impl NSCoding for NSDictionaryController {}
89);
90
91#[cfg(all(
92 feature = "NSArrayController",
93 feature = "NSController",
94 feature = "NSKeyValueBinding",
95 feature = "NSObjectController"
96))]
97extern_conformance!(
98 unsafe impl NSEditor for NSDictionaryController {}
99);
100
101#[cfg(all(
102 feature = "NSArrayController",
103 feature = "NSController",
104 feature = "NSKeyValueBinding",
105 feature = "NSObjectController"
106))]
107extern_conformance!(
108 unsafe impl NSEditorRegistration for NSDictionaryController {}
109);
110
111#[cfg(all(
112 feature = "NSArrayController",
113 feature = "NSController",
114 feature = "NSObjectController"
115))]
116extern_conformance!(
117 unsafe impl NSObjectProtocol for NSDictionaryController {}
118);
119
120#[cfg(all(
121 feature = "NSArrayController",
122 feature = "NSController",
123 feature = "NSObjectController"
124))]
125impl NSDictionaryController {
126 extern_methods!(
127 #[unsafe(method(newObject))]
128 #[unsafe(method_family = new)]
129 pub unsafe fn newObject(&self) -> Retained<NSDictionaryControllerKeyValuePair>;
130
131 #[unsafe(method(initialKey))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn initialKey(&self) -> Retained<NSString>;
134
135 #[unsafe(method(setInitialKey:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setInitialKey(&self, initial_key: &NSString);
139
140 #[unsafe(method(initialValue))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn initialValue(&self) -> Retained<AnyObject>;
143
144 #[unsafe(method(setInitialValue:))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn setInitialValue(&self, initial_value: &AnyObject);
148
149 #[unsafe(method(includedKeys))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn includedKeys(&self) -> Retained<NSArray<NSString>>;
152
153 #[unsafe(method(setIncludedKeys:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn setIncludedKeys(&self, included_keys: &NSArray<NSString>);
157
158 #[unsafe(method(excludedKeys))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn excludedKeys(&self) -> Retained<NSArray<NSString>>;
161
162 #[unsafe(method(setExcludedKeys:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn setExcludedKeys(&self, excluded_keys: &NSArray<NSString>);
166
167 #[unsafe(method(localizedKeyDictionary))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn localizedKeyDictionary(&self) -> Retained<NSDictionary<NSString, NSString>>;
170
171 #[unsafe(method(setLocalizedKeyDictionary:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn setLocalizedKeyDictionary(
175 &self,
176 localized_key_dictionary: &NSDictionary<NSString, NSString>,
177 );
178
179 #[unsafe(method(localizedKeyTable))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn localizedKeyTable(&self) -> Option<Retained<NSString>>;
182
183 #[unsafe(method(setLocalizedKeyTable:))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn setLocalizedKeyTable(&self, localized_key_table: Option<&NSString>);
187 );
188}
189
190#[cfg(all(
192 feature = "NSArrayController",
193 feature = "NSController",
194 feature = "NSObjectController"
195))]
196impl NSDictionaryController {
197 extern_methods!(
198 #[unsafe(method(initWithContent:))]
199 #[unsafe(method_family = init)]
200 pub unsafe fn initWithContent(
201 this: Allocated<Self>,
202 content: Option<&AnyObject>,
203 ) -> Retained<Self>;
204
205 #[unsafe(method(initWithCoder:))]
206 #[unsafe(method_family = init)]
207 pub unsafe fn initWithCoder(
208 this: Allocated<Self>,
209 coder: &NSCoder,
210 ) -> Option<Retained<Self>>;
211 );
212}
213
214#[cfg(all(
216 feature = "NSArrayController",
217 feature = "NSController",
218 feature = "NSObjectController"
219))]
220impl NSDictionaryController {
221 extern_methods!(
222 #[unsafe(method(init))]
223 #[unsafe(method_family = init)]
224 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
225 );
226}
227
228#[cfg(all(
230 feature = "NSArrayController",
231 feature = "NSController",
232 feature = "NSObjectController"
233))]
234impl NSDictionaryController {
235 extern_methods!(
236 #[unsafe(method(new))]
237 #[unsafe(method_family = new)]
238 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
239 );
240}