the notification in the screenshot is a chat notification, and it's handled by GNOME Shell directly; chat notifications cannot be implemented outside of the Shell, so you'll either need to patch GNOME Shell or write a Shell extension.
generic notifications (transient or permanent) can be sent from your application by using the libnotify
API: https://git.gnome.org/browse/libnotify
you can also send notifications using the console, through the notify-send
command line utility (which is usually shipped as part of the libnotify package).