ecore_imf/wayland: support to set prediction allow mode 92/44892/1 accepted/tizen/mobile/20150730.014159 accepted/tizen/tv/20150730.014321 accepted/tizen/wearable/20150730.014526 submit/tizen/20150729.072918
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 29 Jul 2015 06:46:08 +0000 (15:46 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 29 Jul 2015 06:46:08 +0000 (15:46 +0900)
Change-Id: I658ea9eb13dba502386b68f9df4b0371329a8430

src/modules/ecore_imf/wayland/wayland_imcontext.c
src/modules/ecore_imf/wayland/wayland_imcontext.h
src/modules/ecore_imf/wayland/wayland_module.c

index c944ed6..254a7ad 100644 (file)
@@ -1112,6 +1112,18 @@ wayland_im_context_input_panel_language_locale_get(Ecore_IMF_Context *ctx,
      *locale = strdup(imcontext->language ? imcontext->language : "");
 }
 
+EAPI void
+wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
+                                        Eina_Bool prediction)
+{
+   WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
+
+   if (prediction)
+     imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+   else
+     imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+}
+
 WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager)
 {
    WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext));
index f5c7f6d..aeb336b 100644 (file)
@@ -91,6 +91,10 @@ EAPI void
 wayland_im_context_input_panel_language_locale_get(Ecore_IMF_Context *ctx,
                                                    char **locale);
 
+EAPI void
+wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
+                                        Eina_Bool prediction);
+
 WaylandIMContext *wayland_im_context_new        (struct wl_text_input_manager *text_input_manager);
 
 extern int _ecore_imf_wayland_log_dom;
index b8a7ec9..0a91549 100644 (file)
@@ -60,7 +60,7 @@ static Ecore_IMF_Context_Class wayland_imf_class =
    wayland_im_context_input_mode_set,         /* input_mode_set */
    wayland_im_context_filter_event,           /* filter_event */
    wayland_im_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */
-   NULL,                                      /* prediction_allow_set */
+   wayland_im_context_prediction_allow_set,   /* prediction_allow_set */
    wayland_im_context_autocapital_type_set,   /* autocapital_type_set */
    NULL,                                      /* control panel show */
    NULL,                                      /* control panel hide */