Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

698 B
Raw Blame
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use wm_platform::Rect;

use super::ContainerDto;

/// User-friendly representation of a monitor.
///
/// Used for IPC and debug logging.
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MonitorDto {
  pub id: Uuid,
  pub parent_id: Option<Uuid>,
  pub children: Vec<ContainerDto>,
  pub child_focus_order: Vec<Uuid>,
  pub has_focus: bool,
  pub width: i32,
  pub height: i32,
  pub x: i32,
  pub y: i32,
  pub dpi: u32,
  pub scale_factor: f32,
  pub handle: Option<isize>,
  pub device_name: String,
  pub device_path: Option<String>,
  pub hardware_id: Option<String>,
  pub working_rect: Rect,
}