monitor.rs 719 B

12345678910111213141516171819
  1. // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. use super::window::dpi::{PhysicalPosition, PhysicalSize};
  5. /// Monitor descriptor.
  6. #[derive(Debug, Clone)]
  7. pub struct Monitor {
  8. /// A human-readable name of the monitor.
  9. /// `None` if the monitor doesn't exist anymore.
  10. pub name: Option<String>,
  11. /// The monitor's resolution.
  12. pub size: PhysicalSize<u32>,
  13. /// The top-left corner position of the monitor relative to the larger full screen area.
  14. pub position: PhysicalPosition<i32>,
  15. /// Returns the scale factor that can be used to map logical pixels to physical pixels, and vice versa.
  16. pub scale_factor: f64,
  17. }