analyze_surrounding_text (Ecore_IMF_Context *ctx)
{
char *plain_str = NULL;
- Eina_Unicode puncs[] = {'\n','.', '!', '?', 0x00BF /* ¿ */, 0x00A1 /* ¡ */,
+ Eina_Unicode puncs[] = {'\n', '.', '!', '?', 0x00BF /* ¿ */, 0x00A1 /* ¡ */,
0x3002 /* 。 */, 0x06D4 /* Urdu */, 0x0964 /* Hindi */,
0x0589 /* Armenian */, 0x17D4 /* Khmer */, 0x104A /* Myanmar */};
Eina_Unicode *ustr = NULL;
SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "(" << context_scim->id << ")...\n";
if (context_scim && context_scim->impl && context_scim == _focused_ic) {
-
WideString wstr = context_scim->impl->preedit_string;
LOGD ("ctx : %p\n", ctx);
tokenize_result = tokenize_tag (sub_splited_string [j], &image_data);
if (tokenize_result && _candidate_image_count < SCIM_LOOKUP_TABLE_MAX_PAGESIZE && _candidate_text_count < SCIM_LOOKUP_TABLE_MAX_PAGESIZE) {
_candidate_image [_candidate_image_count] = elm_image_add (parent);
- snprintf (image_key, sizeof (image_key), "%d",_candidate_image_count);
+ snprintf (image_key, sizeof (image_key), "%d", _candidate_image_count);
elm_image_file_set (_candidate_image [_candidate_image_count], image_data.path.c_str (), image_key);
elm_image_animated_set (_candidate_image [_candidate_image_count], EINA_TRUE);
elm_image_animated_play_set (_candidate_image [_candidate_image_count], EINA_TRUE);
evas_object_size_hint_weight_set (candidate_object_table_bg_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set (candidate_object_table_bg_rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set (candidate_object_table_bg_rect, *total_width, _item_min_height);
- elm_table_pack (candidate_object_table, candidate_object_table_bg_rect, 0, 0, *total_width ,_item_min_height);
+ elm_table_pack (candidate_object_table, candidate_object_table_bg_rect, 0, 0, *total_width, _item_min_height);
evas_object_show (candidate_object_table_bg_rect);
evas_object_size_hint_align_set (candidate_object_table, EVAS_HINT_FILL, EVAS_HINT_FILL);
set_keyboard_geometry_atom_info (_app_window, get_ise_geometry());
#endif
_info_manager->update_input_panel_event (ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, 0);
-
}
#if ISF_BUILD_CANDIDATE_UI
static void slot_close_connection (int fd)
{
SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
-
}
/**
static void slot_set_keyboard_mode (int mode)
{
- LOGD ("slot_set_keyboard_mode called (TOOLBAR_MODE : %d)\n",mode);
+ LOGD ("slot_set_keyboard_mode called (TOOLBAR_MODE : %d)\n", mode);
change_keyboard_mode ((TOOLBAR_MODE_T)mode);
}
for (size_t i = 0; i < _ime_info.size (); ++i) {
if (_ime_info[i].appid == uuid && _ime_info[i].module_name.length ()) {
-
if (scim_helper_path != String (SCIM_HELPER_LAUNCHER_PROGRAM)) {
/* Check if IME with the same AppID is alive */
int status_ret = aul_app_get_status (uuid.c_str ());
LOGD ("Succeeded to set vconf key\n");
}
#endif
-
}
_config->reload ();
}
ecore_x_e_window_rotation_app_set (elm_win_xwindow_get (_candidate_window), EINA_TRUE);
_candidate_angle = (int)ev->data.l[0];
if (_candidate_angle == 90 || _candidate_angle == 270) {
- evas_object_resize (_candidate_window, _candidate_land_width,_candidate_land_height_min);
+ evas_object_resize (_candidate_window, _candidate_land_width, _candidate_land_height_min);
} else {
- evas_object_resize (_candidate_window, _candidate_port_width,_candidate_port_height_min);
+ evas_object_resize (_candidate_window, _candidate_port_width, _candidate_port_height_min);
}
ui_candidate_window_rotate (_candidate_angle);
ui_settle_candidate_window ();
lang_name = scim_get_language_name_english (it->first);
if (std::find (lang_list.begin (), lang_list.end (), lang_name) != lang_list.end ()) {
for (size_t i = 0; i < it->second.size (); i++) {
-
if (_ime_info[it->second[i]].mode != TOOLBAR_HELPER_MODE)
continue;
// Avoid to add the same ISE
static int keycode_get_from_keysym(struct xkb_keymap *keymap, xkb_keysym_t keysym)
{
- keycode_map found_keycodes = {0,};
+ keycode_map found_keycodes = {0, };
found_keycodes.keysym = keysym;
xkb_keymap_key_for_each(keymap, find_keycode, &found_keycodes);
return false;
}
- if (ioctl(fd_uinput_mouse,UI_DEV_CREATE) < 0) {
+ if (ioctl(fd_uinput_mouse, UI_DEV_CREATE) < 0) {
LOGW ("Fail to create keyboard uinput device\n");
return false;
}
if (m != n)
/* partial write, adjust */
lseek(pss->fd, m - n, SEEK_CUR);
-
} while (!lws_send_pipe_choked(wsi));
lws_callback_on_writable(wsi);
break;
enum lws_callback_reasons reason,
void *user, void *in, size_t len)
{
- LOGD(" %d",reason);
+ LOGD(" %d", reason);
static int last_session_id = 0;
const int bufsize = 512;
int n = 0;
struct per_session_data__keyboard *pss = (struct per_session_data__keyboard *)user;
WebSocketServer *agent = WebSocketServer::get_current_instance();
switch (reason) {
-
case LWS_CALLBACK_ESTABLISHED:
pss->session_id = ++last_session_id;
LOGD("LWS_CALLBACK_ESTABLISHED : %d", pss->session_id);
void log_func(int level, const char *line)
{
LOGD(" ");
-
}
WebSocketServer::WebSocketServer()
}
if (context_scim && context_scim->impl && context_scim == _focused_ic) {
-
WideString wstr = context_scim->impl->preedit_string;
//sehwan added
GdkEventKey gdkevent = keyevent_scim_to_gdk (ic, key, TRUE);
if (!_fallback_instance->process_key_event (key) &&
!gtk_im_context_filter_keypress (GTK_IM_CONTEXT (ic->slave), &gdkevent)) {
-
// To avoid timing issue, we need emit the signal directly, rather than put the event into the queue.
if (_focused_widget) {
gboolean result;
EXAPI int main (int argc, char *argv [])
{
- ui_app_lifecycle_callback_s event_callback = {0,};
+ ui_app_lifecycle_callback_s event_callback = {0, };
event_callback.create = app_create;
event_callback.terminate = app_terminate;
~LockAdapter () {
eina_lock_release (m_lock);
}
-
};
SimpleConfig::SimpleConfig ()
if (m_temp_trans.write_to_socket (socket_client) &&
m_temp_trans.read_from_socket (socket_client, m_socket_timeout)) {
-
int cmd;
uint32 key;
uint32 cur;
}
}
return ret;
-
}
bool
if (m_temp_trans.write_to_socket (socket_client) &&
m_temp_trans.read_from_socket (socket_client, m_socket_timeout)) {
-
int cmd;
uint32 key;
SCIM_DEBUG_FRONTEND (2) << " socket_delete_instance.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " InstanceID (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (event)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ") KeyEvent ("
<< event.code << "," << event.mask << ").\n";
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (caret)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid
<< ") Caret (" << caret << ").\n";
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (item)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ") Item (" << item << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (item)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ") Item (" << item << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (size)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ") PageSize (" << size << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_lookup_table_page_up.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_lookup_table_page_down.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (allow)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (layout)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (input_hint)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (bidi_direction)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (row_items)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ") RowSize (" << row_items.size () << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (cursor_pos)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ") New cursor (" << cursor_pos << ").\n";
m_current_instance = (int) siid;
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;
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;
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;
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;
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;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (mode)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_reset_option.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_reset.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_focus_in.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_focus_out.\n";
if (m_receive_trans.get_data (siid)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (property)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
if (m_receive_trans.get_data (siid) &&
m_receive_trans.get_data (helper_uuid) &&
m_receive_trans.get_data (trans)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
SCIM_DEBUG_FRONTEND (2) << " socket_update_client_capabilities.\n";
if (m_receive_trans.get_data (siid) && m_receive_trans.get_data (cap)) {
-
SCIM_DEBUG_FRONTEND (3) << " SI (" << siid << ").\n";
m_current_instance = (int) siid;
}
}
-
void
SocketFrontEnd::socket_flush_config (int /*client_id*/)
{
SCIM_DEBUG_FRONTEND (2) << " socket_erase_config.\n";
if (m_receive_trans.get_data (key)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
if (m_config->erase (key))
if (m_receive_trans.get_data (key) &&
m_receive_trans.get_data (value)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
SCIM_DEBUG_FRONTEND (2) << " socket_get_config_int.\n";
if (m_receive_trans.get_data (key)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
int value;
if (m_receive_trans.get_data (key) &&
m_receive_trans.get_data (value)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
if (m_receive_trans.get_data (key) &&
m_receive_trans.get_data (value)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
if (m_receive_trans.get_data (key) &&
m_receive_trans.get_data (vec)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
if (m_config->write (key, vec))
trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
trans.get_data (&bufptr, filesize) &&
trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK) {
-
String tempfile;
String::size_type pos = icon.rfind (SCIM_PATH_DELIM);
trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
trans.get_data (val) &&
trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK) {
-
si_peer_id = (int) val;
}
}
m_send_trans.put_data((uint32) context_id);
m_send_trans.put_command(SCIM_TRANS_CMD_PANEL_REQUEST_HELP);
m_send_trans.write_to_socket(client_socket);
-
}
void request_factory_menu(int client_id, uint32 context_id) {
}
void get_helper_return_key_disable(int client, uint32 context, const String& uuid, _OUT_ uint32& disabled) {
-
Socket client_socket(client);
LOGD ("client id:%d", client);
m_send_trans.put_data(nest_trans);
m_send_trans.write_to_socket(socket_client);
unlock();
-
}
void socket_helper_key_event(int client, uint32 context, int cmd, KeyEvent& key) {
m_send_trans.put_data(caret);
m_send_trans.write_to_socket(socket_client);
unlock();
-
}
void update_preedit_caret(int client, uint32 focused_context, uint32 caret) {
-
LOGD ("client id:%d\n", client);
Socket socket_client(client);
m_send_trans.put_data(caret);
m_send_trans.write_to_socket(socket_client);
unlock();
-
}
void helper_attach_input_context_and_update_screen(int client, std::vector < std::pair <uint32, String> >& helper_ic_index, uint32 current_screen) {
m_send_trans.put_data(type);
m_send_trans.put_data(value);
m_send_trans.write_to_socket(client_socket);
-
}
void send_private_command(int client, uint32 focused_context, String command) {
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);
-
}
void helper_all_update_spot_location(int client, uint32 context_id, String uuid, int x, int y) {
Socket client_socket(client);
m_send_trans.write_to_socket(client_socket);
-
}
void helper_all_update_cursor_position(int client, uint32 context_id, String uuid, int cursor_pos) {
Socket client_socket(client);
m_send_trans.write_to_socket(client_socket);
-
}
void helper_all_update_screen(int client, uint32 context_id, String uuid, int screen) {
Socket client_socket(client);
m_send_trans.write_to_socket(client_socket);
-
}
void set_autocapital_type(int client, uint32 context, String uuid, int mode) {
continue;
}
-
else if (cmd == SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT) {
if (m_recv_trans.get_data(uuid)) {
m_info_manager->register_input_context(client_id, context, uuid);
continue;
}
-
else if (cmd == SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT) {
m_info_manager->remove_input_context(client_id, context);
continue;
}
-
else if (cmd == SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT) {
m_info_manager->socket_reset_input_context(client_id, context);
continue;
}
-
else if (cmd == SCIM_TRANS_CMD_FOCUS_IN) {
SCIM_DEBUG_MAIN(4) << " SCIM_TRANS_CMD_FOCUS_IN (" << "client:" << client_id << " context:" << context << ")\n";
continue;
}
-
else if (cmd == ISM_TRANS_CMD_TURN_ON_LOG) {
uint32 isOn;
continue;
}
-
else if (cmd == ISM_TRANS_CMD_SHOW_ISF_CONTROL) {
m_info_manager->show_isf_panel(client_id);
continue;
LOGD ("PanelAgent::cmd = %d\n", cmd);
if (cmd == ISM_TRANS_CMD_GET_ACTIVE_ISE) {
-
if (m_info_manager->check_privilege_by_sockfd(client_id, IMEMANAGER_PRIVILEGE)) {
String default_uuid;
m_info_manager->get_active_ise(client_id, default_uuid);
int i = 0;
std::vector<Ecore_Fd_Handler *>::iterator IterPos;
- for (IterPos = _read_handler_list.begin (); IterPos != _read_handler_list.end (); ++IterPos,++i) {
+ for (IterPos = _read_handler_list.begin (); IterPos != _read_handler_list.end (); ++IterPos, ++i) {
if (ecore_main_fd_handler_fd_get (_read_handler_list[i]) == client.get_id()) {
::close (client.get_id ());
ecore_main_fd_handler_del (_read_handler_list[i]);
_config->flush ();
} else if (cmd == SCIM_TRANS_CMD_ERASE_CONFIG) {
-
String key;
SCIM_DEBUG_FRONTEND (2) << " socket_erase_config.\n";
if (m_recv_trans.get_data (key)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
if (m_config_readonly) {
LOGW ("sorry config readonly");
break;
}
} else if (cmd == SCIM_TRANS_CMD_RELOAD_CONFIG) {
-
SCIM_DEBUG_FRONTEND (2) << " socket_reload_config.\n";
Socket client_socket (client_id);
m_send_trans.clear ();
if (m_recv_trans.get_data (key) &&
m_recv_trans.get_data (value)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
if (m_config_readonly) {
SCIM_DEBUG_FRONTEND (2) << " socket_get_config_int.\n";
if (m_recv_trans.get_data (key)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
int value;
}
} else if (cmd == SCIM_TRANS_CMD_SET_CONFIG_INT) {
-
String key;
uint32 value;
if (m_recv_trans.get_data (key) &&
m_recv_trans.get_data (value)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
if (m_config_readonly) {
}
} else if (cmd == SCIM_TRANS_CMD_GET_CONFIG_BOOL) {
-
String key;
SCIM_DEBUG_FRONTEND (2) << " socket_get_config_bool.\n";
}
} else if (cmd == SCIM_TRANS_CMD_SET_CONFIG_BOOL) {
-
String key;
uint32 value;
if (m_recv_trans.get_data (key) &&
m_recv_trans.get_data (value)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
if (m_config_readonly) {
LOGW ("wrong format of transaction\n");
break;
}
-
} else if (cmd == SCIM_TRANS_CMD_GET_CONFIG_DOUBLE) {
String key;
}
} else if (cmd == SCIM_TRANS_CMD_SET_CONFIG_DOUBLE) {
-
String key;
String str;
}
} else if (cmd == SCIM_TRANS_CMD_GET_CONFIG_VECTOR_STRING) {
-
String key;
SCIM_DEBUG_FRONTEND (2) << " socket_get_config_vector_string.\n";
}
} else if (cmd == SCIM_TRANS_CMD_SET_CONFIG_VECTOR_STRING) {
-
String key;
std::vector<String> vec;
if (m_recv_trans.get_data (key) &&
m_recv_trans.get_data (vec)) {
-
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
if (m_config_readonly) {
LOGW ("sorry config readonly");
LOGW ("wrong format of transaction\n");
break;
}
-
} else if (cmd == SCIM_TRANS_CMD_GET_CONFIG_VECTOR_INT) {
-
String key;
SCIM_DEBUG_FRONTEND (2) << " socket_get_config_vector_int.\n";
}
} else if (cmd == SCIM_TRANS_CMD_SET_CONFIG_VECTOR_INT) {
-
String key;
std::vector<uint32> vec;
LOGW ("wrong format of transaction\n");
break;
}
-
}
}
void
initialize (void)
{
-
LOGD ("Initializing Wayland ISF IMModule...\n");
// Get system language.
//socket_helper_commit_string
//SCIM_TRANS_CMD_COMMIT_STRING
-void PanelAgentBase::commit_string (int client, uint32 context,const WideString& wstr)
+void PanelAgentBase::commit_string (int client, uint32 context, const WideString& wstr)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
LOGW ("not implemented for %s", m_name.c_str ());
}
-void PanelAgentBase::remote_commit_string (int client, uint32 context,const WideString& wstr)
+void PanelAgentBase::remote_commit_string (int client, uint32 context, const WideString& wstr)
{
LOGW ("not implemented for %s", m_name.c_str ());
}
void request_ise_hide(int client, uint32 context);
void set_autocapital_type(int id, uint32 context_id, String uuid, int mode);
void update_ise_geometry(int id, uint32 context_id, uint32 x, uint32 y, uint32 width, uint32 height);
- void remote_update_preedit_string (int target_client, uint32 target_context, const WideString str, const WideString commit,const AttributeList &attrs, uint32 caret);
+ void remote_update_preedit_string (int target_client, uint32 target_context, const WideString str, const WideString commit, 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);
* @return A smart pointer to the PanelAgent object, NULL if failed.
*/
PanelAgentPointer get_instance () const;
-
};
/**
if (m_socket_remoteinput2panel.is_connected ()) close_connection ();
- bool ret=false, ret2=false;
+ bool ret = false, ret2 = false;
int count = 0;
/* Try three times. */
if (engine_module && engine_module->valid ()) {
size_t number = engine_module->number_of_factories ();
for (size_t j = 0; j < number; ++j) {
-
/* Try to load a IMEngine Factory. */
try {
factory = engine_module->create_factory (j);
if (std::find (m_impl->m_disabled_factories.begin (),
m_impl->m_disabled_factories.end (),
factory->get_uuid ()) == m_impl->m_disabled_factories.end ()) {
-
/* Add it into disabled list to prevent from loading again. */
/*m_impl->m_disabled_factories.push_back (factory->get_uuid ());*/
_create_config (const String &default_module)
{
if (!_scim_default_config_module.valid ()) {
-
String module;
if (!default_module.length ())
while (!m_impl->socket.connect (address) && ++i < 10) {
scim_usleep (200000);
}
-
}
ISF_LOG ("scim_socket_open_connection () is successful.\n");
}
for (size_t j = 0; j < engine_module->number_of_factories (); ++j) {
-
try {
factory = engine_module->create_factory (j);
if (factory.null () == false && factory->get_uuid () == uuid)
m_impl->si = factory->create_instance ("UTF-8", instance_count++);
if (m_impl->si.null ()) {
- LOGE ("create_instance %s failed",uuid.c_str ());
+ LOGE ("create_instance %s failed", uuid.c_str ());
return;
}
HelperModule::get_helper_info (unsigned int idx, HelperInfo &info) const
{
if (m_module.valid () && m_run_helper && module_name.length () > 0) {
-
std::vector<ImeInfoDB> ime_info_db;
isf_db_select_all_ime_info (ime_info_db);
for (std::vector<ImeInfoDB>::iterator iter = ime_info_db.begin (); iter != ime_info_db.end (); iter++) {
class TextdomainInitializer {
public:
TextdomainInitializer () {
-
#ifdef HAVE_SETLOCALE
char *locale = setlocale (LC_MESSAGES, 0);
if (!locale || *locale == 'C')
for (i = 0; i < m_impl->max_fd + 1; i++) {
if (FD_ISSET (i, &read_fds)) {
-
//New connection
if (i == Socket::get_id ()) {
client = Socket::accept ();
scim_bytestouint32 (cbuf) == 0 &&
scim_bytestouint32 (cbuf + sizeof (uint32)) == SCIM_TRANS_MAGIC &&
scim_bytestouint32 (cbuf + sizeof (uint32) * 2) <= bufsize - SCIM_TRANS_HEADER_SIZE) {
-
uint32 size = scim_bytestouint32 (cbuf + sizeof (uint32) * 2) + SCIM_TRANS_HEADER_SIZE;
#ifdef ENABLE_CHECKMSG
uint32 checksum = scim_bytestouint32 (cbuf + sizeof (uint32) * 3);
if (valid () &&
m_impl->m_holder->m_write_pos > m_impl->m_read_pos &&
m_impl->m_holder->m_buffer [m_impl->m_read_pos] == SCIM_TRANS_DATA_COMMAND) {
-
if (m_impl->m_holder->m_write_pos < (m_impl->m_read_pos + sizeof (uint32) + 1))
return false;
if (valid () &&
m_impl->m_holder->m_write_pos > m_impl->m_read_pos &&
m_impl->m_holder->m_buffer [m_impl->m_read_pos] == SCIM_TRANS_DATA_UINT32) {
-
if (m_impl->m_holder->m_write_pos < (m_impl->m_read_pos + sizeof (uint32) + 1))
return false;
if (valid () &&
m_impl->m_holder->m_write_pos > m_impl->m_read_pos &&
m_impl->m_holder->m_buffer [m_impl->m_read_pos] == SCIM_TRANS_DATA_STRING) {
-
size_t len;
size_t old_read_pos = m_impl->m_read_pos;
if (valid () &&
m_impl->m_holder->m_write_pos > m_impl->m_read_pos &&
m_impl->m_holder->m_buffer [m_impl->m_read_pos] == SCIM_TRANS_DATA_WSTRING) {
-
String mbs;
size_t len;
size_t old_read_pos = m_impl->m_read_pos;
wstr.push_back (wc);
str += un;
sn += un;
-
}
}
return wstr;
if (setlocale (LC_CTYPE, (vec[0] + "." + vec[1]).c_str ()))
encoding = String (nl_langinfo (CODESET));
}
-
}
setlocale (LC_CTYPE, last.c_str ());