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.