text: Add content type support to text protocol

Support content types in text protocol. Content is defined by a hint
bitmask and a purpose field.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
This commit is contained in:
Jan Arne Petersen
2013-01-16 21:26:43 +01:00
committed by Kristian Høgsberg
parent 0a1cf393c6
commit 26ffa814d9
3 changed files with 66 additions and 2 deletions
+11 -1
View File
@@ -234,8 +234,18 @@ text_model_set_preedit(struct wl_client *client,
static void
text_model_set_content_type(struct wl_client *client,
struct wl_resource *resource)
struct wl_resource *resource,
uint32_t hint,
uint32_t purpose)
{
struct text_model *text_model = resource->data;
struct input_method *input_method, *next;
wl_list_for_each_safe(input_method, next, &text_model->input_methods, link) {
if (!input_method->context)
continue;
input_method_context_send_content_type(&input_method->context->resource, hint, purpose);
}
}
static const struct text_model_interface text_model_implementation = {