web_sys/features/
gen_Screen.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "Screen",
11 typescript_type = "Screen"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `Screen` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
19 pub type Screen;
20 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "availWidth")]
21 #[doc = "Getter for the `availWidth` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/availWidth)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
26 pub fn avail_width(this: &Screen) -> Result<i32, JsValue>;
27 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "availHeight")]
28 #[doc = "Getter for the `availHeight` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/availHeight)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
33 pub fn avail_height(this: &Screen) -> Result<i32, JsValue>;
34 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "width")]
35 #[doc = "Getter for the `width` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/width)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
40 pub fn width(this: &Screen) -> Result<i32, JsValue>;
41 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "height")]
42 #[doc = "Getter for the `height` field of this object."]
43 #[doc = ""]
44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/height)"]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
47 pub fn height(this: &Screen) -> Result<i32, JsValue>;
48 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "colorDepth")]
49 #[doc = "Getter for the `colorDepth` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/colorDepth)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
54 pub fn color_depth(this: &Screen) -> Result<i32, JsValue>;
55 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "pixelDepth")]
56 #[doc = "Getter for the `pixelDepth` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/pixelDepth)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
61 pub fn pixel_depth(this: &Screen) -> Result<i32, JsValue>;
62 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "top")]
63 #[doc = "Getter for the `top` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/top)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
68 pub fn top(this: &Screen) -> Result<i32, JsValue>;
69 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "left")]
70 #[doc = "Getter for the `left` field of this object."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/left)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
75 pub fn left(this: &Screen) -> Result<i32, JsValue>;
76 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "availTop")]
77 #[doc = "Getter for the `availTop` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/availTop)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
82 pub fn avail_top(this: &Screen) -> Result<i32, JsValue>;
83 #[wasm_bindgen(catch, method, getter, js_class = "Screen", js_name = "availLeft")]
84 #[doc = "Getter for the `availLeft` field of this object."]
85 #[doc = ""]
86 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/availLeft)"]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
89 pub fn avail_left(this: &Screen) -> Result<i32, JsValue>;
90 #[cfg(feature = "ScreenOrientation")]
91 #[wasm_bindgen(method, getter, js_class = "Screen", js_name = "orientation")]
92 #[doc = "Getter for the `orientation` field of this object."]
93 #[doc = ""]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation)"]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `Screen`, `ScreenOrientation`*"]
97 pub fn orientation(this: &Screen) -> ScreenOrientation;
98 #[cfg(feature = "ScreenColorGamut")]
99 #[wasm_bindgen(method, getter, js_class = "Screen", js_name = "colorGamut")]
100 #[doc = "Getter for the `colorGamut` field of this object."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/colorGamut)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `Screen`, `ScreenColorGamut`*"]
105 pub fn color_gamut(this: &Screen) -> ScreenColorGamut;
106 #[cfg(feature = "ScreenLuminance")]
107 #[wasm_bindgen(method, getter, js_class = "Screen", js_name = "luminance")]
108 #[doc = "Getter for the `luminance` field of this object."]
109 #[doc = ""]
110 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/luminance)"]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `Screen`, `ScreenLuminance`*"]
113 pub fn luminance(this: &Screen) -> Option<ScreenLuminance>;
114 #[wasm_bindgen(method, getter, js_class = "Screen", js_name = "onchange")]
115 #[doc = "Getter for the `onchange` field of this object."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/onchange)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
120 pub fn onchange(this: &Screen) -> Option<::js_sys::Function>;
121 #[wasm_bindgen(method, setter, js_class = "Screen", js_name = "onchange")]
122 #[doc = "Setter for the `onchange` field of this object."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/onchange)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
127 pub fn set_onchange(this: &Screen, value: Option<&::js_sys::Function>);
128 #[cfg(web_sys_unstable_apis)]
129 #[wasm_bindgen(method, getter, js_class = "Screen", js_name = "isExtended")]
130 #[doc = "Getter for the `isExtended` field of this object."]
131 #[doc = ""]
132 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/isExtended)"]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `Screen`*"]
135 #[doc = ""]
136 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
138 pub fn is_extended(this: &Screen) -> bool;
139}