text: Fix some text and input-method docs

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Krzesimir Nowak 12 years ago committed by Kristian Høgsberg
parent f62e8cfae7
commit 8418a0cc8d
  1. 40
      protocol/input-method.xml
  2. 36
      protocol/text.xml

@ -37,20 +37,32 @@
<request name="destroy" type="destructor"/> <request name="destroy" type="destructor"/>
<request name="commit_string"> <request name="commit_string">
<description summary="commit string"> <description summary="commit string">
Send the commit string text to the applications text model. Send the commit string text to the applications text model and
set the cursor at index (as byte index) relative to the
beginning of inserted text.
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="text" type="string"/> <arg name="text" type="string"/>
</request> </request>
<request name="preedit_string"> <request name="preedit_string">
<description summary="pre-edit string"> <description summary="pre-edit string">
Send the pre-edit string text to the applications text model. Send the pre-edit string text to the applications text model. The commit
text can be used to replace the preedit text on reset (for example on
unfocus).
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="text" type="string"/> <arg name="text" type="string"/>
<arg name="commit" type="string"/> <arg name="commit" type="string"/>
</request> </request>
<request name="preedit_styling"> <request name="preedit_styling">
<description summary="pre-edit styling">
Sets styling information on composing text. The style is applied for
length (in bytes) characters from index relative to the beginning of the
composing text (as byte index). Multiple styles can be applied to a
composing text.
This request should be sent before sending preedit_string request.
</description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="index" type="uint"/> <arg name="index" type="uint"/>
<arg name="length" type="uint"/> <arg name="length" type="uint"/>
@ -60,6 +72,8 @@
<description summary="pre-edit cursor"> <description summary="pre-edit cursor">
Sets the cursor position inside the composing text (as byte index) Sets the cursor position inside the composing text (as byte index)
relative to the start of the composing text. relative to the start of the composing text.
This request should be sent before sending preedit_string request.
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="index" type="int"/> <arg name="index" type="int"/>
@ -79,11 +93,10 @@
</request> </request>
<request name="keysym"> <request name="keysym">
<description summary="keysym"> <description summary="keysym">
Notify when a key event was sent. Key events should not be used Notify when a key event was sent. Key events should not be used for
for normal text input operations, which should be done with normal text input operations, which should be done with commit_string,
commit_string, delete_surrounfing_text, etc. The key event follows delete_surrounfing_text, etc. The key event follows the wl_keyboard key
the wl_keyboard key event convention. State is a XKB keysym, state a event convention. Sym is a XKB keysym, state a wl_keyboard key_state.
wl_keyboard key_state.
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="time" type="uint"/> <arg name="time" type="uint"/>
@ -94,9 +107,9 @@
<request name="grab_keyboard"> <request name="grab_keyboard">
<description summary="grab hardware keyboard"> <description summary="grab hardware keyboard">
Allows an input method to receive hardware keyboard input and process Allows an input method to receive hardware keyboard input and process
key events to generate text events (with pre-edit) over the. This allows key events to generate text events (with pre-edit) over the wire. This
input methods which compose multiple key events for inputting text allows input methods which compose multiple key events for inputting
like it is done for CJK languages. text like it is done for CJK languages.
</description> </description>
<arg name="keyboard" type="new_id" interface="wl_keyboard"/> <arg name="keyboard" type="new_id" interface="wl_keyboard"/>
</request> </request>
@ -124,9 +137,10 @@
<event name="surrounding_text"> <event name="surrounding_text">
<description summary="surrounding text event"> <description summary="surrounding text event">
The plain surrounding text around the input position. Cursor is the The plain surrounding text around the input position. Cursor is the
position within the surrounding text. Anchor is the position of the position in bytes within the surrounding text relative to the beginning
selection anchor within the surrounding text. If there is no selected of the text. Anchor is the position in bytes of the selection anchor
text anchor is the same as cursor. within the surrounding text relative to the beginning of the text. If
there is no selected text anchor is the same as cursor.
</description> </description>
<arg name="text" type="string"/> <arg name="text" type="string"/>
<arg name="cursor" type="uint"/> <arg name="cursor" type="uint"/>

