1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug)]
4pub struct MsgTemplate {
5 pub method: String,
6 #[serde(skip_serializing_if = "Option::is_none")]
7 pub data: Option<serde_json::Value>,
8}
9
10#[derive(Serialize, Deserialize, Debug)]
11pub struct InputDevice {
12 pub id: i64,
13 #[serde(rename = "name")]
14 pub name: String,
15 #[serde(rename = "type")]
16 pub type_field: String,
17}
18
19#[derive(Serialize, Deserialize, Debug)]
20pub struct OptionValueResponse {
21 pub default: String,
22 pub result: String,
23 pub value: String,
24}
25
26#[derive(Serialize, Deserialize, Debug)]
27pub struct WayfireConfiguration {
28 #[serde(rename = "api-version")]
29 pub api_version: u32,
30 #[serde(rename = "build-branch")]
31 pub build_branch: String,
32 #[serde(rename = "build-commit")]
33 pub build_commit: String,
34 #[serde(rename = "plugin-path")]
35 pub plugin_path: String,
36 #[serde(rename = "plugin-xml-dir")]
37 pub plugin_xml_dir: String,
38 #[serde(rename = "xwayland-support")]
39 pub xwayland_support: u32,
40}
41
42#[derive(Serialize, Deserialize, Debug)]
43pub struct View {
44 pub activated: bool,
45 #[serde(rename = "app-id")]
46 pub app_id: String,
47 #[serde(rename = "base-geometry")]
48 pub base_geometry: Geometry,
49 pub bbox: Geometry,
50 pub focusable: bool,
51 pub fullscreen: bool,
52 pub geometry: Geometry,
53 pub id: i64,
54 #[serde(rename = "last-focus-timestamp")]
55 pub last_focus_timestamp: i64,
56 pub layer: String,
57 pub mapped: bool,
58 #[serde(rename = "max-size")]
59 pub max_size: Size,
60 #[serde(rename = "min-size")]
61 pub min_size: Size,
62 pub minimized: bool,
63 #[serde(rename = "output-id")]
64 pub output_id: i64,
65 #[serde(rename = "output-name")]
66 pub output_name: String,
67 pub parent: i64,
68 pub pid: i64,
69 pub role: String,
70 pub sticky: bool,
71 #[serde(rename = "tiled-edges")]
72 pub tiled_edges: i64,
73 pub title: String,
74 #[serde(rename = "type")]
75 pub type_field: String,
76 #[serde(rename = "wset-index")]
77 pub wset_index: u128,
78}
79
80#[derive(Serialize, Deserialize, Debug)]
81pub struct ViewAlpha {
82 pub alpha: f64,
83}
84
85#[derive(Debug, Serialize, Deserialize)]
86pub struct Layout {
87 pub geometry: Geometry,
88 pub percent: f64,
89 #[serde(rename = "vertical-split")]
90 pub vertical_split: Vec<Layout>,
91}
92
93#[derive(Serialize, Deserialize, Debug)]
94pub struct Geometry {
95 pub height: i64,
96 pub width: i64,
97 pub x: i64,
98 pub y: i64,
99}
100
101#[derive(Serialize, Deserialize, Debug)]
102pub struct WSGeometry {
103 pub grid_width: i64,
104 pub grid_height: i64,
105 pub x: i64,
106 pub y: i64,
107}
108
109#[derive(Serialize, Deserialize, Debug)]
110pub struct Size {
111 pub height: i64,
112 pub width: i64,
113}
114
115#[derive(Serialize, Deserialize, Debug)]
116pub struct TargetWorkspace {
117 pub workspace: Workspace,
118 pub workspace_set: Option<WorkspaceSet>,
119}
120
121#[derive(Serialize, Deserialize, Debug)]
122pub struct Output {
123 pub geometry: Geometry,
124 pub id: i64,
125 pub name: String,
126 #[serde(rename = "workarea")]
127 pub work_area: Geometry,
128 #[serde(rename = "workspace")]
129 pub workspace: Workspace,
130 #[serde(rename = "wset-index")]
131 pub wset_index: u128,
132}
133
134#[derive(Serialize, Deserialize, Debug, Clone)]
135pub struct Workspace {
136 #[serde(rename = "grid_height")]
137 pub grid_height: i64,
138 #[serde(rename = "grid_width")]
139 pub grid_width: i64,
140 pub x: i64,
141 pub y: i64,
142}
143
144#[derive(Serialize, Deserialize, Debug)]
145pub struct WorkspaceSet {
146 #[serde(rename = "index")]
147 pub index: i64,
148 #[serde(rename = "name")]
149 pub name: String,
150 #[serde(rename = "output-id")]
151 pub output_id: i64,
152 #[serde(rename = "output-name")]
153 pub output_name: String,
154 #[serde(rename = "workspace")]
155 pub workspace: Workspace,
156}