web_sys/features/
gen_DomRect.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "DomRectReadOnly",
9 extends = "::js_sys::Object",
10 js_name = "DOMRect",
11 typescript_type = "DOMRect"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `DomRect` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
19 pub type DomRect;
20 #[wasm_bindgen(method, getter, js_class = "DOMRect", js_name = "x")]
21 #[doc = "Getter for the `x` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/x)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
26 pub fn x(this: &DomRect) -> f64;
27 #[wasm_bindgen(method, setter, js_class = "DOMRect", js_name = "x")]
28 #[doc = "Setter for the `x` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/x)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
33 pub fn set_x(this: &DomRect, value: f64);
34 #[wasm_bindgen(method, getter, js_class = "DOMRect", js_name = "y")]
35 #[doc = "Getter for the `y` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/y)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
40 pub fn y(this: &DomRect) -> f64;
41 #[wasm_bindgen(method, setter, js_class = "DOMRect", js_name = "y")]
42 #[doc = "Setter for the `y` field of this object."]
43 #[doc = ""]
44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/y)"]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
47 pub fn set_y(this: &DomRect, value: f64);
48 #[wasm_bindgen(method, getter, js_class = "DOMRect", js_name = "width")]
49 #[doc = "Getter for the `width` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/width)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
54 pub fn width(this: &DomRect) -> f64;
55 #[wasm_bindgen(method, setter, js_class = "DOMRect", js_name = "width")]
56 #[doc = "Setter for the `width` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/width)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
61 pub fn set_width(this: &DomRect, value: f64);
62 #[wasm_bindgen(method, getter, js_class = "DOMRect", js_name = "height")]
63 #[doc = "Getter for the `height` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/height)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
68 pub fn height(this: &DomRect) -> f64;
69 #[wasm_bindgen(method, setter, js_class = "DOMRect", js_name = "height")]
70 #[doc = "Setter for the `height` field of this object."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/height)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
75 pub fn set_height(this: &DomRect, value: f64);
76 #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
77 #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
82 pub fn new() -> Result<DomRect, JsValue>;
83 #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
84 #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
85 #[doc = ""]
86 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
89 pub fn new_with_x(x: f64) -> Result<DomRect, JsValue>;
90 #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
91 #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
96 pub fn new_with_x_and_y(x: f64, y: f64) -> Result<DomRect, JsValue>;
97 #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
98 #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
103 pub fn new_with_x_and_y_and_width(x: f64, y: f64, width: f64) -> Result<DomRect, JsValue>;
104 #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
105 #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
106 #[doc = ""]
107 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
110 pub fn new_with_x_and_y_and_width_and_height(
111 x: f64,
112 y: f64,
113 width: f64,
114 height: f64,
115 ) -> Result<DomRect, JsValue>;
116}