Add a helper option for 3rd party keyboard 41/41341/2
authorSungmin Kwak <sungmin.kwak@samsung.com>
Sat, 7 Mar 2015 07:13:11 +0000 (16:13 +0900)
committerLi Zhang <li2012.zhang@samsung.com>
Wed, 17 Jun 2015 09:03:55 +0000 (17:03 +0800)
Avoid sending key event to IMEngine.

Change-Id: I6a9a49137c6230de5013e442bfd42856487b2f33

ism/extras/efl_immodule/isf_imf_context.cpp
ism/src/isf_query_utility.cpp
ism/src/scim_helper.h

index 1c6c97f..2331415 100644 (file)
@@ -2232,9 +2232,12 @@ isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type,
                 ret = _focused_ic->impl->si->process_key_event (key);
             }
 #else
-        } else if (get_keyboard_mode () == TOOLBAR_KEYBOARD_MODE && (_active_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
+        } else if (_active_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
             void *pvoid = &ret;
             _panel_client.process_key_event (key, (int*)pvoid);
+            if (!ret && !(_active_helper_option & ISM_HELPER_WITHOUT_IMENGINE)) {
+                ret = _focused_ic->impl->si->process_key_event (key);
+            }
 #endif
         } else {
             ret = _focused_ic->impl->si->process_key_event (key);
index 3afebba..d210578 100644 (file)
@@ -863,12 +863,12 @@ static int _filtered_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_
     ime_db.languages = String("en");
 
     if (ime_db.pkgtype.compare("rpm") == 0 &&   //1 Inhouse IMEngine ISE(IME)
-        //(ime_db.pkgid.find("ise-engine") != String::npos || ime_db.appid.find("ise-engine") != String::npos)) // FIXME: this checking code is a temporary one, but...
         ime_db.exec.find("scim-launcher") != String::npos)  // Some IMEngine's pkgid doesn't have "ise-engine" prefix.
     {
         ime_db.mode = TOOLBAR_KEYBOARD_MODE;
         ime_db.options = 0;
-        ime_db.module_path = String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION) + String(SCIM_PATH_DELIM_STRING) + String("IMEngine");
+        ime_db.module_path = String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION)
+            + String(SCIM_PATH_DELIM_STRING) + String("IMEngine");
         ime_db.module_name = ime_db.pkgid;
     }
     else {
@@ -876,18 +876,22 @@ static int _filtered_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_
         if (ime_db.pkgtype.compare("rpm") == 0) //1 Inhouse Helper ISE(IME)
         {
             ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART;
-            ime_db.module_path = String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION) + String(SCIM_PATH_DELIM_STRING) + String("Helper");
+            ime_db.module_path = String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION)
+                + String(SCIM_PATH_DELIM_STRING) + String("Helper");
             ime_db.module_name = ime_db.pkgid;
         }
         else if (ime_db.pkgtype.compare("wgt") == 0)    //1 Download Web IME
         {
-            ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART | SCIM_HELPER_NEED_SPOT_LOCATION_INFO | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT;
-            ime_db.module_path = String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION) + String(SCIM_PATH_DELIM_STRING) + String("Helper");
+            ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART
+                | SCIM_HELPER_NEED_SPOT_LOCATION_INFO | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT | ISM_HELPER_WITHOUT_IMENGINE;
+            ime_db.module_path = String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION)
+                + String(SCIM_PATH_DELIM_STRING) + String("Helper");
             ime_db.module_name = String("ise-web-helper-agent");
         }
         else if (ime_db.pkgtype.compare("coretpk") == 0)    //1 Download Native IME
         {
-            ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT;
+            ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART
+                | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT | ISM_HELPER_WITHOUT_IMENGINE;
             if (path)
                 ime_db.module_path = String(path);
             else
index d2d6d27..dd3d9c0 100644 (file)
@@ -117,6 +117,10 @@ const uint32 ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT = (1<<16);
  */
 const uint32 ISM_ISE_HIDE_IN_CONTROL_PANEL       = (1<<17);
 
+/**
+ * @brief ISE option for 3rd party; IMEngine is not available.
+ */
+const uint32 ISM_HELPER_WITHOUT_IMENGINE         = (1<<18);
 
 /**
  * @brief Structure to hold the information of a Helper object.