Add set_imdata () for keyboard ISE; Add update_displayed_candidate_number, candidate_...
authorHaifeng Deng <haifeng.deng@samsung.com>
Thu, 29 Nov 2012 06:07:10 +0000 (14:07 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 29 Nov 2012 08:38:05 +0000 (17:38 +0900)
Change-Id: Ib1262bc2fd34822f9bca5bc1dd207f51ccd02bea

16 files changed:
configure.ac
debian/changelog
ism/extras/efl_immodule/isf_imf_context.cpp
ism/modules/frontend/scim_socket_frontend.cpp
ism/modules/frontend/scim_socket_frontend.h
ism/modules/imengine/scim_socket_imengine.cpp
ism/modules/imengine/scim_socket_imengine.h
ism/src/scim_frontend.cpp
ism/src/scim_frontend.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
packaging/isf.spec
releasenote.txt

index 190b93c..e65be59 100755 (executable)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script
 #AC_INIT(scim, 1.4.7, suzhe@tsinghua.org.cn)
-AC_INIT(isf, 2.3.5927, isf@samsung.com)
+AC_INIT(isf, 2.3.5929, isf@samsung.com)
 AC_CONFIG_SRCDIR([ism/src/scim.h])
 m4_pattern_allow([^AS_])
 
@@ -11,7 +11,7 @@ m4_pattern_allow([^AS_])
 # ISF version
 ISF_MAJOR_VERSION=2
 ISF_MINOR_VERSION=3
-ISF_MICRO_VERSION=5927
+ISF_MICRO_VERSION=5929
 
 ISF_VERSION=$ISF_MAJOR_VERSION.$ISF_MINOR_VERSION.$ISF_MICRO_VERSION
 
index 3c66cdd..ce62119 100755 (executable)
@@ -1,3 +1,17 @@
+isf (2.3.5929-1slp2+1) unstable; urgency=low
+
+  * Add set_imdata () for keyboard ISE
+  * Add update_displayed_candidate_number, candidate_more_window_show, candidate_more_window_hide for keyboard ISE
+  * [isf-setting] fix the setup module reload issue
+  * fix PLM P121127-0347: focusable description item
+  * Fix memory leak when show ISE panel
+  * Remove ISF log when load/unload ISE module
+  * [immodule] Replace XKeycodeToKeysym () with XkbKeycodeToKeysym ()
+  * Git: framework/uifw/isf
+  * Tag: isf_2.3.5929-1slp2+1
+
+ -- Haifeng Deng <haifeng.deng@samsung.com>  Thu, 29 Nov 2012 14:19:00 +0900
+
 isf (2.3.5927-1slp2+1) unstable; urgency=low
 
   * Add update_cursor_position () for keyboard ISE
index 739ef6b..fbd9013 100644 (file)
@@ -1141,6 +1141,8 @@ isf_imf_context_focus_in (Ecore_IMF_Context *ctx)
             context_scim->impl->si->focus_in ();
             context_scim->impl->si->set_layout (ecore_imf_context_input_panel_layout_get (ctx));
             set_prediction_allow (context_scim->impl->si, context_scim->impl->prediction_allow);
+            if (context_scim->impl->imdata)
+                context_scim->impl->si->set_imdata ((const char *)context_scim->impl->imdata, context_scim->impl->imdata_size);
         } else {
             _panel_client.turn_off (context_scim->id);
         }
@@ -1724,8 +1726,12 @@ isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type,
  */
 EAPI void isf_imf_context_imdata_set (Ecore_IMF_Context *ctx, const void* data, int length)
 {
+    SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " data length ( " << length << ") ...\n";
     EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx);
 
