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