summaryrefslogtreecommitdiff
path: root/ism
diff options
context:
space:
mode:
authorInHong Han <inhong1.han@samsung.com>2020-07-16 19:46:41 +0900
committerInHong Han <inhong1.han@samsung.com>2020-07-24 17:37:24 +0900
commitcc796b5193abdb53789f9721a3f3e6b83faa7efa (patch)
tree4b44f3690010558c58de04a62108b5de78b49738 /ism
parent81f36c6abe528fd0de1c831aa28f8707f8b787ff (diff)
downloadisf-cc796b5193abdb53789f9721a3f3e6b83faa7efa.tar.gz
isf-cc796b5193abdb53789f9721a3f3e6b83faa7efa.tar.bz2
isf-cc796b5193abdb53789f9721a3f3e6b83faa7efa.zip
Support ise-engine-loader feature
Change-Id: I589c2840b42c6b316f3c7bee2a2d8e94deefafb9
Diffstat (limited to 'ism')
-rw-r--r--ism/src/scim_helper.cpp61
-rw-r--r--ism/src/scim_helper.h28
2 files changed, 85 insertions, 4 deletions
diff --git a/ism/src/scim_helper.cpp b/ism/src/scim_helper.cpp
index 7cb5f085..c1253290 100644
--- a/ism/src/scim_helper.cpp
+++ b/ism/src/scim_helper.cpp
@@ -236,12 +236,15 @@ public:
HelperAgentSignalStringVoid signal_set_mime_type;
HelperAgentSignalString signal_set_prediction_hint_data;
HelperAgentSignalUintVoid signal_set_optimization_hint;
+ HelperAgentSignalKeyEventUint signal_process_key_event_with_imengine;
+ HelperAgentSignalUintVoid signal_set_autocapital_type;
+ HelperAgentSignalUintVoid signal_set_prediction_allow;
public:
HelperAgentImpl (HelperAgent* thiz) : magic(0), magic_active(0), timeout(-1), focused_ic ((uint32) -1), thiz (thiz),
surrounding_text (NULL), selection_text (NULL), cursor_pos (0),
need_update_surrounding_text (0), need_update_selection_text (0),
- layout (0), ise_show_flag (false), need_update_entry_metadata (false), ise_focus_flag (false),
+ layout (0), ise_show_flag (false), need_update_entry_metadata (true), ise_focus_flag (false),
finalized_text(NULL), finalized_cursor_pos(0) {
}
@@ -588,7 +591,7 @@ public:
}
}
private:
- HelperAgentImpl () : magic (0), magic_active (0), timeout (-1), focused_ic ((uint32) -1), thiz (NULL), surrounding_text (NULL), selection_text (NULL), cursor_pos (0), need_update_surrounding_text (0), need_update_selection_text (0), layout (0), ise_show_flag (false), need_update_entry_metadata (false), ise_focus_flag (false), finalized_text (NULL), finalized_cursor_pos (0) { }
+ HelperAgentImpl () : magic (0), magic_active (0), timeout (-1), focused_ic ((uint32) -1), thiz (NULL), surrounding_text (NULL), selection_text (NULL), cursor_pos (0), need_update_surrounding_text (0), need_update_selection_text (0), layout (0), ise_show_flag (false), need_update_entry_metadata (true), ise_focus_flag (false), finalized_text (NULL), finalized_cursor_pos (0) { }
};
static MessageQueue message_queue;
@@ -1026,8 +1029,8 @@ HelperAgent::handle_message (MessageItem *message)
{
MessageItemFocusIn *subclass = static_cast<MessageItemFocusIn*>(message);
m_impl->ise_focus_flag = true;
- if (_TV)
- m_impl->need_update_entry_metadata = true;
+ if (_WEARABLE)
+ m_impl->need_update_entry_metadata = false;
m_impl->signal_focus_in (this, subclass->get_ic_ref(), subclass->get_ic_uuid_ref());
m_impl->focused_ic = subclass->get_ic_ref();
if (m_impl->finalized_text != NULL)
@@ -1174,6 +1177,12 @@ HelperAgent::handle_message (MessageItem *message)
SECURE_LOGD ("imengine(%s) process key %d return %d", m_impl->si->get_factory_uuid().c_str(),
subclass->get_key_ref().code, ret);
}
+ } else {
+ if (!(subclass->get_key_ref().get_key_string().compare("KeyRelease+XF86Back") == 0 ||
+ subclass->get_key_ref().get_key_string().compare("XF86Back") == 0)) {
+ m_impl->signal_process_key_event_with_imengine(this, subclass->get_key_ref(), ret);
+ SECURE_LOGD ("imengine process key %d return %d", subclass->get_key_ref().code, ret);
+ }
}
}
if (ret != keycode_ret)
@@ -1442,12 +1451,14 @@ HelperAgent::handle_message (MessageItem *message)
{
MessageItemSetAutocapitalType *subclass = static_cast<MessageItemSetAutocapitalType*>(message);
if (!m_impl->si.null ()) m_impl->si->set_autocapital_type(subclass->get_auto_capital_type_ref());
+ m_impl->signal_set_autocapital_type(this, subclass->get_auto_capital_type_ref());
break;
}
case ISM_TRANS_CMD_SET_PREDICTION_ALLOW:
{
MessageItemSetPredictionAllow *subclass = static_cast<MessageItemSetPredictionAllow*>(message);
if (!m_impl->si.null ()) m_impl->si->set_prediction_allow(subclass->get_prediction_allow_ref() == 0 ? false : true);
+ m_impl->signal_set_prediction_allow(this, subclass->get_prediction_allow_ref());
break;
}
case ISM_TRANS_CMD_SET_KEYBOARD_MODE:
@@ -3615,6 +3626,48 @@ HelperAgent::signal_connect_set_optimization_hint (HelperAgentSlotUintVoid *slot
return m_impl->signal_set_optimization_hint.connect (slot);
}
+/**
+ * @brief Connect a slot to Helper process key event with imengine signal.
+ *
+ * This signal is used to deliver the key event to Helper ISE.
+ *
+ * The prototype of the slot is:
+ * void process_key_event_with_imengine (const HelperAgent *agent, KeyEvent &key, uint32 &ret);
+ */
+Connection
+HelperAgent::signal_connect_process_key_event_with_imengine (HelperAgentSlotKeyEventUint *slot)
+{
+ return m_impl->signal_process_key_event_with_imengine.connect (slot);
+}
+
+/**
+ * @brief Connect a slot to Helper set autocapital type signal.
+ *
+ * This signal is used to send autocapital type to imengine.
+ *
+ * The prototype of the slot is:
+ * void set_autocapital_type (const HelperAgent *agent, uint32 &type);
+ */
+Connection
+HelperAgent::signal_connect_set_autocapital_type (HelperAgentSlotUintVoid *slot)
+{
+ return m_impl->signal_set_autocapital_type.connect (slot);
+}
+
+/**
+ * @brief Connect a slot to Helper set prediction allow signal.
+ *
+ * This signal is used to send prediction allow to imengine.
+ *
+ * The prototype of the slot is:
+ * void set_prediction_allow (const HelperAgent *agent, uint32 &prediction_allow);
+ */
+Connection
+HelperAgent::signal_connect_set_prediction_allow (HelperAgentSlotUintVoid *slot)
+{
+ return m_impl->signal_set_prediction_allow.connect (slot);
+}
+
} /* namespace scim */
/*
diff --git a/ism/src/scim_helper.h b/ism/src/scim_helper.h
index 2dc0ba0e..3473cff3 100644
--- a/ism/src/scim_helper.h
+++ b/ism/src/scim_helper.h
@@ -1428,6 +1428,34 @@ public:
* void set_optimization_hint (const HelperAgent *agent, uint32 &hint);
*/
Connection signal_connect_set_optimization_hint (HelperAgentSlotUintVoid *slot);
+
+ /**
+ * @brief Connect a slot to Helper process key event with imengine signal.
+ *
+ * The prototype of the slot is:
+ * void process_key_event_with_imengine (const HelperAgent *, KeyEvent &key, uint32 &ret);
+ */
+ Connection signal_connect_process_key_event_with_imengine (HelperAgentSlotKeyEventUint *slot);
+
+ /**
+ * @brief Connect a slot to Helper set autocapital type signal.
+ *
+ * This signal is used to send autocapital type to imengine.
+ *
+ * The prototype of the slot is:
+ * void set_autocapital_type (const HelperAgent *agent, uint32 &type);
+ */
+ Connection signal_connect_set_autocapital_type (HelperAgentSlotUintVoid *slot);
+
+ /**
+ * @brief Connect a slot to Helper set prediction allow signal.
+ *
+ * This signal is used to send prediction allow to imengine.
+ *
+ * The prototype of the slot is:
+ * void set_prediction_allow (const HelperAgent *agent, uint32 &prediction_allow);
+ */
+ Connection signal_connect_set_prediction_allow (HelperAgentSlotUintVoid *slot);
};
/** @} */