ext-idle-notify-v1.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="ext_idle_notify_v1">
  3. <copyright>
  4. Copyright © 2015 Martin Gräßlin
  5. Copyright © 2022 Simon Ser
  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. <interface name="ext_idle_notifier_v1" version="2">
  24. <description summary="idle notification manager">
  25. This interface allows clients to monitor user idle status.
  26. After binding to this global, clients can create ext_idle_notification_v1
  27. objects to get notified when the user is idle for a given amount of time.
  28. </description>
  29. <request name="destroy" type="destructor">
  30. <description summary="destroy the manager">
  31. Destroy the manager object. All objects created via this interface
  32. remain valid.
  33. </description>
  34. </request>
  35. <request name="get_idle_notification">
  36. <description summary="create a notification object">
  37. Create a new idle notification object.
  38. The notification object has a minimum timeout duration and is tied to a
  39. seat. The client will be notified if the seat is inactive for at least
  40. the provided timeout. See ext_idle_notification_v1 for more details.
  41. A zero timeout is valid and means the client wants to be notified as
  42. soon as possible when the seat is inactive.
  43. </description>
  44. <arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
  45. <arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
  46. <arg name="seat" type="object" interface="wl_seat"/>
  47. </request>
  48. <!-- Version 2 additions -->
  49. <request name="get_input_idle_notification" since="2">
  50. <description summary="create a notification object">
  51. Create a new idle notification object to track input from the
  52. user, such as keyboard and mouse movement. Because this object is
  53. meant to track user input alone, it ignores idle inhibitors.
  54. The notification object has a minimum timeout duration and is tied to a
  55. seat. The client will be notified if the seat is inactive for at least
  56. the provided timeout. See ext_idle_notification_v1 for more details.
  57. A zero timeout is valid and means the client wants to be notified as
  58. soon as possible when the seat is inactive.
  59. </description>
  60. <arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
  61. <arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
  62. <arg name="seat" type="object" interface="wl_seat"/>
  63. </request>
  64. </interface>
  65. <interface name="ext_idle_notification_v1" version="2">
  66. <description summary="idle notification">
  67. This interface is used by the compositor to send idle notification events
  68. to clients.
  69. Initially the notification object is not idle. The notification object
  70. becomes idle when no user activity has happened for at least the timeout
  71. duration, starting from the creation of the notification object. User
  72. activity may include input events or a presence sensor, but is
  73. compositor-specific.
  74. How this notification responds to idle inhibitors depends on how
  75. it was constructed. If constructed from the
  76. get_idle_notification request, then if an idle inhibitor is
  77. active (e.g. another client has created a zwp_idle_inhibitor_v1
  78. on a visible surface), the compositor must not make the
  79. notification object idle. However, if constructed from the
  80. get_input_idle_notification request, then idle inhibitors are
  81. ignored, and only input from the user, e.g. from a keyboard or
  82. mouse, counts as activity.
  83. When the notification object becomes idle, an idled event is sent. When
  84. user activity starts again, the notification object stops being idle,
  85. a resumed event is sent and the timeout is restarted.
  86. </description>
  87. <request name="destroy" type="destructor">
  88. <description summary="destroy the notification object">
  89. Destroy the notification object.
  90. </description>
  91. </request>
  92. <event name="idled">
  93. <description summary="notification object is idle">
  94. This event is sent when the notification object becomes idle.
  95. It's a compositor protocol error to send this event twice without a
  96. resumed event in-between.
  97. </description>
  98. </event>
  99. <event name="resumed">
  100. <description summary="notification object is no longer idle">
  101. This event is sent when the notification object stops being idle.
  102. It's a compositor protocol error to send this event twice without an
  103. idled event in-between. It's a compositor protocol error to send this
  104. event prior to any idled event.
  105. </description>
  106. </event>
  107. </interface>
  108. </protocol>