Mountain/ApplicationState/DTO/
WindowStateDTO.rs

1//! # WindowStateDTO
2//!
3//! Defines the Data Transfer Object for storing the state of the main
4//! application window.
5
6#![allow(non_snake_case, non_camel_case_types)]
7
8use serde::{Deserialize, Serialize};
9
10/// Holds information about the state of the main application window, such as
11/// whether it is focused or fullscreen, and its current zoom level.
12#[derive(Serialize, Deserialize, Debug, Clone, Default)]
13#[serde(rename_all = "PascalCase")]
14pub struct WindowStateDTO {
15	#[serde(default)]
16	pub IsFocused:bool,
17
18	#[serde(default)]
19	pub IsFullScreen:bool,
20
21	#[serde(default = "DefaultZoomLevel")]
22	pub ZoomLevel:f64,
23}
24
25fn DefaultZoomLevel() -> f64 { 0.0 }