From e3e1b45b53923a6519cacbb58118f6b1e87b8ea5 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Thu, 6 Apr 2023 10:19:29 +0900 Subject: [PATCH] text, input-method: Add protocol for surrounding text Change-Id: I22bc00429fb0418209febf85a75ea141eede9df4 --- protocol/tizen/input-method.xml | 18 ++++++++++++++ protocol/tizen/text.xml | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/protocol/tizen/input-method.xml b/protocol/tizen/input-method.xml index e078568..7fedae4 100644 --- a/protocol/tizen/input-method.xml +++ b/protocol/tizen/input-method.xml @@ -405,6 +405,24 @@ + + + + The plain surrounding text around the input position. Cursor is the + position in bytes within the surrounding text relative to the beginning + of the text. Anchor is the position in bytes of the selection anchor + within the surrounding text relative to the beginning of the text. If + there is no selected text then anchor is the same as cursor. If the text + length exceeds 4000 bytes, the segmented text is delivered multiple times. + You can use the block_size to set the number of times the text is delivered. + And the block_index is the order of text delivered. + + + + + + + diff --git a/protocol/tizen/text.xml b/protocol/tizen/text.xml index 4e831f0..2e8780e 100644 --- a/protocol/tizen/text.xml +++ b/protocol/tizen/text.xml @@ -301,6 +301,48 @@ + + + Sets the surrounding plain text around the input, excluding the preedit + text. + + The client should notify the compositor of any changes in any of the + values carried with this request, including changes caused by handling + incoming text-input events as well as changes caused by other + mechanisms like keyboard typing. + + If the client is unaware of the text around the cursor, it should not + issue this request, to signify lack of support to the compositor. + + Text is UTF-8 encoded, and should include the cursor position, the + complete selection and additional characters before and after them. + + Cursor is the byte offset of the cursor within text buffer. + + Anchor is the byte offset of the selection anchor within text buffer. + If there is no selected text, anchor is the same as cursor. + + If the text length exceeds 4000 bytes, the segmented text is delivered + multiple times. You can use the block_size to set the number of times + the text is delivered. And the block_index is the order of text delivered. + + If any preedit text is present, it is replaced with a cursor for the + purpose of this event. + + Values set with this request are double-buffered. They will get applied + on the next commit request, and stay valid until the next committed + enable or disable request. + + The initial state for affected fields is empty, meaning that the text + input does not support sending surrounding text. If the empty values + get applied, subsequent attempts to change them may have no effect. + + + + + + + Notify the text_input object when it received focus. Typically in -- 2.34.1