+    if (context_scim == NULL || data == NULL || length <= 0)
+        return;
+
     if (context_scim && context_scim->impl) {
         if (context_scim->impl->imdata)
             free (context_scim->impl->imdata);
@@ -1733,6 +1739,12 @@ EAPI void isf_imf_context_imdata_set (Ecore_IMF_Context *ctx, const void* data,
         context_scim->impl->imdata = calloc (1, length);
         memcpy (context_scim->impl->imdata, data, length);
         context_scim->impl->imdata_size = length;
+
+        if (context_scim->impl->si && _focused_ic == context_scim) {
+            _panel_client.prepare (context_scim->id);
+            context_scim->impl->si->set_imdata ((const char *)data, length);
+            _panel_client.send ();
+        }
     }
 
     isf_imf_context_input_panel_imdata_set (ctx, data, length);
@@ -2275,6 +2287,54 @@ panel_slot_delete_surrounding_text (int context, int offset, int len)
         slot_delete_surrounding_text (ic->impl->si, offset, len);
 }
 
+static void
+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) {
+        _panel_client.prepare (ic->id);
+        ic->impl->si->update_displayed_candidate_number (number);
+        _panel_client.send ();
+    }
+}
+
+static void
+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) {
+        _panel_client.prepare (ic->id);
+        ic->impl->si->candidate_more_window_show ();
+        _panel_client.send ();
+    }
+}
+
+static void
+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) {
+        _panel_client.prepare (ic->id);
+        ic->impl->si->candidate_more_window_hide ();
+        _panel_client.send ();
+    }
+}
+
+static void
+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) {
+        _panel_client.prepare (ic->id);
+        ic->impl->si->longpress_candidate (index);
+        _panel_client.send ();
+    }
+}
+
 /* Panel Requestion functions. */
 static void
 panel_req_show_help (EcoreIMFContextISF *ic)
@@ -2718,6 +2778,10 @@ initialize (void)
     _panel_client.signal_connect_update_preedit_string         (slot (panel_slot_update_preedit_string));
     _panel_client.signal_connect_get_surrounding_text          (slot (panel_slot_get_surrounding_text));
     _panel_client.signal_connect_delete_surrounding_text       (slot (panel_slot_delete_surrounding_text));
