diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-11-28 09:20:19 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-01-22 12:50:51 +0100 |
commit | 38abd653774aa0b3c5cdfd9a8b78619605230726 (patch) | |
tree | 00dba009a99dfc5c4e85d3f73dd94da1f2120e69 /src/3rdparty/dbus-ifaces | |
parent | 3c37066062d61a430b8e7f970cccf6effab5a3ef (diff) |
QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possible
Implementing org.kde.StatusNotifier DBus interface
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/
as well as org.canonical.dbusmenu for the limited purpose of showing
the tray icon's context menu. If a desktop environment (such as
KDE or Unity) has a StatusNotifierWatcher listening, then tray icon
information is sent to be displayed by the tray implementation
instead of being rendered directly in an XEmbed window. This is
necessary because some modern tray implementations no longer provide
XEmbed "hosting".
[ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus
protocol when the desktop environment supports it
Task-number: QTBUG-31762
Done-with: Marco Martin <mart@kde.org>
Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Diffstat (limited to 'src/3rdparty/dbus-ifaces')
-rw-r--r-- | src/3rdparty/dbus-ifaces/org.kde.StatusNotifierItem.xml | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/src/3rdparty/dbus-ifaces/org.kde.StatusNotifierItem.xml b/src/3rdparty/dbus-ifaces/org.kde.StatusNotifierItem.xml new file mode 100644 index 0000000000..aeeb42fa87 --- /dev/null +++ b/src/3rdparty/dbus-ifaces/org.kde.StatusNotifierItem.xml @@ -0,0 +1,96 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node> + <interface name="org.kde.StatusNotifierItem"> + + <property name="Category" type="s" access="read"/> + <property name="Id" type="s" access="read"/> + <property name="Title" type="s" access="read"/> + <property name="Status" type="s" access="read"/> + <property name="WindowId" type="i" access="read"/> + + <!-- An additional path to add to the theme search path to find the icons specified above. --> + <property name="IconThemePath" type="s" access="read"/> + <property name="Menu" type="o" access="read"/> + <property name="ItemIsMenu" type="b" access="read"/> + + + <!-- main icon --> + <!-- names are preferred over pixmaps --> + <property name="IconName" type="s" access="read"/> + + <!--struct containing width, height and image data--> + <property name="IconPixmap" type="(iiay)" access="read"> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="QXdgDBusImageVector"/> + </property> + + <property name="OverlayIconName" type="s" access="read"/> + + <property name="OverlayIconPixmap" type="(iiay)" access="read"> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="QXdgDBusImageVector"/> + </property> + + + <!-- Requesting attention icon --> + <property name="AttentionIconName" type="s" access="read"/> + + <!--same definition as image--> + <property name="AttentionIconPixmap" type="(iiay)" access="read"> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="QXdgDBusImageVector"/> + </property> + + <property name="AttentionMovieName" type="s" access="read"/> + + + + <!-- tooltip data --> + + <!--(iiay) is an image--> + <property name="ToolTip" type="(s(iiay)ss)" access="read"> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="QXdgDBusToolTipStruct"/> + </property> + + + <!-- interaction: the systemtray wants the application to do something --> + <method name="ContextMenu"> + <!-- we're passing the coordinates of the icon, so the app knows where to put the popup window --> + <arg name="x" type="i" direction="in"/> + <arg name="y" type="i" direction="in"/> + </method> + + <method name="Activate"> + <arg name="x" type="i" direction="in"/> + <arg name="y" type="i" direction="in"/> + </method> + + <method name="SecondaryActivate"> + <arg name="x" type="i" direction="in"/> + <arg name="y" type="i" direction="in"/> + </method> + + <method name="Scroll"> + <arg name="delta" type="i" direction="in"/> + <arg name="orientation" type="s" direction="in"/> + </method> + + <!-- Signals: the client wants to change something in the status--> + <signal name="NewTitle"> + </signal> + + <signal name="NewIcon"> + </signal> + + <signal name="NewAttentionIcon"> + </signal> + + <signal name="NewOverlayIcon"> + </signal> + + <signal name="NewToolTip"> + </signal> + + <signal name="NewStatus"> + <arg name="status" type="s"/> + </signal> + + </interface> +</node> |