Added interface for delivering floating IME requests
[platform/core/uifw/isf.git] / ism / src / scim_helper.cpp
index 1ac4e06..5bc3260 100644 (file)
@@ -2739,6 +2739,33 @@ HelperAgent::send_key_event_processing_result (KeyEvent &key,
     m_impl->process_key_event_done (key, ret, serial);
 }
 
+void
+HelperAgent::set_floating_mode (bool floating_mode)
+{
+    LOGD ("");
+    if (m_impl->socket_active.is_connected ()) {
+        m_impl->send.clear ();
+        m_impl->send.put_command (SCIM_TRANS_CMD_REQUEST);
+        m_impl->send.put_data (m_impl->magic_active);
+        m_impl->send.put_command (ISM_TRANS_CMD_SET_FLOATING_MODE);
+        m_impl->send.put_data (floating_mode ? 1 : 0);
+        m_impl->send.write_to_socket (m_impl->socket_active, m_impl->magic_active);
+    }
+}
+
+void
+HelperAgent::set_floating_drag_enabled (bool enabled)
+{
+    if (m_impl->socket_active.is_connected ()) {
+        m_impl->send.clear ();
+        m_impl->send.put_command (SCIM_TRANS_CMD_REQUEST);
+        m_impl->send.put_data (m_impl->magic_active);
+        m_impl->send.put_command (ISM_TRANS_CMD_SET_FLOATING_DRAG_ENABLED);
+        m_impl->send.put_data (enabled ? 1 : 0);
+        m_impl->send.write_to_socket (m_impl->socket_active, m_impl->magic_active);
+    }
+}
+
 /**
  * @brief Connect a slot to Helper exit signal.
  *