objc2_web_kit/generated/
DOMHTMLOptionElement.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[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 DOMHTMLOptionElement;
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 DOMHTMLOptionElement {}
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 DOMHTMLOptionElement {}
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 DOMHTMLOptionElement {
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 DOMHTMLOptionElement {}
75);
76
77#[cfg(all(
78 feature = "DOMElement",
79 feature = "DOMHTMLElement",
80 feature = "DOMNode",
81 feature = "DOMObject",
82 feature = "WebScriptObject"
83))]
84impl DOMHTMLOptionElement {
85 extern_methods!(
86 #[deprecated]
87 #[unsafe(method(disabled))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn disabled(&self) -> bool;
90
91 #[deprecated]
93 #[unsafe(method(setDisabled:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setDisabled(&self, disabled: bool);
96
97 #[cfg(feature = "DOMHTMLFormElement")]
98 #[deprecated]
99 #[unsafe(method(form))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn form(&self) -> Option<Retained<DOMHTMLFormElement>>;
102
103 #[deprecated]
104 #[unsafe(method(label))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn label(&self) -> Retained<NSString>;
107
108 #[deprecated]
112 #[unsafe(method(setLabel:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn setLabel(&self, label: Option<&NSString>);
115
116 #[deprecated]
117 #[unsafe(method(defaultSelected))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn defaultSelected(&self) -> bool;
120
121 #[deprecated]
123 #[unsafe(method(setDefaultSelected:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn setDefaultSelected(&self, default_selected: bool);
126
127 #[deprecated]
128 #[unsafe(method(selected))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn selected(&self) -> bool;
131
132 #[deprecated]
134 #[unsafe(method(setSelected:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn setSelected(&self, selected: bool);
137
138 #[deprecated]
139 #[unsafe(method(value))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn value(&self) -> Retained<NSString>;
142
143 #[deprecated]
147 #[unsafe(method(setValue:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setValue(&self, value: Option<&NSString>);
150
151 #[deprecated]
152 #[unsafe(method(text))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn text(&self) -> Retained<NSString>;
155
156 #[deprecated]
157 #[unsafe(method(index))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn index(&self) -> c_int;
160 );
161}
162
163#[cfg(all(
165 feature = "DOMElement",
166 feature = "DOMHTMLElement",
167 feature = "DOMNode",
168 feature = "DOMObject",
169 feature = "WebScriptObject"
170))]
171impl DOMHTMLOptionElement {
172 extern_methods!(
173 #[deprecated]
174 #[unsafe(method(init))]
175 #[unsafe(method_family = init)]
176 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
177 );
178}
179
180#[cfg(all(
182 feature = "DOMElement",
183 feature = "DOMHTMLElement",
184 feature = "DOMNode",
185 feature = "DOMObject",
186 feature = "WebScriptObject"
187))]
188impl DOMHTMLOptionElement {
189 extern_methods!(
190 #[unsafe(method(new))]
191 #[unsafe(method_family = new)]
192 pub unsafe fn new() -> Retained<Self>;
193 );
194}