1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSAccessibilityCustomRotorSearchDirection(pub NSInteger);
impl NSAccessibilityCustomRotorSearchDirection {
    #[doc(alias = "NSAccessibilityCustomRotorSearchDirectionPrevious")]
    pub const Previous: Self = Self(0);
    #[doc(alias = "NSAccessibilityCustomRotorSearchDirectionNext")]
    pub const Next: Self = Self(1);
}

unsafe impl Encode for NSAccessibilityCustomRotorSearchDirection {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for NSAccessibilityCustomRotorSearchDirection {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSAccessibilityCustomRotorType(pub NSInteger);
impl NSAccessibilityCustomRotorType {
    #[doc(alias = "NSAccessibilityCustomRotorTypeCustom")]
    pub const Custom: Self = Self(0);
    #[doc(alias = "NSAccessibilityCustomRotorTypeAny")]
    pub const Any: Self = Self(1);
    #[doc(alias = "NSAccessibilityCustomRotorTypeAnnotation")]
    pub const Annotation: Self = Self(2);
    #[doc(alias = "NSAccessibilityCustomRotorTypeBoldText")]
    pub const BoldText: Self = Self(3);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeading")]
    pub const Heading: Self = Self(4);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel1")]
    pub const HeadingLevel1: Self = Self(5);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel2")]
    pub const HeadingLevel2: Self = Self(6);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel3")]
    pub const HeadingLevel3: Self = Self(7);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel4")]
    pub const HeadingLevel4: Self = Self(8);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel5")]
    pub const HeadingLevel5: Self = Self(9);
    #[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel6")]
    pub const HeadingLevel6: Self = Self(10);
    #[doc(alias = "NSAccessibilityCustomRotorTypeImage")]
    pub const Image: Self = Self(11);
    #[doc(alias = "NSAccessibilityCustomRotorTypeItalicText")]
    pub const ItalicText: Self = Self(12);
    #[doc(alias = "NSAccessibilityCustomRotorTypeLandmark")]
    pub const Landmark: Self = Self(13);
    #[doc(alias = "NSAccessibilityCustomRotorTypeLink")]
    pub const Link: Self = Self(14);
    #[doc(alias = "NSAccessibilityCustomRotorTypeList")]
    pub const List: Self = Self(15);
    #[doc(alias = "NSAccessibilityCustomRotorTypeMisspelledWord")]
    pub const MisspelledWord: Self = Self(16);
    #[doc(alias = "NSAccessibilityCustomRotorTypeTable")]
    pub const Table: Self = Self(17);
    #[doc(alias = "NSAccessibilityCustomRotorTypeTextField")]
    pub const TextField: Self = Self(18);
    #[doc(alias = "NSAccessibilityCustomRotorTypeUnderlinedText")]
    pub const UnderlinedText: Self = Self(19);
    #[doc(alias = "NSAccessibilityCustomRotorTypeVisitedLink")]
    pub const VisitedLink: Self = Self(20);
    #[doc(alias = "NSAccessibilityCustomRotorTypeAudiograph")]
    pub const Audiograph: Self = Self(21);
}

unsafe impl Encode for NSAccessibilityCustomRotorType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for NSAccessibilityCustomRotorType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSAccessibilityCustomRotor;

