git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

protocol/upstream/virtual-keyboard-unstable-v1.xml (4.8K)

  1 <!-- SPDX-License-Identifier: MIT -->
  2 <?xml version="1.0" encoding="UTF-8"?>
  3 <protocol name="virtual_keyboard_unstable_v1">
  4   <copyright>
  5     Copyright © 2008-2011  Kristian Høgsberg
  6     Copyright © 2010-2013  Intel Corporation
  7     Copyright © 2012-2013  Collabora, Ltd.
  8     Copyright © 2018       Purism SPC
  9 
 10     Permission is hereby granted, free of charge, to any person obtaining a
 11     copy of this software and associated documentation files (the "Software"),
 12     to deal in the Software without restriction, including without limitation
 13     the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14     and/or sell copies of the Software, and to permit persons to whom the
 15     Software is furnished to do so, subject to the following conditions:
 16 
 17     The above copyright notice and this permission notice (including the next
 18     paragraph) shall be included in all copies or substantial portions of the
 19     Software.
 20 
 21     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 22     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 23     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 24     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 25     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 26     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 27     DEALINGS IN THE SOFTWARE.
 28   </copyright>
 29 
 30   <interface name="zwp_virtual_keyboard_v1" version="1">
 31     <description summary="virtual keyboard">
 32       The virtual keyboard provides an application with requests which emulate
 33       the behaviour of a physical keyboard.
 34 
 35       This interface can be used by clients on its own to provide raw input
 36       events, or it can accompany the input method protocol.
 37     </description>
 38 
 39     <request name="keymap">
 40       <description summary="keyboard mapping">
 41         Provide a file descriptor to the compositor which can be
 42         memory-mapped to provide a keyboard mapping description.
 43 
 44         Format carries a value from the keymap_format enumeration.
 45       </description>
 46       <arg name="format" type="uint" summary="keymap format"/>
 47       <arg name="fd" type="fd" summary="keymap file descriptor"/>
 48       <arg name="size" type="uint" summary="keymap size, in bytes"/>
 49     </request>
 50 
 51     <enum name="error">
 52       <entry name="no_keymap" value="0" summary="No keymap was set"/>
 53     </enum>
 54 
 55     <request name="key">
 56       <description summary="key event">
 57         A key was pressed or released.
 58         The time argument is a timestamp with millisecond granularity, with an
 59         undefined base. All requests regarding a single object must share the
 60         same clock.
 61 
 62         Keymap must be set before issuing this request.
 63 
 64         State carries a value from the key_state enumeration.
 65       </description>
 66       <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
 67       <arg name="key" type="uint" summary="key that produced the event"/>
 68       <arg name="state" type="uint" summary="physical state of the key"/>
 69     </request>
 70 
 71     <request name="modifiers">
 72       <description summary="modifier and group state">
 73         Notifies the compositor that the modifier and/or group state has
 74         changed, and it should update state.
 75 
 76         The client should use wl_keyboard.modifiers event to synchronize its
 77         internal state with seat state.
 78 
 79         Keymap must be set before issuing this request.
 80       </description>
 81       <arg name="mods_depressed" type="uint" summary="depressed modifiers"/>
 82       <arg name="mods_latched" type="uint" summary="latched modifiers"/>
 83       <arg name="mods_locked" type="uint" summary="locked modifiers"/>
 84       <arg name="group" type="uint" summary="keyboard layout"/>
 85     </request>
 86 
 87     <request name="destroy" type="destructor" since="1">
 88       <description summary="destroy the virtual keyboard keyboard object"/>
 89     </request>
 90   </interface>
 91 
 92   <interface name="zwp_virtual_keyboard_manager_v1" version="1">
 93     <description summary="virtual keyboard manager">
 94       A virtual keyboard manager allows an application to provide keyboard
 95       input events as if they came from a physical keyboard.
 96     </description>
 97 
 98     <enum name="error">
 99       <entry name="unauthorized" value="0" summary="client not authorized to use the interface"/>
100     </enum>
101 
102     <request name="create_virtual_keyboard">
103       <description summary="Create a new virtual keyboard">
104         Creates a new virtual keyboard associated to a seat.
105 
106         If the compositor enables a keyboard to perform arbitrary actions, it
107         should present an error when an untrusted client requests a new
108         keyboard.
109       </description>
110       <arg name="seat" type="object" interface="wl_seat"/>
111       <arg name="id" type="new_id" interface="zwp_virtual_keyboard_v1"/>
112     </request>
113   </interface>
114 </protocol>