Reputation: 713
In Windows, I can use Shell_NotifyIcon()
. What is the Linux equivalent of this function?
Is it different in GNOME (gtk) and KDE (qt)? Can't find any tutorials on the Internet.
Upvotes: 3
Views: 5597
Reputation: 564771
Yes, it depends on a desktop environment you're using.
In Qt (KDE), you can do this in a cross-platform manner using QSystemTrayIcon
.
There is even a sample application in Qt.
In GTK, you do this with GtkStatusIcon
. There is a sample application in this blog post.
Upvotes: 6
Reputation: 3861
All major desktop support the current XEmbed based systray icon specification. Qt and GTK both provide facilities to use that protocol in comfortable manner. Regardless of your toolkit choice the icons will appear on all desktop environments. If you use Qt you get even compatability with other platforms like Windows for free.
Upvotes: 3
Reputation: 5919
For Gnome, there's this tutorial and the gtkmm toolkit for C++
EDIT: This is for panel applets, you asked for system tray icons. They're similar, but not quite the same. Go with Reed's answer.
Upvotes: 0