use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
#[deprecated]
pub struct DOMDocument;
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl ClassType for DOMDocument {
#[inherits(DOMObject, WebScriptObject, NSObject)]
type Super = DOMNode;
type Mutability = InteriorMutable;
}
);
#[cfg(all(
feature = "DOMEventTarget",
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl DOMEventTarget for DOMDocument {}
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl NSCopying for DOMDocument {}
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl NSObjectProtocol for DOMDocument {}
extern_methods!(
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl DOMDocument {
#[cfg(feature = "DOMDocumentType")]
#[deprecated]
#[method_id(@__retain_semantics Other doctype)]
pub unsafe fn doctype(&self) -> Option<Retained<DOMDocumentType>>;
#[cfg(feature = "DOMImplementation")]
#[deprecated]
#[method_id(@__retain_semantics Other implementation)]
pub unsafe fn implementation(&self) -> Option<Retained<DOMImplementation>>;
#[cfg(feature = "DOMElement")]
#[deprecated]
#[method_id(@__retain_semantics Other documentElement)]
pub unsafe fn documentElement(&self) -> Option<Retained<DOMElement>>;
#[method_id(@__retain_semantics Other inputEncoding)]
pub unsafe fn inputEncoding(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other xmlEncoding)]
pub unsafe fn xmlEncoding(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other xmlVersion)]
pub unsafe fn xmlVersion(&self) -> Retained<NSString>;
#[method(setXmlVersion:)]
pub unsafe fn setXmlVersion(&self, xml_version: Option<&NSString>);
#[method(xmlStandalone)]
pub unsafe fn xmlStandalone(&self) -> bool;
#[method(setXmlStandalone:)]
pub unsafe fn setXmlStandalone(&self, xml_standalone: bool);
#[method_id(@__retain_semantics Other documentURI)]
pub unsafe fn documentURI(&self) -> Retained<NSString>;
#[method(setDocumentURI:)]
pub unsafe fn setDocumentURI(&self, document_uri: Option<&NSString>);
#[cfg(feature = "DOMAbstractView")]
#[deprecated]
#[method_id(@__retain_semantics Other defaultView)]
pub unsafe fn defaultView(&self) -> Option<Retained<DOMAbstractView>>;
#[cfg(feature = "DOMStyleSheetList")]
#[deprecated]
#[method_id(@__retain_semantics Other styleSheets)]
pub unsafe fn styleSheets(&self) -> Option<Retained<DOMStyleSheetList>>;
#[deprecated]
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[deprecated]
#[method(setTitle:)]
pub unsafe fn setTitle(&self, title: Option<&NSString>);
#[deprecated]
#[method_id(@__retain_semantics Other referrer)]
pub unsafe fn referrer(&self) -> Retained<NSString>;
#[deprecated]
#[method_id(@__retain_semantics Other domain)]
pub unsafe fn domain(&self) -> Retained<NSString>;
#[deprecated]
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Retained<NSString>;
#[deprecated]
#[method_id(@__retain_semantics Other cookie)]
pub unsafe fn cookie(&self) -> Retained<NSString>;
#[deprecated]
#[method(setCookie:)]
pub unsafe fn setCookie(&self, cookie: Option<&NSString>);
#[cfg(all(feature = "DOMElement", feature = "DOMHTMLElement"))]
#[deprecated]
#[method_id(@__retain_semantics Other body)]
pub unsafe fn body(&self) -> Option<Retained<DOMHTMLElement>>;
#[cfg(all(feature = "DOMElement", feature = "DOMHTMLElement"))]
#[deprecated]
#[method(setBody:)]
pub unsafe fn setBody(&self, body: Option<&DOMHTMLElement>);
#[cfg(feature = "DOMHTMLCollection")]
#[deprecated]
#[method_id(@__retain_semantics Other images)]
pub unsafe fn images(&self) -> Option<Retained<DOMHTMLCollection>>;
#[cfg(feature = "DOMHTMLCollection")]
#[deprecated]
#[method_id(@__retain_semantics Other applets)]
pub unsafe fn applets(&self) -> Option<Retained<DOMHTMLCollection>>;
#[cfg(feature = "DOMHTMLCollection")]
#[deprecated]
#[method_id(@__retain_semantics Other links)]
pub unsafe fn links(&self) -> Option<Retained<DOMHTMLCollection>>;
#[cfg(feature = "DOMHTMLCollection")]
#[deprecated]
#[method_id(@__retain_semantics Other forms)]
pub unsafe fn forms(&self) -> Option<Retained<DOMHTMLCollection>>;
#[cfg(feature = "DOMHTMLCollection")]
#[deprecated]
#[method_id(@__retain_semantics Other anchors)]
pub unsafe fn anchors(&self) -> Option<Retained<DOMHTMLCollection>>;
#[method_id(@__retain_semantics Other lastModified)]
pub unsafe fn lastModified(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other charset)]
pub unsafe fn charset(&self) -> Retained<NSString>;
#[method(setCharset:)]
pub unsafe fn setCharset(&self, charset: Option<&NSString>);
#[method_id(@__retain_semantics Other defaultCharset)]
pub unsafe fn defaultCharset(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other readyState)]
pub unsafe fn readyState(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other characterSet)]
pub unsafe fn characterSet(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other preferredStylesheetSet)]
pub unsafe fn preferredStylesheetSet(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other selectedStylesheetSet)]
pub unsafe fn selectedStylesheetSet(&self) -> Retained<NSString>;
#[method(setSelectedStylesheetSet:)]
pub unsafe fn setSelectedStylesheetSet(&self, selected_stylesheet_set: Option<&NSString>);
#[cfg(feature = "DOMElement")]
#[method_id(@__retain_semantics Other activeElement)]
pub unsafe fn activeElement(&self) -> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMElement")]
#[deprecated]
#[method_id(@__retain_semantics Other createElement:)]
pub unsafe fn createElement(
&self,
tag_name: Option<&NSString>,
) -> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMDocumentFragment")]
#[deprecated]
#[method_id(@__retain_semantics Other createDocumentFragment)]
pub unsafe fn createDocumentFragment(&self) -> Option<Retained<DOMDocumentFragment>>;
#[cfg(all(feature = "DOMCharacterData", feature = "DOMText"))]
#[deprecated]
#[method_id(@__retain_semantics Other createTextNode:)]
pub unsafe fn createTextNode(&self, data: Option<&NSString>) -> Option<Retained<DOMText>>;
#[cfg(all(feature = "DOMCharacterData", feature = "DOMComment"))]
#[deprecated]
#[method_id(@__retain_semantics Other createComment:)]
pub unsafe fn createComment(&self, data: Option<&NSString>)
-> Option<Retained<DOMComment>>;
#[cfg(all(
feature = "DOMCDATASection",
feature = "DOMCharacterData",
feature = "DOMText"
))]
#[deprecated]
#[method_id(@__retain_semantics Other createCDATASection:)]
pub unsafe fn createCDATASection(
&self,
data: Option<&NSString>,
) -> Option<Retained<DOMCDATASection>>;
#[cfg(all(feature = "DOMCharacterData", feature = "DOMProcessingInstruction"))]
#[method_id(@__retain_semantics Other createProcessingInstruction:data:)]
pub unsafe fn createProcessingInstruction_data(
&self,
target: Option<&NSString>,
data: Option<&NSString>,
) -> Option<Retained<DOMProcessingInstruction>>;
#[cfg(feature = "DOMAttr")]
#[deprecated]
#[method_id(@__retain_semantics Other createAttribute:)]
pub unsafe fn createAttribute(&self, name: Option<&NSString>) -> Option<Retained<DOMAttr>>;
#[cfg(feature = "DOMEntityReference")]
#[deprecated]
#[method_id(@__retain_semantics Other createEntityReference:)]
pub unsafe fn createEntityReference(
&self,
name: Option<&NSString>,
) -> Option<Retained<DOMEntityReference>>;
#[cfg(feature = "DOMNodeList")]
#[deprecated]
#[method_id(@__retain_semantics Other getElementsByTagName:)]
pub unsafe fn getElementsByTagName(
&self,
tagname: Option<&NSString>,
) -> Option<Retained<DOMNodeList>>;
#[method_id(@__retain_semantics Other importNode:deep:)]
pub unsafe fn importNode_deep(
&self,
imported_node: Option<&DOMNode>,
deep: bool,
) -> Option<Retained<DOMNode>>;
#[cfg(feature = "DOMElement")]
#[method_id(@__retain_semantics Other createElementNS:qualifiedName:)]
pub unsafe fn createElementNS_qualifiedName(
&self,
namespace_uri: Option<&NSString>,
qualified_name: Option<&NSString>,
) -> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMAttr")]
#[method_id(@__retain_semantics Other createAttributeNS:qualifiedName:)]
pub unsafe fn createAttributeNS_qualifiedName(
&self,
namespace_uri: Option<&NSString>,
qualified_name: Option<&NSString>,
) -> Option<Retained<DOMAttr>>;
#[cfg(feature = "DOMNodeList")]
#[method_id(@__retain_semantics Other getElementsByTagNameNS:localName:)]
pub unsafe fn getElementsByTagNameNS_localName(
&self,
namespace_uri: Option<&NSString>,
local_name: Option<&NSString>,
) -> Option<Retained<DOMNodeList>>;
#[method_id(@__retain_semantics Other adoptNode:)]
pub unsafe fn adoptNode(&self, source: Option<&DOMNode>) -> Option<Retained<DOMNode>>;
#[cfg(feature = "DOMEvent")]
#[deprecated]
#[method_id(@__retain_semantics Other createEvent:)]
pub unsafe fn createEvent(
&self,
event_type: Option<&NSString>,
) -> Option<Retained<DOMEvent>>;
#[cfg(feature = "DOMRange")]
#[deprecated]
#[method_id(@__retain_semantics Other createRange)]
pub unsafe fn createRange(&self) -> Option<Retained<DOMRange>>;
#[cfg(all(feature = "DOMNodeFilter", feature = "DOMNodeIterator"))]
#[method_id(@__retain_semantics Other createNodeIterator:whatToShow:filter:expandEntityReferences:)]
pub unsafe fn createNodeIterator_whatToShow_filter_expandEntityReferences(
&self,
root: Option<&DOMNode>,
what_to_show: c_uint,
filter: Option<&ProtocolObject<dyn DOMNodeFilter>>,
expand_entity_references: bool,
) -> Option<Retained<DOMNodeIterator>>;
#[cfg(all(feature = "DOMNodeFilter", feature = "DOMTreeWalker"))]
#[method_id(@__retain_semantics Other createTreeWalker:whatToShow:filter:expandEntityReferences:)]
pub unsafe fn createTreeWalker_whatToShow_filter_expandEntityReferences(
&self,
root: Option<&DOMNode>,
what_to_show: c_uint,
filter: Option<&ProtocolObject<dyn DOMNodeFilter>>,
expand_entity_references: bool,
) -> Option<Retained<DOMTreeWalker>>;
#[cfg(all(feature = "DOMCSSStyleDeclaration", feature = "DOMElement"))]
#[method_id(@__retain_semantics Other getOverrideStyle:pseudoElement:)]
pub unsafe fn getOverrideStyle_pseudoElement(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
) -> Option<Retained<DOMCSSStyleDeclaration>>;
#[cfg(all(feature = "DOMXPathExpression", feature = "DOMXPathNSResolver"))]
#[method_id(@__retain_semantics Other createExpression:resolver:)]
pub unsafe fn createExpression_resolver(
&self,
expression: Option<&NSString>,
resolver: Option<&ProtocolObject<dyn DOMXPathNSResolver>>,
) -> Option<Retained<DOMXPathExpression>>;
#[cfg(feature = "DOMXPathNSResolver")]
#[method_id(@__retain_semantics Other createNSResolver:)]
pub unsafe fn createNSResolver(
&self,
node_resolver: Option<&DOMNode>,
) -> Option<Retained<ProtocolObject<dyn DOMXPathNSResolver>>>;
#[cfg(all(feature = "DOMXPathNSResolver", feature = "DOMXPathResult"))]
#[method_id(@__retain_semantics Other evaluate:contextNode:resolver:type:inResult:)]
pub unsafe fn evaluate_contextNode_resolver_type_inResult(
&self,
expression: Option<&NSString>,
context_node: Option<&DOMNode>,
resolver: Option<&ProtocolObject<dyn DOMXPathNSResolver>>,
r#type: c_ushort,
in_result: Option<&DOMXPathResult>,
) -> Option<Retained<DOMXPathResult>>;
#[method(execCommand:userInterface:value:)]
pub unsafe fn execCommand_userInterface_value(
&self,
command: Option<&NSString>,
user_interface: bool,
value: Option<&NSString>,
) -> bool;
#[method(execCommand:userInterface:)]
pub unsafe fn execCommand_userInterface(
&self,
command: Option<&NSString>,
user_interface: bool,
) -> bool;
#[method(execCommand:)]
pub unsafe fn execCommand(&self, command: Option<&NSString>) -> bool;
#[method(queryCommandEnabled:)]
pub unsafe fn queryCommandEnabled(&self, command: Option<&NSString>) -> bool;
#[method(queryCommandIndeterm:)]
pub unsafe fn queryCommandIndeterm(&self, command: Option<&NSString>) -> bool;
#[method(queryCommandState:)]
pub unsafe fn queryCommandState(&self, command: Option<&NSString>) -> bool;
#[method(queryCommandSupported:)]
pub unsafe fn queryCommandSupported(&self, command: Option<&NSString>) -> bool;
#[method_id(@__retain_semantics Other queryCommandValue:)]
pub unsafe fn queryCommandValue(
&self,
command: Option<&NSString>,
) -> Option<Retained<NSString>>;
#[cfg(feature = "DOMNodeList")]
#[deprecated]
#[method_id(@__retain_semantics Other getElementsByName:)]
pub unsafe fn getElementsByName(
&self,
element_name: Option<&NSString>,
) -> Option<Retained<DOMNodeList>>;
#[cfg(feature = "DOMElement")]
#[method_id(@__retain_semantics Other elementFromPoint:y:)]
pub unsafe fn elementFromPoint_y(&self, x: c_int, y: c_int)
-> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMCSSStyleDeclaration")]
#[method_id(@__retain_semantics Other createCSSStyleDeclaration)]
pub unsafe fn createCSSStyleDeclaration(&self) -> Option<Retained<DOMCSSStyleDeclaration>>;
#[cfg(all(feature = "DOMCSSStyleDeclaration", feature = "DOMElement"))]
#[method_id(@__retain_semantics Other getComputedStyle:pseudoElement:)]
pub unsafe fn getComputedStyle_pseudoElement(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
) -> Option<Retained<DOMCSSStyleDeclaration>>;
#[cfg(all(feature = "DOMCSSRuleList", feature = "DOMElement"))]
#[method_id(@__retain_semantics Other getMatchedCSSRules:pseudoElement:)]
pub unsafe fn getMatchedCSSRules_pseudoElement(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
) -> Option<Retained<DOMCSSRuleList>>;
#[cfg(all(feature = "DOMCSSRuleList", feature = "DOMElement"))]
#[method_id(@__retain_semantics Other getMatchedCSSRules:pseudoElement:authorOnly:)]
pub unsafe fn getMatchedCSSRules_pseudoElement_authorOnly(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
author_only: bool,
) -> Option<Retained<DOMCSSRuleList>>;
#[cfg(feature = "DOMNodeList")]
#[method_id(@__retain_semantics Other getElementsByClassName:)]
pub unsafe fn getElementsByClassName(
&self,
class_names: Option<&NSString>,
) -> Option<Retained<DOMNodeList>>;
#[method(hasFocus)]
pub unsafe fn hasFocus(&self) -> bool;
#[method(webkitCancelFullScreen)]
pub unsafe fn webkitCancelFullScreen(&self);
#[cfg(feature = "DOMElement")]
#[deprecated]
#[method_id(@__retain_semantics Other getElementById:)]
pub unsafe fn getElementById(
&self,
element_id: Option<&NSString>,
) -> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMElement")]
#[method_id(@__retain_semantics Other querySelector:)]
pub unsafe fn querySelector(
&self,
selectors: Option<&NSString>,
) -> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMNodeList")]
#[method_id(@__retain_semantics Other querySelectorAll:)]
pub unsafe fn querySelectorAll(
&self,
selectors: Option<&NSString>,
) -> Option<Retained<DOMNodeList>>;
}
);
extern_methods!(
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl DOMDocument {
#[deprecated]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl DOMDocument {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_methods!(
#[cfg(all(
feature = "DOMNode",
feature = "DOMObject",
feature = "WebScriptObject"
))]
unsafe impl DOMDocument {
#[cfg(all(feature = "DOMCharacterData", feature = "DOMProcessingInstruction"))]
#[deprecated]
#[method_id(@__retain_semantics Other createProcessingInstruction::)]
pub unsafe fn createProcessingInstruction(
&self,
target: Option<&NSString>,
data: Option<&NSString>,
) -> Option<Retained<DOMProcessingInstruction>>;
#[deprecated]
#[method_id(@__retain_semantics Other importNode::)]
pub unsafe fn importNode(
&self,
imported_node: Option<&DOMNode>,
deep: bool,
) -> Option<Retained<DOMNode>>;
#[cfg(feature = "DOMElement")]
#[deprecated]
#[method_id(@__retain_semantics Other createElementNS::)]
pub unsafe fn createElementNS(
&self,
namespace_uri: Option<&NSString>,
qualified_name: Option<&NSString>,
) -> Option<Retained<DOMElement>>;
#[cfg(feature = "DOMAttr")]
#[deprecated]
#[method_id(@__retain_semantics Other createAttributeNS::)]
pub unsafe fn createAttributeNS(
&self,
namespace_uri: Option<&NSString>,
qualified_name: Option<&NSString>,
) -> Option<Retained<DOMAttr>>;
#[cfg(feature = "DOMNodeList")]
#[deprecated]
#[method_id(@__retain_semantics Other getElementsByTagNameNS::)]
pub unsafe fn getElementsByTagNameNS(
&self,
namespace_uri: Option<&NSString>,
local_name: Option<&NSString>,
) -> Option<Retained<DOMNodeList>>;
#[cfg(all(feature = "DOMNodeFilter", feature = "DOMNodeIterator"))]
#[deprecated]
#[method_id(@__retain_semantics Other createNodeIterator::::)]
pub unsafe fn createNodeIterator(
&self,
root: Option<&DOMNode>,
what_to_show: c_uint,
filter: Option<&ProtocolObject<dyn DOMNodeFilter>>,
expand_entity_references: bool,
) -> Option<Retained<DOMNodeIterator>>;
#[cfg(all(feature = "DOMNodeFilter", feature = "DOMTreeWalker"))]
#[deprecated]
#[method_id(@__retain_semantics Other createTreeWalker::::)]
pub unsafe fn createTreeWalker(
&self,
root: Option<&DOMNode>,
what_to_show: c_uint,
filter: Option<&ProtocolObject<dyn DOMNodeFilter>>,
expand_entity_references: bool,
) -> Option<Retained<DOMTreeWalker>>;
#[cfg(all(feature = "DOMCSSStyleDeclaration", feature = "DOMElement"))]
#[deprecated]
#[method_id(@__retain_semantics Other getOverrideStyle::)]
pub unsafe fn getOverrideStyle(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
) -> Option<Retained<DOMCSSStyleDeclaration>>;
#[cfg(all(feature = "DOMXPathExpression", feature = "DOMXPathNSResolver"))]
#[deprecated]
#[method_id(@__retain_semantics Other createExpression::)]
pub unsafe fn createExpression(
&self,
expression: Option<&NSString>,
resolver: Option<&ProtocolObject<dyn DOMXPathNSResolver>>,
) -> Option<Retained<DOMXPathExpression>>;
#[cfg(all(feature = "DOMXPathNSResolver", feature = "DOMXPathResult"))]
#[deprecated]
#[method_id(@__retain_semantics Other evaluate:::::)]
pub unsafe fn evaluate(
&self,
expression: Option<&NSString>,
context_node: Option<&DOMNode>,
resolver: Option<&ProtocolObject<dyn DOMXPathNSResolver>>,
r#type: c_ushort,
in_result: Option<&DOMXPathResult>,
) -> Option<Retained<DOMXPathResult>>;
#[cfg(all(feature = "DOMCSSStyleDeclaration", feature = "DOMElement"))]
#[deprecated]
#[method_id(@__retain_semantics Other getComputedStyle::)]
pub unsafe fn getComputedStyle(
&self,
element: Option<&DOMElement>,
pseudo_element: Option<&NSString>,
) -> Option<Retained<DOMCSSStyleDeclaration>>;
}
);