~timo-jyrinki/ubuntu/trusty/maliit-framework/fix_qt52

« back to all changes in this revision

Viewing changes to weston-protocols/text.xml

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Sergio Schvezov, Ricardo Salveti de Araujo
  • Date: 2013-07-23 19:47:04 UTC
  • mfrom: (1.1.2) (1.2.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130723194704-1lsy1kmlda069cea
Tags: 0.99.0+git20130615+97e8335-0ubuntu1
[ Sergio Schvezov ]
* New build from HEAD 97e8335.
* Packaging import from lp:phablet-extras/maliit-framework.

[ Ricardo Salveti de Araujo ]
* debian/control: adding vcs and fixing dependencies
* General package cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<protocol name="text">
 
3
 
 
4
  <copyright>
 
5
    Copyright © 2012, 2013 Intel Corporation
 
6
 
 
7
    Permission to use, copy, modify, distribute, and sell this
 
8
    software and its documentation for any purpose is hereby granted
 
9
    without fee, provided that the above copyright notice appear in
 
10
    all copies and that both that copyright notice and this permission
 
11
    notice appear in supporting documentation, and that the name of
 
12
    the copyright holders not be used in advertising or publicity
 
13
    pertaining to distribution of the software without specific,
 
14
    written prior permission.  The copyright holders make no
 
15
    representations about the suitability of this software for any
 
16
    purpose.  It is provided "as is" without express or implied
 
17
    warranty.
 
18
 
 
19
    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
 
20
    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 
21
    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
 
22
    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
23
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
 
24
    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 
25
    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
 
26
    THIS SOFTWARE.
 
27
  </copyright>
 
28
 
 
29
  <interface name="wl_text_input" version="1">
 
30
    <description summary="text input">
 
31
      An object used for text input. Adds support for text input and input 
 
32
      methods to applications. A text-input object is created from a
 
33
      wl_text_input_manager and corresponds typically to a text entry in an
 
34
      application.
 
35
      Requests are used to activate/deactivate the text-input object and set
 
36
      state information like surrounding and selected text or the content type.
 
37
      The information about entered text is sent to the text-input object via
 
38
      the pre-edit and commit events. Using this interface removes the need
 
39
      for applications to directly process hardware key events and compose text
 
40
      out of them.
 
41
 
 
42
      Text is generally UTF-8 encoded, indices and lengths are in bytes.
 
43
 
 
44
      Serials are used to synchronize the state between the text input and
 
45
      an input method. New serials are sent by the text input in the
 
46
      commit_state request and are used by the input method to indicate
 
47
      the known text input state in events like preedit_string, commit_string,
 
48
      and keysym. The text input can then ignore events from the input method
 
49
      which are based on an outdated state (for example after a reset).
 
50
    </description>
 
51
    <request name="activate">
 
52
      <description summary="request activation">
 
53
        Requests the text-input object to be activated (typically when the 
 
54
        text entry gets focus).
 
55
        The seat argument is a wl_seat which maintains the focus for this
 
56
        activation. The surface argument is a wl_surface assigned to the
 
57
        text-input object and tracked for focus lost. The enter event
 
58
        is emitted on successful activation.
 
59
      </description>
 
60
      <arg name="seat" type="object" interface="wl_seat"/>
 
61
      <arg name="surface" type="object" interface="wl_surface"/>
 
62
    </request>
 
63
    <request name="deactivate">
 
64
      <description summary="request deactivation">
 
65
        Requests the text-input object to be deactivated (typically when the
 
66
        text entry lost focus). The seat argument is a wl_seat which was used
 
67
        for activation.
 
68
      </description>
 
69
      <arg name="seat" type="object" interface="wl_seat"/>
 
70
    </request>
 
71
    <request name="show_input_panel">
 
72
      <description summary="show input panels">
 
73
        Requests input panels (virtual keyboard) to show.
 
74
      </description>
 
75
    </request>
 
76
    <request name="hide_input_panel">
 
77
      <description summary="hide input panels">
 
78
        Requests input panels (virtual keyboard) to hide.
 
79
      </description>
 
80
    </request>
 
81
    <request name="reset">
 
82
      <description summary="reset">
 
83
        Should be called by an editor widget when the input state should be
 
84
        reset, for example after the text was changed outside of the normal
 
85
        input method flow.
 
86
      </description>
 
87
    </request>
 
88
    <request name="set_surrounding_text">
 
89
      <description summary="sets the surrounding text">
 
90
        Sets the plain surrounding text around the input position. Text is
 
91
        UTF-8 encoded. Cursor is the byte offset within the
 
92
        surrounding text. Anchor is the byte offset of the
 
93
        selection anchor within the surrounding text. If there is no selected
 
94
        text anchor is the same as cursor.
 
95
      </description>
 
96
      <arg name="text" type="string"/>
 
97
      <arg name="cursor" type="uint"/>
 
98
      <arg name="anchor" type="uint"/>
 
99
    </request>
 
100
    <enum name="content_hint">
 
101
      <description summary="content hint">
 
102
        Content hint is a bitmask to allow to modify the behavior of the text
 
103
        input.
 
104
      </description>
 
105
      <entry name="none" value="0x0" summary="no special behaviour"/>
 
106
      <entry name="default" value="0x7" summary="auto completion, correction and capitalization"/>
 
107
      <entry name="password" value="0xc0" summary="hidden and sensitive text"/>
 
108
      <entry name="auto_completion" value="0x1" summary="suggest word completions"/>
 
109
      <entry name="auto_correction" value="0x2" summary="suggest word corrections"/>
 
110
      <entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/>
 
111
      <entry name="lowercase" value="0x8" summary="prefer lowercase letters"/>
 
112
      <entry name="uppercase" value="0x10" summary="prefer uppercase letters"/>
 
113
      <entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependent)"/>
 
