summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2015-05-28 11:00:20 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2015-05-28 11:36:09 +0900
commit4237a7d2e0293700e1014ea58c1dc454ccffad9a (patch)
tree0e0e8af4088eb4168f9cc4814955e0b8bfddee94
parentedbb015fef62a5e27b060932a9758d7c528a1425 (diff)
downloadefl-4237a7d2e0293700e1014ea58c1dc454ccffad9a.tar.gz
ecore_imf/wayland: support input hint in wayland text input
@feature Change-Id: I29131fda6cfb9adec95c71d85b4e4fc72cc04d5a
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.c17
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.h3
-rw-r--r--src/modules/ecore_imf/wayland/wayland_module.c2
3 files changed, 21 insertions, 1 deletions
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index bd2fd33d5e..bc40dfd312 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -890,6 +890,23 @@ wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
}
+EAPI void
+wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
+ Ecore_IMF_Input_Hints input_hints)
+{
+ WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
+
+ if (input_hints & ECORE_IMF_INPUT_HINT_AUTO_COMPLETE)
+ imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+ else
+ imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+
+ if (input_hints & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
+ imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
+ else
+ imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
+}
+
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 d9b8d18282..3b004eec77 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.h
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.h
@@ -69,6 +69,9 @@ EAPI void wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx,
EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
Ecore_IMF_Input_Mode input_mode);
+EAPI void wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
+ Ecore_IMF_Input_Hints input_hints);
+
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 0b7e7370a0..ed343bdd9d 100644
--- a/src/modules/ecore_imf/wayland/wayland_module.c
+++ b/src/modules/ecore_imf/wayland/wayland_module.c
@@ -80,7 +80,7 @@ static Ecore_IMF_Context_Class wayland_imf_class =
NULL, /* input_panel_event_callback_del */
NULL, /* input_panel_language_locale_get */
NULL, /* candidate_window_geometry_get */
- NULL, /* input_hint_set */
+ wayland_im_context_input_hint_set, /* input_hint_set */
NULL /* bidi_direction_set */
};