web_sys/features/
gen_EventModifierInit.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 = EventModifierInit)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `EventModifierInit` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
12    pub type EventModifierInit;
13    #[doc = "Get the `bubbles` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
16    #[wasm_bindgen(method, getter = "bubbles")]
17    pub fn get_bubbles(this: &EventModifierInit) -> Option<bool>;
18    #[doc = "Change the `bubbles` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
21    #[wasm_bindgen(method, setter = "bubbles")]
22    pub fn set_bubbles(this: &EventModifierInit, val: bool);
23    #[doc = "Get the `cancelable` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
26    #[wasm_bindgen(method, getter = "cancelable")]
27    pub fn get_cancelable(this: &EventModifierInit) -> Option<bool>;
28    #[doc = "Change the `cancelable` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
31    #[wasm_bindgen(method, setter = "cancelable")]
32    pub fn set_cancelable(this: &EventModifierInit, val: bool);
33    #[doc = "Get the `composed` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
36    #[wasm_bindgen(method, getter = "composed")]
37    pub fn get_composed(this: &EventModifierInit) -> Option<bool>;
38    #[doc = "Change the `composed` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
41    #[wasm_bindgen(method, setter = "composed")]
42    pub fn set_composed(this: &EventModifierInit, val: bool);
43    #[doc = "Get the `detail` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
46    #[wasm_bindgen(method, getter = "detail")]
47    pub fn get_detail(this: &EventModifierInit) -> Option<i32>;
48    #[doc = "Change the `detail` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
51    #[wasm_bindgen(method, setter = "detail")]
52    pub fn set_detail(this: &EventModifierInit, val: i32);
53    #[cfg(feature = "Window")]
54    #[doc = "Get the `view` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"]
57    #[wasm_bindgen(method, getter = "view")]
58    pub fn get_view(this: &EventModifierInit) -> Option<Window>;
59    #[cfg(feature = "Window")]
60    #[doc = "Change the `view` field of this object."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"]
63    #[wasm_bindgen(method, setter = "view")]
64    pub fn set_view(this: &EventModifierInit, val: Option<&Window>);
65    #[doc = "Get the `altKey` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
68    #[wasm_bindgen(method, getter = "altKey")]
69    pub fn get_alt_key(this: &EventModifierInit) -> Option<bool>;
70    #[doc = "Change the `altKey` field of this object."]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
73    #[wasm_bindgen(method, setter = "altKey")]
74    pub fn set_alt_key(this: &EventModifierInit, val: bool);
75    #[doc = "Get the `ctrlKey` field of this object."]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
78    #[wasm_bindgen(method, getter = "ctrlKey")]
79    pub fn get_ctrl_key(this: &EventModifierInit) -> Option<bool>;
80    #[doc = "Change the `ctrlKey` field of this object."]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
83    #[wasm_bindgen(method, setter = "ctrlKey")]
84    pub fn set_ctrl_key(this: &EventModifierInit, val: bool);
85    #[doc = "Get the `metaKey` field of this object."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
88    #[wasm_bindgen(method, getter = "metaKey")]
89    pub fn get_meta_key(this: &EventModifierInit) -> Option<bool>;
90    #[doc = "Change the `metaKey` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
93    #[wasm_bindgen(method, setter = "metaKey")]
94    pub fn set_meta_key(this: &EventModifierInit, val: bool);
95    #[doc = "Get the `modifierAltGraph` field of this object."]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
98    #[wasm_bindgen(method, getter = "modifierAltGraph")]
99    pub fn get_modifier_alt_graph(this: &EventModifierInit) -> Option<bool>;
100    #[doc = "Change the `modifierAltGraph` field of this object."]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
103    #[wasm_bindgen(method, setter = "modifierAltGraph")]
104    pub fn set_modifier_alt_graph(this: &EventModifierInit, val: bool);
105    #[doc = "Get the `modifierCapsLock` field of this object."]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
108    #[wasm_bindgen(method, getter = "modifierCapsLock")]
109    pub fn get_modifier_caps_lock(this: &EventModifierInit) -> Option<bool>;
110    #[doc = "Change the `modifierCapsLock` field of this object."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
113    #[wasm_bindgen(method, setter = "modifierCapsLock")]
114    pub fn set_modifier_caps_lock(this: &EventModifierInit, val: bool);
115    #[doc = "Get the `modifierFn` field of this object."]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
118    #[wasm_bindgen(method, getter = "modifierFn")]
119    pub fn get_modifier_fn(this: &EventModifierInit) -> Option<bool>;
120    #[doc = "Change the `modifierFn` field of this object."]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
123    #[wasm_bindgen(method, setter = "modifierFn")]
124    pub fn set_modifier_fn(this: &EventModifierInit, val: bool);
125    #[doc = "Get the `modifierFnLock` field of this object."]
126    #[doc = ""]
127    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
128    #[wasm_bindgen(method, getter = "modifierFnLock")]
129    pub fn get_modifier_fn_lock(this: &EventModifierInit) -> Option<bool>;
130    #[doc = "Change the `modifierFnLock` field of this object."]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
133    #[wasm_bindgen(method, setter = "modifierFnLock")]
134    pub fn set_modifier_fn_lock(this: &EventModifierInit, val: bool);
135    #[doc = "Get the `modifierNumLock` field of this object."]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
138    #[wasm_bindgen(method, getter = "modifierNumLock")]
139    pub fn get_modifier_num_lock(this: &EventModifierInit) -> Option<bool>;
140    #[doc = "Change the `modifierNumLock` field of this object."]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
143    #[wasm_bindgen(method, setter = "modifierNumLock")]
144    pub fn set_modifier_num_lock(this: &EventModifierInit, val: bool);
145    #[doc = "Get the `modifierOS` field of this object."]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
148    #[wasm_bindgen(method, getter = "modifierOS")]
149    pub fn get_modifier_os(this: &EventModifierInit) -> Option<bool>;
150    #[doc = "Change the `modifierOS` field of this object."]
151    #[doc = ""]
152    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
153    #[wasm_bindgen(method, setter = "modifierOS")]
154    pub fn set_modifier_os(this: &EventModifierInit, val: bool);
155    #[doc = "Get the `modifierScrollLock` field of this object."]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
158    #[wasm_bindgen(method, getter = "modifierScrollLock")]
159    pub fn get_modifier_scroll_lock(this: &EventModifierInit) -> Option<bool>;
160    #[doc = "Change the `modifierScrollLock` field of this object."]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
163    #[wasm_bindgen(method, setter = "modifierScrollLock")]
164    pub fn set_modifier_scroll_lock(this: &EventModifierInit, val: bool);
165    #[doc = "Get the `modifierSymbol` field of this object."]
166    #[doc = ""]
167    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
168    #[wasm_bindgen(method, getter = "modifierSymbol")]
169    pub fn get_modifier_symbol(this: &EventModifierInit) -> Option<bool>;
170    #[doc = "Change the `modifierSymbol` field of this object."]
171    #[doc = ""]
172    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
173    #[wasm_bindgen(method, setter = "modifierSymbol")]
174    pub fn set_modifier_symbol(this: &EventModifierInit, val: bool);
175    #[doc = "Get the `modifierSymbolLock` field of this object."]
176    #[doc = ""]
177    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
178    #[wasm_bindgen(method, getter = "modifierSymbolLock")]
179    pub fn get_modifier_symbol_lock(this: &EventModifierInit) -> Option<bool>;
180    #[doc = "Change the `modifierSymbolLock` field of this object."]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
183    #[wasm_bindgen(method, setter = "modifierSymbolLock")]
184    pub fn set_modifier_symbol_lock(this: &EventModifierInit, val: bool);
185    #[doc = "Get the `shiftKey` field of this object."]
186    #[doc = ""]
187    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
188    #[wasm_bindgen(method, getter = "shiftKey")]
189    pub fn get_shift_key(this: &EventModifierInit) -> Option<bool>;
190    #[doc = "Change the `shiftKey` field of this object."]
191    #[doc = ""]
192    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
193    #[wasm_bindgen(method, setter = "shiftKey")]
194    pub fn set_shift_key(this: &EventModifierInit, val: bool);
195}
196impl EventModifierInit {
197    #[doc = "Construct a new `EventModifierInit`."]
198    #[doc = ""]
199    #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"]
200    pub fn new() -> Self {
201        #[allow(unused_mut)]
202        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
203        ret
204    }
205    #[deprecated = "Use `set_bubbles()` instead."]
206    pub fn bubbles(&mut self, val: bool) -> &mut Self {
207        self.set_bubbles(val);
208        self
209    }
210    #[deprecated = "Use `set_cancelable()` instead."]
211    pub fn cancelable(&mut self, val: bool) -> &mut Self {
212        self.set_cancelable(val);
213        self
214    }
215    #[deprecated = "Use `set_composed()` instead."]
216    pub fn composed(&mut self, val: bool) -> &mut Self {
217        self.set_composed(val);
218        self
219    }
220    #[deprecated = "Use `set_detail()` instead."]
221    pub fn detail(&mut self, val: i32) -> &mut Self {
222        self.set_detail(val);
223        self
224    }
225    #[cfg(feature = "Window")]
226    #[deprecated = "Use `set_view()` instead."]
227    pub fn view(&mut self, val: Option<&Window>) -> &mut Self {
228        self.set_view(val);
229        self
230    }
231    #[deprecated = "Use `set_alt_key()` instead."]
232    pub fn alt_key(&mut self, val: bool) -> &mut Self {
233        self.set_alt_key(val);
234        self
235    }
236    #[deprecated = "Use `set_ctrl_key()` instead."]
237    pub fn ctrl_key(&mut self, val: bool) -> &mut Self {
238        self.set_ctrl_key(val);
239        self
240    }
241    #[deprecated = "Use `set_meta_key()` instead."]
242    pub fn meta_key(&mut self, val: bool) -> &mut Self {
243        self.set_meta_key(val);
244        self
245    }
246    #[deprecated = "Use `set_modifier_alt_graph()` instead."]
247    pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self {
248        self.set_modifier_alt_graph(val);
249        self
250    }
251    #[deprecated = "Use `set_modifier_caps_lock()` instead."]
252    pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self {
253        self.set_modifier_caps_lock(val);
254        self
255    }
256    #[deprecated = "Use `set_modifier_fn()` instead."]
257    pub fn modifier_fn(&mut self, val: bool) -> &mut Self {
258        self.set_modifier_fn(val);
259        self
260    }
261    #[deprecated = "Use `set_modifier_fn_lock()` instead."]
262    pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self {
263        self.set_modifier_fn_lock(val);
264        self
265    }
266    #[deprecated = "Use `set_modifier_num_lock()` instead."]
267    pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self {
268        self.set_modifier_num_lock(val);
269        self
270    }
271    #[deprecated = "Use `set_modifier_os()` instead."]
272    pub fn modifier_os(&mut self, val: bool) -> &mut Self {
273        self.set_modifier_os(val);
274        self
275    }
276    #[deprecated = "Use `set_modifier_scroll_lock()` instead."]
277    pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self {
278        self.set_modifier_scroll_lock(val);
279        self
280    }
281    #[deprecated = "Use `set_modifier_symbol()` instead."]
282    pub fn modifier_symbol(&mut self, val: bool) -> &mut Self {
283        self.set_modifier_symbol(val);
284        self
285    }
286    #[deprecated = "Use `set_modifier_symbol_lock()` instead."]
287    pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self {
288        self.set_modifier_symbol_lock(val);
289        self
290    }
291    #[deprecated = "Use `set_shift_key()` instead."]
292    pub fn shift_key(&mut self, val: bool) -> &mut Self {
293        self.set_shift_key(val);
294        self
295    }
296}
297impl Default for EventModifierInit {
298    fn default() -> Self {
299        Self::new()
300    }
301}