diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2015-05-28 10:05:11 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2015-05-28 10:05:11 +0900 |
commit | 85166a0c73d78e12a233f1bf290416734cb15753 (patch) | |
tree | e197a4101b76e180a9b6b3e17a76051ea691bbaf | |
parent | 2b8d54c35769934101989c9ab14ecb11cf740e75 (diff) |
ecore_imf/wayland: support password mode in wayland text input
@feature
-rw-r--r-- | src/modules/ecore_imf/wayland/wayland_imcontext.c | 12 | ||||
-rw-r--r-- | src/modules/ecore_imf/wayland/wayland_imcontext.h | 3 | ||||
-rw-r--r-- | src/modules/ecore_imf/wayland/wayland_module.c | 16 |
3 files changed, 24 insertions, 7 deletions
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c index 3e1308133c..e583d3132e 100644 --- a/src/modules/ecore_imf/wayland/wayland_imcontext.c +++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c | |||
@@ -878,6 +878,18 @@ wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Inpu | |||
878 | } | 878 | } |
879 | } | 879 | } |
880 | 880 | ||
881 | EAPI void | ||
882 | wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx, | ||
883 | Ecore_IMF_Input_Mode input_mode) | ||
884 | { | ||
885 | WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx); | ||
886 | |||
887 | if (input_mode & ECORE_IMF_INPUT_MODE_INVISIBLE) | ||
888 | imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_PASSWORD; | ||
889 | else | ||
890 | imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD; | ||
891 | } | ||
892 | |||
881 | WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager) | 893 | WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager) |
882 | { | 894 | { |
883 | WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext)); | 895 | 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 9ec9f30bc2..d9b8d18282 100644 --- a/src/modules/ecore_imf/wayland/wayland_imcontext.h +++ b/src/modules/ecore_imf/wayland/wayland_imcontext.h | |||
@@ -66,6 +66,9 @@ EAPI void wayland_im_context_autocapital_type_set(Ecore_IMF_Context *ctx, | |||
66 | EAPI void wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx, | 66 | EAPI void wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx, |
67 | Ecore_IMF_Input_Panel_Layout layout); | 67 | Ecore_IMF_Input_Panel_Layout layout); |
68 | 68 | ||
69 | EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx, | ||
70 | Ecore_IMF_Input_Mode input_mode); | ||
71 | |||
69 | WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager); | 72 | WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager); |
70 | 73 | ||
71 | extern int _ecore_imf_wayland_log_dom; | 74 | 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 3e83f74097..505183fcfd 100644 --- a/src/modules/ecore_imf/wayland/wayland_module.c +++ b/src/modules/ecore_imf/wayland/wayland_module.c | |||
@@ -57,7 +57,7 @@ static Ecore_IMF_Context_Class wayland_imf_class = | |||
57 | wayland_im_context_reset, /* reset */ | 57 | wayland_im_context_reset, /* reset */ |
58 | wayland_im_context_cursor_position_set, /* cursor_position_set */ | 58 | wayland_im_context_cursor_position_set, /* cursor_position_set */ |
59 | wayland_im_context_use_preedit_set, /* use_preedit_set */ | 59 | wayland_im_context_use_preedit_set, /* use_preedit_set */ |
60 | NULL, /* input_mode_set */ | 60 | wayland_im_context_input_mode_set, /* input_mode_set */ |
61 | wayland_im_context_filter_event, /* filter_event */ | 61 | wayland_im_context_filter_event, /* filter_event */ |
62 | wayland_im_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */ | 62 | wayland_im_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */ |
63 | NULL, /* prediction_allow_set */ | 63 | NULL, /* prediction_allow_set */ |
@@ -74,12 +74,14 @@ static Ecore_IMF_Context_Class wayland_imf_class = | |||
74 | NULL, /* input_panel_return_key_type_set */ | 74 | NULL, /* input_panel_return_key_type_set */ |
75 | NULL, /* input_panel_return_key_disabled_set */ | 75 | NULL, /* input_panel_return_key_disabled_set */ |
76 | NULL, /* input_panel_caps_lock_mode_set */ | 76 | NULL, /* input_panel_caps_lock_mode_set */ |
77 | NULL, | 77 | NULL, /* input_panel_geometry_get */ |
78 | NULL, | 78 | NULL, /* input_panel_state_get */ |
79 | NULL, | 79 | NULL, /* input_panel_event_callback_add */ |
80 | NULL, | 80 | NULL, /* input_panel_event_callback_del */ |
81 | NULL, | 81 | NULL, /* input_panel_language_locale_get */ |
82 | NULL | 82 | NULL, /* candidate_window_geometry_get */ |
83 | NULL, /* input_hint_set */ | ||
84 | NULL /* bidi_direction_set */ | ||
83 | }; | 85 | }; |
84 | 86 | ||
85 | static struct wl_text_input_manager *text_input_manager = NULL; | 87 | static struct wl_text_input_manager *text_input_manager = NULL; |