+    _panel_client.signal_connect_update_displayed_candidate_number (slot (panel_slot_update_displayed_candidate_number));
+    _panel_client.signal_connect_candidate_more_window_show    (slot (panel_slot_candidate_more_window_show));
+    _panel_client.signal_connect_candidate_more_window_hide    (slot (panel_slot_candidate_more_window_hide));
+    _panel_client.signal_connect_longpress_candidate           (slot (panel_slot_longpress_candidate));
 
     if (!panel_initialize ()) {
         std::cerr << "Ecore IM Module: Cannot connect to Panel!\n";
index 01984ce..faedf35 100644 (file)
@@ -735,6 +735,16 @@ SocketFrontEnd::socket_receive_callback (SocketServer *server, const Socket &cli
             socket_update_candidate_item_layout (id);
         else if (cmd == ISM_TRANS_CMD_UPDATE_CURSOR_POSITION)
             socket_update_cursor_position (id);
+        else if (cmd == ISM_TRANS_CMD_UPDATE_DISPLAYED_CANDIDATE)
+            socket_update_displayed_candidate_number (id);
+        else if (cmd == ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_SHOW)
+            socket_candidate_more_window_show (id);
+        else if (cmd == ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_HIDE)
+            socket_candidate_more_window_hide (id);
+        else if (cmd == ISM_TRANS_CMD_LONGPRESS_CANDIDATE)
+            socket_longpress_candidate (id);
+        else if (cmd == ISM_TRANS_CMD_SET_ISE_IMDATA)
+            socket_set_imdata (id);
         else if (cmd == ISM_TRANS_CMD_SET_LAYOUT)
             socket_set_layout (id);
         else if (cmd == ISM_TRANS_CMD_RESET_ISE_OPTION)
@@ -1385,6 +1395,116 @@ SocketFrontEnd::socket_update_cursor_position (int /*client_id*/)
 }
 
 void
+SocketFrontEnd::socket_update_displayed_candidate_number (int /*client_id*/)
+{
+    uint32 siid;
+    unsigned int number;
+
+    SCIM_DEBUG_FRONTEND (2) << __func__ << "\n";
+
+    if (m_receive_trans.get_data (siid) &&
+        m_receive_trans.get_data (number)) {
+
+        SCIM_DEBUG_FRONTEND (3) << "  SI (" << siid << ") displayed candidate number (" << number << ").\n";
+
+        m_current_instance = (int) siid;
+
+        update_displayed_candidate_number ((int) siid, number);
+        m_send_trans.put_command (SCIM_TRANS_CMD_OK);
+
+        m_current_instance = -1;
+    }
+}
+
+void
+SocketFrontEnd::socket_candidate_more_window_show (int /*client_id*/)
+{
+    uint32 siid;
+
+    SCIM_DEBUG_FRONTEND (2) << __func__ << "\n";
+
+    if (m_receive_trans.get_data (siid)) {
+
+        SCIM_DEBUG_FRONTEND (3) << "  SI (" << siid << ").\n";
+
+        m_current_instance = (int) siid;
+
+        candidate_more_window_show ((int) siid);
+        m_send_trans.put_command (SCIM_TRANS_CMD_OK);
+
+        m_current_instance = -1;
+    }
+}
+
+void
+SocketFrontEnd::socket_candidate_more_window_hide (int /*client_id*/)
+{
+    uint32 siid;
+
+    SCIM_DEBUG_FRONTEND (2) << __func__ << "\n";
+
+    if (m_receive_trans.get_data (siid)) {
+
+        SCIM_DEBUG_FRONTEND (3) << "  SI (" << siid << ").\n";
+
+        m_current_instance = (int) siid;
+
+        candidate_more_window_hide ((int) siid);
+        m_send_trans.put_command (SCIM_TRANS_CMD_OK);
+
+        m_current_instance = -1;
+    }
+}
+
+void
+SocketFrontEnd::socket_longpress_candidate (int /*client_id*/)
+{
+    uint32 siid;
+    unsigned int index;
+
+    SCIM_DEBUG_FRONTEND (2) << __func__ << "\n";
+
+    if (m_receive_trans.get_data (siid) &&
+        m_receive_trans.get_data (index)) {
+
+        SCIM_DEBUG_FRONTEND (3) << "  SI (" << siid << ") index (" << index << ").\n";
+
+        m_current_instance = (int) siid;
+
+        longpress_candidate ((int) siid, index);
+        m_send_trans.put_command (SCIM_TRANS_CMD_OK);
+
+        m_current_instance = -1;
+    }
+}
+
+void
+SocketFrontEnd::socket_set_imdata (int /*client_id*/)
+{
+    uint32 siid;
+    char *imdata = NULL;
+    unsigned int length;
+
+    SCIM_DEBUG_FRONTEND (2) << __func__ << "\n";
+
+    if (m_receive_trans.get_data (siid) &&
+        m_receive_trans.get_data (&imdata, length)) {
+
+        SCIM_DEBUG_FRONTEND (3) << "  SI (" << siid << ") length (" << length << ").\n";
+
+        m_current_instance = (int) siid;
+
+        set_imdata ((int) siid, imdata, length);
+        m_send_trans.put_command (SCIM_TRANS_CMD_OK);
+
+        m_current_instance = -1;
+    }
+
+    if (NULL != imdata)
+        delete [] imdata;
+}
+
+void
 SocketFrontEnd::socket_reset_option (int /*client_id*/)
 {
     uint32 siid;
index a7a4b2d..845374c 100644 (file)
@@ -205,6 +205,11 @@ private:
 
     void socket_update_candidate_item_layout (int client_id);
     void socket_update_cursor_position      (int client_id);
+    void socket_update_displayed_candidate_number (int client_id);
+    void socket_candidate_more_window_show  (int client_id);
+    void socket_candidate_more_window_hide  (int client_id);
+    void socket_longpress_candidate         (int client_id);
+    void socket_set_imdata                  (int client_id);
 };
 
 #endif
index f1d975d..ffce7dc 100644 (file)
@@ -775,6 +775,84 @@ SocketInstance::update_cursor_position (unsigned int cursor_pos)
 }
 
 void
