icrate/generated/AppKit/
NSArrayController.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_class!(
9 #[derive(Debug, PartialEq, Eq, Hash)]
10 #[cfg(feature = "AppKit_NSArrayController")]
11 pub struct NSArrayController;
12
13 #[cfg(feature = "AppKit_NSArrayController")]
14 unsafe impl ClassType for NSArrayController {
15 #[inherits(NSController, NSObject)]
16 type Super = NSObjectController;
17 type Mutability = MainThreadOnly;
18 }
19);
20
21#[cfg(feature = "AppKit_NSArrayController")]
22unsafe impl NSCoding for NSArrayController {}
23
24#[cfg(feature = "AppKit_NSArrayController")]
25unsafe impl NSEditor for NSArrayController {}
26
27#[cfg(feature = "AppKit_NSArrayController")]
28unsafe impl NSEditorRegistration for NSArrayController {}
29
30#[cfg(feature = "AppKit_NSArrayController")]
31unsafe impl NSObjectProtocol for NSArrayController {}
32
33extern_methods!(
34 #[cfg(feature = "AppKit_NSArrayController")]
35 unsafe impl NSArrayController {
36 #[method(rearrangeObjects)]
37 pub unsafe fn rearrangeObjects(&self);
38
39 #[method(automaticallyRearrangesObjects)]
40 pub unsafe fn automaticallyRearrangesObjects(&self) -> bool;
41
42 #[method(setAutomaticallyRearrangesObjects:)]
43 pub unsafe fn setAutomaticallyRearrangesObjects(
44 &self,
45 automatically_rearranges_objects: bool,
46 );
47
48 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
49 #[method_id(@__retain_semantics Other automaticRearrangementKeyPaths)]
50 pub unsafe fn automaticRearrangementKeyPaths(&self) -> Option<Id<NSArray<NSString>>>;
51
52 #[method(didChangeArrangementCriteria)]
53 pub unsafe fn didChangeArrangementCriteria(&self);
54
55 #[cfg(all(
56 feature = "Foundation_NSArray",
57 feature = "Foundation_NSSortDescriptor"
58 ))]
59 #[method_id(@__retain_semantics Other sortDescriptors)]
60 pub unsafe fn sortDescriptors(&self) -> Id<NSArray<NSSortDescriptor>>;
61
62 #[cfg(all(
63 feature = "Foundation_NSArray",
64 feature = "Foundation_NSSortDescriptor"
65 ))]
66 #[method(setSortDescriptors:)]
67 pub unsafe fn setSortDescriptors(&self, sort_descriptors: &NSArray<NSSortDescriptor>);
68
69 #[cfg(feature = "Foundation_NSPredicate")]
70 #[method_id(@__retain_semantics Other filterPredicate)]
71 pub unsafe fn filterPredicate(&self) -> Option<Id<NSPredicate>>;
72
73 #[cfg(feature = "Foundation_NSPredicate")]
74 #[method(setFilterPredicate:)]
75 pub unsafe fn setFilterPredicate(&self, filter_predicate: Option<&NSPredicate>);
76
77 #[method(clearsFilterPredicateOnInsertion)]
78 pub unsafe fn clearsFilterPredicateOnInsertion(&self) -> bool;
79
80 #[method(setClearsFilterPredicateOnInsertion:)]
81 pub unsafe fn setClearsFilterPredicateOnInsertion(
82 &self,
83 clears_filter_predicate_on_insertion: bool,
84 );
85
86 #[cfg(feature = "Foundation_NSArray")]
87 #[method_id(@__retain_semantics Other arrangeObjects:)]
88 pub unsafe fn arrangeObjects(&self, objects: &NSArray) -> Id<NSArray>;
89
90 #[method_id(@__retain_semantics Other arrangedObjects)]
91 pub unsafe fn arrangedObjects(&self) -> Id<AnyObject>;
92
93 #[method(avoidsEmptySelection)]
94 pub unsafe fn avoidsEmptySelection(&self) -> bool;
95
96 #[method(setAvoidsEmptySelection:)]
97 pub unsafe fn setAvoidsEmptySelection(&self, avoids_empty_selection: bool);
98
99 #[method(preservesSelection)]
100 pub unsafe fn preservesSelection(&self) -> bool;
101
102 #[method(setPreservesSelection:)]
103 pub unsafe fn setPreservesSelection(&self, preserves_selection: bool);
104
105 #[method(selectsInsertedObjects)]
106 pub unsafe fn selectsInsertedObjects(&self) -> bool;
107
108 #[method(setSelectsInsertedObjects:)]
109 pub unsafe fn setSelectsInsertedObjects(&self, selects_inserted_objects: bool);
110
111 #[method(alwaysUsesMultipleValuesMarker)]
112 pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool;
113
114 #[method(setAlwaysUsesMultipleValuesMarker:)]
115 pub unsafe fn setAlwaysUsesMultipleValuesMarker(
116 &self,
117 always_uses_multiple_values_marker: bool,
118 );
119
120 #[cfg(feature = "Foundation_NSIndexSet")]
121 #[method(setSelectionIndexes:)]
122 pub unsafe fn setSelectionIndexes(&self, indexes: &NSIndexSet) -> bool;
123
124 #[cfg(feature = "Foundation_NSIndexSet")]
125 #[method_id(@__retain_semantics Other selectionIndexes)]
126 pub unsafe fn selectionIndexes(&self) -> Id<NSIndexSet>;
127
128 #[method(setSelectionIndex:)]
129 pub unsafe fn setSelectionIndex(&self, index: NSUInteger) -> bool;
130
131 #[method(selectionIndex)]
132 pub unsafe fn selectionIndex(&self) -> NSUInteger;
133
134 #[cfg(feature = "Foundation_NSIndexSet")]
135 #[method(addSelectionIndexes:)]
136 pub unsafe fn addSelectionIndexes(&self, indexes: &NSIndexSet) -> bool;
137
138 #[cfg(feature = "Foundation_NSIndexSet")]
139 #[method(removeSelectionIndexes:)]
140 pub unsafe fn removeSelectionIndexes(&self, indexes: &NSIndexSet) -> bool;
141
142 #[cfg(feature = "Foundation_NSArray")]
143 #[method(setSelectedObjects:)]
144 pub unsafe fn setSelectedObjects(&self, objects: &NSArray) -> bool;
145
146 #[cfg(feature = "Foundation_NSArray")]
147 #[method_id(@__retain_semantics Other selectedObjects)]
148 pub unsafe fn selectedObjects(&self) -> Id<NSArray>;
149
150 #[cfg(feature = "Foundation_NSArray")]
151 #[method(addSelectedObjects:)]
152 pub unsafe fn addSelectedObjects(&self, objects: &NSArray) -> bool;
153
154 #[cfg(feature = "Foundation_NSArray")]
155 #[method(removeSelectedObjects:)]
156 pub unsafe fn removeSelectedObjects(&self, objects: &NSArray) -> bool;
157
158 #[method(add:)]
159 pub unsafe fn add(&self, sender: Option<&AnyObject>);
160
161 #[method(remove:)]
162 pub unsafe fn remove(&self, sender: Option<&AnyObject>);
163
164 #[method(insert:)]
165 pub unsafe fn insert(&self, sender: Option<&AnyObject>);
166
167 #[method(canInsert)]
168 pub unsafe fn canInsert(&self) -> bool;
169
170 #[method(selectNext:)]
171 pub unsafe fn selectNext(&self, sender: Option<&AnyObject>);
172
173 #[method(selectPrevious:)]
174 pub unsafe fn selectPrevious(&self, sender: Option<&AnyObject>);
175
176 #[method(canSelectNext)]
177 pub unsafe fn canSelectNext(&self) -> bool;
178
179 #[method(canSelectPrevious)]
180 pub unsafe fn canSelectPrevious(&self) -> bool;
181
182 #[method(addObject:)]
183 pub unsafe fn addObject(&self, object: &AnyObject);
184
185 #[cfg(feature = "Foundation_NSArray")]
186 #[method(addObjects:)]
187 pub unsafe fn addObjects(&self, objects: &NSArray);
188
189 #[method(insertObject:atArrangedObjectIndex:)]
190 pub unsafe fn insertObject_atArrangedObjectIndex(
191 &self,
192 object: &AnyObject,
193 index: NSUInteger,
194 );
195
196 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexSet"))]
197 #[method(insertObjects:atArrangedObjectIndexes:)]
198 pub unsafe fn insertObjects_atArrangedObjectIndexes(
199 &self,
200 objects: &NSArray,
201 indexes: &NSIndexSet,
202 );
203
204 #[method(removeObjectAtArrangedObjectIndex:)]
205 pub unsafe fn removeObjectAtArrangedObjectIndex(&self, index: NSUInteger);
206
207 #[cfg(feature = "Foundation_NSIndexSet")]
208 #[method(removeObjectsAtArrangedObjectIndexes:)]
209 pub unsafe fn removeObjectsAtArrangedObjectIndexes(&self, indexes: &NSIndexSet);
210
211 #[method(removeObject:)]
212 pub unsafe fn removeObject(&self, object: &AnyObject);
213
214 #[cfg(feature = "Foundation_NSArray")]
215 #[method(removeObjects:)]
216 pub unsafe fn removeObjects(&self, objects: &NSArray);
217 }
218);
219
220extern_methods!(
221 #[cfg(feature = "AppKit_NSArrayController")]
223 unsafe impl NSArrayController {
224 #[method_id(@__retain_semantics Init initWithContent:)]
225 pub unsafe fn initWithContent(
226 this: Allocated<Self>,
227 content: Option<&AnyObject>,
228 ) -> Id<Self>;
229
230 #[cfg(feature = "Foundation_NSCoder")]
231 #[method_id(@__retain_semantics Init initWithCoder:)]
232 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
233 }
234);
235
236extern_methods!(
237 #[cfg(feature = "AppKit_NSArrayController")]
239 unsafe impl NSArrayController {
240 #[method_id(@__retain_semantics Init init)]
241 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
242 }
243);
244
245extern_methods!(
246 #[cfg(feature = "AppKit_NSArrayController")]
248 unsafe impl NSArrayController {
249 #[method_id(@__retain_semantics New new)]
250 pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
251 }
252);