web_sys/features/
gen_PointerEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "MouseEvent",
9 extends = "UiEvent",
10 extends = "Event",
11 extends = "::js_sys::Object",
12 js_name = "PointerEvent",
13 typescript_type = "PointerEvent"
14 )]
15 #[derive(Debug, Clone, PartialEq, Eq)]
16 #[doc = "The `PointerEvent` class."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
21 pub type PointerEvent;
22 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "pointerId")]
23 #[doc = "Getter for the `pointerId` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
28 pub fn pointer_id(this: &PointerEvent) -> i32;
29 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "width")]
30 #[doc = "Getter for the `width` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
35 pub fn width(this: &PointerEvent) -> i32;
36 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "height")]
37 #[doc = "Getter for the `height` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
42 pub fn height(this: &PointerEvent) -> i32;
43 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "pressure")]
44 #[doc = "Getter for the `pressure` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
49 pub fn pressure(this: &PointerEvent) -> f32;
50 #[wasm_bindgen(
51 method,
52 getter,
53 js_class = "PointerEvent",
54 js_name = "tangentialPressure"
55 )]
56 #[doc = "Getter for the `tangentialPressure` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tangentialPressure)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
61 pub fn tangential_pressure(this: &PointerEvent) -> f32;
62 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "tiltX")]
63 #[doc = "Getter for the `tiltX` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
68 pub fn tilt_x(this: &PointerEvent) -> i32;
69 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "tiltY")]
70 #[doc = "Getter for the `tiltY` field of this object."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
75 pub fn tilt_y(this: &PointerEvent) -> i32;
76 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "twist")]
77 #[doc = "Getter for the `twist` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/twist)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
82 pub fn twist(this: &PointerEvent) -> i32;
83 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "pointerType")]
84 #[doc = "Getter for the `pointerType` field of this object."]
85 #[doc = ""]
86 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType)"]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
89 pub fn pointer_type(this: &PointerEvent) -> ::alloc::string::String;
90 #[wasm_bindgen(method, getter, js_class = "PointerEvent", js_name = "isPrimary")]
91 #[doc = "Getter for the `isPrimary` field of this object."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
96 pub fn is_primary(this: &PointerEvent) -> bool;
97 #[wasm_bindgen(catch, constructor, js_class = "PointerEvent")]
98 #[doc = "The `new PointerEvent(..)` constructor, creating a new instance of `PointerEvent`."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
103 pub fn new(type_: &str) -> Result<PointerEvent, JsValue>;
104 #[cfg(feature = "PointerEventInit")]
105 #[wasm_bindgen(catch, constructor, js_class = "PointerEvent")]
106 #[doc = "The `new PointerEvent(..)` constructor, creating a new instance of `PointerEvent`."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`, `PointerEventInit`*"]
111 pub fn new_with_event_init_dict(
112 type_: &str,
113 event_init_dict: &PointerEventInit,
114 ) -> Result<PointerEvent, JsValue>;
115 #[wasm_bindgen(method, js_class = "PointerEvent", js_name = "getCoalescedEvents")]
116 #[doc = "The `getCoalescedEvents()` method."]
117 #[doc = ""]
118 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents)"]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `PointerEvent`*"]
121 pub fn get_coalesced_events(this: &PointerEvent) -> ::js_sys::Array;
122}