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))]
119unsafe impl NSCopying for DOMCSSPrimitiveValue {}
120
121#[cfg(all(
122 feature = "DOMCSSValue",
123 feature = "DOMObject",
124 feature = "WebScriptObject"
125))]
126unsafe impl CopyingHelper for DOMCSSPrimitiveValue {
127 type Result = Self;
128}
129
130#[cfg(all(
131 feature = "DOMCSSValue",
132 feature = "DOMObject",
133 feature = "WebScriptObject"
134))]
135unsafe impl NSObjectProtocol for DOMCSSPrimitiveValue {}
136
137#[cfg(all(
138 feature = "DOMCSSValue",
139 feature = "DOMObject",
140 feature = "WebScriptObject"
141))]
142impl DOMCSSPrimitiveValue {
143 extern_methods!(
144 #[deprecated]
145 #[unsafe(method(primitiveType))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn primitiveType(&self) -> c_ushort;
148
149 #[unsafe(method(setFloatValue:floatValue:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setFloatValue_floatValue(&self, unit_type: c_ushort, float_value: c_float);
152
153 #[deprecated]
154 #[unsafe(method(getFloatValue:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn getFloatValue(&self, unit_type: c_ushort) -> c_float;
157
158 #[unsafe(method(setStringValue:stringValue:))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn setStringValue_stringValue(
161 &self,
162 string_type: c_ushort,
163 string_value: Option<&NSString>,
164 );
165
166 #[deprecated]
167 #[unsafe(method(getStringValue))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn getStringValue(&self) -> Option<Retained<NSString>>;
170
171 #[cfg(feature = "DOMCounter")]
172 #[deprecated]
173 #[unsafe(method(getCounterValue))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn getCounterValue(&self) -> Option<Retained<DOMCounter>>;
176
177 #[cfg(feature = "DOMRect")]
178 #[deprecated]
179 #[unsafe(method(getRectValue))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn getRectValue(&self) -> Option<Retained<DOMRect>>;
182
183 #[cfg(feature = "DOMRGBColor")]
184 #[deprecated]
185 #[unsafe(method(getRGBColorValue))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn getRGBColorValue(&self) -> Option<Retained<DOMRGBColor>>;
188 );
189}
190
191#[cfg(all(
193 feature = "DOMCSSValue",
194 feature = "DOMObject",
195 feature = "WebScriptObject"
196))]
197impl DOMCSSPrimitiveValue {
198 extern_methods!(
199 #[deprecated]
200 #[unsafe(method(init))]
201 #[unsafe(method_family = init)]
202 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
203 );
204}
205
206#[cfg(all(
208 feature = "DOMCSSValue",
209 feature = "DOMObject",
210 feature = "WebScriptObject"
211))]
212impl DOMCSSPrimitiveValue {
213 extern_methods!(
214 #[unsafe(method(new))]
215 #[unsafe(method_family = new)]
216 pub unsafe fn new() -> Retained<Self>;
217 );
218}
219
220#[cfg(all(
222 feature = "DOMCSSValue",
223 feature = "DOMObject",
224 feature = "WebScriptObject"
225))]
226impl DOMCSSPrimitiveValue {
227 extern_methods!(
228 #[deprecated]
229 #[unsafe(method(setFloatValue::))]
230 #[unsafe(method_family = none)]
231 pub unsafe fn setFloatValue(&self, unit_type: c_ushort, float_value: c_float);
232
233 #[deprecated]
234 #[unsafe(method(setStringValue::))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn setStringValue(&self, string_type: c_ushort, string_value: Option<&NSString>);
237 );
238}