<?xml version="1.0" encoding="UTF-8"?>
<protocol name="keyboard_extension_unstable_v1">
<copyright>
Copyright 2017 The Chromium Authors
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="zcr_keyboard_extension_v1" version="2">
<description summary="extends wl_keyboard with ack_key events">
Allows a wl_keyboard to send ack_key requests for each key event of
the keyboard to the server.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding uinterface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and uinterface names and resetting the interface version.
Once the protocol is to be declared stable, the 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
</description>
<enum name="error">
<entry name="extended_keyboard_exists" value="0"
summary="the keyboard already has an extended_keyboard object associated"/>
</enum>
<request name="get_extended_keyboard">
<description summary="get extended_keyboard for a keyboard">
Create extended_keyboard object.
See zcr_extended_keyboard interface for details.
If the given wl_keyboard object already has a extended_keyboard object
associated, the extended_keyboard_exists protocol error is raised.
</description>
<arg name="id" type="new_id" interface="zcr_extended_keyboard_v1"/>
<arg name="keyboard" type="object" interface="wl_keyboard"/>
</request>
</interface>
<interface name="zcr_extended_keyboard_v1" version="2">
<description summary="extension of wl_keyboard protocol">
The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface
with requests to notify whether sent key events are handled or not by
the client. If no such an acknowledgment request is sent in a specified
amount of time, then the event is assumed to be handled.
</description>
<request name="destroy" type="destructor">
<description summary="destroy extended_keyboard object"/>
</request>
<enum name="handled_state">
<description summary="whether a key event is handled by client or not"/>
<entry name="not_handled" value="0"/>
<entry name="handled" value="1"/>
</enum>
<request name="ack_key">
<description summary="acknowledge a key event"/>
<arg name="serial" type="uint"/>
<arg name="handled" type="uint" enum="handled_state"/>
</request>
<event name="peek_key" since="2">
<description summary="peek a key event">
A key event which will be soon delivered to the application via
wl_keyboard::key. If text_input consumes the key event,
wl_keyboard::key is not delivered, but this event is still delivered
to the application.
All arguments are the exactly same one of the following wl_keyboard::key,
including serial.
</description>
<arg name="serial" type="uint" summary="serial number of the key event"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="key" type="uint" summary="key that produced the event"/>
<!-- Dropped enum="key_state" from state for the workaround of crbug.com/1194855. -->
<arg name="state" type="uint" summary="physical state of the key"/>
</event>
</interface>
</protocol>