objc2_web_kit/generated/
DOMHTMLScriptElement.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domhtmlscriptelement?language=objc)
12    #[unsafe(super(
13        DOMHTMLElement,
14        DOMElement,
15        DOMNode,
16        DOMObject,
17        WebScriptObject,
18        NSObject
19    ))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(all(
22        feature = "DOMElement",
23        feature = "DOMHTMLElement",
24        feature = "DOMNode",
25        feature = "DOMObject",
26        feature = "WebScriptObject"
27    ))]
28    #[deprecated]
29    pub struct DOMHTMLScriptElement;
30);
31
32#[cfg(all(
33    feature = "DOMElement",
34    feature = "DOMEventTarget",
35    feature = "DOMHTMLElement",
36    feature = "DOMNode",
37    feature = "DOMObject",
38    feature = "WebScriptObject"
39))]
40extern_conformance!(
41    unsafe impl DOMEventTarget for DOMHTMLScriptElement {}
42);
43
44#[cfg(all(
45    feature = "DOMElement",
46    feature = "DOMHTMLElement",
47    feature = "DOMNode",
48    feature = "DOMObject",
49    feature = "WebScriptObject"
50))]
51extern_conformance!(
52    unsafe impl NSCopying for DOMHTMLScriptElement {}
53);
54
55#[cfg(all(
56    feature = "DOMElement",
57    feature = "DOMHTMLElement",
58    feature = "DOMNode",
59    feature = "DOMObject",
60    feature = "WebScriptObject"
61))]
62unsafe impl CopyingHelper for DOMHTMLScriptElement {
63    type Result = Self;
64}
65
66#[cfg(all(
67    feature = "DOMElement",
68    feature = "DOMHTMLElement",
69    feature = "DOMNode",
70    feature = "DOMObject",
71    feature = "WebScriptObject"
72))]
73extern_conformance!(
74    unsafe impl NSObjectProtocol for DOMHTMLScriptElement {}
75);
76
77#[cfg(all(
78    feature = "DOMElement",
79    feature = "DOMHTMLElement",
80    feature = "DOMNode",
81    feature = "DOMObject",
82    feature = "WebScriptObject"
83))]
84impl DOMHTMLScriptElement {
85    extern_methods!(
86        #[deprecated]
87        #[unsafe(method(text))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn text(&self) -> Retained<NSString>;
90
91        /// Setter for [`text`][Self::text].
92        ///
93        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
94        #[deprecated]
95        #[unsafe(method(setText:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn setText(&self, text: Option<&NSString>);
98
99        #[deprecated]
100        #[unsafe(method(htmlFor))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn htmlFor(&self) -> Retained<NSString>;
103
104        /// Setter for [`htmlFor`][Self::htmlFor].
105        ///
106        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
107        #[deprecated]
108        #[unsafe(method(setHtmlFor:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setHtmlFor(&self, html_for: Option<&NSString>);
111
112        #[deprecated]
113        #[unsafe(method(event))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn event(&self) -> Retained<NSString>;
116
117        /// Setter for [`event`][Self::event].
118        ///
119        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
120        #[deprecated]
121        #[unsafe(method(setEvent:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn setEvent(&self, event: Option<&NSString>);
124
125        #[deprecated]
126        #[unsafe(method(charset))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn charset(&self) -> Retained<NSString>;
129
130        /// Setter for [`charset`][Self::charset].
131        ///
132        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
133        #[deprecated]
134        #[unsafe(method(setCharset:))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn setCharset(&self, charset: Option<&NSString>);
137
138        #[deprecated]
139        #[unsafe(method(defer))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn defer(&self) -> bool;
142
143        /// Setter for [`defer`][Self::defer].
144        #[deprecated]
145        #[unsafe(method(setDefer:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn setDefer(&self, defer: bool);
148
149        #[deprecated]
150        #[unsafe(method(src))]
151        #[unsafe(method_family = none)]
152        pub unsafe fn src(&self) -> Retained<NSString>;
153
154        /// Setter for [`src`][Self::src].
155        ///
156        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
157        #[deprecated]
158        #[unsafe(method(setSrc:))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn setSrc(&self, src: Option<&NSString>);
161
162        #[deprecated]
163        #[unsafe(method(type))]
164        #[unsafe(method_family = none)]
165        pub unsafe fn r#type(&self) -> Retained<NSString>;
166
167        /// Setter for [`type`][Self::type].
168        ///
169        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
170        #[deprecated]
171        #[unsafe(method(setType:))]
172        #[unsafe(method_family = none)]
173        pub unsafe fn setType(&self, r#type: Option<&NSString>);
174    );
175}
176
177/// Methods declared on superclass `DOMObject`.
178#[cfg(all(
179    feature = "DOMElement",
180    feature = "DOMHTMLElement",
181    feature = "DOMNode",
182    feature = "DOMObject",
183    feature = "WebScriptObject"
184))]
185impl DOMHTMLScriptElement {
186    extern_methods!(
187        #[deprecated]
188        #[unsafe(method(init))]
189        #[unsafe(method_family = init)]
190        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
191    );
192}
193
194/// Methods declared on superclass `NSObject`.
195#[cfg(all(
196    feature = "DOMElement",
197    feature = "DOMHTMLElement",
198    feature = "DOMNode",
199    feature = "DOMObject",
200    feature = "WebScriptObject"
201))]
202impl DOMHTMLScriptElement {
203    extern_methods!(
204        #[unsafe(method(new))]
205        #[unsafe(method_family = new)]
206        pub unsafe fn new() -> Retained<Self>;
207    );
208}