Q:

Window managers for Windows and Macs

X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions.
Are there any consistent ways for writing such processes for Microsoft Windows or Mac OS/X?
I know that in general these systems are less flexible but I'm looking for something that will use public APIs and not undocumented hacks.

A:

Windows and Mac OS X have built-in "window managers" that cannot be changed.  There are various ways to customize the look and feel of the platform, but you can't really replace the existing window managers.
Application programs use APIs to receive events and interact with the OS.  You can write an application that moves other applications' windows around on screen, but you can't get the level of control you can from X.

A:

I do not know much about OSX, but for for there exists several replacement Window Managers for MS Windows. Since atleast Windows Vista, the default WM is Desktop Window Manager (or DWM).
Here is some I've used back when I was stuck to using Windows:

LiteStep - I used this back when I was 8 (in 1998)
BB4win - I used this when I was in multimedia school and forced to use windows (For Adobe Tools)
SharpE (Now SharpEnviro) - Nice looking, MicroSoft should have used this as default in Vista :)

I would recommend you to grok those source-codes if you want to roll your own MS WIN WM. I do not know how low-level control you can acquire, but replacing the window decoration seems quite possible if you want to do that.

