<p>How to take screenshot programmically of desktop area in Mac OS X ?</p>

Qt includes an example screenshot app in examples\desktop\screenshot. Qt works on a range of platforms, including MacOSX.
http://trolltech.com/products/qt/