jihoon pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2b8d93a5d19f03c4d6013565a7d4083552ab4dbe

commit 2b8d93a5d19f03c4d6013565a7d4083552ab4dbe
Author: Jihoon Kim <jihoon48....@samsung.com>
Date:   Wed May 18 15:20:05 2016 +0900

    ecore_imf: Add multiline hint in input hint
    
    @feature
---
 src/lib/ecore_imf/Ecore_IMF.h                     | 1 +
 src/lib/edje/edje_entry.c                         | 4 ++++
 src/modules/ecore_imf/wayland/wayland_imcontext.c | 5 +++++
 3 files changed, 10 insertions(+)

diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 5e9766c..3c7eae7 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -356,6 +356,7 @@ typedef enum
    ECORE_IMF_INPUT_HINT_NONE                = 0,        /**< No active hints 
@since 1.12 */
    ECORE_IMF_INPUT_HINT_AUTO_COMPLETE       = 1 << 0,   /**< Suggest word auto 
completion @since 1.12 */
    ECORE_IMF_INPUT_HINT_SENSITIVE_DATA      = 1 << 1,   /**< Typed text should 
not be stored. @since 1.12 */
+   ECORE_IMF_INPUT_HINT_MULTILINE           = 1 << 2,   /**< Multiline text 
@since 1.18 */
 } Ecore_IMF_Input_Hints;
 
 enum
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 44c68ab..811af39 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -2742,6 +2742,10 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
                                          rp->part->entry_mode == 
EDJE_ENTRY_EDIT_MODE_PASSWORD ?
                                          ECORE_IMF_INPUT_MODE_INVISIBLE : 
ECORE_IMF_INPUT_MODE_FULL);
 
+        if (rp->part->multiline)
+          ecore_imf_context_input_hint_set(en->imf_context,
+                                           
ecore_imf_context_input_hint_get(en->imf_context) | 
ECORE_IMF_INPUT_HINT_MULTILINE);
+
         if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD)
           ecore_imf_context_input_panel_language_set(en->imf_context, 
ECORE_IMF_INPUT_PANEL_LANG_ALPHABET);
 #endif
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c 
b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index c852c56..9cd5c63 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -1046,6 +1046,11 @@ wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
      imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
    else
      imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
+
+   if (input_hints & ECORE_IMF_INPUT_HINT_MULTILINE)
+     imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_MULTILINE;
+   else
+     imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_MULTILINE;
 }
 
 EAPI void

-- 


Reply via email to