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="text" type="string"/>
43 <arg name="index" type="uint"/>
45 <request name="preedit_string">
46 <description summary="pre-edit string">
47 Send the pre-edit string text to the applications text model.
49 <arg name="text" type="string"/>
50 <arg name="index" type="uint"/>
52 <request name="delete_surrounding_text">
53 <arg name="index" type="int"/>
54 <arg name="length" type="uint"/>
57 <arg name="key" type="uint"/>
58 <arg name="state" type="uint"/>
60 <event name="surrounding_text">
61 <description summary="surrounding text event">
62 The plain surrounding text around the input position. Cursor is the
63 position within the surrounding text. Anchor is the position of the
64 selection anchor within the surrounding text. If there is no selected
65 text anchor is the same as cursor.
67 <arg name="text" type="string"/>
68 <arg name="cursor" type="uint"/>
69 <arg name="anchor" type="uint"/>
75 <interface name="input_method" version="1">
76 <description summary="input method">
77 An input method object is responsible to compose text in response to
78 input from hardware or virtual keyboards. There is one input method
79 object per seat. On activate there is a new input method context object
80 created which allows the input method to communicate with the text model.
82 <event name="activate">
83 <description summary="activate event">
84 A text model was activated. Creates an input method context object
85 which allows communication with the text model.
87 <arg name="id" type="new_id" interface="input_method_context"/>
89 <event name="deactivate">
90 <description summary="activate event">
91 The text model corresponding to the context argument was deactivated.
92 The input method context should be destroyed after deactivation is
95 <arg name="context" type="object" interface="input_method_context"/>