active-win-pos-rs
A small Rust library that lets you get position and size of the active window on Windows, MacOS and Linux
Usage
Add to Cargo.toml:
[]
= "0.5"
Use:
use get_active_window;
Would give you an instance of ActiveWindow struct with unique window id, process id and window position.
Or use active_win_pos_rs::get_position to get the WindowPosition only.
Build
Example
Output:
active window: ActiveWindow {
window_id: "0x70af2",
process_id: 22908,
position: WindowPosition {
x: 1414.0,
y: 135.0,
width: 993.0,
height: 519.0,
},
}