I need to get similar information on the current windows and virtual desktops as that provided by the command-line app wmctrl. I s there some (C/C++) API header & lib-files that I can use? Answer Download the source code of wmctrl and study it. If you are making some free software with the same or compatible GPLv2 license you could