web_sys/features/
gen_GestureEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 #[wasm_bindgen(
9 extends = "UiEvent",
10 extends = "Event",
11 extends = "::js_sys::Object",
12 js_name = "GestureEvent",
13 typescript_type = "GestureEvent"
14 )]
15 #[derive(Debug, Clone, PartialEq, Eq)]
16 #[doc = "The `GestureEvent` class."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 pub type GestureEvent;
25 #[cfg(web_sys_unstable_apis)]
26 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "scale")]
27 #[doc = "Getter for the `scale` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/scale)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 pub fn scale(this: &GestureEvent) -> f32;
36 #[cfg(web_sys_unstable_apis)]
37 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "rotation")]
38 #[doc = "Getter for the `rotation` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/rotation)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
43 #[doc = ""]
44 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
45 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 pub fn rotation(this: &GestureEvent) -> f32;
47 #[cfg(web_sys_unstable_apis)]
48 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "ctrlKey")]
49 #[doc = "Getter for the `ctrlKey` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/ctrlKey)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
54 #[doc = ""]
55 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
57 pub fn ctrl_key(this: &GestureEvent) -> bool;
58 #[cfg(web_sys_unstable_apis)]
59 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "shiftKey")]
60 #[doc = "Getter for the `shiftKey` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/shiftKey)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
65 #[doc = ""]
66 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
67 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
68 pub fn shift_key(this: &GestureEvent) -> bool;
69 #[cfg(web_sys_unstable_apis)]
70 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "altKey")]
71 #[doc = "Getter for the `altKey` field of this object."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/altKey)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
76 #[doc = ""]
77 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79 pub fn alt_key(this: &GestureEvent) -> bool;
80 #[cfg(web_sys_unstable_apis)]
81 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "metaKey")]
82 #[doc = "Getter for the `metaKey` field of this object."]
83 #[doc = ""]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/metaKey)"]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
87 #[doc = ""]
88 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
89 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
90 pub fn meta_key(this: &GestureEvent) -> bool;
91 #[cfg(web_sys_unstable_apis)]
92 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "clientX")]
93 #[doc = "Getter for the `clientX` field of this object."]
94 #[doc = ""]
95 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/clientX)"]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 pub fn client_x(this: &GestureEvent) -> i32;
102 #[cfg(web_sys_unstable_apis)]
103 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "clientY")]
104 #[doc = "Getter for the `clientY` field of this object."]
105 #[doc = ""]
106 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/clientY)"]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
109 #[doc = ""]
110 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
111 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
112 pub fn client_y(this: &GestureEvent) -> i32;
113 #[cfg(web_sys_unstable_apis)]
114 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "screenX")]
115 #[doc = "Getter for the `screenX` field of this object."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/screenX)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
120 #[doc = ""]
121 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
122 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
123 pub fn screen_x(this: &GestureEvent) -> i32;
124 #[cfg(web_sys_unstable_apis)]
125 #[wasm_bindgen(method, getter, js_class = "GestureEvent", js_name = "screenY")]
126 #[doc = "Getter for the `screenY` field of this object."]
127 #[doc = ""]
128 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/screenY)"]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `GestureEvent`*"]
131 #[doc = ""]
132 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
133 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
134 pub fn screen_y(this: &GestureEvent) -> i32;
135 #[cfg(web_sys_unstable_apis)]
136 #[cfg(all(feature = "EventTarget", feature = "Window",))]
137 #[wasm_bindgen(method, js_class = "GestureEvent", js_name = "initGestureEvent")]
138 #[doc = "The `initGestureEvent()` method."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent/initGestureEvent)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `GestureEvent`, `Window`*"]
143 #[doc = ""]
144 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
145 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
146 pub fn init_gesture_event(
147 this: &GestureEvent,
148 type_: &str,
149 can_bubble: bool,
150 cancelable: bool,
151 view: Option<&Window>,
152 detail: i32,
153 screen_x: i32,
154 screen_y: i32,
155 client_x: i32,
156 client_y: i32,
157 ctrl_key: bool,
158 alt_key: bool,
159 shift_key: bool,
160 meta_key: bool,
161 target: Option<&EventTarget>,
162 scale: f32,
163 rotation: f32,
164 );
165}