🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
8.1 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="xdg_activation_v1">
  3. <copyright>
  4. Copyright © 2020 Aleix Pol Gonzalez &lt;aleixpol@kde.org&gt;
  5. Copyright © 2020 Carlos Garnacho &lt;carlosg@gnome.org&gt;
  6. Permission is hereby granted, free of charge, to any person obtaining a
  7. copy of this software and associated documentation files (the "Software"),
  8. to deal in the Software without restriction, including without limitation
  9. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. and/or sell copies of the Software, and to permit persons to whom the
  11. Software is furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice (including the next
  13. paragraph) shall be included in all copies or substantial portions of the
  14. Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  18. THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. DEALINGS IN THE SOFTWARE.
  22. </copyright>
  23. <description summary="Protocol for requesting activation of surfaces">
  24. The way for a client to pass focus to another toplevel is as follows.
  25. The client that intends to activate another toplevel uses the
  26. xdg_activation_v1.get_activation_token request to get an activation token.
  27. This token is then passed to the client to be activated through a separate
  28. band of communication. The client to be activated will then pass the token
  29. it received to the xdg_activation_v1.activate request. The compositor can
  30. then use this token to decide how to react to the activation request.
  31. The token the activating client gets may be ineffective either already at
  32. the time it receives it, for example if it was not focused, for focus
  33. stealing prevention. The activating client will have no way to discover
  34. the validity of the token, and may still forward it to the to be activated
  35. client.
  36. The created activation token may optionally get information attached to it
  37. that can be used by the compositor to identify the application that we
  38. intend to activate. This can for example be used to display a visual hint
  39. about what application is being started.
  40. Warning! The protocol described in this file is currently in the testing
  41. phase. Backward compatible changes may be added together with the
  42. corresponding interface version bump. Backward incompatible changes can
  43. only be done by creating a new major version of the extension.
  44. </description>
  45. <interface name="xdg_activation_v1" version="1">
  46. <description summary="interface for activating surfaces">
  47. A global interface used for informing the compositor about applications
  48. being activated or started, or for applications to request to be
  49. activated.
  50. </description>
  51. <request name="destroy" type="destructor">
  52. <description summary="destroy the xdg_activation object">
  53. Notify the compositor that the xdg_activation object will no longer be
  54. used.
  55. The child objects created via this interface are unaffected and should
  56. be destroyed separately.
  57. </description>
  58. </request>
  59. <request name="get_activation_token">
  60. <description summary="requests a token">
  61. Creates an xdg_activation_token_v1 object that will provide
  62. the initiating client with a unique token for this activation. This
  63. token should be offered to the clients to be activated.
  64. </description>
  65. <arg name="id" type="new_id" interface="xdg_activation_token_v1"/>
  66. </request>
  67. <request name="activate">
  68. <description summary="notify new interaction being available">
  69. Requests surface activation. It's up to the compositor to display
  70. this information as desired, for example by placing the surface above
  71. the rest.
  72. The compositor may know who requested this by checking the activation
  73. token and might decide not to follow through with the activation if it's
  74. considered unwanted.
  75. Compositors can ignore unknown presentation tokens when an invalid
  76. token is passed.
  77. </description>
  78. <arg name="token" type="string" summary="the activation token of the initiating client"/>
  79. <arg name="surface" type="object" interface="wl_surface"
  80. summary="the wl_surface to activate"/>
  81. </request>
  82. </interface>
  83. <interface name="xdg_activation_token_v1" version="1">
  84. <description summary="an exported activation handle">
  85. An object for setting up a token and receiving a token handle that can
  86. be passed as an activation token to another client.
  87. The object is created using the xdg_activation_v1.get_activation_token
  88. request. This object should then be populated with the app_id, surface
  89. and serial information and committed. The compositor shall then issue a
  90. done event with the token. In case the request's parameters are invalid,
  91. the compositor will provide an invalid token.
  92. </description>
  93. <enum name="error">
  94. <entry name="already_used" value="0"
  95. summary="The token has already been used previously"/>
  96. </enum>
  97. <request name="set_serial">
  98. <description summary="specifies the seat and serial of the activating event">
  99. Provides information about the seat and serial event that requested the
  100. token.
  101. Must be sent before commit. This information is optional.
  102. </description>
  103. <arg name="serial" type="uint"
  104. summary="the serial of the event that triggered the activation"/>
  105. <arg name="seat" type="object" interface="wl_seat"
  106. summary="the wl_seat of the event"/>
  107. </request>
  108. <request name="set_app_id">
  109. <description summary="specifies the application being activated">
  110. The requesting client can specify an app_id to associate the token
  111. being created with it.
  112. Must be sent before commit. This information is optional.
  113. </description>
  114. <arg name="app_id" type="string"
  115. summary="the application id of the client being activated."/>
  116. </request>
  117. <request name="set_surface">
  118. <description summary="specifies the application being activated">
  119. The requesting client can specify a surface to associate the token
  120. being created with it.
  121. Must be triggered before commit. This information is optional.
  122. </description>
  123. <arg name="surface" type="object" interface="wl_surface"
  124. summary="the requesting surface"/>
  125. </request>
  126. <request name="commit">
  127. <description summary="issues the token request">
  128. Requests an activation token based on the different parameters that
  129. have been offered through set_serial, set_surface and set_app_id.
  130. </description>
  131. </request>
  132. <event name="done">
  133. <description summary="the exported activation token">
  134. The 'done' event contains the unique token of this activation request
  135. and notifies that the provider is done.
  136. Applications will typically receive the token through the
  137. XDG_ACTIVATION_TOKEN environment variable as set by its launcher, and
  138. should unset the environment variable right after this request, in
  139. order to avoid propagating it to child processes.
  140. Applications implementing the D-Bus interface org.freedesktop.Application
  141. should get their token under XDG_ACTIVATION_TOKEN on their platform_data.
  142. Presentation tokens may be transferred across clients through means not
  143. described in this protocol.
  144. </description>
  145. <arg name="token" type="string" summary="the exported activation token"/>
  146. </event>
  147. <request name="destroy" type="destructor">
  148. <description summary="destroy the xdg_activation_token_v1 object">
  149. Notify the compositor that the xdg_activation_token_v1 object will no
  150. longer be used.
  151. </description>
  152. </request>
  153. </interface>
  154. </protocol>