114
      <entry name="hidden_text" value="0x40" summary="characters should be hidden"/>
 
115
      <entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/>
 
116
      <entry name="latin" value="0x100" summary="just latin characters should be entered"/>
 
117
      <entry name="multiline" value="0x200" summary="the text input is multiline"/>
 
118
    </enum>
 
119
    <enum name="content_purpose">
 
120
      <description summary="content purpose">
 
121
        The content purpose allows to specify the primary purpose of a text
 
122
        input.
 
123
 
 
124
        This allows an input method to show special purpose input panels with
 
125
        extra characters or to disallow some characters.
 
126
      </description>
 
127
      <entry name="normal" value="0" summary="default input, allowing all characters"/>
 
128
      <entry name="alpha" value="1" summary="allow only alphabetic characters"/>
 
129
      <entry name="digits" value="2" summary="allow only digits"/>
 
130
      <entry name="number" value="3" summary="input a number (including decimal separator and sign)"/>
 
131
      <entry name="phone" value="4" summary="input a phone number"/>
 
132
      <entry name="url" value="5" summary="input an URL"/>
 
133
      <entry name="email" value="6" summary="input an email address"/>
 
134
      <entry name="name" value="7" summary="input a name of a person"/>
 
135
      <entry name="password" value="8" summary="input a password (combine with password or sensitive_data hint)"/>
 
136
      <entry name="date" value="9" summary="input a date"/>
 
137
      <entry name="time" value="10" summary="input a time"/>
 
138
      <entry name="datetime" value="11" summary="input a date and time"/>
 
139
      <entry name="terminal" value="12" summary="input for a terminal"/>
 
140
    </enum>
 
141
    <request name="set_content_type">
 
142
      <description summary="set content purpose and hint">
 
143
        Sets the content purpose and content hint. While the purpose is the
 
144
        basic purpose of an input field, the hint flags allow to modify some
 
145
        of the behavior.
 
146
 
 
147
        When no content type is explicitly set, a normal content purpose with
 
148
        default hints (auto completion, auto correction, auto capitalization)
 
149
        should be assumed.
 
150
      </description>
 
151
      <arg name="hint" type="uint"/>
 
152
      <arg name="purpose" type="uint"/>
 
153
    </request>
 
154
    <request name="set_cursor_rectangle">
 
