openloaf-rdev 0.5.1

OpenLoaf fork of rdev — listen and send keyboard / mouse events on Windows, Linux and MacOS. Adds macOS event tap auto re-enable on kCGEventTapDisabledByTimeout / ByUserInput so a temporarily disabled tap doesn't silently drop the next batch of key events.
Documentation
1
2
3
4
5
6
7
use crate::linux::common::Display;
use crate::rdev::DisplayError;

pub fn display_size() -> Result<(u64, u64), DisplayError> {
    let display = Display::new().ok_or(DisplayError::NoDisplay)?;
    display.get_size().ok_or(DisplayError::NoDisplay)
}