1
<?xml version="1.0" encoding="UTF-8"?>
2
<protocol name="input_method">
4
Copyright © 2012 Intel Corporation
6
Permission to use, copy, modify, distribute, and sell this
7
software and its documentation for any purpose is hereby granted
8
without fee, provided that the above copyright notice appear in
9
all copies and that both that copyright notice and this permission
10
notice appear in supporting documentation, and that the name of
11
the copyright holders not be used in advertising or publicity
12
pertaining to distribution of the software without specific,
13
written prior permission. The copyright holders make no
14
representations about the suitability of this software for any
15
purpose. It is provided "as is" without express or implied
18
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
19
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
20
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
23
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
29
<interface name="input_method_context" version="1">
30
<description summary="input method context">
31
Corresponds to a text model on input method side. An input method context
32
is created on text mode activation on the input method side. It allows to
33
receive information about the text model from the application via events.
34
Input method contexts do not keep state after deactivation and should be
35
destroyed after deactivation is handled.
37
<request name="destroy" type="destructor"/>
38
<request name="commit_string">
39
<description summary="commit string">
40
Send the commit string text to the applications text model.
42
<arg name="serial" type="uint"/>
43
<arg name="text" type="string"/>
44
<arg name="index" type="uint"/>
46
<request name="preedit_string">
47
<description summary="pre-edit string">
48
Send the pre-edit string text to the applications text model.
50
<arg name="serial" type="uint"/>
51
<arg name="text" type="string"/>
52
<arg name="commit" type="string"/>
54
<request name="preedit_styling">
55
<arg name="serial" type="uint"/>
56
<arg name="index" type="uint"/>
57
<arg name="length" type="uint"/>
58
<arg name="style" type="uint"/>
60
<request name="preedit_cursor">
61
<description summary="pre-edit cursor">
62
Sets the cursor position inside the composing text (as byte index)
63
relative to the start of the composing text.
65
<arg name="serial" type="uint"/>
66
<arg name="index" type="int"/>
68
<request name="delete_surrounding_text">
69
<arg name="serial" type="uint"/>
70
<arg name="index" type="int"/>
71
<arg name="length" type="uint"/>
73
<request name="modifiers_map">
74
<arg name="map" type="array"/>
76
<request name="keysym">
77
<description summary="keysym">
78
Notify when a key event was sent. Key events should not be used
79
for normal text input operations, which should be done with
80
commit_string, delete_surrounfing_text, etc. The key event follows
81
the wl_keyboard key event convention. State is a XKB keysym, state a
82
wl_keyboard key_state.
84
<arg name="serial" type="uint"/>
85
<arg name="time" type="uint"/>
86
<arg name="sym" type="uint"/>
87
<arg name="state" type="uint"/>
88
<arg name="modifiers" type="uint"/>
90
<request name="grab_keyboard">
91
<description summary="grab hardware keyboard">
92
Allows an input method to receive hardware keyboard input and process
93
key events to generate text events (with pre-edit) over the. This allows
94
input methods which compose multiple key events for inputting text
95
like it is done for CJK languages.
97
<arg name="keyboard" type="new_id" interface="wl_keyboard"/>
100
<arg name="serial" type="uint"/>
101
<arg name="time" type="uint"/>
102
<arg name="key" type="uint"/>
103
<arg name="state" type="uint"/>
105
<request name="modifiers">
106
<arg name="serial" type="uint"/>
107
<arg name="mods_depressed" type="uint"/>
108
<arg name="mods_latched" type="uint"/>
109
<arg name="mods_locked" type="uint"/>
110
<arg name="group" type="uint"/>
112
<event name="surrounding_text">
113
<description summary="surrounding text event">
114
The plain surrounding text around the input position. Cursor is the
115
position within the surrounding text. Anchor is the position of the
116
selection anchor within the surrounding text. If there is no selected
117
text anchor is the same as cursor.
119
<arg name="text" type="string"/>
120
<arg name="cursor" type="uint"/>
121
<arg name="anchor" type="uint"/>
124
<arg name="serial" type="uint"/>
126
<event name="content_type">
127
<arg name="hint" type="uint"/>
128
<arg name="purpose" type="uint"/>
130
<event name="invoke_action">
131
<arg name="button" type="uint"/>
132
<arg name="index" type="uint"/>
136
<interface name="input_method" version="1">
137
<description summary="input method">
138
An input method object is responsible to compose text in response to
139
input from hardware or virtual keyboards. There is one input method
140
object per seat. On activate there is a new input method context object
141
created which allows the input method to communicate with the text model.
143
<event name="activate">
144
<description summary="activate event">
145
A text model was activated. Creates an input method context object
146
which allows communication with the text model.
148
<arg name="id" type="new_id" interface="input_method_context"/>
149
<arg name="serial" type="uint"/>
151
<event name="deactivate">
152
<description summary="activate event">
153
The text model corresponding to the context argument was deactivated.
154
The input method context should be destroyed after deactivation is
157
<arg name="context" type="object" interface="input_method_context"/>