@ -42,7 +42,7 @@
Sets the plain surrounding text around the input position. Cursor is the Sets the plain surrounding text around the input position. Cursor is the
byte index within the surrounding text. Anchor is the byte index of the byte index within the surrounding text. Anchor is the byte index of the
selection anchor within the surrounding text. If there is no selected selection anchor within the surrounding text. If there is no selected
text anchor is the same as cursor. text anchor then it is the same as cursor.
</description> </description>
<arg name="text" type="string"/> <arg name="text" type="string"/>
<arg name="cursor" type="uint"/> <arg name="cursor" type="uint"/>
@ -70,9 +70,9 @@
</request> </request>
<request name="reset"> <request name="reset">
<description summary="reset"> <description summary="reset">
Should be called by an editor widget when the input state should Should be called by an editor widget when the input state should be
be reseted, for example after the text was changed outside of the reset, for example after the text was changed outside of the normal
normal input method flow. input method flow.
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
</request> </request>
@ -84,7 +84,8 @@
</request> </request>
<enum name="content_hint"> <enum name="content_hint">
<description summary="content hint"> <description summary="content hint">
Content hint is a bitmask to allow to modify the behavior of the text input Content hint is a bitmask to allow to modify the behavior of the text
input.
</description> </description>
<entry name="none" value="0x0" summary="no special behaviour"/> <entry name="none" value="0x0" summary="no special behaviour"/>
<entry name="default" value="0x7" summary="auto completion, correction and capitalization"/> <entry name="default" value="0x7" summary="auto completion, correction and capitalization"/>
@ -94,7 +95,7 @@
<entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/> <entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/>
<entry name="lowercase" value="0x8" summary="prefer lowercase letters"/> <entry name="lowercase" value="0x8" summary="prefer lowercase letters"/>
<entry name="uppercase" value="0x10" summary="prefer uppercase letters"/> <entry name="uppercase" value="0x10" summary="prefer uppercase letters"/>
<entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependend)"/> <entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependent)"/>
<entry name="hidden_text" value="0x40" summary="characters should be hidden"/> <entry name="hidden_text" value="0x40" summary="characters should be hidden"/>
<entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/> <entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/>
<entry name="latin" value="0x100" summary="just latin characters should be entered"/> <entry name="latin" value="0x100" summary="just latin characters should be entered"/>
@ -102,10 +103,11 @@
</enum> </enum>
<enum name="content_purpose"> <enum name="content_purpose">
<description summary="content purpose"> <description summary="content purpose">
The content purpose allows to specify the primary purpose of a text input. The content purpose allows to specify the primary purpose of a text
input.
This allows an input method to show special purpose input panels with extra This allows an input method to show special purpose input panels with
characters or to disallow some characters. extra characters or to disallow some characters.
</description> </description>
<entry name="normal" value="0" summary="default input, allowing all characters"/> <entry name="normal" value="0" summary="default input, allowing all characters"/>
<entry name="alpha" value="1" summary="allow only alphabetic characters"/> <entry name="alpha" value="1" summary="allow only alphabetic characters"/>
@ -164,10 +166,10 @@
</request> </request>
<event name="commit_string"> <event name="commit_string">
<description summary="commit"> <description summary="commit">
Notify when text should be inserted into the editor widget. The text Notify when text should be inserted into the editor widget. The text to
to commit could be either just a single character after a key press commit could be either just a single character after a key press or the
or the result of some composing (pre-edit). It also sets the new result of some composing (pre-edit). It also sets the new cursor
cursor position (as byte index) relative to the inserted text. position (as byte index) relative to the beginning of inserted text.
Any previously set composing text should be removed. Any previously set composing text should be removed.
</description> </description>
@ -191,7 +193,7 @@
<description summary="delete surrounding text"> <description summary="delete surrounding text">
Notify when the text around the current cursor position should be Notify when the text around the current cursor position should be
deleted. Index is relative to the current cursor (as byte index). deleted. Index is relative to the current cursor (as byte index).
Length is the length of deleted text (as bytes). Length is the length of deleted text (in bytes).
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="index" type="int"/> <arg name="index" type="int"/>
@ -254,9 +256,9 @@
Notify when a key event was sent. Key events should not be used Notify when a key event was sent. Key events should not be used
for normal text input operations, which should be done with for normal text input operations, which should be done with
commit_string, delete_surrounfing_text, etc. The key event follows commit_string, delete_surrounfing_text, etc. The key event follows
the wl_keyboard key event convention. State is a XKB keysym, state a the wl_keyboard key event convention. Sym is a XKB keysym, state a
wl_keyboard key_state. Modifiers are a mask for effective modifiers wl_keyboard key_state. Modifiers are a mask for effective modifiers
(where the modfier indices are set by the modifiers_map event) (where the modifier indices are set by the modifiers_map event)
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
<arg name="time" type="uint"/> <arg name="time" type="uint"/>
@ -312,7 +314,7 @@
<interface name="text_model_factory" version="1"> <interface name="text_model_factory" version="1">
<description summary="text model factory"> <description summary="text model factory">
A factory for text models. This object is a singleton global. A factory for text models. This object is a global singleton.
</description> </description>
<request name="create_text_model"> <request name="create_text_model">
<description summary="create text model"> <description summary="create text model">

Loading…
Cancel
Save