From cb08f4d844e9b85744c54a4d6e9179f44a27e3fc Mon Sep 17 00:00:00 2001 From: Jan Arne Petersen Date: Sun, 9 Sep 2012 23:08:40 +0200 Subject: text: Fix set_surrounding_text request Add cursor and anchor positions as arguments to the set_surrounding_text request. The cursor and anchor positions are relative to the surrounded text, so it does not make sense to have that separate. Remove the separate set_cursor_index and set_selected_text requests. Also update the corresponding event in input-method-context and add support for it in the weston example keyboard. Signed-off-by: Jan Arne Petersen --- protocol/text.xml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'protocol') diff --git a/protocol/text.xml b/protocol/text.xml index a196b552..6a99ebac 100644 --- a/protocol/text.xml +++ b/protocol/text.xml @@ -11,10 +11,15 @@ and compose text out of them. + + Sets the plain surrounding text around the input position. Cursor is the + position within the surrounding text. Anchor is the position of the + selection anchor within the surrounding text. If there is no selected + text anchor is the same as cursor. + - - - + + @@ -35,10 +40,6 @@ - - - - @@ -104,11 +105,16 @@ - + - The surrounding text from the model. + The plain surrounding text around the input position. Cursor is the + position within the surrounding text. Anchor is the position of the + selection anchor within the surrounding text. If there is no selected + text anchor is the same as cursor. + + -- cgit v1.2.1