objc2_web_kit/generated/
DOMHTMLImageElement.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/domhtmlimageelement?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 DOMHTMLImageElement;
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 DOMHTMLImageElement {}
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 DOMHTMLImageElement {}
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 DOMHTMLImageElement {
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 DOMHTMLImageElement {}
75);
76
77#[cfg(all(
78    feature = "DOMElement",
79    feature = "DOMHTMLElement",
80    feature = "DOMNode",
81    feature = "DOMObject",
82    feature = "WebScriptObject"
83))]
84impl DOMHTMLImageElement {
85    extern_methods!(
86        #[deprecated]
87        #[unsafe(method(name))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn name(&self) -> Retained<NSString>;
90
91        /// Setter for [`name`][Self::name].
92        ///
93        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
94        #[deprecated]
95        #[unsafe(method(setName:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn setName(&self, name: Option<&NSString>);
98
99        #[deprecated]
100        #[unsafe(method(align))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn align(&self) -> Retained<NSString>;
103
104        /// Setter for [`align`][Self::align].
105        ///
106        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
107        #[deprecated]
108        #[unsafe(method(setAlign:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setAlign(&self, align: Option<&NSString>);
111
112        #[deprecated]
113        #[unsafe(method(alt))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn alt(&self) -> Retained<NSString>;
116
117        /// Setter for [`alt`][Self::alt].
118        ///
119        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
120        #[deprecated]
121        #[unsafe(method(setAlt:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn setAlt(&self, alt: Option<&NSString>);
124
125        #[deprecated]
126        #[unsafe(method(border))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn border(&self) -> Retained<NSString>;
129
130        /// Setter for [`border`][Self::border].
131        ///
132        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
133        #[deprecated]
134        #[unsafe(method(setBorder:))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn setBorder(&self, border: Option<&NSString>);
137
138        #[deprecated]
139        #[unsafe(method(height))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn height(&self) -> c_int;
142
143        /// Setter for [`height`][Self::height].
144        #[deprecated]
145        #[unsafe(method(setHeight:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn setHeight(&self, height: c_int);
148
149        #[deprecated]
150        #[unsafe(method(hspace))]
151        #[unsafe(method_family = none)]
152        pub unsafe fn hspace(&self) -> c_int;
153
154        /// Setter for [`hspace`][Self::hspace].
155        #[deprecated]
156        #[unsafe(method(setHspace:))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn setHspace(&self, hspace: c_int);
159
160        #[deprecated]
161        #[unsafe(method(isMap))]
162        #[unsafe(method_family = none)]
163        pub unsafe fn isMap(&self) -> bool;
164
165        /// Setter for [`isMap`][Self::isMap].
166        #[deprecated]
167        #[unsafe(method(setIsMap:))]
168        #[unsafe(method_family = none)]
169        pub unsafe fn setIsMap(&self, is_map: bool);
170
171        #[deprecated]
172        #[unsafe(method(longDesc))]
173        #[unsafe(method_family = none)]
174        pub unsafe fn longDesc(&self) -> Retained<NSString>;
175
176        /// Setter for [`longDesc`][Self::longDesc].
177        ///
178        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
179        #[deprecated]
180        #[unsafe(method(setLongDesc:))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn setLongDesc(&self, long_desc: Option<&NSString>);
183
184        #[deprecated]
185        #[unsafe(method(src))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn src(&self) -> Retained<NSString>;
188
189        /// Setter for [`src`][Self::src].
190        ///
191        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
192        #[deprecated]
193        #[unsafe(method(setSrc:))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn setSrc(&self, src: Option<&NSString>);
196
197        #[deprecated]
198        #[unsafe(method(useMap))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn useMap(&self) -> Retained<NSString>;
201
202        /// Setter for [`useMap`][Self::useMap].
203        ///
204        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
205        #[deprecated]
206        #[unsafe(method(setUseMap:))]
207        #[unsafe(method_family = none)]
208        pub unsafe fn setUseMap(&self, use_map: Option<&NSString>);
209
210        #[deprecated]
211        #[unsafe(method(vspace))]
212        #[unsafe(method_family = none)]
213        pub unsafe fn vspace(&self) -> c_int;
214
215        /// Setter for [`vspace`][Self::vspace].
216        #[deprecated]
217        #[unsafe(method(setVspace:))]
218        #[unsafe(method_family = none)]
219        pub unsafe fn setVspace(&self, vspace: c_int);
220
221        #[deprecated]
222        #[unsafe(method(width))]
223        #[unsafe(method_family = none)]
224        pub unsafe fn width(&self) -> c_int;
225
226        /// Setter for [`width`][Self::width].
227        #[deprecated]
228        #[unsafe(method(setWidth:))]
229        #[unsafe(method_family = none)]
230        pub unsafe fn setWidth(&self, width: c_int);
231
232        #[unsafe(method(complete))]
233        #[unsafe(method_family = none)]
234        pub unsafe fn complete(&self) -> bool;
235
236        #[unsafe(method(lowsrc))]
237        #[unsafe(method_family = none)]
238        pub unsafe fn lowsrc(&self) -> Retained<NSString>;
239
240        /// Setter for [`lowsrc`][Self::lowsrc].
241        ///
242        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
243        #[unsafe(method(setLowsrc:))]
244        #[unsafe(method_family = none)]
245        pub unsafe fn setLowsrc(&self, lowsrc: Option<&NSString>);
246
247        #[unsafe(method(naturalHeight))]
248        #[unsafe(method_family = none)]
249        pub unsafe fn naturalHeight(&self) -> c_int;
250
251        #[unsafe(method(naturalWidth))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn naturalWidth(&self) -> c_int;
254
255        #[unsafe(method(x))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn x(&self) -> c_int;
258
259        #[unsafe(method(y))]
260        #[unsafe(method_family = none)]
261        pub unsafe fn y(&self) -> c_int;
262
263        #[unsafe(method(altDisplayString))]
264        #[unsafe(method_family = none)]
265        pub unsafe fn altDisplayString(&self) -> Retained<NSString>;
266
267        #[unsafe(method(absoluteImageURL))]
268        #[unsafe(method_family = none)]
269        pub unsafe fn absoluteImageURL(&self) -> Retained<NSURL>;
270    );
271}
272
273/// Methods declared on superclass `DOMObject`.
274#[cfg(all(
275    feature = "DOMElement",
276    feature = "DOMHTMLElement",
277    feature = "DOMNode",
278    feature = "DOMObject",
279    feature = "WebScriptObject"
280))]
281impl DOMHTMLImageElement {
282    extern_methods!(
283        #[deprecated]
284        #[unsafe(method(init))]
285        #[unsafe(method_family = init)]
286        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
287    );
288}
289
290/// Methods declared on superclass `NSObject`.
291#[cfg(all(
292    feature = "DOMElement",
293    feature = "DOMHTMLElement",
294    feature = "DOMNode",
295    feature = "DOMObject",
296    feature = "WebScriptObject"
297))]
298impl DOMHTMLImageElement {
299    extern_methods!(
300        #[unsafe(method(new))]
301        #[unsafe(method_family = new)]
302        pub unsafe fn new() -> Retained<Self>;
303    );
304}