+SocketInstance::update_displayed_candidate_number (unsigned int number)
+{
+    Transaction trans;
+
+    global->init_transaction (trans);
+
+    SCIM_DEBUG_IMENGINE(1) << __func__ << " (" << m_peer_id << ")\n";
+
+    trans.put_command (ISM_TRANS_CMD_UPDATE_DISPLAYED_CANDIDATE);
+    trans.put_data (m_peer_id);
+    trans.put_data (number);
+
+    commit_transaction (trans);
+}
+
+void
+SocketInstance::candidate_more_window_show (void)
+{
+    Transaction trans;
+
+    global->init_transaction (trans);
+
+    SCIM_DEBUG_IMENGINE(1) << __func__ << " (" << m_peer_id << ")\n";
+
+    trans.put_command (ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_SHOW);
+    trans.put_data (m_peer_id);
+
+    commit_transaction (trans);
+}
+
+void
+SocketInstance::candidate_more_window_hide (void)
+{
+    Transaction trans;
+
+    global->init_transaction (trans);
+
+    SCIM_DEBUG_IMENGINE(1) << __func__ << " (" << m_peer_id << ")\n";
+
+    trans.put_command (ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_HIDE);
+    trans.put_data (m_peer_id);
+
+    commit_transaction (trans);
+}
+
+void
+SocketInstance::longpress_candidate (unsigned int index)
+{
+    Transaction trans;
+
+    global->init_transaction (trans);
+
+    SCIM_DEBUG_IMENGINE(1) << __func__ << " (" << m_peer_id << ")\n";
+
+    trans.put_command (ISM_TRANS_CMD_LONGPRESS_CANDIDATE);
+    trans.put_data (m_peer_id);
+    trans.put_data (index);
+
+    commit_transaction (trans);
+}
+
+void
+SocketInstance::set_imdata (const char *data, unsigned int len)
+{
+    Transaction trans;
+
+    global->init_transaction (trans);
+
+    SCIM_DEBUG_IMENGINE(1) << __func__ << " (" << m_peer_id << ")\n";
+
+    trans.put_command (ISM_TRANS_CMD_SET_ISE_IMDATA);
+    trans.put_data (m_peer_id);
+    trans.put_data (data, len);
+
+    commit_transaction (trans);
+}
+
+void
 SocketInstance::reset_option ()
 {
     Transaction trans;
index 66b171c..8966b25 100644 (file)
@@ -101,6 +101,11 @@ public:
     virtual void update_client_capabilities (unsigned int cap);
     virtual void update_candidate_item_layout (const std::vector<unsigned int> &row_items);
     virtual void update_cursor_position (unsigned int cursor_pos);
+    virtual void update_displayed_candidate_number (unsigned int number);
+    virtual void candidate_more_window_show (void);
+    virtual void candidate_more_window_hide (void);
+    virtual void longpress_candidate (unsigned int index);
+    virtual void set_imdata (const char *data, unsigned int len);
 
 private:
     bool commit_transaction (Transaction &trans);
index 715419e..83874d1 100644 (file)
@@ -688,6 +688,46 @@ FrontEndBase::update_cursor_position (int id, unsigned int cursor_pos) const
 }
 
 void
