objc2_web_kit/generated/
DOMHTMLSelectElement.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/domhtmlselectelement?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 DOMHTMLSelectElement;
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 DOMHTMLSelectElement {}
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 DOMHTMLSelectElement {}
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 DOMHTMLSelectElement {
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 DOMHTMLSelectElement {}
75);
76
77#[cfg(all(
78    feature = "DOMElement",
79    feature = "DOMHTMLElement",
80    feature = "DOMNode",
81    feature = "DOMObject",
82    feature = "WebScriptObject"
83))]
84impl DOMHTMLSelectElement {
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(multiple))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn multiple(&self) -> bool;
116
117        /// Setter for [`multiple`][Self::multiple].
118        #[deprecated]
119        #[unsafe(method(setMultiple:))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn setMultiple(&self, multiple: bool);
122
123        #[deprecated]
124        #[unsafe(method(name))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn name(&self) -> Retained<NSString>;
127
128        /// Setter for [`name`][Self::name].
129        #[deprecated]
130        #[unsafe(method(setName:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn setName(&self, name: Option<&NSString>);
133
134        #[deprecated]
135        #[unsafe(method(size))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn size(&self) -> c_int;
138
139        /// Setter for [`size`][Self::size].
140        #[deprecated]
141        #[unsafe(method(setSize:))]
142        #[unsafe(method_family = none)]
143        pub unsafe fn setSize(&self, size: c_int);
144
145        #[deprecated]
146        #[unsafe(method(type))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn r#type(&self) -> Retained<NSString>;
149
150        #[cfg(feature = "DOMHTMLOptionsCollection")]
151        #[deprecated]
152        #[unsafe(method(options))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn options(&self) -> Option<Retained<DOMHTMLOptionsCollection>>;
155
156        #[deprecated]
157        #[unsafe(method(length))]
158        #[unsafe(method_family = none)]
159        pub unsafe fn length(&self) -> c_int;
160
161        #[deprecated]
162        #[unsafe(method(selectedIndex))]
163        #[unsafe(method_family = none)]
164        pub unsafe fn selectedIndex(&self) -> c_int;
165
166        /// Setter for [`selectedIndex`][Self::selectedIndex].
167        #[deprecated]
168        #[unsafe(method(setSelectedIndex:))]
169        #[unsafe(method_family = none)]
170        pub unsafe fn setSelectedIndex(&self, selected_index: c_int);
171
172        #[deprecated]
173        #[unsafe(method(value))]
174        #[unsafe(method_family = none)]
175        pub unsafe fn value(&self) -> Retained<NSString>;
176
177        /// Setter for [`value`][Self::value].
178        #[deprecated]
179        #[unsafe(method(setValue:))]
180        #[unsafe(method_family = none)]
181        pub unsafe fn setValue(&self, value: Option<&NSString>);
182
183        #[unsafe(method(willValidate))]
184        #[unsafe(method_family = none)]
185        pub unsafe fn willValidate(&self) -> bool;
186
187        #[unsafe(method(item:))]
188        #[unsafe(method_family = none)]
189        pub unsafe fn item(&self, index: c_uint) -> Option<Retained<DOMNode>>;
190
191        #[unsafe(method(namedItem:))]
192        #[unsafe(method_family = none)]
193        pub unsafe fn namedItem(&self, name: Option<&NSString>) -> Option<Retained<DOMNode>>;
194
195        #[unsafe(method(add:before:))]
196        #[unsafe(method_family = none)]
197        pub unsafe fn add_before(
198            &self,
199            element: Option<&DOMHTMLElement>,
200            before: Option<&DOMHTMLElement>,
201        );
202
203        #[deprecated]
204        #[unsafe(method(remove:))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn remove(&self, index: c_int);
207    );
208}
209
210/// Methods declared on superclass `DOMObject`.
211#[cfg(all(
212    feature = "DOMElement",
213    feature = "DOMHTMLElement",
214    feature = "DOMNode",
215    feature = "DOMObject",
216    feature = "WebScriptObject"
217))]
218impl DOMHTMLSelectElement {
219    extern_methods!(
220        #[deprecated]
221        #[unsafe(method(init))]
222        #[unsafe(method_family = init)]
223        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
224    );
225}
226
227/// Methods declared on superclass `NSObject`.
228#[cfg(all(
229    feature = "DOMElement",
230    feature = "DOMHTMLElement",
231    feature = "DOMNode",
232    feature = "DOMObject",
233    feature = "WebScriptObject"
234))]
235impl DOMHTMLSelectElement {
236    extern_methods!(
237        #[unsafe(method(new))]
238        #[unsafe(method_family = new)]
239        pub unsafe fn new() -> Retained<Self>;
240    );
241}
242
243/// DOMHTMLSelectElementDeprecated.
244#[cfg(all(
245    feature = "DOMElement",
246    feature = "DOMHTMLElement",
247    feature = "DOMNode",
248    feature = "DOMObject",
249    feature = "WebScriptObject"
250))]
251impl DOMHTMLSelectElement {
252    extern_methods!(
253        #[deprecated]
254        #[unsafe(method(add::))]
255        #[unsafe(method_family = none)]
256        pub unsafe fn add(&self, element: Option<&DOMHTMLElement>, before: Option<&DOMHTMLElement>);
257    );
258}