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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
//! 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
#[deprecated]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct WebCacheModel(pub NSUInteger);
impl WebCacheModel {
    #[deprecated]
    #[doc(alias = "WebCacheModelDocumentViewer")]
    pub const DocumentViewer: Self = Self(0);
    #[deprecated]
    #[doc(alias = "WebCacheModelDocumentBrowser")]
    pub const DocumentBrowser: Self = Self(1);
    #[deprecated]
    #[doc(alias = "WebCacheModelPrimaryWebBrowser")]
    pub const PrimaryWebBrowser: Self = Self(2);
}

unsafe impl Encode for WebCacheModel {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

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

extern "C" {
    pub static WebPreferencesChangedNotification: Option<&'static NSString>;
}

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

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

unsafe impl NSCoding for WebPreferences {}

unsafe impl NSObjectProtocol for WebPreferences {}

extern_methods!(
    unsafe impl WebPreferences {
        #[deprecated]
        #[method_id(@__retain_semantics Other standardPreferences)]
        pub unsafe fn standardPreferences() -> Option<Retained<WebPreferences>>;

        #[deprecated]
        #[method_id(@__retain_semantics Init initWithIdentifier:)]
        pub unsafe fn initWithIdentifier(
            this: Allocated<Self>,
            an_identifier: Option<&NSString>,
        ) -> Option<Retained<Self>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Retained<NSString>;

        #[deprecated]
        #[method_id(@__retain_semantics Other standardFontFamily)]
        pub unsafe fn standardFontFamily(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setStandardFontFamily:)]
        pub unsafe fn setStandardFontFamily(&self, standard_font_family: Option<&NSString>);

        #[deprecated]
        #[method_id(@__retain_semantics Other fixedFontFamily)]
        pub unsafe fn fixedFontFamily(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setFixedFontFamily:)]
        pub unsafe fn setFixedFontFamily(&self, fixed_font_family: Option<&NSString>);

