summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2016-02-04 12:00:45 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2016-02-04 12:00:45 +0900
commit584a5a32a216203bf57b090390c415747b690968 (patch)
tree5ba285f0362a73a483183d4dd3776fe3b0ce7d9c /src
parentb1336a27c1a5de3e6f629ff47552deec5fdf172a (diff)
downloadefl-584a5a32a216203bf57b090390c415747b690968.tar.gz
ecore_imf/wayland: support to set prediction allow mode
Diffstat (limited to 'src')
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.c12
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.h4
-rw-r--r--src/modules/ecore_imf/wayland/wayland_module.c2
3 files changed, 17 insertions, 1 deletions
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index d58606eaf4..c23343f6ad 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -987,6 +987,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));
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.h b/src/modules/ecore_imf/wayland/wayland_imcontext.h
index 18925e5662..483e4829ca 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.h
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.h
@@ -83,6 +83,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;
diff --git a/src/modules/ecore_imf/wayland/wayland_module.c b/src/modules/ecore_imf/wayland/wayland_module.c
index 7fc2474745..a47aaeeac9 100644
--- a/src/modules/ecore_imf/wayland/wayland_module.c
+++ b/src/modules/ecore_imf/wayland/wayland_module.c
@@ -61,7 +61,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 */