+FrontEndBase::update_displayed_candidate_number (int id, unsigned int number) const
+{
+    IMEngineInstancePointer si = m_impl->find_instance (id);
+
+    if (!si.null ()) si->update_displayed_candidate_number (number);
+}
+
+void
+FrontEndBase::candidate_more_window_show (int id) const
+{
+    IMEngineInstancePointer si = m_impl->find_instance (id);
+
+    if (!si.null ()) si->candidate_more_window_show ();
+}
+
+void
+FrontEndBase::candidate_more_window_hide (int id) const
+{
+    IMEngineInstancePointer si = m_impl->find_instance (id);
+
+    if (!si.null ()) si->candidate_more_window_hide ();
+}
+
+void
+FrontEndBase::longpress_candidate (int id, unsigned int index) const
+{
+    IMEngineInstancePointer si = m_impl->find_instance (id);
+
+    if (!si.null ()) si->longpress_candidate (index);
+}
+
+void
+FrontEndBase::set_imdata (int id, const char *data, unsigned int len) const
+{
+    IMEngineInstancePointer si = m_impl->find_instance (id);
+
+    if (!si.null ()) si->set_imdata (data, len);
+}
+
+void
 FrontEndBase::reset_option (int id) const
 {
     IMEngineInstancePointer si = m_impl->find_instance (id);
index 79b4f06..ce6f171 100644 (file)
@@ -463,6 +463,40 @@ protected:
     void update_cursor_position (int id, unsigned int cursor_pos) const;
 
     /**
+     * @brief Update displayed candidate number
+     * @param id the IMEngine instance id.
+     * @param number - the number of displayed candidates.
+     */
+    void update_displayed_candidate_number (int id, unsigned int number) const;
+
+    /**
+     * @brief Candidate more window is shown
+     * @param id the IMEngine instance id.
+     */
+    void candidate_more_window_show (int id) const;
+
+    /**
+     * @brief Candidate more window is hidden
+     * @param id the IMEngine instance id.
+     */
+    void candidate_more_window_hide (int id) const;
+
+    /**
+     * @brief let a specific IMEngine instance longpress a candidate in its current lookup table.
+     * @param id the IMEngine instance id.
+     * @param index - the index in current page of the lookup table.
+     */
+    void longpress_candidate (int id, unsigned int index) const;
+
+    /**
+     * @brief Set IM data.
+     * @param id the IMEngine instance id.
+     * @param data - the buffer of data.
+     * @param len  - the length of data.
+     */
+    void set_imdata (int id, const char *data, unsigned int len) const;
+
+    /**
      * @}
      */
 
index a1caf3f..25f66c8 100644 (file)
@@ -391,6 +391,31 @@ IMEngineInstanceBase::update_cursor_position (unsigned int cursor_pos)
 }
 
 void
+IMEngineInstanceBase::update_displayed_candidate_number (unsigned int number)
+{
+}
+
+void
+IMEngineInstanceBase::candidate_more_window_show (void)
+{
+}
+
+void
+IMEngineInstanceBase::candidate_more_window_hide (void)
+{
+}
+
+void
+IMEngineInstanceBase::longpress_candidate (unsigned int index)
+{
+}
+
+void
+IMEngineInstanceBase::set_imdata (const char *data, unsigned int len)
+{
+}
+
+void
 IMEngineInstanceBase::reset_option ()
 {
 }
index e0075a4..a51da5d 100644 (file)
@@ -665,12 +665,44 @@ public:
     virtual void update_candidate_item_layout (const std::vector<unsigned int> &row_items);
 
     /**
-     * @brief When cursor position is changed, this function will be called.
+     * @brief When cursor position is changed, this method will be invoked by FrontEnd.
      *
      * @param cursor_pos - the new cursor position.
      */
     virtual void update_cursor_position (unsigned int cursor_pos);
 
