Add interface to send private command from IME to application 68/33568/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 11 Jul 2014 02:19:27 +0000 (11:19 +0900)
committerLi Zhang <li2012.zhang@samsung.com>
Tue, 13 Jan 2015 08:10:57 +0000 (16:10 +0800)
[model] Redwood, B1, B2
[binary_type] PDA
[customer] OPEN
[issue#] N/A
[problem] IME send only key event to application, other interface requires.
[cause] No interface to send private command
[solution] Add interface to send private command from IME to application
[team] Input Framework
[request] N/A
[horizontal_expansion] N/A

Change-Id: Ia9f76f1b14a6dc6d3499bf688e6a35ddde6dbd37

17 files changed:
ism/extras/efl_immodule/isf_imf_context.cpp
ism/modules/frontend/scim_socket_frontend.cpp
ism/modules/frontend/scim_socket_frontend.h
ism/modules/frontend/scim_x11_frontend.h
ism/modules/imengine/scim_socket_imengine.cpp
ism/src/scim_filter.cpp
ism/src/scim_filter.h
ism/src/scim_frontend.cpp
ism/src/scim_frontend.h
ism/src/scim_helper.cpp
ism/src/scim_helper.h
ism/src/scim_imengine.cpp
ism/src/scim_imengine.h
ism/src/scim_panel_agent.cpp
ism/src/scim_panel_client.cpp
ism/src/scim_panel_client.h
ism/src/scim_trans_commands.h

index d78ea9a7aee15c37f3f9f49ee084004d45922477..c4087c5a9fd87e09041a726779f760d98fcb46c0 100644 (file)
@@ -148,7 +148,8 @@ static void     panel_slot_get_selection                (int
 static void     panel_slot_set_selection                (int                     context,
                                                          int                     start,
                                                          int                     end);
-
+static void     panel_slot_send_private_command         (int                     context,
+                                                         const String           &command);
 static void     panel_req_focus_in                      (EcoreIMFContextISF     *ic);
 static void     panel_req_update_factory_info           (EcoreIMFContextISF     *ic);
 static void     panel_req_update_spot_location          (EcoreIMFContextISF     *ic);
@@ -235,13 +236,14 @@ static bool     slot_get_selection                      (IMEngineInstanceBase
 static bool     slot_set_selection                      (IMEngineInstanceBase   *si,
                                                          int                     start,
                                                          int                     end);
-
 static void     slot_expand_candidate                   (IMEngineInstanceBase   *si);
 static void     slot_contract_candidate                 (IMEngineInstanceBase   *si);
 
 static void     slot_set_candidate_style                (IMEngineInstanceBase   *si,
                                                          ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line,
                                                          ISF_CANDIDATE_MODE_T    mode);
+static void     slot_send_private_command               (IMEngineInstanceBase   *si,
+                                                         const String           &command);
 
 static void     reload_config_callback                  (const ConfigPointer    &config);
 
@@ -2657,7 +2659,7 @@ panel_slot_set_selection (int context, int start, int end)
 
     EcoreIMFContextISF *ic = find_ic (context);
 
-    if (ic && ic->impl && _focused_ic == ic && ic->impl->si)
+    if (ic && ic->impl && ic->impl->si && _focused_ic == ic)
         slot_set_selection (ic->impl->si, start, end);
 }
 
@@ -2666,7 +2668,7 @@ panel_slot_update_displayed_candidate_number (int context, int number)
 {
     EcoreIMFContextISF *ic = find_ic (context);
     SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " number=" << number << " ic=" << ic << "\n";
-    if (ic && ic->impl && _focused_ic == ic && ic->impl->si) {
+    if (ic && ic->impl && ic->impl->si && _focused_ic == ic) {
         _panel_client.prepare (ic->id);
         ic->impl->si->update_displayed_candidate_number (number);
         _panel_client.send ();
@@ -2678,7 +2680,7 @@ panel_slot_candidate_more_window_show (int context)
 {
     EcoreIMFContextISF *ic = find_ic (context);
     SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " ic=" << ic << "\n";
-    if (ic && ic->impl && _focused_ic == ic && ic->impl->si) {
+    if (ic && ic->impl && ic->impl->si && _focused_ic == ic) {
         _panel_client.prepare (ic->id);
         ic->impl->si->candidate_more_window_show ();
         _panel_client.send ();
@@ -2690,7 +2692,7 @@ panel_slot_candidate_more_window_hide (int context)
 {
     EcoreIMFContextISF *ic = find_ic (context);
     SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " ic=" << ic << "\n";
-    if (ic && ic->impl && _focused_ic == ic && ic->impl->si) {
+    if (ic && ic->impl && ic->impl->si && _focused_ic == ic) {
         _panel_client.prepare (ic->id);
         ic->impl->si->candidate_more_window_hide ();
         _panel_client.send ();
@@ -2702,7 +2704,7 @@ panel_slot_longpress_candidate (int context, int index)
 {
     EcoreIMFContextISF *ic = find_ic (context);
     SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " index=" << index << " ic=" << ic << "\n";
-    if (ic && ic->impl && _focused_ic == ic && ic->impl->si) {
+    if (ic && ic->impl && ic->impl->si && _focused_ic == ic) {
         _panel_client.prepare (ic->id);
         ic->impl->si->longpress_candidate (index);
         _panel_client.send ();
@@ -2725,6 +2727,17 @@ panel_slot_update_isf_candidate_panel (int context, int type, int value)
     process_update_input_context (type, value);
 }
 
+static void
+panel_slot_send_private_command (int context, const String &command)
+{
+    SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
+
+    EcoreIMFContextISF *ic = find_ic (context);
+
+    if (ic && ic->impl && ic->impl->si && _focused_ic == ic)
+        slot_send_private_command (ic->impl->si, command);
+}
+
 /* Panel Requestion functions. */
 static void
 panel_req_show_help (EcoreIMFContextISF *ic)
@@ -3278,6 +3291,7 @@ initialize (void)
     _panel_client.signal_connect_longpress_candidate           (slot (panel_slot_longpress_candidate));
     _panel_client.signal_connect_update_ise_input_context      (slot (panel_slot_update_ise_input_context));
     _panel_client.signal_connect_update_isf_candidate_panel    (slot (panel_slot_update_isf_candidate_panel));
+    _panel_client.signal_connect_send_private_command          (slot (panel_slot_send_private_command));
 
     if (!panel_initialize ()) {
         std::cerr << "Ecore IM Module: Cannot connect to Panel!\n";
@@ -3775,6 +3789,9 @@ attach_instance (const IMEngineInstancePointer &si)
 
     si->signal_connect_set_candidate_style (
         slot (slot_set_candidate_style));
+
+    si->signal_connect_send_private_command (
+        slot (slot_send_private_command));
 }
 
 // Implementation of slot functions
@@ -4181,7 +4198,7 @@ slot_delete_surrounding_text (IMEngineInstanceBase *si,
 
     EcoreIMFContextISF *ic = static_cast<EcoreIMFContextISF *> (si->get_frontend_data ());
 
-    if (ic && ic->impl && _focused_ic == ic) {
+    if (_focused_ic && _focused_ic == ic) {
         Ecore_IMF_Event_Delete_Surrounding ev;
         ev.ctx = _focused_ic->ctx;
         ev.n_chars = len;
@@ -4202,7 +4219,7 @@ slot_get_selection (IMEngineInstanceBase *si,
 #ifdef _WEARABLE
     EcoreIMFContextISF *ic = static_cast<EcoreIMFContextISF *> (si->get_frontend_data ());
 
-    if (ic && ic->impl && _focused_ic == ic) {
+    if (_focused_ic && _focused_ic == ic) {
         char *selection = NULL;
         if (ecore_imf_context_selection_get (_focused_ic->ctx, &selection)) {
             SCIM_DEBUG_FRONTEND(2) << "Selection: " << selection <<"\n";
@@ -4230,7 +4247,7 @@ slot_set_selection (IMEngineInstanceBase *si,
 #ifdef _WEARABLE
     EcoreIMFContextISF *ic = static_cast<EcoreIMFContextISF *> (si->get_frontend_data ());
 
-    if (ic && ic->impl && _focused_ic == ic) {
+    if (_focused_ic && _focused_ic == ic) {
         Ecore_IMF_Event_Selection ev;
         ev.ctx = _focused_ic->ctx;
         ev.start = start;
@@ -4275,6 +4292,19 @@ slot_set_candidate_style (IMEngineInstanceBase *si, ISF_CANDIDATE_PORTRAIT_LINE_
         _panel_client.set_candidate_style (ic->id, portrait_line, mode);
 }
 
+static void
+slot_send_private_command (IMEngineInstanceBase *si,
+                           const String &command)
+{
+    SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
+
+    EcoreIMFContextISF *ic = static_cast<EcoreIMFContextISF *> (si->get_frontend_data ());
+
+    if (_focused_ic && _focused_ic == ic) {
+        ecore_imf_context_event_callback_call (_focused_ic->ctx, ECORE_IMF_CALLBACK_PRIVATE_COMMAND_SEND, (void *)command.c_str ());
+    }
+}
+
 static void
 reload_config_callback (const ConfigPointer &config)
 {
index 77cdce3036dd5d2393593411be369127f56442ed..44a6a995c61f59dd580d61b75adf14a8addc4624 100644 (file)
@@ -742,6 +742,15 @@ SocketFrontEnd::set_selection (int id, int start, int end)
     return ret;
 }
 
+void
+SocketFrontEnd::send_private_command (int id, const String &command)
+{
+    if (m_current_instance == id) {
+        m_send_trans.put_command (SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND);
+        m_temp_trans.put_data (command);
+    }
+}
+
 void
 SocketFrontEnd::expand_candidate (int id)
 {
index 39a190fbd663f44b2844478e996408f43646dc61..799308a591e7b3c621fb3f46e0824d8b021a9e76 100644 (file)
@@ -149,6 +149,8 @@ protected:
                                           ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line,
                                           ISF_CANDIDATE_MODE_T          mode);
 
+    virtual void send_private_command    (int id, const String &command);
+
 public:
     virtual void init (int argc, char **argv);
     virtual void run ();
index 9e56cbaad667737b7f4bd057c241e5b456db8b5a..b429f28b22d2557825425c7828bf102d6dbbd046 100644 (file)
@@ -124,6 +124,8 @@ protected:
     virtual bool get_selection           (int siid, WideString &text);
     virtual bool set_selection           (int siid, int start, int end);
 
+    virtual void send_private_command    (int siid, const String & command);
+
 public:
     virtual void init (int argc, char **argv);
     virtual void run ();
index bd136724076ba58d172232bc5aaa7763e5972e68..95a9b1fdcffe941685eeed697ebc759aee76ec22 100644 (file)
@@ -1259,6 +1259,14 @@ SocketInstance::do_transaction (Transaction &trans, bool &ret)
                     cont = true;
                     break;
                 }
+                case SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND:
+                {
+                    String command;
+                    if (trans.get_data (command)) {
+                        send_private_command (command);
+                    }
+                    break;
+                }
                 case ISM_TRANS_CMD_EXPAND_CANDIDATE:
                 {
                     SCIM_DEBUG_IMENGINE(3) << "  expand_candidate ()\n";
index 65109c9650ce309b6bbd1831facaaf5bdb9e5baa..1c87bc855b2b4870918b5d878567c269c9f0ed02 100644 (file)
@@ -188,6 +188,9 @@ public:
 
             m_orig->signal_connect_set_selection (
                 slot (this, &FilterInstanceBase::FilterInstanceBaseImpl::slot_set_selection));
+
+            m_orig->signal_connect_send_private_command (
+                slot (this, &FilterInstanceBase::FilterInstanceBaseImpl::slot_send_private_command));
         }
     }
 
@@ -331,6 +334,10 @@ private:
     bool slot_set_selection          (IMEngineInstanceBase * si, int start, int end) {
         return m_parent->filter_set_selection (start, end);
     }
+
+    void slot_send_private_command   (IMEngineInstanceBase * si, const String & command) {
+        m_parent->filter_send_private_command (command);
+    }
 };
 
 FilterInstanceBase::FilterInstanceBase (FilterFactoryBase     *factory,
@@ -558,6 +565,12 @@ FilterInstanceBase::filter_set_selection (int start, int end)
     return set_selection (start, end);
 }
 
+void
+FilterInstanceBase::filter_send_private_command (const String &command)
+{
+    send_private_command (command);
+}
+
 } // namespace scim
 
 /*
index 2ba880722d9a5f1408ae85319f19fd2803ed4d40..0a2f68136a15ba52c3dcaa0e85d442e8cff79c0e 100644 (file)
@@ -388,6 +388,7 @@ protected:
     virtual bool filter_delete_surrounding_text (int offset, int len);
     virtual bool filter_get_selection (WideString &text);
     virtual bool filter_set_selection (int start, int end);
+    virtual void filter_send_private_command (const String &command);
     /** @} */
 };
 
index 52bb1e4913aeeebcb4c08fc43b1ad83c4957a0cc..9f69fcfdf93a803699bdb71551f09e445cc1762b 100644 (file)
@@ -175,6 +175,10 @@ public:
         m_frontend->set_candidate_style (si->get_id (), portrait_line, mode);
     }
 
+    void slot_send_private_command(IMEngineInstanceBase * si, const String & command) {
+        m_frontend->send_private_command (si->get_id (), command);
+    }
+
     void attach_instance (const IMEngineInstancePointer &si)
     {
         si->signal_connect_show_preedit_string (
@@ -244,6 +248,9 @@ public:
 
         si->signal_connect_set_candidate_style (
             slot (this, &FrontEndBase::FrontEndBaseImpl::slot_set_candidate_style));
+
+        si->signal_connect_send_private_command (
+            slot (this, &FrontEndBase::FrontEndBaseImpl::slot_send_private_command));
     }
 };
 
@@ -928,6 +935,10 @@ FrontEndBase::set_candidate_style (int id, ISF_CANDIDATE_PORTRAIT_LINE_T portrai
 {
 }
 void
+FrontEndBase::send_private_command  (int id, const String & command)
+{
+}
+void
 FrontEndBase::dump_instances (void)
 {
     SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
index 5e6e8bb4bbf3aaedffbe9d4fc674b98e44b8d28e..8c2058bbfb4e0a2bb375f8be5b2c3cd1bdb62bce 100644 (file)
@@ -755,6 +755,15 @@ protected:
     virtual void set_candidate_style (int                           id,
                                       ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line,
                                       ISF_CANDIDATE_MODE_T          mode);
+
+    /**
+     * @brief Send a private command to an application.
+     *
+     * @param id     the id of the IMEngine instance. It must have been focused in.
+     * @param command The private command
+     */
+    virtual void send_private_command  (int id, const String &command);
+
     /**
      * @}
      */
index b35d245dc29327b761435f4fbefe08e431ba01e2..ef9ae995ab42394c66dac3b71b4691d58eb33f8e 100644 (file)
@@ -1449,7 +1449,7 @@ HelperAgent::get_selection (const String &uuid) const
 }
 
 /**
- * @brief Request to selected text.
+ * @brief Request to select text.
  *
  * @param start The start position in text.
  * @param end The end position in text.
@@ -1468,6 +1468,24 @@ HelperAgent::set_selection (int start, int end) const
     }
 }
 
+/**
+ * @brief Send a private command to an application.
+ *
+ * @param command The private command sent from IME.
+ */
+void
+HelperAgent::send_private_command (const String &command) const
+{
+    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 (SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND);
+        m_impl->send.put_data (command);
+        m_impl->send.write_to_socket (m_impl->socket_active, m_impl->magic_active);
+    }
+}
+
 /**
  * @brief Request to get uuid list of all keyboard ISEs.
  *
index 355b3f061cc7cbe8c279733699f996153deefec1..e3509e61ecbdc43302d26d5289fe017c7adef1ba 100644 (file)
@@ -666,6 +666,13 @@ public:
      */
     void reset_keyboard_ise       (void) const;
 
+    /**
+     * @brief Send a private command to an application
+     *
+     * @param command The private command sent from IME.
+     */
+    void send_private_command     (const String                &command) const;
+
 public:
     /**
      * @brief Connect a slot to Helper exit signal.
index 5abacd9110520559788057ac62279d1845daacab..6cadfc61d2a045d51918dd9dbf54396759783fe7 100644 (file)
@@ -147,6 +147,8 @@ public:
 
     IMEngineSignalCandidateStyle          m_signal_set_candidate_style;
 
+    IMEngineSignalString                  m_signal_send_private_command;
+
     int    m_id;
     void * m_frontend_data;
 
@@ -623,6 +625,12 @@ IMEngineInstanceBase::signal_connect_set_candidate_style (IMEngineSlotCandidateS
     return m_impl->m_signal_set_candidate_style.connect (slot);
 }
 
+Connection
+IMEngineInstanceBase::signal_connect_send_private_command (IMEngineSlotString *slot)
+{
+    return m_impl->m_signal_send_private_command.connect (slot);
+}
+
 void
 IMEngineInstanceBase::show_preedit_string ()
 {
@@ -801,6 +809,12 @@ IMEngineInstanceBase::set_autocapital_type (int mode)
 {
 }
 
+void
+IMEngineInstanceBase::send_private_command (const String &command)
+{
+    m_impl->m_signal_send_private_command (this, command);
+}
+
 // implementation of DummyIMEngine
 DummyIMEngineFactory::DummyIMEngineFactory ()
 {
index 293f22880444cb62bf035005fd60b4298f915ff4..f1013e6fe8e8612a015745670ec5c65304304ed1 100644 (file)
@@ -67,7 +67,7 @@ enum ClientCapability
     SCIM_CLIENT_CAP_ONTHESPOT_PREEDIT     = (1 << 0),   /**< The client support OnTheSpot preedit (embed preedit string into client window) */
     SCIM_CLIENT_CAP_SINGLE_LEVEL_PROPERTY = (1 << 1),   /**< The client support displaying single level property, property tree may not be supported*/
     SCIM_CLIENT_CAP_MULTI_LEVEL_PROPERTY  = (1 << 2),   /**< The client support displaying multiple level property, aka. property tree */
-    SCIM_CLIENT_CAP_TRIGGER_PROPERTY      = (1 << 3),   /**< The client is capabile to trigger the IMEngine property. */
+    SCIM_CLIENT_CAP_TRIGGER_PROPERTY      = (1 << 3),   /**< The client is capable to trigger the IMEngine property. */
     SCIM_CLIENT_CAP_HELPER_MODULE         = (1 << 4),   /**< The client support helper module */
     SCIM_CLIENT_CAP_SURROUNDING_TEXT      = (1 << 5),   /**< The client support get/delete surrounding text operations */
     SCIM_CLIENT_CAP_ALL_CAPABILITIES      = 0x3F
@@ -521,6 +521,8 @@ public:
     Connection signal_connect_contract_candidate      (IMEngineSlotVoid *slot);
 
     Connection signal_connect_set_candidate_style     (IMEngineSlotCandidateStyle *slot);
+
+    Connection signal_connect_send_private_command    (IMEngineSlotString *slot);
     /** @} */
 
 public:
@@ -841,7 +843,7 @@ protected:
     /**
      * @brief Commit a string to the client application.
      *
-     * The preedit string should be hid before calling
+     * The preedit string should be hidden before calling
      * this method. Otherwise the clients which use
      * OnTheSpot input mode will flicker annoyingly.
      *
@@ -916,9 +918,9 @@ protected:
      *
      * @param text          location to store the context string around the insertion point.
      * @param cursor        location to store index of the insertion cursor within @text.
-     * @param maxlen_before the maxmium length of context string to be retrieved
+     * @param maxlen_before the maximum length of context string to be retrieved
      *                      before the cursor; -1 means unlimited.
-     * @param maxlen_after  the maxmium length of context string to be retrieved
+     * @param maxlen_after  the maximum length of context string to be retrieved
      *                      after the cursor; -1 means unlimited.
      *
      * @return true if surrounding text was provided.
@@ -981,6 +983,8 @@ protected:
     void set_candidate_style (ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line = ONE_LINE_CANDIDATE,
                               ISF_CANDIDATE_MODE_T          mode = FIXED_CANDIDATE_WINDOW);
 
+   void send_private_command (const String &command);
+
     /** @} */
 };
 
index 36416bc6bb2ce64b5926b9063da53a825b2c147f..32c23d04857411fce31f166f2a44d474c2eef872 100644 (file)
@@ -3667,6 +3667,8 @@ private:
                     socket_helper_get_selection (client_id);
                 } else if (cmd == SCIM_TRANS_CMD_SET_SELECTION) {
                     socket_helper_set_selection (client_id);
+                } else if (cmd == SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND) {
+                    socket_helper_send_private_command (client_id);
                 } else if (cmd == ISM_TRANS_CMD_UPDATE_ISE_EXIT) {
                     HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client.get_id ());
                     if (hiit != m_helper_active_info_repository.end ()) {
@@ -5238,6 +5240,32 @@ private:
         }
     }
 
+    void socket_helper_send_private_command  (int client)
+    {
+        SCIM_DEBUG_MAIN(4) << __FUNCTION__ << " (" << client << ")\n";
+
+        String command;
+
+        if (m_recv_trans.get_data (command)) {
+            int     focused_client;
+            uint32  focused_context;
+            String  focused_uuid = get_focused_context (focused_client, focused_context);
+
+            ClientInfo client_info = socket_get_client_info (focused_client);
+            if (client_info.type == FRONTEND_CLIENT) {
+                Socket socket_client (focused_client);
+                lock ();
+                m_send_trans.clear ();
+                m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
+                m_send_trans.put_data (focused_context);
+                m_send_trans.put_command (SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND);
+                m_send_trans.put_data (command);
+                m_send_trans.write_to_socket (socket_client);
+                unlock ();
+            }
+        }
+    }
+
     void socket_reset_helper_input_context (const String &uuid, int client, uint32 context)
     {
         HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
index b93c682a6789ecebd5e925647e08e0dd86dc51e6..bd767b099792d86a5bca81466a1c69f513c0f94f 100644 (file)
@@ -131,6 +131,7 @@ class PanelClient::PanelClientImpl
     PanelClientSignalInt                        m_signal_longpress_candidate;
     PanelClientSignalIntInt                     m_signal_update_ise_input_context;
     PanelClientSignalIntInt                     m_signal_update_isf_candidate_panel;
+    PanelClientSignalString                     m_signal_send_private_command;
 
 public:
     PanelClientImpl ()
@@ -484,6 +485,13 @@ public:
                             m_signal_update_isf_candidate_panel ((int) context, (int)type, (int)value);
                     }
                     break;
+                case SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND:
+                    {
+                        String str;
+                        if (recv.get_data (str))
+                            m_signal_send_private_command ((int) context, str);
+                    }
+                    break;
                 default:
                     break;
             }
@@ -1226,6 +1234,7 @@ public:
         m_signal_longpress_candidate.reset();
         m_signal_update_ise_input_context.reset();
         m_signal_update_isf_candidate_panel.reset();
+        m_signal_send_private_command.reset();
     }
 
     Connection signal_connect_reload_config                 (PanelClientSlotVoid                    *slot)
@@ -1325,7 +1334,7 @@ public:
         return m_signal_hide_preedit_string.connect (slot);
     }
 
-    Connection signal_connect_update_preedit_string         (PanelClientSlotStringAttrsInt             *slot)
+    Connection signal_connect_update_preedit_string         (PanelClientSlotStringAttrsInt          *slot)
     {
         return m_signal_update_preedit_string.connect (slot);
     }
@@ -1340,7 +1349,7 @@ public:
         return m_signal_delete_surrounding_text.connect (slot);
     }
 
-    Connection signal_connect_get_selection                 (PanelClientSlotVoid                  *slot)
+    Connection signal_connect_get_selection                 (PanelClientSlotVoid                    *slot)
     {
         return m_signal_get_selection.connect (slot);
     }
@@ -1380,6 +1389,11 @@ public:
         return m_signal_update_isf_candidate_panel.connect (slot);
     }
 
+    Connection signal_connect_send_private_command          (PanelClientSlotString                  *slot)
+    {
+        return m_signal_send_private_command.connect (slot);
+    }
+
 private:
     void launch_panel (const String &config, const String &display) const
     {
@@ -1928,7 +1942,7 @@ PanelClient::signal_connect_delete_surrounding_text       (PanelClientSlotIntInt
 }
 
 Connection
-PanelClient::signal_connect_get_selection                 (PanelClientSlotVoid                  *slot)
+PanelClient::signal_connect_get_selection                 (PanelClientSlotVoid                    *slot)
 {
     return m_impl->signal_connect_get_selection (slot);
 }
@@ -1975,6 +1989,12 @@ PanelClient::signal_connect_update_isf_candidate_panel    (PanelClientSlotIntInt
     return m_impl->signal_connect_update_isf_candidate_panel (slot);
 }
 
+Connection
+PanelClient::signal_connect_send_private_command          (PanelClientSlotString                  *slot)
+{
+    return m_impl->signal_connect_send_private_command (slot);
+}
+
 } /* namespace scim */
 
 /*
index a2cf8ecd395aa57cb16eb4ebe0ca1d4cab4e883c..d4fd57872702b440689511631894a7b9f700d2c0 100644 (file)
@@ -510,6 +510,13 @@ public:
      */
     Connection signal_connect_update_isf_candidate_panel    (PanelClientSlotIntInt                  *slot);
 
+    /**
+     * @brief Signal: send private command
+     *
+     * slot prototype: void send_private_command (int context, const String & command);
+     */
+    Connection signal_connect_send_private_command          (PanelClientSlotString                  *slot);
+
     /** @} */
 };
 
index 9d8e04308b4c9b9f8d4335c5920472460409aafa..b3519ebd9da710e243da22cb5abfbc966587ec9b 100644 (file)
@@ -531,6 +531,7 @@ const int ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE            = 172;
 const int ISM_TRANS_CMD_TRANSACTION_CONTINUE              = 173;
 const int SCIM_TRANS_CMD_GET_SELECTION                    = 174;
 const int SCIM_TRANS_CMD_SET_SELECTION                    = 175;
+const int SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND             = 176;
 
 // Socket IMEngine to Socket FrontEnd
 const int SCIM_TRANS_CMD_NEW_INSTANCE                     = 200;