Added interface for delivering floating IME requests
[platform/core/uifw/isf.git] / ism / src / isf_panel_agent_base.h
index 9b0b4bb..57f5293 100644 (file)
@@ -1,10 +1,8 @@
 /**
- * @file scim_panel_agent.h
- * @brief Defines scim::PanelAgent and their related types.
+ * @file scim_panel_agent_base.h
+ * @brief Defines scim::PanelAgentBase and their related types.
  *
- * scim::PanelAgent is a class used to write Panel daemons.
- * It acts like a Socket Server and handles all socket clients
- * issues.
+ * scim::PanelAgentBase is a class used to write Panel daemons.
  */
 
 /* ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable. */
@@ -13,7 +11,7 @@
  * Smart Common Input Method
  *
  * Copyright (c) 2004-2005 James Su <suzhe@tsinghua.org.cn>
- * Copyright (c) 2012-2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2012-2016 Samsung Electronics Co., Ltd.
  *
  *
  * This library is free software; you can redistribute it and/or
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA  02111-1307  USA
  *
- * Modifications by Samsung Electronics Co., Ltd.
- * 1. Add new signals
- *    a. m_signal_set_keyboard_ise and m_signal_get_keyboard_ise
- *    b. m_signal_focus_in and m_signal_focus_out
- *    c. m_signal_expand_candidate, m_signal_contract_candidate and m_signal_set_candidate_ui
- *    d. m_signal_get_ise_list, m_signal_get_keyboard_ise_list, m_signal_update_ise_geometry and m_signal_get_ise_information
- *    e. m_signal_set_active_ise_by_uuid and m_signal_get_ise_info_by_uuid
- *    f. m_signal_accept_connection, m_signal_close_connection and m_signal_exit
- * 2. Add new interface APIs in PanelClient class
- *    a. get_helper_manager_id (), has_helper_manager_pending_event () and filter_helper_manager_event ()
- *    b. update_candidate_panel_event (), update_input_panel_event () and select_aux ()
- *    c. candidate_more_window_show () and candidate_more_window_hide ()
- *    d. update_displayed_candidate_number () and update_candidate_item_layout ()
- *    e. stop_helper (), send_longpress_event () and update_ise_list ()
- *    f. filter_event (), filter_exception_event () and get_server_id ()
- * 3. Donot use thread to receive message
- * 4. Monitor socket frontend for self-recovery function
- *
- * $Id: scim_panel_agent.h,v 1.2 2005/06/11 14:50:31 suzhe Exp $
  */
 
 #ifndef __ISF_PANEL_AGENT_BASE_H
@@ -485,7 +464,72 @@ public:
      *
      * @return none.
      */
-    virtual void show_helper_option_window (int client, uint32 context, const String& uuid);
+    virtual void show_helper_option_window (int client, uint32 context, const String& uuid, uint32 caller_pid, uint32 ime_pid);
+
+    /**
+     * @brief resume_helper_option_window.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void resume_helper_option_window (int client, uint32 context, const String& uuid);
+
+    virtual void set_transient_for (uint32 caller_pid, uint32 ime_pid);
+
+    /**
+     * @brief set_helper_keyboard_mode.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void set_helper_keyboard_mode (int client, uint32 context, const String& uuid, uint32& mode);
+
+    /**
+     * @brief set_helper_prediction_hint.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void set_helper_prediction_hint (int client, uint32 context, const String& uuid, String& prediction_hint);
+
+    /**
+     * @brief set_helper_mime_type.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void set_helper_mime_type (int client, uint32 context, const String& uuid, String& mime_type);
+
+    /**
+     * @brief finalize_content_helper.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void finalize_content_helper (int client, uint32 context, const String& uuid, String& text, uint32& cursor_pos);
+
+    /**
+     * @brief set_helper_prediction_hint_data.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void set_helper_prediction_hint_data (int client, uint32 context, const String& uuid, String& key, String &value);
+
+    /**
+     * @brief set_helper_optimization_hint.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void set_helper_optimization_hint (int client, uint32 context, const String& uuid, uint32& hint);
 
     /**
      * @brief process_key_event.
@@ -494,7 +538,7 @@ public:
      *
      * @return none.
      */
-    virtual bool process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, _OUT_ uint32& result);
+    virtual bool process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, uint32 serial, uint32 keycode);
 
     /**
      * @brief get_helper_geometry.
@@ -530,7 +574,7 @@ public:
      *
      * @return none.
      */
-    virtual void get_ise_language_locale (int client, uint32 context, String& uuid, _OUT_ char* data, _OUT_ size_t& len);
+    virtual void get_ise_language_locale (int client, uint32 context, String& uuid, _OUT_ char** data, _OUT_ size_t& len);
 
     /**
      * @brief check_option_window.
@@ -566,7 +610,52 @@ public:
      *
      * @return none.
      */
