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
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the "Software"),
9 to deal in the Software without restriction, including without limitation
10 the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 and/or sell copies of the Software, and to permit persons to whom the
12 Software is furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice (including the next
15 paragraph) shall be included in all copies or substantial portions of the
16 Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 DEALINGS IN THE SOFTWARE.
25 </copyright>
26
27 <interface name="ext_idle_notifier_v1" version="2">
28 <description summary="idle notification manager">
29 This interface allows clients to monitor user idle status.
30
31 After binding to this global, clients can create ext_idle_notification_v1
32 objects to get notified when the user is idle for a given amount of time.
33 </description>
34
35 <request name="destroy" type="destructor">
36 <description summary="destroy the manager">
37 Destroy the manager object. All objects created via this interface
38 remain valid.
39 </description>
40 </request>
41
42 <request name="get_idle_notification">
43 <description summary="create a notification object">
44 Create a new idle notification object.
45
46 The notification object has a minimum timeout duration and is tied to a
47 seat. The client will be notified if the seat is inactive for at least
48 the provided timeout. See ext_idle_notification_v1 for more details.
49
50 A zero timeout is valid and means the client wants to be notified as
51 soon as possible when the seat is inactive.
52 </description>
53 <arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
54 <arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
55 <arg name="seat" type="object" interface="wl_seat"/>
56 </request>
57
58 <!-- Version 2 additions -->
59
60 <request name="get_input_idle_notification" since="2">
61 <description summary="create a notification object">
62 Create a new idle notification object to track input from the
63 user, such as keyboard and mouse movement. Because this object is
64 meant to track user input alone, it ignores idle inhibitors.
65
66 The notification object has a minimum timeout duration and is tied to a
67 seat. The client will be notified if the seat is inactive for at least
68 the provided timeout. See ext_idle_notification_v1 for more details.
69
70 A zero timeout is valid and means the client wants to be notified as
71 soon as possible when the seat is inactive.
72 </description>
73 <arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
74 <arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
75 <arg name="seat" type="object" interface="wl_seat"/>
76 </request>
77
78 </interface>
79
80 <interface name="ext_idle_notification_v1" version="2">
81 <description summary="idle notification">
82 This interface is used by the compositor to send idle notification events
83 to clients.
84
85 Initially the notification object is not idle. The notification object
86 becomes idle when no user activity has happened for at least the timeout
87 duration, starting from the creation of the notification object. User
88 activity may include input events or a presence sensor, but is
89 compositor-specific.
90
91 How this notification responds to idle inhibitors depends on how
92 it was constructed. If constructed from the
93 get_idle_notification request, then if an idle inhibitor is
94 active (e.g. another client has created a zwp_idle_inhibitor_v1
95 on a visible surface), the compositor must not make the
96 notification object idle. However, if constructed from the
97 get_input_idle_notification request, then idle inhibitors are
98 ignored, and only input from the user, e.g. from a keyboard or
99 mouse, counts as activity.
100
101 When the notification object becomes idle, an idled event is sent. When
102 user activity starts again, the notification object stops being idle,
103 a resumed event is sent and the timeout is restarted.
104 </description>
105
106 <request name="destroy" type="destructor">
107 <description summary="destroy the notification object">
108 Destroy the notification object.
109 </description>
110 </request>
111
112 <event name="idled">
113 <description summary="notification object is idle">
114 This event is sent when the notification object becomes idle.
115
116 It's a compositor protocol error to send this event twice without a
117 resumed event in-between.
118 </description>
119 </event>
120
121 <event name="resumed">
122 <description summary="notification object is no longer idle">
123 This event is sent when the notification object stops being idle.
124
125 It's a compositor protocol error to send this event twice without an
126 idled event in-between. It's a compositor protocol error to send this
127 event prior to any idled event.
128 </description>
129 </event>
130 </interface>
131</protocol>