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:
committed by
Kristian Høgsberg
parent
892f1c3975
commit
43f4aa8cab
+13
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user