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"))]
19extern_conformance!(
20    unsafe impl NSCopying for DOMImplementation {}
21);
22
23#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
24unsafe impl CopyingHelper for DOMImplementation {
25    type Result = Self;
26}
27
28#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
29extern_conformance!(
30    unsafe impl NSObjectProtocol for DOMImplementation {}
31);
32
33#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
34impl DOMImplementation {
35    extern_methods!(
36        /// # Safety
37        ///
38        /// - `feature` might not allow `None`.
39        /// - `version` might not allow `None`.
40        #[unsafe(method(hasFeature:version:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn hasFeature_version(
43            &self,
44            feature: Option<&NSString>,
45            version: Option<&NSString>,
46        ) -> bool;
47
48        #[cfg(all(feature = "DOMDocumentType", feature = "DOMNode"))]
49        /// # Safety
50        ///
51        /// - `qualified_name` might not allow `None`.
52        /// - `public_id` might not allow `None`.
53        /// - `system_id` might not allow `None`.
54        #[unsafe(method(createDocumentType:publicId:systemId:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn createDocumentType_publicId_systemId(
57            &self,
58            qualified_name: Option<&NSString>,
59            public_id: Option<&NSString>,
60            system_id: Option<&NSString>,
61        ) -> Option<Retained<DOMDocumentType>>;
62
63        #[cfg(all(
64            feature = "DOMDocument",
65            feature = "DOMDocumentType",
66            feature = "DOMNode"
67        ))]
68        /// # Safety
69        ///
70        /// - `namespace_uri` might not allow `None`.
71        /// - `qualified_name` might not allow `None`.
72        /// - `doctype` might not allow `None`.
73        #[unsafe(method(createDocument:qualifiedName:doctype:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn createDocument_qualifiedName_doctype(
76            &self,
77            namespace_uri: Option<&NSString>,
78            qualified_name: Option<&NSString>,
79            doctype: Option<&DOMDocumentType>,
80        ) -> Option<Retained<DOMDocument>>;
81
82        #[cfg(all(feature = "DOMCSSStyleSheet", feature = "DOMStyleSheet"))]
83        /// # Safety
84        ///
85        /// - `title` might not allow `None`.
86        /// - `media` might not allow `None`.
87        #[unsafe(method(createCSSStyleSheet:media:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn createCSSStyleSheet_media(
90            &self,
91            title: Option<&NSString>,
92            media: Option<&NSString>,
93        ) -> Option<Retained<DOMCSSStyleSheet>>;
94
95        #[cfg(all(
96            feature = "DOMDocument",
97            feature = "DOMHTMLDocument",
98            feature = "DOMNode"
99        ))]
100        /// # Safety
101        ///
102        /// `title` might not allow `None`.
103        #[unsafe(method(createHTMLDocument:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn createHTMLDocument(
106            &self,
107            title: Option<&NSString>,
108        ) -> Option<Retained<DOMHTMLDocument>>;
109    );
110}
111
112/// Methods declared on superclass `DOMObject`.
113#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
114impl DOMImplementation {
115    extern_methods!(
116        #[deprecated]
117        #[unsafe(method(init))]
118        #[unsafe(method_family = init)]
119        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120    );
121}
122
123/// Methods declared on superclass `NSObject`.
124#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
125impl DOMImplementation {
126    extern_methods!(
127        #[unsafe(method(new))]
128        #[unsafe(method_family = new)]
129        pub unsafe fn new() -> Retained<Self>;
130    );
131}
132
133/// DOMImplementationDeprecated.
134#[deprecated]
135#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
136impl DOMImplementation {
137    extern_methods!(
138        /// # Safety
139        ///
140        /// - `feature` might not allow `None`.
141        /// - `version` might not allow `None`.
142        #[deprecated]
143        #[unsafe(method(hasFeature::))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn hasFeature(
146            &self,
147            feature: Option<&NSString>,
148            version: Option<&NSString>,
149        ) -> bool;
150
151        #[cfg(all(feature = "DOMDocumentType", feature = "DOMNode"))]
152        /// # Safety
153        ///
154        /// - `qualified_name` might not allow `None`.
155        /// - `public_id` might not allow `None`.
156        /// - `system_id` might not allow `None`.
157        #[deprecated]
158        #[unsafe(method(createDocumentType:::))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn createDocumentType(
161            &self,
162            qualified_name: Option<&NSString>,
163            public_id: Option<&NSString>,
164            system_id: Option<&NSString>,
165        ) -> Option<Retained<DOMDocumentType>>;
166
167        #[cfg(all(
168            feature = "DOMDocument",
169            feature = "DOMDocumentType",
170            feature = "DOMNode"
171        ))]
172        /// # Safety
173        ///
174        /// - `namespace_uri` might not allow `None`.
175        /// - `qualified_name` might not allow `None`.
176        /// - `doctype` might not allow `None`.
177        #[deprecated]
178        #[unsafe(method(createDocument:::))]
179        #[unsafe(method_family = none)]
180        pub unsafe fn createDocument(
181            &self,
182            namespace_uri: Option<&NSString>,
183            qualified_name: Option<&NSString>,
184            doctype: Option<&DOMDocumentType>,
185        ) -> Option<Retained<DOMDocument>>;
186
187        #[cfg(all(feature = "DOMCSSStyleSheet", feature = "DOMStyleSheet"))]
188        /// # Safety
189        ///
190        /// - `title` might not allow `None`.
191        /// - `media` might not allow `None`.
192        #[deprecated]
193        #[unsafe(method(createCSSStyleSheet::))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn createCSSStyleSheet(
196            &self,
197            title: Option<&NSString>,
198            media: Option<&NSString>,
199        ) -> Option<Retained<DOMCSSStyleSheet>>;
200    );
201}