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