155
      <arg name="x" type="int"/>
 
156
      <arg name="y" type="int"/>
 
157
      <arg name="width" type="int"/>
 
158
      <arg name="height" type="int"/>
 
159
    </request>
 
160
    <request name="set_preferred_language">
 
161
      <description summary="sets preferred language">
 
162
        Sets a specific language. This allows for example a virtual keyboard to
 
163
        show a language specific layout. The "language" argument is a RFC-3066 
 
164
        format language tag.
 
165
 
 
166
        It could be used for example in a word processor to indicate language of
 
167
        currently edited document or in an instant message application which tracks
 
168
        languages of contacts.
 
169
      </description>
 
170
      <arg name="language" type="string"/>
 
171
    </request>
 
172
    <request name="commit_state">
 
173
      <arg name="serial" type="uint" summary="used to identify the known state"/>
 
174
    </request>
 
175
    <request name="invoke_action">
 
176
      <arg name="button" type="uint"/>
 
177
      <arg name="index" type="uint"/>
 
178
    </request>
 
179
    <event name="enter">
 
180
      <description summary="enter event">
 
181
        Notify the text-input object when it received focus. Typically in
 
182
        response to an activate request.
 
183
      </description>
 
184
      <arg name="surface" type="object" interface="wl_surface"/>
 
185
    </event>
 
186
    <event name="leave">
 
187
      <description summary="leave event">
 
188
        Notify the text-input object when it lost focus. Either in response
 
189
        to a deactivate request or when the assigned surface lost focus or was
 
190
        destroyed.
 
191
      </description>
 
192
    </event>
 
193
    <event name="modifiers_map">
 
194
      <description summary="modifiers map">
 
195
        Transfer an array of 0-terminated modifiers names. The position in
 
196
        the array is the index of the modifier as used in the modifiers
 
197
        bitmask in the keysym event.
 
198
      </description>
 
199
      <arg name="map" type="array"/>
 
200
    </event>
 
201
    <event name="input_panel_state">
 
202
      <description summary="state of the input panel">
 
203
        Notify when the visibility state of the input panel changed.
 
204
      </description>
 
205
      <arg name="state" type="uint"/>
 
206
    </event>
 
207
    <event name="preedit_string">
 
208
      <description summary="pre-edit">
 
209
        Notify when a new composing text (pre-edit) should be set around the
 
210
        current cursor position. Any previously set composing text should
 
211
        be removed.
 
212
 
 
213
        The commit text can be used to replace the preedit text on reset
 
214
        (for example on unfocus).
 
215
 
 
216
        The text input should also handle all preedit_style and preedit_cursor
 
217
        events occuring directly before preedit_string.
 
218
      </description>
 
219
      <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
 
220
      <arg name="text" type="string"/>
 
221
      <arg name="commit" type="string"/>
 
222
    </event>
 
223
    <enum name="preedit_style">
 
224
      <entry name="default" value="0" summary="default style for composing text"/>
 
225
      <entry name="none" value="1" summary="style should be the same as in non-composing text"/>
 
226
      <entry name="active" value="2"/>
 
227
      <entry name="inactive" value="3"/>
 
228
      <entry name="highlight" value="4"/>
 
229
      <entry name="underline" value="5"/>
 
230
      <entry name="selection" value="6"/>
 
231
      <entry name="incorrect" value="7"/>
 
232
    </enum>
 
233
    <event name="preedit_styling">
 
234
      <description summary="pre-edit styling">
 
235
        Sets styling information on composing text. The style is applied for
 
236
        length bytes from index relative to the beginning of the composing 
 
237
        text (as byte offset). Multiple styles can
 
238
        be applied to a composing text by sending multiple preedit_styling
 
239
        events.
 
240
 
 
241
        This event is handled as part of a following preedit_string event.
 
242
      </description>
 
243
      <arg name="index" type="uint"/>
 
244
      <arg name="length" type="uint"/>
 
245
      <arg name="style" type="uint"/>
 
246
    </event>
 
247
    <event name="preedit_cursor">
 
248
      <description summary="pre-edit cursor">
 
