Re: Spawn notifications with your program similar to KTorrent or ABRT
You will want to read up on dbus, it's the mechanism by which these messages are shown. Basically your system is (should be) running a dbus daemon, waiting to receive messages from applications, and your application should connect to this system message bus and send it a message.
And as markkuk said, different toolkits have different API's for connecting and sending messages to this system messagebus. I once wrote an application in Qt that did this, part of which I have quickly turned into a small example. Don't ask complicated questions though, it's really been to long for me to remember the details about this, but it works! Just extract, run 'make', and then run the app. (Of course, you'll need gcc-c++ and qt-devel (and possibly others) installed.)
Running F20 x86_64 with KDE
Intel Core i7-4771 @ 3.5GHz