SDL
143 строки · 6.5 Кб
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="keyboard_shortcuts_inhibit_unstable_v1">3
4<copyright>5Copyright © 2017 Red Hat Inc.
6
7Permission is hereby granted, free of charge, to any person obtaining a
8copy of this software and associated documentation files (the "Software"),
9to deal in the Software without restriction, including without limitation
10the rights to use, copy, modify, merge, publish, distribute, sublicense,
11and/or sell copies of the Software, and to permit persons to whom the
12Software is furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice (including the next
15paragraph) shall be included in all copies or substantial portions of the
16Software.
17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24DEALINGS IN THE SOFTWARE.
25</copyright>26
27<description summary="Protocol for inhibiting the compositor keyboard shortcuts">28This protocol specifies a way for a client to request the compositor
29to ignore its own keyboard shortcuts for a given seat, so that all
30key events from that seat get forwarded to a surface.
31
32Warning! The protocol described in this file is experimental and
33backward incompatible changes may be made. Backward compatible
34changes may be added together with the corresponding interface
35version bump.
36Backward incompatible changes are done by bumping the version
37number in the protocol and interface names and resetting the
38interface version. Once the protocol is to be declared stable,
39the 'z' prefix and the version number in the protocol and
40interface names are removed and the interface version number is
41reset.
42</description>43
44<interface name="zwp_keyboard_shortcuts_inhibit_manager_v1" version="1">45<description summary="context object for keyboard grab_manager">46A global interface used for inhibiting the compositor keyboard shortcuts.
47</description>48
49<request name="destroy" type="destructor">50<description summary="destroy the keyboard shortcuts inhibitor object">51Destroy the keyboard shortcuts inhibitor manager.
52</description>53</request>54
55<request name="inhibit_shortcuts">56<description summary="create a new keyboard shortcuts inhibitor object">57Create a new keyboard shortcuts inhibitor object associated with
58the given surface for the given seat.
59
60If shortcuts are already inhibited for the specified seat and surface,
61a protocol error "already_inhibited" is raised by the compositor.
62</description>63<arg name="id" type="new_id" interface="zwp_keyboard_shortcuts_inhibitor_v1"/>64<arg name="surface" type="object" interface="wl_surface"65summary="the surface that inhibits the keyboard shortcuts behavior"/>66<arg name="seat" type="object" interface="wl_seat"67summary="the wl_seat for which keyboard shortcuts should be disabled"/>68</request>69
70<enum name="error">71<entry name="already_inhibited"72value="0"73summary="the shortcuts are already inhibited for this surface"/>74</enum>75</interface>76
77<interface name="zwp_keyboard_shortcuts_inhibitor_v1" version="1">78<description summary="context object for keyboard shortcuts inhibitor">79A keyboard shortcuts inhibitor instructs the compositor to ignore
80its own keyboard shortcuts when the associated surface has keyboard
81focus. As a result, when the surface has keyboard focus on the given
82seat, it will receive all key events originating from the specified
83seat, even those which would normally be caught by the compositor for
84its own shortcuts.
85
86The Wayland compositor is however under no obligation to disable
87all of its shortcuts, and may keep some special key combo for its own
88use, including but not limited to one allowing the user to forcibly
89restore normal keyboard events routing in the case of an unwilling
90client. The compositor may also use the same key combo to reactivate
91an existing shortcut inhibitor that was previously deactivated on
92user request.
93
94When the compositor restores its own keyboard shortcuts, an
95"inactive" event is emitted to notify the client that the keyboard
96shortcuts inhibitor is not effectively active for the surface and
97seat any more, and the client should not expect to receive all
98keyboard events.
99
100When the keyboard shortcuts inhibitor is inactive, the client has
101no way to forcibly reactivate the keyboard shortcuts inhibitor.
102
103The user can chose to re-enable a previously deactivated keyboard
104shortcuts inhibitor using any mechanism the compositor may offer,
105in which case the compositor will send an "active" event to notify
106the client.
107
108If the surface is destroyed, unmapped, or loses the seat's keyboard
109focus, the keyboard shortcuts inhibitor becomes irrelevant and the
110compositor will restore its own keyboard shortcuts but no "inactive"
111event is emitted in this case.
112</description>113
114<request name="destroy" type="destructor">115<description summary="destroy the keyboard shortcuts inhibitor object">116Remove the keyboard shortcuts inhibitor from the associated wl_surface.
117</description>118</request>119
120<event name="active">121<description summary="shortcuts are inhibited">122This event indicates that the shortcut inhibitor is active.
123
124The compositor sends this event every time compositor shortcuts
125are inhibited on behalf of the surface. When active, the client
126may receive input events normally reserved by the compositor
127(see zwp_keyboard_shortcuts_inhibitor_v1).
128
129This occurs typically when the initial request "inhibit_shortcuts"
130first becomes active or when the user instructs the compositor to
131re-enable and existing shortcuts inhibitor using any mechanism
132offered by the compositor.
133</description>134</event>135
136<event name="inactive">137<description summary="shortcuts are restored">138This event indicates that the shortcuts inhibitor is inactive,
139normal shortcuts processing is restored by the compositor.
140</description>141</event>142</interface>143</protocol>144