From 2c00d136b3314d79043dee0958239a642dc80382 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 18 Sep 2015 15:40:02 +0900 Subject: [PATCH] ecore_imf/wayland: support to set the selection region Change-Id: I41ea27b864976e864dae0125543972f9a850d5de --- src/modules/ecore_imf/wayland/wayland_imcontext.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c index a9f94f5..cd89930 100644 --- a/src/modules/ecore_imf/wayland/wayland_imcontext.c +++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c @@ -730,6 +730,23 @@ text_input_text_direction(void *data EINA_UNUSED, { } +static void +text_input_selection_region(void *data, + struct wl_text_input *text_input EINA_UNUSED, + uint32_t serial EINA_UNUSED, + int32_t start, + int32_t end) +{ + WaylandIMContext *imcontext = (WaylandIMContext *)data; + if (!imcontext || !imcontext->ctx) return; + + Ecore_IMF_Event_Selection ev; + ev.ctx = imcontext->ctx; + ev.start = start; + ev.end = end; + ecore_imf_context_event_callback_call(imcontext->ctx, ECORE_IMF_CALLBACK_SELECTION_SET, &ev); +} + static const struct wl_text_input_listener text_input_listener = { text_input_enter, @@ -744,7 +761,8 @@ static const struct wl_text_input_listener text_input_listener = text_input_delete_surrounding_text, text_input_keysym, text_input_language, - text_input_text_direction + text_input_text_direction, + text_input_selection_region }; EAPI void -- 2.7.4