objc2_web_kit/generated/
DOMCSSPrimitiveValue.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
10/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_unknown?language=objc)
11#[deprecated]
12pub const DOM_CSS_UNKNOWN: c_uint = 0;
13/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_number?language=objc)
14#[deprecated]
15pub const DOM_CSS_NUMBER: c_uint = 1;
16/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_percentage?language=objc)
17#[deprecated]
18pub const DOM_CSS_PERCENTAGE: c_uint = 2;
19/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_ems?language=objc)
20#[deprecated]
21pub const DOM_CSS_EMS: c_uint = 3;
22/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_exs?language=objc)
23#[deprecated]
24pub const DOM_CSS_EXS: c_uint = 4;
25/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_px?language=objc)
26#[deprecated]
27pub const DOM_CSS_PX: c_uint = 5;
28/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_cm?language=objc)
29#[deprecated]
30pub const DOM_CSS_CM: c_uint = 6;
31/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_mm?language=objc)
32#[deprecated]
33pub const DOM_CSS_MM: c_uint = 7;
34/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_in?language=objc)
35#[deprecated]
36pub const DOM_CSS_IN: c_uint = 8;
37/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_pt?language=objc)
38#[deprecated]
39pub const DOM_CSS_PT: c_uint = 9;
40/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_pc?language=objc)
41#[deprecated]
42pub const DOM_CSS_PC: c_uint = 10;
43/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_deg?language=objc)
44#[deprecated]
45pub const DOM_CSS_DEG: c_uint = 11;
46/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_rad?language=objc)
47#[deprecated]
48pub const DOM_CSS_RAD: c_uint = 12;
49/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_grad?language=objc)
50#[deprecated]
51pub const DOM_CSS_GRAD: c_uint = 13;
52/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_ms?language=objc)
53#[deprecated]
54pub const DOM_CSS_MS: c_uint = 14;
55/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_s?language=objc)
56#[deprecated]
57pub const DOM_CSS_S: c_uint = 15;
58/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_hz?language=objc)
59#[deprecated]
60pub const DOM_CSS_HZ: c_uint = 16;
61/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_khz?language=objc)
62#[deprecated]
63pub const DOM_CSS_KHZ: c_uint = 17;
64/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_dimension?language=objc)
65#[deprecated]
66pub const DOM_CSS_DIMENSION: c_uint = 18;
67/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_string?language=objc)
68#[deprecated]
69pub const DOM_CSS_STRING: c_uint = 19;
70/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_uri?language=objc)
71#[deprecated]
72pub const DOM_CSS_URI: c_uint = 20;
73/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_ident?language=objc)
74#[deprecated]
75pub const DOM_CSS_IDENT: c_uint = 21;
76/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_attr?language=objc)
77#[deprecated]
78pub const DOM_CSS_ATTR: c_uint = 22;
79/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_counter?language=objc)
80#[deprecated]
81pub const DOM_CSS_COUNTER: c_uint = 23;
82/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_rect?language=objc)
83#[deprecated]
84pub const DOM_CSS_RECT: c_uint = 24;
85/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_rgbcolor?language=objc)
86#[deprecated]
87pub const DOM_CSS_RGBCOLOR: c_uint = 25;
88/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_vw?language=objc)
89#[deprecated]
90pub const DOM_CSS_VW: c_uint = 26;
91/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_vh?language=objc)
92#[deprecated]
93pub const DOM_CSS_VH: c_uint = 27;
94/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_vmin?language=objc)
95#[deprecated]
96pub const DOM_CSS_VMIN: c_uint = 28;
97/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_css_vmax?language=objc)
98#[deprecated]
99pub const DOM_CSS_VMAX: c_uint = 29;
100
101extern_class!(
102    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domcssprimitivevalue?language=objc)
103    #[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        /// # Safety
163        ///
164        /// `string_value` might not allow `None`.
165        #[unsafe(method(setStringValue:stringValue:))]
166        #[unsafe(method_family = none)]
167        pub unsafe fn setStringValue_stringValue(
168            &self,
169            string_type: c_ushort,
170            string_value: Option<&NSString>,
171        );
172
173        #[deprecated]
174        #[unsafe(method(getStringValue))]
175        #[unsafe(method_family = none)]
176        pub unsafe fn getStringValue(&self) -> Option<Retained<NSString>>;
177
178        #[cfg(feature = "DOMCounter")]
179        #[deprecated]
180        #[unsafe(method(getCounterValue))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn getCounterValue(&self) -> Option<Retained<DOMCounter>>;
183
184        #[cfg(feature = "DOMRect")]
185        #[deprecated]
186        #[unsafe(method(getRectValue))]
187        #[unsafe(method_family = none)]
188        pub unsafe fn getRectValue(&self) -> Option<Retained<DOMRect>>;
189
190        #[cfg(feature = "DOMRGBColor")]
191        #[deprecated]
192        #[unsafe(method(getRGBColorValue))]
193        #[unsafe(method_family = none)]
194        pub unsafe fn getRGBColorValue(&self) -> Option<Retained<DOMRGBColor>>;
195    );
196}
197
198/// Methods declared on superclass `DOMObject`.
199#[cfg(all(
200    feature = "DOMCSSValue",
201    feature = "DOMObject",
202    feature = "WebScriptObject"
203))]
204impl DOMCSSPrimitiveValue {
205    extern_methods!(
206        #[deprecated]
207        #[unsafe(method(init))]
208        #[unsafe(method_family = init)]
209        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
210    );
211}
212
213/// Methods declared on superclass `NSObject`.
214#[cfg(all(
215    feature = "DOMCSSValue",
216    feature = "DOMObject",
217    feature = "WebScriptObject"
218))]
219impl DOMCSSPrimitiveValue {
220    extern_methods!(
221        #[unsafe(method(new))]
222        #[unsafe(method_family = new)]
223        pub unsafe fn new() -> Retained<Self>;
224    );
225}
226
227/// DOMCSSPrimitiveValueDeprecated.
228#[deprecated]
229#[cfg(all(
230    feature = "DOMCSSValue",
231    feature = "DOMObject",
232    feature = "WebScriptObject"
233))]
234impl DOMCSSPrimitiveValue {
235    extern_methods!(
236        #[deprecated]
237        #[unsafe(method(setFloatValue::))]
238        #[unsafe(method_family = none)]
239        pub unsafe fn setFloatValue(&self, unit_type: c_ushort, float_value: c_float);
240
241        /// # Safety
242        ///
243        /// `string_value` might not allow `None`.
244        #[deprecated]
245        #[unsafe(method(setStringValue::))]
246        #[unsafe(method_family = none)]
247        pub unsafe fn setStringValue(&self, string_type: c_ushort, string_value: Option<&NSString>);
248    );
249}