objc2_web_kit/generated/
DOMHTMLButtonElement.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/domhtmlbuttonelement?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 DOMHTMLButtonElement;
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 DOMHTMLButtonElement {}
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 DOMHTMLButtonElement {}
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 DOMHTMLButtonElement {
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 DOMHTMLButtonElement {}
75);
76
77#[cfg(all(
78    feature = "DOMElement",
79    feature = "DOMHTMLElement",
80    feature = "DOMNode",
81    feature = "DOMObject",
82    feature = "WebScriptObject"
83))]
84impl DOMHTMLButtonElement {
85    extern_methods!(
86        #[unsafe(method(autofocus))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn autofocus(&self) -> bool;
89
90        /// Setter for [`autofocus`][Self::autofocus].
91        #[unsafe(method(setAutofocus:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setAutofocus(&self, autofocus: bool);
94
95        #[deprecated]
96        #[unsafe(method(disabled))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn disabled(&self) -> bool;
99
100        /// Setter for [`disabled`][Self::disabled].
101        #[deprecated]
102        #[unsafe(method(setDisabled:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setDisabled(&self, disabled: bool);
105
106        #[cfg(feature = "DOMHTMLFormElement")]
107        #[deprecated]
108        #[unsafe(method(form))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn form(&self) -> Option<Retained<DOMHTMLFormElement>>;
111
112        #[deprecated]
113        #[unsafe(method(type))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn r#type(&self) -> Retained<NSString>;
116
117        /// Setter for [`type`][Self::type].
118        ///
119        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
120        #[deprecated]
121        #[unsafe(method(setType:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn setType(&self, r#type: 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(value))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn value(&self) -> Retained<NSString>;
142
143        /// Setter for [`value`][Self::value].
144        ///
145        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
146        #[deprecated]
147        #[unsafe(method(setValue:))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn setValue(&self, value: Option<&NSString>);
150
151        #[unsafe(method(willValidate))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn willValidate(&self) -> bool;
154
155        #[deprecated]
156        #[unsafe(method(accessKey))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn accessKey(&self) -> Retained<NSString>;
159
160        /// Setter for [`accessKey`][Self::accessKey].
161        ///
162        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
163        #[deprecated]
164        #[unsafe(method(setAccessKey:))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn setAccessKey(&self, access_key: Option<&NSString>);
167
168        #[unsafe(method(click))]
169        #[unsafe(method_family = none)]
170        pub unsafe fn click(&self);
171    );
172}
173
174/// Methods declared on superclass `DOMObject`.
175#[cfg(all(
176    feature = "DOMElement",
177    feature = "DOMHTMLElement",
178    feature = "DOMNode",
179    feature = "DOMObject",
180    feature = "WebScriptObject"
181))]
182impl DOMHTMLButtonElement {
183    extern_methods!(
184        #[deprecated]
185        #[unsafe(method(init))]
186        #[unsafe(method_family = init)]
187        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
188    );
189}
190
191/// Methods declared on superclass `NSObject`.
192#[cfg(all(
193    feature = "DOMElement",
194    feature = "DOMHTMLElement",
195    feature = "DOMNode",
196    feature = "DOMObject",
197    feature = "WebScriptObject"
198))]
199impl DOMHTMLButtonElement {
200    extern_methods!(
201        #[unsafe(method(new))]
202        #[unsafe(method_family = new)]
203        pub unsafe fn new() -> Retained<Self>;
204    );
205}