text: Split out cursor_position

Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.

The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
This commit is contained in:
Jan Arne Petersen
2013-01-31 15:52:23 +01:00
committed by Kristian Høgsberg
parent 964b517c9b
commit 1cc9e08d2f
6 changed files with 83 additions and 25 deletions
+5 -1
View File
@@ -41,7 +41,6 @@
</description>
<arg name="serial" type="uint"/>
<arg name="text" type="string"/>
<arg name="index" type="uint"/>
</request>
<request name="preedit_string">
<description summary="pre-edit string">
@@ -70,6 +69,11 @@
<arg name="index" type="int"/>
<arg name="length" type="uint"/>
</request>
<request name="cursor_position">
<arg name="serial" type="uint"/>
<arg name="index" type="int"/>
<arg name="anchor" type="int"/>
</request>
<request name="modifiers_map">
<arg name="map" type="array"/>
</request>
+9 -1
View File
@@ -161,7 +161,6 @@
</description>
<arg name="serial" type="uint"/>
<arg name="text" type="string"/>
<arg name="index" type="uint"/>
</event>
<event name="preedit_string">
<description summary="pre-edit">
@@ -186,6 +185,15 @@
<arg name="index" type="int"/>
<arg name="length" type="uint"/>
</event>
<event name="cursor_position">
<description summary="set cursor to new position">
Notify when the cursor or anchor position should be modified. It
should take effect after the next commit_string event.
</description>
<arg name="serial" type="uint"/>
<arg name="index" type="int"/>
<arg name="anchor" type="int"/>
</event>
<enum name="preedit_style">
<entry name="default" value="1"/>
<entry name="active" value="2"/>