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 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 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 fn r#type(&self) -> NSAccessibilityCustomRotorType;
140
141 #[unsafe(method(setType:))]
143 #[unsafe(method_family = none)]
144 pub fn setType(&self, r#type: NSAccessibilityCustomRotorType);
145
146 #[unsafe(method(label))]
153 #[unsafe(method_family = none)]
154 pub fn label(&self) -> Retained<NSString>;
155
156 #[unsafe(method(setLabel:))]
160 #[unsafe(method_family = none)]
161 pub fn setLabel(&self, label: &NSString);
162
163 #[unsafe(method(itemSearchDelegate))]
166 #[unsafe(method_family = none)]
167 pub fn itemSearchDelegate(
168 &self,
169 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>>>;
170
171 #[unsafe(method(setItemSearchDelegate:))]
175 #[unsafe(method_family = none)]
176 pub fn setItemSearchDelegate(
177 &self,
178 item_search_delegate: Option<
179 &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
180 >,
181 );
182
183 #[cfg(feature = "NSAccessibilityProtocols")]
184 #[unsafe(method(itemLoadingDelegate))]
190 #[unsafe(method_family = none)]
191 pub fn itemLoadingDelegate(
192 &self,
193 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementLoading>>>;
194
195 #[cfg(feature = "NSAccessibilityProtocols")]
196 #[unsafe(method(setItemLoadingDelegate:))]
200 #[unsafe(method_family = none)]
201 pub fn setItemLoadingDelegate(
202 &self,
203 item_loading_delegate: Option<&ProtocolObject<dyn NSAccessibilityElementLoading>>,
204 );
205 );
206}
207
208impl NSAccessibilityCustomRotor {
210 extern_methods!(
211 #[unsafe(method(init))]
212 #[unsafe(method_family = init)]
213 pub fn init(this: Allocated<Self>) -> Retained<Self>;
214
215 #[unsafe(method(new))]
216 #[unsafe(method_family = new)]
217 pub fn new() -> Retained<Self>;
218 );
219}
220
221impl DefaultRetained for NSAccessibilityCustomRotor {
222 #[inline]
223 fn default_retained() -> Retained<Self> {
224 Self::new()
225 }
226}
227
228extern_class!(
229 #[unsafe(super(NSObject))]
235 #[derive(Debug, PartialEq, Eq, Hash)]
236 pub struct NSAccessibilityCustomRotorSearchParameters;
237);
238
239extern_conformance!(
240 unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorSearchParameters {}
241);
242
243impl NSAccessibilityCustomRotorSearchParameters {
244 extern_methods!(
245 #[unsafe(method(currentItem))]
250 #[unsafe(method_family = none)]
251 pub fn currentItem(&self) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
252
253 #[unsafe(method(setCurrentItem:))]
255 #[unsafe(method_family = none)]
256 pub fn setCurrentItem(&self, current_item: Option<&NSAccessibilityCustomRotorItemResult>);
257
258 #[unsafe(method(searchDirection))]
261 #[unsafe(method_family = none)]
262 pub fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection;
263
264 #[unsafe(method(setSearchDirection:))]
266 #[unsafe(method_family = none)]
267 pub fn setSearchDirection(
268 &self,
269 search_direction: NSAccessibilityCustomRotorSearchDirection,
270 );
271
272 #[unsafe(method(filterString))]
276 #[unsafe(method_family = none)]
277 pub fn filterString(&self) -> Retained<NSString>;
278
279 #[unsafe(method(setFilterString:))]
283 #[unsafe(method_family = none)]
284 pub fn setFilterString(&self, filter_string: &NSString);
285 );
286}
287
288impl NSAccessibilityCustomRotorSearchParameters {
290 extern_methods!(
291 #[unsafe(method(init))]
292 #[unsafe(method_family = init)]
293 pub fn init(this: Allocated<Self>) -> Retained<Self>;
294
295 #[unsafe(method(new))]
296 #[unsafe(method_family = new)]
297 pub fn new() -> Retained<Self>;
298 );
299}
300
301impl DefaultRetained for NSAccessibilityCustomRotorSearchParameters {
302 #[inline]
303 fn default_retained() -> Retained<Self> {
304 Self::new()
305 }
306}
307
308extern_class!(
309 #[unsafe(super(NSObject))]
314 #[derive(Debug, PartialEq, Eq, Hash)]
315 pub struct NSAccessibilityCustomRotorItemResult;
316);
317
318extern_conformance!(
319 unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {}
320);
321
322impl NSAccessibilityCustomRotorItemResult {
323 extern_methods!(
324 #[unsafe(method(new))]
325 #[unsafe(method_family = new)]
326 pub unsafe fn new() -> Retained<Self>;
327
328 #[unsafe(method(init))]
329 #[unsafe(method_family = init)]
330 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
331
332 #[cfg(feature = "NSAccessibilityProtocols")]
333 #[unsafe(method(initWithTargetElement:))]
336 #[unsafe(method_family = init)]
337 pub fn initWithTargetElement(
338 this: Allocated<Self>,
339 target_element: &ProtocolObject<dyn NSAccessibilityElementProtocol>,
340 ) -> Retained<Self>;
341
342 #[cfg(feature = "NSAccessibilityConstants")]
343 #[unsafe(method(initWithItemLoadingToken:customLabel:))]
351 #[unsafe(method_family = init)]
352 pub unsafe fn initWithItemLoadingToken_customLabel(
353 this: Allocated<Self>,
354 item_loading_token: &NSAccessibilityLoadingToken,
355 custom_label: &NSString,
356 ) -> Retained<Self>;
357
358 #[cfg(feature = "NSAccessibilityProtocols")]
359 #[unsafe(method(targetElement))]
363 #[unsafe(method_family = none)]
364 pub fn targetElement(
365 &self,
366 ) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementProtocol>>>;
367
368 #[cfg(feature = "NSAccessibilityConstants")]
369 #[unsafe(method(itemLoadingToken))]
373 #[unsafe(method_family = none)]
374 pub fn itemLoadingToken(&self) -> Option<Retained<NSAccessibilityLoadingToken>>;
375
376 #[unsafe(method(targetRange))]
381 #[unsafe(method_family = none)]
382 pub fn targetRange(&self) -> NSRange;
383
384 #[unsafe(method(setTargetRange:))]
386 #[unsafe(method_family = none)]
387 pub fn setTargetRange(&self, target_range: NSRange);
388
389 #[unsafe(method(customLabel))]
394 #[unsafe(method_family = none)]
395 pub fn customLabel(&self) -> Option<Retained<NSString>>;
396
397 #[unsafe(method(setCustomLabel:))]
401 #[unsafe(method_family = none)]
402 pub fn setCustomLabel(&self, custom_label: Option<&NSString>);
403 );
404}
405
406extern_protocol!(
407 pub unsafe trait NSAccessibilityCustomRotorItemSearchDelegate: NSObjectProtocol {
409 #[unsafe(method(rotor:resultForSearchParameters:))]
412 #[unsafe(method_family = none)]
413 fn rotor_resultForSearchParameters(
414 &self,
415 rotor: &NSAccessibilityCustomRotor,
416 search_parameters: &NSAccessibilityCustomRotorSearchParameters,
417 ) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
418 }
419);