maxcountryman_web_sys/features/
gen_SvgTextContentElement.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = SvgGraphicsElement , extends = SvgElement , extends = Element , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = SVGTextContentElement , typescript_type = "SVGTextContentElement")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `SvgTextContentElement` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
13    pub type SvgTextContentElement;
14    #[cfg(feature = "SvgAnimatedLength")]
15    # [wasm_bindgen (structural , method , getter , js_class = "SVGTextContentElement" , js_name = textLength)]
16    #[doc = "Getter for the `textLength` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/textLength)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedLength`, `SvgTextContentElement`*"]
21    pub fn text_length(this: &SvgTextContentElement) -> SvgAnimatedLength;
22    #[cfg(feature = "SvgAnimatedEnumeration")]
23    # [wasm_bindgen (structural , method , getter , js_class = "SVGTextContentElement" , js_name = lengthAdjust)]
24    #[doc = "Getter for the `lengthAdjust` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/lengthAdjust)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedEnumeration`, `SvgTextContentElement`*"]
29    pub fn length_adjust(this: &SvgTextContentElement) -> SvgAnimatedEnumeration;
30    #[cfg(feature = "SvgPoint")]
31    # [wasm_bindgen (method , structural , js_class = "SVGTextContentElement" , js_name = getCharNumAtPosition)]
32    #[doc = "The `getCharNumAtPosition()` method."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getCharNumAtPosition)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `SvgPoint`, `SvgTextContentElement`*"]
37    pub fn get_char_num_at_position(this: &SvgTextContentElement, point: &SvgPoint) -> i32;
38    # [wasm_bindgen (method , structural , js_class = "SVGTextContentElement" , js_name = getComputedTextLength)]
39    #[doc = "The `getComputedTextLength()` method."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getComputedTextLength)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
44    pub fn get_computed_text_length(this: &SvgTextContentElement) -> f32;
45    #[cfg(feature = "SvgPoint")]
46    # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getEndPositionOfChar)]
47    #[doc = "The `getEndPositionOfChar()` method."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getEndPositionOfChar)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `SvgPoint`, `SvgTextContentElement`*"]
52    pub fn get_end_position_of_char(
53        this: &SvgTextContentElement,
54        charnum: u32,
55    ) -> Result<SvgPoint, JsValue>;
56    #[cfg(feature = "SvgRect")]
57    # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getExtentOfChar)]
58    #[doc = "The `getExtentOfChar()` method."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getExtentOfChar)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `SvgRect`, `SvgTextContentElement`*"]
63    pub fn get_extent_of_char(
64        this: &SvgTextContentElement,
65        charnum: u32,
66    ) -> Result<SvgRect, JsValue>;
67    # [wasm_bindgen (method , structural , js_class = "SVGTextContentElement" , js_name = getNumberOfChars)]
68    #[doc = "The `getNumberOfChars()` method."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getNumberOfChars)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
73    pub fn get_number_of_chars(this: &SvgTextContentElement) -> i32;
74    # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getRotationOfChar)]
75    #[doc = "The `getRotationOfChar()` method."]
76    #[doc = ""]
77    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getRotationOfChar)"]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
80    pub fn get_rotation_of_char(this: &SvgTextContentElement, charnum: u32)
81        -> Result<f32, JsValue>;
82    #[cfg(feature = "SvgPoint")]
83    # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getStartPositionOfChar)]
84    #[doc = "The `getStartPositionOfChar()` method."]
85    #[doc = ""]
86    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getStartPositionOfChar)"]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `SvgPoint`, `SvgTextContentElement`*"]
89    pub fn get_start_position_of_char(
90        this: &SvgTextContentElement,
91        charnum: u32,
92    ) -> Result<SvgPoint, JsValue>;
93    # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getSubStringLength)]
94    #[doc = "The `getSubStringLength()` method."]
95    #[doc = ""]
96    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getSubStringLength)"]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
99    pub fn get_sub_string_length(
100        this: &SvgTextContentElement,
101        charnum: u32,
102        nchars: u32,
103    ) -> Result<f32, JsValue>;
104    # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = selectSubString)]
105    #[doc = "The `selectSubString()` method."]
106    #[doc = ""]
107    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/selectSubString)"]
108    #[doc = ""]
109    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
110    pub fn select_sub_string(
111        this: &SvgTextContentElement,
112        charnum: u32,
113        nchars: u32,
114    ) -> Result<(), JsValue>;
115}
116impl SvgTextContentElement {
117    #[doc = "The `SVGTextContentElement.LENGTHADJUST_UNKNOWN` const."]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
120    pub const LENGTHADJUST_UNKNOWN: u16 = 0i64 as u16;
121    #[doc = "The `SVGTextContentElement.LENGTHADJUST_SPACING` const."]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
124    pub const LENGTHADJUST_SPACING: u16 = 1u64 as u16;
125    #[doc = "The `SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS` const."]
126    #[doc = ""]
127    #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
128    pub const LENGTHADJUST_SPACINGANDGLYPHS: u16 = 2u64 as u16;
129}