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