key event isn't processed in some layouts such as PHONENUMBER, NUMBERONLY, so on 65/16765/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 27 Aug 2013 07:10:56 +0000 (16:10 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 24 Feb 2014 14:29:34 +0000 (23:29 +0900)
Change-Id: I1724b691f8ae2641cbe07917b04894e8aa07d4ab

configure.ac
packaging/ise-engine-anthy.changes [new file with mode: 0644]
packaging/ise-engine-anthy.spec
src/Makefile.am
src/scim_anthy_imengine.cpp
src/scim_anthy_imengine.h

index a246d94..9be94dd 100755 (executable)
@@ -51,6 +51,7 @@ SCIM_VERSION=1.2.0
 
 PKG_CHECK_MODULES(SCIM,[isf >= $SCIM_VERSION])
 
+PKG_CHECK_MODULES(ECORE,[ecore])
 
 AC_SUBST(SCIM_VERSION)
 
diff --git a/packaging/ise-engine-anthy.changes b/packaging/ise-engine-anthy.changes
new file mode 100644 (file)
index 0000000..88be3d5
--- /dev/null
@@ -0,0 +1,3 @@
+* Tue Aug 27 2013 Jihoon Kim <jihoon48.kim@samsung.com> submit/tizen_2.2/20130703.071152@72d18f1
+- key event isn't processed in some layouts
+
index 1281ee9..2886af2 100755 (executable)
@@ -1,7 +1,7 @@
 Name:       ise-engine-anthy
 Summary:    Anthy (Japanese) Input Method Engine for ISF
 Version:    0.0.0125
-Release:    2
+Release:    3
 Group:      TO_BE/FILLED_IN
 License:    LGPL v2.1 or later
 URL:        http://sourceforge.jp/projects/scim-imengine/
@@ -10,7 +10,7 @@ BuildRequires:  prelink
 BuildRequires:  gettext-tools
 BuildRequires:  pkgconfig(isf)
 BuildRequires:  pkgconfig(anthy)
-
+BuildRequires:  pkgconfig(ecore)
 
 %description
 ISF is an input service framework for TIZEN.
index 71db7c1..d5e1844 100755 (executable)
@@ -71,8 +71,8 @@ ise_engine_anthy_la_SOURCES = \
        scim_anthy_style_file.cpp \
        scim_anthy_utils.cpp
 
-ise_engine_anthy_la_CFLAGS   = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ @ANTHY_CFLAGS@
-ise_engine_anthy_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ @ANTHY_CFLAGS@
+ise_engine_anthy_la_CFLAGS   = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ @ANTHY_CFLAGS@ @ECORE_CFLAGS@
+ise_engine_anthy_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ @ANTHY_CFLAGS@ @ECORE_CFLAGS@
 
 ise_engine_anthy_la_LDFLAGS = \
        -avoid-version \
@@ -80,7 +80,8 @@ ise_engine_anthy_la_LDFLAGS = \
        -module \
        @LIBTOOL_EXPORT_OPTIONS@ \
        @SCIM_LIBS@ \
-       @ANTHY_LIBS@
+       @ANTHY_LIBS@ \
+       @ECORE_LIBS@
 
 
 #
index 666b67c..c7f66a4 100755 (executable)
@@ -37,6 +37,7 @@
 #include <sys/types.h>
 
 #include <scim.h>
+#include <Ecore_IMF.h>
 #include "scim_anthy_factory.h"
 #include "scim_anthy_imengine.h"
 #include "scim_anthy_prefs.h"
@@ -102,7 +103,8 @@ AnthyInstance::AnthyInstance (AnthyFactory   *factory,
       m_prev_input_mode        (SCIM_ANTHY_MODE_HIRAGANA),
       m_conv_mode              (SCIM_ANTHY_CONVERSION_MULTI_SEGMENT),
       m_helper_started         (false),
-      m_timeout_id_seq         (0)
+      m_timeout_id_seq         (0),
+      m_layout                 (ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL)
 {
     SCIM_DEBUG_IMENGINE(1) << "Create Anthy Instance : ";
 
@@ -280,6 +282,17 @@ AnthyInstance::process_key_event (const KeyEvent& key)
 {
     SCIM_DEBUG_IMENGINE(2) << "process_key_event.\n";
 
+    switch (m_layout) {
+        case ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER:
+        case ECORE_IMF_INPUT_PANEL_LAYOUT_IP:
+        case ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH:
+        case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY:
+        case ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME:
+            return false;
+        default:
+            break;
+    }
+
     // FIXME!
     // for NICOLA thumb shift key
     if (get_typing_method () == SCIM_ANTHY_TYPING_METHOD_NICOLA &&
@@ -481,6 +494,12 @@ AnthyInstance::focus_out ()
 }
 
 void
+AnthyInstance::set_layout (unsigned int layout)
+{
+    m_layout = layout;
+}
+
+void
 AnthyInstance::set_preedition (void)
 {
     update_preedit_string (m_preedit.get_string (),
index 42f942c..a4937cf 100755 (executable)
@@ -110,6 +110,7 @@ public:
 
     virtual void reload_config                (const ConfigPointer &config);
     virtual void flush ();
+    virtual void set_layout                   (unsigned int layout);
 
 public:
     /* actions */
@@ -272,6 +273,8 @@ private:
     /* timeout */
     uint32                m_timeout_id_seq;
     TimeoutClosures       m_closures;
+
+    unsigned int          m_layout;
 };
 #endif /* __SCIM_ANTHY_IMENGINE_H__ */
 /*