icrate/generated/Foundation/
NSCharacterSet.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::Foundation::*;
5
6extern_enum!(
7    #[underlying(c_uint)]
8    pub enum __anonymous__ {
9        NSOpenStepUnicodeReservedBase = 0xF400,
10    }
11);
12
13extern_class!(
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "Foundation_NSCharacterSet")]
16    pub struct NSCharacterSet;
17
18    #[cfg(feature = "Foundation_NSCharacterSet")]
19    unsafe impl ClassType for NSCharacterSet {
20        type Super = NSObject;
21        type Mutability = ImmutableWithMutableSubclass<NSMutableCharacterSet>;
22    }
23);
24
25#[cfg(feature = "Foundation_NSCharacterSet")]
26unsafe impl NSCoding for NSCharacterSet {}
27
28#[cfg(feature = "Foundation_NSCharacterSet")]
29unsafe impl NSCopying for NSCharacterSet {}
30
31#[cfg(feature = "Foundation_NSCharacterSet")]
32unsafe impl NSMutableCopying for NSCharacterSet {}
33
34#[cfg(feature = "Foundation_NSCharacterSet")]
35unsafe impl NSObjectProtocol for NSCharacterSet {}
36
37#[cfg(feature = "Foundation_NSCharacterSet")]
38unsafe impl NSSecureCoding for NSCharacterSet {}
39
40extern_methods!(
41    #[cfg(feature = "Foundation_NSCharacterSet")]
42    unsafe impl NSCharacterSet {
43        #[method_id(@__retain_semantics Other controlCharacterSet)]
44        pub unsafe fn controlCharacterSet() -> Id<NSCharacterSet>;
45
46        #[method_id(@__retain_semantics Other whitespaceCharacterSet)]
47        pub unsafe fn whitespaceCharacterSet() -> Id<NSCharacterSet>;
48
49        #[method_id(@__retain_semantics Other whitespaceAndNewlineCharacterSet)]
50        pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id<NSCharacterSet>;
51
52        #[method_id(@__retain_semantics Other decimalDigitCharacterSet)]
53        pub unsafe fn decimalDigitCharacterSet() -> Id<NSCharacterSet>;
54
55        #[method_id(@__retain_semantics Other letterCharacterSet)]
56        pub unsafe fn letterCharacterSet() -> Id<NSCharacterSet>;
57
58        #[method_id(@__retain_semantics Other lowercaseLetterCharacterSet)]
59        pub unsafe fn lowercaseLetterCharacterSet() -> Id<NSCharacterSet>;
60
61        #[method_id(@__retain_semantics Other uppercaseLetterCharacterSet)]
62        pub unsafe fn uppercaseLetterCharacterSet() -> Id<NSCharacterSet>;
63
64        #[method_id(@__retain_semantics Other nonBaseCharacterSet)]
65        pub unsafe fn nonBaseCharacterSet() -> Id<NSCharacterSet>;
66
67        #[method_id(@__retain_semantics Other alphanumericCharacterSet)]
68        pub unsafe fn alphanumericCharacterSet() -> Id<NSCharacterSet>;
69
70        #[method_id(@__retain_semantics Other decomposableCharacterSet)]
71        pub unsafe fn decomposableCharacterSet() -> Id<NSCharacterSet>;
72
73        #[method_id(@__retain_semantics Other illegalCharacterSet)]
74        pub unsafe fn illegalCharacterSet() -> Id<NSCharacterSet>;
75
76        #[method_id(@__retain_semantics Other punctuationCharacterSet)]
77        pub unsafe fn punctuationCharacterSet() -> Id<NSCharacterSet>;
78
79        #[method_id(@__retain_semantics Other capitalizedLetterCharacterSet)]
80        pub unsafe fn capitalizedLetterCharacterSet() -> Id<NSCharacterSet>;
81
82        #[method_id(@__retain_semantics Other symbolCharacterSet)]
83        pub unsafe fn symbolCharacterSet() -> Id<NSCharacterSet>;
84
85        #[method_id(@__retain_semantics Other newlineCharacterSet)]
86        pub unsafe fn newlineCharacterSet() -> Id<NSCharacterSet>;
87
88        #[method_id(@__retain_semantics Other characterSetWithRange:)]
89        pub unsafe fn characterSetWithRange(a_range: NSRange) -> Id<NSCharacterSet>;
90
91        #[cfg(feature = "Foundation_NSString")]
92        #[method_id(@__retain_semantics Other characterSetWithCharactersInString:)]
93        pub unsafe fn characterSetWithCharactersInString(a_string: &NSString)
94            -> Id<NSCharacterSet>;
95
96        #[cfg(feature = "Foundation_NSData")]
97        #[method_id(@__retain_semantics Other characterSetWithBitmapRepresentation:)]
98        pub unsafe fn characterSetWithBitmapRepresentation(data: &NSData) -> Id<NSCharacterSet>;
99
100        #[cfg(feature = "Foundation_NSString")]
101        #[method_id(@__retain_semantics Other characterSetWithContentsOfFile:)]
102        pub unsafe fn characterSetWithContentsOfFile(
103            f_name: &NSString,
104        ) -> Option<Id<NSCharacterSet>>;
105
106        #[cfg(feature = "Foundation_NSCoder")]
107        #[method_id(@__retain_semantics Init initWithCoder:)]
108        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
109
110        #[method(characterIsMember:)]
111        pub unsafe fn characterIsMember(&self, a_character: unichar) -> bool;
112
113        #[cfg(feature = "Foundation_NSData")]
114        #[method_id(@__retain_semantics Other bitmapRepresentation)]
115        pub unsafe fn bitmapRepresentation(&self) -> Id<NSData>;
116
117        #[method_id(@__retain_semantics Other invertedSet)]
118        pub unsafe fn invertedSet(&self) -> Id<NSCharacterSet>;
119
120        #[method(longCharacterIsMember:)]
121        pub unsafe fn longCharacterIsMember(&self, the_long_char: UTF32Char) -> bool;
122
123        #[method(isSupersetOfSet:)]
124        pub unsafe fn isSupersetOfSet(&self, the_other_set: &NSCharacterSet) -> bool;
125
126        #[method(hasMemberInPlane:)]
127        pub unsafe fn hasMemberInPlane(&self, the_plane: u8) -> bool;
128    }
129);
130
131extern_methods!(
132    /// Methods declared on superclass `NSObject`
133    #[cfg(feature = "Foundation_NSCharacterSet")]
134    unsafe impl NSCharacterSet {
135        #[method_id(@__retain_semantics Init init)]
136        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
137
138        #[method_id(@__retain_semantics New new)]
139        pub unsafe fn new() -> Id<Self>;
140    }
141);
142
143extern_class!(
144    #[derive(Debug, PartialEq, Eq, Hash)]
145    #[cfg(feature = "Foundation_NSCharacterSet")]
146    pub struct NSMutableCharacterSet;
147
148    #[cfg(feature = "Foundation_NSCharacterSet")]
149    unsafe impl ClassType for NSMutableCharacterSet {
150        #[inherits(NSObject)]
151        type Super = NSCharacterSet;
152        type Mutability = MutableWithImmutableSuperclass<NSCharacterSet>;
153    }
154);
155
156#[cfg(feature = "Foundation_NSMutableCharacterSet")]
157unsafe impl NSCoding for NSMutableCharacterSet {}
158
159#[cfg(feature = "Foundation_NSMutableCharacterSet")]
160unsafe impl NSCopying for NSMutableCharacterSet {}
161
162#[cfg(feature = "Foundation_NSMutableCharacterSet")]
163unsafe impl NSMutableCopying for NSMutableCharacterSet {}
164
165#[cfg(feature = "Foundation_NSMutableCharacterSet")]
166unsafe impl NSObjectProtocol for NSMutableCharacterSet {}
167
168#[cfg(feature = "Foundation_NSMutableCharacterSet")]
169unsafe impl NSSecureCoding for NSMutableCharacterSet {}
170
171extern_methods!(
172    #[cfg(feature = "Foundation_NSMutableCharacterSet")]
173    unsafe impl NSMutableCharacterSet {
174        #[method(addCharactersInRange:)]
175        pub unsafe fn addCharactersInRange(&mut self, a_range: NSRange);
176
177        #[method(removeCharactersInRange:)]
178        pub unsafe fn removeCharactersInRange(&mut self, a_range: NSRange);
179
180        #[cfg(feature = "Foundation_NSString")]
181        #[method(addCharactersInString:)]
182        pub unsafe fn addCharactersInString(&mut self, a_string: &NSString);
183
184        #[cfg(feature = "Foundation_NSString")]
185        #[method(removeCharactersInString:)]
186        pub unsafe fn removeCharactersInString(&mut self, a_string: &NSString);
187
188        #[method(formUnionWithCharacterSet:)]
189        pub unsafe fn formUnionWithCharacterSet(&mut self, other_set: &NSCharacterSet);
190
191        #[method(formIntersectionWithCharacterSet:)]
192        pub unsafe fn formIntersectionWithCharacterSet(&mut self, other_set: &NSCharacterSet);
193
194        #[method(invert)]
195        pub unsafe fn invert(&mut self);
196
197        #[method_id(@__retain_semantics Other controlCharacterSet)]
198        pub unsafe fn controlCharacterSet() -> Id<NSMutableCharacterSet>;
199
200        #[method_id(@__retain_semantics Other whitespaceCharacterSet)]
201        pub unsafe fn whitespaceCharacterSet() -> Id<NSMutableCharacterSet>;
202
203        #[method_id(@__retain_semantics Other whitespaceAndNewlineCharacterSet)]
204        pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id<NSMutableCharacterSet>;
205
206        #[method_id(@__retain_semantics Other decimalDigitCharacterSet)]
207        pub unsafe fn decimalDigitCharacterSet() -> Id<NSMutableCharacterSet>;
208
209        #[method_id(@__retain_semantics Other letterCharacterSet)]
210        pub unsafe fn letterCharacterSet() -> Id<NSMutableCharacterSet>;
211
212        #[method_id(@__retain_semantics Other lowercaseLetterCharacterSet)]
213        pub unsafe fn lowercaseLetterCharacterSet() -> Id<NSMutableCharacterSet>;
214
215        #[method_id(@__retain_semantics Other uppercaseLetterCharacterSet)]
216        pub unsafe fn uppercaseLetterCharacterSet() -> Id<NSMutableCharacterSet>;
217
218        #[method_id(@__retain_semantics Other nonBaseCharacterSet)]
219        pub unsafe fn nonBaseCharacterSet() -> Id<NSMutableCharacterSet>;
220
221        #[method_id(@__retain_semantics Other alphanumericCharacterSet)]
222        pub unsafe fn alphanumericCharacterSet() -> Id<NSMutableCharacterSet>;
223
224        #[method_id(@__retain_semantics Other decomposableCharacterSet)]
225        pub unsafe fn decomposableCharacterSet() -> Id<NSMutableCharacterSet>;
226
227        #[method_id(@__retain_semantics Other illegalCharacterSet)]
228        pub unsafe fn illegalCharacterSet() -> Id<NSMutableCharacterSet>;
229
230        #[method_id(@__retain_semantics Other punctuationCharacterSet)]
231        pub unsafe fn punctuationCharacterSet() -> Id<NSMutableCharacterSet>;
232
233        #[method_id(@__retain_semantics Other capitalizedLetterCharacterSet)]
234        pub unsafe fn capitalizedLetterCharacterSet() -> Id<NSMutableCharacterSet>;
235
236        #[method_id(@__retain_semantics Other symbolCharacterSet)]
237        pub unsafe fn symbolCharacterSet() -> Id<NSMutableCharacterSet>;
238
239        #[method_id(@__retain_semantics Other newlineCharacterSet)]
240        pub unsafe fn newlineCharacterSet() -> Id<NSMutableCharacterSet>;
241
242        #[method_id(@__retain_semantics Other characterSetWithRange:)]
243        pub unsafe fn characterSetWithRange(a_range: NSRange) -> Id<NSMutableCharacterSet>;
244
245        #[cfg(feature = "Foundation_NSString")]
246        #[method_id(@__retain_semantics Other characterSetWithCharactersInString:)]
247        pub unsafe fn characterSetWithCharactersInString(
248            a_string: &NSString,
249        ) -> Id<NSMutableCharacterSet>;
250
251        #[cfg(feature = "Foundation_NSData")]
252        #[method_id(@__retain_semantics Other characterSetWithBitmapRepresentation:)]
253        pub unsafe fn characterSetWithBitmapRepresentation(
254            data: &NSData,
255        ) -> Id<NSMutableCharacterSet>;
256
257        #[cfg(feature = "Foundation_NSString")]
258        #[method_id(@__retain_semantics Other characterSetWithContentsOfFile:)]
259        pub unsafe fn characterSetWithContentsOfFile(
260            f_name: &NSString,
261        ) -> Option<Id<NSMutableCharacterSet>>;
262    }
263);
264
265extern_methods!(
266    /// Methods declared on superclass `NSCharacterSet`
267    #[cfg(feature = "Foundation_NSMutableCharacterSet")]
268    unsafe impl NSMutableCharacterSet {
269        #[cfg(feature = "Foundation_NSCoder")]
270        #[method_id(@__retain_semantics Init initWithCoder:)]
271        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
272    }
273);
274
275extern_methods!(
276    /// Methods declared on superclass `NSObject`
277    #[cfg(feature = "Foundation_NSMutableCharacterSet")]
278    unsafe impl NSMutableCharacterSet {
279        #[method_id(@__retain_semantics Init init)]
280        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
281
282        #[method_id(@__retain_semantics New new)]
283        pub unsafe fn new() -> Id<Self>;
284    }
285);