    unsafe impl ClassType for NSAccessibilityCustomRotor {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for NSAccessibilityCustomRotor {}

extern_methods!(
    unsafe impl NSAccessibilityCustomRotor {
        #[method_id(@__retain_semantics Init initWithLabel:itemSearchDelegate:)]
        pub unsafe fn initWithLabel_itemSearchDelegate(
            this: Allocated<Self>,
            label: &NSString,
            item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
        ) -> Id<Self>;

        #[method_id(@__retain_semantics Init initWithRotorType:itemSearchDelegate:)]
        pub unsafe fn initWithRotorType_itemSearchDelegate(
            this: Allocated<Self>,
            rotor_type: NSAccessibilityCustomRotorType,
            item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
        ) -> Id<Self>;

        #[method(type)]
        pub unsafe fn r#type(&self) -> NSAccessibilityCustomRotorType;

        #[method(setType:)]
        pub unsafe fn setType(&self, r#type: NSAccessibilityCustomRotorType);

        #[method_id(@__retain_semantics Other label)]
        pub unsafe fn label(&self) -> Id<NSString>;

        #[method(setLabel:)]
        pub unsafe fn setLabel(&self, label: &NSString);

        #[method_id(@__retain_semantics Other itemSearchDelegate)]
        pub unsafe fn itemSearchDelegate(
            &self,
        ) -> Option<Id<ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>>>;

        #[method(setItemSearchDelegate:)]
        pub unsafe fn setItemSearchDelegate(
            &self,
            item_search_delegate: Option<
                &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
            >,
        );

        #[cfg(feature = "NSAccessibilityProtocols")]
        #[method_id(@__retain_semantics Other itemLoadingDelegate)]
        pub unsafe fn itemLoadingDelegate(
            &self,
        ) -> Option<Id<ProtocolObject<dyn NSAccessibilityElementLoading>>>;

        #[cfg(feature = "NSAccessibilityProtocols")]
        #[method(setItemLoadingDelegate:)]
        pub unsafe fn setItemLoadingDelegate(
            &self,
            item_loading_delegate: Option<&ProtocolObject<dyn NSAccessibilityElementLoading>>,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSAccessibilityCustomRotor {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSAccessibilityCustomRotorSearchParameters;

    unsafe impl ClassType for NSAccessibilityCustomRotorSearchParameters {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorSearchParameters {}

extern_methods!(
    unsafe impl NSAccessibilityCustomRotorSearchParameters {
        #[method_id(@__retain_semantics Other currentItem)]
        pub unsafe fn currentItem(&self) -> Option<Id<NSAccessibilityCustomRotorItemResult>>;

        #[method(setCurrentItem:)]
        pub unsafe fn setCurrentItem(
            &self,
            current_item: Option<&NSAccessibilityCustomRotorItemResult>,
        );

        #[method(searchDirection)]
        pub unsafe fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection;

        #[method(setSearchDirection:)]
        pub unsafe fn setSearchDirection(
            &self,
            search_direction: NSAccessibilityCustomRotorSearchDirection,
        );

        #[method_id(@__retain_semantics Other filterString)]
        pub unsafe fn filterString(&self) -> Id<NSString>;

        #[method(setFilterString:)]
        pub unsafe fn setFilterString(&self, filter_string: &NSString);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSAccessibilityCustomRotorSearchParameters {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSAccessibilityCustomRotorItemResult;

    unsafe impl ClassType for NSAccessibilityCustomRotorItemResult {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {}

extern_methods!(
    unsafe impl NSAccessibilityCustomRotorItemResult {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[cfg(feature = "NSAccessibilityProtocols")]
        #[method_id(@__retain_semantics Init initWithTargetElement:)]
        pub unsafe fn initWithTargetElement(
            this: Allocated<Self>,
            target_element: &ProtocolObject<dyn NSAccessibilityElementProtocol>,
        ) -> Id<Self>;

        #[cfg(feature = "NSAccessibilityConstants")]
        #[method_id(@__retain_semantics Init initWithItemLoadingToken:customLabel:)]
        pub unsafe fn initWithItemLoadingToken_customLabel(
            this: Allocated<Self>,
            item_loading_token: &NSAccessibilityLoadingToken,
            custom_label: &NSString,
        ) -> Id<Self>;

        #[cfg(feature = "NSAccessibilityProtocols")]
        #[method_id(@__retain_semantics Other targetElement)]
        pub unsafe fn targetElement(
            &self,
        ) -> Option<Id<ProtocolObject<dyn NSAccessibilityElementProtocol>>>;

        #[cfg(feature = "NSAccessibilityConstants")]
        #[method_id(@__retain_semantics Other itemLoadingToken)]
        pub unsafe fn itemLoadingToken(&self) -> Option<Id<NSAccessibilityLoadingToken>>;

        #[method(targetRange)]
        pub unsafe fn targetRange(&self) -> NSRange;

        #[method(setTargetRange:)]
        pub unsafe fn setTargetRange(&self, target_range: NSRange);

        #[method_id(@__retain_semantics Other customLabel)]
        pub unsafe fn customLabel(&self) -> Option<Id<NSString>>;

        #[method(setCustomLabel:)]
        pub unsafe fn setCustomLabel(&self, custom_label: Option<&NSString>);
    }
);

extern_protocol!(
    pub unsafe trait NSAccessibilityCustomRotorItemSearchDelegate: NSObjectProtocol {
        #[method_id(@__retain_semantics Other rotor:resultForSearchParameters:)]
        unsafe fn rotor_resultForSearchParameters(
            &self,
            rotor: &NSAccessibilityCustomRotor,
            search_parameters: &NSAccessibilityCustomRotorSearchParameters,
        ) -> Option<Id<NSAccessibilityCustomRotorItemResult>>;
    }

    unsafe impl ProtocolType for dyn NSAccessibilityCustomRotorItemSearchDelegate {}
);