x-win 5.8.0

This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use x_win::{get_active_window, get_window_icon};

fn main() {
  match get_active_window() {
    Ok(active_window) => match get_window_icon(&active_window) {
      Ok(icon_info) => {
        println!("icon info: {:#?}", icon_info);
      }
      Err(_) => {
        println!("error occurred while getting the icon info of active window");
      }
    },
    Err(_) => {
      println!("error occurred while getting the active window");
    }
  }
}