<!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } A:link { so-language: zxx } -->
在ubuntu中所看到的systray icon目前有兩種,一種就是舊的基於freedesktop system tray spcification的。而新的則是採用dbus實現的,更加簡單和方便。不過目前好像gnome3和ubuntu 的 unity有了不同的標準,具體還未看。如果有詳細需求的同學可以仔細查一下。
以下僅是前陣子簡單看了下新的Status Notify Specification後的總結。
用來取代Freedesktop System tray specification.
通過
d-bus進行進程間通信,這樣可以使gtk,qt的程序可以互相通信。
StatusNotifierItem: 要顯示圖標的應用程序
StatusNotifierWatcher:所有StatusNotifierItem要註冊到Watcher裏
StatusNotifierHost: Host通過Watcher來得到所有Item,並將所有Item展現出來
規範:http://www.notmart.org/misc/statusnotifieritem/index.html
indicator-application-service:
StatusNotifierHost服務的實現
indicator-messages/session/me: StatusNotifierWatcher的實現
其中菜單採用dbusmenu
spec
DBusMenu spec
用dbus來實現一個菜單,主要用於indicator