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:
committed by
Kristian Høgsberg
parent
0a1cf393c6
commit
26ffa814d9
+11
-1
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user