objc2_web_kit/generated/
DOMHTMLAnchorElement.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/domhtmlanchorelement?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 DOMHTMLAnchorElement;
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 DOMHTMLAnchorElement {}
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 DOMHTMLAnchorElement {}
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 DOMHTMLAnchorElement {
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 DOMHTMLAnchorElement {}
75);
76
77#[cfg(all(
78    feature = "DOMElement",
79    feature = "DOMHTMLElement",
80    feature = "DOMNode",
81    feature = "DOMObject",
82    feature = "WebScriptObject"
83))]
84impl DOMHTMLAnchorElement {
85    extern_methods!(
86        #[deprecated]
87        #[unsafe(method(charset))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn charset(&self) -> Retained<NSString>;
90
91        /// Setter for [`charset`][Self::charset].
92        ///
93        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
94        #[deprecated]
95        #[unsafe(method(setCharset:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn setCharset(&self, charset: Option<&NSString>);
98
99        #[deprecated]
100        #[unsafe(method(coords))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn coords(&self) -> Retained<NSString>;
103
104        /// Setter for [`coords`][Self::coords].
105        ///
106        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
107        #[deprecated]
108        #[unsafe(method(setCoords:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setCoords(&self, coords: Option<&NSString>);
111
112        #[deprecated]
113        #[unsafe(method(hreflang))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn hreflang(&self) -> Retained<NSString>;
116
117        /// Setter for [`hreflang`][Self::hreflang].
118        ///
119        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
120        #[deprecated]
121        #[unsafe(method(setHreflang:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn setHreflang(&self, hreflang: Option<&NSString>);
124
125        #[deprecated]
126        #[unsafe(method(name))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn name(&self) -> Retained<NSString>;
129
130        /// Setter for [`name`][Self::name].
131        ///
132        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
133        #[deprecated]
134        #[unsafe(method(setName:))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn setName(&self, name: Option<&NSString>);
137
138        #[deprecated]
139        #[unsafe(method(rel))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn rel(&self) -> Retained<NSString>;
142
143        /// Setter for [`rel`][Self::rel].
144        ///
145        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
146        #[deprecated]
147        #[unsafe(method(setRel:))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn setRel(&self, rel: Option<&NSString>);
150
151        #[deprecated]
152        #[unsafe(method(rev))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn rev(&self) -> Retained<NSString>;
155
156        /// Setter for [`rev`][Self::rev].
157        ///
158        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
159        #[deprecated]
160        #[unsafe(method(setRev:))]
161        #[unsafe(method_family = none)]
162        pub unsafe fn setRev(&self, rev: Option<&NSString>);
163
164        #[deprecated]
165        #[unsafe(method(shape))]
166        #[unsafe(method_family = none)]
167        pub unsafe fn shape(&self) -> Retained<NSString>;
168
169        /// Setter for [`shape`][Self::shape].
170        ///
171        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
172        #[deprecated]
173        #[unsafe(method(setShape:))]
174        #[unsafe(method_family = none)]
175        pub unsafe fn setShape(&self, shape: Option<&NSString>);
176
177        #[deprecated]
178        #[unsafe(method(target))]
179        #[unsafe(method_family = none)]
180        pub unsafe fn target(&self) -> Retained<NSString>;
181
182        /// Setter for [`target`][Self::target].
183        ///
184        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
185        #[deprecated]
186        #[unsafe(method(setTarget:))]
187        #[unsafe(method_family = none)]
188        pub unsafe fn setTarget(&self, target: Option<&NSString>);
189
190        #[deprecated]
191        #[unsafe(method(type))]
192        #[unsafe(method_family = none)]
193        pub unsafe fn r#type(&self) -> Retained<NSString>;
194
195        /// Setter for [`type`][Self::type].
196        ///
197        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
198        #[deprecated]
199        #[unsafe(method(setType:))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn setType(&self, r#type: Option<&NSString>);
202
203        #[deprecated]
204        #[unsafe(method(accessKey))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn accessKey(&self) -> Retained<NSString>;
207
208        /// Setter for [`accessKey`][Self::accessKey].
209        ///
210        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
211        #[deprecated]
212        #[unsafe(method(setAccessKey:))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn setAccessKey(&self, access_key: Option<&NSString>);
215
216        #[unsafe(method(text))]
217        #[unsafe(method_family = none)]
218        pub unsafe fn text(&self) -> Retained<NSString>;
219
220        #[unsafe(method(absoluteLinkURL))]
221        #[unsafe(method_family = none)]
222        pub unsafe fn absoluteLinkURL(&self) -> Retained<NSURL>;
223
224        #[deprecated]
225        #[unsafe(method(href))]
226        #[unsafe(method_family = none)]
227        pub unsafe fn href(&self) -> Retained<NSString>;
228
229        /// Setter for [`href`][Self::href].
230        ///
231        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
232        #[deprecated]
233        #[unsafe(method(setHref:))]
234        #[unsafe(method_family = none)]
235        pub unsafe fn setHref(&self, href: Option<&NSString>);
236
237        #[unsafe(method(protocol))]
238        #[unsafe(method_family = none)]
239        pub unsafe fn protocol(&self) -> Retained<NSString>;
240
241        #[unsafe(method(host))]
242        #[unsafe(method_family = none)]
243        pub unsafe fn host(&self) -> Retained<NSString>;
244
245        #[unsafe(method(hostname))]
246        #[unsafe(method_family = none)]
247        pub unsafe fn hostname(&self) -> Retained<NSString>;
248
249        #[unsafe(method(port))]
250        #[unsafe(method_family = none)]
251        pub unsafe fn port(&self) -> Retained<NSString>;
252
253        #[unsafe(method(pathname))]
254        #[unsafe(method_family = none)]
255        pub unsafe fn pathname(&self) -> Retained<NSString>;
256
257        #[unsafe(method(search))]
258        #[unsafe(method_family = none)]
259        pub unsafe fn search(&self) -> Retained<NSString>;
260
261        #[unsafe(method(hashName))]
262        #[unsafe(method_family = none)]
263        pub unsafe fn hashName(&self) -> Retained<NSString>;
264    );
265}
266
267/// Methods declared on superclass `DOMObject`.
268#[cfg(all(
269    feature = "DOMElement",
270    feature = "DOMHTMLElement",
271    feature = "DOMNode",
272    feature = "DOMObject",
273    feature = "WebScriptObject"
274))]
275impl DOMHTMLAnchorElement {
276    extern_methods!(
277        #[deprecated]
278        #[unsafe(method(init))]
279        #[unsafe(method_family = init)]
280        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
281    );
282}
283
284/// Methods declared on superclass `NSObject`.
285#[cfg(all(
286    feature = "DOMElement",
287    feature = "DOMHTMLElement",
288    feature = "DOMNode",
289    feature = "DOMObject",
290    feature = "WebScriptObject"
291))]
292impl DOMHTMLAnchorElement {
293    extern_methods!(
294        #[unsafe(method(new))]
295        #[unsafe(method_family = new)]
296        pub unsafe fn new() -> Retained<Self>;
297    );
298}