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
106extern_conformance!(
107 unsafe impl NSObjectProtocol for NSAccessibilityCustomRotor {}
108);
109
110impl NSAccessibilityCustomRotor {
111 extern_methods!(
112 #[unsafe(method(initWithLabel:itemSearchDelegate:))]
116 #[unsafe(method_family = init)]
117 pub unsafe fn initWithLabel_itemSearchDelegate(
118 this: Allocated<Self>,
119 label: &NSString,
120 item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
121 ) -> Retained<Self>;
122
123 #[unsafe(method(initWithRotorType:itemSearchDelegate:))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn initWithRotorType_itemSearchDelegate(
128 this: Allocated<Self>,
129 rotor_type: NSAccessibilityCustomRotorType,
130 item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
131 ) -> Retained<Self>;
132
133 #[unsafe(method(type))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn r#type(&self) -> NSAccessibilityCustomRotorType;
140
141 #[unsafe(method(setType:))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn setType(&self, r#type: NSAccessibilityCustomRotorType);
145
146 #[unsafe(method(label))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn label(&self) -> Retained<NSString>;
155
156 #[unsafe(method(setLabel:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn setLabel(&self, label: &NSString);
160
161 #[unsafe(method(itemSearchDelegate))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn itemSearchDelegate(
166 &self,
167 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>>>;
168
169 #[unsafe(method(setItemSearchDelegate:))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn setItemSearchDelegate(
174 &self,
175 item_search_delegate: Option<
176 &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
177 >,
178 );
179
180 #[cfg(feature = "NSAccessibilityProtocols")]
181 #[unsafe(method(itemLoadingDelegate))]
187 #[unsafe(method_family = none)]
188 pub unsafe fn itemLoadingDelegate(
189 &self,
190 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementLoading>>>;
191
192 #[cfg(feature = "NSAccessibilityProtocols")]
193 #[unsafe(method(setItemLoadingDelegate:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn setItemLoadingDelegate(
198 &self,
199 item_loading_delegate: Option<&ProtocolObject<dyn NSAccessibilityElementLoading>>,
200 );
201 );
202}
203
204impl NSAccessibilityCustomRotor {
206 extern_methods!(
207 #[unsafe(method(init))]
208 #[unsafe(method_family = init)]
209 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
210
211 #[unsafe(method(new))]
212 #[unsafe(method_family = new)]
213 pub unsafe fn new() -> Retained<Self>;
214 );
215}
216
217extern_class!(
218 #[unsafe(super(NSObject))]
224 #[derive(Debug, PartialEq, Eq, Hash)]
225 pub struct NSAccessibilityCustomRotorSearchParameters;
226);
227
228extern_conformance!(
229 unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorSearchParameters {}
230);
231
232impl NSAccessibilityCustomRotorSearchParameters {
233 extern_methods!(
234 #[unsafe(method(currentItem))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn currentItem(&self) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
241
242 #[unsafe(method(setCurrentItem:))]
244 #[unsafe(method_family = none)]
245 pub unsafe fn setCurrentItem(
246 &self,
247 current_item: Option<&NSAccessibilityCustomRotorItemResult>,
248 );
249
250 #[unsafe(method(searchDirection))]
253 #[unsafe(method_family = none)]
254 pub unsafe fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection;
255
256 #[unsafe(method(setSearchDirection:))]
258 #[unsafe(method_family = none)]
259 pub unsafe fn setSearchDirection(
260 &self,
261 search_direction: NSAccessibilityCustomRotorSearchDirection,
262 );
263
264 #[unsafe(method(filterString))]
268 #[unsafe(method_family = none)]
269 pub unsafe fn filterString(&self) -> Retained<NSString>;
270
271 #[unsafe(method(setFilterString:))]
273 #[unsafe(method_family = none)]
274 pub unsafe fn setFilterString(&self, filter_string: &NSString);
275 );
276}
277
278impl NSAccessibilityCustomRotorSearchParameters {
280 extern_methods!(
281 #[unsafe(method(init))]
282 #[unsafe(method_family = init)]
283 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
284
285 #[unsafe(method(new))]
286 #[unsafe(method_family = new)]
287 pub unsafe fn new() -> Retained<Self>;
288 );
289}
290
291extern_class!(
292 #[unsafe(super(NSObject))]
297 #[derive(Debug, PartialEq, Eq, Hash)]
298 pub struct NSAccessibilityCustomRotorItemResult;
299);
300
301extern_conformance!(
302 unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {}
303);
304
305impl NSAccessibilityCustomRotorItemResult {
306 extern_methods!(
307 #[unsafe(method(new))]
308 #[unsafe(method_family = new)]
309 pub unsafe fn new() -> Retained<Self>;
310
311 #[unsafe(method(init))]
312 #[unsafe(method_family = init)]
313 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
314
315 #[cfg(feature = "NSAccessibilityProtocols")]
316 #[unsafe(method(initWithTargetElement:))]
319 #[unsafe(method_family = init)]
320 pub unsafe fn initWithTargetElement(
321 this: Allocated<Self>,
322 target_element: &ProtocolObject<dyn NSAccessibilityElementProtocol>,
323 ) -> Retained<Self>;
324
325 #[cfg(feature = "NSAccessibilityConstants")]
326 #[unsafe(method(initWithItemLoadingToken:customLabel:))]
330 #[unsafe(method_family = init)]
331 pub unsafe fn initWithItemLoadingToken_customLabel(
332 this: Allocated<Self>,
333 item_loading_token: &NSAccessibilityLoadingToken,
334 custom_label: &NSString,
335 ) -> Retained<Self>;
336
337 #[cfg(feature = "NSAccessibilityProtocols")]
338 #[unsafe(method(targetElement))]
342 #[unsafe(method_family = none)]
343 pub unsafe fn targetElement(
344 &self,
345 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementProtocol>>>;
346
347 #[cfg(feature = "NSAccessibilityConstants")]
348 #[unsafe(method(itemLoadingToken))]
352 #[unsafe(method_family = none)]
353 pub unsafe fn itemLoadingToken(&self) -> Option<Retained<NSAccessibilityLoadingToken>>;
354
355 #[unsafe(method(targetRange))]
360 #[unsafe(method_family = none)]
361 pub unsafe fn targetRange(&self) -> NSRange;
362
363 #[unsafe(method(setTargetRange:))]
365 #[unsafe(method_family = none)]
366 pub unsafe fn setTargetRange(&self, target_range: NSRange);
367
368 #[unsafe(method(customLabel))]
373 #[unsafe(method_family = none)]
374 pub unsafe fn customLabel(&self) -> Option<Retained<NSString>>;
375
376 #[unsafe(method(setCustomLabel:))]
378 #[unsafe(method_family = none)]
379 pub unsafe fn setCustomLabel(&self, custom_label: Option<&NSString>);
380 );
381}
382
383extern_protocol!(
384 pub unsafe trait NSAccessibilityCustomRotorItemSearchDelegate: NSObjectProtocol {
386 #[unsafe(method(rotor:resultForSearchParameters:))]
389 #[unsafe(method_family = none)]
390 unsafe fn rotor_resultForSearchParameters(
391 &self,
392 rotor: &NSAccessibilityCustomRotor,
393 search_parameters: &NSAccessibilityCustomRotorSearchParameters,
394 ) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
395 }
396);