objc2_web_kit/generated/
DOMImplementation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domimplementation?language=objc)
11    #[unsafe(super(DOMObject, WebScriptObject, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
14    #[deprecated]
15    pub struct DOMImplementation;
16);
17
18#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
19unsafe impl NSCopying for DOMImplementation {}
20
21#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
22unsafe impl CopyingHelper for DOMImplementation {
23    type Result = Self;
24}
25
26#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
27unsafe impl NSObjectProtocol for DOMImplementation {}
28
29#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
30impl DOMImplementation {
31    extern_methods!(
32        #[unsafe(method(hasFeature:version:))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn hasFeature_version(
35            &self,
36            feature: Option<&NSString>,
37            version: Option<&NSString>,
38        ) -> bool;
39
40        #[cfg(all(feature = "DOMDocumentType", feature = "DOMNode"))]
41        #[unsafe(method(createDocumentType:publicId:systemId:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn createDocumentType_publicId_systemId(
44            &self,
45            qualified_name: Option<&NSString>,
46            public_id: Option<&NSString>,
47            system_id: Option<&NSString>,
48        ) -> Option<Retained<DOMDocumentType>>;
49
50        #[cfg(all(
51            feature = "DOMDocument",
52            feature = "DOMDocumentType",
53            feature = "DOMNode"
54        ))]
55        #[unsafe(method(createDocument:qualifiedName:doctype:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn createDocument_qualifiedName_doctype(
58            &self,
59            namespace_uri: Option<&NSString>,
60            qualified_name: Option<&NSString>,
61            doctype: Option<&DOMDocumentType>,
62        ) -> Option<Retained<DOMDocument>>;
63
64        #[cfg(all(feature = "DOMCSSStyleSheet", feature = "DOMStyleSheet"))]
65        #[unsafe(method(createCSSStyleSheet:media:))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn createCSSStyleSheet_media(
68            &self,
69            title: Option<&NSString>,
70            media: Option<&NSString>,
71        ) -> Option<Retained<DOMCSSStyleSheet>>;
72
73        #[cfg(all(
74            feature = "DOMDocument",
75            feature = "DOMHTMLDocument",
76            feature = "DOMNode"
77        ))]
78        #[unsafe(method(createHTMLDocument:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn createHTMLDocument(
81            &self,
82            title: Option<&NSString>,
83        ) -> Option<Retained<DOMHTMLDocument>>;
84    );
85}
86
87/// Methods declared on superclass `DOMObject`.
88#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
89impl DOMImplementation {
90    extern_methods!(
91        #[deprecated]
92        #[unsafe(method(init))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95    );
96}
97
98/// Methods declared on superclass `NSObject`.
99#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
100impl DOMImplementation {
101    extern_methods!(
102        #[unsafe(method(new))]
103        #[unsafe(method_family = new)]
104        pub unsafe fn new() -> Retained<Self>;
105    );
106}
107
108/// DOMImplementationDeprecated.
109#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
110impl DOMImplementation {
111    extern_methods!(
112        #[deprecated]
113        #[unsafe(method(hasFeature::))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn hasFeature(
116            &self,
117            feature: Option<&NSString>,
118            version: Option<&NSString>,
119        ) -> bool;
120
121        #[cfg(all(feature = "DOMDocumentType", feature = "DOMNode"))]
122        #[deprecated]
123        #[unsafe(method(createDocumentType:::))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn createDocumentType(
126            &self,
127            qualified_name: Option<&NSString>,
128            public_id: Option<&NSString>,
129            system_id: Option<&NSString>,
130        ) -> Option<Retained<DOMDocumentType>>;
131
132        #[cfg(all(
133            feature = "DOMDocument",
134            feature = "DOMDocumentType",
135            feature = "DOMNode"
136        ))]
137        #[deprecated]
138        #[unsafe(method(createDocument:::))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn createDocument(
141            &self,
142            namespace_uri: Option<&NSString>,
143            qualified_name: Option<&NSString>,
144            doctype: Option<&DOMDocumentType>,
145        ) -> Option<Retained<DOMDocument>>;
146
147        #[cfg(all(feature = "DOMCSSStyleSheet", feature = "DOMStyleSheet"))]
148        #[deprecated]
149        #[unsafe(method(createCSSStyleSheet::))]
150        #[unsafe(method_family = none)]
151        pub unsafe fn createCSSStyleSheet(
152            &self,
153            title: Option<&NSString>,
154            media: Option<&NSString>,
155        ) -> Option<Retained<DOMCSSStyleSheet>>;
156    );
157}