objc2_web_kit/generated/
WebView.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern "C" {
14    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementdomnodekey?language=objc)
15    pub static WebElementDOMNodeKey: Option<&'static NSString>;
16}
17
18extern "C" {
19    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementframekey?language=objc)
20    pub static WebElementFrameKey: Option<&'static NSString>;
21}
22
23extern "C" {
24    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementimagealtstringkey?language=objc)
25    pub static WebElementImageAltStringKey: Option<&'static NSString>;
26}
27
28extern "C" {
29    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementimagekey?language=objc)
30    pub static WebElementImageKey: Option<&'static NSString>;
31}
32
33extern "C" {
34    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementimagerectkey?language=objc)
35    pub static WebElementImageRectKey: Option<&'static NSString>;
36}
37
38extern "C" {
39    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementimageurlkey?language=objc)
40    pub static WebElementImageURLKey: Option<&'static NSString>;
41}
42
43extern "C" {
44    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementisselectedkey?language=objc)
45    pub static WebElementIsSelectedKey: Option<&'static NSString>;
46}
47
48extern "C" {
49    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementlinkurlkey?language=objc)
50    pub static WebElementLinkURLKey: Option<&'static NSString>;
51}
52
53extern "C" {
54    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementlinktargetframekey?language=objc)
55    pub static WebElementLinkTargetFrameKey: Option<&'static NSString>;
56}
57
58extern "C" {
59    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementlinktitlekey?language=objc)
60    pub static WebElementLinkTitleKey: Option<&'static NSString>;
61}
62
63extern "C" {
64    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webelementlinklabelkey?language=objc)
65    pub static WebElementLinkLabelKey: Option<&'static NSString>;
66}
67
68extern "C" {
69    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewprogressstartednotification?language=objc)
70    pub static WebViewProgressStartedNotification: Option<&'static NSString>;
71}
72
73extern "C" {
74    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewprogressestimatechangednotification?language=objc)
75    pub static WebViewProgressEstimateChangedNotification: Option<&'static NSString>;
76}
77
78extern "C" {
79    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewprogressfinishednotification?language=objc)
80    pub static WebViewProgressFinishedNotification: Option<&'static NSString>;
81}
82
83extern_class!(
84    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webview?language=objc)
85    #[unsafe(super(NSView, NSResponder, NSObject))]
86    #[derive(Debug, PartialEq, Eq, Hash)]
87    #[cfg(feature = "objc2-app-kit")]
88    #[cfg(target_os = "macos")]
89    #[deprecated = "No longer supported; please adopt WKWebView."]
90    pub struct WebView;
91);
92
93#[cfg(feature = "objc2-app-kit")]
94#[cfg(target_os = "macos")]
95unsafe impl NSAccessibility for WebView {}
96
97#[cfg(feature = "objc2-app-kit")]
98#[cfg(target_os = "macos")]
99unsafe impl NSAccessibilityElementProtocol for WebView {}
100
101#[cfg(feature = "objc2-app-kit")]
102#[cfg(target_os = "macos")]
103unsafe impl NSAnimatablePropertyContainer for WebView {}
104
105#[cfg(feature = "objc2-app-kit")]
106#[cfg(target_os = "macos")]
107unsafe impl NSAppearanceCustomization for WebView {}
108
109#[cfg(feature = "objc2-app-kit")]
110#[cfg(target_os = "macos")]
111unsafe impl NSCoding for WebView {}
112
113#[cfg(feature = "objc2-app-kit")]
114#[cfg(target_os = "macos")]
115unsafe impl NSDraggingDestination for WebView {}
116
117#[cfg(feature = "objc2-app-kit")]
118#[cfg(target_os = "macos")]
119unsafe impl NSObjectProtocol for WebView {}
120
121#[cfg(feature = "objc2-app-kit")]
122#[cfg(target_os = "macos")]
123unsafe impl NSUserInterfaceItemIdentification for WebView {}
124
125#[cfg(feature = "objc2-app-kit")]
126#[cfg(target_os = "macos")]
127impl WebView {
128    extern_methods!(
129        /// Checks if the WebKit can show content of a certain MIME type.
130        ///
131        /// Parameter `MIMEType`: The MIME type to check.
132        ///
133        /// Returns: YES if the WebKit can show content with MIMEtype.
134        #[deprecated = "No longer supported; please adopt WKWebView."]
135        #[unsafe(method(canShowMIMEType:))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn canShowMIMEType(mime_type: Option<&NSString>, mtm: MainThreadMarker) -> bool;
138
139        /// Checks if the MIME type is a type that the WebKit will interpret as HTML.
140        ///
141        /// Parameter `MIMEType`: The MIME type to check.
142        ///
143        /// Returns: YES if the MIMEtype in an HTML type.
144        #[deprecated = "No longer supported; please adopt WKWebView."]
145        #[unsafe(method(canShowMIMETypeAsHTML:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn canShowMIMETypeAsHTML(
148            mime_type: Option<&NSString>,
149            mtm: MainThreadMarker,
150        ) -> bool;
151
152        /// Returns: Returns an array of NSStrings that describe the MIME types
153        /// WebKit will attempt to render as HTML.
154        #[deprecated = "No longer supported; please adopt WKWebView."]
155        #[unsafe(method(MIMETypesShownAsHTML))]
156        #[unsafe(method_family = none)]
157        pub unsafe fn MIMETypesShownAsHTML(mtm: MainThreadMarker) -> Option<Retained<NSArray>>;
158
159        /// Sets the array of NSString MIME types that WebKit will
160        /// attempt to render as HTML.  Typically you will retrieve the built-in
161        /// array using MIMETypesShownAsHTML and add additional MIME types to that
162        /// array.
163        #[deprecated = "No longer supported; please adopt WKWebView."]
164        #[unsafe(method(setMIMETypesShownAsHTML:))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn setMIMETypesShownAsHTML(mime_types: Option<&NSArray>, mtm: MainThreadMarker);
167
168        /// Returns a URL from a pasteboard
169        ///
170        /// Parameter `pasteboard`: The pasteboard with a URL
171        ///
172        /// Returns: A URL if the pasteboard has one. Nil if it does not.
173        ///
174        /// This method differs than NSURL's URLFromPasteboard method in that it tries multiple pasteboard types
175        /// including NSURLPboardType to find a URL on the pasteboard.
176        #[deprecated = "No longer supported; please adopt WKWebView."]
177        #[unsafe(method(URLFromPasteboard:))]
178        #[unsafe(method_family = none)]
179        pub unsafe fn URLFromPasteboard(
180            pasteboard: Option<&NSPasteboard>,
181            mtm: MainThreadMarker,
182        ) -> Option<Retained<NSURL>>;
183
184        /// Returns a URL title from a pasteboard
185        ///
186        /// Parameter `pasteboard`: The pasteboard with a URL title
187        ///
188        /// Returns: A URL title if the pasteboard has one. Nil if it does not.
189        ///
190        /// This method returns a title that refers a URL on the pasteboard. An example of this is the link label
191        /// which is the text inside the anchor tag.
192        #[deprecated = "No longer supported; please adopt WKWebView."]
193        #[unsafe(method(URLTitleFromPasteboard:))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn URLTitleFromPasteboard(
196            pasteboard: Option<&NSPasteboard>,
197            mtm: MainThreadMarker,
198        ) -> Option<Retained<NSString>>;
199
200        /// Adds the scheme to the list of schemes to be treated as local.
201        ///
202        /// Parameter `scheme`: The scheme to register
203        #[deprecated = "No longer supported; please adopt WKWebView."]
204        #[unsafe(method(registerURLSchemeAsLocal:))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn registerURLSchemeAsLocal(scheme: Option<&NSString>, mtm: MainThreadMarker);
207
208        /// The designated initializer for WebView.
209        ///
210        /// Initialize a WebView with the supplied parameters. This method will
211        /// create a main WebFrame with the view. Passing a top level frame name is useful if you
212        /// handle a targetted frame navigation that would normally open a window in some other
213        /// way that still ends up creating a new WebView.
214        ///
215        /// Parameter `frame`: The frame used to create the view.
216        ///
217        /// Parameter `frameName`: The name to use for the top level frame. May be nil.
218        ///
219        /// Parameter `groupName`: The name of the webView set to which this webView will be added.  May be nil.
220        ///
221        /// Returns: Returns an initialized WebView.
222        #[deprecated = "No longer supported; please adopt WKWebView."]
223        #[unsafe(method(initWithFrame:frameName:groupName:))]
224        #[unsafe(method_family = init)]
225        pub unsafe fn initWithFrame_frameName_groupName(
226            this: Allocated<Self>,
227            frame: NSRect,
228            frame_name: Option<&NSString>,
229            group_name: Option<&NSString>,
230        ) -> Option<Retained<Self>>;
231
232        /// Closes the receiver, unloading its web page and canceling any pending loads.
233        /// Once the receiver has closed, it will no longer respond to requests or fire delegate methods.
234        /// (However, the -close method itself may fire delegate methods.)
235        ///
236        /// A garbage collected application is required to call close when the receiver is no longer needed.
237        /// The close method will be called automatically when the window or hostWindow closes and shouldCloseWithWindow returns YES.
238        /// A non-garbage collected application can still call close, providing a convenient way to prevent receiver
239        /// from doing any more loading and firing any future delegate methods.
240        #[deprecated = "No longer supported; please adopt WKWebView."]
241        #[unsafe(method(close))]
242        #[unsafe(method_family = none)]
243        pub unsafe fn close(&self);
244
245        /// Whether the receiver closes when either it's window or hostWindow closes.
246        ///
247        /// Defaults to YES in garbage collected applications, otherwise NO to maintain backwards compatibility.
248        #[deprecated = "No longer supported; please adopt WKWebView."]
249        #[unsafe(method(shouldCloseWithWindow))]
250        #[unsafe(method_family = none)]
251        pub unsafe fn shouldCloseWithWindow(&self) -> bool;
252
253        /// Setter for [`shouldCloseWithWindow`][Self::shouldCloseWithWindow].
254        #[deprecated = "No longer supported; please adopt WKWebView."]
255        #[unsafe(method(setShouldCloseWithWindow:))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn setShouldCloseWithWindow(&self, should_close_with_window: bool);
258
259        #[cfg(feature = "WebUIDelegate")]
260        /// The WebView's WebUIDelegate.
261        #[deprecated = "No longer supported; please adopt WKWebView."]
262        #[unsafe(method(UIDelegate))]
263        #[unsafe(method_family = none)]
264        pub unsafe fn UIDelegate(&self) -> Option<Retained<ProtocolObject<dyn WebUIDelegate>>>;
265
266        #[cfg(feature = "WebUIDelegate")]
267        /// Setter for [`UIDelegate`][Self::UIDelegate].
268        #[deprecated = "No longer supported; please adopt WKWebView."]
269        #[unsafe(method(setUIDelegate:))]
270        #[unsafe(method_family = none)]
271        pub unsafe fn setUIDelegate(&self, ui_delegate: Option<&ProtocolObject<dyn WebUIDelegate>>);
272
273        #[cfg(feature = "WebResourceLoadDelegate")]
274        /// The WebView's WebResourceLoadDelegate.
275        #[deprecated = "No longer supported; please adopt WKWebView."]
276        #[unsafe(method(resourceLoadDelegate))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn resourceLoadDelegate(
279            &self,
280        ) -> Option<Retained<ProtocolObject<dyn WebResourceLoadDelegate>>>;
281
282        #[cfg(feature = "WebResourceLoadDelegate")]
283        /// Setter for [`resourceLoadDelegate`][Self::resourceLoadDelegate].
284        #[deprecated = "No longer supported; please adopt WKWebView."]
285        #[unsafe(method(setResourceLoadDelegate:))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn setResourceLoadDelegate(
288            &self,
289            resource_load_delegate: Option<&ProtocolObject<dyn WebResourceLoadDelegate>>,
290        );
291
292        #[cfg(feature = "WebDownload")]
293        /// The WebView's WebDownloadDelegate.
294        #[deprecated = "No longer supported; please adopt WKWebView."]
295        #[unsafe(method(downloadDelegate))]
296        #[unsafe(method_family = none)]
297        pub unsafe fn downloadDelegate(
298            &self,
299        ) -> Option<Retained<ProtocolObject<dyn WebDownloadDelegate>>>;
300
301        #[cfg(feature = "WebDownload")]
302        /// Setter for [`downloadDelegate`][Self::downloadDelegate].
303        #[deprecated = "No longer supported; please adopt WKWebView."]
304        #[unsafe(method(setDownloadDelegate:))]
305        #[unsafe(method_family = none)]
306        pub unsafe fn setDownloadDelegate(
307            &self,
308            download_delegate: Option<&ProtocolObject<dyn WebDownloadDelegate>>,
309        );
310
311        #[cfg(feature = "WebFrameLoadDelegate")]
312        /// The WebView's WebFrameLoadDelegate delegate.
313        #[deprecated = "No longer supported; please adopt WKWebView."]
314        #[unsafe(method(frameLoadDelegate))]
315        #[unsafe(method_family = none)]
316        pub unsafe fn frameLoadDelegate(
317            &self,
318        ) -> Option<Retained<ProtocolObject<dyn WebFrameLoadDelegate>>>;
319
320        #[cfg(feature = "WebFrameLoadDelegate")]
321        /// Setter for [`frameLoadDelegate`][Self::frameLoadDelegate].
322        #[deprecated = "No longer supported; please adopt WKWebView."]
323        #[unsafe(method(setFrameLoadDelegate:))]
324        #[unsafe(method_family = none)]
325        pub unsafe fn setFrameLoadDelegate(
326            &self,
327            frame_load_delegate: Option<&ProtocolObject<dyn WebFrameLoadDelegate>>,
328        );
329
330        #[cfg(feature = "WebPolicyDelegate")]
331        /// The WebView's WebPolicyDelegate.
332        #[deprecated = "No longer supported; please adopt WKWebView."]
333        #[unsafe(method(policyDelegate))]
334        #[unsafe(method_family = none)]
335        pub unsafe fn policyDelegate(
336            &self,
337        ) -> Option<Retained<ProtocolObject<dyn WebPolicyDelegate>>>;
338
339        #[cfg(feature = "WebPolicyDelegate")]
340        /// Setter for [`policyDelegate`][Self::policyDelegate].
341        #[deprecated = "No longer supported; please adopt WKWebView."]
342        #[unsafe(method(setPolicyDelegate:))]
343        #[unsafe(method_family = none)]
344        pub unsafe fn setPolicyDelegate(
345            &self,
346            policy_delegate: Option<&ProtocolObject<dyn WebPolicyDelegate>>,
347        );
348
349        #[cfg(feature = "WebFrame")]
350        /// The top level frame.
351        ///
352        /// Note that even documents that are not framesets will have a mainFrame.
353        #[deprecated = "No longer supported; please adopt WKWebView."]
354        #[unsafe(method(mainFrame))]
355        #[unsafe(method_family = none)]
356        pub unsafe fn mainFrame(&self) -> Option<Retained<WebFrame>>;
357
358        #[cfg(feature = "WebFrame")]
359        /// The frame that has the active selection.
360        ///
361        /// Returns the frame that contains the first responder, if any. Otherwise returns the
362        /// frame that contains a non-zero-length selection, if any. Returns nil if no frame meets these criteria.
363        #[deprecated = "No longer supported; please adopt WKWebView."]
364        #[unsafe(method(selectedFrame))]
365        #[unsafe(method_family = none)]
366        pub unsafe fn selectedFrame(&self) -> Option<Retained<WebFrame>>;
367
368        #[cfg(feature = "WebBackForwardList")]
369        /// The backforward list for this WebView.
370        #[deprecated = "No longer supported; please adopt WKWebView."]
371        #[unsafe(method(backForwardList))]
372        #[unsafe(method_family = none)]
373        pub unsafe fn backForwardList(&self) -> Option<Retained<WebBackForwardList>>;
374
375        /// Enable or disable the use of a backforward list for this webView.
376        ///
377        /// Parameter `flag`: Turns use of the back forward list on or off
378        #[deprecated = "No longer supported; please adopt WKWebView."]
379        #[unsafe(method(setMaintainsBackForwardList:))]
380        #[unsafe(method_family = none)]
381        pub unsafe fn setMaintainsBackForwardList(&self, flag: bool);
382
383        /// Go back to the previous URL in the backforward list.
384        ///
385        /// Returns: YES if able to go back in the backforward list, NO otherwise.
386        #[deprecated = "No longer supported; please adopt WKWebView."]
387        #[unsafe(method(goBack))]
388        #[unsafe(method_family = none)]
389        pub unsafe fn goBack(&self) -> bool;
390
391        /// Go forward to the next URL in the backforward list.
392        ///
393        /// Returns: YES if able to go forward in the backforward list, NO otherwise.
394        #[deprecated = "No longer supported; please adopt WKWebView."]
395        #[unsafe(method(goForward))]
396        #[unsafe(method_family = none)]
397        pub unsafe fn goForward(&self) -> bool;
398
399        #[cfg(feature = "WebHistoryItem")]
400        /// Go back or forward to an item in the backforward list.
401        ///
402        /// Returns: YES if able to go to the item, NO otherwise.
403        #[deprecated = "No longer supported; please adopt WKWebView."]
404        #[unsafe(method(goToBackForwardItem:))]
405        #[unsafe(method_family = none)]
406        pub unsafe fn goToBackForwardItem(&self, item: Option<&WebHistoryItem>) -> bool;
407
408        /// The text size multipler.
409        #[deprecated = "No longer supported; please adopt WKWebView."]
410        #[unsafe(method(textSizeMultiplier))]
411        #[unsafe(method_family = none)]
412        pub unsafe fn textSizeMultiplier(&self) -> c_float;
413
414        /// Setter for [`textSizeMultiplier`][Self::textSizeMultiplier].
415        #[deprecated = "No longer supported; please adopt WKWebView."]
416        #[unsafe(method(setTextSizeMultiplier:))]
417        #[unsafe(method_family = none)]
418        pub unsafe fn setTextSizeMultiplier(&self, text_size_multiplier: c_float);
419
420        /// The name of the application as used in the user-agent string.
421        #[deprecated = "No longer supported; please adopt WKWebView."]
422        #[unsafe(method(applicationNameForUserAgent))]
423        #[unsafe(method_family = none)]
424        pub unsafe fn applicationNameForUserAgent(&self) -> Retained<NSString>;
425
426        /// Setter for [`applicationNameForUserAgent`][Self::applicationNameForUserAgent].
427        #[deprecated = "No longer supported; please adopt WKWebView."]
428        #[unsafe(method(setApplicationNameForUserAgent:))]
429        #[unsafe(method_family = none)]
430        pub unsafe fn setApplicationNameForUserAgent(
431            &self,
432            application_name_for_user_agent: Option<&NSString>,
433        );
434
435        /// The custom user-agent string or nil if no custom user-agent string has been set.
436        ///
437        /// Setting this means that the webView should use this user-agent string
438        /// instead of constructing a user-agent string for each URL. Setting it to nil
439        /// causes the webView to construct the user-agent string for each URL
440        /// for best results rendering web pages
441        #[deprecated = "No longer supported; please adopt WKWebView."]
442        #[unsafe(method(customUserAgent))]
443        #[unsafe(method_family = none)]
444        pub unsafe fn customUserAgent(&self) -> Retained<NSString>;
445
446        /// Setter for [`customUserAgent`][Self::customUserAgent].
447        #[deprecated = "No longer supported; please adopt WKWebView."]
448        #[unsafe(method(setCustomUserAgent:))]
449        #[unsafe(method_family = none)]
450        pub unsafe fn setCustomUserAgent(&self, custom_user_agent: Option<&NSString>);
451
452        /// Get the appropriate user-agent string for a particular URL.
453        ///
454        /// Parameter `URL`: The URL.
455        ///
456        /// Returns: The user-agent string for the supplied URL.
457        #[deprecated = "No longer supported; please adopt WKWebView."]
458        #[unsafe(method(userAgentForURL:))]
459        #[unsafe(method_family = none)]
460        pub unsafe fn userAgentForURL(&self, url: Option<&NSURL>) -> Option<Retained<NSString>>;
461
462        /// If the document view of the current web page can support different text encodings.
463        #[deprecated = "No longer supported; please adopt WKWebView."]
464        #[unsafe(method(supportsTextEncoding))]
465        #[unsafe(method_family = none)]
466        pub unsafe fn supportsTextEncoding(&self) -> bool;
467
468        /// The custom text encoding name or nil if no custom text encoding name has been set.
469        ///
470        /// Make the page display with a different text encoding; stops any load in progress.
471        /// The text encoding passed in overrides the normal text encoding smarts including
472        /// what's specified in a web page's header or HTTP response.
473        /// The text encoding automatically goes back to the default when the top level frame
474        /// changes to a new location.
475        /// Setting the text encoding name to nil makes the webView use default encoding rules.
476        #[deprecated = "No longer supported; please adopt WKWebView."]
477        #[unsafe(method(customTextEncodingName))]
478        #[unsafe(method_family = none)]
479        pub unsafe fn customTextEncodingName(&self) -> Retained<NSString>;
480
481        /// Setter for [`customTextEncodingName`][Self::customTextEncodingName].
482        #[deprecated = "No longer supported; please adopt WKWebView."]
483        #[unsafe(method(setCustomTextEncodingName:))]
484        #[unsafe(method_family = none)]
485        pub unsafe fn setCustomTextEncodingName(
486            &self,
487            custom_text_encoding_name: Option<&NSString>,
488        );
489
490        /// The media style for the WebView.
491        ///
492        /// The mediaStyle will override the normal value
493        /// of the CSS media property. Setting the value to nil will restore the normal value. The value will be nil unless explicitly set.
494        #[deprecated = "No longer supported; please adopt WKWebView."]
495        #[unsafe(method(mediaStyle))]
496        #[unsafe(method_family = none)]
497        pub unsafe fn mediaStyle(&self) -> Retained<NSString>;
498
499        /// Setter for [`mediaStyle`][Self::mediaStyle].
500        #[deprecated = "No longer supported; please adopt WKWebView."]
501        #[unsafe(method(setMediaStyle:))]
502        #[unsafe(method_family = none)]
503        pub unsafe fn setMediaStyle(&self, media_style: Option<&NSString>);
504
505        /// Parameter `script`: The text of the JavaScript.
506        ///
507        /// Returns: The result of the script, converted to a string, or nil for failure.
508        #[deprecated = "No longer supported; please adopt WKWebView."]
509        #[unsafe(method(stringByEvaluatingJavaScriptFromString:))]
510        #[unsafe(method_family = none)]
511        pub unsafe fn stringByEvaluatingJavaScriptFromString(
512            &self,
513            script: Option<&NSString>,
514        ) -> Option<Retained<NSString>>;
515
516        #[cfg(feature = "WebScriptObject")]
517        /// A WebScriptObject that represents the
518        /// window object from the script environment.
519        #[deprecated = "No longer supported; please adopt WKWebView."]
520        #[unsafe(method(windowScriptObject))]
521        #[unsafe(method_family = none)]
522        pub unsafe fn windowScriptObject(&self) -> Option<Retained<WebScriptObject>>;
523
524        #[cfg(feature = "WebPreferences")]
525        /// The preferences used by this WebView.
526        ///
527        /// This method will return [WebPreferences standardPreferences] if no
528        /// other instance of WebPreferences has been set.
529        #[deprecated = "No longer supported; please adopt WKWebView."]
530        #[unsafe(method(preferences))]
531        #[unsafe(method_family = none)]
532        pub unsafe fn preferences(&self) -> Option<Retained<WebPreferences>>;
533
534        #[cfg(feature = "WebPreferences")]
535        /// Setter for [`preferences`][Self::preferences].
536        #[deprecated = "No longer supported; please adopt WKWebView."]
537        #[unsafe(method(setPreferences:))]
538        #[unsafe(method_family = none)]
539        pub unsafe fn setPreferences(&self, preferences: Option<&WebPreferences>);
540
541        /// The WebPreferences key prefix.
542        ///
543        /// If the WebPreferences for this WebView are stored in the user defaults database, this string will be used as a key prefix.
544        #[deprecated = "No longer supported; please adopt WKWebView."]
545        #[unsafe(method(preferencesIdentifier))]
546        #[unsafe(method_family = none)]
547        pub unsafe fn preferencesIdentifier(&self) -> Retained<NSString>;
548
549        /// Setter for [`preferencesIdentifier`][Self::preferencesIdentifier].
550        #[deprecated = "No longer supported; please adopt WKWebView."]
551        #[unsafe(method(setPreferencesIdentifier:))]
552        #[unsafe(method_family = none)]
553        pub unsafe fn setPreferencesIdentifier(&self, preferences_identifier: Option<&NSString>);
554
555        /// The host window for the web view.
556        ///
557        /// Parts of WebKit (such as plug-ins and JavaScript) depend on a window to function
558        /// properly. Set a host window so these parts continue to function even when the web view is
559        /// not in an actual window.
560        #[deprecated = "No longer supported; please adopt WKWebView."]
561        #[unsafe(method(hostWindow))]
562        #[unsafe(method_family = none)]
563        pub unsafe fn hostWindow(&self) -> Option<Retained<NSWindow>>;
564
565        /// Setter for [`hostWindow`][Self::hostWindow].
566        #[deprecated = "No longer supported; please adopt WKWebView."]
567        #[unsafe(method(setHostWindow:))]
568        #[unsafe(method_family = none)]
569        pub unsafe fn setHostWindow(&self, host_window: Option<&NSWindow>);
570
571        /// Searches a document view for a string and highlights the string if it is found.
572        /// Starts the search from the current selection.  Will search across all frames.
573        ///
574        /// Parameter `string`: The string to search for.
575        ///
576        /// Parameter `forward`: YES to search forward, NO to seach backwards.
577        ///
578        /// Parameter `caseFlag`: YES to for case-sensitive search, NO for case-insensitive search.
579        ///
580        /// Returns: YES if found, NO if not found.
581        #[deprecated = "No longer supported; please adopt WKWebView."]
582        #[unsafe(method(searchFor:direction:caseSensitive:wrap:))]
583        #[unsafe(method_family = none)]
584        pub unsafe fn searchFor_direction_caseSensitive_wrap(
585            &self,
586            string: Option<&NSString>,
587            forward: bool,
588            case_flag: bool,
589            wrap_flag: bool,
590        ) -> bool;
591
592        /// Register classes that implement WebDocumentView and WebDocumentRepresentation respectively.
593        /// A document class may register for a primary MIME type by excluding
594        /// a subtype, i.e. "video/" will match the document class with
595        /// all video types.  More specific matching takes precedence
596        /// over general matching.
597        ///
598        /// Parameter `viewClass`: The WebDocumentView class to use to render data for a given MIME type.
599        ///
600        /// Parameter `representationClass`: The WebDocumentRepresentation class to use to represent data of the given MIME type.
601        ///
602        /// Parameter `MIMEType`: The MIME type to represent with an object of the given class.
603        #[deprecated = "No longer supported; please adopt WKWebView."]
604        #[unsafe(method(registerViewClass:representationClass:forMIMEType:))]
605        #[unsafe(method_family = none)]
606        pub unsafe fn registerViewClass_representationClass_forMIMEType(
607            view_class: Option<&AnyClass>,
608            representation_class: Option<&AnyClass>,
609            mime_type: Option<&NSString>,
610            mtm: MainThreadMarker,
611        );
612
613        /// The group name for this WebView.
614        ///
615        /// JavaScript may access named frames within the same group.
616        #[deprecated = "No longer supported; please adopt WKWebView."]
617        #[unsafe(method(groupName))]
618        #[unsafe(method_family = none)]
619        pub unsafe fn groupName(&self) -> Retained<NSString>;
620
621        /// Setter for [`groupName`][Self::groupName].
622        #[deprecated = "No longer supported; please adopt WKWebView."]
623        #[unsafe(method(setGroupName:))]
624        #[unsafe(method_family = none)]
625        pub unsafe fn setGroupName(&self, group_name: Option<&NSString>);
626
627        /// An estimate of the percent complete for a document load.  This
628        /// value will range from 0 to 1.0 and, once a load completes, will remain at 1.0
629        /// until a new load starts, at which point it will be reset to 0.  The value is an
630        /// estimate based on the total number of bytes expected to be received
631        /// for a document, including all it's possible subresources.  For more accurate progress
632        /// indication it is recommended that you implement a WebFrameLoadDelegate and a
633        /// WebResourceLoadDelegate.
634        #[deprecated = "No longer supported; please adopt WKWebView."]
635        #[unsafe(method(estimatedProgress))]
636        #[unsafe(method_family = none)]
637        pub unsafe fn estimatedProgress(&self) -> c_double;
638
639        /// Whether there are any pending loads in this WebView.
640        #[deprecated = "No longer supported; please adopt WKWebView."]
641        #[unsafe(method(isLoading))]
642        #[unsafe(method_family = none)]
643        pub unsafe fn isLoading(&self) -> bool;
644
645        /// Parameter `point`: A point in the coordinates of the WebView
646        ///
647        /// Returns: An element dictionary describing the point
648        #[deprecated = "No longer supported; please adopt WKWebView."]
649        #[unsafe(method(elementAtPoint:))]
650        #[unsafe(method_family = none)]
651        pub unsafe fn elementAtPoint(&self, point: NSPoint) -> Option<Retained<NSDictionary>>;
652
653        /// The pasteboard types that the WebView can use for the current selection
654        #[deprecated = "No longer supported; please adopt WKWebView."]
655        #[unsafe(method(pasteboardTypesForSelection))]
656        #[unsafe(method_family = none)]
657        pub unsafe fn pasteboardTypesForSelection(&self) -> Retained<NSArray>;
658
659        /// Writes the current selection to the pasteboard
660        ///
661        /// Parameter `types`: The types that WebView will write to the pasteboard
662        ///
663        /// Parameter `pasteboard`: The pasteboard to write to
664        #[deprecated = "No longer supported; please adopt WKWebView."]
665        #[unsafe(method(writeSelectionWithPasteboardTypes:toPasteboard:))]
666        #[unsafe(method_family = none)]
667        pub unsafe fn writeSelectionWithPasteboardTypes_toPasteboard(
668            &self,
669            types: Option<&NSArray>,
670            pasteboard: Option<&NSPasteboard>,
671        );
672
673        /// Returns the pasteboard types that WebView can use for an element
674        ///
675        /// Parameter `element`: The element
676        #[deprecated = "No longer supported; please adopt WKWebView."]
677        #[unsafe(method(pasteboardTypesForElement:))]
678        #[unsafe(method_family = none)]
679        pub unsafe fn pasteboardTypesForElement(
680            &self,
681            element: Option<&NSDictionary>,
682        ) -> Option<Retained<NSArray>>;
683
684        /// Writes an element to the pasteboard
685        ///
686        /// Parameter `element`: The element to write to the pasteboard
687        ///
688        /// Parameter `types`: The types that WebView will write to the pasteboard
689        ///
690        /// Parameter `pasteboard`: The pasteboard to write to
691        #[deprecated = "No longer supported; please adopt WKWebView."]
692        #[unsafe(method(writeElement:withPasteboardTypes:toPasteboard:))]
693        #[unsafe(method_family = none)]
694        pub unsafe fn writeElement_withPasteboardTypes_toPasteboard(
695            &self,
696            element: Option<&NSDictionary>,
697            types: Option<&NSArray>,
698            pasteboard: Option<&NSPasteboard>,
699        );
700
701        /// Parameter `point`: A point in the coordinates of the WebView
702        ///
703        /// This method moves the caret that shows where something being dragged will be dropped. It may cause the WebView to scroll
704        /// to make the new position of the drag caret visible.
705        #[deprecated = "No longer supported; please adopt WKWebView."]
706        #[unsafe(method(moveDragCaretToPoint:))]
707        #[unsafe(method_family = none)]
708        pub unsafe fn moveDragCaretToPoint(&self, point: NSPoint);
709
710        /// Removes the drag caret from the WebView
711        #[deprecated = "No longer supported; please adopt WKWebView."]
712        #[unsafe(method(removeDragCaret))]
713        #[unsafe(method_family = none)]
714        pub unsafe fn removeDragCaret(&self);
715
716        /// Whether the receiver draws a default white background when the loaded page has no background specified.
717        #[deprecated = "No longer supported; please adopt WKWebView."]
718        #[unsafe(method(drawsBackground))]
719        #[unsafe(method_family = none)]
720        pub unsafe fn drawsBackground(&self) -> bool;
721
722        /// Setter for [`drawsBackground`][Self::drawsBackground].
723        #[deprecated = "No longer supported; please adopt WKWebView."]
724        #[unsafe(method(setDrawsBackground:))]
725        #[unsafe(method_family = none)]
726        pub unsafe fn setDrawsBackground(&self, draws_background: bool);
727
728        /// Whether the WebView is always updated even when it is not in a window that is currently visible.
729        ///
730        /// If set to NO, then whenever the web view is not in a visible window, updates to the web page will not necessarily be rendered in the view.
731        /// However, when the window is made visible, the view will be updated automatically. Not updating while hidden can improve performance. If set to is YES,
732        /// hidden web views are always updated. This is the default.
733        #[deprecated = "No longer supported; please adopt WKWebView."]
734        #[unsafe(method(shouldUpdateWhileOffscreen))]
735        #[unsafe(method_family = none)]
736        pub unsafe fn shouldUpdateWhileOffscreen(&self) -> bool;
737
738        /// Setter for [`shouldUpdateWhileOffscreen`][Self::shouldUpdateWhileOffscreen].
739        #[deprecated = "No longer supported; please adopt WKWebView."]
740        #[unsafe(method(setShouldUpdateWhileOffscreen:))]
741        #[unsafe(method_family = none)]
742        pub unsafe fn setShouldUpdateWhileOffscreen(&self, should_update_while_offscreen: bool);
743
744        /// The main frame's current URL.
745        #[deprecated = "No longer supported; please adopt WKWebView."]
746        #[unsafe(method(mainFrameURL))]
747        #[unsafe(method_family = none)]
748        pub unsafe fn mainFrameURL(&self) -> Retained<NSString>;
749
750        /// Setter for [`mainFrameURL`][Self::mainFrameURL].
751        #[deprecated = "No longer supported; please adopt WKWebView."]
752        #[unsafe(method(setMainFrameURL:))]
753        #[unsafe(method_family = none)]
754        pub unsafe fn setMainFrameURL(&self, main_frame_url: Option<&NSString>);
755
756        #[cfg(all(
757            feature = "DOMDocument",
758            feature = "DOMNode",
759            feature = "DOMObject",
760            feature = "WebScriptObject"
761        ))]
762        /// The main frame's DOMDocument.
763        #[deprecated = "No longer supported; please adopt WKWebView."]
764        #[unsafe(method(mainFrameDocument))]
765        #[unsafe(method_family = none)]
766        pub unsafe fn mainFrameDocument(&self) -> Option<Retained<DOMDocument>>;
767
768        /// The main frame's title if any, otherwise an empty string.
769        #[deprecated = "No longer supported; please adopt WKWebView."]
770        #[unsafe(method(mainFrameTitle))]
771        #[unsafe(method_family = none)]
772        pub unsafe fn mainFrameTitle(&self) -> Retained<NSString>;
773
774        /// The site icon for the current page loaded in the mainFrame, or nil.
775        #[deprecated = "No longer supported; please adopt WKWebView."]
776        #[unsafe(method(mainFrameIcon))]
777        #[unsafe(method_family = none)]
778        pub unsafe fn mainFrameIcon(&self) -> Option<Retained<NSImage>>;
779    );
780}
781
782/// Methods declared on superclass `NSView`.
783#[cfg(feature = "objc2-app-kit")]
784#[cfg(target_os = "macos")]
785impl WebView {
786    extern_methods!(
787        #[unsafe(method(initWithFrame:))]
788        #[unsafe(method_family = init)]
789        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
790
791        #[unsafe(method(initWithCoder:))]
792        #[unsafe(method_family = init)]
793        pub unsafe fn initWithCoder(
794            this: Allocated<Self>,
795            coder: &NSCoder,
796        ) -> Option<Retained<Self>>;
797    );
798}
799
800/// Methods declared on superclass `NSResponder`.
801#[cfg(feature = "objc2-app-kit")]
802#[cfg(target_os = "macos")]
803impl WebView {
804    extern_methods!(
805        #[unsafe(method(init))]
806        #[unsafe(method_family = init)]
807        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
808    );
809}
810
811/// Methods declared on superclass `NSObject`.
812#[cfg(feature = "objc2-app-kit")]
813#[cfg(target_os = "macos")]
814impl WebView {
815    extern_methods!(
816        #[unsafe(method(new))]
817        #[unsafe(method_family = new)]
818        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
819    );
820}
821
822/// WebIBActions.
823#[cfg(feature = "objc2-app-kit")]
824#[cfg(target_os = "macos")]
825impl WebView {
826    extern_methods!(
827        #[deprecated = "No longer supported; please adopt WKWebView."]
828        #[unsafe(method(takeStringURLFrom:))]
829        #[unsafe(method_family = none)]
830        pub unsafe fn takeStringURLFrom(&self, sender: Option<&AnyObject>);
831
832        #[deprecated = "No longer supported; please adopt WKWebView."]
833        #[unsafe(method(stopLoading:))]
834        #[unsafe(method_family = none)]
835        pub unsafe fn stopLoading(&self, sender: Option<&AnyObject>);
836
837        #[deprecated = "No longer supported; please adopt WKWebView."]
838        #[unsafe(method(reload:))]
839        #[unsafe(method_family = none)]
840        pub unsafe fn reload(&self, sender: Option<&AnyObject>);
841
842        #[deprecated = "No longer supported; please adopt WKWebView."]
843        #[unsafe(method(reloadFromOrigin:))]
844        #[unsafe(method_family = none)]
845        pub unsafe fn reloadFromOrigin(&self, sender: Option<&AnyObject>);
846
847        #[deprecated = "No longer supported; please adopt WKWebView."]
848        #[unsafe(method(canGoBack))]
849        #[unsafe(method_family = none)]
850        pub unsafe fn canGoBack(&self) -> bool;
851
852        #[deprecated = "No longer supported; please adopt WKWebView."]
853        #[unsafe(method(goBack:))]
854        #[unsafe(method_family = none)]
855        pub unsafe fn goBack_(&self, sender: Option<&AnyObject>);
856
857        #[deprecated = "No longer supported; please adopt WKWebView."]
858        #[unsafe(method(canGoForward))]
859        #[unsafe(method_family = none)]
860        pub unsafe fn canGoForward(&self) -> bool;
861
862        #[deprecated = "No longer supported; please adopt WKWebView."]
863        #[unsafe(method(goForward:))]
864        #[unsafe(method_family = none)]
865        pub unsafe fn goForward_(&self, sender: Option<&AnyObject>);
866
867        #[deprecated = "No longer supported; please adopt WKWebView."]
868        #[unsafe(method(canMakeTextLarger))]
869        #[unsafe(method_family = none)]
870        pub unsafe fn canMakeTextLarger(&self) -> bool;
871
872        #[deprecated = "No longer supported; please adopt WKWebView."]
873        #[unsafe(method(makeTextLarger:))]
874        #[unsafe(method_family = none)]
875        pub unsafe fn makeTextLarger(&self, sender: Option<&AnyObject>);
876
877        #[deprecated = "No longer supported; please adopt WKWebView."]
878        #[unsafe(method(canMakeTextSmaller))]
879        #[unsafe(method_family = none)]
880        pub unsafe fn canMakeTextSmaller(&self) -> bool;
881
882        #[deprecated = "No longer supported; please adopt WKWebView."]
883        #[unsafe(method(makeTextSmaller:))]
884        #[unsafe(method_family = none)]
885        pub unsafe fn makeTextSmaller(&self, sender: Option<&AnyObject>);
886
887        #[deprecated = "No longer supported; please adopt WKWebView."]
888        #[unsafe(method(canMakeTextStandardSize))]
889        #[unsafe(method_family = none)]
890        pub unsafe fn canMakeTextStandardSize(&self) -> bool;
891
892        #[deprecated = "No longer supported; please adopt WKWebView."]
893        #[unsafe(method(makeTextStandardSize:))]
894        #[unsafe(method_family = none)]
895        pub unsafe fn makeTextStandardSize(&self, sender: Option<&AnyObject>);
896
897        #[deprecated = "No longer supported; please adopt WKWebView."]
898        #[unsafe(method(toggleContinuousSpellChecking:))]
899        #[unsafe(method_family = none)]
900        pub unsafe fn toggleContinuousSpellChecking(&self, sender: Option<&AnyObject>);
901
902        #[deprecated = "No longer supported; please adopt WKWebView."]
903        #[unsafe(method(toggleSmartInsertDelete:))]
904        #[unsafe(method_family = none)]
905        pub unsafe fn toggleSmartInsertDelete(&self, sender: Option<&AnyObject>);
906    );
907}
908
909#[cfg(feature = "objc2-app-kit")]
910#[cfg(target_os = "macos")]
911unsafe impl NSUserInterfaceValidations for WebView {}
912
913extern "C" {
914    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewdidbegineditingnotification?language=objc)
915    pub static WebViewDidBeginEditingNotification: Option<&'static NSString>;
916}
917
918extern "C" {
919    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewdidchangenotification?language=objc)
920    pub static WebViewDidChangeNotification: Option<&'static NSString>;
921}
922
923extern "C" {
924    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewdidendeditingnotification?language=objc)
925    pub static WebViewDidEndEditingNotification: Option<&'static NSString>;
926}
927
928extern "C" {
929    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewdidchangetypingstylenotification?language=objc)
930    pub static WebViewDidChangeTypingStyleNotification: Option<&'static NSString>;
931}
932
933extern "C" {
934    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webviewdidchangeselectionnotification?language=objc)
935    pub static WebViewDidChangeSelectionNotification: Option<&'static NSString>;
936}
937
938/// WebViewCSS.
939#[cfg(feature = "objc2-app-kit")]
940#[cfg(target_os = "macos")]
941impl WebView {
942    extern_methods!(
943        #[cfg(all(
944            feature = "DOMCSSStyleDeclaration",
945            feature = "DOMElement",
946            feature = "DOMNode",
947            feature = "DOMObject",
948            feature = "WebScriptObject"
949        ))]
950        #[deprecated = "No longer supported; please adopt WKWebView."]
951        #[unsafe(method(computedStyleForElement:pseudoElement:))]
952        #[unsafe(method_family = none)]
953        pub unsafe fn computedStyleForElement_pseudoElement(
954            &self,
955            element: Option<&DOMElement>,
956            pseudo_element: Option<&NSString>,
957        ) -> Option<Retained<DOMCSSStyleDeclaration>>;
958    );
959}
960
961/// WebViewEditing.
962#[cfg(feature = "objc2-app-kit")]
963#[cfg(target_os = "macos")]
964impl WebView {
965    extern_methods!(
966        #[cfg(all(
967            feature = "DOMObject",
968            feature = "DOMRange",
969            feature = "WebScriptObject"
970        ))]
971        #[deprecated = "No longer supported; please adopt WKWebView."]
972        #[unsafe(method(editableDOMRangeForPoint:))]
973        #[unsafe(method_family = none)]
974        pub unsafe fn editableDOMRangeForPoint(&self, point: NSPoint)
975            -> Option<Retained<DOMRange>>;
976
977        #[cfg(all(
978            feature = "DOMObject",
979            feature = "DOMRange",
980            feature = "WebScriptObject"
981        ))]
982        #[deprecated = "No longer supported; please adopt WKWebView."]
983        #[unsafe(method(setSelectedDOMRange:affinity:))]
984        #[unsafe(method_family = none)]
985        pub unsafe fn setSelectedDOMRange_affinity(
986            &self,
987            range: Option<&DOMRange>,
988            selection_affinity: NSSelectionAffinity,
989        );
990
991        #[cfg(all(
992            feature = "DOMObject",
993            feature = "DOMRange",
994            feature = "WebScriptObject"
995        ))]
996        #[deprecated = "No longer supported; please adopt WKWebView."]
997        #[unsafe(method(selectedDOMRange))]
998        #[unsafe(method_family = none)]
999        pub unsafe fn selectedDOMRange(&self) -> Option<Retained<DOMRange>>;
1000
1001        #[deprecated = "No longer supported; please adopt WKWebView."]
1002        #[unsafe(method(selectionAffinity))]
1003        #[unsafe(method_family = none)]
1004        pub unsafe fn selectionAffinity(&self) -> NSSelectionAffinity;
1005
1006        #[deprecated = "No longer supported; please adopt WKWebView."]
1007        #[unsafe(method(maintainsInactiveSelection))]
1008        #[unsafe(method_family = none)]
1009        pub unsafe fn maintainsInactiveSelection(&self) -> bool;
1010
1011        #[deprecated = "No longer supported; please adopt WKWebView."]
1012        #[unsafe(method(isEditable))]
1013        #[unsafe(method_family = none)]
1014        pub unsafe fn isEditable(&self) -> bool;
1015
1016        /// Setter for [`isEditable`][Self::isEditable].
1017        #[deprecated = "No longer supported; please adopt WKWebView."]
1018        #[unsafe(method(setEditable:))]
1019        #[unsafe(method_family = none)]
1020        pub unsafe fn setEditable(&self, editable: bool);
1021
1022        #[cfg(all(
1023            feature = "DOMCSSStyleDeclaration",
1024            feature = "DOMObject",
1025            feature = "WebScriptObject"
1026        ))]
1027        #[deprecated = "No longer supported; please adopt WKWebView."]
1028        #[unsafe(method(typingStyle))]
1029        #[unsafe(method_family = none)]
1030        pub unsafe fn typingStyle(&self) -> Option<Retained<DOMCSSStyleDeclaration>>;
1031
1032        #[cfg(all(
1033            feature = "DOMCSSStyleDeclaration",
1034            feature = "DOMObject",
1035            feature = "WebScriptObject"
1036        ))]
1037        /// Setter for [`typingStyle`][Self::typingStyle].
1038        #[deprecated = "No longer supported; please adopt WKWebView."]
1039        #[unsafe(method(setTypingStyle:))]
1040        #[unsafe(method_family = none)]
1041        pub unsafe fn setTypingStyle(&self, typing_style: Option<&DOMCSSStyleDeclaration>);
1042
1043        #[deprecated = "No longer supported; please adopt WKWebView."]
1044        #[unsafe(method(smartInsertDeleteEnabled))]
1045        #[unsafe(method_family = none)]
1046        pub unsafe fn smartInsertDeleteEnabled(&self) -> bool;
1047
1048        /// Setter for [`smartInsertDeleteEnabled`][Self::smartInsertDeleteEnabled].
1049        #[deprecated = "No longer supported; please adopt WKWebView."]
1050        #[unsafe(method(setSmartInsertDeleteEnabled:))]
1051        #[unsafe(method_family = none)]
1052        pub unsafe fn setSmartInsertDeleteEnabled(&self, smart_insert_delete_enabled: bool);
1053
1054        #[deprecated = "No longer supported; please adopt WKWebView."]
1055        #[unsafe(method(isContinuousSpellCheckingEnabled))]
1056        #[unsafe(method_family = none)]
1057        pub unsafe fn isContinuousSpellCheckingEnabled(&self) -> bool;
1058
1059        /// Setter for [`isContinuousSpellCheckingEnabled`][Self::isContinuousSpellCheckingEnabled].
1060        #[deprecated = "No longer supported; please adopt WKWebView."]
1061        #[unsafe(method(setContinuousSpellCheckingEnabled:))]
1062        #[unsafe(method_family = none)]
1063        pub unsafe fn setContinuousSpellCheckingEnabled(
1064            &self,
1065            continuous_spell_checking_enabled: bool,
1066        );
1067
1068        #[deprecated = "No longer supported; please adopt WKWebView."]
1069        #[unsafe(method(spellCheckerDocumentTag))]
1070        #[unsafe(method_family = none)]
1071        pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger;
1072
1073        #[deprecated = "No longer supported; please adopt WKWebView."]
1074        #[unsafe(method(undoManager))]
1075        #[unsafe(method_family = none)]
1076        pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>;
1077
1078        #[cfg(feature = "WebEditingDelegate")]
1079        #[deprecated = "No longer supported; please adopt WKWebView."]
1080        #[unsafe(method(editingDelegate))]
1081        #[unsafe(method_family = none)]
1082        pub unsafe fn editingDelegate(
1083            &self,
1084        ) -> Option<Retained<ProtocolObject<dyn WebEditingDelegate>>>;
1085
1086        #[cfg(feature = "WebEditingDelegate")]
1087        /// Setter for [`editingDelegate`][Self::editingDelegate].
1088        #[deprecated = "No longer supported; please adopt WKWebView."]
1089        #[unsafe(method(setEditingDelegate:))]
1090        #[unsafe(method_family = none)]
1091        pub unsafe fn setEditingDelegate(
1092            &self,
1093            editing_delegate: Option<&ProtocolObject<dyn WebEditingDelegate>>,
1094        );
1095
1096        #[cfg(all(
1097            feature = "DOMCSSStyleDeclaration",
1098            feature = "DOMObject",
1099            feature = "WebScriptObject"
1100        ))]
1101        #[deprecated = "No longer supported; please adopt WKWebView."]
1102        #[unsafe(method(styleDeclarationWithText:))]
1103        #[unsafe(method_family = none)]
1104        pub unsafe fn styleDeclarationWithText(
1105            &self,
1106            text: Option<&NSString>,
1107        ) -> Option<Retained<DOMCSSStyleDeclaration>>;
1108    );
1109}
1110
1111/// WebViewUndoableEditing.
1112#[cfg(feature = "objc2-app-kit")]
1113#[cfg(target_os = "macos")]
1114impl WebView {
1115    extern_methods!(
1116        #[cfg(all(
1117            feature = "DOMNode",
1118            feature = "DOMObject",
1119            feature = "WebScriptObject"
1120        ))]
1121        #[deprecated = "No longer supported; please adopt WKWebView."]
1122        #[unsafe(method(replaceSelectionWithNode:))]
1123        #[unsafe(method_family = none)]
1124        pub unsafe fn replaceSelectionWithNode(&self, node: Option<&DOMNode>);
1125
1126        #[deprecated = "No longer supported; please adopt WKWebView."]
1127        #[unsafe(method(replaceSelectionWithText:))]
1128        #[unsafe(method_family = none)]
1129        pub unsafe fn replaceSelectionWithText(&self, text: Option<&NSString>);
1130
1131        #[deprecated = "No longer supported; please adopt WKWebView."]
1132        #[unsafe(method(replaceSelectionWithMarkupString:))]
1133        #[unsafe(method_family = none)]
1134        pub unsafe fn replaceSelectionWithMarkupString(&self, markup_string: Option<&NSString>);
1135
1136        #[cfg(feature = "WebArchive")]
1137        #[deprecated = "No longer supported; please adopt WKWebView."]
1138        #[unsafe(method(replaceSelectionWithArchive:))]
1139        #[unsafe(method_family = none)]
1140        pub unsafe fn replaceSelectionWithArchive(&self, archive: Option<&WebArchive>);
1141
1142        #[deprecated = "No longer supported; please adopt WKWebView."]
1143        #[unsafe(method(deleteSelection))]
1144        #[unsafe(method_family = none)]
1145        pub unsafe fn deleteSelection(&self);
1146
1147        #[cfg(all(
1148            feature = "DOMCSSStyleDeclaration",
1149            feature = "DOMObject",
1150            feature = "WebScriptObject"
1151        ))]
1152        #[deprecated = "No longer supported; please adopt WKWebView."]
1153        #[unsafe(method(applyStyle:))]
1154        #[unsafe(method_family = none)]
1155        pub unsafe fn applyStyle(&self, style: Option<&DOMCSSStyleDeclaration>);
1156    );
1157}
1158
1159/// WebViewEditingActions.
1160#[cfg(feature = "objc2-app-kit")]
1161#[cfg(target_os = "macos")]
1162impl WebView {
1163    extern_methods!(
1164        #[deprecated = "No longer supported; please adopt WKWebView."]
1165        #[unsafe(method(copy:))]
1166        #[unsafe(method_family = none)]
1167        pub unsafe fn copy(&self, sender: Option<&AnyObject>);
1168
1169        #[deprecated = "No longer supported; please adopt WKWebView."]
1170        #[unsafe(method(cut:))]
1171        #[unsafe(method_family = none)]
1172        pub unsafe fn cut(&self, sender: Option<&AnyObject>);
1173
1174        #[deprecated = "No longer supported; please adopt WKWebView."]
1175        #[unsafe(method(paste:))]
1176        #[unsafe(method_family = none)]
1177        pub unsafe fn paste(&self, sender: Option<&AnyObject>);
1178
1179        #[deprecated = "No longer supported; please adopt WKWebView."]
1180        #[unsafe(method(copyFont:))]
1181        #[unsafe(method_family = none)]
1182        pub unsafe fn copyFont(&self, sender: Option<&AnyObject>);
1183
1184        #[deprecated = "No longer supported; please adopt WKWebView."]
1185        #[unsafe(method(pasteFont:))]
1186        #[unsafe(method_family = none)]
1187        pub unsafe fn pasteFont(&self, sender: Option<&AnyObject>);
1188
1189        #[deprecated = "No longer supported; please adopt WKWebView."]
1190        #[unsafe(method(delete:))]
1191        #[unsafe(method_family = none)]
1192        pub unsafe fn delete(&self, sender: Option<&AnyObject>);
1193
1194        #[deprecated = "No longer supported; please adopt WKWebView."]
1195        #[unsafe(method(pasteAsPlainText:))]
1196        #[unsafe(method_family = none)]
1197        pub unsafe fn pasteAsPlainText(&self, sender: Option<&AnyObject>);
1198
1199        #[deprecated = "No longer supported; please adopt WKWebView."]
1200        #[unsafe(method(pasteAsRichText:))]
1201        #[unsafe(method_family = none)]
1202        pub unsafe fn pasteAsRichText(&self, sender: Option<&AnyObject>);
1203
1204        #[deprecated = "No longer supported; please adopt WKWebView."]
1205        #[unsafe(method(changeFont:))]
1206        #[unsafe(method_family = none)]
1207        pub unsafe fn changeFont(&self, sender: Option<&AnyObject>);
1208
1209        #[deprecated = "No longer supported; please adopt WKWebView."]
1210        #[unsafe(method(changeAttributes:))]
1211        #[unsafe(method_family = none)]
1212        pub unsafe fn changeAttributes(&self, sender: Option<&AnyObject>);
1213
1214        #[deprecated = "No longer supported; please adopt WKWebView."]
1215        #[unsafe(method(changeDocumentBackgroundColor:))]
1216        #[unsafe(method_family = none)]
1217        pub unsafe fn changeDocumentBackgroundColor(&self, sender: Option<&AnyObject>);
1218
1219        #[deprecated = "No longer supported; please adopt WKWebView."]
1220        #[unsafe(method(changeColor:))]
1221        #[unsafe(method_family = none)]
1222        pub unsafe fn changeColor(&self, sender: Option<&AnyObject>);
1223
1224        #[deprecated = "No longer supported; please adopt WKWebView."]
1225        #[unsafe(method(alignCenter:))]
1226        #[unsafe(method_family = none)]
1227        pub unsafe fn alignCenter(&self, sender: Option<&AnyObject>);
1228
1229        #[deprecated = "No longer supported; please adopt WKWebView."]
1230        #[unsafe(method(alignJustified:))]
1231        #[unsafe(method_family = none)]
1232        pub unsafe fn alignJustified(&self, sender: Option<&AnyObject>);
1233
1234        #[deprecated = "No longer supported; please adopt WKWebView."]
1235        #[unsafe(method(alignLeft:))]
1236        #[unsafe(method_family = none)]
1237        pub unsafe fn alignLeft(&self, sender: Option<&AnyObject>);
1238
1239        #[deprecated = "No longer supported; please adopt WKWebView."]
1240        #[unsafe(method(alignRight:))]
1241        #[unsafe(method_family = none)]
1242        pub unsafe fn alignRight(&self, sender: Option<&AnyObject>);
1243
1244        #[deprecated = "No longer supported; please adopt WKWebView."]
1245        #[unsafe(method(checkSpelling:))]
1246        #[unsafe(method_family = none)]
1247        pub unsafe fn checkSpelling(&self, sender: Option<&AnyObject>);
1248
1249        #[deprecated = "No longer supported; please adopt WKWebView."]
1250        #[unsafe(method(showGuessPanel:))]
1251        #[unsafe(method_family = none)]
1252        pub unsafe fn showGuessPanel(&self, sender: Option<&AnyObject>);
1253
1254        #[deprecated = "No longer supported; please adopt WKWebView."]
1255        #[unsafe(method(performFindPanelAction:))]
1256        #[unsafe(method_family = none)]
1257        pub unsafe fn performFindPanelAction(&self, sender: Option<&AnyObject>);
1258
1259        #[deprecated = "No longer supported; please adopt WKWebView."]
1260        #[unsafe(method(startSpeaking:))]
1261        #[unsafe(method_family = none)]
1262        pub unsafe fn startSpeaking(&self, sender: Option<&AnyObject>);
1263
1264        #[deprecated = "No longer supported; please adopt WKWebView."]
1265        #[unsafe(method(stopSpeaking:))]
1266        #[unsafe(method_family = none)]
1267        pub unsafe fn stopSpeaking(&self, sender: Option<&AnyObject>);
1268
1269        #[deprecated = "No longer supported; please adopt WKWebView."]
1270        #[unsafe(method(moveToBeginningOfSentence:))]
1271        #[unsafe(method_family = none)]
1272        pub unsafe fn moveToBeginningOfSentence(&self, sender: Option<&AnyObject>);
1273
1274        #[deprecated = "No longer supported; please adopt WKWebView."]
1275        #[unsafe(method(moveToBeginningOfSentenceAndModifySelection:))]
1276        #[unsafe(method_family = none)]
1277        pub unsafe fn moveToBeginningOfSentenceAndModifySelection(
1278            &self,
1279            sender: Option<&AnyObject>,
1280        );
1281
1282        #[deprecated = "No longer supported; please adopt WKWebView."]
1283        #[unsafe(method(moveToEndOfSentence:))]
1284        #[unsafe(method_family = none)]
1285        pub unsafe fn moveToEndOfSentence(&self, sender: Option<&AnyObject>);
1286
1287        #[deprecated = "No longer supported; please adopt WKWebView."]
1288        #[unsafe(method(moveToEndOfSentenceAndModifySelection:))]
1289        #[unsafe(method_family = none)]
1290        pub unsafe fn moveToEndOfSentenceAndModifySelection(&self, sender: Option<&AnyObject>);
1291
1292        #[deprecated = "No longer supported; please adopt WKWebView."]
1293        #[unsafe(method(selectSentence:))]
1294        #[unsafe(method_family = none)]
1295        pub unsafe fn selectSentence(&self, sender: Option<&AnyObject>);
1296
1297        #[deprecated = "No longer supported; please adopt WKWebView."]
1298        #[unsafe(method(overWrite:))]
1299        #[unsafe(method_family = none)]
1300        pub unsafe fn overWrite(&self, sender: Option<&AnyObject>);
1301    );
1302}