summaryrefslogtreecommitdiff
path: root/ism/src
diff options
context:
space:
mode:
Diffstat (limited to 'ism/src')
-rw-r--r--ism/src/isf_info_manager.cpp40
-rw-r--r--ism/src/isf_info_manager.h2
-rw-r--r--ism/src/isf_panel_agent_base.cpp13
-rw-r--r--ism/src/isf_panel_agent_base.h25
-rw-r--r--ism/src/isf_panel_agent_manager.cpp23
-rw-r--r--ism/src/isf_panel_agent_manager.h9
-rw-r--r--ism/src/isf_remote_client.cpp18
-rw-r--r--ism/src/isf_remote_client.h4
-rw-r--r--ism/src/isf_remote_control.cpp50
-rw-r--r--ism/src/isf_remote_control.h26
-rw-r--r--ism/src/scim_trans_commands.h2
11 files changed, 112 insertions, 100 deletions
diff --git a/ism/src/isf_info_manager.cpp b/ism/src/isf_info_manager.cpp
index 50c21e64..0a13057d 100644
--- a/ism/src/isf_info_manager.cpp
+++ b/ism/src/isf_info_manager.cpp
@@ -261,7 +261,6 @@ class InfoManager::InfoManagerImpl
int m_current_recv_remoteinput_id;
IntIntRepository m_send_remoteinput_map;
IntIntRepository m_recv_remoteinput_map;
- bool m_remoteinput_status;
int m_last_socket_client;
uint32 m_last_client_context;
@@ -396,7 +395,7 @@ public:
m_active_client_id (-1),
m_should_shared_ise (false),
m_ise_exiting (false), m_is_imengine_aux (false), m_is_imengine_candidate (false),
- m_current_send_remoteinput_id (0), m_current_recv_remoteinput_id (0), m_remoteinput_status (true),
+ m_current_send_remoteinput_id (0), m_current_recv_remoteinput_id (0),
m_last_socket_client (-1), m_last_client_context (0),
m_ise_context_buffer (NULL), m_ise_context_length (0) {
m_current_ise_name = String (_ ("English Keyboard"));
@@ -1272,13 +1271,13 @@ public:
bool send_remote_input_message (int client_id, char* buf, size_t len) {
SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_input_message ()\n";
- if(buf == NULL) {
- return false;
+ if (buf && len > 0) {
+ String msg (buf);
+ m_signal_remoteinput_send_input_message (msg, true);
+ return true;
}
- String msg (buf);
- m_signal_remoteinput_send_input_message (msg, 1);
- return true;
+ return false;
}
void send_remote_surrounding_text (const char* text, uint32 cursor) {
@@ -1377,7 +1376,6 @@ public:
//SCIM_TRANS_CMD_PROCESS_KEY_EVENT
bool process_key_event (KeyEvent& key, uint32 serial) {
LOGD ("");
- if (m_remoteinput_status) m_remoteinput_status = false;
HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
@@ -1951,7 +1949,7 @@ public:
get_focused_context (client, context);
if (client >= 0) {
- m_panel_agent_manager.update_preedit_string (client, context, str, str, attrs, caret);
+ m_panel_agent_manager.remote_update_preedit_string (client, context, str, attrs, caret);
}
unlock ();
@@ -1969,7 +1967,7 @@ public:
get_focused_context (client, context);
if (client >= 0) {
- m_panel_agent_manager.commit_string (client, context, str);
+ m_panel_agent_manager.remote_commit_string (client, context, str);
}
unlock ();
@@ -1985,7 +1983,7 @@ public:
get_focused_context (client, context);
if (client >= 0) {
- m_panel_agent_manager.send_key_event (client, context, key);
+ m_panel_agent_manager.remote_send_key_event (client, context, key);
}
return client >= 0;
@@ -1999,7 +1997,7 @@ public:
get_focused_context (client, context);
if (client >= 0) {
- m_panel_agent_manager.forward_key_event (client, context, key);
+ m_panel_agent_manager.remote_forward_key_event (client, context, key);
}
return client >= 0;
@@ -2772,8 +2770,6 @@ client context helpers: %d, helpers uuid count: %d",
SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
LOGD ("");
- if (m_remoteinput_status) m_remoteinput_status = false;
-
lock();
m_panel_agent_manager.socket_remoteinput_focus_in (m_current_recv_remoteinput_id);
unlock ();
@@ -2797,17 +2793,13 @@ client context helpers: %d, helpers uuid count: %d",
unlock ();
}
- void remoteinput_callback_default_text (String text, uint32 cursor) {
+ void remoteinput_callback_surrounding_text (String text, uint32 cursor) {
SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
LOGD ("");
- if (!m_remoteinput_status) {
- lock();
- m_panel_agent_manager.socket_remoteinput_default_text (m_current_recv_remoteinput_id, text, cursor);
- unlock ();
-
- m_remoteinput_status = true;
- }
+ lock();
+ m_panel_agent_manager.socket_remoteinput_surrounding_text (m_current_recv_remoteinput_id, text, cursor);
+ unlock ();
}
//ISM_TRANS_CMD_UPDATE_SELECTION
@@ -4630,9 +4622,9 @@ void InfoManager::remoteinput_callback_entry_metadata (uint32 hint, uint32 layou
m_impl->remoteinput_callback_entry_metadata (hint, layout, variation, autocapital_type);
}
-void InfoManager::remoteinput_callback_default_text (String text, uint32 cursor)
+void InfoManager::remoteinput_callback_surrounding_text (String text, uint32 cursor)
{
- m_impl->remoteinput_callback_default_text (text, cursor);
+ m_impl->remoteinput_callback_surrounding_text (text, cursor);
}
//ISM_TRANS_CMD_UPDATE_SELECTION
diff --git a/ism/src/isf_info_manager.h b/ism/src/isf_info_manager.h
index 110d2b9f..7fa90fe7 100644
--- a/ism/src/isf_info_manager.h
+++ b/ism/src/isf_info_manager.h
@@ -578,7 +578,7 @@ public:
void remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type);
- void remoteinput_callback_default_text (String text, uint32 cursor);
+ void remoteinput_callback_surrounding_text (String text, uint32 cursor);
/////////////////////////////////Message function begin/////////////////////////////////////////
diff --git a/ism/src/isf_panel_agent_base.cpp b/ism/src/isf_panel_agent_base.cpp
index ebd49771..062982cc 100644
--- a/ism/src/isf_panel_agent_base.cpp
+++ b/ism/src/isf_panel_agent_base.cpp
@@ -368,7 +368,7 @@ void PanelAgentBase::socket_remoteinput_entry_metadata (int client, uint32 hint,
LOGW ("not implemented for %s", m_name.c_str ());
}
-void PanelAgentBase::socket_remoteinput_default_text (int client, String& text, uint32 cursor)
+void PanelAgentBase::socket_remoteinput_surrounding_text (int client, String& text, uint32 cursor)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
@@ -530,17 +530,22 @@ void PanelAgentBase::set_autocapital_type(int client, uint32 context, String uui
LOGW("not implemented for %s", m_name.c_str());
}
-void PanelAgentBase::update_preedit_string (int client, uint32 context,const WideString &str, const AttributeList &attrs)
+void PanelAgentBase::remote_update_preedit_string (int client, uint32 context, const WideString str, const AttributeList &attrs, uint32 caret)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
-void PanelAgentBase::send_key_event (int client, uint32 context,const KeyEvent &key)
+void PanelAgentBase::remote_send_key_event (int client, uint32 context, const KeyEvent &key)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
-void PanelAgentBase::forward_key_event (int client, uint32 context,const KeyEvent &key)
+void PanelAgentBase::remote_forward_key_event (int client, uint32 context, const KeyEvent &key)
+{
+ LOGW ("not implemented for %s", m_name.c_str ());
+}
+
+void PanelAgentBase::remote_commit_string (int client, uint32 context,const WideString& wstr)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
diff --git a/ism/src/isf_panel_agent_base.h b/ism/src/isf_panel_agent_base.h
index c8419b27..3c74d63d 100644
--- a/ism/src/isf_panel_agent_base.h
+++ b/ism/src/isf_panel_agent_base.h
@@ -575,13 +575,13 @@ public:
virtual void socket_remoteinput_entry_metadata (int client, uint32 hint, uint32 layout, int variation, uint32 autocapital_type);
/**
- * @brief socket_remoteinput_default_text.
+ * @brief socket_remoteinput_surrounding_text.
*
* @param
*
* @return none.
*/
- virtual void socket_remoteinput_default_text (int client, String& text, uint32 cursor);
+ virtual void socket_remoteinput_surrounding_text (int client, String& text, uint32 cursor);
/**
* @brief socket_update_selection.
@@ -845,31 +845,40 @@ public:
virtual void set_autocapital_type(int client, uint32 context, String uuid, int mode);
/**
- * @brief update_preedit_string.
+ * @brief remote_update_preedit_string.
*
* @param
*
* @return none.
*/
- virtual void update_preedit_string (int client, uint32 context,const WideString &str, const AttributeList &attrs);
+ virtual void remote_update_preedit_string (int client, uint32 context, const WideString str, const AttributeList &attrs, uint32 caret);
/**
- * @brief send_key_event.
+ * @brief remote_send_key_event.
*
* @param
*
* @return none.
*/
- virtual void send_key_event (int client, uint32 context,const KeyEvent &key);
+ virtual void remote_send_key_event (int client, uint32 context, const KeyEvent &key);
/**
- * @brief forward_key_event.
+ * @brief remote_forward_key_event.
*
* @param
*
* @return none.
*/
- virtual void forward_key_event (int client, uint32 context,const KeyEvent &key);
+ 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);
};
/** @} */
diff --git a/ism/src/isf_panel_agent_manager.cpp b/ism/src/isf_panel_agent_manager.cpp
index dba1daca..3d83fae9 100644
--- a/ism/src/isf_panel_agent_manager.cpp
+++ b/ism/src/isf_panel_agent_manager.cpp
@@ -596,12 +596,12 @@ void PanelAgentManager::socket_remoteinput_entry_metadata (int id, uint32 hint,
_p->socket_remoteinput_entry_metadata (id, hint, layout, variation, autocapital_type);
}
-void PanelAgentManager::socket_remoteinput_default_text (int id, String& text, uint32 cursor)
+void PanelAgentManager::socket_remoteinput_surrounding_text (int id, String& text, uint32 cursor)
{
PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
if (!_p.null ())
- _p->socket_remoteinput_default_text (id, text, cursor);
+ _p->socket_remoteinput_surrounding_text (id, text, cursor);
}
void PanelAgentManager::socket_update_selection (int id, uint32 context_id, String& uuid, String text)
@@ -830,30 +830,37 @@ void PanelAgentManager::set_autocapital_type(int id, uint32 context_id, String u
_p->set_autocapital_type (id, context_id, uuid, mode);
}
-void PanelAgentManager::update_preedit_string (int id, uint32 context_id, const WideString &str, const AttributeList &attrs)
+void PanelAgentManager::remote_update_preedit_string (int id, uint32 context_id, const WideString str, const AttributeList &attrs, uint32 caret)
{
PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
if (!_p.null ())
- _p->update_preedit_string (id, context_id, str, attrs);
+ _p->remote_update_preedit_string (id, context_id, str, attrs, caret);
}
-void PanelAgentManager::send_key_event (int id, uint32 context_id, const KeyEvent &key)
+void PanelAgentManager::remote_send_key_event (int id, uint32 context_id, const KeyEvent &key)
{
PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
if (!_p.null ())
- _p->send_key_event (id, context_id, key);
+ _p->remote_send_key_event (id, context_id, key);
}
-void PanelAgentManager::forward_key_event (int id, uint32 context_id, const KeyEvent &key)
+void PanelAgentManager::remote_forward_key_event (int id, uint32 context_id, const KeyEvent &key)
{
PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
if (!_p.null ())
- _p->forward_key_event (id, context_id, key);
+ _p->remote_forward_key_event (id, context_id, key);
}
+void PanelAgentManager::remote_commit_string (int id, uint32 context_id, const WideString& wstr)
+{
+ PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
+
+ if (!_p.null ())
+ _p->remote_commit_string (id, context_id, wstr);
+}
} /* namespace scim */
diff --git a/ism/src/isf_panel_agent_manager.h b/ism/src/isf_panel_agent_manager.h
index 57ee5045..a4851696 100644
--- a/ism/src/isf_panel_agent_manager.h
+++ b/ism/src/isf_panel_agent_manager.h
@@ -318,7 +318,7 @@ public:
void socket_remoteinput_focus_in (int client);
void socket_remoteinput_focus_out (int client);
void socket_remoteinput_entry_metadata (int client, uint32 hint, uint32 layout, int variation, uint32 autocapital_type);
- void socket_remoteinput_default_text (int client, String& text, uint32 cursor);
+ void socket_remoteinput_surrounding_text (int client, String& text, uint32 cursor);
void socket_update_selection (int client, uint32 context, String& uuid, String text);
void socket_get_keyboard_ise_list (int client, uint32 context, const String& uuid, std::vector<String>& list);
void socket_get_candidate_ui (int client, uint32 context, const String& uuid, int style, int mode);
@@ -348,9 +348,10 @@ public:
bool process_input_device_event(int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result);
void process_key_event_done(int client, uint32 context, KeyEvent &key, uint32 ret, uint32 serial);
void set_autocapital_type(int id, uint32 context_id, String uuid, int mode);
- void update_preedit_string (int target_client, uint32 target_context, const WideString &str, const AttributeList &attrs);
- void send_key_event (int target_client, uint32 target_context, const KeyEvent &key);
- void forward_key_event (int target_client, uint32 target_context, const KeyEvent &key);
+ void remote_update_preedit_string (int target_client, uint32 target_context, const WideString str, const AttributeList &attrs, uint32 caret);
+ void remote_send_key_event (int target_client, uint32 target_context, const KeyEvent &key);
+ void remote_forward_key_event (int target_client, uint32 target_context, const KeyEvent &key);
+ void remote_commit_string (int target_client, uint32 target_context,const WideString& wstr);
};
/** @} */
diff --git a/ism/src/isf_remote_client.cpp b/ism/src/isf_remote_client.cpp
index c409dc41..8d790609 100644
--- a/ism/src/isf_remote_client.cpp
+++ b/ism/src/isf_remote_client.cpp
@@ -138,7 +138,7 @@ class RemoteInputClient::RemoteInputClientImpl
RemoteInputClientSignalVoid m_signal_show_ise;
RemoteInputClientSignalVoid m_signal_hide_ise;
- String m_default_text;
+ String m_surrounding_text;
uint32 m_hint, m_cursor, m_layout, m_variation, m_autocapital_type;
public:
@@ -146,7 +146,7 @@ public:
: m_socket_timeout (scim_get_default_socket_timeout ()),
m_socket_r2p_magic_key (0),
m_socket_p2r_magic_key (0),
- m_default_text (""),
+ m_surrounding_text (""),
m_hint (0),
m_cursor (0),
m_layout (0),
@@ -332,11 +332,11 @@ public:
LOGW ("wrong format of transaction\n");
break;
}
- case ISM_REMOTE_TRANS_CMD_RECV_DEFAULT_TEXT:
+ case ISM_REMOTE_TRANS_CMD_RECV_SURROUNDING_TEXT:
{
- type = REMOTE_CONTROL_CALLBACK_DEFAULT_TEXT;
+ type = REMOTE_CONTROL_CALLBACK_TEXT_UPDATED;
- if (m_trans_recv.get_data (m_default_text) && m_trans_recv.get_data (m_cursor)) {
+ if (m_trans_recv.get_data (m_surrounding_text) && m_trans_recv.get_data (m_cursor)) {
}
else
LOGW ("wrong format of transaction\n");
@@ -356,8 +356,8 @@ public:
*autocapital_type = m_autocapital_type;
}
- void get_default_text (String &default_text, int *cursor) {
- default_text = m_default_text;
+ void get_surrounding_text (String &surrounding_text, int *cursor) {
+ surrounding_text = m_surrounding_text;
*cursor = m_cursor;
}
};
@@ -439,9 +439,9 @@ RemoteInputClient::get_entry_metadata (int *hint, int *layout, int *variation, i
}
void
-RemoteInputClient::get_default_text (String &default_text, int *cursor)
+RemoteInputClient::get_surrounding_text (String &surrounding_text, int *cursor)
{
- m_impl->get_default_text (default_text, cursor);
+ m_impl->get_surrounding_text (surrounding_text, cursor);
}
};
diff --git a/ism/src/isf_remote_client.h b/ism/src/isf_remote_client.h
index de36daf6..40067bb6 100644
--- a/ism/src/isf_remote_client.h
+++ b/ism/src/isf_remote_client.h
@@ -33,7 +33,7 @@ typedef enum {
REMOTE_CONTROL_CALLBACK_FOCUS_IN,
REMOTE_CONTROL_CALLBACK_FOCUS_OUT,
REMOTE_CONTROL_CALLBACK_ENTRY_METADATA,
- REMOTE_CONTROL_CALLBACK_DEFAULT_TEXT,
+ REMOTE_CONTROL_CALLBACK_TEXT_UPDATED,
} remote_control_callback_type;
class EXAPI RemoteInputClient
@@ -56,7 +56,7 @@ public:
bool delete_surrounding_text(int offset, int len);
remote_control_callback_type recv_callback_message (void);
void get_entry_metadata (int *hint, int *layout, int *variation, int *autocapital_type);
- void get_default_text (String &default_text, int *cursor);
+ void get_surrounding_text (String &default_text, int *cursor);
};
}
diff --git a/ism/src/isf_remote_control.cpp b/ism/src/isf_remote_control.cpp
index 0a7aae27..89b00ade 100644
--- a/ism/src/isf_remote_control.cpp
+++ b/ism/src/isf_remote_control.cpp
@@ -15,7 +15,7 @@
using namespace scim;
-static bool focus_flag, event_check_flag;
+static bool focus_flag;
struct _remote_control_client {
RemoteInputClient remote_client;
@@ -27,8 +27,8 @@ struct _remote_control_client {
void* focus_out_cb_user_data;
remote_control_entry_metadata_cb metadata_cb;
void* metadata_cb_user_data;
- remote_control_default_text_cb default_text_cb;
- void* default_text_cb_user_data;
+ remote_control_text_updated_cb text_updated_cb;
+ void* text_updated_cb_user_data;
};
static Eina_Bool
@@ -41,7 +41,6 @@ remote_handler(void *data, Ecore_Fd_Handler *fd_handler)
case REMOTE_CONTROL_CALLBACK_FOCUS_IN:
{
focus_flag = true;
- event_check_flag = false;
client->focus_in_cb (client->focus_in_cb_user_data);
break;
}
@@ -68,14 +67,14 @@ remote_handler(void *data, Ecore_Fd_Handler *fd_handler)
}
break;
}
- case REMOTE_CONTROL_CALLBACK_DEFAULT_TEXT:
+ case REMOTE_CONTROL_CALLBACK_TEXT_UPDATED:
{
- if (focus_flag && !event_check_flag) {
- String default_text;
+ if (focus_flag) {
+ String surrounding_text;
int cursor;
- client->remote_client.get_default_text (default_text, &cursor);
- client->default_text_cb (client->default_text_cb_user_data, strdup (default_text.c_str ()), cursor);
+ client->remote_client.get_surrounding_text (surrounding_text, &cursor);
+ client->text_updated_cb (client->text_updated_cb_user_data, strdup (surrounding_text.c_str ()), cursor);
}
}
case REMOTE_CONTROL_CALLBACK_ERROR:
@@ -91,7 +90,6 @@ EXAPI remote_control_client * remote_control_connect(void)
{
remote_control_client *client = new remote_control_client;
focus_flag = false;
- event_check_flag = false;
if (client) {
RemoteInputClient *remote_client = new RemoteInputClient;
@@ -253,7 +251,7 @@ EXAPI int remote_control_entry_metadata_callback_unset(remote_control_client *cl
return REMOTE_CONTROL_ERROR_NONE;
}
-EXAPI int remote_control_default_text_callback_set(remote_control_client *client, remote_control_default_text_cb func, void *user_data)
+EXAPI int remote_control_text_updated_callback_set(remote_control_client *client, remote_control_text_updated_cb func, void *user_data)
{
if (client == NULL)
return REMOTE_CONTROL_INVALID_PARAMETER;
@@ -264,13 +262,13 @@ EXAPI int remote_control_default_text_callback_set(remote_control_client *client
if (!client->remote_client.check_privilege())
return REMOTE_CONTROL_PERMISSION_DENIED;
- client->default_text_cb = func;
- client->default_text_cb_user_data = user_data;
+ client->text_updated_cb = func;
+ client->text_updated_cb_user_data = user_data;
return REMOTE_CONTROL_ERROR_NONE;
}
-EXAPI int remote_control_default_text_callback_unset(remote_control_client *client)
+EXAPI int remote_control_text_updated_callback_unset(remote_control_client *client)
{
if (client == NULL)
return REMOTE_CONTROL_INVALID_PARAMETER;
@@ -281,8 +279,8 @@ EXAPI int remote_control_default_text_callback_unset(remote_control_client *clie
if (!client->remote_client.check_privilege())
return REMOTE_CONTROL_PERMISSION_DENIED;
- client->default_text_cb = NULL;
- client->default_text_cb_user_data = NULL;
+ client->text_updated_cb = NULL;
+ client->text_updated_cb_user_data = NULL;
return REMOTE_CONTROL_ERROR_NONE;
}
@@ -305,10 +303,9 @@ EXAPI int remote_control_send_key_event(remote_control_client *client, remote_co
if (!client->remote_client.prepare())
return REMOTE_CONTROL_REPLY_TIMEOUT;
- if (focus_flag && client->remote_client.send_remote_input_message(command.c_str ())) {
- event_check_flag = true;
+ if (focus_flag && client->remote_client.send_remote_input_message(command.c_str ()))
return REMOTE_CONTROL_ERROR_NONE;
- }
+
return REMOTE_CONTROL_INVALID_OPERATION;
}
@@ -328,10 +325,9 @@ EXAPI int remote_control_send_commit_string(remote_control_client *client, const
if (!client->remote_client.prepare())
return REMOTE_CONTROL_REPLY_TIMEOUT;
- if (focus_flag && client->remote_client.send_remote_input_message(command.c_str ())) {
- event_check_flag = true;
+ if (focus_flag && client->remote_client.send_remote_input_message(command.c_str ()))
return REMOTE_CONTROL_ERROR_NONE;
- }
+
return REMOTE_CONTROL_INVALID_OPERATION;
}
@@ -346,15 +342,16 @@ EXAPI int remote_control_update_preedit_string(remote_control_client *client, co
if (!client->remote_client.check_privilege())
return REMOTE_CONTROL_PERMISSION_DENIED;
- String command = String ("|plain|update_preedit_string|") + String (text) + String ("|");
+ char cursor_position[10] = {};
+ snprintf(cursor_position, sizeof(cursor_position), "%d", cursor_pos);
+ String command = String ("|plain|update_preedit_string|") + String (text) + String ("|") + String (cursor_position) + String ("|");
if (!client->remote_client.prepare())
return REMOTE_CONTROL_REPLY_TIMEOUT;
- if (focus_flag && client->remote_client.send_remote_input_message(command.c_str ())) {
- event_check_flag = true;
+ if (focus_flag && client->remote_client.send_remote_input_message(command.c_str ()))
return REMOTE_CONTROL_ERROR_NONE;
- }
+
return REMOTE_CONTROL_INVALID_OPERATION;
}
@@ -371,6 +368,7 @@ EXAPI int remote_control_delete_surrounding_text(remote_control_client *client,
if (!client->remote_client.prepare())
return REMOTE_CONTROL_REPLY_TIMEOUT;
+
if (focus_flag && client->remote_client.delete_surrounding_text(offset, len))
return REMOTE_CONTROL_ERROR_NONE;
diff --git a/ism/src/isf_remote_control.h b/ism/src/isf_remote_control.h
index dedbaa40..64b77db5 100644
--- a/ism/src/isf_remote_control.h
+++ b/ism/src/isf_remote_control.h
@@ -311,7 +311,7 @@ EXAPI int remote_control_entry_metadata_callback_unset(remote_control_client *cl
*
* @privilege %http://tizen.org/privilege/imemanager
*
- * @remarks remote_control_default_text_cb() called after remote_control_entry_metadata_cb()
+ * @remarks remote_control_text_updated_cb() called after remote_control_entry_metadata_cb()
*
* @param[in] user_data User data to be passed from the callback registration function
* @param[in] default_text The UTF-8 string requested
@@ -319,13 +319,13 @@ EXAPI int remote_control_entry_metadata_callback_unset(remote_control_client *cl
*
* @pre The callback can be registered using remote_control_default_text_callback_set() function.
*
- * @see remote_control_default_text_callback_set()
- * @see remote_control_default_text_callback_unset()
+ * @see remote_control_text_updated_callback_set()
+ * @see remote_control_text_updated_callback_unset()
*/
-typedef void (*remote_control_default_text_cb)(void *user_data, char *default_text, int cursor_pos);
+typedef void (*remote_control_text_updated_cb)(void *user_data, char *default_text, int cursor_pos);
/**
- * @brief Register a remote_control_default_text_cb() callback function.
+ * @brief Register a remote_control_text_updated_cb() callback function.
*
* @since_tizen @if TV 3.0 @endif
*
@@ -334,7 +334,7 @@ typedef void (*remote_control_default_text_cb)(void *user_data, char *default_te
* @privilege %http://tizen.org/privilege/imemanager
*
* @param[in] client The remote control client
- * @param[in] func remote_control_default_text_cb() callback function
+ * @param[in] func remote_control_text_updated_cb() callback function
* @param[in] user_data User data to be passed to the callback function
*
* @return 0 on success, otherwise a negative error value
@@ -343,13 +343,13 @@ typedef void (*remote_control_default_text_cb)(void *user_data, char *default_te
* @retval #REMOTE_CONTROL_INVALID_PARAMETER Invalid parameter
* @retval #REMOTE_CONTROL_REPLY_TIMEOUT Socket connection failed
*
- * @see remote_control_default_text_cb()
- * @see remote_control_default_text_callback_unset()
+ * @see remote_control_text_updated_cb()
+ * @see remote_control_text_updated_callback_unset()
*/
-EXAPI int remote_control_default_text_callback_set(remote_control_client *client, remote_control_default_text_cb func, void *user_data);
+EXAPI int remote_control_text_updated_callback_set(remote_control_client *client, remote_control_text_updated_cb func, void *user_data);
/**
- * @brief Remove a remote_control_default_text_cb() callback function.
+ * @brief Remove a remote_control_text_updated_cb() callback function.
*
* @since_tizen @if TV 3.0 @endif
*
@@ -365,10 +365,10 @@ EXAPI int remote_control_default_text_callback_set(remote_control_client *client
* @retval #REMOTE_CONTROL_INVALID_PARAMETER Invalid parameter
* @retval #REMOTE_CONTROL_REPLY_TIMEOUT Socket connection failed
*
- * @see remote_control_default_text_cb()
- * @see remote_control_default_text_callback_set()
+ * @see remote_control_text_updated_cb()
+ * @see remote_control_text_updated_callback_set()
*/
-EXAPI int remote_control_default_text_callback_unset(remote_control_client *client);
+EXAPI int remote_control_text_updated_callback_unset(remote_control_client *client);
/**
* @brief Sends the key event to the associated text field.
diff --git a/ism/src/scim_trans_commands.h b/ism/src/scim_trans_commands.h
index 9193f5dd..23f7269c 100644
--- a/ism/src/scim_trans_commands.h
+++ b/ism/src/scim_trans_commands.h
@@ -641,7 +641,7 @@ const int ISM_REMOTE_TRANS_CMD_SEND_INPUT_MESSAGE = 1025;
const int ISM_REMOTE_TRANS_CMD_RECV_FOCUS_IN = 1026;
const int ISM_REMOTE_TRANS_CMD_RECV_FOCUS_OUT = 1027;
const int ISM_REMOTE_TRANS_CMD_RECV_ENTRY_METADATA = 1028;
-const int ISM_REMOTE_TRANS_CMD_RECV_DEFAULT_TEXT = 1029;
+const int ISM_REMOTE_TRANS_CMD_RECV_SURROUNDING_TEXT = 1029;
const int ISM_REMOTE_TRANS_CMD_CHECK_PRIVILEGE = 1030;
const int ISM_REMOTE_TRANS_CMD_DELETE_SURROUNDING_TEXT = 1031;