web_sys/features/
gen_SvgLength.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = SVGLength , typescript_type = "SVGLength")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `SvgLength` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
14    pub type SvgLength;
15    # [wasm_bindgen (structural , method , getter , js_class = "SVGLength" , js_name = unitType)]
16    #[doc = "Getter for the `unitType` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/unitType)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
21    pub fn unit_type(this: &SvgLength) -> u16;
22    # [wasm_bindgen (structural , catch , method , getter , js_class = "SVGLength" , js_name = value)]
23    #[doc = "Getter for the `value` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/value)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
28    pub fn value(this: &SvgLength) -> Result<f32, JsValue>;
29    # [wasm_bindgen (structural , catch , method , setter , js_class = "SVGLength" , js_name = value)]
30    #[doc = "Setter for the `value` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/value)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
35    pub fn set_value(this: &SvgLength, value: f32) -> Result<(), JsValue>;
36    # [wasm_bindgen (structural , method , getter , js_class = "SVGLength" , js_name = valueInSpecifiedUnits)]
37    #[doc = "Getter for the `valueInSpecifiedUnits` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/valueInSpecifiedUnits)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
42    pub fn value_in_specified_units(this: &SvgLength) -> f32;
43    # [wasm_bindgen (structural , method , setter , js_class = "SVGLength" , js_name = valueInSpecifiedUnits)]
44    #[doc = "Setter for the `valueInSpecifiedUnits` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/valueInSpecifiedUnits)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
49    pub fn set_value_in_specified_units(this: &SvgLength, value: f32);
50    # [wasm_bindgen (structural , method , getter , js_class = "SVGLength" , js_name = valueAsString)]
51    #[doc = "Getter for the `valueAsString` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/valueAsString)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
56    pub fn value_as_string(this: &SvgLength) -> ::alloc::string::String;
57    # [wasm_bindgen (structural , method , setter , js_class = "SVGLength" , js_name = valueAsString)]
58    #[doc = "Setter for the `valueAsString` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/valueAsString)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
63    pub fn set_value_as_string(this: &SvgLength, value: &str);
64    # [wasm_bindgen (catch , method , structural , js_class = "SVGLength" , js_name = convertToSpecifiedUnits)]
65    #[doc = "The `convertToSpecifiedUnits()` method."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/convertToSpecifiedUnits)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
70    pub fn convert_to_specified_units(this: &SvgLength, unit_type: u16) -> Result<(), JsValue>;
71    # [wasm_bindgen (catch , method , structural , js_class = "SVGLength" , js_name = newValueSpecifiedUnits)]
72    #[doc = "The `newValueSpecifiedUnits()` method."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGLength/newValueSpecifiedUnits)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
77    pub fn new_value_specified_units(
78        this: &SvgLength,
79        unit_type: u16,
80        value_in_specified_units: f32,
81    ) -> Result<(), JsValue>;
82}
83impl SvgLength {
84    #[doc = "The `SVGLength.SVG_LENGTHTYPE_UNKNOWN` const."]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
87    pub const SVG_LENGTHTYPE_UNKNOWN: u16 = 0i64 as u16;
88    #[doc = "The `SVGLength.SVG_LENGTHTYPE_NUMBER` const."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
91    pub const SVG_LENGTHTYPE_NUMBER: u16 = 1u64 as u16;
92    #[doc = "The `SVGLength.SVG_LENGTHTYPE_PERCENTAGE` const."]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
95    pub const SVG_LENGTHTYPE_PERCENTAGE: u16 = 2u64 as u16;
96    #[doc = "The `SVGLength.SVG_LENGTHTYPE_EMS` const."]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
99    pub const SVG_LENGTHTYPE_EMS: u16 = 3u64 as u16;
100    #[doc = "The `SVGLength.SVG_LENGTHTYPE_EXS` const."]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
103    pub const SVG_LENGTHTYPE_EXS: u16 = 4u64 as u16;
104    #[doc = "The `SVGLength.SVG_LENGTHTYPE_PX` const."]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
107    pub const SVG_LENGTHTYPE_PX: u16 = 5u64 as u16;
108    #[doc = "The `SVGLength.SVG_LENGTHTYPE_CM` const."]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
111    pub const SVG_LENGTHTYPE_CM: u16 = 6u64 as u16;
112    #[doc = "The `SVGLength.SVG_LENGTHTYPE_MM` const."]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
115    pub const SVG_LENGTHTYPE_MM: u16 = 7u64 as u16;
116    #[doc = "The `SVGLength.SVG_LENGTHTYPE_IN` const."]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
119    pub const SVG_LENGTHTYPE_IN: u16 = 8u64 as u16;
120    #[doc = "The `SVGLength.SVG_LENGTHTYPE_PT` const."]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
123    pub const SVG_LENGTHTYPE_PT: u16 = 9u64 as u16;
124    #[doc = "The `SVGLength.SVG_LENGTHTYPE_PC` const."]
125    #[doc = ""]
126    #[doc = "*This API requires the following crate features to be activated: `SvgLength`*"]
127    pub const SVG_LENGTHTYPE_PC: u16 = 10u64 as u16;
128}