#define IME_DEVICE_NAME "ime"
-#ifdef _TV
-# define ENABLE_RESET_DONE_FUNC 0
-#else
-# define ENABLE_RESET_DONE_FUNC 1
-#endif
-
#define HIDE_TIMER_INTERVAL 0.05
#define WAIT_FOR_FILTER_DONE_SECOND 2
uint32_t state;
} last_key_event_filter;
Eina_List *keysym_list;
-#if ENABLE_RESET_DONE_FUNC
- uint32_t last_reset_serial;
-#else
+
uint32_t reset_serial;
-#endif
//
};
}
}
+static Eina_Bool
+check_serial(WaylandIMContext *imcontext, uint32_t serial)
+{
+#ifdef _TV
+ return EINA_TRUE;
+#endif
+ Ecore_IMF_Preedit_Attr *attr;
+
+ if ((imcontext->serial - serial) >
+ (imcontext->serial - imcontext->reset_serial)) {
+ LOGD("outdated serial: %u, current: %u, reset: %u",
+ serial, imcontext->serial, imcontext->reset_serial);
+
+ imcontext->pending_preedit.cursor = 0;
+
+ if (imcontext->pending_preedit.attrs) {
+ EINA_LIST_FREE(imcontext->pending_preedit.attrs, attr) free(attr);
+ imcontext->pending_preedit.attrs = NULL;
+ }
+
+ return EINA_FALSE;
+ }
+
+ return EINA_TRUE;
+}
+
static void
clear_preedit(WaylandIMContext *imcontext)
{
if (!imcontext->ctx)
return;
+ if (!check_serial(imcontext, serial))
+ return;
+
if (old_preedit)
{
ecore_imf_context_preedit_end_event_add(imcontext->ctx);
text,
imcontext->preedit_text ? imcontext->preedit_text : "");
+ if (!check_serial(imcontext, serial))
+ return;
+
old_preedit =
imcontext->preedit_text && strlen(imcontext->preedit_text) > 0;
WaylandIMContext *imcontext = (WaylandIMContext *)data;
update_state(imcontext);
-#if !(ENABLE_RESET_DONE_FUNC)
+
imcontext->reset_serial = imcontext->serial;
-#endif
}
static void
imcontext->last_key_event_filter.state = state;
}
-static void
-text_input_reset_done(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
- uint32_t serial)
-{
- LOGD("serial: %d", serial);
-#if ENABLE_RESET_DONE_FUNC
- WaylandIMContext *imcontext = (WaylandIMContext *)data;
- if (!imcontext) return;
-
- imcontext->last_reset_serial = serial;
-#endif
-}
-
//
static const struct wl_text_input_listener text_input_listener =
text_input_input_panel_data,
text_input_get_selection_text,
text_input_get_surrounding_text,
- text_input_filter_key_event_done,
- text_input_reset_done
+ text_input_filter_key_event_done
//
};
if (!imcontext) return;
+ commit_preedit (imcontext);
clear_preedit(imcontext);
if (!imcontext->input) return;
-#if !(ENABLE_RESET_DONE_FUNC)
- wl_text_input_reset(imcontext->text_input);
-#else
+
if (imcontext->text_input) {
- int serial = imcontext->serial++;
- double start_time = ecore_time_get();
- //send "reset_sync" to IME with serial
- wl_text_input_reset_sync(imcontext->text_input, serial);
- //wait for "reset_done" from IME according to serial
- while (ecore_time_get() - start_time < WAIT_FOR_FILTER_DONE_SECOND){
- wl_display_dispatch(ecore_wl_display_get());
- if (imcontext->last_reset_serial >= serial) {
- LOGD("reset_serial %d, serial %d", imcontext->last_reset_serial, serial);
- break;
- }
- }
+ wl_text_input_reset(imcontext->text_input);
}
-#endif
update_state(imcontext);
-#if !(ENABLE_RESET_DONE_FUNC)
+
imcontext->reset_serial = imcontext->serial;
-#endif
}
EAPI void
void reset_helper_context(int client, uint32 context, const String& uuid) {
LOGD ("client id:%d\n", client);
Transaction trans;
- int cmd;
Socket client_socket(client);
m_send_trans.clear();
m_send_trans.put_command(SCIM_TRANS_CMD_REPLY);
m_send_trans.put_data(uuid);
m_send_trans.put_command(ISM_TRANS_CMD_RESET_ISE_CONTEXT);
m_send_trans.write_to_socket(client_socket);
-
- if (!trans.read_from_socket(client_socket, m_socket_timeout) ||
- !trans.get_command(cmd) || cmd != SCIM_TRANS_CMD_REPLY) {
- LOGW ("ISM_TRANS_CMD_RESET_ISE_CONTEXT failed\n");
- }
}
void reload_config(int client) {
unlock();
}
- void update_preedit_string(int client, uint32 target_context, WideString wstr, AttributeList& attrs, uint32 caret) {
+ void update_preedit_string(int client, uint32 target_context, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
LOGD ("client id:%d\n", client);
Socket socket_client(client);
m_send_trans.put_command(SCIM_TRANS_CMD_REPLY);
m_send_trans.put_data(target_context);
m_send_trans.put_command(SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING);
- m_send_trans.put_data(wstr);
+ m_send_trans.put_data(preedit);
+ m_send_trans.put_data(commit);
m_send_trans.put_data(attrs);
m_send_trans.put_data(caret);
m_send_trans.write_to_socket(socket_client);
} else if (cmd == SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING) {
uint32 target_ic;
String target_uuid;
- WideString wstr;
+ WideString preedit;
+ WideString commit;
AttributeList attrs;
uint32 caret;
if (m_recv_trans.get_data(target_ic) &&
m_recv_trans.get_data(target_uuid) &&
- m_recv_trans.get_data(wstr) &&
+ m_recv_trans.get_data(preedit) &&
+ m_recv_trans.get_data(commit) &&
m_recv_trans.get_data(attrs) &&
m_recv_trans.get_data(caret)) {
- m_info_manager->socket_helper_update_preedit_string(client_id, target_ic, target_uuid, wstr, attrs, caret);
+ m_info_manager->socket_helper_update_preedit_string(client_id, target_ic, target_uuid, preedit, commit, attrs, caret);
} else {
LOGW ("wrong format of transaction\n");
}
WideString surrounding_text;
WideString preedit_string;
AttributeList preedit_attrlist;
+ WideString commit_string;
Ecore_IMF_Autocapital_Type autocapital_type;
Ecore_IMF_Input_Hints input_hint;
Ecore_IMF_BiDi_Direction bidi_direction;
static void panel_slot_forward_key_event (int context,
const KeyEvent &key);
static void _show_preedit_string (int context);
-static void _update_preedit_string (int context,
- const WideString &str,
- const AttributeList &attrs,
- int caret);
+
static void panel_req_update_bidi_direction (WSCContextISF *ic, int direction);
/* utility functions */
LOGD ("");
if (context_scim && context_scim->impl && context_scim == _focused_ic) {
g_info_manager->socket_reset_input_context (WAYLAND_MODULE_CLIENT_ID, context_scim->id);
- if (context_scim->impl->need_commit_preedit) {
- _hide_preedit_string (context_scim->id, false);
- wsc_context_commit_preedit_string (context_scim);
- }
}
}
#endif
}
-static void
-_wsc_im_ctx_reset_sync(void *data, struct wl_input_method_context *im_ctx, uint32_t serial)
-{
- WSCContextISF *context_scim = (WSCContextISF*)data;
- LOGD ("");
- if (context_scim && context_scim->impl && context_scim == _focused_ic) {
- g_info_manager->socket_reset_input_context (WAYLAND_MODULE_CLIENT_ID, context_scim->id);
- if (context_scim->impl->need_commit_preedit) {
- _hide_preedit_string (context_scim->id, false);
- wsc_context_commit_preedit_string (context_scim);
- }
- }
- wl_input_method_context_reset_done (im_ctx, serial);
-}
-
static const struct wl_input_method_context_listener wsc_im_context_listener = {
_wsc_im_ctx_reset,
_wsc_im_ctx_bidi_direction,
_wsc_im_ctx_cursor_position,
_wsc_im_ctx_process_input_device_event,
- _wsc_im_ctx_filter_key_event,
- _wsc_im_ctx_reset_sync
+ _wsc_im_ctx_filter_key_event
};
#if ENABLE_GRAB_KEYBOARD
rec->surrounding_text = WideString ();
rec->preedit_string = WideString ();
rec->preedit_attrlist.clear ();
+ rec->commit_string = WideString ();
return;
}
context_scim->impl->surrounding_text.clear ();
context_scim->impl->preedit_string.clear ();
context_scim->impl->preedit_attrlist.clear ();
+ context_scim->impl->commit_string.clear ();
context_scim->impl->preedit_caret = 0;
context_scim->impl->preedit_started = false;
wl_input_method_context_preedit_string (wsc_ctx->im_ctx,
wsc_ctx->serial,
wsc_ctx->preedit_str,
- wsc_ctx->preedit_str);
+ utf8_wcstombs (wsc_ctx->impl->commit_string).c_str());
}
bool wsc_context_surrounding_get (WSCContextISF *wsc_ctx, char **text, int *cursor_pos)
ic->impl->preedit_attrlist.clear ();
emit = true;
}
+ ic->impl->commit_string = WideString ();
if (ic->impl->use_preedit) {
if (update_preedit && emit) {
if (!check_valid_ic (ic))
}
}
-static void
-_update_preedit_string (int context,
- const WideString &str,
- const AttributeList &attrs,
- int caret)
-{
- SCIM_DEBUG_FRONTEND (1) << __FUNCTION__ << "...\n";
- LOGD ("");
- WSCContextISF* ic = find_ic (context);
-
- if (ic && ic->impl && _focused_ic == ic) {
- if (!ic->impl->is_on)
- ic->impl->is_on = true;
-
- if (ic->impl->preedit_string != str || str.length ()) {
- ic->impl->preedit_string = str;
- ic->impl->preedit_attrlist = attrs;
-
- if (ic->impl->use_preedit) {
- if (!ic->impl->preedit_started) {
- if (!check_valid_ic (ic))
- return;
-
- ic->impl->preedit_started = true;
- ic->impl->need_commit_preedit = true;
- }
- if (caret >= 0 && caret <= (int)str.length ())
- ic->impl->preedit_caret = caret;
- else
- ic->impl->preedit_caret = str.length ();
- ic->impl->preedit_updating = true;
- if (check_valid_ic (ic))
- ic->impl->preedit_updating = false;
- wsc_context_send_preedit_string (ic);
- } else {
- String _str = utf8_wcstombs (str);
- g_info_manager->socket_update_preedit_string (_str, attrs, (uint32)caret);
- }
- }
- }
-}
-
static uint32_t _keyname_to_keysym (uint32_t keyname, uint32_t *modifiers)
{
if (!modifiers)
}
void
- update_preedit_string (int id, uint32 context_id, WideString wstr, AttributeList& attrs, uint32 caret) {
+ update_preedit_string (int id, uint32 context_id, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
LOGD ("client id:%d", id);
- _update_preedit_string (context_id, wstr, attrs, caret);
+ SCIM_DEBUG_FRONTEND (1) << __FUNCTION__ << "...\n";
+ WSCContextISF* ic = find_ic (context_id);
+
+ if (ic && ic->impl && _focused_ic == ic) {
+ if (!ic->impl->is_on)
+ ic->impl->is_on = true;
+
+ ic->impl->preedit_string = preedit;
+ ic->impl->preedit_attrlist = attrs;
+ ic->impl->commit_string = commit;
+
+ if (ic->impl->use_preedit) {
+ if (!ic->impl->preedit_started) {
+ if (!check_valid_ic (ic))
+ return;
+
+ ic->impl->preedit_started = true;
+ ic->impl->need_commit_preedit = true;
+ }
+ if (caret <= preedit.length ())
+ ic->impl->preedit_caret = caret;
+ else
+ ic->impl->preedit_caret = preedit.length ();
+ ic->impl->preedit_updating = true;
+ if (check_valid_ic (ic))
+ ic->impl->preedit_updating = false;
+ wsc_context_send_preedit_string (ic);
+ } else {
+ String _str = utf8_wcstombs (preedit);
+ g_info_manager->socket_update_preedit_string (_str, attrs, (uint32)caret);
+ }
+ }
}
static Eina_Bool
get_focused_context (client, context);
if (client >= 0) {
- m_panel_agent_manager.update_preedit_string (client, context, str, attrs, caret);
+ m_panel_agent_manager.update_preedit_string (client, context, str, str, attrs, caret);
}
unlock ();
}
}
//SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
- void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString wstr, AttributeList& attrs, uint32 caret) {
+ void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_preedit_string (" << client << ")\n";
LOGD ("");
int target_client;
ClientInfo client_info = socket_get_client_info (target_client);
if (client_info.type == FRONTEND_CLIENT) {
- m_panel_agent_manager.update_preedit_string (target_client, target_context, wstr, attrs, caret);
+ m_panel_agent_manager.update_preedit_string (target_client, target_context, preedit, commit, attrs, caret);
}
}
}
}
//SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
-void InfoManager::socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString wstr,
- AttributeList& attrs, uint32 caret)
+void InfoManager::socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit,
+ WideString commit, AttributeList& attrs, uint32 caret)
{
- m_impl->socket_helper_update_preedit_string (client, target_ic, target_uuid, wstr, attrs, caret);
+ m_impl->socket_helper_update_preedit_string (client, target_ic, target_uuid, preedit, commit, attrs, caret);
}
//SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
void socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid);
//SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
- void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString wstr, AttributeList& attrs, uint32 caret);
+ void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret);
//SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
void socket_helper_update_preedit_caret (int client, uint32 caret);
}
//socket_helper_update_preedit_string
//SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
-void PanelAgentBase::update_preedit_string (int client, uint32 context, WideString wstr, AttributeList& attrs, uint32 caret)
+void PanelAgentBase::update_preedit_string (int client, uint32 context, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
*
* @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.
_p->hide_preedit_string (id, context_id);
}
-void PanelAgentManager::update_preedit_string (int id, uint32 context_id, WideString wstr, AttributeList& attrs, uint32 caret)
+void PanelAgentManager::update_preedit_string (int id, uint32 context_id, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret)
{
PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
if (!_p.null ())
- _p->update_preedit_string (id, context_id, wstr, attrs, caret);
+ _p->update_preedit_string (id, context_id, preedit, commit, attrs, caret);
}
void PanelAgentManager::update_preedit_caret (int id, uint32 context_id, uint32 caret)
void commit_string (int target_client, uint32 target_context,const WideString& wstr);
void show_preedit_string (int target_client, uint32 target_context);
void hide_preedit_string (int target_client, uint32 target_context);
- void update_preedit_string (int target_client, uint32 target_context, WideString wstr, AttributeList& attrs, uint32 caret);
+ void update_preedit_string (int target_client, uint32 target_context, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret);
void update_preedit_caret (int focused_client, uint32 focused_context, uint32 caret);
void helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index, uint32 current_screen);
void hide_helper_ise (int id, uint32 context);
}
void
+ slot_update_preedit_string_with_commit (IMEngineInstanceBase *si,
+ const WideString & preedit,
+ const WideString & commit,
+ const AttributeList & attrs,
+ int caret)
+ {
+ LOGD ("");
+ thiz->update_preedit_string (-1, "", preedit, commit, attrs, caret);
+ }
+
+ void
slot_update_aux_string (IMEngineInstanceBase *si,
const WideString & str,
const AttributeList & attrs)
slot (this, &HelperAgent::HelperAgentImpl::slot_update_preedit_caret));
si->signal_connect_update_preedit_string (
slot (this, &HelperAgent::HelperAgentImpl::slot_update_preedit_string));
+ si->signal_connect_update_preedit_string_with_commit (
+ slot (this, &HelperAgent::HelperAgentImpl::slot_update_preedit_string_with_commit));
+
si->signal_connect_update_aux_string (
slot (this, &HelperAgent::HelperAgentImpl::slot_update_aux_string));
si->signal_connect_update_lookup_table (
m_impl->signal_reset_ise_context (this, subclass->get_ic_ref(), subclass->get_ic_uuid_ref());
m_impl->signal_reset_input_context (this, subclass->get_ic_ref(), subclass->get_ic_uuid_ref());
if (!m_impl->si.null ()) m_impl->si->reset();
- m_impl->send.clear ();
- m_impl->send.put_command (SCIM_TRANS_CMD_REPLY);
- m_impl->send.write_to_socket (m_impl->socket);
break;
}
case ISM_TRANS_CMD_TURN_ON_LOG:
const AttributeList &attrs) const
{
LOGD ("");
- update_preedit_string (ic, ic_uuid, str, attrs, -1);
+ update_preedit_string (ic, ic_uuid, str, str, attrs, -1);
}
void
void
HelperAgent::update_preedit_string (int ic,
const String &ic_uuid,
- const WideString &str,
+ const WideString &wstr,
+ const AttributeList &attrs,
+ int caret) const
+{
+ LOGD ("");
+ update_preedit_string (ic, ic_uuid, wstr, wstr, attrs, caret);
+}
+
+void
+HelperAgent::update_preedit_string (int ic,
+ const String &ic_uuid,
+ const char *buf,
+ int buflen,
const AttributeList &attrs,
int caret) const
{
m_impl->send.put_command (SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING);
m_impl->send.put_data ((uint32)ic);
m_impl->send.put_data (ic_uuid);
- m_impl->send.put_data (str);
+ m_impl->send.put_dataw (buf, buflen);
+ m_impl->send.put_dataw (buf, buflen);
m_impl->send.put_data (attrs);
m_impl->send.put_data (caret);
m_impl->send.write_to_socket (m_impl->socket_active, m_impl->magic_active);
}
void
-HelperAgent::update_preedit_string (int ic,
- const String &ic_uuid,
- const char *buf,
- int buflen,
+HelperAgent::update_preedit_string (int ic,
+ const String &ic_uuid,
+ const WideString &preedit,
+ const WideString &commit,
const AttributeList &attrs,
- int caret) const
+ int caret) const
{
LOGD ("");
-
if (m_impl->socket_active.is_connected ()) {
m_impl->send.clear ();
m_impl->send.put_command (SCIM_TRANS_CMD_REQUEST);
m_impl->send.put_command (SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING);
m_impl->send.put_data ((uint32)ic);
m_impl->send.put_data (ic_uuid);
- m_impl->send.put_dataw (buf, buflen);
+ m_impl->send.put_data (preedit);
+ m_impl->send.put_data (commit);
m_impl->send.put_data (attrs);
m_impl->send.put_data (caret);
m_impl->send.write_to_socket (m_impl->socket_active, m_impl->magic_active);
*/
void update_preedit_string (int ic,
const String &ic_uuid,
- const WideString &wstr,
+ const WideString &wstr,
const AttributeList &attrs,
int caret) const;
int caret) const;
/**
+ * @brief Update a new WideString and caret for preedit.
+ *
+ * @param ic The handle of the client Input Context to receive the WideString.
+ * -1 means the currently focused Input Context.
+ * @param ic_uuid The UUID of the IMEngine used by the Input Context.
+ * Empty means don't match.
+ * @param preedit The WideString to be updated.
+ * @param commit The WideString to be commited on reset.
+ * @param attrs The attribute list for preedit string.
+ * @param caret The caret position in preedit string.
+ *
+ * The commit string can be used to replace the preedit string on reset
+ * for example on unfocus.
+ */
+
+ void update_preedit_string (int ic,
+ const String &ic_uuid,
+ const WideString &preedit,
+ const WideString &commit,
+ const AttributeList &attrs,
+ int caret) const;
+
+ /**
* @brief Update a new string for aux.
*
* @param str The string to be updated.
typedef Signal4<void, IMEngineInstanceBase*,const char*,int,const AttributeList&>
IMEngineSignalUTF8StringAttributeList;
+typedef Signal5<void, IMEngineInstanceBase*,const WideString&,const WideString&,const AttributeList&,int>
+ IMEngineSignalWideStringWideStringAttributeListInt;
+
typedef Signal5<bool, IMEngineInstanceBase*,WideString&,int&,int,int>
IMEngineSignalGetSurroundingText;
IMEngineSignalUTF8StringAttributeListInt m_signal_update_preedit_utf8_string;
IMEngineSignalWideStringAttributeList m_signal_update_aux_string;
IMEngineSignalUTF8StringAttributeList m_signal_update_aux_utf8_string;
+ IMEngineSignalWideStringWideStringAttributeListInt m_signal_update_preedit_string_with_commit;
IMEngineSignalWideString m_signal_commit_string;
IMEngineSignalUTF8String m_signal_commit_utf8_string;
IMEngineSignalLookupTable m_signal_update_lookup_table;
}
Connection
+IMEngineInstanceBase::signal_connect_update_preedit_string_with_commit (IMEngineSlotWideStringWideStringAttributeListInt *slot)
+{
+ return m_impl->m_signal_update_preedit_string_with_commit.connect (slot);
+}
+
+Connection
IMEngineInstanceBase::signal_connect_update_aux_string (IMEngineSlotWideStringAttributeList *slot)
{
return m_impl->m_signal_update_aux_string.connect (slot);
}
void
+IMEngineInstanceBase::update_preedit_string (const WideString &preedit,
+ const WideString &commit,
+ const AttributeList &attrs,
+ int caret)
+{
+ m_impl->m_signal_update_preedit_string_with_commit (this, preedit, commit, attrs, caret);
+}
+
+void
IMEngineInstanceBase::update_aux_string (const WideString &str,
const AttributeList &attrs)
{
typedef Slot4<void, IMEngineInstanceBase*,const char*, int,const AttributeList&>
IMEngineSlotUTF8StringAttributeList;
+typedef Slot5<void, IMEngineInstanceBase*,const WideString&, const WideString&, const AttributeList&,int>
+ IMEngineSlotWideStringWideStringAttributeListInt;
+
typedef Slot5<bool, IMEngineInstanceBase*,WideString&,int&,int,int>
IMEngineSlotGetSurroundingText;
Connection signal_connect_update_preedit_caret (IMEngineSlotInt *slot);
Connection signal_connect_update_preedit_string (IMEngineSlotWideStringAttributeListInt *slot);
Connection signal_connect_update_preedit_utf8_string (IMEngineSlotUTF8StringAttributeListInt *slot);
+ Connection signal_connect_update_preedit_string_with_commit (IMEngineSlotWideStringWideStringAttributeListInt *slot);
+
Connection signal_connect_update_aux_string (IMEngineSlotWideStringAttributeList *slot);
Connection signal_connect_update_aux_utf8_string (IMEngineSlotUTF8StringAttributeList *slot);
Connection signal_connect_update_lookup_table (IMEngineSlotLookupTable *slot);
int caret);
/**
+ * @brief Update the content of the preedit string,
+ *
+ * @param preedit - the preedit string
+ * @param commit - the commit string
+ * @param attrs - the string attribute
+ * @param caret - the caret position
+ *
+ * The commit string can be used to replace the preedit string on reset
+ * for example on unfocus.
+ */
+ void update_preedit_string (const WideString &preedit,
+ const WideString &commit,
+ const AttributeList &attrs = AttributeList (),
+ int caret = -1);
+
+ /**
* @brief Update the content of the aux string,
*
* @param str - the string content