CGSInternal
CGSInternal is a collection header files that describe a subset of the private WindowServer functions. It is somewhat aged and has not been updated for Lion.
License
CGSInternal is released under the zlib license.
Caveat Emptor
Everything contained within is undocumented and private. It should be treated as an interesting look into how things work under the hood. It is not intended for use in shipping applications and may break at any time.