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>
diff --git a/src/text-backend.c b/src/text-backend.c
index 63b6b57..4fb4d95 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -294,9 +294,21 @@
 	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