- Platform-agnostic design
- Event-based API
- Designed to be used by window management software
See the Documentation.
WinMan is a dependency of FancyWM.
Prints added, removed and initially present windows over the course of 10 seconds.
using System;
using WinMan;
using WinMan.Windows;
void TestWinMan()
{
using IWorkspace workspace = new Win32Workspace();
workspace.WindowManaging += (s, e) =>
{
Console.WriteLine($"Window {e.Source} initially present on the workspace!");
};
workspace.WindowAdded += (s, e) =>
{
Console.WriteLine($"Window {e.Source} added to the workspace!");
};
workspace.WindowRemoved += (s, e) =>
{
Console.WriteLine($"Window {e.Source} removed from the workspace!");
};
workspace.Open();
Thread.Sleep(100000);
}
Listens to changes to an empty notepad window.
using System;
using WinMan;
using WinMan.Windows;
void TestWinMan()
{
using IWorkspace workspace = new Win32Workspace();
workspace.Open();
var notepad = workspace.GetSnapshot().First(x => x.Title == "Notepad -- Untitled");
notepad.StateChanged += (s, e) =>
{
Console.WriteLine($"Notepad is now {e.NewState}!");
};
Thread.Sleep(100000);
}