objc2_web_kit/generated/
DOMCSSPrimitiveValue.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[deprecated]
12pub const DOM_CSS_UNKNOWN: c_uint = 0;
13#[deprecated]
15pub const DOM_CSS_NUMBER: c_uint = 1;
16#[deprecated]
18pub const DOM_CSS_PERCENTAGE: c_uint = 2;
19#[deprecated]
21pub const DOM_CSS_EMS: c_uint = 3;
22#[deprecated]
24pub const DOM_CSS_EXS: c_uint = 4;
25#[deprecated]
27pub const DOM_CSS_PX: c_uint = 5;
28#[deprecated]
30pub const DOM_CSS_CM: c_uint = 6;
31#[deprecated]
33pub const DOM_CSS_MM: c_uint = 7;
34#[deprecated]
36pub const DOM_CSS_IN: c_uint = 8;
37#[deprecated]
39pub const DOM_CSS_PT: c_uint = 9;
40#[deprecated]
42pub const DOM_CSS_PC: c_uint = 10;
43#[deprecated]
45pub const DOM_CSS_DEG: c_uint = 11;
46#[deprecated]
48pub const DOM_CSS_RAD: c_uint = 12;
49#[deprecated]
51pub const DOM_CSS_GRAD: c_uint = 13;
52#[deprecated]
54pub const DOM_CSS_MS: c_uint = 14;
55#[deprecated]
57pub const DOM_CSS_S: c_uint = 15;
58#[deprecated]
60pub const DOM_CSS_HZ: c_uint = 16;
61#[deprecated]
63pub const DOM_CSS_KHZ: c_uint = 17;
64#[deprecated]
66pub const DOM_CSS_DIMENSION: c_uint = 18;
67#[deprecated]
69pub const DOM_CSS_STRING: c_uint = 19;
70#[deprecated]
72pub const DOM_CSS_URI: c_uint = 20;
73#[deprecated]
75pub const DOM_CSS_IDENT: c_uint = 21;
76#[deprecated]
78pub const DOM_CSS_ATTR: c_uint = 22;
79#[deprecated]
81pub const DOM_CSS_COUNTER: c_uint = 23;
82#[deprecated]
84pub const DOM_CSS_RECT: c_uint = 24;
85#[deprecated]
87pub const DOM_CSS_RGBCOLOR: c_uint = 25;
88#[deprecated]
90pub const DOM_CSS_VW: c_uint = 26;
91#[deprecated]
93pub const DOM_CSS_VH: c_uint = 27;
94#[deprecated]
96pub const DOM_CSS_VMIN: c_uint = 28;
97#[deprecated]
99pub const DOM_CSS_VMAX: c_uint = 29;
100
101extern_class!(
102 #[unsafe(super(DOMCSSValue, DOMObject, WebScriptObject, NSObject))]
104 #[derive(Debug, PartialEq, Eq, Hash)]
105 #[cfg(all(
106 feature = "DOMCSSValue",
107 feature = "DOMObject",
108 feature = "WebScriptObject"
109 ))]
110 #[deprecated]
111 pub struct DOMCSSPrimitiveValue;
112);
113
114#[cfg(all(
115 feature = "DOMCSSValue",
116 feature = "DOMObject",
117 feature = "WebScriptObject"
118))]
119extern_conformance!(
120 unsafe impl NSCopying for DOMCSSPrimitiveValue {}
121);
122
123#[cfg(all(
124 feature = "DOMCSSValue",
125 feature = "DOMObject",
126 feature = "WebScriptObject"
127))]
128unsafe impl CopyingHelper for DOMCSSPrimitiveValue {
129 type Result = Self;
130}
131
132#[cfg(all(
133 feature = "DOMCSSValue",
134 feature = "DOMObject",
135 feature = "WebScriptObject"
136))]
137extern_conformance!(
138 unsafe impl NSObjectProtocol for DOMCSSPrimitiveValue {}
139);
140
141#[cfg(all(
142 feature = "DOMCSSValue",
143 feature = "DOMObject",
144 feature = "WebScriptObject"
145))]
146impl DOMCSSPrimitiveValue {
147 extern_methods!(
148 #[deprecated]
149 #[unsafe(method(primitiveType))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn primitiveType(&self) -> c_ushort;
152
153 #[unsafe(method(setFloatValue:floatValue:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn setFloatValue_floatValue(&self, unit_type: c_ushort, float_value: c_float);
156
157 #[deprecated]
158 #[unsafe(method(getFloatValue:))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn getFloatValue(&self, unit_type: c_ushort) -> c_float;
161
162 #[unsafe(method(setStringValue:stringValue:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn setStringValue_stringValue(
165 &self,
166 string_type: c_ushort,
167 string_value: Option<&NSString>,
168 );
169
170 #[deprecated]
171 #[unsafe(method(getStringValue))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn getStringValue(&self) -> Option<Retained<NSString>>;
174
175 #[cfg(feature = "DOMCounter")]
176 #[deprecated]
177 #[unsafe(method(getCounterValue))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn getCounterValue(&self) -> Option<Retained<DOMCounter>>;
180
181 #[cfg(feature = "DOMRect")]
182 #[deprecated]
183 #[unsafe(method(getRectValue))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn getRectValue(&self) -> Option<Retained<DOMRect>>;
186
187 #[cfg(feature = "DOMRGBColor")]
188 #[deprecated]
189 #[unsafe(method(getRGBColorValue))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn getRGBColorValue(&self) -> Option<Retained<DOMRGBColor>>;
192 );
193}
194
195#[cfg(all(
197 feature = "DOMCSSValue",
198 feature = "DOMObject",
199 feature = "WebScriptObject"
200))]
201impl DOMCSSPrimitiveValue {
202 extern_methods!(
203 #[deprecated]
204 #[unsafe(method(init))]
205 #[unsafe(method_family = init)]
206 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
207 );
208}
209
210#[cfg(all(
212 feature = "DOMCSSValue",
213 feature = "DOMObject",
214 feature = "WebScriptObject"
215))]
216impl DOMCSSPrimitiveValue {
217 extern_methods!(
218 #[unsafe(method(new))]
219 #[unsafe(method_family = new)]
220 pub unsafe fn new() -> Retained<Self>;
221 );
222}
223
224#[cfg(all(
226 feature = "DOMCSSValue",
227 feature = "DOMObject",
228 feature = "WebScriptObject"
229))]
230impl DOMCSSPrimitiveValue {
231 extern_methods!(
232 #[deprecated]
233 #[unsafe(method(setFloatValue::))]
234 #[unsafe(method_family = none)]
235 pub unsafe fn setFloatValue(&self, unit_type: c_ushort, float_value: c_float);
236
237 #[deprecated]
238 #[unsafe(method(setStringValue::))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn setStringValue(&self, string_type: c_ushort, string_value: Option<&NSString>);
241 );
242}