window-getter 0.1.2

The library for retrieving information about the windows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(not(target_os = "windows"))]
fn main() {
    panic!("This example only supports windows.");
}

#[cfg(target_os = "windows")]
fn main() {
    for window in window_getter::get_windows().unwrap() {
        let window = window.into_platform_window();

        println!("\n{:?} ({:?})", window.title(), window.hwnd());
        println!("\tGetWindowRect: {:?}", window.rect());
        println!(
            "\tDwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS: {:?}",
            window.extended_frame_bounds()
        );
    }
}