You might try looking at the Accessibility API, but it doesn't necessarily give you that much more than AppleScript when it comes to manipulating other apps. But as far as doing something like Exposé goes, I don't think you're going to have much luck without going really deep into undocumented API. The whole window-shrinking thing is private WindowServer voodoo.