web_sys/features/
gen_UiEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = UIEvent , typescript_type = "UIEvent")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `UiEvent` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
14    pub type UiEvent;
15    #[cfg(feature = "Window")]
16    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = view)]
17    #[doc = "Getter for the `view` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/view)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `Window`*"]
22    pub fn view(this: &UiEvent) -> Option<Window>;
23    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = detail)]
24    #[doc = "Getter for the `detail` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
29    pub fn detail(this: &UiEvent) -> i32;
30    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = layerX)]
31    #[doc = "Getter for the `layerX` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/layerX)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
36    pub fn layer_x(this: &UiEvent) -> i32;
37    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = layerY)]
38    #[doc = "Getter for the `layerY` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/layerY)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
43    pub fn layer_y(this: &UiEvent) -> i32;
44    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = pageX)]
45    #[doc = "Getter for the `pageX` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/pageX)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
50    pub fn page_x(this: &UiEvent) -> i32;
51    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = pageY)]
52    #[doc = "Getter for the `pageY` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/pageY)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
57    pub fn page_y(this: &UiEvent) -> i32;
58    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = which)]
59    #[doc = "Getter for the `which` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/which)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
64    pub fn which(this: &UiEvent) -> u32;
65    #[cfg(feature = "Node")]
66    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = rangeParent)]
67    #[doc = "Getter for the `rangeParent` field of this object."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/rangeParent)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `Node`, `UiEvent`*"]
72    pub fn range_parent(this: &UiEvent) -> Option<Node>;
73    # [wasm_bindgen (structural , method , getter , js_class = "UIEvent" , js_name = rangeOffset)]
74    #[doc = "Getter for the `rangeOffset` field of this object."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/rangeOffset)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
79    pub fn range_offset(this: &UiEvent) -> i32;
80    #[wasm_bindgen(catch, constructor, js_class = "UIEvent")]
81    #[doc = "The `new UiEvent(..)` constructor, creating a new instance of `UiEvent`."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/UIEvent)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
86    pub fn new(type_: &str) -> Result<UiEvent, JsValue>;
87    #[cfg(feature = "UiEventInit")]
88    #[wasm_bindgen(catch, constructor, js_class = "UIEvent")]
89    #[doc = "The `new UiEvent(..)` constructor, creating a new instance of `UiEvent`."]
90    #[doc = ""]
91    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/UIEvent)"]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `UiEventInit`*"]
94    pub fn new_with_event_init_dict(
95        type_: &str,
96        event_init_dict: &UiEventInit,
97    ) -> Result<UiEvent, JsValue>;
98    # [wasm_bindgen (method , structural , js_class = "UIEvent" , js_name = initUIEvent)]
99    #[doc = "The `initUIEvent()` method."]
100    #[doc = ""]
101    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
104    pub fn init_ui_event(this: &UiEvent, a_type: &str);
105    # [wasm_bindgen (method , structural , js_class = "UIEvent" , js_name = initUIEvent)]
106    #[doc = "The `initUIEvent()` method."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
111    pub fn init_ui_event_with_a_can_bubble(this: &UiEvent, a_type: &str, a_can_bubble: bool);
112    # [wasm_bindgen (method , structural , js_class = "UIEvent" , js_name = initUIEvent)]
113    #[doc = "The `initUIEvent()` method."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
118    pub fn init_ui_event_with_a_can_bubble_and_a_cancelable(
119        this: &UiEvent,
120        a_type: &str,
121        a_can_bubble: bool,
122        a_cancelable: bool,
123    );
124    #[cfg(feature = "Window")]
125    # [wasm_bindgen (method , structural , js_class = "UIEvent" , js_name = initUIEvent)]
126    #[doc = "The `initUIEvent()` method."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `Window`*"]
131    pub fn init_ui_event_with_a_can_bubble_and_a_cancelable_and_a_view(
132        this: &UiEvent,
133        a_type: &str,
134        a_can_bubble: bool,
135        a_cancelable: bool,
136        a_view: Option<&Window>,
137    );
138    #[cfg(feature = "Window")]
139    # [wasm_bindgen (method , structural , js_class = "UIEvent" , js_name = initUIEvent)]
140    #[doc = "The `initUIEvent()` method."]
141    #[doc = ""]
142    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
143    #[doc = ""]
144    #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `Window`*"]
145    pub fn init_ui_event_with_a_can_bubble_and_a_cancelable_and_a_view_and_a_detail(
146        this: &UiEvent,
147        a_type: &str,
148        a_can_bubble: bool,
149        a_cancelable: bool,
150        a_view: Option<&Window>,
151        a_detail: i32,
152    );
153}
154impl UiEvent {
155    #[doc = "The `UIEvent.SCROLL_PAGE_UP` const."]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
158    pub const SCROLL_PAGE_UP: i32 = -32768i64 as i32;
159    #[doc = "The `UIEvent.SCROLL_PAGE_DOWN` const."]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
162    pub const SCROLL_PAGE_DOWN: i32 = 32768u64 as i32;
163}