-    virtual void socket_update_surrounding_text (int client, uint32 context, String& uuid, String text, uint32 cursor);
+    virtual void socket_update_surrounding_text (int client, uint32 context, const String& uuid, String& text, uint32 cursor);
+
+    /**
+     * @brief socket_remoteinput_focus_in.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void socket_remoteinput_focus_in (int client);
+
+    /**
+     * @brief socket_remoteinput_focus_out.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void socket_remoteinput_focus_out (int client);
+
+    /**
+     * @brief socket_remoteinput_entry_metadata.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void socket_remoteinput_entry_metadata (int client, uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type);
+
+    /**
+     * @brief socket_remoteinput_surrounding_text.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void socket_remoteinput_surrounding_text (int client, String& text, uint32 cursor);
+
+    /**
+     * @brief socket_remoteinput_input_resource.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void socket_remoteinput_input_resource (int client, uint32 input_resource);
 
     /**
      * @brief socket_update_selection.
@@ -704,13 +793,22 @@ public:
     virtual void update_ise_input_context (int client, uint32 context, uint32 type, uint32 value);
 
     /**
+     * @brief update_ise_language_locale.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void update_ise_language_locale (int client, uint32 context, String locale);
+
+    /**
      * @brief send_private_command.
      *
      * @param
      *
      * @return none.
      */
-    virtual void send_private_command (int client, uint32 context, String command);
+    virtual void send_private_command (int client, uint32 context, const String& command);
 
     /**
      * @brief helper_all_update_spot_location.
@@ -746,7 +844,7 @@ public:
      *
      * @return none.
      */
-    virtual void commit_string (int client, uint32 context,const WideString& wstr);
+    virtual void commit_string (int client, uint32 context, const WideString& wstr);
 
     /**
      * @brief show_preedit_string.
@@ -773,7 +871,7 @@ public:
      *
      * @return none.
      */
-    virtual void update_preedit_string (int client, uint32  context, WideString wstr, AttributeList& attrs, uint32 caret);
+    virtual void update_preedit_string (int client, uint32  context, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret);
 
     /**
      * @brief update_preedit_caret.
@@ -785,6 +883,15 @@ public:
     virtual void update_preedit_caret (int client, uint32 context, uint32 caret);
 
     /**
+     * @brief recapture_string.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void recapture_string (int client, uint32 context, int offset, int len, WideString preedit, WideString commit, AttributeList& attrs);
+
+    /**
      * @brief attach_input_context and update_screen.
      *
      * @param
@@ -793,13 +900,175 @@ public:
      */
     virtual void helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index, uint32 current_screen);
 
+    /**
+     * @brief hide_helper_ise.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void hide_helper_ise (int client, uint32 context);
+
+    /**
+    * @brief process_input_device_event.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual bool process_input_device_event (int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result);
+
+    /**
+    * @brief process_key_event_done.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void process_key_event_done (int client, uint32 context, KeyEvent &key, uint32 ret, uint32 serial);
+
+    /**
+    * @brief request_ise_hide.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void request_ise_hide (int client, uint32 context);
+
+    /**
+    * @brief set_autocapital_type.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void set_autocapital_type (int client, uint32 context, String uuid, int mode);
+
+    /**
+     * @brief update_ise_geometry.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void update_ise_geometry (int client, uint32 context, uint32 x, uint32 y, uint32 width, uint32 height);
+
+    /**
+    * @brief remote_update_preedit_string.
+    *
+    * @param
+    *
+    * @return none.
+    */
+
+    virtual void remote_update_preedit_string (int client, uint32 context, const WideString str, const WideString commit, const AttributeList &attrs, uint32 caret);
+
+    /**
+    * @brief remote_send_key_event.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void remote_send_key_event (int client, uint32 context, const KeyEvent &key);
+
+    /**
+    * @brief remote_forward_key_event.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void remote_forward_key_event (int client, uint32 context, const KeyEvent &key);
+
+    /**
+    * @brief remote_commit_string.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void remote_commit_string (int client, uint32 context, const WideString& wstr);
+
+    /**
+    * @brief remote_delete_surrounding_text.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void remote_delete_surrounding_text (int client, uint32 context, uint32 offset, uint32 len);
+
+    /**
+    * @brief set_prediction_allow.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void set_prediction_allow (int client, uint32 context, String uuid, int mode);
+
+    /**
+    * @brief send_fail_reply.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void send_fail_reply (int client);
+
+    /**
+     * @brief commit_content.
+     *
+     * @param
+     *
+     * @return none.
+     */
+    virtual void commit_content (int client, uint32 context, const String& content, const String& description, const String& mime_types);
+
+    /**
+    * @brief update_entry_metadata.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void update_entry_metadata (int client, uint32 context);
+
+    /**
+    * @brief request_ise_reshow.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void request_ise_reshow (int client, uint32 context);
+
+    /**
+    * @brief set_floating_mode.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void set_floating_mode (int client, uint32 context, uint32 floating_mode);
+
+    /**
+    * @brief set_floating_drag_enabled.
+    *
+    * @param
+    *
+    * @return none.
+    */
+    virtual void set_floating_drag_enabled (int client, uint32 context_id, uint32 enabled);
 };
 
 /**  @} */
 
 } /* namespace scim */
 
-#endif /* __SCIM_PANEL_AGENT_H */
+#endif /* __ISF_PANEL_AGENT_BASE_H */
 
 /*
 vi:ts=4:nowrap:ai:expandtab