electron_sys/module/
native_theme.rs1use js_sys::JsString;
2use node_sys::EventEmitter;
3use wasm_bindgen::prelude::*;
4
5#[wasm_bindgen(module = "electron")]
6extern {
7 #[wasm_bindgen(extends = EventEmitter)]
8 pub type NativeTheme;
9
10 #[wasm_bindgen(js_name = "nativeTheme")]
11 pub static native_theme: NativeTheme;
12
13 #[wasm_bindgen(method, getter, js_name = "shouldUseDarkColors")]
20 pub fn should_use_dark_colors(this: &NativeTheme) -> bool; #[wasm_bindgen(method, getter, js_name = "shouldUseHighContrastColors")]
23 pub fn should_use_high_contrast_colors(this: &NativeTheme) -> bool; #[wasm_bindgen(method, getter, js_name = "shouldUseInvertedColorScheme")]
26 pub fn should_use_inverted_color_scheme(this: &NativeTheme) -> bool; #[wasm_bindgen(method, getter, js_name = "themeSource")]
29 pub fn theme_source(this: &NativeTheme) -> JsString;
30
31 #[wasm_bindgen(method, setter, js_name = "themeSource")]
32 pub fn set_theme_source(this: &NativeTheme, value: JsString);
33}