text: Add delete_surrounding_text to protocol

Add delete_surrounding_text event in the text_model interface and the
request in the input_method_context interface. Implement it in the
example editor client and in the example keyboard so that the backspace
key works with it.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
This commit is contained in:
Jan Arne Petersen
2012-09-09 23:08:44 +02:00
committed by Kristian Høgsberg
parent 43f4aa8cab
commit e202bae9d3
6 changed files with 76 additions and 0 deletions
+9
View File
@@ -59,6 +59,14 @@ text_model_preedit_string(void *data,
{
}
static void
text_model_delete_surrounding_text(void *data,
struct text_model *text_model,
int32_t index,
uint32_t length)
{
}
static void
text_model_preedit_styling(void *data,
struct text_model *text_model)
@@ -112,6 +120,7 @@ text_model_deactivated(void *data,
static const struct text_model_listener text_model_listener = {
text_model_commit_string,
text_model_preedit_string,
text_model_delete_surrounding_text,
text_model_preedit_styling,
text_model_key,
text_model_selection_replacement,