objc2_web_kit/generated/
DOMHTMLTextAreaElement.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/domhtmltextareaelement?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 DOMHTMLTextAreaElement;
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 DOMHTMLTextAreaElement {}
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 DOMHTMLTextAreaElement {}
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 DOMHTMLTextAreaElement {
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 DOMHTMLTextAreaElement {}
75);
76
77#[cfg(all(
78    feature = "DOMElement",
79    feature = "DOMHTMLElement",
80    feature = "DOMNode",
81    feature = "DOMObject",
82    feature = "WebScriptObject"
83))]
84impl DOMHTMLTextAreaElement {
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(name))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn name(&self) -> Retained<NSString>;
116
117        /// Setter for [`name`][Self::name].
118        ///
119        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
120        #[deprecated]
121        #[unsafe(method(setName:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn setName(&self, name: Option<&NSString>);
124
125        #[deprecated]
126        #[unsafe(method(readOnly))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn readOnly(&self) -> bool;
129
130        /// Setter for [`readOnly`][Self::readOnly].
131        #[deprecated]
132        #[unsafe(method(setReadOnly:))]
133        #[unsafe(method_family = none)]
134        pub unsafe fn setReadOnly(&self, read_only: bool);
135
136        #[deprecated]
137        #[unsafe(method(rows))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn rows(&self) -> c_int;
140
141        /// Setter for [`rows`][Self::rows].
142        #[deprecated]
143        #[unsafe(method(setRows:))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn setRows(&self, rows: c_int);
146
147        #[deprecated]
148        #[unsafe(method(cols))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn cols(&self) -> c_int;
151
152        /// Setter for [`cols`][Self::cols].
153        #[deprecated]
154        #[unsafe(method(setCols:))]
155        #[unsafe(method_family = none)]
156        pub unsafe fn setCols(&self, cols: c_int);
157
158        #[deprecated]
159        #[unsafe(method(type))]
160        #[unsafe(method_family = none)]
161        pub unsafe fn r#type(&self) -> Retained<NSString>;
162
163        #[deprecated]
164        #[unsafe(method(defaultValue))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn defaultValue(&self) -> Retained<NSString>;
167
168        /// Setter for [`defaultValue`][Self::defaultValue].
169        ///
170        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
171        #[deprecated]
172        #[unsafe(method(setDefaultValue:))]
173        #[unsafe(method_family = none)]
174        pub unsafe fn setDefaultValue(&self, default_value: Option<&NSString>);
175
176        #[deprecated]
177        #[unsafe(method(value))]
178        #[unsafe(method_family = none)]
179        pub unsafe fn value(&self) -> Retained<NSString>;
180
181        /// Setter for [`value`][Self::value].
182        ///
183        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
184        #[deprecated]
185        #[unsafe(method(setValue:))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn setValue(&self, value: Option<&NSString>);
188
189        #[unsafe(method(willValidate))]
190        #[unsafe(method_family = none)]
191        pub unsafe fn willValidate(&self) -> bool;
192
193        #[unsafe(method(selectionStart))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn selectionStart(&self) -> c_int;
196
197        /// Setter for [`selectionStart`][Self::selectionStart].
198        #[unsafe(method(setSelectionStart:))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn setSelectionStart(&self, selection_start: c_int);
201
202        #[unsafe(method(selectionEnd))]
203        #[unsafe(method_family = none)]
204        pub unsafe fn selectionEnd(&self) -> c_int;
205
206        /// Setter for [`selectionEnd`][Self::selectionEnd].
207        #[unsafe(method(setSelectionEnd:))]
208        #[unsafe(method_family = none)]
209        pub unsafe fn setSelectionEnd(&self, selection_end: c_int);
210
211        #[deprecated]
212        #[unsafe(method(accessKey))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn accessKey(&self) -> Retained<NSString>;
215
216        /// Setter for [`accessKey`][Self::accessKey].
217        ///
218        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
219        #[deprecated]
220        #[unsafe(method(setAccessKey:))]
221        #[unsafe(method_family = none)]
222        pub unsafe fn setAccessKey(&self, access_key: Option<&NSString>);
223
224        #[deprecated]
225        #[unsafe(method(select))]
226        #[unsafe(method_family = none)]
227        pub unsafe fn select(&self);
228
229        #[unsafe(method(setSelectionRange:end:))]
230        #[unsafe(method_family = none)]
231        pub unsafe fn setSelectionRange_end(&self, start: c_int, end: c_int);
232    );
233}
234
235/// Methods declared on superclass `DOMObject`.
236#[cfg(all(
237    feature = "DOMElement",
238    feature = "DOMHTMLElement",
239    feature = "DOMNode",
240    feature = "DOMObject",
241    feature = "WebScriptObject"
242))]
243impl DOMHTMLTextAreaElement {
244    extern_methods!(
245        #[deprecated]
246        #[unsafe(method(init))]
247        #[unsafe(method_family = init)]
248        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
249    );
250}
251
252/// Methods declared on superclass `NSObject`.
253#[cfg(all(
254    feature = "DOMElement",
255    feature = "DOMHTMLElement",
256    feature = "DOMNode",
257    feature = "DOMObject",
258    feature = "WebScriptObject"
259))]
260impl DOMHTMLTextAreaElement {
261    extern_methods!(
262        #[unsafe(method(new))]
263        #[unsafe(method_family = new)]
264        pub unsafe fn new() -> Retained<Self>;
265    );
266}