use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static WebElementDOMNodeKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementFrameKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementImageAltStringKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementImageKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementImageRectKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementImageURLKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementIsSelectedKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementLinkURLKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementLinkTargetFrameKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementLinkTitleKey: Option<&'static NSString>;
}
extern "C" {
pub static WebElementLinkLabelKey: Option<&'static NSString>;
}
extern "C" {
pub static WebViewProgressStartedNotification: Option<&'static NSString>;
}
extern "C" {
pub static WebViewProgressEstimateChangedNotification: Option<&'static NSString>;
}
extern "C" {
pub static WebViewProgressFinishedNotification: Option<&'static NSString>;
}
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[deprecated = "No longer supported; please adopt WKWebView."]
pub struct WebView;
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAccessibility for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAccessibilityElementProtocol for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAnimatablePropertyContainer for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAppearanceCustomization for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSCoding for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSDraggingDestination for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSObjectProtocol for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSUserInterfaceItemIdentification for WebView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canShowMIMEType:))]
#[unsafe(method_family = none)]
pub unsafe fn canShowMIMEType(mime_type: Option<&NSString>, mtm: MainThreadMarker) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canShowMIMETypeAsHTML:))]
#[unsafe(method_family = none)]
pub unsafe fn canShowMIMETypeAsHTML(
mime_type: Option<&NSString>,
mtm: MainThreadMarker,
) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(MIMETypesShownAsHTML))]
#[unsafe(method_family = none)]
pub unsafe fn MIMETypesShownAsHTML(mtm: MainThreadMarker) -> Option<Retained<NSArray>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setMIMETypesShownAsHTML:))]
#[unsafe(method_family = none)]
pub unsafe fn setMIMETypesShownAsHTML(mime_types: Option<&NSArray>, mtm: MainThreadMarker);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(URLFromPasteboard:))]
#[unsafe(method_family = none)]
pub unsafe fn URLFromPasteboard(
pasteboard: Option<&NSPasteboard>,
mtm: MainThreadMarker,
) -> Option<Retained<NSURL>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(URLTitleFromPasteboard:))]
#[unsafe(method_family = none)]
pub unsafe fn URLTitleFromPasteboard(
pasteboard: Option<&NSPasteboard>,
mtm: MainThreadMarker,
) -> Option<Retained<NSString>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(registerURLSchemeAsLocal:))]
#[unsafe(method_family = none)]
pub unsafe fn registerURLSchemeAsLocal(scheme: Option<&NSString>, mtm: MainThreadMarker);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(initWithFrame:frameName:groupName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame_frameName_groupName(
this: Allocated<Self>,
frame: NSRect,
frame_name: Option<&NSString>,
group_name: Option<&NSString>,
) -> Option<Retained<Self>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(close))]
#[unsafe(method_family = none)]
pub unsafe fn close(&self);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(shouldCloseWithWindow))]
#[unsafe(method_family = none)]
pub unsafe fn shouldCloseWithWindow(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setShouldCloseWithWindow:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldCloseWithWindow(&self, should_close_with_window: bool);
#[cfg(feature = "WebUIDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(UIDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn UIDelegate(&self) -> Option<Retained<ProtocolObject<dyn WebUIDelegate>>>;
#[cfg(feature = "WebUIDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setUIDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setUIDelegate(&self, ui_delegate: Option<&ProtocolObject<dyn WebUIDelegate>>);
#[cfg(feature = "WebResourceLoadDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(resourceLoadDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn resourceLoadDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn WebResourceLoadDelegate>>>;
#[cfg(feature = "WebResourceLoadDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setResourceLoadDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setResourceLoadDelegate(
&self,
resource_load_delegate: Option<&ProtocolObject<dyn WebResourceLoadDelegate>>,
);
#[cfg(feature = "WebDownload")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(downloadDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn downloadDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn WebDownloadDelegate>>>;
#[cfg(feature = "WebDownload")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setDownloadDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDownloadDelegate(
&self,
download_delegate: Option<&ProtocolObject<dyn WebDownloadDelegate>>,
);
#[cfg(feature = "WebFrameLoadDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(frameLoadDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn frameLoadDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn WebFrameLoadDelegate>>>;
#[cfg(feature = "WebFrameLoadDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setFrameLoadDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setFrameLoadDelegate(
&self,
frame_load_delegate: Option<&ProtocolObject<dyn WebFrameLoadDelegate>>,
);
#[cfg(feature = "WebPolicyDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(policyDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn policyDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn WebPolicyDelegate>>>;
#[cfg(feature = "WebPolicyDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setPolicyDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setPolicyDelegate(
&self,
policy_delegate: Option<&ProtocolObject<dyn WebPolicyDelegate>>,
);
#[cfg(feature = "WebFrame")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(mainFrame))]
#[unsafe(method_family = none)]
pub unsafe fn mainFrame(&self) -> Option<Retained<WebFrame>>;
#[cfg(feature = "WebFrame")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(selectedFrame))]
#[unsafe(method_family = none)]
pub unsafe fn selectedFrame(&self) -> Option<Retained<WebFrame>>;
#[cfg(feature = "WebBackForwardList")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(backForwardList))]
#[unsafe(method_family = none)]
pub unsafe fn backForwardList(&self) -> Option<Retained<WebBackForwardList>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setMaintainsBackForwardList:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaintainsBackForwardList(&self, flag: bool);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(goBack))]
#[unsafe(method_family = none)]
pub unsafe fn goBack(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(goForward))]
#[unsafe(method_family = none)]
pub unsafe fn goForward(&self) -> bool;
#[cfg(feature = "WebHistoryItem")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(goToBackForwardItem:))]
#[unsafe(method_family = none)]
pub unsafe fn goToBackForwardItem(&self, item: Option<&WebHistoryItem>) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(textSizeMultiplier))]
#[unsafe(method_family = none)]
pub unsafe fn textSizeMultiplier(&self) -> c_float;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setTextSizeMultiplier:))]
#[unsafe(method_family = none)]
pub unsafe fn setTextSizeMultiplier(&self, text_size_multiplier: c_float);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(applicationNameForUserAgent))]
#[unsafe(method_family = none)]
pub unsafe fn applicationNameForUserAgent(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setApplicationNameForUserAgent:))]
#[unsafe(method_family = none)]
pub unsafe fn setApplicationNameForUserAgent(
&self,
application_name_for_user_agent: Option<&NSString>,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(customUserAgent))]
#[unsafe(method_family = none)]
pub unsafe fn customUserAgent(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setCustomUserAgent:))]
#[unsafe(method_family = none)]
pub unsafe fn setCustomUserAgent(&self, custom_user_agent: Option<&NSString>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(userAgentForURL:))]
#[unsafe(method_family = none)]
pub unsafe fn userAgentForURL(&self, url: Option<&NSURL>) -> Option<Retained<NSString>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(supportsTextEncoding))]
#[unsafe(method_family = none)]
pub unsafe fn supportsTextEncoding(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(customTextEncodingName))]
#[unsafe(method_family = none)]
pub unsafe fn customTextEncodingName(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setCustomTextEncodingName:))]
#[unsafe(method_family = none)]
pub unsafe fn setCustomTextEncodingName(
&self,
custom_text_encoding_name: Option<&NSString>,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(mediaStyle))]
#[unsafe(method_family = none)]
pub unsafe fn mediaStyle(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setMediaStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setMediaStyle(&self, media_style: Option<&NSString>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(stringByEvaluatingJavaScriptFromString:))]
#[unsafe(method_family = none)]
pub unsafe fn stringByEvaluatingJavaScriptFromString(
&self,
script: Option<&NSString>,
) -> Option<Retained<NSString>>;
#[cfg(feature = "WebScriptObject")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(windowScriptObject))]
#[unsafe(method_family = none)]
pub unsafe fn windowScriptObject(&self) -> Option<Retained<WebScriptObject>>;
#[cfg(feature = "WebPreferences")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(preferences))]
#[unsafe(method_family = none)]
pub unsafe fn preferences(&self) -> Option<Retained<WebPreferences>>;
#[cfg(feature = "WebPreferences")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setPreferences:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreferences(&self, preferences: Option<&WebPreferences>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(preferencesIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn preferencesIdentifier(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setPreferencesIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreferencesIdentifier(&self, preferences_identifier: Option<&NSString>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(hostWindow))]
#[unsafe(method_family = none)]
pub unsafe fn hostWindow(&self) -> Option<Retained<NSWindow>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setHostWindow:))]
#[unsafe(method_family = none)]
pub unsafe fn setHostWindow(&self, host_window: Option<&NSWindow>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(searchFor:direction:caseSensitive:wrap:))]
#[unsafe(method_family = none)]
pub unsafe fn searchFor_direction_caseSensitive_wrap(
&self,
string: Option<&NSString>,
forward: bool,
case_flag: bool,
wrap_flag: bool,
) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(registerViewClass:representationClass:forMIMEType:))]
#[unsafe(method_family = none)]
pub unsafe fn registerViewClass_representationClass_forMIMEType(
view_class: Option<&AnyClass>,
representation_class: Option<&AnyClass>,
mime_type: Option<&NSString>,
mtm: MainThreadMarker,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(groupName))]
#[unsafe(method_family = none)]
pub unsafe fn groupName(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setGroupName:))]
#[unsafe(method_family = none)]
pub unsafe fn setGroupName(&self, group_name: Option<&NSString>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(estimatedProgress))]
#[unsafe(method_family = none)]
pub unsafe fn estimatedProgress(&self) -> c_double;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(isLoading))]
#[unsafe(method_family = none)]
pub unsafe fn isLoading(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(elementAtPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn elementAtPoint(&self, point: NSPoint) -> Option<Retained<NSDictionary>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(pasteboardTypesForSelection))]
#[unsafe(method_family = none)]
pub unsafe fn pasteboardTypesForSelection(&self) -> Retained<NSArray>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(writeSelectionWithPasteboardTypes:toPasteboard:))]
#[unsafe(method_family = none)]
pub unsafe fn writeSelectionWithPasteboardTypes_toPasteboard(
&self,
types: Option<&NSArray>,
pasteboard: Option<&NSPasteboard>,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(pasteboardTypesForElement:))]
#[unsafe(method_family = none)]
pub unsafe fn pasteboardTypesForElement(
&self,
element: Option<&NSDictionary>,
) -> Option<Retained<NSArray>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(writeElement:withPasteboardTypes:toPasteboard:))]
#[unsafe(method_family = none)]
pub unsafe fn writeElement_withPasteboardTypes_toPasteboard(
&self,
element: Option<&NSDictionary>,
types: Option<&NSArray>,
pasteboard: Option<&NSPasteboard>,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(moveDragCaretToPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn moveDragCaretToPoint(&self, point: NSPoint);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(removeDragCaret))]
#[unsafe(method_family = none)]
pub unsafe fn removeDragCaret(&self);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(drawsBackground))]
#[unsafe(method_family = none)]
pub unsafe fn drawsBackground(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setDrawsBackground:))]
#[unsafe(method_family = none)]
pub unsafe fn setDrawsBackground(&self, draws_background: bool);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(shouldUpdateWhileOffscreen))]
#[unsafe(method_family = none)]
pub unsafe fn shouldUpdateWhileOffscreen(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setShouldUpdateWhileOffscreen:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldUpdateWhileOffscreen(&self, should_update_while_offscreen: bool);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(mainFrameURL))]
#[unsafe(method_family = none)]
pub unsafe fn mainFrameURL(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setMainFrameURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setMainFrameURL(&self, main_frame_url: Option<&NSString>);
#[cfg(all(
feature = "DOMDocument",
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(mainFrameDocument))]
#[unsafe(method_family = none)]
pub unsafe fn mainFrameDocument(&self) -> Option<Retained<DOMDocument>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(mainFrameTitle))]
#[unsafe(method_family = none)]
pub unsafe fn mainFrameTitle(&self) -> Retained<NSString>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(mainFrameIcon))]
#[unsafe(method_family = none)]
pub unsafe fn mainFrameIcon(&self) -> Option<Retained<NSImage>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(takeStringURLFrom:))]
#[unsafe(method_family = none)]
pub unsafe fn takeStringURLFrom(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(stopLoading:))]
#[unsafe(method_family = none)]
pub unsafe fn stopLoading(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(reload:))]
#[unsafe(method_family = none)]
pub unsafe fn reload(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(reloadFromOrigin:))]
#[unsafe(method_family = none)]
pub unsafe fn reloadFromOrigin(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canGoBack))]
#[unsafe(method_family = none)]
pub unsafe fn canGoBack(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(goBack:))]
#[unsafe(method_family = none)]
pub unsafe fn goBack_(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canGoForward))]
#[unsafe(method_family = none)]
pub unsafe fn canGoForward(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(goForward:))]
#[unsafe(method_family = none)]
pub unsafe fn goForward_(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canMakeTextLarger))]
#[unsafe(method_family = none)]
pub unsafe fn canMakeTextLarger(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(makeTextLarger:))]
#[unsafe(method_family = none)]
pub unsafe fn makeTextLarger(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canMakeTextSmaller))]
#[unsafe(method_family = none)]
pub unsafe fn canMakeTextSmaller(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(makeTextSmaller:))]
#[unsafe(method_family = none)]
pub unsafe fn makeTextSmaller(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(canMakeTextStandardSize))]
#[unsafe(method_family = none)]
pub unsafe fn canMakeTextStandardSize(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(makeTextStandardSize:))]
#[unsafe(method_family = none)]
pub unsafe fn makeTextStandardSize(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(toggleContinuousSpellChecking:))]
#[unsafe(method_family = none)]
pub unsafe fn toggleContinuousSpellChecking(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(toggleSmartInsertDelete:))]
#[unsafe(method_family = none)]
pub unsafe fn toggleSmartInsertDelete(&self, sender: Option<&AnyObject>);
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSUserInterfaceValidations for WebView {}
extern "C" {
pub static WebViewDidBeginEditingNotification: Option<&'static NSString>;
}
extern "C" {
pub static WebViewDidChangeNotification: Option<&'static NSString>;
}
extern "C" {
pub static WebViewDidEndEditingNotification: Option<&'static NSString>;
}
extern "C" {
pub static WebViewDidChangeTypingStyleNotification: Option<&'static NSString>;
}
extern "C" {
pub static WebViewDidChangeSelectionNotification: Option<&'static NSString>;
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[cfg(all(
feature = "DOMCSSStyleDeclaration",
feature = "DOMElement",
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(computedStyleForElement:pseudoElement:))]
#[unsafe(method_family = none)]
pub unsafe fn computedStyleForElement_pseudoElement(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
) -> Option<Retained<DOMCSSStyleDeclaration>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[cfg(all(
feature = "DOMObject",
feature = "DOMRange",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(editableDOMRangeForPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn editableDOMRangeForPoint(&self, point: NSPoint)
-> Option<Retained<DOMRange>>;
#[cfg(all(
feature = "DOMObject",
feature = "DOMRange",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setSelectedDOMRange:affinity:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelectedDOMRange_affinity(
&self,
range: Option<&DOMRange>,
selection_affinity: NSSelectionAffinity,
);
#[cfg(all(
feature = "DOMObject",
feature = "DOMRange",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(selectedDOMRange))]
#[unsafe(method_family = none)]
pub unsafe fn selectedDOMRange(&self) -> Option<Retained<DOMRange>>;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(selectionAffinity))]
#[unsafe(method_family = none)]
pub unsafe fn selectionAffinity(&self) -> NSSelectionAffinity;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(maintainsInactiveSelection))]
#[unsafe(method_family = none)]
pub unsafe fn maintainsInactiveSelection(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(isEditable))]
#[unsafe(method_family = none)]
pub unsafe fn isEditable(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setEditable:))]
#[unsafe(method_family = none)]
pub unsafe fn setEditable(&self, editable: bool);
#[cfg(all(
feature = "DOMCSSStyleDeclaration",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(typingStyle))]
#[unsafe(method_family = none)]
pub unsafe fn typingStyle(&self) -> Option<Retained<DOMCSSStyleDeclaration>>;
#[cfg(all(
feature = "DOMCSSStyleDeclaration",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setTypingStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTypingStyle(&self, typing_style: Option<&DOMCSSStyleDeclaration>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(smartInsertDeleteEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn smartInsertDeleteEnabled(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setSmartInsertDeleteEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setSmartInsertDeleteEnabled(&self, smart_insert_delete_enabled: bool);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(isContinuousSpellCheckingEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isContinuousSpellCheckingEnabled(&self) -> bool;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setContinuousSpellCheckingEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setContinuousSpellCheckingEnabled(
&self,
continuous_spell_checking_enabled: bool,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(spellCheckerDocumentTag))]
#[unsafe(method_family = none)]
pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger;
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(undoManager))]
#[unsafe(method_family = none)]
pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>;
#[cfg(feature = "WebEditingDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(editingDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn editingDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn WebEditingDelegate>>>;
#[cfg(feature = "WebEditingDelegate")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(setEditingDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setEditingDelegate(
&self,
editing_delegate: Option<&ProtocolObject<dyn WebEditingDelegate>>,
);
#[cfg(all(
feature = "DOMCSSStyleDeclaration",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(styleDeclarationWithText:))]
#[unsafe(method_family = none)]
pub unsafe fn styleDeclarationWithText(
&self,
text: Option<&NSString>,
) -> Option<Retained<DOMCSSStyleDeclaration>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(replaceSelectionWithNode:))]
#[unsafe(method_family = none)]
pub unsafe fn replaceSelectionWithNode(&self, node: Option<&DOMNode>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(replaceSelectionWithText:))]
#[unsafe(method_family = none)]
pub unsafe fn replaceSelectionWithText(&self, text: Option<&NSString>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(replaceSelectionWithMarkupString:))]
#[unsafe(method_family = none)]
pub unsafe fn replaceSelectionWithMarkupString(&self, markup_string: Option<&NSString>);
#[cfg(feature = "WebArchive")]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(replaceSelectionWithArchive:))]
#[unsafe(method_family = none)]
pub unsafe fn replaceSelectionWithArchive(&self, archive: Option<&WebArchive>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(deleteSelection))]
#[unsafe(method_family = none)]
pub unsafe fn deleteSelection(&self);
#[cfg(all(
feature = "DOMCSSStyleDeclaration",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(applyStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn applyStyle(&self, style: Option<&DOMCSSStyleDeclaration>);
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl WebView {
extern_methods!(
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(copy:))]
#[unsafe(method_family = none)]
pub unsafe fn copy(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(cut:))]
#[unsafe(method_family = none)]
pub unsafe fn cut(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(paste:))]
#[unsafe(method_family = none)]
pub unsafe fn paste(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(copyFont:))]
#[unsafe(method_family = none)]
pub unsafe fn copyFont(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(pasteFont:))]
#[unsafe(method_family = none)]
pub unsafe fn pasteFont(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(delete:))]
#[unsafe(method_family = none)]
pub unsafe fn delete(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(pasteAsPlainText:))]
#[unsafe(method_family = none)]
pub unsafe fn pasteAsPlainText(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(pasteAsRichText:))]
#[unsafe(method_family = none)]
pub unsafe fn pasteAsRichText(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(changeFont:))]
#[unsafe(method_family = none)]
pub unsafe fn changeFont(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(changeAttributes:))]
#[unsafe(method_family = none)]
pub unsafe fn changeAttributes(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(changeDocumentBackgroundColor:))]
#[unsafe(method_family = none)]
pub unsafe fn changeDocumentBackgroundColor(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(changeColor:))]
#[unsafe(method_family = none)]
pub unsafe fn changeColor(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(alignCenter:))]
#[unsafe(method_family = none)]
pub unsafe fn alignCenter(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(alignJustified:))]
#[unsafe(method_family = none)]
pub unsafe fn alignJustified(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(alignLeft:))]
#[unsafe(method_family = none)]
pub unsafe fn alignLeft(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(alignRight:))]
#[unsafe(method_family = none)]
pub unsafe fn alignRight(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(checkSpelling:))]
#[unsafe(method_family = none)]
pub unsafe fn checkSpelling(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(showGuessPanel:))]
#[unsafe(method_family = none)]
pub unsafe fn showGuessPanel(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(performFindPanelAction:))]
#[unsafe(method_family = none)]
pub unsafe fn performFindPanelAction(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(startSpeaking:))]
#[unsafe(method_family = none)]
pub unsafe fn startSpeaking(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(stopSpeaking:))]
#[unsafe(method_family = none)]
pub unsafe fn stopSpeaking(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(moveToBeginningOfSentence:))]
#[unsafe(method_family = none)]
pub unsafe fn moveToBeginningOfSentence(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(moveToBeginningOfSentenceAndModifySelection:))]
#[unsafe(method_family = none)]
pub unsafe fn moveToBeginningOfSentenceAndModifySelection(
&self,
sender: Option<&AnyObject>,
);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(moveToEndOfSentence:))]
#[unsafe(method_family = none)]
pub unsafe fn moveToEndOfSentence(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(moveToEndOfSentenceAndModifySelection:))]
#[unsafe(method_family = none)]
pub unsafe fn moveToEndOfSentenceAndModifySelection(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(selectSentence:))]
#[unsafe(method_family = none)]
pub unsafe fn selectSentence(&self, sender: Option<&AnyObject>);
#[deprecated = "No longer supported; please adopt WKWebView."]
#[unsafe(method(overWrite:))]
#[unsafe(method_family = none)]
pub unsafe fn overWrite(&self, sender: Option<&AnyObject>);
);
}