Function rdev::display_size[][src]

pub fn display_size() -> Result<(u64, u64), DisplayError>

Returns the size in pixels of the main screen. This is useful to use with x, y from MouseMove Event.

use rdev::{display_size};

let (w, h) = display_size().unwrap();
println!("My screen size : {:?}x{:?}", w, h);