jihoon pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=85166a0c73d78e12a233f1bf290416734cb15753

commit 85166a0c73d78e12a233f1bf290416734cb15753
Author: Jihoon Kim <jihoon48....@samsung.com>
Date:   Thu May 28 10:05:11 2015 +0900

    ecore_imf/wayland: support password mode in wayland text input
    
    @feature
---
 src/modules/ecore_imf/wayland/wayland_imcontext.c | 12 ++++++++++++
 src/modules/ecore_imf/wayland/wayland_imcontext.h |  3 +++
 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 3e13081..e583d31 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
    }
 }
 
+EAPI void
+wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
+                                            Ecore_IMF_Input_Mode input_mode)
+{
+   WaylandIMContext *imcontext = (WaylandIMContext 
*)ecore_imf_context_data_get(ctx);
+
+   if (input_mode & ECORE_IMF_INPUT_MODE_INVISIBLE)
+     imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+   else
+     imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+}
+
 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 9ec9f30..d9b8d18 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,
 EAPI void wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx,
                                                     
Ecore_IMF_Input_Panel_Layout layout);
 
+EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
+                                            Ecore_IMF_Input_Mode input_mode);
+
 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 3e83f74..505183f 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 =
    wayland_im_context_reset,                  /* reset */
    wayland_im_context_cursor_position_set,    /* cursor_position_set */
    wayland_im_context_use_preedit_set,        /* use_preedit_set */
-   NULL,                                      /* input_mode_set */
+   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 */
@@ -74,12 +74,14 @@ static Ecore_IMF_Context_Class wayland_imf_class =
    NULL,                                      /* 
input_panel_return_key_type_set */
    NULL,                                      /* 
input_panel_return_key_disabled_set */
    NULL,                                      /* 
input_panel_caps_lock_mode_set */
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL
+   NULL,                                      /* input_panel_geometry_get */
+   NULL,                                      /* input_panel_state_get */
+   NULL,                                      /* 
input_panel_event_callback_add */
+   NULL,                                      /* 
input_panel_event_callback_del */
+   NULL,                                      /* 
input_panel_language_locale_get */
+   NULL,                                      /* candidate_window_geometry_get 
*/
+   NULL,                                      /* input_hint_set */
+   NULL                                       /* bidi_direction_set */
 };
 
 static struct wl_text_input_manager *text_input_manager = NULL;

-- 


Reply via email to