249
        Sets the cursor position inside the composing text (as byte
 
250
        offset) relative to the start of the composing text. When index is a
 
251
        negative number no cursor is shown.
 
252
 
 
253
        This event is handled as part of a following preedit_string event.
 
254
      </description>
 
255
      <arg name="index" type="int"/>
 
256
    </event>
 
257
    <event name="commit_string">
 
258
      <description summary="commit">
 
259
        Notify when text should be inserted into the editor widget. The text to
 
260
        commit could be either just a single character after a key press or the
 
261
        result of some composing (pre-edit). It could be also an empty text
 
262
        when some text should be removed (see delete_surrounding_text) or when
 
263
        the input cursor should be moved (see cursor_position).
 
264
 
 
265
        Any previously set composing text should be removed.
 
266
      </description>
 
267
      <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
 
268
      <arg name="text" type="string"/>
 
269
    </event>
 
270
    <event name="cursor_position">
 
271
      <description summary="set cursor to new position">
 
272
        Notify when the cursor or anchor position should be modified.
 
273
 
 
274
        This event should be handled as part of a following commit_string
 
275
        event.
 
276
      </description>
 
277
      <arg name="index" type="int"/>
 
278
      <arg name="anchor" type="int"/>
 
279
    </event>
 
280
    <event name="delete_surrounding_text">
 
281
      <description summary="delete surrounding text">
 
282
        Notify when the text around the current cursor position should be
 
283
        deleted.
 
284
 
 
285
        Index is relative to the current cursor (in bytes).
 
286
        Length is the length of deleted text (in bytes).
 
287
 
 
288
        This event should be handled as part of a following commit_string
 
289
        event.
 
290
      </description>
 
291
      <arg name="index" type="int"/>
 
292
      <arg name="length" type="uint"/>
 
293
    </event>
 
294
    <event name="keysym">
 
295
      <description summary="keysym">
 
296
        Notify when a key event was sent. Key events should not be used
 
297
        for normal text input operations, which should be done with
 
298
        commit_string, delete_surrounding_text, etc. The key event follows
 
299
        the wl_keyboard key event convention. Sym is a XKB keysym, state a
 
300
        wl_keyboard key_state. Modifiers are a mask for effective modifiers
 
301
        (where the modifier indices are set by the modifiers_map event)
 
302
      </description>
 
303
      <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
 
304
      <arg name="time" type="uint"/>
 
305
      <arg name="sym" type="uint"/>
 
306
      <arg name="state" type="uint"/>
 
307
      <arg name="modifiers" type="uint"/>
 
308
    </event>
 
309
    <event name="language">
 
310
      <description summary="language">
 
311
        Sets the language of the input text. The "language" argument is a RFC-3066 
 
312
        format language tag.
 
313
      </description>
 
314
      <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
 
315
      <arg name="language" type="string"/>
 
316
    </event>
 
317
    <enum name="text_direction">
 
318
      <entry name="auto" value="0" summary="automatic text direction based on text and language"/>
 
319
      <entry name="ltr" value="1" summary="left-to-right"/>
 
320
      <entry name="rtl" value="2" summary="right-to-left"/>
 
321
    </enum>
 
322
    <event name="text_direction">
 
323
      <description summary="text direction">
 
324
        Sets the text direction of input text.
 
325
 
 
326
        It is mainly needed for showing input cursor on correct side of the
 
327
        editor when there is no input yet done and making sure neutral
 
328
        direction text is laid out properly.
 
329
      </description>
 
330
      <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
 
331
      <arg name="direction" type="uint"/>
 
332
    </event>
 
333
  </interface>
 
334
 
 
335
  <interface name="wl_text_input_manager" version="1">
 
336
    <description summary="text input manager">
 
337
      A factory for text-input objects. This object is a global singleton.
 
338
    </description>
 
339
    <request name="create_text_input">
 
340
      <description summary="create text input">
 
341
        Creates a new text-input object.
 
342
      </description>
 
343
      <arg name="id" type="new_id" interface="wl_text_input"/>
 
344
    </request>
 
345
  </interface>
 
346
</protocol>