web_sys/features/
gen_TouchInit.rs1#![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 = TouchInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TouchInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
12 pub type TouchInit;
13 #[doc = "Get the `clientX` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
16 #[wasm_bindgen(method, getter = "clientX")]
17 pub fn get_client_x(this: &TouchInit) -> Option<i32>;
18 #[doc = "Change the `clientX` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
21 #[wasm_bindgen(method, setter = "clientX")]
22 pub fn set_client_x(this: &TouchInit, val: i32);
23 #[doc = "Get the `clientY` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
26 #[wasm_bindgen(method, getter = "clientY")]
27 pub fn get_client_y(this: &TouchInit) -> Option<i32>;
28 #[doc = "Change the `clientY` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
31 #[wasm_bindgen(method, setter = "clientY")]
32 pub fn set_client_y(this: &TouchInit, val: i32);
33 #[doc = "Get the `force` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
36 #[wasm_bindgen(method, getter = "force")]
37 pub fn get_force(this: &TouchInit) -> Option<f32>;
38 #[doc = "Change the `force` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
41 #[wasm_bindgen(method, setter = "force")]
42 pub fn set_force(this: &TouchInit, val: f32);
43 #[doc = "Get the `identifier` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
46 #[wasm_bindgen(method, getter = "identifier")]
47 pub fn get_identifier(this: &TouchInit) -> i32;
48 #[doc = "Change the `identifier` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
51 #[wasm_bindgen(method, setter = "identifier")]
52 pub fn set_identifier(this: &TouchInit, val: i32);
53 #[doc = "Get the `pageX` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
56 #[wasm_bindgen(method, getter = "pageX")]
57 pub fn get_page_x(this: &TouchInit) -> Option<i32>;
58 #[doc = "Change the `pageX` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
61 #[wasm_bindgen(method, setter = "pageX")]
62 pub fn set_page_x(this: &TouchInit, val: i32);
63 #[doc = "Get the `pageY` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
66 #[wasm_bindgen(method, getter = "pageY")]
67 pub fn get_page_y(this: &TouchInit) -> Option<i32>;
68 #[doc = "Change the `pageY` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
71 #[wasm_bindgen(method, setter = "pageY")]
72 pub fn set_page_y(this: &TouchInit, val: i32);
73 #[doc = "Get the `radiusX` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
76 #[wasm_bindgen(method, getter = "radiusX")]
77 pub fn get_radius_x(this: &TouchInit) -> Option<f32>;
78 #[doc = "Change the `radiusX` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
81 #[wasm_bindgen(method, setter = "radiusX")]
82 pub fn set_radius_x(this: &TouchInit, val: f32);
83 #[doc = "Get the `radiusY` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
86 #[wasm_bindgen(method, getter = "radiusY")]
87 pub fn get_radius_y(this: &TouchInit) -> Option<f32>;
88 #[doc = "Change the `radiusY` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
91 #[wasm_bindgen(method, setter = "radiusY")]
92 pub fn set_radius_y(this: &TouchInit, val: f32);
93 #[doc = "Get the `rotationAngle` field of this object."]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
96 #[wasm_bindgen(method, getter = "rotationAngle")]
97 pub fn get_rotation_angle(this: &TouchInit) -> Option<f32>;
98 #[doc = "Change the `rotationAngle` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
101 #[wasm_bindgen(method, setter = "rotationAngle")]
102 pub fn set_rotation_angle(this: &TouchInit, val: f32);
103 #[doc = "Get the `screenX` field of this object."]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
106 #[wasm_bindgen(method, getter = "screenX")]
107 pub fn get_screen_x(this: &TouchInit) -> Option<i32>;
108 #[doc = "Change the `screenX` field of this object."]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
111 #[wasm_bindgen(method, setter = "screenX")]
112 pub fn set_screen_x(this: &TouchInit, val: i32);
113 #[doc = "Get the `screenY` field of this object."]
114 #[doc = ""]
115 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
116 #[wasm_bindgen(method, getter = "screenY")]
117 pub fn get_screen_y(this: &TouchInit) -> Option<i32>;
118 #[doc = "Change the `screenY` field of this object."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"]
121 #[wasm_bindgen(method, setter = "screenY")]
122 pub fn set_screen_y(this: &TouchInit, val: i32);
123 #[cfg(feature = "EventTarget")]
124 #[doc = "Get the `target` field of this object."]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"]
127 #[wasm_bindgen(method, getter = "target")]
128 pub fn get_target(this: &TouchInit) -> EventTarget;
129 #[cfg(feature = "EventTarget")]
130 #[doc = "Change the `target` field of this object."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"]
133 #[wasm_bindgen(method, setter = "target")]
134 pub fn set_target(this: &TouchInit, val: &EventTarget);
135}
136impl TouchInit {
137 #[cfg(feature = "EventTarget")]
138 #[doc = "Construct a new `TouchInit`."]
139 #[doc = ""]
140 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"]
141 pub fn new(identifier: i32, target: &EventTarget) -> Self {
142 #[allow(unused_mut)]
143 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
144 ret.set_identifier(identifier);
145 ret.set_target(target);
146 ret
147 }
148 #[deprecated = "Use `set_client_x()` instead."]
149 pub fn client_x(&mut self, val: i32) -> &mut Self {
150 self.set_client_x(val);
151 self
152 }
153 #[deprecated = "Use `set_client_y()` instead."]
154 pub fn client_y(&mut self, val: i32) -> &mut Self {
155 self.set_client_y(val);
156 self
157 }
158 #[deprecated = "Use `set_force()` instead."]
159 pub fn force(&mut self, val: f32) -> &mut Self {
160 self.set_force(val);
161 self
162 }
163 #[deprecated = "Use `set_identifier()` instead."]
164 pub fn identifier(&mut self, val: i32) -> &mut Self {
165 self.set_identifier(val);
166 self
167 }
168 #[deprecated = "Use `set_page_x()` instead."]
169 pub fn page_x(&mut self, val: i32) -> &mut Self {
170 self.set_page_x(val);
171 self
172 }
173 #[deprecated = "Use `set_page_y()` instead."]
174 pub fn page_y(&mut self, val: i32) -> &mut Self {
175 self.set_page_y(val);
176 self
177 }
178 #[deprecated = "Use `set_radius_x()` instead."]
179 pub fn radius_x(&mut self, val: f32) -> &mut Self {
180 self.set_radius_x(val);
181 self
182 }
183 #[deprecated = "Use `set_radius_y()` instead."]
184 pub fn radius_y(&mut self, val: f32) -> &mut Self {
185 self.set_radius_y(val);
186 self
187 }
188 #[deprecated = "Use `set_rotation_angle()` instead."]
189 pub fn rotation_angle(&mut self, val: f32) -> &mut Self {
190 self.set_rotation_angle(val);
191 self
192 }
193 #[deprecated = "Use `set_screen_x()` instead."]
194 pub fn screen_x(&mut self, val: i32) -> &mut Self {
195 self.set_screen_x(val);
196 self
197 }
198 #[deprecated = "Use `set_screen_y()` instead."]
199 pub fn screen_y(&mut self, val: i32) -> &mut Self {
200 self.set_screen_y(val);
201 self
202 }
203 #[cfg(feature = "EventTarget")]
204 #[deprecated = "Use `set_target()` instead."]
205 pub fn target(&mut self, val: &EventTarget) -> &mut Self {
206 self.set_target(val);
207 self
208 }
209}