+    /**
+     * @brief After lookup table is updated, this method will be invoked by FrontEnd.
+     *
+     * @param number - the number of displayed candidates.
+     */
+    virtual void update_displayed_candidate_number (unsigned int number);
+
+    /**
+     * @brief When candidate more window is shown, this method will be invoked by FrontEnd.
+     */
+    virtual void candidate_more_window_show (void);
+
+    /**
+     * @brief When candidate more window is hidden, this method will be invoked by FrontEnd.
+     */
+    virtual void candidate_more_window_hide (void);
+
+    /**
+     * @brief When user longpress a candidate, this method will be invoked by FrontEnd.
+     *
+     * @param index - the index in current page of the lookup table.
+     */
+    virtual void longpress_candidate (unsigned int index);
+
+    /**
+     * @brief Set IM data.
+     *
+     * @param data - the buffer of data.
+     * @param len  - the length of data.
+     */
+    virtual void set_imdata (const char *data, unsigned int len);
+
 protected:
     /**
      * @name Signal activation functions
index 01d49ee..c07a577 100644 (file)
@@ -690,17 +690,25 @@ public:
     {
         SCIM_DEBUG_MAIN(4) << __FUNCTION__ << "...\n";
 
+        int    client;
+        uint32 context;
+
+        get_focused_context (client, context);
+        if (client >= 0) {
+            Socket client_socket (client);
+            m_send_trans.clear ();
+            m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
+            m_send_trans.put_data ((uint32) context);
+            m_send_trans.put_command (ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_SHOW);
+            m_send_trans.write_to_socket (client_socket);
+        }
+
         if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
             HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
 
             if (it != m_helper_client_index.end ()) {
-                int    client;
-                uint32 context;
                 Socket client_socket (it->second.id);
-                uint32 ctx;
-
-                get_focused_context (client, context);
-                ctx = get_helper_ic (client, context);
+                uint32 ctx = get_helper_ic (client, context);
 
                 m_send_trans.clear ();
                 m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
@@ -720,17 +728,25 @@ public:
     {
         SCIM_DEBUG_MAIN(4) << __FUNCTION__ << "...\n";
 
+        int    client;
+        uint32 context;
+
+        get_focused_context (client, context);
+        if (client >= 0) {
+            Socket client_socket (client);
+            m_send_trans.clear ();
+            m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
+            m_send_trans.put_data ((uint32) context);
+            m_send_trans.put_command (ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_HIDE);
+            m_send_trans.write_to_socket (client_socket);
+        }
+
         if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
             HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
 
             if (it != m_helper_client_index.end ()) {
-                int    client;
-                uint32 context;
                 Socket client_socket (it->second.id);
-                uint32 ctx;
-
-                get_focused_context (client, context);
-                ctx = get_helper_ic (client, context);
+                uint32 ctx = get_helper_ic (client, context);
 
                 m_send_trans.clear ();
                 m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
@@ -1031,6 +1047,15 @@ public:
 
         lock ();
         get_focused_context (client, context);
+        if (client >= 0) {
+            Socket client_socket (client);
+            m_send_trans.clear ();
+            m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
+            m_send_trans.put_data ((uint32) context);
+            m_send_trans.put_command (ISM_TRANS_CMD_UPDATE_DISPLAYED_CANDIDATE);
+            m_send_trans.put_data (size);
+            m_send_trans.write_to_socket (client_socket);
+        }
         unlock ();
 
         helper_update_displayed_candidate_number (size);
@@ -1042,6 +1067,20 @@ public:
     {
         SCIM_DEBUG_MAIN(1) << __func__ << " (" << type << ", " << index << ")\n";
 
+        int    client;
+        uint32 context;
+
+        get_focused_context (client, context);
+        if (client >= 0) {
+            Socket client_socket (client);
+            m_send_trans.clear ();
+            m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
+            m_send_trans.put_data ((uint32) context);
+            m_send_trans.put_command (ISM_TRANS_CMD_LONGPRESS_CANDIDATE);
+            m_send_trans.put_data (index);
+            m_send_trans.write_to_socket (client_socket);
+        }
+
         helper_longpress_candidate (index);
     }
 
index 8e1ee8b..0f20e44 100644 (file)
@@ -102,6 +102,10 @@ class PanelClient::PanelClientImpl
     PanelClientSignalStringAttrs                m_signal_update_preedit_string;
     PanelClientSignalIntInt                     m_signal_get_surrounding_text;
     PanelClientSignalIntInt                     m_signal_delete_surrounding_text;
+    PanelClientSignalInt                        m_signal_update_displayed_candidate_number;
+    PanelClientSignalVoid                       m_signal_candidate_more_window_show;
+    PanelClientSignalVoid                       m_signal_candidate_more_window_hide;
+    PanelClientSignalInt                        m_signal_longpress_candidate;
 
 public:
     PanelClientImpl ()
@@ -391,6 +395,30 @@ public:
                             m_signal_delete_surrounding_text ((int) context, (int)offset, (int)len);
                     }
                     break;
+                case ISM_TRANS_CMD_UPDATE_DISPLAYED_CANDIDATE:
+                    {
+                        uint32 number;
+                        if (recv.get_data (number))
+                            m_signal_update_displayed_candidate_number ((int) context, (int)number);
+                    }
+                    break;
+                case ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_SHOW:
+                    {
+                        m_signal_candidate_more_window_show ((int) context);
+                    }
+                    break;
+                case ISM_TRANS_CMD_CANDIDATE_MORE_WINDOW_HIDE:
+                    {
+                        m_signal_candidate_more_window_hide ((int) context);
+                    }
+                    break;
+                case ISM_TRANS_CMD_LONGPRESS_CANDIDATE:
+                    {
+                        uint32 index;
+                        if (recv.get_data (index))
+                            m_signal_longpress_candidate ((int) context, (int)index);
+                    }
+                    break;
                 default:
                     break;
             }
@@ -684,6 +712,10 @@ public:
         m_signal_update_preedit_string.reset();
         m_signal_get_surrounding_text.reset();
         m_signal_delete_surrounding_text.reset();
+        m_signal_update_displayed_candidate_number.reset();
+        m_signal_candidate_more_window_show.reset();
+        m_signal_candidate_more_window_hide.reset();
+        m_signal_longpress_candidate.reset();
     }
 
     Connection signal_connect_reload_config                 (PanelClientSlotVoid                    *slot)
@@ -798,6 +830,26 @@ public:
         return m_signal_delete_surrounding_text.connect (slot);
     }
 
+    Connection signal_connect_update_displayed_candidate_number (PanelClientSlotInt                 *slot)
+    {
+        return m_signal_update_displayed_candidate_number.connect (slot);
+    }
+
+    Connection signal_connect_candidate_more_window_show    (PanelClientSlotVoid                    *slot)
+    {
+        return m_signal_candidate_more_window_show.connect (slot);
+    }
+
+    Connection signal_connect_candidate_more_window_hide    (PanelClientSlotVoid                    *slot)
+    {
+        return m_signal_candidate_more_window_hide.connect (slot);
+    }
+
+    Connection signal_connect_longpress_candidate           (PanelClientSlotInt                     *slot)
+    {
+        return m_signal_longpress_candidate.connect (slot);
+    }
+
 private:
     void launch_panel (const String &config, const String &display) const
     {
@@ -1172,6 +1224,30 @@ PanelClient::signal_connect_delete_surrounding_text       (PanelClientSlotIntInt
     return m_impl->signal_connect_delete_surrounding_text (slot);
 }
 
+Connection
+PanelClient::signal_connect_update_displayed_candidate_number (PanelClientSlotInt                 *slot)
+{
+    return m_impl->signal_connect_update_displayed_candidate_number (slot);
+}
+
+Connection
+PanelClient::signal_connect_candidate_more_window_show    (PanelClientSlotVoid                    *slot)
+{
+    return m_impl->signal_connect_candidate_more_window_show (slot);
+}
+
+Connection
+PanelClient::signal_connect_candidate_more_window_hide    (PanelClientSlotVoid                    *slot)
+{
+    return m_impl->signal_connect_candidate_more_window_hide (slot);
+}
+
+Connection
+PanelClient::signal_connect_longpress_candidate           (PanelClientSlotInt                     *slot)
+{
+    return m_impl->signal_connect_longpress_candidate (slot);
+}
+
 } /* namespace scim */
 
 /*
index 41487a0..75c313d 100644 (file)
@@ -390,14 +390,14 @@ public:
     Connection signal_connect_update_preedit_string         (PanelClientSlotStringAttrs             *slot);
 
     /**
-     * @brief Signal: Request to get surrounding text
+     * @brief Signal: request to get surrounding text
      *
      * slot prototype: void get_surrounding text (int context, int maxlen_before, int maxlen_after);
      */
     Connection signal_connect_get_surrounding_text          (PanelClientSlotIntInt                  *slot);
 
     /**
-     * @brief Signal: Delete surrounding text
+     * @brief Signal: delete surrounding text
      *
      * slot prototype: void delete_surrounding text (int context, int offset, int len);
      */
