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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum NSAccessibilityCustomRotorSearchDirection {
        NSAccessibilityCustomRotorSearchDirectionPrevious = 0,
        NSAccessibilityCustomRotorSearchDirectionNext = 1,
    }
);

ns_enum!(
    #[underlying(NSInteger)]
    pub enum NSAccessibilityCustomRotorType {
        NSAccessibilityCustomRotorTypeCustom = 0,
        NSAccessibilityCustomRotorTypeAny = 1,
        NSAccessibilityCustomRotorTypeAnnotation = 2,
        NSAccessibilityCustomRotorTypeBoldText = 3,
        NSAccessibilityCustomRotorTypeHeading = 4,
        NSAccessibilityCustomRotorTypeHeadingLevel1 = 5,
        NSAccessibilityCustomRotorTypeHeadingLevel2 = 6,
        NSAccessibilityCustomRotorTypeHeadingLevel3 = 7,
        NSAccessibilityCustomRotorTypeHeadingLevel4 = 8,
        NSAccessibilityCustomRotorTypeHeadingLevel5 = 9,
        NSAccessibilityCustomRotorTypeHeadingLevel6 = 10,
        NSAccessibilityCustomRotorTypeImage = 11,
        NSAccessibilityCustomRotorTypeItalicText = 12,
        NSAccessibilityCustomRotorTypeLandmark = 13,
        NSAccessibilityCustomRotorTypeLink = 14,
        NSAccessibilityCustomRotorTypeList = 15,
        NSAccessibilityCustomRotorTypeMisspelledWord = 16,
        NSAccessibilityCustomRotorTypeTable = 17,
        NSAccessibilityCustomRotorTypeTextField = 18,
        NSAccessibilityCustomRotorTypeUnderlinedText = 19,
        NSAccessibilityCustomRotorTypeVisitedLink = 20,
        NSAccessibilityCustomRotorTypeAudiograph = 21,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "AppKit_NSAccessibilityCustomRotor")]
    pub struct NSAccessibilityCustomRotor;

    #[cfg(feature = "AppKit_NSAccessibilityCustomRotor")]
    unsafe impl ClassType for NSAccessibilityCustomRotor {
        type Super = NSObject;
    }
);

#[cfg(feature = "AppKit_NSAccessibilityCustomRotor")]
unsafe impl NSObjectProtocol for NSAccessibilityCustomRotor {}

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

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

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

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

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other label)]
        pub unsafe fn label(&self) -> Id<NSString, Shared>;

        #[cfg(feature = "Foundation_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>, Shared>>;

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

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

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

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")]
    pub struct NSAccessibilityCustomRotorSearchParameters;

    #[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")]
    unsafe impl ClassType for NSAccessibilityCustomRotorSearchParameters {
        type Super = NSObject;
    }
);

#[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")]
unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorSearchParameters {}

extern_methods!(
    #[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")]
    unsafe impl NSAccessibilityCustomRotorSearchParameters {
        #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")]
        #[method_id(@__retain_semantics Other currentItem)]
        pub unsafe fn currentItem(
            &self,
        ) -> Option<Id<NSAccessibilityCustomRotorItemResult, Shared>>;

        #[cfg(feature = "AppKit_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,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other filterString)]
        pub unsafe fn filterString(&self) -> Id<NSString, Shared>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setFilterString:)]
        pub unsafe fn setFilterString(&self, filter_string: &NSString);
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")]
    pub struct NSAccessibilityCustomRotorItemResult;

    #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")]
    unsafe impl ClassType for NSAccessibilityCustomRotorItemResult {
        type Super = NSObject;
    }
);

#[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")]
unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {}

extern_methods!(
    #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")]
    unsafe impl NSAccessibilityCustomRotorItemResult {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self, Shared>;

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

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

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

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

        #[method_id(@__retain_semantics Other itemLoadingToken)]
        pub unsafe fn itemLoadingToken(&self) -> Option<Id<NSAccessibilityLoadingToken, Shared>>;

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

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

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other customLabel)]
        pub unsafe fn customLabel(&self) -> Option<Id<NSString, Shared>>;

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

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

    unsafe impl ProtocolType for dyn NSAccessibilityCustomRotorItemSearchDelegate {}
);