Warning, /libraries/xdg-portal-test-kde/src/org.freedesktop.portal.GlobalShortcuts.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0"?> 0002 <!-- 0003 Copyright (C) 2022 Aleix Pol Gonzalez <aleixpol@kde.org> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Lesser General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Lesser General Public License for more details. 0014 0015 You should have received a copy of the GNU Lesser General Public 0016 License along with this library. If not, see <http://www.gnu.org/licenses/>. 0017 0018 Author: Aleix Pol Gonzalez <aleixpol@kde.org> 0019 --> 0020 0021 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> 0022 <!-- 0023 org.freedesktop.portal.GlobalShortcut: 0024 @short_description: GlobalShortcut portal backend interface 0025 0026 This portal lets applications create global shortcuts sessions, and 0027 register shortcuts to them. These shortcuts are activated regardless of 0028 the focused state of the application window. 0029 0030 To use this portal, applications have to create a session under which its 0031 actions will be collected. Then shortcuts can be bound (see 0032 org.freedesktop.portal.GlobalShortcuts.Bind), and listed (see 0033 org.freedesktop.portal.GlobalShortcuts.ListShortcuts). 0034 0035 All global shortcuts are bound to a session, and all sessions are bound to 0036 the application that created them. 0037 0038 The #org.freedesktop.portal.GlobalShortcuts::Activated and 0039 #org.freedesktop.portal.GlobalShortcuts::Deactivated signals are emitted, 0040 respecitvely, whenever a shortcut is activated and deactivated. 0041 0042 This documentation describes version 1 of this interface. 0043 --> 0044 <interface name="org.freedesktop.portal.GlobalShortcuts"> 0045 <!-- 0046 CreateSession: 0047 @options: Vardict with optional further information 0048 @handle: Object path for the #org.freedesktop.portal.Request object representing this call 0049 0050 Creates a global shortcuts session. 0051 0052 Supported keys in the @options vardict include: 0053 <variablelist> 0054 <varlistentry> 0055 <term>handle_token s</term> 0056 <listitem><para> 0057 A string that will be used as the last element of the @handle. Must be a valid 0058 object path element. See the #org.freedesktop.portal.Request documentation for 0059 more information about the @handle. 0060 </para></listitem> 0061 </varlistentry> 0062 <varlistentry> 0063 <term>session_handle_token s</term> 0064 <listitem><para> 0065 A string that will be used as the last element of the session handle. Must be a valid 0066 object path element. See the #org.freedesktop.portal.Session documentation for 0067 more information about the session handle. 0068 </para></listitem> 0069 </varlistentry> 0070 </variablelist> 0071 0072 The following results get returned via the #org.freedesktop.portal.Request::Response signal: 0073 <variablelist> 0074 <varlistentry> 0075 <term>session_handle o</term> 0076 <listitem><para> 0077 The session handle. An object path for the 0078 #org.freedesktop.portal.Session object representing the created 0079 session. 0080 </para></listitem> 0081 </varlistentry> 0082 </variablelist> 0083 --> 0084 <method name="CreateSession"> 0085 <arg type="a{sv}" name="options" direction="in"/> 0086 <arg type="o" name="handle" direction="out"/> 0087 <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> 0088 </method> 0089 0090 <!-- 0091 BindShortcuts: 0092 @session_handle: Object path for the #org.freedesktop.impl.portal.Session object representing the session 0093 @shortcuts: The list of shortcuts to bind 0094 @parent_window: Identifier for the application window, see <link linkend="parent_window">Common Conventions</link> 0095 @options: Vardict with optional further information 0096 @request_handle: Object path for the #org.freedesktop.portal.Request object representing this call 0097 0098 Bind the shortcuts. This will typically result the portal presenting a 0099 dialog showing the shortcuts and allowing users to configure the shortcuts. 0100 An application can only attempt bind shortcuts of a session once. 0101 0102 Each element of the @shortcuts array is a tuple composed of a shortcut id, 0103 and a vardict with the following keys: 0104 <variablelist> 0105 <varlistentry> 0106 <term>description s</term> 0107 <listitem><para> 0108 User-readable text describing what the shortcut does. 0109 </para></listitem> 0110 </varlistentry> 0111 <varlistentry> 0112 <term>preferred_trigger s</term> 0113 <listitem><para> 0114 The preferred shortcut trigger, defined as described by the "shortcuts" 0115 XDG specification. Optional. 0116 </para></listitem> 0117 </varlistentry> 0118 </variablelist> 0119 0120 Supported keys in the @options vardict include: 0121 <variablelist> 0122 <varlistentry> 0123 <term>handle_token s</term> 0124 <listitem><para> 0125 A string that will be used as the last element of the 0126 @handle. Must be a valid object path element. See the 0127 #org.freedesktop.portal.Request documentation for more 0128 information about the @handle. 0129 </para></listitem> 0130 </varlistentry> 0131 </variablelist> 0132 0133 The following results get returned via the #org.freedesktop.portal.Request::Response signal: 0134 <variablelist> 0135 <varlistentry> 0136 <term>shortcuts a(sa{sv})</term> 0137 <listitem><para> 0138 A list of shortcuts. The list of keys it may contain is described 0139 below, and is different from the @shortcuts variable of this method. 0140 </para></listitem> 0141 </varlistentry> 0142 </variablelist> 0143 0144 Each element of the @shortcuts array returned by the 0145 #org.freedesktop.portal.Request::Response signal is a tuple composed of 0146 a shortcut id, and a vardict with the following keys: 0147 <variablelist> 0148 <varlistentry> 0149 <term>description s</term> 0150 <listitem><para> 0151 User-readable text describing what the shortcut does. 0152 </para></listitem> 0153 </varlistentry> 0154 <varlistentry> 0155 <term>trigger_description s</term> 0156 <listitem><para> 0157 User-readable text describing how to trigger the shortcut for the 0158 client to render. 0159 </para></listitem> 0160 </varlistentry> 0161 </variablelist> 0162 --> 0163 <method name="BindShortcuts"> 0164 <arg type="o" name="session_handle" direction="in"/> 0165 <arg type="a(sa{sv})" name="shortcuts" direction="in"/> 0166 <arg type="s" name="parent_window" direction="in"/> 0167 <arg type="a{sv}" name="options" direction="in"/> 0168 <arg type="o" name="request_handle" direction="out"/> 0169 0170 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList<QPair<QString,QVariantMap>>"/> 0171 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/> 0172 </method> 0173 0174 <!-- 0175 ListShortcuts: 0176 @session_handle: Object path for the #org.freedesktop.impl.portal.Session object representing the session 0177 @options: Vardict with optional further information 0178 0179 Lists all shortcuts. 0180 0181 Supported keys in the @options vardict include: 0182 <variablelist> 0183 <varlistentry> 0184 <term>handle_token s</term> 0185 <listitem><para> 0186 A string that will be used as the last element of the 0187 @handle. Must be a valid object path element. See the 0188 #org.freedesktop.portal.Request documentation for more 0189 information about the @handle. 0190 </para></listitem> 0191 </varlistentry> 0192 </variablelist> 0193 0194 The following results get returned via the #org.freedesktop.portal.Request::Response signal: 0195 <variablelist> 0196 <varlistentry> 0197 <term>shortcuts a(sa{sv})</term> 0198 <listitem><para> 0199 A list of shortcuts. 0200 0201 See the #org.freedesktop.portal.Request::Response signal of the 0202 org.freedesktop.portal.GlobalShortcuts.BindShortcuts() method for 0203 the list of supported properties of shortcuts. 0204 </para></listitem> 0205 </varlistentry> 0206 </variablelist> 0207 --> 0208 <method name="ListShortcuts"> 0209 <arg type="o" name="session_handle" direction="in"/> 0210 <arg type="a{sv}" name="options" direction="in"/> 0211 <arg type="o" name="request_handle" direction="out"/> 0212 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> 0213 </method> 0214 0215 <!-- 0216 Activated: 0217 @session_handle: Session that requested the shortcut 0218 @shortcut_id: the application-provided ID for the notification 0219 @timestamp: The timestamp, as seconds and microseconds since the Unix epoch. 0220 @options: Vardict with optional further information 0221 0222 Notifies about a shortcut becoming active. 0223 --> 0224 <signal name="Activated"> 0225 <arg type="o" name="session_handle" direction="out"/> 0226 <arg type="s" name="shortcut_id" direction="out"/> 0227 <arg type="t" name="timestamp" direction="out"/> 0228 <arg type="a{sv}" name="options" direction="out"/> 0229 <annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/> 0230 </signal> 0231 0232 <!-- 0233 Deactivated: 0234 @session_handle: Session that requested the shortcut 0235 @shortcut_id: the application-provided ID for the notification 0236 @timestamp: The timestamp, as seconds and microseconds since the Unix epoch. 0237 @options: Vardict with optional further information 0238 0239 Notifies that a shortcut is not active anymore. 0240 --> 0241 <signal name="Deactivated"> 0242 <arg type="o" name="session_handle" direction="out"/> 0243 <arg type="s" name="shortcut_id" direction="out"/> 0244 <arg type="t" name="timestamp" direction="out"/> 0245 <arg type="a{sv}" name="options" direction="out"/> 0246 <annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/> 0247 </signal> 0248 0249 <!-- 0250 ShortcutsChanged: 0251 @session_handle: Session that requested the shortcut 0252 @shortcuts: The different shortcuts that have been registered. See org.freedesktop.portal.GlobalShortcuts. 0253 0254 Indicates that the information associated with some of the shortcuts has changed. 0255 0256 See the #org.freedesktop.portal.Request::Response signal of the 0257 org.freedesktop.portal.GlobalShortcuts.BindShortcuts() method for the 0258 list of supported properties of shortcuts. 0259 --> 0260 <signal name="ShortcutsChanged"> 0261 <arg type="o" name="session_handle" direction="out"/> 0262 <arg type="a(sa{sv})" name="shortcuts" direction="out"/> 0263 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QList<QPair<QString,QVariantMap>>"/> 0264 </signal> 0265 0266 <property name="version" type="u" access="read"/> 0267 </interface> 0268 </node>