objc2_app_kit/generated/
NSAccessibilityCustomRotor.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSAccessibilityCustomRotorSearchDirection(pub NSInteger);
17impl NSAccessibilityCustomRotorSearchDirection {
18 #[doc(alias = "NSAccessibilityCustomRotorSearchDirectionPrevious")]
19 pub const Previous: Self = Self(0);
20 #[doc(alias = "NSAccessibilityCustomRotorSearchDirectionNext")]
21 pub const Next: Self = Self(1);
22}
23
24unsafe impl Encode for NSAccessibilityCustomRotorSearchDirection {
25 const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for NSAccessibilityCustomRotorSearchDirection {
29 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32#[repr(transparent)]
39#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
40pub struct NSAccessibilityCustomRotorType(pub NSInteger);
41impl NSAccessibilityCustomRotorType {
42 #[doc(alias = "NSAccessibilityCustomRotorTypeCustom")]
43 pub const Custom: Self = Self(0);
44 #[doc(alias = "NSAccessibilityCustomRotorTypeAny")]
45 pub const Any: Self = Self(1);
46 #[doc(alias = "NSAccessibilityCustomRotorTypeAnnotation")]
47 pub const Annotation: Self = Self(2);
48 #[doc(alias = "NSAccessibilityCustomRotorTypeBoldText")]
49 pub const BoldText: Self = Self(3);
50 #[doc(alias = "NSAccessibilityCustomRotorTypeHeading")]
51 pub const Heading: Self = Self(4);
52 #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel1")]
53 pub const HeadingLevel1: Self = Self(5);
54 #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel2")]
55 pub const HeadingLevel2: Self = Self(6);
56 #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel3")]
57 pub const HeadingLevel3: Self = Self(7);
58 #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel4")]
59 pub const HeadingLevel4: Self = Self(8);
60 #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel5")]
61 pub const HeadingLevel5: Self = Self(9);
62 #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel6")]
63 pub const HeadingLevel6: Self = Self(10);
64 #[doc(alias = "NSAccessibilityCustomRotorTypeImage")]
65 pub const Image: Self = Self(11);
66 #[doc(alias = "NSAccessibilityCustomRotorTypeItalicText")]
67 pub const ItalicText: Self = Self(12);
68 #[doc(alias = "NSAccessibilityCustomRotorTypeLandmark")]
69 pub const Landmark: Self = Self(13);
70 #[doc(alias = "NSAccessibilityCustomRotorTypeLink")]
71 pub const Link: Self = Self(14);
72 #[doc(alias = "NSAccessibilityCustomRotorTypeList")]
73 pub const List: Self = Self(15);
74 #[doc(alias = "NSAccessibilityCustomRotorTypeMisspelledWord")]
75 pub const MisspelledWord: Self = Self(16);
76 #[doc(alias = "NSAccessibilityCustomRotorTypeTable")]
77 pub const Table: Self = Self(17);
78 #[doc(alias = "NSAccessibilityCustomRotorTypeTextField")]
79 pub const TextField: Self = Self(18);
80 #[doc(alias = "NSAccessibilityCustomRotorTypeUnderlinedText")]
81 pub const UnderlinedText: Self = Self(19);
82 #[doc(alias = "NSAccessibilityCustomRotorTypeVisitedLink")]
83 pub const VisitedLink: Self = Self(20);
84 #[doc(alias = "NSAccessibilityCustomRotorTypeAudiograph")]
85 pub const Audiograph: Self = Self(21);
86}
87
88unsafe impl Encode for NSAccessibilityCustomRotorType {
89 const ENCODING: Encoding = NSInteger::ENCODING;
90}
91
92unsafe impl RefEncode for NSAccessibilityCustomRotorType {
93 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
94}
95
96extern_class!(
97 #[unsafe(super(NSObject))]
102 #[derive(Debug, PartialEq, Eq, Hash)]
103 pub struct NSAccessibilityCustomRotor;
104);
105
106unsafe impl NSObjectProtocol for NSAccessibilityCustomRotor {}
107
108impl NSAccessibilityCustomRotor {
109 extern_methods!(
110 #[unsafe(method(initWithLabel:itemSearchDelegate:))]
114 #[unsafe(method_family = init)]
115 pub unsafe fn initWithLabel_itemSearchDelegate(
116 this: Allocated<Self>,
117 label: &NSString,
118 item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
119 ) -> Retained<Self>;
120
121 #[unsafe(method(initWithRotorType:itemSearchDelegate:))]
124 #[unsafe(method_family = init)]
125 pub unsafe fn initWithRotorType_itemSearchDelegate(
126 this: Allocated<Self>,
127 rotor_type: NSAccessibilityCustomRotorType,
128 item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
129 ) -> Retained<Self>;
130
131 #[unsafe(method(type))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn r#type(&self) -> NSAccessibilityCustomRotorType;
138
139 #[unsafe(method(setType:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn setType(&self, r#type: NSAccessibilityCustomRotorType);
143
144 #[unsafe(method(label))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn label(&self) -> Retained<NSString>;
153
154 #[unsafe(method(setLabel:))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn setLabel(&self, label: &NSString);
158
159 #[unsafe(method(itemSearchDelegate))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn itemSearchDelegate(
164 &self,
165 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>>>;
166
167 #[unsafe(method(setItemSearchDelegate:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setItemSearchDelegate(
172 &self,
173 item_search_delegate: Option<
174 &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
175 >,
176 );
177
178 #[cfg(feature = "NSAccessibilityProtocols")]
179 #[unsafe(method(itemLoadingDelegate))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn itemLoadingDelegate(
187 &self,
188 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementLoading>>>;
189
190 #[cfg(feature = "NSAccessibilityProtocols")]
191 #[unsafe(method(setItemLoadingDelegate:))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn setItemLoadingDelegate(
196 &self,
197 item_loading_delegate: Option<&ProtocolObject<dyn NSAccessibilityElementLoading>>,
198 );
199 );
200}
201
202impl NSAccessibilityCustomRotor {
204 extern_methods!(
205 #[unsafe(method(init))]
206 #[unsafe(method_family = init)]
207 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
208
209 #[unsafe(method(new))]
210 #[unsafe(method_family = new)]
211 pub unsafe fn new() -> Retained<Self>;
212 );
213}
214
215extern_class!(
216 #[unsafe(super(NSObject))]
222 #[derive(Debug, PartialEq, Eq, Hash)]
223 pub struct NSAccessibilityCustomRotorSearchParameters;
224);
225
226unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorSearchParameters {}
227
228impl NSAccessibilityCustomRotorSearchParameters {
229 extern_methods!(
230 #[unsafe(method(currentItem))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn currentItem(&self) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
237
238 #[unsafe(method(setCurrentItem:))]
240 #[unsafe(method_family = none)]
241 pub unsafe fn setCurrentItem(
242 &self,
243 current_item: Option<&NSAccessibilityCustomRotorItemResult>,
244 );
245
246 #[unsafe(method(searchDirection))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection;
251
252 #[unsafe(method(setSearchDirection:))]
254 #[unsafe(method_family = none)]
255 pub unsafe fn setSearchDirection(
256 &self,
257 search_direction: NSAccessibilityCustomRotorSearchDirection,
258 );
259
260 #[unsafe(method(filterString))]
264 #[unsafe(method_family = none)]
265 pub unsafe fn filterString(&self) -> Retained<NSString>;
266
267 #[unsafe(method(setFilterString:))]
269 #[unsafe(method_family = none)]
270 pub unsafe fn setFilterString(&self, filter_string: &NSString);
271 );
272}
273
274impl NSAccessibilityCustomRotorSearchParameters {
276 extern_methods!(
277 #[unsafe(method(init))]
278 #[unsafe(method_family = init)]
279 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
280
281 #[unsafe(method(new))]
282 #[unsafe(method_family = new)]
283 pub unsafe fn new() -> Retained<Self>;
284 );
285}
286
287extern_class!(
288 #[unsafe(super(NSObject))]
293 #[derive(Debug, PartialEq, Eq, Hash)]
294 pub struct NSAccessibilityCustomRotorItemResult;
295);
296
297unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {}
298
299impl NSAccessibilityCustomRotorItemResult {
300 extern_methods!(
301 #[unsafe(method(new))]
302 #[unsafe(method_family = new)]
303 pub unsafe fn new() -> Retained<Self>;
304
305 #[unsafe(method(init))]
306 #[unsafe(method_family = init)]
307 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
308
309 #[cfg(feature = "NSAccessibilityProtocols")]
310 #[unsafe(method(initWithTargetElement:))]
313 #[unsafe(method_family = init)]
314 pub unsafe fn initWithTargetElement(
315 this: Allocated<Self>,
316 target_element: &ProtocolObject<dyn NSAccessibilityElementProtocol>,
317 ) -> Retained<Self>;
318
319 #[cfg(feature = "NSAccessibilityConstants")]
320 #[unsafe(method(initWithItemLoadingToken:customLabel:))]
324 #[unsafe(method_family = init)]
325 pub unsafe fn initWithItemLoadingToken_customLabel(
326 this: Allocated<Self>,
327 item_loading_token: &NSAccessibilityLoadingToken,
328 custom_label: &NSString,
329 ) -> Retained<Self>;
330
331 #[cfg(feature = "NSAccessibilityProtocols")]
332 #[unsafe(method(targetElement))]
336 #[unsafe(method_family = none)]
337 pub unsafe fn targetElement(
338 &self,
339 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementProtocol>>>;
340
341 #[cfg(feature = "NSAccessibilityConstants")]
342 #[unsafe(method(itemLoadingToken))]
346 #[unsafe(method_family = none)]
347 pub unsafe fn itemLoadingToken(&self) -> Option<Retained<NSAccessibilityLoadingToken>>;
348
349 #[unsafe(method(targetRange))]
354 #[unsafe(method_family = none)]
355 pub unsafe fn targetRange(&self) -> NSRange;
356
357 #[unsafe(method(setTargetRange:))]
359 #[unsafe(method_family = none)]
360 pub unsafe fn setTargetRange(&self, target_range: NSRange);
361
362 #[unsafe(method(customLabel))]
367 #[unsafe(method_family = none)]
368 pub unsafe fn customLabel(&self) -> Option<Retained<NSString>>;
369
370 #[unsafe(method(setCustomLabel:))]
372 #[unsafe(method_family = none)]
373 pub unsafe fn setCustomLabel(&self, custom_label: Option<&NSString>);
374 );
375}
376
377extern_protocol!(
378 pub unsafe trait NSAccessibilityCustomRotorItemSearchDelegate: NSObjectProtocol {
380 #[unsafe(method(rotor:resultForSearchParameters:))]
383 #[unsafe(method_family = none)]
384 unsafe fn rotor_resultForSearchParameters(
385 &self,
386 rotor: &NSAccessibilityCustomRotor,
387 search_parameters: &NSAccessibilityCustomRotorSearchParameters,
388 ) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
389 }
390);