File: gamescope-input-method.xml

package info (click to toggle)
gamescope 3.11.49-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,132 kB
  • sloc: cpp: 13,660; ansic: 4,642; xml: 343; makefile: 6
file content (179 lines) | stat: -rw-r--r-- 7,535 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="gamescope_input_method">

  <copyright>
    Copyright © 2008-2011 Kristian Høgsberg
    Copyright © 2010-2011 Intel Corporation
    Copyright © 2012-2013 Collabora, Ltd.
    Copyright © 2012, 2013 Intel Corporation
    Copyright © 2015, 2016 Jan Arne Petersen
    Copyright © 2017, 2018 Red Hat, Inc.
    Copyright © 2018       Purism SPC
    Copyright © 2021       Valve Corporation

    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>

  <description summary="Protocol for creating input methods">
    This protocol allows applications to act as input methods for compositors.

    An input method context is used to manage the state of the input method.

    Text strings are UTF-8 encoded, their indices and lengths are in bytes.

    This iteration of the protocol is a subset of this work-in-progress proposal:
    https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/112

    This is a private Gamescope protocol. Regular Wayland clients must not use
    it.
  </description>

  <interface name="gamescope_input_method_manager" version="2">
    <description summary="input method manager">
      The input method manager allows the client to become the input method on
      a chosen seat.

      No more than one input method must be associated with any seat at any
      given time.
    </description>

    <request name="destroy" type="destructor">
      <description summary="destroy the input method manager">
        Destroys the gamescope_input_method_manager object.

        The gamescope_input_method objects originating from it remain valid.
      </description>
    </request>

    <request name="create_input_method">
      <description summary="create an input method object">
        Create a new gamescope_input_method object associated with a given
        seat.
      </description>
      <arg name="seat" type="object" interface="wl_seat"/>
      <arg name="input_method" type="new_id" interface="gamescope_input_method"/>
    </request>
  </interface>

  <interface name="gamescope_input_method" version="2">
    <description summary="input method">
      An input method object allows for clients to compose text.

      The objects connects the client to a text input in an application, and
      lets the client to serve as an input method for a seat.

      There must be no more than one input method object per seat.
    </description>

    <event name="unavailable">
      <description summary="input method unavailable">
        The input method ceased to be available.

        The compositor must issue this event as the only event on the object if
        there was another input_method object associated with the same seat at
        the time of its creation.

        The compositor must issue this request when the object is no longer
        useable, e.g. due to seat removal.

        The input method context becomes inert and should be destroyed. Any
        further requests and events except for the destroy request must be
        ignored.
      </description>
    </event>

    <event name="done">
      <description summary="compositor state change notification">
        Notify the client that the compositor state has changed.

        The serial is used to synchronize compositor state changes and client
        state changes. The serial allows the compositor to ignore requests
        meant for a previous text input.

        In the future, will be used to atomically apply compositor state
        changes sent to the client (but currently there's no such state).
      </description>
      <arg name="serial" type="uint"/>
    </event>

    <request name="destroy" type="destructor">
      <description summary="destroy the text input">
        Destroys the gamescope_text_input object.
      </description>
    </request>

    <request name="commit">
      <description summary="apply state">
        Apply state changes from set_string and set_action requests.

        The state relating to these events is double-buffered, and each one
        modifies the pending state. This request replaces the current state
        with the pending state.

        The client must set the serial to the last received serial in the done
        event.
      </description>
      <arg name="serial" type="uint" summary="last received serial"/>
    </request>

    <request name="set_string">
      <description summary="set string to be committed">
        Send the string text for insertion to the application.

        Inserts a string at current cursor position (see commit event
        sequence). The string to commit could be either just a single character
        after a key press or the result of some composing.

        Values set with this event are double-buffered. They must be applied
        and reset to initial on the next gamescope_text_input.commit request.

        The initial value of text is an empty string.
      </description>
      <arg name="text" type="string" summary="text to insert"/>
    </request>

    <enum name="action">
      <description summary="action">
        A possible action to perform on a text input.

        The backspace and delete actions should be handled in a similar manner
        to backpace and delete keys being pressed on a keyboard.
      </description>
      <entry name="none" value="0" summary="no action"/>
      <entry name="submit" value="1" summary="submit"/>
      <entry name="delete_left" value="2" summary="delete one unit before the cursor"/>
      <entry name="delete_right" value="3" summary="delete one unit after the cursor"/>
      <entry name="move_left" value="4" summary="move the cursor to the left by one unit"/>
      <entry name="move_right" value="5" summary="move the cursor to the right by one unit"/>
      <entry name="move_up" value="6" since="2" summary="move the cursor up by one unit"/>
      <entry name="move_down" value="7" since="2" summary="move the cursor down by one unit"/>
    </enum>

    <request name="set_action">
      <description summary="perform an action">
        Set the action to be performed on commit.

        Values set with this event are double-buffered. They must be applied
        and reset to initial on the next gamescope_text_input.commit request.
      </description>
      <arg name="action" type="uint" enum="action" summary="action performed"/>
    </request>
  </interface>
</protocol>