text: Add support for pre-edit string

Add support of preedit-string to the example editor client. Also add a
preedit_string request to the input_method_context interface and use
that in the example weston keyboard to first create a pre-edit string
when entering keys and commit it on space.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
This commit is contained in:
Jan Arne Petersen
2012-09-09 23:08:43 +02:00
committed by Kristian Høgsberg
parent 892f1c3975
commit 43f4aa8cab
4 changed files with 54 additions and 4 deletions
+13 -1
View File
@@ -294,9 +294,21 @@ input_method_context_commit_string(struct wl_client *client,
text_model_send_commit_string(&context->model->resource, text, index);
}
static void
input_method_context_preedit_string(struct wl_client *client,
struct wl_resource *resource,
const char *text,
uint32_t index)
{
struct input_method_context *context = resource->data;
text_model_send_preedit_string(&context->model->resource, text, index);
}
static const struct input_method_context_interface input_method_context_implementation = {
input_method_context_destroy,
input_method_context_commit_string
input_method_context_commit_string,
input_method_context_preedit_string,
};
static void