Nothing much to describe than the question itself. Still to add more to it, is there a framework or even a language itself to create such applications across various Operating systems ?? Like, do once deploy everywhere !!
Pidgin is written in C. If you're careful, you can write C applications that will compile on various operating systems. One can write instant messaging clients like those programs in lots of languages. It's even possible to make them as web applications written in PHP or so. Read up on socket communications and Internet protocols.
I suggest you use java (the swing package to be specific). It's really easy to program and works on most operating systems flawlessly.