        #[deprecated]
        #[method_id(@__retain_semantics Other serifFontFamily)]
        pub unsafe fn serifFontFamily(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setSerifFontFamily:)]
        pub unsafe fn setSerifFontFamily(&self, serif_font_family: Option<&NSString>);

        #[deprecated]
        #[method_id(@__retain_semantics Other sansSerifFontFamily)]
        pub unsafe fn sansSerifFontFamily(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setSansSerifFontFamily:)]
        pub unsafe fn setSansSerifFontFamily(&self, sans_serif_font_family: Option<&NSString>);

        #[deprecated]
        #[method_id(@__retain_semantics Other cursiveFontFamily)]
        pub unsafe fn cursiveFontFamily(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setCursiveFontFamily:)]
        pub unsafe fn setCursiveFontFamily(&self, cursive_font_family: Option<&NSString>);

        #[deprecated]
        #[method_id(@__retain_semantics Other fantasyFontFamily)]
        pub unsafe fn fantasyFontFamily(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setFantasyFontFamily:)]
        pub unsafe fn setFantasyFontFamily(&self, fantasy_font_family: Option<&NSString>);

        #[deprecated]
        #[method(defaultFontSize)]
        pub unsafe fn defaultFontSize(&self) -> c_int;

        #[deprecated]
        #[method(setDefaultFontSize:)]
        pub unsafe fn setDefaultFontSize(&self, default_font_size: c_int);

        #[deprecated]
        #[method(defaultFixedFontSize)]
        pub unsafe fn defaultFixedFontSize(&self) -> c_int;

        #[deprecated]
        #[method(setDefaultFixedFontSize:)]
        pub unsafe fn setDefaultFixedFontSize(&self, default_fixed_font_size: c_int);

        #[deprecated]
        #[method(minimumFontSize)]
        pub unsafe fn minimumFontSize(&self) -> c_int;

        #[deprecated]
        #[method(setMinimumFontSize:)]
        pub unsafe fn setMinimumFontSize(&self, minimum_font_size: c_int);

        #[deprecated]
        #[method(minimumLogicalFontSize)]
        pub unsafe fn minimumLogicalFontSize(&self) -> c_int;

        #[deprecated]
        #[method(setMinimumLogicalFontSize:)]
        pub unsafe fn setMinimumLogicalFontSize(&self, minimum_logical_font_size: c_int);

        #[deprecated]
        #[method_id(@__retain_semantics Other defaultTextEncodingName)]
        pub unsafe fn defaultTextEncodingName(&self) -> Retained<NSString>;

        #[deprecated]
        #[method(setDefaultTextEncodingName:)]
        pub unsafe fn setDefaultTextEncodingName(
            &self,
            default_text_encoding_name: Option<&NSString>,
        );

        #[deprecated]
        #[method(userStyleSheetEnabled)]
        pub unsafe fn userStyleSheetEnabled(&self) -> bool;

        #[deprecated]
        #[method(setUserStyleSheetEnabled:)]
        pub unsafe fn setUserStyleSheetEnabled(&self, user_style_sheet_enabled: bool);

        #[deprecated]
        #[method_id(@__retain_semantics Other userStyleSheetLocation)]
        pub unsafe fn userStyleSheetLocation(&self) -> Option<Retained<NSURL>>;

        #[deprecated]
        #[method(setUserStyleSheetLocation:)]
        pub unsafe fn setUserStyleSheetLocation(&self, user_style_sheet_location: Option<&NSURL>);

        #[deprecated]
        #[method(isJavaEnabled)]
        pub unsafe fn isJavaEnabled(&self) -> bool;

        #[deprecated]
        #[method(setJavaEnabled:)]
        pub unsafe fn setJavaEnabled(&self, java_enabled: bool);

        #[deprecated]
        #[method(isJavaScriptEnabled)]
        pub unsafe fn isJavaScriptEnabled(&self) -> bool;

        #[deprecated]
        #[method(setJavaScriptEnabled:)]
        pub unsafe fn setJavaScriptEnabled(&self, java_script_enabled: bool);

        #[deprecated]
        #[method(javaScriptCanOpenWindowsAutomatically)]
        pub unsafe fn javaScriptCanOpenWindowsAutomatically(&self) -> bool;

        #[deprecated]
        #[method(setJavaScriptCanOpenWindowsAutomatically:)]
        pub unsafe fn setJavaScriptCanOpenWindowsAutomatically(
            &self,
            java_script_can_open_windows_automatically: bool,
        );

        #[deprecated]
        #[method(arePlugInsEnabled)]
        pub unsafe fn arePlugInsEnabled(&self) -> bool;

        #[deprecated]
        #[method(setPlugInsEnabled:)]
        pub unsafe fn setPlugInsEnabled(&self, plug_ins_enabled: bool);

        #[deprecated]
        #[method(allowsAnimatedImages)]
        pub unsafe fn allowsAnimatedImages(&self) -> bool;

        #[deprecated]
        #[method(setAllowsAnimatedImages:)]
        pub unsafe fn setAllowsAnimatedImages(&self, allows_animated_images: bool);

        #[deprecated]
        #[method(allowsAnimatedImageLooping)]
        pub unsafe fn allowsAnimatedImageLooping(&self) -> bool;

        #[deprecated]
        #[method(setAllowsAnimatedImageLooping:)]
        pub unsafe fn setAllowsAnimatedImageLooping(&self, allows_animated_image_looping: bool);

        #[deprecated]
        #[method(loadsImagesAutomatically)]
        pub unsafe fn loadsImagesAutomatically(&self) -> bool;

        #[deprecated]
        #[method(setLoadsImagesAutomatically:)]
        pub unsafe fn setLoadsImagesAutomatically(&self, loads_images_automatically: bool);

        #[deprecated]
        #[method(autosaves)]
        pub unsafe fn autosaves(&self) -> bool;

        #[deprecated]
        #[method(setAutosaves:)]
        pub unsafe fn setAutosaves(&self, autosaves: bool);

        #[deprecated]
        #[method(shouldPrintBackgrounds)]
        pub unsafe fn shouldPrintBackgrounds(&self) -> bool;

        #[deprecated]
        #[method(setShouldPrintBackgrounds:)]
        pub unsafe fn setShouldPrintBackgrounds(&self, should_print_backgrounds: bool);

        #[deprecated]
        #[method(privateBrowsingEnabled)]
        pub unsafe fn privateBrowsingEnabled(&self) -> bool;

        #[deprecated]
        #[method(setPrivateBrowsingEnabled:)]
        pub unsafe fn setPrivateBrowsingEnabled(&self, private_browsing_enabled: bool);

        #[deprecated]
        #[method(tabsToLinks)]
        pub unsafe fn tabsToLinks(&self) -> bool;

        #[deprecated]
        #[method(setTabsToLinks:)]
        pub unsafe fn setTabsToLinks(&self, tabs_to_links: bool);

        #[deprecated]
        #[method(usesPageCache)]
        pub unsafe fn usesPageCache(&self) -> bool;

        #[deprecated]
        #[method(setUsesPageCache:)]
        pub unsafe fn setUsesPageCache(&self, uses_page_cache: bool);

        #[deprecated]
        #[method(cacheModel)]
        pub unsafe fn cacheModel(&self) -> WebCacheModel;

        #[deprecated]
        #[method(setCacheModel:)]
        pub unsafe fn setCacheModel(&self, cache_model: WebCacheModel);

        #[deprecated]
        #[method(suppressesIncrementalRendering)]
        pub unsafe fn suppressesIncrementalRendering(&self) -> bool;

        #[deprecated]
        #[method(setSuppressesIncrementalRendering:)]
        pub unsafe fn setSuppressesIncrementalRendering(
            &self,
            suppresses_incremental_rendering: bool,
        );

        #[deprecated]
        #[method(allowsAirPlayForMediaPlayback)]
        pub unsafe fn allowsAirPlayForMediaPlayback(&self) -> bool;

        #[deprecated]
        #[method(setAllowsAirPlayForMediaPlayback:)]
        pub unsafe fn setAllowsAirPlayForMediaPlayback(
            &self,
            allows_air_play_for_media_playback: bool,
        );
    }
);

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

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