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:35:05 +0900
commit7240a71d333274a0d6b2d999a9c1d18d634d607a (patch)
treeaa7bc17257a311fdaea575f913b2b45d8fdccdb3
parent29cf9abfc6c2bb7f38280011221445864cb19a9c (diff)
ecore_imf/wayland: support input hint in wayland text input
@feature
-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 e583d3132e..29bb554116 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,
890 imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD; 890 imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
891} 891}
892 892
893EAPI void
894wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
895 Ecore_IMF_Input_Hints input_hints)
896{
897 WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
898
899 if (input_hints & ECORE_IMF_INPUT_HINT_AUTO_COMPLETE)
900 imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
901 else
902 imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
903
904 if (input_hints & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
905 imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
906 else
907 imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
908}
909
893WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager) 910WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager)
894{ 911{
895 WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext)); 912 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,
69EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx, 69EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
70 Ecore_IMF_Input_Mode input_mode); 70 Ecore_IMF_Input_Mode input_mode);
71 71
72EAPI void wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
73 Ecore_IMF_Input_Hints input_hints);
74
72WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager); 75WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager);
73 76
74extern int _ecore_imf_wayland_log_dom; 77extern 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 505183fcfd..c65ff8a09b 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 =
80 NULL, /* input_panel_event_callback_del */ 80 NULL, /* input_panel_event_callback_del */
81 NULL, /* input_panel_language_locale_get */ 81 NULL, /* input_panel_language_locale_get */
82 NULL, /* candidate_window_geometry_get */ 82 NULL, /* candidate_window_geometry_get */
83 NULL, /* input_hint_set */ 83 wayland_im_context_input_hint_set, /* input_hint_set */
84 NULL /* bidi_direction_set */ 84 NULL /* bidi_direction_set */
85}; 85};
86 86