wintrack-1.0.0 has been yanked.
Visit the last successful build:
wintrack-1.0.1
Wintrack
A library for monitoring window related events on Windows.
View API reference on docs.rs, and the crate page on crates.io.
Features
- Listen for various window related events
- Foreground (active) window changed
- Window title or name changed
- Window became visible (unminimized / moved onscreen)
- Window became hidden (minimized / moved offscreen)
- New window was created
- Window was destroyed or closed
- Window was moved or resized
- Define callback that will be called when event is received
- Callback includes snapshot of window's state at time of event
- snapshot has title, rect, executable, etc.
- Safe wrapper over Win32 API & robust error handling
Demo
Using a channel to receive messages:
use mpsc;
use WindowEventKind;
try_hook.expect;
let = channel;
set_callback;
while let Ok = rx.recv