@@ -408,7 +408,35 @@ public:
      *
      * slot prototype: void update_candidate_item_layout (int context, const std::vector<uint32> &);
      */
-    Connection signal_connect_update_candidate_item_layout (PanelClientSlotUintVector               *slot);
+    Connection signal_connect_update_candidate_item_layout  (PanelClientSlotUintVector              *slot);
+
+    /**
+     * @brief Signal: update displayed candidate number
+     *
+     * slot prototype: void update_displayed_candidate_number (int context, int number);
+     */
+    Connection signal_connect_update_displayed_candidate_number (PanelClientSlotInt                 *slot);
+
+    /**
+     * @brief Signal: candidate more window is shown
+     *
+     * slot prototype: void candidate_more_window_show (int context);
+     */
+    Connection signal_connect_candidate_more_window_show    (PanelClientSlotVoid                    *slot);
+
+    /**
+     * @brief Signal: candidate more window is hidden
+     *
+     * slot prototype: void candidate_more_window_hide (int context);
+     */
+    Connection signal_connect_candidate_more_window_hide    (PanelClientSlotVoid                    *slot);
+
+    /**
+     * @brief Signal: longpress candidate
+     *
+     * slot prototype: void longpress_candidate (int context, int index);
+     */
+    Connection signal_connect_longpress_candidate           (PanelClientSlotInt                     *slot);
 
     /** @} */
 };
