electron_sys/interface/
auto_resize_options.rs1use wasm_bindgen::prelude::*;
2
3#[wasm_bindgen]
4#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
5pub struct AutoResizeOptions {
6 height: Option<bool>,
7 horizontal: Option<bool>,
8 vertical: Option<bool>,
9 width: Option<bool>,
10}
11
12#[wasm_bindgen]
13impl AutoResizeOptions {
14 #[wasm_bindgen(constructor)]
15 pub fn new(
16 height: Option<bool>,
17 horizontal: Option<bool>,
18 vertical: Option<bool>,
19 width: Option<bool>,
20 ) -> AutoResizeOptions {
21 AutoResizeOptions {
22 height,
23 horizontal,
24 vertical,
25 width,
26 }
27 }
28
29 #[wasm_bindgen(getter)]
30 pub fn height(self) -> Option<bool> {
31 self.height
32 }
33
34 #[wasm_bindgen(setter)]
35 pub fn set_height(mut self, value: Option<bool>) {
36 self.height = value;
37 }
38
39 #[wasm_bindgen(getter)]
40 pub fn horizontal(self) -> Option<bool> {
41 self.height
42 }
43
44 #[wasm_bindgen(setter)]
45 pub fn set_horizontal(mut self, value: Option<bool>) {
46 self.height = value;
47 }
48
49 #[wasm_bindgen(getter)]
50 pub fn vertical(self) -> Option<bool> {
51 self.height
52 }
53
54 #[wasm_bindgen(setter)]
55 pub fn set_vertical(mut self, value: Option<bool>) {
56 self.height = value;
57 }
58
59 #[wasm_bindgen(getter)]
60 pub fn width(self) -> Option<bool> {
61 self.height
62 }
63
64 #[wasm_bindgen(setter)]
65 pub fn set_width(mut self, value: Option<bool>) {
66 self.height = value;
67 }
68}