Function rdev::display_size
source · pub fn display_size() -> Result<(u64, u64), DisplayError>
Expand description
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);