index c0db6b1..7a94a9f 100755 (executable)
@@ -1,10 +1,10 @@
-#sbs-git:framework/uifw/isf isf 2.3.5927 07f2b65224e6cef5cd6799065bb01fa656bc115e
+#sbs-git:framework/uifw/isf isf 2.3.5929 07f2b65224e6cef5cd6799065bb01fa656bc115e
 %define _usrdir        /usr
 %define _ugdir %{_usrdir}/ug
 
 Name:       isf
 Summary:    Input Service Framework
-Version:    2.3.5927
+Version:    2.3.5929
 Release:    1
 Group:      TO_BE/FILLED_IN
 License:    LGPL
index f781fea..ad7831d 100755 (executable)
@@ -1,3 +1,13 @@
+ISF 2.3.5929 :
+  1. Add set_imdata () for keyboard ISE
+  2. Add update_displayed_candidate_number, candidate_more_window_show, candidate_more_window_hide for keyboard ISE
+  3. [isf-setting] fix the setup module reload issue
+  4. fix PLM P121127-0347: focusable description item
+  5. Fix memory leak when show ISE panel
+  6. Remove ISF log when load/unload ISE module
+  7. [immodule] Replace XKeycodeToKeysym () with XkbKeycodeToKeysym ()
+
+
 ISF 2.3.5927 :
   1. Add update_cursor_position () for keyboard ISE
   2. Disable check datasum feature for socket to reduce socket transmission delay