views:

194

answers:

2

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: 

I don't know about about OSX, but the Windows API has functions like GetWindowPlacement, GetwindowRect, SetWindowRect, SetWindowPlacement, etc. Look them up on MSDN.

Jimmy
+3  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.

Kristopher Johnson