1 /** @file isf_info_manager.cpp
2 * @brief Implementation of class InfoManager.
5 /* ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable. */
8 * Smart Common Input Method
10 * Copyright (c) 2005 James Su <suzhe@tsinghua.org.cn>
11 * Copyright (c) 2012-2016 Samsung Electronics Co., Ltd.
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this program; if not, write to the
26 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
27 * Boston, MA 02111-1307 USA
29 * Modifications by Samsung Electronics Co., Ltd.
31 * a. m_signal_set_keyboard_ise and m_signal_get_keyboard_ise
32 * b. m_signal_focus_in and m_signal_focus_out
33 * c. m_signal_expand_candidate, m_signal_contract_candidate and m_signal_set_candidate_ui
34 * d. m_signal_get_ise_list, m_signal_get_keyboard_ise_list, m_signal_update_ise_geometry and m_signal_get_ise_information
35 * e. m_signal_set_active_ise_by_uuid and m_signal_get_ise_info_by_uuid
36 * f. m_signal_accept_connection, m_signal_close_connection and m_signal_exit
37 * 2. Add new interface APIs in PanelClient class
38 * a. get_helper_manager_id (), has_helper_manager_pending_event () and filter_helper_manager_event ()
39 * b. update_candidate_panel_event (), update_input_panel_event () and select_aux ()
40 * c. candidate_more_window_show () and candidate_more_window_hide ()
41 * d. update_displayed_candidate_number () and update_candidate_item_layout ()
42 * e. stop_helper (), send_longpress_event () and update_ise_list ()
43 * f. filter_event (), filter_exception_event () and get_server_id ()
44 * 3. Donot use thread to receive message
45 * 4. Monitor socket frontend for self-recovery function
47 * $Id: scim_panel_agent.cpp,v 1.8.2.1 2006/01/09 14:32:18 suzhe Exp $
52 #define Uses_SCIM_PANEL_AGENT
53 #define Uses_SCIM_HELPER
54 #define Uses_SCIM_EVENT
55 #define Uses_SCIM_CONFIG
56 #define Uses_SCIM_CONFIG_MODULE
57 #define Uses_SCIM_CONFIG_PATH
58 #define Uses_SCIM_UTILITY
61 #include <sys/types.h>
62 #include <sys/times.h>
65 #include <sys/socket.h>
67 #include <vconf-keys.h>
68 #include "scim_private.h"
70 #include "scim_stl_map.h"
71 #include "isf_panel_agent_manager.h"
72 #include "isf_debug.h"
74 #include "ise_context.h"
79 #define LOG_TAG "ISF_PANEL_EFL"
81 static const clock_t MIN_REPEAT_TIME=2;
87 InfoManagerSignalVoid;
89 typedef Signal1<void, int>
92 typedef Signal1<void, int&>
93 InfoManagerSignalInt2;
95 typedef Signal1<void, const String&>
96 InfoManagerSignalString;
98 typedef Signal2<void, const String&, bool>
99 InfoManagerSignalStringBool;
101 typedef Signal2<void, String&, String&>
102 InfoManagerSignalString2;
104 typedef Signal2<void, int, const String&>
105 InfoManagerSignalIntString;
107 typedef Signal1<void, const PanelFactoryInfo&>
108 InfoManagerSignalFactoryInfo;
110 typedef Signal1<void, const std::vector <PanelFactoryInfo> &>
111 InfoManagerSignalFactoryInfoVector;
113 typedef Signal1<void, const LookupTable&>
114 InfoManagerSignalLookupTable;
116 typedef Signal1<void, const Property&>
117 InfoManagerSignalProperty;
119 typedef Signal1<void, const PropertyList&>
120 InfoManagerSignalPropertyList;
122 typedef Signal2<void, int, int>
123 InfoManagerSignalIntInt;
125 typedef Signal2<void, int&, int&>
126 InfoManagerSignalIntInt2;
128 typedef Signal3<void, int, int, int>
129 InfoManagerSignalIntIntInt;
131 typedef Signal3<void, const String &, const String &, const String &>
132 InfoManagerSignalString3;
134 typedef Signal4<void, int, int, int, int>
135 InfoManagerSignalIntIntIntInt;
137 typedef Signal2<void, int, const Property&>
138 InfoManagerSignalIntProperty;
140 typedef Signal2<void, int, const PropertyList&>
141 InfoManagerSignalIntPropertyList;
143 typedef Signal2<void, int, const HelperInfo&>
144 InfoManagerSignalIntHelperInfo;
146 typedef Signal3<void, const String&, const AttributeList&, int>
147 InfoManagerSignalAttributeStringInt;
149 typedef Signal5<void, int, int, const String&, const String&, const AttributeList&>
150 InfoManagerSignalAttributeInt2String2;
152 typedef Signal2<void, const String&, const AttributeList&>
153 InfoManagerSignalAttributeString;
155 typedef Signal1<void, std::vector <String> &>
156 InfoManagerSignalStringVector;
158 typedef Signal1<bool, HELPER_ISE_INFO&>
159 InfoManagerSignalBoolHelperInfo;
161 typedef Signal1<bool, std::vector <String> &>
162 InfoManagerSignalBoolStringVector;
164 typedef Signal2<void, char*, std::vector <String> &>
165 InfoManagerSignalStrStringVector;
167 typedef Signal2<bool, const String&, ISE_INFO&>
168 InfoManagerSignalStringISEINFO;
170 typedef Signal2<bool, String, int&>
171 InfoManagerSignalStringInt;
173 typedef Signal1<void, const KeyEvent&>
174 InfoManagerSignalKeyEvent;
176 typedef Signal1<void, struct rectinfo&>
177 InfoManagerSignalRect;
179 typedef Signal6<bool, String, String&, String&, int&, int&, String&>
180 InfoManagerSignalBoolString4int2;
182 typedef Signal2<void, int, struct rectinfo&>
183 InfoManagerSignalIntRect;
185 typedef Signal2<bool, int, String>
186 InfoManagerSignalIntString2;
188 typedef Signal1<bool, String>
189 InfoManagerSignalBoolString;
191 typedef Signal2<bool, String, String&>
192 InfoManagerSignalBoolString2;
194 typedef Signal1<void, bool>
195 InfoManagerSignalBool;
197 struct HelperClientStub {
201 HelperClientStub (int i = 0, int r = 0) : id (i), ref (r) { }
204 struct IMControlStub {
205 std::vector<ISE_INFO> info;
206 std::vector<int> count;
209 #define DEFAULT_CONTEXT_VALUE 0xfff
211 #if SCIM_USE_STL_EXT_HASH_MAP
212 typedef __gnu_cxx::hash_map <int, ClientInfo, __gnu_cxx::hash <int> > ClientRepository;
213 typedef __gnu_cxx::hash_map <int, HelperInfo, __gnu_cxx::hash <int> > HelperInfoRepository;
214 typedef __gnu_cxx::hash_map <uint32, String, __gnu_cxx::hash <unsigned int> > ClientContextUUIDRepository;
215 typedef __gnu_cxx::hash_map <String, HelperClientStub, scim_hash_string> HelperClientIndex;
216 typedef __gnu_cxx::hash_map <String, std::vector < std::pair <uint32, String> >, scim_hash_string> StartHelperICIndex;
217 #elif SCIM_USE_STL_HASH_MAP
218 typedef std::hash_map <int, ClientInfo, std::hash <int> > ClientRepository;
219 typedef std::hash_map <int, HelperInfo, std::hash <int> > HelperInfoRepository;
220 typedef std::hash_map <uint32, String, std::hash <unsigned int> > ClientContextUUIDRepository;
221 typedef std::hash_map <String, HelperClientStub, scim_hash_string> HelperClientIndex;
222 typedef std::hash_map <String, std::vector < std::pair <uint32, String> >, scim_hash_string> StartHelperICIndex;
224 typedef std::map <int, ClientInfo> ClientRepository;
225 typedef std::map <int, HelperInfo> HelperInfoRepository;
226 typedef std::map <uint32, String> ClientContextUUIDRepository;
227 typedef std::map <String, HelperClientStub> HelperClientIndex;
228 typedef std::map <String, std::vector < std::pair <uint32, String> > > StartHelperICIndex;
231 typedef std::map <String, uint32> UUIDCountRepository;
232 typedef std::map <String, enum HelperState> UUIDStateRepository;
233 typedef std::map <String, int> StringIntRepository;
234 typedef std::map <int, struct IMControlStub> IMControlRepository;
235 typedef std::map <int, int> IntIntRepository;
238 get_helper_ic (int client, uint32 context)
240 return (uint32) (client & 0xFFFF) | ((context & 0x7FFF) << 16);
244 get_imengine_client_context (uint32 helper_ic, int& client, uint32& context)
246 client = (int) (helper_ic & 0xFFFF);
247 context = ((helper_ic >> 16) & 0x7FFF);
251 clients_equal (int first, int second)
253 return ((first & 0xFFFF) == (second & 0xFFFF));
257 contexts_equal (uint32 first, uint32 second)
259 return ((first & 0x7FFF) == (second & 0x7FFF));
263 initialize_remote_input_vconf_key ()
265 if (vconf_set_bool (VCONFKEY_ISF_REMOTE_INPUT_DETECTED, 0) != 0)
266 LOGW ("Failed to set vconf key");
269 //==================================== InfoManager ===========================
270 class InfoManager::InfoManagerImpl
272 int m_current_screen;
274 String m_config_name;
275 String m_display_name;
277 int m_current_socket_client;
278 uint32 m_current_client_context;
279 String m_current_context_uuid;
280 TOOLBAR_MODE_T m_current_toolbar_mode;
281 uint32 m_current_helper_option;
282 String m_current_helper_uuid;
283 String m_last_helper_uuid;
284 String m_current_ise_name;
285 int m_pending_active_imcontrol_id;
286 int m_show_request_client_id;
287 int m_active_client_id;
288 IntIntRepository m_panel_client_map;
289 IntIntRepository m_imcontrol_map;
290 bool m_should_shared_ise;
292 bool m_is_imengine_aux;
293 bool m_is_imengine_candidate;
294 bool m_refocus_needed;
295 bool m_reshow_needed;
296 bool m_restart_needed;
299 std::vector<int> m_current_send_remoteinput_id;
300 std::vector<int> m_current_recv_remoteinput_id;
302 int m_last_socket_client;
303 uint32 m_last_client_context;
304 String m_last_context_uuid;
306 char* m_ise_context_buffer;
307 size_t m_ise_context_length;
308 char* m_imdata_buffer;
309 size_t m_imdata_length;
311 ClientRepository m_client_repository;
313 * Each Helper ISE has two socket connect between InfoManager and HelperAgent.
314 * m_helper_info_repository records the active connection.
315 * m_helper_active_info_repository records the passive connection.
317 HelperInfoRepository m_helper_info_repository;
318 HelperInfoRepository m_helper_active_info_repository;
319 HelperClientIndex m_helper_client_index;
321 /* when helper register, notify imcontrol client */
322 StringIntRepository m_ise_pending_repository;
323 IMControlRepository m_imcontrol_repository;
325 StartHelperICIndex m_start_helper_ic_index;
328 ClientContextUUIDRepository m_client_context_uuids;
331 ClientContextUUIDRepository m_client_context_helper;
332 UUIDCountRepository m_helper_uuid_count;
334 InfoManagerSignalVoid m_signal_turn_on;
335 InfoManagerSignalVoid m_signal_turn_off;
336 InfoManagerSignalVoid m_signal_show_panel;
337 InfoManagerSignalVoid m_signal_hide_panel;
338 InfoManagerSignalInt m_signal_update_screen;
339 InfoManagerSignalIntIntInt m_signal_update_spot_location;
340 InfoManagerSignalFactoryInfo m_signal_update_factory_info;
341 InfoManagerSignalVoid m_signal_start_default_ise;
342 InfoManagerSignalBool m_signal_stop_default_ise;
343 InfoManagerSignalIntInt m_signal_update_input_context;
344 InfoManagerSignalString m_signal_update_language_locale;
345 InfoManagerSignalIntInt m_signal_set_candidate_ui;
346 InfoManagerSignalIntInt2 m_signal_get_candidate_ui;
347 InfoManagerSignalIntInt m_signal_set_candidate_position;
348 InfoManagerSignalRect m_signal_get_candidate_geometry;
349 InfoManagerSignalRect m_signal_get_input_panel_geometry;
350 InfoManagerSignalString m_signal_set_keyboard_ise;
351 InfoManagerSignalString2 m_signal_get_keyboard_ise;
352 InfoManagerSignalString m_signal_show_help;
353 InfoManagerSignalFactoryInfoVector m_signal_show_factory_menu;
354 InfoManagerSignalVoid m_signal_show_preedit_string;
355 InfoManagerSignalVoid m_signal_show_aux_string;
356 InfoManagerSignalVoid m_signal_show_lookup_table;
357 InfoManagerSignalVoid m_signal_show_associate_table;
358 InfoManagerSignalVoid m_signal_hide_preedit_string;
359 InfoManagerSignalVoid m_signal_hide_aux_string;
360 InfoManagerSignalVoid m_signal_hide_lookup_table;
361 InfoManagerSignalVoid m_signal_hide_associate_table;
362 InfoManagerSignalAttributeStringInt m_signal_update_preedit_string;
363 InfoManagerSignalAttributeInt2String2 m_signal_recapture_string;
364 InfoManagerSignalInt m_signal_update_preedit_caret;
365 InfoManagerSignalAttributeString m_signal_update_aux_string;
366 InfoManagerSignalLookupTable m_signal_update_lookup_table;
367 InfoManagerSignalLookupTable m_signal_update_associate_table;
368 InfoManagerSignalPropertyList m_signal_register_properties;
369 InfoManagerSignalProperty m_signal_update_property;
370 InfoManagerSignalIntPropertyList m_signal_register_helper_properties;
371 InfoManagerSignalIntProperty m_signal_update_helper_property;
372 InfoManagerSignalIntHelperInfo m_signal_register_helper;
373 InfoManagerSignalInt m_signal_remove_helper;
374 InfoManagerSignalStringBool m_signal_set_active_ise_by_uuid;
375 InfoManagerSignalVoid m_signal_focus_in;
376 InfoManagerSignalVoid m_signal_focus_out;
377 InfoManagerSignalVoid m_signal_expand_candidate;
378 InfoManagerSignalVoid m_signal_contract_candidate;
379 InfoManagerSignalInt m_signal_select_candidate;
380 InfoManagerSignalBoolStringVector m_signal_get_ise_list;
381 InfoManagerSignalBoolHelperInfo m_signal_get_all_helper_ise_info;
382 InfoManagerSignalStringBool m_signal_set_has_option_helper_ise_info;
383 InfoManagerSignalStringBool m_signal_set_enable_helper_ise_info;
384 InfoManagerSignalVoid m_signal_show_helper_ise_list;
385 InfoManagerSignalVoid m_signal_show_helper_ise_selector;
386 InfoManagerSignalStringInt m_signal_is_helper_ise_enabled;
387 InfoManagerSignalBoolString4int2 m_signal_get_ise_information;
388 InfoManagerSignalBoolStringVector m_signal_get_keyboard_ise_list;
389 InfoManagerSignalIntIntIntInt m_signal_update_ise_geometry;
390 InfoManagerSignalStringVector m_signal_get_language_list;
391 InfoManagerSignalStringVector m_signal_get_all_language;
392 InfoManagerSignalStrStringVector m_signal_get_ise_language;
393 InfoManagerSignalStringISEINFO m_signal_get_ise_info_by_uuid;
394 InfoManagerSignalKeyEvent m_signal_send_key_event;
396 InfoManagerSignalInt m_signal_accept_connection;
397 InfoManagerSignalInt m_signal_close_connection;
398 InfoManagerSignalVoid m_signal_exit;
400 InfoManagerSignalVoid m_signal_transaction_start;
401 InfoManagerSignalVoid m_signal_transaction_end;
403 InfoManagerSignalVoid m_signal_lock;
404 InfoManagerSignalVoid m_signal_unlock;
406 InfoManagerSignalVoid m_signal_show_ise;
407 InfoManagerSignalVoid m_signal_hide_ise;
409 InfoManagerSignalVoid m_signal_will_show_ack;
410 InfoManagerSignalVoid m_signal_will_hide_ack;
412 InfoManagerSignalInt m_signal_set_keyboard_mode;
414 InfoManagerSignalVoid m_signal_candidate_will_hide_ack;
415 InfoManagerSignalInt2 m_signal_get_ise_state;
416 InfoManagerSignalString3 m_signal_run_helper;
418 InfoManagerSignalIntRect m_signal_get_recent_ise_geometry;
420 InfoManagerSignalStringBool m_signal_remoteinput_send_input_message;
421 InfoManagerSignalIntString m_signal_remoteinput_send_surrounding_text;
423 InfoManagerSignalIntString2 m_signal_check_privilege_by_sockfd;
425 InfoManagerSignalBoolString m_signal_launch_option_application;
426 InfoManagerSignalBoolString2 m_signal_get_ise_setting_appid;
428 PanelAgentManager m_panel_agent_manager;
430 void delete_ise_context_buffer (void) {
431 if (m_ise_context_buffer != NULL) {
432 delete[] m_ise_context_buffer;
433 m_ise_context_buffer = NULL;
434 m_ise_context_length = 0;
438 void delete_imdata_buffer (void) {
439 if (m_imdata_buffer != NULL) {
440 delete[] m_imdata_buffer;
441 m_imdata_buffer = NULL;
448 : m_current_screen (0),
449 m_current_socket_client (-1), m_current_client_context (0),
450 m_current_toolbar_mode (TOOLBAR_KEYBOARD_MODE),
451 m_current_helper_option (0),
452 m_pending_active_imcontrol_id (-1),
453 m_show_request_client_id (-1),
454 m_active_client_id (-1),
455 m_should_shared_ise (false),
456 m_ise_exiting (false), m_is_imengine_aux (false), m_is_imengine_candidate (false),
457 m_refocus_needed (false),
458 m_reshow_needed (false),
459 m_restart_needed (false),
460 m_is_ise_alive (false),
461 m_last_socket_client (-1), m_last_client_context (0),
462 m_ise_context_buffer (NULL), m_ise_context_length (0),
463 m_imdata_buffer (NULL), m_imdata_length (0) {
464 m_current_ise_name = String (_ ("English Keyboard"));
465 m_imcontrol_repository.clear ();
466 m_imcontrol_map.clear ();
467 m_current_send_remoteinput_id.clear ();
468 m_current_recv_remoteinput_id.clear ();
469 m_panel_client_map.clear ();
472 ~InfoManagerImpl () {
473 delete_ise_context_buffer ();
474 delete_imdata_buffer ();
477 bool initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident) {
479 m_config_name = "socket";
480 m_display_name = display;
482 return m_panel_agent_manager.initialize (info_manager, config, display, resident);
485 bool valid (void) const {
486 return m_panel_agent_manager.valid ();
492 SCIM_DEBUG_MAIN (1) << "InfoManager::stop ()\n";
494 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
495 String helper_uuid = get_current_helper_uuid ();
496 hide_helper (helper_uuid);
497 stop_helper (helper_uuid, -2, 0);
500 m_panel_agent_manager.stop ();
503 TOOLBAR_MODE_T get_current_toolbar_mode () const {
504 return m_current_toolbar_mode;
507 String get_current_ise_name () const {
508 return m_current_ise_name;
511 String get_current_helper_uuid () const {
512 return m_current_helper_uuid;
515 uint32 get_current_helper_option () const {
516 return m_current_helper_option;
519 void set_current_ise_name (String& name) {
520 m_current_ise_name = name;
523 void set_current_toolbar_mode (TOOLBAR_MODE_T mode) {
524 m_current_toolbar_mode = mode;
527 void set_current_helper_option (uint32 option) {
528 m_current_helper_option = option;
531 void update_panel_event (int cmd, uint32 nType, uint32 nValue) {
533 uint32 focused_context;
534 get_focused_context (focused_client, focused_context);
536 if (focused_client == -1 && m_active_client_id != -1) {
537 focused_client = m_panel_client_map[m_active_client_id];
541 SCIM_DEBUG_MAIN (1) << __func__ << " (" << nType << ", " << nValue << "), client=" << focused_client << "\n";
542 ClientInfo client_info = socket_get_client_info (focused_client);
544 if (client_info.type == FRONTEND_CLIENT) {
545 m_panel_agent_manager.update_panel_event (focused_client, focused_context, cmd, nType, nValue);
547 std::cerr << __func__ << " focused client is not existed!!!" << "\n";
550 if (m_panel_client_map[m_show_request_client_id] != focused_client) {
551 client_info = socket_get_client_info (m_panel_client_map[m_show_request_client_id]);
553 if (client_info.type == FRONTEND_CLIENT) {
554 m_panel_agent_manager.update_panel_event (m_panel_client_map[m_show_request_client_id], 0, cmd, nType, nValue);
555 std::cerr << __func__ << " show request client=" << m_panel_client_map[m_show_request_client_id] << "\n";
557 std::cerr << __func__ << " show request client is not existed!!!" << "\n";
562 bool move_preedit_caret (uint32 position) {
563 SCIM_DEBUG_MAIN (1) << "InfoManager::move_preedit_caret (" << position << ")\n";
567 get_focused_context (client, context);
570 m_panel_agent_manager.update_preedit_caret (client, context, position);
578 bool request_help (void) {
579 SCIM_DEBUG_MAIN (1) << "InfoManager::request_help ()\n";
583 get_focused_context (client, context);
586 m_panel_agent_manager.request_help (client, context);
593 bool request_factory_menu (void) {
594 SCIM_DEBUG_MAIN (1) << "InfoManager::request_factory_menu ()\n";
598 get_focused_context (client, context);
601 m_panel_agent_manager.request_factory_menu (client, context);
609 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
610 bool reset_keyboard_ise (void) {
611 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_keyboard_ise ()\n";
615 get_focused_context (client, context);
618 m_panel_agent_manager.reset_keyboard_ise (client, context);
625 bool update_keyboard_ise_list (void) {
626 SCIM_DEBUG_MAIN (1) << "InfoManager::update_keyboard_ise_list ()\n";
630 get_focused_context (client, context);
633 m_panel_agent_manager.update_keyboard_ise_list (client, context);
640 bool change_factory (const String& uuid) {
641 SCIM_DEBUG_MAIN (1) << "InfoManager::change_factory (" << uuid << ")\n";
645 if (scim_global_config_read (SCIM_GLOBAL_CONFIG_PRELOAD_KEYBOARD_ISE, false))
646 m_helper_manager.preload_keyboard_ise (uuid);
649 get_focused_context (client, context);
652 m_panel_agent_manager.change_factory (client, context, uuid);
659 bool helper_candidate_show (void) {
660 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
665 get_focused_context (client, context);
667 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
668 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
670 if (it != m_helper_client_index.end ()) {
671 uint32 ctx = get_helper_ic (client, context);
672 m_panel_agent_manager.helper_candidate_show (it->second.id, ctx, m_current_helper_uuid);
677 /* Inform wayland module that we are showing candidate window */
679 uint32 focused_context;
680 String focused_uuid = get_focused_context(focused_client, focused_context);
681 m_panel_agent_manager.helper_candidate_show(focused_client, focused_context, focused_uuid);
686 bool helper_candidate_hide (void) {
687 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
692 get_focused_context (client, context);
694 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
695 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
697 if (it != m_helper_client_index.end ()) {
698 uint32 ctx = get_helper_ic (client, context);
699 m_panel_agent_manager.helper_candidate_hide (it->second.id, ctx, m_current_helper_uuid);
704 /* Inform wayland module that we are hiding candidate window */
706 uint32 focused_context;
707 String focused_uuid = get_focused_context(focused_client, focused_context);
708 m_panel_agent_manager.helper_candidate_hide(focused_client, focused_context, focused_uuid);
713 bool candidate_more_window_show (void) {
714 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
717 get_focused_context (client, context);
719 if (m_is_imengine_candidate) {
721 m_panel_agent_manager.candidate_more_window_show (client, context);
725 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
726 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
728 if (it != m_helper_client_index.end ()) {
729 uint32 ctx = get_helper_ic (client, context);
730 m_panel_agent_manager.candidate_more_window_show (it->second.id, ctx);
739 bool candidate_more_window_hide (void) {
740 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
743 get_focused_context (client, context);
745 if (m_is_imengine_candidate) {
747 m_panel_agent_manager.candidate_more_window_hide (client, context);
751 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
752 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
754 if (it != m_helper_client_index.end ()) {
755 uint32 ctx = get_helper_ic (client, context);
756 m_panel_agent_manager.candidate_more_window_hide (it->second.id, ctx);
765 bool update_helper_lookup_table (const LookupTable& table) {
766 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
770 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
771 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
773 if (it != m_helper_client_index.end ()) {
775 get_focused_context (client, context);
776 ctx = get_helper_ic (client, context);
777 m_panel_agent_manager.update_helper_lookup_table (it->second.id, ctx, m_current_helper_uuid, table);
785 bool select_aux (uint32 item) {
786 SCIM_DEBUG_MAIN (1) << "InfoManager::select_aux (" << item << ")\n";
790 get_focused_context (client, context);
792 if (m_is_imengine_aux) {
794 m_panel_agent_manager.select_aux (client, context, item);
797 helper_select_aux (item);
804 bool select_candidate (uint32 item) {
805 SCIM_DEBUG_MAIN (1) << "InfoManager::select_candidate (" << item << ")\n";
809 get_focused_context (client, context);
811 if (m_is_imengine_candidate) {
813 m_panel_agent_manager.select_candidate (client, context, item);
816 helper_select_candidate (item);
823 bool lookup_table_page_up (void) {
824 SCIM_DEBUG_MAIN (1) << "InfoManager::lookup_table_page_up ()\n";
828 get_focused_context (client, context);
830 if (m_is_imengine_candidate) {
832 m_panel_agent_manager.lookup_table_page_up (client, context);
835 helper_lookup_table_page_up ();
842 bool lookup_table_page_down (void) {
843 SCIM_DEBUG_MAIN (1) << "InfoManager::lookup_table_page_down ()\n";
847 get_focused_context (client, context);
849 if (m_is_imengine_candidate) {
851 m_panel_agent_manager.lookup_table_page_down (client, context);
854 helper_lookup_table_page_down ();
861 bool update_lookup_table_page_size (uint32 size) {
862 SCIM_DEBUG_MAIN (1) << "InfoManager::update_lookup_table_page_size (" << size << ")\n";
866 get_focused_context (client, context);
868 if (m_is_imengine_candidate) {
870 m_panel_agent_manager.update_lookup_table_page_size (client, context, size);
873 helper_update_lookup_table_page_size (size);
880 bool update_candidate_item_layout (const std::vector<uint32>& row_items) {
881 SCIM_DEBUG_MAIN (1) << __func__ << " (" << row_items.size () << ")\n";
885 get_focused_context (client, context);
887 if (m_is_imengine_candidate) {
889 m_panel_agent_manager.update_candidate_item_layout (client, context, row_items);
892 helper_update_candidate_item_layout (row_items);
899 bool select_associate (uint32 item) {
900 SCIM_DEBUG_MAIN (1) << "InfoManager::select_associate (" << item << ")\n";
904 get_focused_context (client, context);
907 m_panel_agent_manager.select_associate (client, context, item);
911 helper_select_associate (item);
915 bool associate_table_page_up (void) {
916 SCIM_DEBUG_MAIN (1) << "InfoManager::associate_table_page_up ()\n";
920 get_focused_context (client, context);
923 m_panel_agent_manager.associate_table_page_up (client, context);
927 helper_associate_table_page_up ();
931 bool associate_table_page_down (void) {
932 SCIM_DEBUG_MAIN (1) << "InfoManager::associate_table_page_down ()\n";
936 get_focused_context (client, context);
939 m_panel_agent_manager.associate_table_page_down (client, context);
943 helper_associate_table_page_down ();
947 bool update_associate_table_page_size (uint32 size) {
948 SCIM_DEBUG_MAIN (1) << "InfoManager::update_associate_table_page_size (" << size << ")\n";
952 get_focused_context (client, context);
955 m_panel_agent_manager.update_associate_table_page_size (client, context, size);
959 helper_update_associate_table_page_size (size);
963 bool update_displayed_candidate_number (uint32 size) {
964 SCIM_DEBUG_MAIN (1) << __func__ << " (" << size << ")\n";
968 get_focused_context (client, context);
970 if (m_is_imengine_candidate) {
972 m_panel_agent_manager.update_displayed_candidate_number (client, context, size);
975 helper_update_displayed_candidate_number (size);
982 void send_longpress_event (int type, int index) {
983 SCIM_DEBUG_MAIN (1) << __func__ << " (" << type << ", " << index << ")\n";
986 get_focused_context (client, context);
988 if (m_is_imengine_candidate) {
990 m_panel_agent_manager.send_longpress_event (client, context, index);
993 helper_longpress_candidate (index);
997 bool trigger_property (const String& property) {
998 SCIM_DEBUG_MAIN (1) << "InfoManager::trigger_property (" << property << ")\n";
1002 get_focused_context (client, context);
1005 m_panel_agent_manager.trigger_property (client, context, property);
1012 bool start_helper (const String& uuid, int client, uint32 context) {
1013 SCIM_DEBUG_MAIN (1) << "InfoManager::start_helper (" << uuid << ")\n";
1014 LOGD ("start ISE(%s)", uuid.c_str ());
1016 if (uuid.length () <= 0)
1020 /*if (m_current_toolbar_mode != TOOLBAR_HELPER_MODE || m_current_helper_uuid.compare (uuid) != 0)*/ {
1021 SCIM_DEBUG_MAIN (1) << "Run_helper\n";
1023 uint32 ic = get_helper_ic (m_panel_client_map[client], context);
1025 /* Get the context uuid from the client context registration table. */
1027 ClientContextUUIDRepository::iterator it =
1028 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
1030 if (it != m_client_context_uuids.end ())
1031 ic_uuid = it->second;
1033 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
1034 m_signal_run_helper (uuid, m_config_name, m_display_name);
1036 m_current_helper_uuid = uuid;
1041 bool stop_helper (const String& uuid, int client, uint32 context) {
1042 char buf[256] = {0};
1043 snprintf (buf, sizeof (buf), "time:%ld pid:%d %s %s prepare to stop ISE(%s)\n",
1044 time (0), getpid (), __FILE__, __func__, uuid.c_str ());
1045 LOGD ("prepare to stop ISE(%s)", uuid.c_str ());
1046 SCIM_DEBUG_MAIN (1) << "InfoManager::stop_helper (" << uuid << ")\n";
1048 if (uuid.length () <= 0)
1052 uint32 ctx = get_helper_ic (client, context);
1053 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
1055 if (it != m_helper_client_index.end ()) {
1056 m_ise_exiting = true;
1057 m_current_helper_uuid = String ("");
1058 m_panel_agent_manager.exit (it->second.id, ctx);
1059 SCIM_DEBUG_MAIN (1) << "Stop helper\n";
1060 ISF_SAVE_LOG ("send SCIM_TRANS_CMD_EXIT message to %s", uuid.c_str ());
1063 /* Since we are stopping this helper, erase information from start_helper_ic_index too */
1064 m_start_helper_ic_index.erase (uuid);
1070 void focus_out_helper (const String& uuid, int client, uint32 context) {
1071 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1073 if (it != m_helper_client_index.end ()) {
1074 uint32 ctx = get_helper_ic (client, context);
1075 m_panel_agent_manager.focus_out_helper (it->second.id, ctx, uuid);
1079 void focus_in_helper (const String& uuid, int client, uint32 context) {
1080 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1082 if (it != m_helper_client_index.end ()) {
1083 uint32 ctx = get_helper_ic (client, context);
1084 m_panel_agent_manager.focus_in_helper (it->second.id, ctx, uuid);
1088 bool show_helper (const String& uuid, char* data, size_t& len, uint32 ctx) {
1089 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1091 if (it != m_helper_client_index.end ()) {
1092 Socket client_socket (it->second.id);
1093 m_panel_agent_manager.show_helper (it->second.id, ctx, uuid, data, len);
1097 LOGW ("Can't find %s", m_current_helper_uuid.c_str ());
1102 void hide_helper (const String& uuid, uint32 ctx = 0) {
1103 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1105 if (it != m_helper_client_index.end ()) {
1110 get_focused_context (client, context);
1111 ctx = get_helper_ic (client, context);
1114 m_panel_agent_manager.hide_helper (it->second.id, ctx, uuid);
1118 bool set_helper_mode (const String& uuid, uint32& mode) {
1119 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1121 if (it != m_helper_client_index.end ()) {
1125 get_focused_context (client, context);
1126 ctx = get_helper_ic (client, context);
1127 m_panel_agent_manager.set_helper_mode (it->second.id, ctx, uuid, mode);
1134 bool set_helper_language (const String& uuid, uint32& language) {
1135 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1137 if (it != m_helper_client_index.end ()) {
1141 get_focused_context (client, context);
1142 ctx = get_helper_ic (client, context);
1143 m_panel_agent_manager.set_helper_language (it->second.id, ctx, uuid, language);
1150 bool set_helper_imdata (const String& uuid, const char* imdata, size_t& len) {
1151 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1153 if (it != m_helper_client_index.end ()) {
1157 get_focused_context (client, context);
1158 ctx = get_helper_ic (client, context);
1159 m_panel_agent_manager.set_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1166 bool set_helper_return_key_type (const String& uuid, int type) {
1167 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1169 if (it != m_helper_client_index.end ()) {
1173 get_focused_context (client, context);
1174 ctx = get_helper_ic (client, context);
1175 m_panel_agent_manager.set_helper_return_key_type (it->second.id, ctx, uuid, type);
1182 bool get_helper_return_key_type (const String& uuid, uint32& type) {
1183 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1185 if (it != m_helper_client_index.end ()) {
1189 get_focused_context (client, context);
1190 ctx = get_helper_ic (client, context);
1191 m_panel_agent_manager.get_helper_return_key_type (it->second.id, ctx, uuid, type);
1198 bool set_helper_return_key_disable (const String& uuid, bool disabled) {
1199 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1201 if (it != m_helper_client_index.end ()) {
1205 get_focused_context (client, context);
1206 ctx = get_helper_ic (client, context);
1207 m_panel_agent_manager.set_helper_return_key_disable (it->second.id, ctx, uuid, disabled);
1214 bool get_helper_return_key_disable (const String& uuid, uint32& disabled) {
1215 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1217 if (it != m_helper_client_index.end ()) {
1221 get_focused_context (client, context);
1222 ctx = get_helper_ic (client, context);
1223 m_panel_agent_manager.get_helper_return_key_disable (it->second.id, ctx, uuid, disabled);
1230 bool set_helper_layout (const String& uuid, uint32& layout) {
1231 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1233 if (it != m_helper_client_index.end ()) {
1237 get_focused_context (client, context);
1238 ctx = get_helper_ic (client, context);
1239 m_panel_agent_manager.set_helper_layout (it->second.id, ctx, uuid, layout);
1246 bool set_helper_input_mode (const String& uuid, uint32& mode) {
1247 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1249 if (it != m_helper_client_index.end ()) {
1253 get_focused_context (client, context);
1254 ctx = get_helper_ic (client, context);
1255 m_panel_agent_manager.set_helper_input_mode (it->second.id, ctx, uuid, mode);
1262 bool set_helper_input_hint (const String& uuid, uint32& hint) {
1263 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1265 if (it != m_helper_client_index.end ()) {
1269 get_focused_context (client, context);
1270 ctx = get_helper_ic (client, context);
1271 m_panel_agent_manager.set_helper_input_hint (it->second.id, ctx, uuid, hint);
1278 bool set_helper_bidi_direction (const String& uuid, uint32& direction) {
1279 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1281 if (it != m_helper_client_index.end ()) {
1285 get_focused_context (client, context);
1286 ctx = get_helper_ic (client, context);
1287 m_panel_agent_manager.set_helper_bidi_direction (it->second.id, ctx, uuid, direction);
1294 bool set_helper_caps_mode (const String& uuid, uint32& mode) {
1295 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1297 if (it != m_helper_client_index.end ()) {
1301 get_focused_context (client, context);
1302 ctx = get_helper_ic (client, context);
1303 m_panel_agent_manager.set_helper_caps_mode (it->second.id, ctx, uuid, mode);
1310 int get_client_pid(int client_id)
1312 Socket client_socket(client_id);
1314 int sockfd = client_socket.get_id();
1316 socklen_t len = sizeof(struct ucred);
1317 if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) == 0) {
1318 LOGI("client pid : %u", ucred.pid);
1321 LOGW("Failed to get socket infomation");
1328 bool show_helper_option_window (const String& uuid, int caller_pid) {
1329 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1331 if (it != m_helper_client_index.end ()) {
1335 get_focused_context (client, context);
1336 ctx = get_helper_ic (client, context);
1338 if (!m_signal_launch_option_application (uuid)) {
1339 LOGD ("call show helper option");
1340 int ime_pid = get_client_pid(it->second.id);
1341 LOGD ("parent : %d, client : %d", caller_pid, ime_pid);
1342 m_panel_agent_manager.show_helper_option_window (it->second.id, ctx, uuid, caller_pid, ime_pid);
1343 m_panel_agent_manager.set_transient_for (caller_pid, ime_pid);
1352 bool resume_helper_option_window (const String& uuid) {
1353 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1355 if (it != m_helper_client_index.end ()) {
1359 get_focused_context (client, context);
1360 ctx = get_helper_ic (client, context);
1361 m_panel_agent_manager.resume_helper_option_window (it->second.id, ctx, uuid);
1368 bool set_helper_keyboard_mode (const String& uuid, uint32& mode) {
1369 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1371 if (it != m_helper_client_index.end ()) {
1375 get_focused_context (client, context);
1376 ctx = get_helper_ic (client, context);
1377 m_panel_agent_manager.set_helper_keyboard_mode (it->second.id, ctx, uuid, mode);
1384 bool set_helper_prediction_hint (const String& uuid, String prediction_hint) {
1385 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1387 if (it != m_helper_client_index.end ()) {
1391 get_focused_context (client, context);
1392 ctx = get_helper_ic (client, context);
1393 m_panel_agent_manager.set_helper_prediction_hint (it->second.id, ctx, uuid, prediction_hint);
1400 bool set_helper_mime_type (const String& uuid, String mime_type) {
1401 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1403 if (it != m_helper_client_index.end ()) {
1407 get_focused_context (client, context);
1408 ctx = get_helper_ic (client, context);
1409 m_panel_agent_manager.set_helper_mime_type (it->second.id, ctx, uuid, mime_type);
1416 bool finalize_content_helper (const String& uuid, String text, uint32 cursor_pos) {
1417 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1419 if (it != m_helper_client_index.end ()) {
1423 get_focused_context (client, context);
1424 ctx = get_helper_ic (client, context);
1425 m_panel_agent_manager.finalize_content_helper (it->second.id, ctx, uuid, text, cursor_pos);
1432 bool set_helper_prediction_hint_data (const String& uuid, String key, String value) {
1433 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1435 if (it != m_helper_client_index.end ()) {
1439 get_focused_context (client, context);
1440 ctx = get_helper_ic (client, context);
1441 m_panel_agent_manager.set_helper_prediction_hint_data (it->second.id, ctx, uuid, key, value);
1448 bool set_helper_optimization_hint(const String& uuid, uint32& hint) {
1449 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1451 if (it != m_helper_client_index.end()) {
1455 get_focused_context(client, context);
1456 ctx = get_helper_ic(client, context);
1457 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, uuid, hint);
1464 bool set_helper_enable (const String& uuid, uint32 enabled) {
1465 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1467 if (it != m_helper_client_index.end ()) {
1471 get_focused_context (client, context);
1472 ctx = get_helper_ic (client, context);
1473 m_panel_agent_manager.set_helper_enable (it->second.id, ctx, uuid, enabled);
1480 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
1481 void show_isf_panel (int client_id) {
1482 SCIM_DEBUG_MAIN (4) << "InfoManager::show_isf_panel ()\n";
1483 m_signal_show_panel ();
1486 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
1487 bool send_remote_input_message (int client_id, char* buf, size_t len) {
1488 SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_input_message ()\n";
1490 if (buf && len > 0) {
1492 m_signal_remoteinput_send_input_message (msg, true);
1499 void send_remote_surrounding_text (const char* text, uint32 cursor) {
1500 SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_surrounding_text ()\n";
1502 m_signal_remoteinput_send_surrounding_text (cursor, text);
1505 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
1506 void hide_isf_panel (int client_id) {
1507 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_isf_panel ()\n";
1508 m_signal_hide_panel ();
1511 //ISM_TRANS_CMD_SHOW_ISE_PANEL
1512 void show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len) {
1513 SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_panel ()\n";
1514 m_reshow_needed = true;
1515 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
1516 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1517 LOGD ("prepare to show ISE %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
1519 m_show_request_client_id = client_id;
1520 m_active_client_id = client_id;
1521 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1523 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
1524 uint32 ctx = get_helper_ic (client, context);
1525 ret = show_helper (m_current_helper_uuid, data, len, ctx);
1528 /* Save ISE context for ISE panel re-showing */
1529 /* The size of data can be bigger than Ise_Context size if there is IMDATA. */
1530 if (data && len > 0) {
1531 delete_imdata_buffer ();
1532 delete_ise_context_buffer ();
1533 m_ise_context_buffer = new char [len];
1534 if (m_ise_context_buffer) {
1535 m_ise_context_length = len;
1536 memcpy (m_ise_context_buffer, data, m_ise_context_length);
1541 m_signal_show_ise ();
1543 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
1544 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
1545 if (launch_ise_on_request || !enable_auto_restart)
1546 m_signal_start_default_ise ();
1550 //ISM_TRANS_CMD_HIDE_ISE_PANEL
1551 void hide_ise_panel (int client_id, uint32 client, uint32 context) {
1552 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_ise_panel ()\n";
1553 LOGD ("prepare to hide ISE, %d %d", client_id, m_show_request_client_id);
1554 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1556 m_reshow_needed = false;
1557 if (m_panel_client_map[client_id] == m_current_socket_client || client_id == m_show_request_client_id) {
1558 // && (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
1560 uint32 focused_context;
1561 get_focused_context (focused_client, focused_context);
1563 if (focused_client == -1 && m_active_client_id != -1) {
1564 focused_client = m_panel_client_map[m_active_client_id];
1565 focused_context = 0;
1568 m_signal_hide_ise ();
1572 void hide_helper_ise (void) {
1575 uint32 focused_context;
1576 get_focused_context (focused_client, focused_context);
1577 m_panel_agent_manager.hide_helper_ise (focused_client, focused_context);
1579 m_signal_hide_ise ();
1583 void prelaunch_helper_ise (void) {
1584 SCIM_DEBUG_MAIN (4) << "InfoManager::prelaunch_helper_ise ()\n";
1587 * Currently the SHOW_PREPARE hint is delivered only to the already-running ISEs.
1588 * If the newly launched ise also has to be notified of given optimization hint,
1589 * we'll need to mark the hint somewhere and send the message when a newly launched
1590 * ise connects to the panel.
1592 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1593 if (it != m_helper_client_index.end()) {
1597 get_focused_context(client, context);
1598 ctx = get_helper_ic(client, context);
1599 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, m_current_helper_uuid, ISE_OPTIMIZATION_HINT_SHOW_PREPARE);
1602 m_signal_start_default_ise();
1605 void set_default_ise (const DEFAULT_ISE_T& ise) {
1606 LOGD ("set default ise : %s", ise.uuid.c_str());
1607 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), ise.uuid);
1608 scim_global_config_flush ();
1611 void set_should_shared_ise (const bool should_shared_ise) {
1612 m_should_shared_ise = should_shared_ise;
1614 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
1615 bool process_key_event (KeyEvent& key, uint32 serial, uint32 keycode) {
1616 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1618 if (m_is_ise_alive == false)
1621 if (it != m_helper_client_index.end ()) {
1625 get_focused_context (client, context);
1626 ctx = get_helper_ic (client, context);
1627 return m_panel_agent_manager.process_key_event (it->second.id, ctx, m_current_helper_uuid, key, serial, keycode);
1633 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
1634 bool process_input_device_event(int client_id, uint32 type, const char *data, size_t len, _OUT_ uint32& result) {
1635 SCIM_DEBUG_MAIN(4) << "InfoManager::process_input_device_event ()\n";
1636 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1638 if (it != m_helper_client_index.end()) {
1642 get_focused_context(client, context);
1643 ctx = get_helper_ic(client, context);
1644 return m_panel_agent_manager.process_input_device_event(it->second.id, ctx, m_current_helper_uuid, type, data, len, result);
1650 bool get_helper_geometry (String& uuid, struct rectinfo& info) {
1651 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1653 if (it != m_helper_client_index.end ()) {
1657 get_focused_context (client, context);
1658 ctx = get_helper_ic (client, context);
1659 return m_panel_agent_manager.get_helper_geometry (it->second.id, ctx, uuid, info);
1665 bool get_helper_imdata (String& uuid, char** imdata, size_t& len) {
1666 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1668 if (it != m_helper_client_index.end ()) {
1672 get_focused_context (client, context);
1673 ctx = get_helper_ic (client, context);
1674 m_panel_agent_manager.get_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1681 bool get_helper_layout (String& uuid, uint32& layout) {
1682 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1684 if (it != m_helper_client_index.end ()) {
1688 get_focused_context (client, context);
1689 ctx = get_helper_ic (client, context);
1690 m_panel_agent_manager.get_helper_layout (it->second.id, ctx, uuid, layout);
1696 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
1697 void get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info) {
1698 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1699 m_signal_get_input_panel_geometry (info);
1701 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
1702 void get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info) {
1703 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1704 m_signal_get_candidate_geometry (info);
1706 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
1707 void get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len) {
1708 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1709 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
1710 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1712 if (it != m_helper_client_index.end ()) {
1715 get_focused_context (client, context);
1716 uint32 ctx = get_helper_ic (client, context);
1717 m_panel_agent_manager.get_ise_language_locale (it->second.id, ctx, m_current_helper_uuid, data, len);
1722 void get_current_ise_geometry (rectinfo& rect) {
1723 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
1726 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1727 ret = get_helper_geometry (m_current_helper_uuid, rect);
1737 void set_ise_mode (int client_id, uint32 mode) {
1738 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_mode ()\n";
1740 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1741 set_helper_mode (m_current_helper_uuid, mode);
1743 //ISM_TRANS_CMD_SET_LAYOUT
1744 void set_ise_layout (int client_id, uint32 layout) {
1745 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_layout ()\n";
1746 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1747 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1748 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
1750 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1751 set_helper_layout (m_current_helper_uuid, layout);
1753 //ISM_TRANS_CMD_SET_INPUT_MODE
1754 void set_ise_input_mode (int client_id, uint32 input_mode) {
1755 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_mode ()\n";
1757 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1758 set_helper_input_mode (m_current_helper_uuid, input_mode);
1760 //ISM_TRANS_CMD_SET_INPUT_HINT
1761 void set_ise_input_hint (int client_id, uint32 input_hint) {
1762 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_hint ()\n";
1763 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1764 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1765 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(input_hint);
1767 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1768 set_helper_input_hint (m_current_helper_uuid, input_hint);
1770 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
1771 void update_ise_bidi_direction (int client_id, uint32 bidi_direction) {
1772 SCIM_DEBUG_MAIN (4) << "InfoManager::update_ise_bidi_direction ()\n";
1773 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1774 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1775 iseContext->bidi_direction = static_cast<Ecore_IMF_BiDi_Direction>(bidi_direction);
1777 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1778 set_helper_bidi_direction (m_current_helper_uuid, bidi_direction);
1780 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
1781 void set_ise_language (int client_id, uint32 language) {
1782 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_language ()\n";
1783 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1784 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1785 iseContext->language = static_cast<Ecore_IMF_Input_Panel_Lang>(language);
1787 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1788 set_helper_language (m_current_helper_uuid, language);
1790 //ISM_TRANS_CMD_SET_ISE_IMDATA
1791 void set_ise_imdata (int client_id, const char* imdata, size_t len) {
1792 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_imdata ()\n";
1794 delete_imdata_buffer ();
1795 m_imdata_buffer = new char [len];
1796 if (m_imdata_buffer) {
1797 m_imdata_length = len;
1798 memcpy (m_imdata_buffer, imdata, m_imdata_length);
1800 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1801 set_helper_imdata (m_current_helper_uuid, imdata, len);
1803 //ISM_TRANS_CMD_GET_ISE_IMDATA
1804 bool get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len) {
1805 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_imdata ()\n";
1808 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1809 ret = get_helper_imdata (m_current_helper_uuid, imdata, len);
1813 //ISM_TRANS_CMD_GET_LAYOUT
1814 bool get_ise_layout (int client_id, _OUT_ uint32& layout) {
1815 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_layout ()\n";
1818 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1819 ret = get_helper_layout (m_current_helper_uuid, layout);
1823 //ISM_TRANS_CMD_GET_ISE_STATE
1824 void get_ise_state (int client_id, _OUT_ int& state) {
1825 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1826 m_signal_get_ise_state (state);
1828 //ISM_TRANS_CMD_GET_ACTIVE_ISE
1829 void get_active_ise (int client_id, _OUT_ String& default_uuid) {
1830 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1831 default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1833 //ISM_TRANS_CMD_GET_ISE_LIST
1834 void get_ise_list (int client_id, _OUT_ std::vector<String>& strlist) {
1835 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_list ()\n";
1836 m_signal_get_ise_list (strlist);
1838 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
1839 void get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info) {
1840 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_helper_ise_info ()\n";
1841 m_signal_get_all_helper_ise_info (info);
1843 //1 Check if the current IME's option (setting) is available or not.
1844 for (uint32 i = 0; i < info.appid.size (); i++) {
1845 if (m_current_helper_uuid.compare (info.appid [i]) == 0) { // Find the current IME
1846 // If the current IME's "has_option" is unknown (-1), get it through ISM_TRANS_CMD_CHECK_OPTION_WINDOW command.
1847 // And it's saved to ime_info DB. Then next time this will be skipped.
1848 if (info.has_option [i] >= 2) {
1849 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1851 if (it != m_helper_client_index.end ()) {
1854 get_focused_context (client, context);
1855 uint32 ctx = get_helper_ic (client, context);
1856 uint32 avail = static_cast<uint32> (-1);
1857 m_panel_agent_manager.check_option_window (it->second.id, ctx, m_current_helper_uuid, avail);
1860 String setting_app = isf_pkg_get_setting_app (m_current_helper_uuid);
1861 if (setting_app.length () > 0)
1866 info.has_option [i] = avail;
1867 // Update "has_option" column of ime_info DB and global variable.
1868 m_signal_set_has_option_helper_ise_info (info.appid [i], static_cast<bool> (avail));
1875 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
1876 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1877 void set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled) {
1878 SCIM_DEBUG_MAIN (4) << "InfoManager::set_enable_helper_ise_info ()\n";
1879 m_signal_set_enable_helper_ise_info (appid, static_cast<bool> (is_enabled));
1881 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
1882 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1883 void show_helper_ise_list (int client_id) {
1884 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_list ()\n";
1885 m_signal_show_helper_ise_list ();
1887 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
1888 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1889 void show_helper_ise_selector (int client_id) {
1890 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_selector ()\n";
1891 m_signal_show_helper_ise_selector ();
1893 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
1895 void is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled) {
1896 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1898 m_signal_is_helper_ise_enabled (strAppid, _nEnabled);
1899 nEnabled = (uint32)_nEnabled;
1901 //ISM_TRANS_CMD_GET_ISE_INFORMATION
1902 void get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
1903 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName) {
1904 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1905 m_signal_get_ise_information (strUuid, strName, strLanguage, nType, nOption, strModuleName);
1910 void get_language_list (int client_id, _OUT_ std::vector<String>& strlist) {
1911 SCIM_DEBUG_MAIN (4) << "InfoManager::get_language_list ()\n";
1912 m_signal_get_language_list (strlist);
1915 void get_all_language (int client_id, _OUT_ std::vector<String>& strlist) {
1916 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_language ()\n";
1917 m_signal_get_all_language (strlist);
1922 void get_ise_language (int client_id, char* buf, size_t len, _OUT_ std::vector<String>& strlist) {
1923 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_language ()\n";
1924 m_signal_get_ise_language (buf, strlist);
1926 //ISM_TRANS_CMD_RESET_ISE_OPTION
1927 //reply SCIM_TRANS_CMD_OK
1928 bool reset_ise_option (int client_id) {
1929 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_ise_option ()\n";
1933 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
1935 if (it != m_client_context_uuids.end ()) {
1936 get_imengine_client_context (it->first, client, context);
1940 m_panel_agent_manager.reset_ise_option (client, context);
1947 bool find_active_ise_by_uuid (String uuid) {
1948 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
1950 for (; iter != m_helper_info_repository.end (); iter++) {
1951 if (!uuid.compare (iter->second.uuid))
1957 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
1959 bool set_active_ise_by_uuid (int client_id, char* buf, size_t len) {
1960 SCIM_DEBUG_MAIN (4) << "InfoManager::set_active_ise_by_uuid ()\n";
1969 if (!m_signal_get_ise_info_by_uuid (uuid, info)) {
1973 if (info.type == TOOLBAR_KEYBOARD_MODE) {
1974 m_signal_set_active_ise_by_uuid (uuid, 1);
1977 m_signal_set_active_ise_by_uuid (uuid, 1);
1982 if (find_active_ise_by_uuid (uuid)) {
1985 m_ise_pending_repository[uuid] = client_id;
1989 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
1990 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1991 void set_initial_ise_by_uuid (int client_id, char* buf, size_t len) {
1992 SCIM_DEBUG_MAIN (4) << "InfoManager::set_initial_ise_by_uuid ()\n";
1999 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (uuid));
2000 scim_global_config_flush ();
2002 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
2003 void set_ise_return_key_type (int client_id, uint32 type) {
2004 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2005 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2006 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2007 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(type);
2009 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2010 set_helper_return_key_type (m_current_helper_uuid, type);
2012 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
2014 bool get_ise_return_key_type (int client_id, _OUT_ uint32& type) {
2015 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2018 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2019 ret = get_helper_return_key_type (m_current_helper_uuid, type);
2023 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
2024 void set_ise_return_key_disable (int client_id, uint32 disabled) {
2025 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2026 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2027 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2028 iseContext->return_key_disabled = static_cast<Eina_Bool>(disabled);
2030 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2031 set_helper_return_key_disable (m_current_helper_uuid, disabled);
2033 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
2034 bool get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled) {
2035 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2038 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2039 ret = get_helper_return_key_disable (m_current_helper_uuid, disabled);
2044 void reset_helper_context (const String& uuid) {
2045 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2047 if (it != m_helper_client_index.end ()) {
2051 get_focused_context (client, context);
2052 ctx = get_helper_ic (client, context);
2053 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
2059 void reset_ise_context (int client_id) {
2060 SCIM_DEBUG_MAIN (4) << "InfoManager::reset_ise_context ()\n";
2062 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2063 reset_helper_context (m_current_helper_uuid);
2065 //ISM_TRANS_CMD_SET_CAPS_MODE
2066 void set_ise_caps_mode (int client_id, uint32 mode) {
2067 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_caps_mode ()\n";
2068 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2069 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2070 iseContext->caps_mode = static_cast<Eina_Bool>(mode);
2072 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2073 set_helper_caps_mode (m_current_helper_uuid, mode);
2076 //SCIM_TRANS_CMD_RELOAD_CONFIG
2077 void reload_config (void) {
2078 SCIM_DEBUG_MAIN (1) << "InfoManager::reload_config ()\n";
2081 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2082 if (it->second.type == FRONTEND_CLIENT || it->second.type == HELPER_CLIENT) {
2083 m_panel_agent_manager.reload_config (it->first);
2091 SCIM_DEBUG_MAIN (1) << "InfoManager::exit ()\n";
2094 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2095 m_panel_agent_manager.exit (it->first, 0);
2103 void update_ise_list (std::vector<String>& strList) {
2104 /* request PanelClient to update keyboard ise list */
2105 update_keyboard_ise_list ();
2107 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
2108 void will_show_ack (int client_id) {
2109 SCIM_DEBUG_MAIN (4) << "InfoManager::will_show_ack ()\n";
2110 m_signal_will_show_ack ();
2112 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
2113 void will_hide_ack (int client_id) {
2114 SCIM_DEBUG_MAIN (4) << "InfoManager::will_hide_ack ()\n";
2115 m_signal_will_hide_ack ();
2117 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
2118 void reset_default_ise (int client_id) {
2119 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2120 String initial_ise = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2122 if (initial_ise.length () > 0)
2123 m_signal_set_active_ise_by_uuid (initial_ise, 1);
2125 std::cerr << "Read SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID is failed!!!\n";
2127 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
2128 void set_keyboard_mode (int client_id, uint32 mode) {
2129 SCIM_DEBUG_MAIN (4) << "InfoManager::set_keyboard_mode ()\n";
2130 m_signal_set_keyboard_mode (mode);
2131 set_ise_keyboard_mode (client_id, mode);
2133 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
2134 void candidate_will_hide_ack (int client_id) {
2135 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "\n";
2136 m_signal_candidate_will_hide_ack ();
2139 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
2140 void get_active_helper_option (int client_id, _OUT_ uint32& option) {
2141 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2142 option = get_current_helper_option ();
2144 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
2145 void show_ise_option_window (int client_id, int caller_pid) {
2146 SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_option_window ()\n";
2147 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2148 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2149 LOGD ("prepare to show ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2151 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2152 show_helper_option_window (m_current_helper_uuid, caller_pid);
2156 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
2157 void get_ise_setting_appid (int client_id, _OUT_ String &ime_setting_appid) {
2158 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2159 m_signal_get_ise_setting_appid (m_current_helper_uuid, ime_setting_appid);
2162 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
2163 void resume_ise_option_window (int client_id) {
2164 SCIM_DEBUG_MAIN (4) << "InfoManager::resume_ise_option_window ()\n";
2165 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2166 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2167 LOGD ("prepare to resume ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2169 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2170 resume_helper_option_window (m_current_helper_uuid);
2174 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
2175 void set_ise_keyboard_mode (int client_id, uint32 mode) {
2176 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_keyboard_mode ()\n";
2177 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2178 set_helper_keyboard_mode (m_current_helper_uuid, mode);
2181 //ISM_TRANS_CMD_SET_PREDICTION_HINT
2182 void set_prediction_hint (int client_id, String prediction_hint) {
2183 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint ()\n";
2184 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2185 set_helper_prediction_hint (m_current_helper_uuid, prediction_hint);
2188 //ISM_TRANS_CMD_SET_MIME_TYPE
2189 void set_ise_mime_type (int client_id, String mime_type) {
2190 SCIM_DEBUG_MAIN (4) << "InfoManager::set_mime_type ()\n";
2191 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2192 set_helper_mime_type (m_current_helper_uuid, mime_type);
2195 //ISM_TRANS_CMD_FINALIZE_CONTENT
2196 void finalize_content (int client_id, String text, uint32 cursor_pos) {
2197 SCIM_DEBUG_MAIN (4) << "InfoManager::finalize_content ()\n";
2198 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2199 finalize_content_helper (m_current_helper_uuid, text, cursor_pos);
2202 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
2203 void set_prediction_hint_data (int client_id, String key, String value) {
2204 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint_data ()\n";
2205 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2206 set_helper_prediction_hint_data (m_current_helper_uuid, key, value);
2209 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
2210 void set_optimization_hint(int client_id, uint32 hint) {
2211 SCIM_DEBUG_MAIN(4) << "InfoManager::set_optimization_hint ()\n";
2212 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2213 set_helper_optimization_hint(m_current_helper_uuid, hint);
2216 //ISM_TRANS_CMD_SET_ISE_ENABLE
2217 void set_ise_enable (int client_id, uint32 enabled) {
2218 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_enable ()\n";
2219 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2220 set_helper_enable (m_current_helper_uuid, enabled);
2223 //ISM_TRANS_CMD_EXPAND_CANDIDATE
2224 void expand_candidate () {
2226 m_signal_expand_candidate ();
2229 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
2230 void contract_candidate () {
2232 m_signal_contract_candidate ();
2234 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
2235 void get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info) {
2236 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2238 m_signal_get_recent_ise_geometry (angle, info);
2241 bool check_privilege_by_sockfd (int client_id, const String& privilege) {
2242 return m_signal_check_privilege_by_sockfd (client_id, privilege);
2245 bool remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
2247 SCIM_DEBUG_MAIN(1) << "PanelAgent::update_preedit_string ()\n";
2253 get_focused_context (client, context);
2255 m_panel_agent_manager.remote_update_preedit_string (client, context, str, str, attrs, caret);
2263 bool remoteinput_commit_string (const WideString &str)
2265 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_commit_string ()\n";
2271 get_focused_context (client, context);
2273 m_panel_agent_manager.remote_commit_string (client, context, str);
2281 bool remoteinput_send_key_event (const KeyEvent &key)
2283 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_send_key_event ()\n";
2287 get_focused_context (client, context);
2289 m_panel_agent_manager.remote_send_key_event (client, context, key);
2295 bool remoteinput_forward_key_event (const KeyEvent &key)
2297 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_forward_key_event ()\n";
2301 get_focused_context (client, context);
2303 m_panel_agent_manager.remote_forward_key_event (client, context, key);
2309 bool remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
2311 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_delete_surrounding_text ()\n";
2315 get_focused_context (client, context);
2317 m_panel_agent_manager.remote_delete_surrounding_text (client, context, offset, len);
2323 bool remoteinput_set_cursor_position (uint32 cursor)
2325 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_set_cursor_position ()\n";
2329 get_focused_context (client, context);
2331 m_panel_agent_manager.socket_helper_set_selection (client, context, cursor, cursor);
2337 void reshow_input_panel () {
2338 /* Check whether application is already focus_in */
2339 if (m_refocus_needed) {
2340 LOGD ("Re-focus in");
2341 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
2343 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
2344 reset_keyboard_ise ();
2347 /* Check whether ISE panel is already shown */
2348 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0 && m_reshow_needed) {
2349 LOGD ("Re-show input_panel");
2350 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
2353 uint32 focused_context;
2355 get_focused_context (focused_client, focused_context);
2356 if (focused_client == -1 && m_active_client_id != -1) {
2357 focused_client = m_panel_client_map[m_active_client_id];
2358 focused_context = 0;
2361 m_panel_agent_manager.request_ise_reshow (focused_client, focused_context);
2362 m_panel_agent_manager.update_entry_metadata (focused_client, focused_context);
2363 uint32 ctx = get_helper_ic (focused_client, focused_context);
2364 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
2366 m_signal_show_ise ();
2368 if (m_imdata_buffer && m_imdata_length > 0 && m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2369 set_helper_imdata (m_current_helper_uuid, m_imdata_buffer, m_imdata_length);
2374 void request_ise_terminate () {
2375 if (m_client_context_uuids.size () == 0) {
2376 LOGD("Request to terminate IME");
2377 m_signal_stop_default_ise (true);
2381 void set_floating_mode (uint32 floating_mode) {
2383 uint32 focused_context;
2384 get_focused_context (focused_client, focused_context);
2385 ClientInfo client_info = socket_get_client_info (focused_client);
2387 if (client_info.type == FRONTEND_CLIENT) {
2388 m_panel_agent_manager.set_floating_mode (focused_client, focused_context, floating_mode);
2392 void set_floating_drag_enabled (uint32 enabled) {
2394 uint32 focused_context;
2395 get_focused_context (focused_client, focused_context);
2396 ClientInfo client_info = socket_get_client_info (focused_client);
2398 if (client_info.type == FRONTEND_CLIENT) {
2399 m_panel_agent_manager.set_floating_drag_enabled (focused_client, focused_context, enabled);
2403 Connection signal_connect_turn_on (InfoManagerSlotVoid* slot) {
2404 return m_signal_turn_on.connect (slot);
2407 Connection signal_connect_turn_off (InfoManagerSlotVoid* slot) {
2408 return m_signal_turn_off.connect (slot);
2411 Connection signal_connect_show_panel (InfoManagerSlotVoid* slot) {
2412 return m_signal_show_panel.connect (slot);
2415 Connection signal_connect_hide_panel (InfoManagerSlotVoid* slot) {
2416 return m_signal_hide_panel.connect (slot);
2419 Connection signal_connect_update_screen (InfoManagerSlotInt* slot) {
2420 return m_signal_update_screen.connect (slot);
2423 Connection signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot) {
2424 return m_signal_update_spot_location.connect (slot);
2427 Connection signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot) {
2428 return m_signal_update_factory_info.connect (slot);
2431 Connection signal_connect_start_default_ise (InfoManagerSlotVoid* slot) {
2432 return m_signal_start_default_ise.connect (slot);
2435 Connection signal_connect_stop_default_ise (InfoManagerSlotBool* slot) {
2436 return m_signal_stop_default_ise.connect (slot);
2439 Connection signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot) {
2440 return m_signal_set_candidate_ui.connect (slot);
2443 Connection signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot) {
2444 return m_signal_get_candidate_ui.connect (slot);
2447 Connection signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot) {
2448 return m_signal_set_candidate_position.connect (slot);
2451 Connection signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot) {
2452 return m_signal_get_candidate_geometry.connect (slot);
2455 Connection signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot) {
2456 return m_signal_get_input_panel_geometry.connect (slot);
2459 Connection signal_connect_set_keyboard_ise (InfoManagerSlotString* slot) {
2460 return m_signal_set_keyboard_ise.connect (slot);
2463 Connection signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot) {
2464 return m_signal_get_keyboard_ise.connect (slot);
2467 Connection signal_connect_show_help (InfoManagerSlotString* slot) {
2468 return m_signal_show_help.connect (slot);
2471 Connection signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot) {
2472 return m_signal_show_factory_menu.connect (slot);
2475 Connection signal_connect_show_preedit_string (InfoManagerSlotVoid* slot) {
2476 return m_signal_show_preedit_string.connect (slot);
2479 Connection signal_connect_show_aux_string (InfoManagerSlotVoid* slot) {
2480 return m_signal_show_aux_string.connect (slot);
2483 Connection signal_connect_show_lookup_table (InfoManagerSlotVoid* slot) {
2484 return m_signal_show_lookup_table.connect (slot);
2487 Connection signal_connect_show_associate_table (InfoManagerSlotVoid* slot) {
2488 return m_signal_show_associate_table.connect (slot);
2491 Connection signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot) {
2492 return m_signal_hide_preedit_string.connect (slot);
2495 Connection signal_connect_hide_aux_string (InfoManagerSlotVoid* slot) {
2496 return m_signal_hide_aux_string.connect (slot);
2499 Connection signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot) {
2500 return m_signal_hide_lookup_table.connect (slot);
2503 Connection signal_connect_hide_associate_table (InfoManagerSlotVoid* slot) {
2504 return m_signal_hide_associate_table.connect (slot);
2507 Connection signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot) {
2508 return m_signal_update_preedit_string.connect (slot);
2511 Connection signal_connect_update_preedit_caret (InfoManagerSlotInt* slot) {
2512 return m_signal_update_preedit_caret.connect (slot);
2515 Connection signal_connect_recapture_string (InfoManagerSlotAttributeInt2String2* slot) {
2516 return m_signal_recapture_string.connect (slot);
2519 Connection signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot) {
2520 return m_signal_update_aux_string.connect (slot);
2523 Connection signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot) {
2524 return m_signal_update_lookup_table.connect (slot);
2527 Connection signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot) {
2528 return m_signal_update_associate_table.connect (slot);
2531 Connection signal_connect_register_properties (InfoManagerSlotPropertyList* slot) {
2532 return m_signal_register_properties.connect (slot);
2535 Connection signal_connect_update_property (InfoManagerSlotProperty* slot) {
2536 return m_signal_update_property.connect (slot);
2539 Connection signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot) {
2540 return m_signal_register_helper_properties.connect (slot);
2543 Connection signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot) {
2544 return m_signal_update_helper_property.connect (slot);
2547 Connection signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot) {
2548 return m_signal_register_helper.connect (slot);
2551 Connection signal_connect_remove_helper (InfoManagerSlotInt* slot) {
2552 return m_signal_remove_helper.connect (slot);
2555 Connection signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot) {
2556 return m_signal_set_active_ise_by_uuid.connect (slot);
2559 Connection signal_connect_focus_in (InfoManagerSlotVoid* slot) {
2560 return m_signal_focus_in.connect (slot);
2563 Connection signal_connect_focus_out (InfoManagerSlotVoid* slot) {
2564 return m_signal_focus_out.connect (slot);
2567 Connection signal_connect_expand_candidate (InfoManagerSlotVoid* slot) {
2568 return m_signal_expand_candidate.connect (slot);
2571 Connection signal_connect_contract_candidate (InfoManagerSlotVoid* slot) {
2572 return m_signal_contract_candidate.connect (slot);
2575 Connection signal_connect_select_candidate (InfoManagerSlotInt* slot) {
2576 return m_signal_select_candidate.connect (slot);
2579 Connection signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot) {
2580 return m_signal_get_ise_list.connect (slot);
2583 Connection signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot) {
2584 return m_signal_get_all_helper_ise_info.connect (slot);
2587 Connection signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot) {
2588 return m_signal_set_has_option_helper_ise_info.connect (slot);
2591 Connection signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot) {
2592 return m_signal_set_enable_helper_ise_info.connect (slot);
2595 Connection signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot) {
2596 return m_signal_show_helper_ise_list.connect (slot);
2599 Connection signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot) {
2600 return m_signal_show_helper_ise_selector.connect (slot);
2603 Connection signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot) {
2604 return m_signal_is_helper_ise_enabled.connect (slot);
2607 Connection signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot) {
2608 return m_signal_get_ise_information.connect (slot);
2611 Connection signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot) {
2612 return m_signal_get_keyboard_ise_list.connect (slot);
2615 Connection signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot) {
2616 return m_signal_update_ise_geometry.connect (slot);
2619 Connection signal_connect_get_language_list (InfoManagerSlotStringVector* slot) {
2620 return m_signal_get_language_list.connect (slot);
2623 Connection signal_connect_get_all_language (InfoManagerSlotStringVector* slot) {
2624 return m_signal_get_all_language.connect (slot);
2627 Connection signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot) {
2628 return m_signal_get_ise_language.connect (slot);
2631 Connection signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot) {
2632 return m_signal_get_ise_info_by_uuid.connect (slot);
2635 Connection signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot) {
2636 return m_signal_send_key_event.connect (slot);
2639 Connection signal_connect_accept_connection (InfoManagerSlotInt* slot) {
2640 return m_signal_accept_connection.connect (slot);
2643 Connection signal_connect_close_connection (InfoManagerSlotInt* slot) {
2644 return m_signal_close_connection.connect (slot);
2647 Connection signal_connect_exit (InfoManagerSlotVoid* slot) {
2648 return m_signal_exit.connect (slot);
2651 Connection signal_connect_transaction_start (InfoManagerSlotVoid* slot) {
2652 return m_signal_transaction_start.connect (slot);
2655 Connection signal_connect_transaction_end (InfoManagerSlotVoid* slot) {
2656 return m_signal_transaction_end.connect (slot);
2659 Connection signal_connect_lock (InfoManagerSlotVoid* slot) {
2660 return m_signal_lock.connect (slot);
2663 Connection signal_connect_unlock (InfoManagerSlotVoid* slot) {
2664 return m_signal_unlock.connect (slot);
2667 Connection signal_connect_update_input_context (InfoManagerSlotIntInt* slot) {
2668 return m_signal_update_input_context.connect (slot);
2671 Connection signal_connect_update_language_locale(InfoManagerSlotString* slot) {
2672 return m_signal_update_language_locale.connect(slot);
2675 Connection signal_connect_show_ise (InfoManagerSlotVoid* slot) {
2676 return m_signal_show_ise.connect (slot);
2679 Connection signal_connect_hide_ise (InfoManagerSlotVoid* slot) {
2680 return m_signal_hide_ise.connect (slot);
2683 Connection signal_connect_will_show_ack (InfoManagerSlotVoid* slot) {
2684 return m_signal_will_show_ack.connect (slot);
2687 Connection signal_connect_will_hide_ack (InfoManagerSlotVoid* slot) {
2688 return m_signal_will_hide_ack.connect (slot);
2691 Connection signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot) {
2692 return m_signal_set_keyboard_mode.connect (slot);
2695 Connection signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot) {
2696 return m_signal_candidate_will_hide_ack.connect (slot);
2699 Connection signal_connect_get_ise_state (InfoManagerSlotInt2* slot) {
2700 return m_signal_get_ise_state.connect (slot);
2703 Connection signal_connect_run_helper (InfoManagerSlotString3* slot)
2705 return m_signal_run_helper.connect (slot);
2708 Connection signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
2710 return m_signal_launch_option_application.connect (slot);
2713 Connection signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
2715 return m_signal_get_ise_setting_appid.connect (slot);
2718 Connection signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot) {
2719 return m_signal_get_recent_ise_geometry.connect (slot);
2722 Connection signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
2724 return m_signal_check_privilege_by_sockfd.connect (slot);
2727 Connection signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
2729 return m_signal_remoteinput_send_input_message.connect (slot);
2732 Connection signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
2734 return m_signal_remoteinput_send_surrounding_text.connect (slot);
2737 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
2738 void register_panel_client (uint32 client_id, uint32 id) {
2739 m_panel_client_map [client_id] = (int)id;
2741 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
2742 void register_input_context (uint32 client_id, uint32 context, String uuid) {
2743 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2744 m_client_context_uuids [ctx] = uuid;
2746 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
2747 void remove_input_context (uint32 client_id, uint32 context) {
2748 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2749 m_client_context_uuids.erase (ctx);
2751 if (ctx == get_helper_ic (m_current_socket_client, m_current_client_context)) {
2753 m_current_socket_client = m_last_socket_client;
2754 m_current_client_context = m_last_client_context;
2755 m_current_context_uuid = m_last_context_uuid;
2756 m_last_socket_client = -1;
2757 m_last_client_context = 0;
2758 m_last_context_uuid = String ("");
2760 if (m_current_socket_client == -1) {
2762 socket_update_control_panel ();
2766 } else if (ctx == get_helper_ic (m_last_socket_client, m_last_client_context)) {
2768 m_last_socket_client = -1;
2769 m_last_client_context = 0;
2770 m_last_context_uuid = String ("");
2775 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
2776 void socket_reset_input_context (int client_id, uint32 context) {
2777 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_reset_input_context \n";
2779 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2780 socket_reset_helper_input_context (m_current_helper_uuid, m_panel_client_map[client_id], context);
2783 //SCIM_TRANS_CMD_FOCUS_IN
2784 void focus_in (int client_id, uint32 context, String uuid) {
2785 m_refocus_needed = true;
2786 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
2787 if (launch_ise_on_request)
2788 m_signal_start_default_ise ();
2790 m_signal_focus_in ();
2791 focus_in_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2792 SCIM_DEBUG_MAIN (2) << "PanelAgent::focus_in (" << client_id << "," << context << "," << uuid << ")\n";
2793 m_active_client_id = client_id;
2796 if (m_current_socket_client >= 0) {
2797 m_last_socket_client = m_current_socket_client;
2798 m_last_client_context = m_current_client_context;
2799 m_last_context_uuid = m_current_context_uuid;
2802 m_current_socket_client = m_panel_client_map[client_id];
2803 m_current_client_context = context;
2804 m_current_context_uuid = uuid;
2808 //SCIM_TRANS_CMD_FOCUS_OUT
2809 void focus_out (int client_id, uint32 context) {
2810 m_refocus_needed = false;
2811 m_signal_focus_out ();
2813 focus_out_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2815 if (m_current_socket_client >= 0) {
2816 m_last_socket_client = m_current_socket_client;
2817 m_last_client_context = m_current_client_context;
2818 m_last_context_uuid = m_current_context_uuid;
2821 m_current_socket_client = -1;
2822 m_current_client_context = 0;
2823 m_current_context_uuid = String ("");
2826 /* Release ISE context & IMDATA buffer */
2827 delete_imdata_buffer ();
2828 delete_ise_context_buffer ();
2831 //ISM_TRANS_CMD_TURN_ON_LOG
2832 void socket_turn_on_log (uint32 isOn) {
2834 DebugOutput::enable_debug (SCIM_DEBUG_AllMask);
2835 DebugOutput::set_verbose_level (7);
2836 SCIM_DEBUG_MAIN (4) << __func__ << " on\n";
2838 SCIM_DEBUG_MAIN (4) << __func__ << " off\n";
2839 DebugOutput::disable_debug (SCIM_DEBUG_AllMask);
2840 DebugOutput::set_verbose_level (0);
2844 uint32 focused_context;
2845 get_focused_context (focused_client, focused_context);
2847 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
2848 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2850 if (it != m_helper_client_index.end ()) {
2851 //uint32 ctx = get_helper_ic (focused_client, focused_context);
2853 //m_panel_agent_manager.socket_turn_on_log (it->second.id, ctx, m_current_helper_uuid, isOn);
2857 if (focused_client == -1) {
2858 std::cerr << __func__ << " get_focused_context is failed!!!\n";
2862 ClientInfo client_info = socket_get_client_info (focused_client);
2864 if (client_info.type == FRONTEND_CLIENT) {
2866 //m_panel_agent_manager.socket_turn_on_log (focused_client, focused_context, isOn);
2871 void add_client (int client_id, uint32 key, ClientType type) {
2872 LOGD ("id:%d, key:%d, type:%d", client_id, key, type);
2876 SCIM_DEBUG_MAIN (4) << "Add client to repository. Type=" << type << " key=" << key << "\n";
2878 m_client_repository [client_id] = info;
2880 if (info.type == HELPER_CLIENT || info.type == HELPER_ACT_CLIENT)
2881 m_is_ise_alive = true;
2883 if (info.type == IMCONTROL_ACT_CLIENT) {
2884 m_pending_active_imcontrol_id = client_id;
2885 } else if (info.type == IMCONTROL_CLIENT) {
2886 m_imcontrol_map [m_pending_active_imcontrol_id] = client_id;
2887 m_pending_active_imcontrol_id = -1;
2888 } else if (info.type == REMOTEINPUT_ACT_CLIENT) {
2889 m_current_send_remoteinput_id.push_back (client_id);
2890 } else if (info.type == REMOTEINPUT_CLIENT) {
2891 m_current_recv_remoteinput_id.push_back (client_id);
2894 LOGD ("%zu clients connecting", m_client_repository.size());
2899 void del_client (int client_id) {
2900 ClientRepository::iterator iter = m_client_repository.find(client_id);
2901 if (iter == m_client_repository.end()) {
2902 LOGW("The client with id %d does not exist in our client repository, returning", client_id);
2906 m_signal_close_connection (client_id);
2907 ClientInfo client_info = socket_get_client_info (client_id);
2908 m_client_repository.erase (client_id);
2909 LOGD ("id:%d, type:%d", client_id, client_info.type);
2910 #ifdef PANEL_SERVER_AUTO_EXIT
2911 /* Exit panel if there is no connected client anymore. */
2912 if (client_info.type != UNKNOWN_CLIENT && m_client_repository.size () == 0 && !m_should_resident) {
2913 SCIM_DEBUG_MAIN (4) << "Exit Socket Server Thread.\n";
2914 server->shutdown ();
2915 m_signal_exit.emit ();
2920 if (client_info.type == FRONTEND_CLIENT) {
2921 SCIM_DEBUG_MAIN (4) << "It's a FrontEnd client.\n";
2923 /* The focused client is closed. */
2924 if (m_current_socket_client == client_id) {
2925 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2926 hide_helper (m_current_helper_uuid);
2929 m_current_socket_client = -1;
2930 m_current_client_context = 0;
2931 m_current_context_uuid = String ("");
2933 socket_transaction_start ();
2935 socket_transaction_end ();
2938 if (m_last_socket_client == client_id) {
2940 m_last_socket_client = -1;
2941 m_last_client_context = 0;
2942 m_last_context_uuid = String ("");
2946 /* Erase all associated Client Context UUIDs. */
2947 std::vector <uint32> ctx_list;
2948 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
2950 for (; it != m_client_context_uuids.end (); ++it) {
2951 if ((it->first & 0xFFFF) == (client_id & 0xFFFF))
2952 ctx_list.push_back (it->first);
2955 for (size_t i = 0; i < ctx_list.size (); ++i)
2956 m_client_context_uuids.erase (ctx_list [i]);
2958 /* Erase all helperise info associated with the client */
2960 it = m_client_context_helper.begin ();
2962 for (; it != m_client_context_helper.end (); ++it) {
2963 if ((it->first & 0xFFFF) == (client_id & 0xFFFF)) {
2964 ctx_list.push_back (it->first);
2965 /* similar to stop_helper except that it will not call get_focused_context() */
2966 String uuid = it->second;
2968 if (m_helper_uuid_count.find (uuid) != m_helper_uuid_count.end ()) {
2969 uint32 count = m_helper_uuid_count[uuid];
2972 m_helper_uuid_count.erase (uuid);
2973 HelperClientIndex::iterator pise = m_helper_client_index.find (uuid);
2975 if (pise != m_helper_client_index.end ()) {
2976 stop_helper (uuid, pise->second.id, it->first);
2979 SCIM_DEBUG_MAIN (1) << "Stop HelperISE " << uuid << " ...\n";
2981 m_helper_uuid_count[uuid] = count - 1;
2982 focus_out_helper (uuid, (it->first & 0xFFFF), ((it->first >> 16) & 0x7FFF));
2983 SCIM_DEBUG_MAIN (1) << "Decrement usage count of HelperISE " << uuid
2984 << " to " << m_helper_uuid_count[uuid] << "\n";
2990 for (size_t i = 0; i < ctx_list.size (); ++i)
2991 m_client_context_helper.erase (ctx_list [i]);
2993 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
2995 for (; iter != m_helper_info_repository.end (); iter++) {
2996 if (!m_current_helper_uuid.compare (iter->second.uuid))
2997 if (! (iter->second.option & ISM_ISE_HIDE_IN_CONTROL_PANEL))
2998 socket_update_control_panel ();
3000 } else if (client_info.type == FRONTEND_ACT_CLIENT) {
3001 SCIM_DEBUG_MAIN (4) << "It's a FRONTEND_ACT_CLIENT client.\n";
3002 IntIntRepository::iterator iter2 = m_panel_client_map.find (client_id);
3004 if (iter2 != m_panel_client_map.end ())
3005 m_panel_client_map.erase (iter2);
3006 } else if (client_info.type == HELPER_CLIENT) {
3007 SCIM_DEBUG_MAIN (4) << "It's a Helper client.\n";
3009 HelperInfoRepository::iterator hiit = m_helper_info_repository.find (client_id);
3011 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
3012 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
3013 if (hiit != m_helper_info_repository.end ()) {
3014 bool restart = false;
3015 String uuid = hiit->second.uuid;
3016 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3018 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
3019 if ((hiit->second.option & SCIM_HELPER_AUTO_RESTART) &&
3020 (default_uuid.compare (uuid) == 0 || default_uuid.compare ("") == 0) &&
3021 (it != m_helper_client_index.end () && it->second.ref > 0)) {
3025 m_helper_client_index.erase (uuid);
3026 m_helper_info_repository.erase (hiit);
3028 m_signal_stop_default_ise (false);
3030 if ((m_refocus_needed || m_reshow_needed || !launch_ise_on_request) && enable_auto_restart)
3031 m_restart_needed = true;
3033 if (restart && !m_ise_exiting && m_restart_needed) {
3034 struct tms tiks_buf;
3035 static clock_t start_tiks = times (&tiks_buf);
3036 static clock_t clock_tiks = sysconf (_SC_CLK_TCK);
3037 clock_t curr_tiks = times (&tiks_buf);
3038 clock_t secs = (curr_tiks - start_tiks) / clock_tiks;
3039 //LOGE ("time second:%f", secs);
3040 static String restart_uuid;
3042 if (restart_uuid != uuid || secs > MIN_REPEAT_TIME) {
3043 scim_usleep (100000);
3047 get_focused_context(client, context);
3049 uint32 ic = get_helper_ic (client, context);
3051 /* Get the context uuid from the client context registration table. */
3053 ClientContextUUIDRepository::iterator it =
3054 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
3056 if (it != m_client_context_uuids.end ())
3057 ic_uuid = it->second;
3060 m_start_helper_ic_index[uuid].push_back(std::make_pair(ic, ic_uuid));
3061 m_signal_run_helper (uuid, m_config_name, m_display_name);
3062 restart_uuid = uuid;
3063 LOGE ("Auto restart soft ISE:%s", uuid.c_str ());
3065 reset_default_ise (0);
3066 ISF_SAVE_LOG ("Auto restart is abnormal, reset default ISE");
3069 start_tiks = curr_tiks;
3073 m_ise_exiting = false;
3074 m_restart_needed = launch_ise_on_request ? false : true;
3076 socket_transaction_start ();
3077 m_signal_remove_helper (client_id);
3078 socket_transaction_end ();
3079 } else if (client_info.type == HELPER_ACT_CLIENT) {
3080 SCIM_DEBUG_MAIN (4) << "It's a Helper passive client.\n";
3082 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client_id);
3084 if (hiit != m_helper_active_info_repository.end ()) {
3085 if (hiit->second.uuid == m_current_helper_uuid)
3086 m_is_ise_alive = false;
3088 m_helper_active_info_repository.erase (hiit);
3092 } else if (client_info.type == IMCONTROL_ACT_CLIENT) {
3093 SCIM_DEBUG_MAIN (4) << "It's a IMCONTROL_ACT_CLIENT client.\n";
3094 IMControlRepository::iterator iter = m_imcontrol_repository.find (client_id);
3096 if (iter != m_imcontrol_repository.end ()) {
3097 int size = iter->second.info.size ();
3101 stop_helper ((iter->second.info)[i].uuid, (iter->second.count)[i], DEFAULT_CONTEXT_VALUE);
3103 if ((iter->second.info)[i].option & ISM_ISE_HIDE_IN_CONTROL_PANEL)
3104 m_current_helper_uuid = m_last_helper_uuid;
3109 m_imcontrol_repository.erase (iter);
3112 IntIntRepository::iterator iter2 = m_imcontrol_map.find (client_id);
3114 if (iter2 != m_imcontrol_map.end ())
3115 m_imcontrol_map.erase (iter2);
3116 } else if (client_info.type == REMOTEINPUT_ACT_CLIENT) {
3117 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_ACT_CLIENT client.\n";
3119 for (unsigned int i = 0; i < m_current_send_remoteinput_id.size (); i++) {
3120 if (m_current_send_remoteinput_id.at (i) == client_id) {
3121 m_current_send_remoteinput_id.erase (m_current_send_remoteinput_id.begin () + i);
3125 } else if (client_info.type == REMOTEINPUT_CLIENT) {
3126 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_CLIENT client.\n";
3128 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3129 if (m_current_recv_remoteinput_id.at (i) == client_id) {
3130 m_current_recv_remoteinput_id.erase (m_current_recv_remoteinput_id.begin () + i);
3134 } else if (client_info.type == CONFIG_CLIENT) {
3135 SCIM_DEBUG_MAIN(4) << "It's a CONFIG_CLIENT client.\n";
3137 LOGI ("clients: %zu, panel clients: %zu, imcontrols size: %zu, helper infos: %zu, \
3138 helper active infos: %zu, helper client indexes: %zu, ises pending: %zu, \
3139 imcontrols: %zu, start helper ic indexes: %zu, client context uuids: %zu, \
3140 client context helpers: %zu, helpers uuid count: %zu",
3141 m_client_repository.size(),
3142 m_panel_client_map.size(),
3143 m_imcontrol_map.size(),
3144 m_helper_info_repository.size(),
3145 m_helper_active_info_repository.size(),
3146 m_helper_client_index.size(),
3147 m_ise_pending_repository.size(),
3148 m_imcontrol_repository.size(),
3149 m_start_helper_ic_index.size(),
3150 m_client_context_uuids.size(),
3151 m_client_context_helper.size(),
3152 m_helper_uuid_count.size());
3155 const ClientInfo& socket_get_client_info (int client) {
3156 static ClientInfo null_client = { 0, UNKNOWN_CLIENT };
3157 ClientRepository::iterator it = m_client_repository.find (client);
3159 if (it != m_client_repository.end ())
3165 //SCIM_TRANS_CMD_PANEL_TURN_ON
3166 void socket_turn_on (void) {
3167 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_on ()\n";
3168 m_signal_turn_on ();
3170 //SCIM_TRANS_CMD_PANEL_TURN_OFF
3171 void socket_turn_off (void) {
3172 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_off ()\n";
3173 m_signal_turn_off ();
3175 //SCIM_TRANS_CMD_UPDATE_SCREEN
3176 void socket_update_screen (int client_id, uint32 num) {
3177 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_screen ()\n";
3179 if (((int) num) != m_current_screen) {
3180 SCIM_DEBUG_MAIN (4) << "New Screen number = " << num << "\n";
3181 m_signal_update_screen ((int) num);
3182 helper_all_update_screen ((int) num);
3183 m_current_screen = (num);
3186 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
3187 void socket_update_spot_location (uint32 x, uint32 y, uint32 top_y) {
3188 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_spot_location ()\n";
3189 SCIM_DEBUG_MAIN (4) << "New Spot location x=" << x << " y=" << y << "\n";
3190 m_signal_update_spot_location ((int)x, (int)y, (int)top_y);
3191 helper_all_update_spot_location ((int)x, (int)y);
3193 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
3194 void socket_update_cursor_position (uint32 cursor_pos) {
3195 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_cursor_position ()\n";
3196 SCIM_DEBUG_MAIN (4) << "New cursor position pos=" << cursor_pos << "\n";
3197 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3198 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3199 iseContext->cursor_pos = static_cast<int>(cursor_pos);
3201 helper_all_update_cursor_position ((int)cursor_pos);
3203 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
3204 void socket_update_surrounding_text (String text, uint32 cursor) {
3205 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3206 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3208 if (it != m_helper_client_index.end ()) {
3213 get_focused_context (client, context);
3214 ctx = get_helper_ic (client, context);
3215 m_panel_agent_manager.socket_update_surrounding_text (it->second.id, ctx, m_current_helper_uuid, text, cursor);
3220 void remoteinput_callback_focus_in () {
3221 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3223 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3225 m_panel_agent_manager.socket_remoteinput_focus_in (m_current_recv_remoteinput_id.at (i));
3230 void remoteinput_callback_focus_out () {
3231 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3233 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3235 m_panel_agent_manager.socket_remoteinput_focus_out (m_current_recv_remoteinput_id.at (i));
3240 void remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type) {
3241 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3242 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3243 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3244 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
3245 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(return_key_type);
3246 iseContext->return_key_disabled = static_cast<Eina_Bool>(return_key_disabled);
3247 iseContext->layout_variation = static_cast<int>(variation);
3248 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(autocapital_type);
3249 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(hint);
3251 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3253 m_panel_agent_manager.socket_remoteinput_entry_metadata (m_current_recv_remoteinput_id.at (i), hint, layout, variation, autocapital_type, return_key_disabled, return_key_type);
3258 void remoteinput_callback_surrounding_text (String text, uint32 cursor) {
3259 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3261 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3263 m_panel_agent_manager.socket_remoteinput_surrounding_text (m_current_recv_remoteinput_id.at (i), text, cursor);
3268 void remoteinput_callback_input_resource (uint32 input_resource) {
3269 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3271 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3273 m_panel_agent_manager.socket_remoteinput_input_resource (m_current_recv_remoteinput_id.at (i), input_resource);
3278 void remoteinput_callback_key_symbol (String key_symbol, int press, uint32 timestamp) {
3279 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3281 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3283 m_panel_agent_manager.socket_remoteinput_key_symbol (m_current_recv_remoteinput_id.at (i), key_symbol, press, timestamp);
3288 void remoteinput_callback_cursor_position (uint32 cursor) {
3289 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3291 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3293 m_panel_agent_manager.socket_remoteinput_cursor_position (m_current_recv_remoteinput_id.at (i), cursor);
3298 //ISM_TRANS_CMD_UPDATE_SELECTION
3299 void socket_update_selection (String text) {
3300 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3301 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3303 if (it != m_helper_client_index.end ()) {
3308 get_focused_context (client, context);
3309 ctx = get_helper_ic (client, context);
3310 m_panel_agent_manager.socket_update_selection (it->second.id, ctx, m_current_helper_uuid, text);
3314 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
3315 void socket_update_factory_info (PanelFactoryInfo& info) {
3316 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_factory_info ()\n";
3317 SCIM_DEBUG_MAIN (4) << "New Factory info uuid=" << info.uuid << " name=" << info.name << "\n";
3318 info.lang = scim_get_normalized_language (info.lang);
3319 m_signal_update_factory_info (info);
3321 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
3322 void socket_show_help (String help) {
3323 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_help ()\n";
3324 m_signal_show_help (help);
3326 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
3327 void socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec) {
3328 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_factory_menu ()\n";
3331 m_signal_show_factory_menu (vec);
3334 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3335 void socket_show_preedit_string (void) {
3336 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_preedit_string ()\n";
3337 m_signal_show_preedit_string ();
3339 //SCIM_TRANS_CMD_SHOW_AUX_STRING
3340 void socket_show_aux_string (void) {
3341 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_aux_string ()\n";
3342 m_signal_show_aux_string ();
3344 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
3345 void socket_show_lookup_table (void) {
3346 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_lookup_table ()\n";
3348 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3349 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3350 if (iseContext->layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD || iseContext->input_hint & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
3354 m_signal_show_lookup_table ();
3356 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
3357 void socket_show_associate_table (void) {
3358 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_associate_table ()\n";
3359 m_signal_show_associate_table ();
3361 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3362 void socket_hide_preedit_string (void) {
3363 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_preedit_string ()\n";
3364 m_signal_hide_preedit_string ();
3366 //SCIM_TRANS_CMD_HIDE_AUX_STRING
3367 void socket_hide_aux_string (void) {
3368 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_aux_string ()\n";
3369 m_signal_hide_aux_string ();
3371 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
3372 void socket_hide_lookup_table (void) {
3373 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_lookup_table ()\n";
3374 m_signal_hide_lookup_table ();
3376 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
3377 void socket_hide_associate_table (void) {
3378 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_associate_table ()\n";
3379 m_signal_hide_associate_table ();
3381 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3382 void socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret) {
3383 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_string ()\n";
3384 m_signal_update_preedit_string (str, attrs, (int) caret);
3386 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
3387 void socket_update_preedit_caret (uint32 caret) {
3388 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3389 m_signal_update_preedit_caret ((int) caret);
3391 //ISM_TRANS_CMD_RECAPTURE_STRING
3392 void socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs) {
3393 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3394 m_signal_recapture_string (offset, len, preedit, commit, attrs);
3396 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
3397 void socket_update_aux_string (String& str, const AttributeList& attrs) {
3398 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_aux_string ()\n";
3399 m_signal_update_aux_string (str, attrs);
3400 m_is_imengine_aux = true;
3402 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
3403 void socket_update_lookup_table (const LookupTable& table) {
3404 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_lookup_table ()\n";
3406 //g_isf_candidate_table = _isf_candidate_table;
3407 m_signal_update_lookup_table (table);
3408 m_is_imengine_candidate = true;
3410 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
3411 void socket_update_associate_table (const LookupTable& table) {
3412 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_associate_table ()\n";
3413 m_signal_update_associate_table (table);
3416 void socket_update_control_panel (void) {
3417 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_control_panel ()\n";
3419 m_signal_get_keyboard_ise (name, uuid);
3420 PanelFactoryInfo info;
3422 if (name.length () > 0)
3423 info = PanelFactoryInfo (uuid, name, String (""), String (""));
3425 info = PanelFactoryInfo (String (""), String (_ ("English Keyboard")), String ("C"), String (SCIM_KEYBOARD_ICON_FILE));
3427 m_signal_update_factory_info (info);
3429 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3430 void socket_register_properties (const PropertyList& properties) {
3431 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_register_properties ()\n";
3432 m_signal_register_properties (properties);
3434 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3435 void socket_update_property (const Property& property) {
3436 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_property ()\n";
3437 m_signal_update_property (property);
3439 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
3440 void socket_get_keyboard_ise_list (String& uuid) {
3441 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise_list ()\n";
3442 std::vector<String> list;
3444 m_signal_get_keyboard_ise_list (list);
3445 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3447 if (it != m_helper_client_index.end ()) {
3450 get_focused_context (client, context);
3451 uint32 ctx = get_helper_ic (client, context);
3452 m_panel_agent_manager.socket_get_keyboard_ise_list (it->second.id, ctx, uuid, list);
3455 //ISM_TRANS_CMD_SET_CANDIDATE_UI
3456 void socket_set_candidate_ui (uint32 portrait_line, uint32 mode) {
3457 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3458 m_signal_set_candidate_ui (portrait_line, mode);
3460 //ISM_TRANS_CMD_GET_CANDIDATE_UI
3461 void socket_get_candidate_ui (String uuid) {
3462 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_candidate_ui ()\n";
3463 int style = 0, mode = 0;
3464 m_signal_get_candidate_ui (style, mode);
3465 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3467 if (it != m_helper_client_index.end ()) {
3470 get_focused_context (client, context);
3471 uint32 ctx = get_helper_ic (client, context);
3472 m_panel_agent_manager.socket_get_candidate_ui (it->second.id, ctx, uuid, style, mode);
3475 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
3476 void socket_set_candidate_position (uint32 left, uint32 top) {
3477 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_candidate_position ()\n";
3478 m_signal_set_candidate_position (left, top);
3480 //ISM_TRANS_CMD_HIDE_CANDIDATE
3481 void socket_hide_candidate (void) {
3482 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_candidate ()\n";
3483 m_signal_hide_preedit_string ();
3484 m_signal_hide_aux_string ();
3485 m_signal_hide_lookup_table ();
3486 m_signal_hide_associate_table ();
3488 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
3489 void socket_get_candidate_geometry (String& uuid) {
3490 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3491 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3493 if (it != m_helper_client_index.end ()) {
3494 struct rectinfo info = {0, 0, 0, 0};
3495 m_signal_get_candidate_geometry (info);
3498 get_focused_context (client, context);
3499 uint32 ctx = get_helper_ic (client, context);
3500 m_panel_agent_manager.socket_get_candidate_geometry (it->second.id, ctx, uuid, info);
3503 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
3504 void socket_set_keyboard_ise (String uuid) {
3505 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3507 m_signal_set_keyboard_ise (uuid);
3509 //ISM_TRANS_CMD_SELECT_CANDIDATE
3510 void socket_helper_select_candidate (uint32 index) {
3511 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3513 m_signal_select_candidate (index);
3515 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
3516 void socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height) {
3517 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
3520 uint32 focused_context;
3521 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
3523 if (it != m_helper_active_info_repository.end ()) {
3524 if (it->second.uuid == m_current_helper_uuid) {
3525 m_signal_update_ise_geometry (x, y, width, height);
3527 get_focused_context (focused_client, focused_context);
3528 ClientInfo client_info = socket_get_client_info (focused_client);
3529 if (client_info.type == FRONTEND_CLIENT) {
3530 m_panel_agent_manager.update_ise_geometry (focused_client, focused_context, x, y, width, height);
3535 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
3536 void socket_get_keyboard_ise (String uuid) {
3537 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise ()\n";
3538 String ise_name, ise_uuid;
3542 get_focused_context (client, context);
3543 ctx = get_helper_ic (client, context);
3545 if (m_client_context_uuids.find (ctx) != m_client_context_uuids.end ())
3546 ise_uuid = m_client_context_uuids[ctx];
3548 m_signal_get_keyboard_ise (ise_name, ise_uuid);
3549 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3551 if (it != m_helper_client_index.end ()) {
3552 get_focused_context (client, context);
3553 ctx = get_helper_ic (client, context);
3554 m_panel_agent_manager.socket_get_keyboard_ise (it->second.id, ctx, uuid, ise_name, ise_uuid);
3558 //SCIM_TRANS_CMD_START_HELPER
3559 void socket_start_helper (int client_id, uint32 context, String uuid) {
3560 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_start_helper ()\n";
3561 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3563 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3565 /* Get the context uuid from the client context registration table. */
3567 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3569 if (it != m_client_context_uuids.end ())
3570 ic_uuid = it->second;
3573 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3574 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3575 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3576 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3579 if (it == m_helper_client_index.end ()) {
3580 SCIM_DEBUG_MAIN (5) << "Run this Helper.\n";
3581 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
3582 m_signal_run_helper (uuid, m_config_name, m_display_name);
3584 SCIM_DEBUG_MAIN (5) << "Increase the Reference count.\n";
3585 m_panel_agent_manager.socket_start_helper (it->second.id, ic, ic_uuid);
3591 //SCIM_TRANS_CMD_STOP_HELPER
3592 void socket_stop_helper (int client_id, uint32 context, String uuid) {
3593 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_stop_helper ()\n";
3594 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3596 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3598 if (it != m_helper_client_index.end ()) {
3599 SCIM_DEBUG_MAIN (5) << "Decrease the Reference count.\n";
3602 /* Get the context uuid from the client context registration table. */
3604 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3606 if (it != m_client_context_uuids.end ())
3607 ic_uuid = it->second;
3610 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3611 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3612 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3613 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3616 m_panel_agent_manager.helper_detach_input_context (it->second.id, ic, ic_uuid);
3618 if (it->second.ref <= 0)
3619 m_panel_agent_manager.exit (it->second.id, ic);
3624 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
3625 void socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans) {
3626 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_send_helper_event ()\n";
3627 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3629 if (it != m_helper_client_index.end ()) {
3631 /* Get the context uuid from the client context registration table. */
3633 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3635 if (it != m_client_context_uuids.end ())
3636 ic_uuid = it->second;
3639 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3640 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3641 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3642 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3645 m_panel_agent_manager.helper_process_imengine_event (it->second.id, get_helper_ic (m_panel_client_map[client_id], context), ic_uuid, _nest_trans);
3649 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3650 void socket_helper_register_properties (int client, PropertyList& properties) {
3651 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_properties (" << client << ")\n";
3652 m_signal_register_helper_properties (client, properties);
3654 #if 0 //why? remove if useless, infinite loop
3655 /* Check whether application is already focus_in */
3656 if (m_current_socket_client != -1) {
3657 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
3658 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
3659 reset_keyboard_ise ();
3662 /* Check whether ISE panel is already shown */
3663 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0) {
3664 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
3666 uint32 focused_context;
3667 get_focused_context (focused_client, focused_context);
3669 if (focused_client == -1 && m_active_client_id != -1) {
3670 focused_client = m_panel_client_map[m_active_client_id];
3671 focused_context = 0;
3674 uint32 ctx = get_helper_ic (focused_client, focused_context);
3675 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
3678 m_signal_show_ise ();
3682 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3683 void socket_helper_update_property (int client, Property& property) {
3684 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_property (" << client << ")\n";
3685 m_signal_update_helper_property (client, property);
3687 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
3688 void socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans) {
3689 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_imengine_event (" << client << ")\n";
3690 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client);
3692 if (hiit != m_helper_active_info_repository.end ()) {
3694 uint32 target_context;
3695 get_imengine_client_context (target_ic, target_client, target_context);
3697 uint32 focused_context;
3698 String focused_uuid;
3699 focused_uuid = get_focused_context (focused_client, focused_context);
3701 if (target_ic == (uint32) (-1)) {
3702 target_client = focused_client;
3703 target_context = focused_context;
3706 if (target_uuid.length () == 0)
3707 target_uuid = focused_uuid;
3709 ClientInfo client_info = socket_get_client_info (target_client);
3710 SCIM_DEBUG_MAIN (5) << "Target UUID = " << target_uuid << " Focused UUId = " << focused_uuid << "\nTarget Client = " << target_client << "\n";
3712 if (client_info.type == FRONTEND_CLIENT) {
3713 /* If the original context value is greater than 0x7FFF, the line below would not work properly
3714 since the target_context acquired by get_imengine_client_context() is always smaller than 0x7FFF.
3715 But since the send_imengine_event() of scim_helper module will call IMEngine's
3716 process_helper_event() function directly, instead of sending SEND_IMENGINE_EVENT message.
3717 So we are not going to handle this kind of exceptional case for now. */
3718 m_panel_agent_manager.process_helper_event (target_client, target_context, target_uuid, hiit->second.uuid, nest_trans);
3723 void socket_helper_key_event_op (int client, int cmd, uint32 target_ic, String& target_uuid, KeyEvent& key) {
3724 if (!key.empty ()) {
3726 uint32 target_context;
3727 get_imengine_client_context (target_ic, target_client, target_context);
3729 uint32 focused_context;
3730 String focused_uuid;
3731 focused_uuid = get_focused_context (focused_client, focused_context);
3733 if (target_ic == (uint32) (-1)) {
3734 target_client = focused_client;
3735 target_context = focused_context;
3738 if (target_uuid.length () == 0)
3739 target_uuid = focused_uuid;
3741 if (target_client == -1) {
3742 /* FIXUP: monitor 'Invalid Window' error */
3743 LOGW ("focused target client is NULL");
3744 } else if (target_uuid == focused_uuid &&
3745 clients_equal (target_client, focused_client) &&
3746 contexts_equal (target_context, focused_context)) {
3747 ClientInfo client_info = socket_get_client_info (focused_client);
3749 if (client_info.type == FRONTEND_CLIENT) {
3750 m_panel_agent_manager.socket_helper_key_event (focused_client, focused_context, cmd, key);
3753 LOGD ("[target_client : %d, focused_client : %d] => %d, [target_context : %u, focused_context : %u] => %d",
3754 target_client, focused_client, clients_equal (target_client, focused_client),
3755 target_context, focused_context, contexts_equal (target_context, focused_context));
3759 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
3760 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
3761 void socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3762 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_key_event (" << client << ")\n";
3763 ISF_PROF_DEBUG ("first message")
3764 socket_helper_key_event_op (client, SCIM_TRANS_CMD_PROCESS_KEY_EVENT, target_ic, target_uuid, key);
3766 initialize_remote_input_vconf_key ();
3768 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
3769 void socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3770 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_forward_key_event (" << client << ")\n";
3771 socket_helper_key_event_op (client, SCIM_TRANS_CMD_FORWARD_KEY_EVENT, target_ic, target_uuid, key);
3773 initialize_remote_input_vconf_key ();
3776 //SCIM_TRANS_CMD_COMMIT_STRING
3777 void socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr) {
3778 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_commit_string (" << client << ")\n";
3780 if (wstr.length ()) {
3782 uint32 target_context;
3783 get_imengine_client_context (target_ic, target_client, target_context);
3785 uint32 focused_context;
3786 String focused_uuid;
3787 focused_uuid = get_focused_context (focused_client, focused_context);
3789 if (target_ic == (uint32) (-1)) {
3790 target_client = focused_client;
3791 target_context = focused_context;
3794 if (target_uuid.length () == 0)
3795 target_uuid = focused_uuid;
3797 if (target_uuid == focused_uuid &&
3798 clients_equal (target_client, focused_client) &&
3799 contexts_equal (target_context, focused_context)) {
3800 ClientInfo client_info = socket_get_client_info (focused_client);
3802 if (client_info.type == FRONTEND_CLIENT) {
3803 m_panel_agent_manager.commit_string (focused_client, focused_context, wstr);
3805 initialize_remote_input_vconf_key ();
3807 std::cerr << "target client is not existed!!!" << "\n";
3812 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
3813 void socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after) {
3814 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3816 uint32 focused_context;
3817 get_focused_context (focused_client, focused_context);
3818 ClientInfo client_info = socket_get_client_info (focused_client);
3820 /* If the get_surrounding_text was received when there is no client available,
3821 * return empty surrounding text since the sender would be waiting for reply */
3822 if (focused_client == -1) {
3823 socket_update_surrounding_text("", 0);
3825 if (client_info.type == FRONTEND_CLIENT) {
3826 m_panel_agent_manager.socket_helper_get_surrounding_text (focused_client, focused_context, maxlen_before, maxlen_after);
3830 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
3831 void socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len) {
3832 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3834 uint32 focused_context;
3835 get_focused_context (focused_client, focused_context);
3836 ClientInfo client_info = socket_get_client_info (focused_client);
3838 if (client_info.type == FRONTEND_CLIENT) {
3839 m_panel_agent_manager.socket_helper_delete_surrounding_text (focused_client, focused_context, offset, len);
3841 initialize_remote_input_vconf_key ();
3844 //SCIM_TRANS_CMD_GET_SELECTION
3845 void socket_helper_get_selection (int client, String uuid) {
3846 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3848 uint32 focused_context;
3849 get_focused_context (focused_client, focused_context);
3850 ClientInfo client_info = socket_get_client_info (focused_client);
3852 if (client_info.type == FRONTEND_CLIENT) {
3853 m_panel_agent_manager.socket_helper_get_selection (focused_client, focused_context);
3856 //SCIM_TRANS_CMD_SET_SELECTION
3857 void socket_helper_set_selection (int client, uint32 start, uint32 end) {
3858 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3860 uint32 focused_context;
3861 get_focused_context (focused_client, focused_context);
3862 ClientInfo client_info = socket_get_client_info (focused_client);
3864 if (client_info.type == FRONTEND_CLIENT) {
3865 m_panel_agent_manager.socket_helper_set_selection (focused_client, focused_context, start, end);
3869 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3870 void socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid) {
3871 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_show_preedit_string (" << client << ")\n";
3873 uint32 target_context;
3874 get_imengine_client_context (target_ic, target_client, target_context);
3876 uint32 focused_context;
3877 String focused_uuid = get_focused_context (focused_client, focused_context);
3879 if (target_ic == (uint32) (-1)) {
3880 target_client = focused_client;
3881 target_context = focused_context;
3884 if (target_uuid.length () == 0)
3885 target_uuid = focused_uuid;
3887 if (target_uuid == focused_uuid &&
3888 clients_equal (target_client, focused_client) &&
3889 contexts_equal (target_context, focused_context)) {
3890 ClientInfo client_info = socket_get_client_info (focused_client);
3892 if (client_info.type == FRONTEND_CLIENT) {
3893 m_panel_agent_manager.show_preedit_string (focused_client, focused_context);
3897 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3898 void socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid) {
3899 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_hide_preedit_string (" << client << ")\n";
3901 uint32 target_context;
3902 get_imengine_client_context (target_ic, target_client, target_context);
3904 uint32 focused_context;
3905 String focused_uuid = get_focused_context (focused_client, focused_context);
3907 if (target_ic == (uint32) (-1)) {
3908 target_client = focused_client;
3909 target_context = focused_context;
3912 if (target_uuid.length () == 0)
3913 target_uuid = focused_uuid;
3915 if (target_uuid == focused_uuid &&
3916 clients_equal (target_client, focused_client) &&
3917 contexts_equal (target_context, focused_context)) {
3918 ClientInfo client_info = socket_get_client_info (focused_client);
3920 if (client_info.type == FRONTEND_CLIENT) {
3921 m_panel_agent_manager.hide_preedit_string (focused_client, focused_context);
3925 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3926 void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
3927 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_preedit_string (" << client << ")\n";
3929 uint32 target_context;
3930 get_imengine_client_context (target_ic, target_client, target_context);
3932 uint32 focused_context;
3933 String focused_uuid;
3934 focused_uuid = get_focused_context (focused_client, focused_context);
3936 if (target_ic == (uint32) (-1)) {
3937 target_client = focused_client;
3938 target_context = focused_context;
3941 if (target_uuid.length () == 0)
3942 target_uuid = focused_uuid;
3944 if (target_uuid == focused_uuid &&
3945 clients_equal (target_client, focused_client) &&
3946 contexts_equal (target_context, focused_context)) {
3947 ClientInfo client_info = socket_get_client_info (focused_client);
3949 if (client_info.type == FRONTEND_CLIENT) {
3950 m_panel_agent_manager.update_preedit_string (focused_client, focused_context, preedit, commit, attrs, caret);
3952 initialize_remote_input_vconf_key ();
3956 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
3957 void socket_helper_update_preedit_caret (int client, uint32 caret) {
3958 SCIM_DEBUG_MAIN (4) << __func__ << " (" << client << ")\n";
3960 uint32 focused_context;
3961 String focused_uuid;
3962 focused_uuid = get_focused_context (focused_client, focused_context);
3963 ClientInfo client_info = socket_get_client_info (focused_client);
3965 if (client_info.type == FRONTEND_CLIENT) {
3966 m_panel_agent_manager.update_preedit_caret (focused_client, focused_context, caret);
3970 //ISM_TRANS_CMD_RECAPTURE_STRING
3971 void socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
3972 WideString commit, AttributeList& attrs) {
3973 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_recapture_string (" << client << ")\n";
3975 uint32 target_context;
3976 get_imengine_client_context (target_ic, target_client, target_context);
3978 uint32 focused_context;
3979 String focused_uuid;
3980 focused_uuid = get_focused_context (focused_client, focused_context);
3982 if (target_ic == (uint32) (-1)) {
3983 target_client = focused_client;
3984 target_context = focused_context;
3987 if (target_uuid.length () == 0)
3988 target_uuid = focused_uuid;
3990 if (target_uuid == focused_uuid &&
3991 clients_equal (target_client, focused_client) &&
3992 contexts_equal (target_context, focused_context)) {
3993 ClientInfo client_info = socket_get_client_info (focused_client);
3995 if (client_info.type == FRONTEND_CLIENT) {
3996 m_panel_agent_manager.recapture_string (focused_client, focused_context, offset, len, preedit, commit, attrs);
3998 initialize_remote_input_vconf_key ();
4003 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
4004 void socket_helper_register_helper (int client, HelperInfo& info) {
4005 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper (" << client << ")\n";
4006 bool result = false;
4013 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4014 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4018 info.option = option;
4020 if (info.uuid.length ()) {
4021 SCIM_DEBUG_MAIN (4) << "New Helper uuid=" << info.uuid << " name=" << info.name << "\n";
4022 HelperClientIndex::iterator it = m_helper_client_index.find (info.uuid);
4024 if (it == m_helper_client_index.end ()) {
4025 m_helper_info_repository [client] = info;
4026 m_helper_client_index [info.uuid] = HelperClientStub (client, 1);
4027 StartHelperICIndex::iterator icit = m_start_helper_ic_index.find (info.uuid);
4029 if (icit != m_start_helper_ic_index.end ()) {
4030 m_panel_agent_manager.helper_attach_input_context_and_update_screen (client, icit->second, m_current_screen);
4031 m_start_helper_ic_index.erase (icit);
4034 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4035 m_panel_agent_manager.send_fail_reply(client);
4038 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4039 m_panel_agent_manager.send_fail_reply(client);
4046 LOGD ("Succeed to register IME : %s", info.uuid.c_str ());
4047 m_signal_register_helper (client, info);
4051 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
4052 void socket_helper_register_helper_passive (int client, HelperInfo& info) {
4053 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper_passive (" << client << ")\n";
4060 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4061 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4065 info.option = option;
4067 if (info.uuid.length ()) {
4068 SCIM_DEBUG_MAIN (4) << "New Helper Passive uuid=" << info.uuid << " name=" << info.name << "\n";
4069 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
4071 if (it == m_helper_active_info_repository.end ()) {
4072 m_helper_active_info_repository[client] = info;
4075 StringIntRepository::iterator iter = m_ise_pending_repository.find (info.uuid);
4077 if (iter != m_ise_pending_repository.end ()) {
4078 m_ise_pending_repository.erase (iter);
4081 iter = m_ise_pending_repository.find (info.name);
4083 if (iter != m_ise_pending_repository.end ()) {
4084 m_ise_pending_repository.erase (iter);
4090 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
4091 void socket_helper_update_input_context (int client, uint32 type, uint32 value) {
4092 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_input_context (" << client << ")\n";
4093 m_signal_update_input_context ((int)type, (int)value);
4095 uint32 focused_context;
4096 get_focused_context (focused_client, focused_context);
4097 ClientInfo client_info = socket_get_client_info (focused_client);
4099 if (client_info.type == FRONTEND_CLIENT) {
4100 m_panel_agent_manager.update_ise_input_context (focused_client, focused_context, type, value);
4102 std::cerr << "focused client is not existed!!!" << "\n";
4105 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
4106 void socket_helper_update_language_locale(int client, String locale) {
4107 SCIM_DEBUG_MAIN(4) << "InfoManager::socket_helper_update_language_locale (" << client << ")\n";
4108 m_signal_update_language_locale(locale);
4111 uint32 focused_context;
4112 get_focused_context(focused_client, focused_context);
4113 ClientInfo client_info = socket_get_client_info(focused_client);
4115 if (client_info.type == FRONTEND_CLIENT) {
4116 m_panel_agent_manager.update_ise_language_locale(focused_client, focused_context, locale);
4118 std::cerr << "focused client is not existed!!!" << "\n";
4121 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
4122 void socket_helper_send_private_command (int client, String command) {
4123 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4125 uint32 focused_context;
4126 get_focused_context (focused_client, focused_context);
4127 ClientInfo client_info = socket_get_client_info (focused_client);
4129 if (client_info.type == FRONTEND_CLIENT) {
4130 m_panel_agent_manager.send_private_command (focused_client, focused_context, command);
4133 //SCIM_TRANS_CMD_COMMIT_CONTENT
4134 void socket_helper_commit_content (int client, String content, String description, String mime_types) {
4135 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4137 uint32 focused_context;
4138 get_focused_context (focused_client, focused_context);
4139 ClientInfo client_info = socket_get_client_info (focused_client);
4141 if (client_info.type == FRONTEND_CLIENT) {
4142 m_panel_agent_manager.commit_content (focused_client, focused_context, content, description, mime_types);
4145 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
4146 void UPDATE_ISE_EXIT (int client) {
4147 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4148 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
4149 if (launch_ise_on_request && !m_refocus_needed && !m_reshow_needed)
4150 m_restart_needed = false;
4153 void process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial) {
4155 uint32 focused_context;
4156 get_focused_context (focused_client, focused_context);
4157 ClientInfo client_info = socket_get_client_info (focused_client);
4159 if (client_info.type == FRONTEND_CLIENT) {
4160 m_panel_agent_manager.process_key_event_done (focused_client, focused_context, key, ret, serial);
4164 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
4165 void request_ise_hide () {
4167 uint32 focused_context;
4168 get_focused_context (focused_client, focused_context);
4169 ClientInfo client_info = socket_get_client_info (focused_client);
4171 if (client_info.type == FRONTEND_CLIENT) {
4172 m_panel_agent_manager.request_ise_hide (focused_client, focused_context);
4176 void socket_reset_helper_input_context (const String& uuid, int client, uint32 context) {
4177 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4179 if (it != m_helper_client_index.end ()) {
4180 uint32 ctx = get_helper_ic (client, context);
4181 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
4185 bool helper_select_aux (uint32 item) {
4186 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_aux \n";
4188 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4189 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4191 if (it != m_helper_client_index.end ()) {
4195 get_focused_context (client, context);
4196 ctx = get_helper_ic (client, context);
4197 m_panel_agent_manager.select_aux (it->second.id, ctx, item);
4205 bool helper_select_candidate (uint32 item) {
4206 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_candidate \n";
4208 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4209 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4211 if (it != m_helper_client_index.end ()) {
4215 get_focused_context (client, context);
4216 ctx = get_helper_ic (client, context);
4217 m_panel_agent_manager.select_candidate (it->second.id, ctx, item);
4225 bool helper_lookup_table_page_up (void) {
4226 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_up \n";
4228 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4229 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4231 if (it != m_helper_client_index.end ()) {
4235 get_focused_context (client, context);
4236 ctx = get_helper_ic (client, context);
4237 m_panel_agent_manager.lookup_table_page_up (it->second.id, ctx);
4245 bool helper_lookup_table_page_down (void) {
4246 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_down \n";
4248 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4249 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4251 if (it != m_helper_client_index.end ()) {
4255 get_focused_context (client, context);
4256 ctx = get_helper_ic (client, context);
4257 m_panel_agent_manager.lookup_table_page_down (it->second.id, ctx);
4265 bool helper_update_lookup_table_page_size (uint32 size) {
4266 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_lookup_table_page_size \n";
4268 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4269 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4271 if (it != m_helper_client_index.end ()) {
4275 get_focused_context (client, context);
4276 ctx = get_helper_ic (client, context);
4277 m_panel_agent_manager.update_lookup_table_page_size (it->second.id, ctx, size);
4285 bool helper_update_candidate_item_layout (const std::vector<uint32>& row_items) {
4286 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4288 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4289 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4291 if (it != m_helper_client_index.end ()) {
4295 get_focused_context (client, context);
4296 ctx = get_helper_ic (client, context);
4297 m_panel_agent_manager.update_candidate_item_layout (it->second.id, ctx, row_items);
4305 bool helper_select_associate (uint32 item) {
4306 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_associate \n";
4308 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4309 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4311 if (it != m_helper_client_index.end ()) {
4315 get_focused_context (client, context);
4316 ctx = get_helper_ic (client, context);
4317 m_panel_agent_manager.select_associate (it->second.id, ctx, item);
4325 bool helper_associate_table_page_up (void) {
4326 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_up \n";
4328 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4329 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4331 if (it != m_helper_client_index.end ()) {
4335 get_focused_context (client, context);
4336 ctx = get_helper_ic (client, context);
4337 m_panel_agent_manager.associate_table_page_up (it->second.id, ctx);
4345 bool helper_associate_table_page_down (void) {
4346 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_down \n";
4348 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4349 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4351 if (it != m_helper_client_index.end ()) {
4355 get_focused_context (client, context);
4356 ctx = get_helper_ic (client, context);
4357 m_panel_agent_manager.associate_table_page_down (it->second.id, ctx);
4365 bool helper_update_associate_table_page_size (uint32 size) {
4366 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_associate_table_page_size \n";
4368 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4369 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4371 if (it != m_helper_client_index.end ()) {
4375 get_focused_context (client, context);
4376 ctx = get_helper_ic (client, context);
4377 m_panel_agent_manager.update_associate_table_page_size (it->second.id, ctx, size);
4385 bool helper_update_displayed_candidate_number (uint32 size) {
4386 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4388 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4389 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4391 if (it != m_helper_client_index.end ()) {
4395 get_focused_context (client, context);
4396 ctx = get_helper_ic (client, context);
4397 m_panel_agent_manager.update_displayed_candidate_number (it->second.id, ctx, size);
4405 bool helper_longpress_candidate (uint32 index) {
4406 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4408 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4409 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4411 if (it != m_helper_client_index.end ()) {
4415 get_focused_context (client, context);
4416 ctx = get_helper_ic (client, context);
4417 m_panel_agent_manager.send_longpress_event (it->second.id, ctx, index);
4422 std::cerr << __func__ << " is failed!!!\n";
4426 void helper_all_update_spot_location (int x, int y) {
4427 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_spot_location (" << x << "," << y << ")\n";
4428 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4431 String uuid = get_focused_context (client, context);
4433 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4434 if (hiit->second.option & SCIM_HELPER_NEED_SPOT_LOCATION_INFO) {
4435 m_panel_agent_manager.helper_all_update_spot_location (hiit->first, get_helper_ic (client, context), uuid, x, y);
4440 void helper_all_update_cursor_position (int cursor_pos) {
4441 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_cursor_position (" << cursor_pos << ")\n";
4442 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4445 String uuid = get_focused_context (client, context);
4447 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4448 m_panel_agent_manager.helper_all_update_cursor_position (hiit->first, get_helper_ic (client, context), uuid, cursor_pos);
4452 void helper_all_update_screen (int screen) {
4453 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_screen (" << screen << ")\n";
4454 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4458 uuid = get_focused_context (client, context);
4460 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4461 if (hiit->second.option & SCIM_HELPER_NEED_SCREEN_INFO) {
4462 m_panel_agent_manager.helper_all_update_screen (hiit->first, get_helper_ic (client, context), uuid, screen);
4467 bool set_autocapital_type (int mode) {
4468 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4469 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4470 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4471 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(mode);
4473 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4474 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4476 if (it != m_helper_client_index.end ()) {
4480 get_focused_context (client, context);
4481 ctx = get_helper_ic (client, context);
4482 m_panel_agent_manager.set_autocapital_type (it->second.id, ctx, m_current_helper_uuid, mode);
4487 std::cerr << __func__ << " is failed!!!\n";
4491 bool set_prediction_allow (int client, int mode) {
4492 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4493 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4494 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4495 iseContext->prediction_allow = static_cast<Eina_Bool>(mode);
4497 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4498 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4500 if (it != m_helper_client_index.end ()) {
4502 uint32 focused_context;
4504 get_focused_context (focused_client, focused_context);
4505 ctx = get_helper_ic (focused_client, focused_context);
4506 m_panel_agent_manager.set_prediction_allow (it->second.id, ctx, m_current_helper_uuid, mode);
4511 std::cerr << __func__ << " is failed!!!\n";
4515 const String& get_focused_context (int& client, uint32& context, bool force_last_context = false) const {
4516 if (m_current_socket_client >= 0) {
4517 client = m_current_socket_client;
4518 context = m_current_client_context;
4519 return m_current_context_uuid;
4521 client = m_last_socket_client;
4522 context = m_last_client_context;
4523 return m_last_context_uuid;
4528 void socket_transaction_start (void) {
4529 m_signal_transaction_start ();
4532 void socket_transaction_end (void) {
4533 m_signal_transaction_end ();
4539 void unlock (void) {
4544 InfoManager::InfoManager ()
4545 : m_impl (new InfoManagerImpl ())
4549 InfoManager::~InfoManager ()
4555 InfoManager::initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident)
4557 return m_impl->initialize (info_manager, config, display, resident);
4561 InfoManager::valid (void) const
4563 return m_impl->valid ();
4567 InfoManager::stop (void)
4574 InfoManager::socket_get_client_info (int client) const
4576 return m_impl->socket_get_client_info (client);
4579 void InfoManager::hide_helper (const String& uuid)
4581 m_impl->hide_helper (uuid);
4584 InfoManager::get_current_toolbar_mode () const
4586 return m_impl->get_current_toolbar_mode ();
4590 InfoManager::get_current_ise_geometry (rectinfo& rect)
4592 m_impl->get_current_ise_geometry (rect);
4596 InfoManager::get_current_helper_uuid () const
4598 return m_impl->get_current_helper_uuid ();
4602 InfoManager::get_current_ise_name () const
4604 return m_impl->get_current_ise_name ();
4608 InfoManager::set_current_toolbar_mode (TOOLBAR_MODE_T mode)
4610 m_impl->set_current_toolbar_mode (mode);
4614 InfoManager::set_current_ise_name (String& name)
4616 m_impl->set_current_ise_name (name);
4620 InfoManager::set_current_helper_option (uint32 option)
4622 m_impl->set_current_helper_option (option);
4626 InfoManager::update_candidate_panel_event (uint32 nType, uint32 nValue)
4628 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISF_CANDIDATE_PANEL, nType, nValue);
4632 InfoManager::update_input_panel_event (uint32 nType, uint32 nValue)
4634 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT, nType, nValue);
4638 InfoManager::move_preedit_caret (uint32 position)
4640 return m_impl->move_preedit_caret (position);
4646 InfoManager::request_help (void)
4648 return m_impl->request_help ();
4652 InfoManager::request_factory_menu (void)
4654 return m_impl->request_factory_menu ();
4659 InfoManager::change_factory (const String& uuid)
4661 return m_impl->change_factory (uuid);
4665 InfoManager::helper_candidate_show (void)
4667 return m_impl->helper_candidate_show ();
4671 InfoManager::helper_candidate_hide (void)
4673 return m_impl->helper_candidate_hide ();
4677 InfoManager::candidate_more_window_show (void)
4679 return m_impl->candidate_more_window_show ();
4683 InfoManager::candidate_more_window_hide (void)
4685 return m_impl->candidate_more_window_hide ();
4689 InfoManager::update_helper_lookup_table (const LookupTable& table)
4691 return m_impl->update_helper_lookup_table (table);
4695 InfoManager::select_aux (uint32 item)
4697 return m_impl->select_aux (item);
4701 InfoManager::select_candidate (uint32 item)
4703 return m_impl->select_candidate (item);
4707 InfoManager::lookup_table_page_up (void)
4709 return m_impl->lookup_table_page_up ();
4713 InfoManager::lookup_table_page_down (void)
4715 return m_impl->lookup_table_page_down ();
4719 InfoManager::update_lookup_table_page_size (uint32 size)
4721 return m_impl->update_lookup_table_page_size (size);
4725 InfoManager::update_candidate_item_layout (const std::vector<uint32>& row_items)
4727 return m_impl->update_candidate_item_layout (row_items);
4731 InfoManager::select_associate (uint32 item)
4733 return m_impl->select_associate (item);
4737 InfoManager::associate_table_page_up (void)
4739 return m_impl->associate_table_page_up ();
4743 InfoManager::associate_table_page_down (void)
4745 return m_impl->associate_table_page_down ();
4749 InfoManager::update_associate_table_page_size (uint32 size)
4751 return m_impl->update_associate_table_page_size (size);
4755 InfoManager::update_displayed_candidate_number (uint32 size)
4757 return m_impl->update_displayed_candidate_number (size);
4761 InfoManager::send_longpress_event (int type, int index)
4763 m_impl->send_longpress_event (type, index);
4767 InfoManager::trigger_property (const String& property)
4769 return m_impl->trigger_property (property);
4773 InfoManager::start_helper (const String& uuid)
4775 return m_impl->start_helper (uuid, -2, 0);
4779 InfoManager::stop_helper (const String& uuid)
4781 return m_impl->stop_helper (uuid, -2, 0);
4785 InfoManager::set_default_ise (const DEFAULT_ISE_T& ise)
4787 m_impl->set_default_ise (ise);
4791 InfoManager::set_should_shared_ise (const bool should_shared_ise)
4793 m_impl->set_should_shared_ise (should_shared_ise);
4797 //InfoManager::reload_config (void)
4799 // m_impl->reload_config ();
4803 InfoManager::exit (void)
4805 return m_impl->exit ();
4808 InfoManager::update_ise_list (std::vector<String>& strList)
4810 m_impl->update_ise_list (strList);
4814 InfoManager::remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
4816 return m_impl->remoteinput_update_preedit_string (str, attrs, caret);
4820 InfoManager::remoteinput_commit_string (const WideString &str)
4822 return m_impl->remoteinput_commit_string (str);
4826 InfoManager::remoteinput_send_key_event (const KeyEvent &key)
4828 return m_impl->remoteinput_send_key_event (key);
4832 InfoManager::remoteinput_forward_key_event (const KeyEvent &key)
4834 return m_impl->remoteinput_forward_key_event (key);
4838 InfoManager::remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
4840 return m_impl->remoteinput_delete_surrounding_text (offset, len);
4844 InfoManager::remoteinput_set_cursor_position (uint32 cursor)
4846 return m_impl->remoteinput_set_cursor_position (cursor);
4849 /////////////////////////////////Message function begin/////////////////////////////////////////
4851 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
4852 bool InfoManager:: reset_keyboard_ise (void)
4854 return m_impl->reset_keyboard_ise ();
4857 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
4858 void InfoManager::show_isf_panel (int client_id)
4860 m_impl->show_isf_panel (client_id);
4863 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
4864 void InfoManager::hide_isf_panel (int client_id)
4866 m_impl->hide_isf_panel (client_id);
4869 //ISM_TRANS_CMD_SHOW_ISE_PANEL
4870 void InfoManager::show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len)
4872 m_impl->show_ise_panel (client_id, client, context, data, len);
4875 //ISM_TRANS_CMD_HIDE_ISE_PANEL
4876 void InfoManager::hide_ise_panel (int client_id, uint32 client, uint32 context)
4878 m_impl->hide_ise_panel (client_id, client, context);
4881 //ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
4882 void InfoManager::hide_helper_ise (void)
4884 m_impl->hide_helper_ise ();
4887 //ISM_TRANS_CMD_LAUNCH_ISE from ISF control
4888 void InfoManager::prelaunch_helper_ise (void)
4890 m_impl->prelaunch_helper_ise ();
4893 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
4894 bool InfoManager::process_key_event (KeyEvent& key, uint32 serial, uint32 keycode)
4896 return m_impl->process_key_event (key, serial, keycode);
4899 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
4900 void InfoManager::get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info)
4902 m_impl->get_input_panel_geometry (client_id, info);
4905 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
4906 void InfoManager::get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info)
4908 m_impl->get_candidate_window_geometry (client_id, info);
4911 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
4912 void InfoManager::get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len)
4914 m_impl->get_ise_language_locale (client_id, data, len);
4917 //ISM_TRANS_CMD_SET_LAYOUT
4918 void InfoManager::set_ise_layout (int client_id, uint32 layout)
4920 m_impl->set_ise_layout (client_id, layout);
4923 //ISM_TRANS_CMD_SET_INPUT_MODE
4924 void InfoManager::set_ise_input_mode (int client_id, uint32 input_mode)
4926 m_impl->set_ise_input_mode (client_id, input_mode);
4929 //ISM_TRANS_CMD_SET_INPUT_HINT
4930 void InfoManager::set_ise_input_hint (int client_id, uint32 input_hint)
4932 m_impl->set_ise_input_hint (client_id, input_hint);
4935 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
4936 void InfoManager::update_ise_bidi_direction (int client_id, uint32 bidi_direction)
4938 m_impl->update_ise_bidi_direction (client_id, bidi_direction);
4942 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
4943 void InfoManager::set_ise_language (int client_id, uint32 language)
4945 m_impl->set_ise_language (client_id, language);
4948 //ISM_TRANS_CMD_SET_ISE_IMDATA
4949 void InfoManager::set_ise_imdata (int client_id, const char* imdata, size_t len)
4951 m_impl->set_ise_imdata (client_id, imdata, len);
4954 //ISM_TRANS_CMD_GET_ISE_IMDATA
4955 bool InfoManager:: get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len)
4957 return m_impl->get_ise_imdata (client_id, imdata, len);
4960 //ISM_TRANS_CMD_GET_LAYOUT
4961 bool InfoManager:: get_ise_layout (int client_id, _OUT_ uint32& layout)
4963 return m_impl->get_ise_layout (client_id, layout);
4966 //ISM_TRANS_CMD_GET_ISE_STATE
4967 void InfoManager::get_ise_state (int client_id, _OUT_ int& state)
4969 m_impl->get_ise_state (client_id, state);
4972 //ISM_TRANS_CMD_GET_ACTIVE_ISE
4973 void InfoManager::get_active_ise (int client_id, _OUT_ String& default_uuid)
4975 m_impl->get_active_ise (client_id, default_uuid);
4978 //ISM_TRANS_CMD_GET_ISE_LIST
4979 void InfoManager::get_ise_list (int client_id, _OUT_ std::vector<String>& strlist)
4981 m_impl->get_ise_list (client_id, strlist);
4984 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
4985 void InfoManager::get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info)
4987 m_impl->get_all_helper_ise_info (client_id, info);
4990 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
4991 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
4992 void InfoManager::set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled)
4994 m_impl->set_enable_helper_ise_info (client_id, appid, is_enabled);
4997 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
4998 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
4999 void InfoManager::show_helper_ise_list (int client_id)
5001 m_impl->show_helper_ise_list (client_id);
5004 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
5005 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5006 void InfoManager::show_helper_ise_selector (int client_id)
5008 m_impl->show_helper_ise_selector (client_id);
5011 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
5013 void InfoManager::is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled)
5015 m_impl->is_helper_ise_enabled (client_id, strAppid, nEnabled);
5018 //ISM_TRANS_CMD_GET_ISE_INFORMATION
5019 void InfoManager::get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
5020 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName)
5022 m_impl->get_ise_information (client_id, strUuid, strName, strLanguage, nType, nOption, strModuleName);
5025 //ISM_TRANS_CMD_RESET_ISE_OPTION
5026 //reply SCIM_TRANS_CMD_OK
5027 bool InfoManager:: reset_ise_option (int client_id)
5029 return m_impl->reset_ise_option (client_id);
5032 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
5034 bool InfoManager:: set_active_ise_by_uuid (int client_id, char* buf, size_t len)
5036 return m_impl->set_active_ise_by_uuid (client_id, buf, len);
5039 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
5040 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5041 void InfoManager::set_initial_ise_by_uuid (int client_id, char* buf, size_t len)
5043 m_impl->set_initial_ise_by_uuid (client_id, buf, len);
5046 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
5047 void InfoManager::set_ise_return_key_type (int client_id, uint32 type)
5049 m_impl->set_ise_return_key_type (client_id, type);
5052 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
5054 bool InfoManager:: get_ise_return_key_type (int client_id, _OUT_ uint32& type)
5056 return m_impl->get_ise_return_key_type (client_id, type);
5060 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
5061 void InfoManager::set_ise_return_key_disable (int client_id, uint32 disabled)
5063 m_impl->set_ise_return_key_disable (client_id, disabled);
5066 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
5067 bool InfoManager::get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled)
5069 return m_impl->get_ise_return_key_disable (client_id, disabled);
5072 //ISM_TRANS_CMD_SET_CAPS_MODE
5073 void InfoManager::set_ise_caps_mode (int client_id, uint32 mode)
5075 m_impl->set_ise_caps_mode (client_id, mode);
5078 //SCIM_TRANS_CMD_RELOAD_CONFIG
5079 void InfoManager::reload_config (void)
5081 m_impl->reload_config ();
5084 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
5085 void InfoManager::will_show_ack (int client_id)
5087 m_impl->will_show_ack (client_id);
5090 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
5091 void InfoManager::will_hide_ack (int client_id)
5093 m_impl->will_hide_ack (client_id);
5096 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
5097 void InfoManager::reset_default_ise (int client_id)
5099 m_impl->reset_default_ise (client_id);
5102 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
5103 void InfoManager::set_keyboard_mode (int client_id, uint32 mode)
5105 m_impl->set_keyboard_mode (client_id, mode);
5108 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
5109 void InfoManager::candidate_will_hide_ack (int client_id)
5111 m_impl->candidate_will_hide_ack (client_id);
5114 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
5115 void InfoManager::get_active_helper_option (int client_id, _OUT_ uint32& option)
5117 m_impl->get_active_helper_option (client_id, option);
5120 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
5121 void InfoManager::show_ise_option_window (int client_id, int caller_pid)
5123 m_impl->show_ise_option_window (client_id, caller_pid);
5126 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
5127 void InfoManager::get_ise_setting_appid (int client_id, String &ime_setting_appid)
5129 m_impl->get_ise_setting_appid (client_id, ime_setting_appid);
5132 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
5133 void InfoManager::resume_ise_option_window (int client_id)
5135 m_impl->resume_ise_option_window (client_id);
5138 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
5139 void InfoManager::set_ise_keyboard_mode (int client_id, uint32 mode)
5141 m_impl->set_ise_keyboard_mode (client_id, mode);
5144 //ISM_TRANS_CMD_SET_PREDICTION_HINT
5145 void InfoManager::set_prediction_hint (int client_id, String prediction_hint)
5147 m_impl->set_prediction_hint (client_id, prediction_hint);
5150 //ISM_TRANS_CMD_SET_MIME_TYPE
5151 void InfoManager::set_ise_mime_type (int client_id, String mime_type)
5153 m_impl->set_ise_mime_type (client_id, mime_type);
5156 //ISM_TRANS_CMD_FINALIZE_CONTENT
5157 void InfoManager::finalize_content (int client_id, String text, uint32 cursor_pos)
5159 m_impl->finalize_content (client_id, text, cursor_pos);
5162 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
5163 void InfoManager::set_prediction_hint_data (int client_id, String key, String value)
5165 m_impl->set_prediction_hint_data (client_id, key, value);
5168 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
5169 void InfoManager::set_optimization_hint(int client_id, uint32 hint)
5171 m_impl->set_optimization_hint(client_id, hint);
5174 //ISM_TRANS_CMD_SET_ISE_ENABLE
5175 void InfoManager::set_ise_enable (int client_id, uint32 enabled)
5177 m_impl->set_ise_enable (client_id, enabled);
5180 //ISM_TRANS_CMD_EXPAND_CANDIDATE
5181 void InfoManager::expand_candidate ()
5183 m_impl->expand_candidate ();
5186 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
5187 void InfoManager::contract_candidate ()
5189 m_impl->contract_candidate ();
5192 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
5193 void InfoManager::get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info)
5195 m_impl->get_recent_ise_geometry (client_id, angle, info);
5198 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
5199 bool InfoManager::remoteinput_send_input_message (int client_id, char* buf, size_t len)
5201 return m_impl->send_remote_input_message (client_id, buf, len);
5204 void InfoManager::remoteinput_send_surrounding_text (const char* text, uint32 cursor)
5206 return m_impl->send_remote_surrounding_text (text, cursor);
5209 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
5210 void InfoManager::register_panel_client (uint32 client_id, uint32 id)
5212 m_impl->register_panel_client (client_id, id);
5215 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
5216 void InfoManager::register_input_context (uint32 client_id, uint32 context, String uuid)
5218 m_impl->register_input_context (client_id, context, uuid);
5221 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
5222 void InfoManager::remove_input_context (uint32 client_id, uint32 context)
5224 m_impl->remove_input_context (client_id, context);
5227 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
5228 void InfoManager::socket_reset_input_context (int client_id, uint32 context)
5230 m_impl->socket_reset_input_context (client_id, context);
5233 //SCIM_TRANS_CMD_FOCUS_IN
5234 void InfoManager::focus_in (int client_id, uint32 context, String uuid)
5236 m_impl->focus_in (client_id, context, uuid);
5239 //SCIM_TRANS_CMD_FOCUS_OUT
5240 void InfoManager::focus_out (int client_id, uint32 context)
5242 m_impl->focus_out (client_id, context);
5245 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
5246 bool InfoManager::process_input_device_event(int client, uint32 type, const char *data, size_t len, _OUT_ uint32& result)
5248 return m_impl->process_input_device_event(client, type, data, len, result);
5251 //ISM_TRANS_CMD_TURN_ON_LOG
5252 void InfoManager::socket_turn_on_log (uint32 isOn)
5254 m_impl->socket_turn_on_log (isOn);
5257 //SCIM_TRANS_CMD_PANEL_TURN_ON
5258 void InfoManager::socket_turn_on (void)
5260 m_impl->socket_turn_on ();
5263 //SCIM_TRANS_CMD_PANEL_TURN_OFF
5264 void InfoManager::socket_turn_off (void)
5266 m_impl->socket_turn_off ();
5269 //SCIM_TRANS_CMD_UPDATE_SCREEN
5270 void InfoManager::socket_update_screen (int client_id, uint32 num)
5272 m_impl->socket_update_screen (client_id, num);
5275 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
5276 void InfoManager::socket_update_spot_location (uint32 x, uint32 y, uint32 top_y)
5278 m_impl->socket_update_spot_location (x, y, top_y);
5281 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
5282 void InfoManager::socket_update_cursor_position (uint32 cursor_pos)
5284 m_impl->socket_update_cursor_position (cursor_pos);
5287 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
5288 void InfoManager::socket_update_surrounding_text (String text, uint32 cursor)
5290 m_impl->socket_update_surrounding_text (text, cursor);
5293 void InfoManager::remoteinput_callback_focus_in (void)
5295 m_impl->remoteinput_callback_focus_in ();
5298 void InfoManager::remoteinput_callback_focus_out (void)
5300 m_impl->remoteinput_callback_focus_out ();
5303 void InfoManager::remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type)
5305 m_impl->remoteinput_callback_entry_metadata (hint, layout, variation, autocapital_type, return_key_disabled, return_key_type);
5308 void InfoManager::remoteinput_callback_surrounding_text (String text, uint32 cursor)
5310 m_impl->remoteinput_callback_surrounding_text (text, cursor);
5313 void InfoManager::remoteinput_callback_input_resource (uint32 input_resource)
5315 m_impl->remoteinput_callback_input_resource (input_resource);
5318 void InfoManager::remoteinput_callback_key_symbol (String key_symbol, bool press, uint32 timestamp)
5320 m_impl->remoteinput_callback_key_symbol (key_symbol, press, timestamp);
5323 void InfoManager::remoteinput_callback_cursor_position (uint32 cursor)
5325 m_impl->remoteinput_callback_cursor_position (cursor);
5328 //ISM_TRANS_CMD_UPDATE_SELECTION
5329 void InfoManager::socket_update_selection (String text)
5331 m_impl->socket_update_selection (text);
5334 //FIXME: useless anymore
5335 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
5336 void InfoManager::socket_update_factory_info (PanelFactoryInfo& info)
5338 m_impl->socket_update_factory_info (info);
5341 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
5342 void InfoManager::socket_show_help (String help)
5344 m_impl->socket_show_help (help);
5347 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
5348 void InfoManager::socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec)
5350 m_impl->socket_show_factory_menu (vec);
5353 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5354 void InfoManager::socket_show_preedit_string (void)
5356 m_impl->socket_show_preedit_string ();
5359 //SCIM_TRANS_CMD_SHOW_AUX_STRING
5360 void InfoManager::socket_show_aux_string (void)
5362 m_impl->socket_show_aux_string ();
5365 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
5366 void InfoManager::socket_show_lookup_table (void)
5368 m_impl->socket_show_lookup_table ();
5371 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
5372 void InfoManager::socket_show_associate_table (void)
5374 m_impl->socket_show_associate_table ();
5377 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5378 void InfoManager::socket_hide_preedit_string (void)
5380 m_impl->socket_hide_preedit_string ();
5383 //SCIM_TRANS_CMD_HIDE_AUX_STRING
5384 void InfoManager::socket_hide_aux_string (void)
5386 m_impl->socket_hide_aux_string ();
5389 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
5390 void InfoManager::socket_hide_lookup_table (void)
5392 m_impl->socket_hide_lookup_table ();
5395 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
5396 void InfoManager::socket_hide_associate_table (void)
5398 m_impl->socket_hide_associate_table ();
5401 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5402 void InfoManager::socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret)
5404 m_impl->socket_update_preedit_string (str, attrs, caret);
5407 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5408 void InfoManager::socket_update_preedit_caret (uint32 caret)
5410 m_impl->socket_update_preedit_caret (caret);
5413 //ISM_TRANS_CMD_RECAPTURE_STRING
5414 void InfoManager::socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs)
5416 m_impl->socket_recapture_string (offset, len, preedit, commit, attrs);
5419 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
5420 void InfoManager::socket_update_aux_string (String& str, const AttributeList& attrs)
5422 m_impl->socket_update_aux_string (str, attrs);
5425 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
5426 void InfoManager::socket_update_lookup_table (const LookupTable& table)
5428 m_impl->socket_update_lookup_table (table);
5431 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
5432 void InfoManager::socket_update_associate_table (const LookupTable& table)
5434 m_impl->socket_update_associate_table (table);
5437 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5438 void InfoManager::socket_register_properties (const PropertyList& properties)
5440 m_impl->socket_register_properties (properties);
5443 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5444 void InfoManager::socket_update_property (const Property& property)
5446 m_impl->socket_update_property (property);
5449 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
5450 void InfoManager::socket_get_keyboard_ise_list (String& uuid)
5452 m_impl->socket_get_keyboard_ise_list (uuid);
5455 //ISM_TRANS_CMD_SET_CANDIDATE_UI
5456 void InfoManager::socket_set_candidate_ui (uint32 portrait_line, uint32 mode)
5458 m_impl->socket_set_candidate_ui (portrait_line, mode);
5461 //ISM_TRANS_CMD_GET_CANDIDATE_UI
5462 void InfoManager::socket_get_candidate_ui (String uuid)
5464 m_impl->socket_get_candidate_ui (uuid);
5467 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
5468 void InfoManager::socket_set_candidate_position (uint32 left, uint32 top)
5470 m_impl->socket_set_candidate_position (left, top);
5473 //ISM_TRANS_CMD_HIDE_CANDIDATE
5474 void InfoManager::socket_hide_candidate (void)
5476 m_impl->socket_hide_candidate ();
5479 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
5480 void InfoManager::socket_get_candidate_geometry (String& uuid)
5482 m_impl->socket_get_candidate_geometry (uuid);
5485 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
5486 void InfoManager::socket_set_keyboard_ise (String uuid)
5488 m_impl->socket_set_keyboard_ise (uuid);
5491 //ISM_TRANS_CMD_SELECT_CANDIDATE
5492 void InfoManager::socket_helper_select_candidate (uint32 index)
5494 m_impl->socket_helper_select_candidate (index);
5497 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
5498 void InfoManager::socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height)
5500 m_impl->socket_helper_update_ise_geometry (client, x, y, width, height);
5503 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
5504 void InfoManager::socket_get_keyboard_ise (String uuid)
5506 m_impl->socket_get_keyboard_ise (uuid);
5509 //SCIM_TRANS_CMD_START_HELPER
5510 void InfoManager::socket_start_helper (int client_id, uint32 context, String uuid)
5512 m_impl->socket_start_helper (client_id, context, uuid);
5515 //SCIM_TRANS_CMD_STOP_HELPER
5516 void InfoManager::socket_stop_helper (int client_id, uint32 context, String uuid)
5518 m_impl->socket_stop_helper (client_id, context, uuid);
5521 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
5522 void InfoManager::socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans)
5524 m_impl->socket_send_helper_event (client_id, context, uuid, _nest_trans);
5527 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5528 void InfoManager::socket_helper_register_properties (int client, PropertyList& properties)
5530 m_impl->socket_helper_register_properties (client, properties);
5533 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5534 void InfoManager::socket_helper_update_property (int client, Property& property)
5536 m_impl->socket_helper_update_property (client, property);
5539 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
5540 void InfoManager::socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans)
5542 m_impl->socket_helper_send_imengine_event (client, target_ic, target_uuid, nest_trans);
5545 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
5546 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
5547 void InfoManager::socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5549 m_impl->socket_helper_send_key_event (client, target_ic, target_uuid, key);
5552 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
5553 void InfoManager::socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5555 m_impl->socket_helper_forward_key_event (client, target_ic, target_uuid, key);
5558 //SCIM_TRANS_CMD_COMMIT_STRING
5559 void InfoManager::socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr)
5561 m_impl->socket_helper_commit_string (client, target_ic, target_uuid, wstr);
5564 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
5565 void InfoManager::socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after)
5567 m_impl->socket_helper_get_surrounding_text (client, uuid, maxlen_before, maxlen_after);
5570 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
5571 void InfoManager::socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len)
5573 m_impl->socket_helper_delete_surrounding_text (client, offset, len);
5576 //SCIM_TRANS_CMD_GET_SELECTION
5577 void InfoManager::socket_helper_get_selection (int client, String uuid)
5579 m_impl->socket_helper_get_selection (client, uuid);
5582 //SCIM_TRANS_CMD_SET_SELECTION
5583 void InfoManager::socket_helper_set_selection (int client, uint32 start, uint32 end)
5585 m_impl->socket_helper_set_selection (client, start, end);
5588 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5589 void InfoManager::socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid)
5591 m_impl->socket_helper_show_preedit_string (client, target_ic, target_uuid);
5594 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5595 void InfoManager::socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid)
5597 m_impl->socket_helper_hide_preedit_string (client, target_ic, target_uuid);
5600 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5601 void InfoManager::socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit,
5602 WideString commit, AttributeList& attrs, uint32 caret)
5604 m_impl->socket_helper_update_preedit_string (client, target_ic, target_uuid, preedit, commit, attrs, caret);
5607 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5608 void InfoManager::socket_helper_update_preedit_caret (int client, uint32 caret)
5610 m_impl->socket_helper_update_preedit_caret (client, caret);
5613 //ISM_TRANS_CMD_RECAPTURE_STRING
5614 void InfoManager::socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
5615 WideString commit, AttributeList& attrs)
5617 m_impl->socket_helper_recapture_string (client, target_ic, target_uuid, offset, len, preedit, commit, attrs);
5620 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
5621 void InfoManager::socket_helper_register_helper (int client, HelperInfo& info)
5623 m_impl->socket_helper_register_helper (client, info);
5626 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
5627 void InfoManager::socket_helper_register_helper_passive (int client, HelperInfo& info)
5629 m_impl->socket_helper_register_helper_passive (client, info);
5632 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
5633 void InfoManager::socket_helper_update_input_context (int client, uint32 type, uint32 value)
5635 m_impl->socket_helper_update_input_context (client, type, value);
5638 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
5639 void InfoManager::socket_helper_update_language_locale(int client, String locale)
5641 m_impl->socket_helper_update_language_locale(client, locale);
5644 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
5645 void InfoManager::socket_helper_send_private_command (int client, String command)
5647 m_impl->socket_helper_send_private_command (client, command);
5650 //SCIM_TRANS_CMD_COMMIT_CONTENT
5651 void InfoManager::socket_helper_commit_content (int client, String content, String description, String mime_types)
5653 m_impl->socket_helper_commit_content (client, content, description, mime_types);
5656 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
5657 void InfoManager::UPDATE_ISE_EXIT (int client)
5659 m_impl->UPDATE_ISE_EXIT (client);
5662 //ISM_TRANS_CMD_PROCESS_KEY_EVENT_DONE
5663 void InfoManager::process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial)
5665 m_impl->process_key_event_done (key, ret, serial);
5668 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
5669 void InfoManager::request_ise_hide ()
5671 m_impl->request_ise_hide ();
5674 bool InfoManager::check_privilege_by_sockfd (int client_id, const String& privilege) {
5675 return m_impl->check_privilege_by_sockfd (client_id, privilege);
5678 void InfoManager::add_client (int client_id, uint32 key, ClientType type)
5680 m_impl->add_client (client_id, key, type);
5683 void InfoManager::del_client (int client_id)
5685 m_impl->del_client (client_id);
5688 bool InfoManager::set_autocapital_type (int mode)
5690 return m_impl->set_autocapital_type (mode);
5693 void InfoManager::set_prediction_allow (int client, bool mode)
5695 m_impl->set_prediction_allow (client, mode);
5698 void InfoManager::reshow_input_panel ()
5700 m_impl->reshow_input_panel ();
5703 void InfoManager::request_ise_terminate ()
5705 m_impl->request_ise_terminate ();
5708 void InfoManager::set_floating_mode (uint32 floating_mode)
5710 m_impl->set_floating_mode (floating_mode);
5713 void InfoManager::set_floating_drag_enabled (uint32 enabled)
5715 m_impl->set_floating_drag_enabled (enabled);
5718 //////////////////////////////////Message function end/////////////////////////////////////////
5721 InfoManager::signal_connect_turn_on (InfoManagerSlotVoid* slot)
5723 return m_impl->signal_connect_turn_on (slot);
5727 InfoManager::signal_connect_turn_off (InfoManagerSlotVoid* slot)
5729 return m_impl->signal_connect_turn_off (slot);
5733 InfoManager::signal_connect_show_panel (InfoManagerSlotVoid* slot)
5735 return m_impl->signal_connect_show_panel (slot);
5739 InfoManager::signal_connect_hide_panel (InfoManagerSlotVoid* slot)
5741 return m_impl->signal_connect_hide_panel (slot);
5745 InfoManager::signal_connect_update_screen (InfoManagerSlotInt* slot)
5747 return m_impl->signal_connect_update_screen (slot);
5751 InfoManager::signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot)
5753 return m_impl->signal_connect_update_spot_location (slot);
5757 InfoManager::signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot)
5759 return m_impl->signal_connect_update_factory_info (slot);
5763 InfoManager::signal_connect_start_default_ise (InfoManagerSlotVoid* slot)
5765 return m_impl->signal_connect_start_default_ise (slot);
5769 InfoManager::signal_connect_stop_default_ise (InfoManagerSlotBool* slot)
5771 return m_impl->signal_connect_stop_default_ise (slot);
5775 InfoManager::signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot)
5777 return m_impl->signal_connect_set_candidate_ui (slot);
5781 InfoManager::signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot)
5783 return m_impl->signal_connect_get_candidate_ui (slot);
5787 InfoManager::signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot)
5789 return m_impl->signal_connect_set_candidate_position (slot);
5793 InfoManager::signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot)
5795 return m_impl->signal_connect_get_candidate_geometry (slot);
5799 InfoManager::signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot)
5801 return m_impl->signal_connect_get_input_panel_geometry (slot);
5805 InfoManager::signal_connect_set_keyboard_ise (InfoManagerSlotString* slot)
5807 return m_impl->signal_connect_set_keyboard_ise (slot);
5811 InfoManager::signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot)
5813 return m_impl->signal_connect_get_keyboard_ise (slot);
5817 InfoManager::signal_connect_show_help (InfoManagerSlotString* slot)
5819 return m_impl->signal_connect_show_help (slot);
5823 InfoManager::signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot)
5825 return m_impl->signal_connect_show_factory_menu (slot);
5829 InfoManager::signal_connect_show_preedit_string (InfoManagerSlotVoid* slot)
5831 return m_impl->signal_connect_show_preedit_string (slot);
5835 InfoManager::signal_connect_show_aux_string (InfoManagerSlotVoid* slot)
5837 return m_impl->signal_connect_show_aux_string (slot);
5841 InfoManager::signal_connect_show_lookup_table (InfoManagerSlotVoid* slot)
5843 return m_impl->signal_connect_show_lookup_table (slot);
5847 InfoManager::signal_connect_show_associate_table (InfoManagerSlotVoid* slot)
5849 return m_impl->signal_connect_show_associate_table (slot);
5853 InfoManager::signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot)
5855 return m_impl->signal_connect_hide_preedit_string (slot);
5859 InfoManager::signal_connect_hide_aux_string (InfoManagerSlotVoid* slot)
5861 return m_impl->signal_connect_hide_aux_string (slot);
5865 InfoManager::signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot)
5867 return m_impl->signal_connect_hide_lookup_table (slot);
5871 InfoManager::signal_connect_hide_associate_table (InfoManagerSlotVoid* slot)
5873 return m_impl->signal_connect_hide_associate_table (slot);
5877 InfoManager::signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot)
5879 return m_impl->signal_connect_update_preedit_string (slot);
5883 InfoManager::signal_connect_update_preedit_caret (InfoManagerSlotInt* slot)
5885 return m_impl->signal_connect_update_preedit_caret (slot);
5889 InfoManager::signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot)
5891 return m_impl->signal_connect_update_aux_string (slot);
5895 InfoManager::signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot)
5897 return m_impl->signal_connect_update_lookup_table (slot);
5901 InfoManager::signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot)
5903 return m_impl->signal_connect_update_associate_table (slot);
5907 InfoManager::signal_connect_register_properties (InfoManagerSlotPropertyList* slot)
5909 return m_impl->signal_connect_register_properties (slot);
5913 InfoManager::signal_connect_update_property (InfoManagerSlotProperty* slot)
5915 return m_impl->signal_connect_update_property (slot);
5919 InfoManager::signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot)
5921 return m_impl->signal_connect_register_helper_properties (slot);
5925 InfoManager::signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot)
5927 return m_impl->signal_connect_update_helper_property (slot);
5931 InfoManager::signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot)
5933 return m_impl->signal_connect_register_helper (slot);
5937 InfoManager::signal_connect_remove_helper (InfoManagerSlotInt* slot)
5939 return m_impl->signal_connect_remove_helper (slot);
5943 InfoManager::signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot)
5945 return m_impl->signal_connect_set_active_ise_by_uuid (slot);
5949 InfoManager::signal_connect_focus_in (InfoManagerSlotVoid* slot)
5951 return m_impl->signal_connect_focus_in (slot);
5955 InfoManager::signal_connect_focus_out (InfoManagerSlotVoid* slot)
5957 return m_impl->signal_connect_focus_out (slot);
5961 InfoManager::signal_connect_expand_candidate (InfoManagerSlotVoid* slot)
5963 return m_impl->signal_connect_expand_candidate (slot);
5967 InfoManager::signal_connect_contract_candidate (InfoManagerSlotVoid* slot)
5969 return m_impl->signal_connect_contract_candidate (slot);
5973 InfoManager::signal_connect_select_candidate (InfoManagerSlotInt* slot)
5975 return m_impl->signal_connect_select_candidate (slot);
5979 InfoManager::signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot)
5981 return m_impl->signal_connect_get_ise_list (slot);
5985 InfoManager::signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot)
5987 return m_impl->signal_connect_get_all_helper_ise_info (slot);
5991 InfoManager::signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot)
5993 return m_impl->signal_connect_set_has_option_helper_ise_info (slot);
5997 InfoManager::signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot)
5999 return m_impl->signal_connect_set_enable_helper_ise_info (slot);
6003 InfoManager::signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot)
6005 return m_impl->signal_connect_show_helper_ise_list (slot);
6009 InfoManager::signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot)
6011 return m_impl->signal_connect_show_helper_ise_selector (slot);
6015 InfoManager::signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot)
6017 return m_impl->signal_connect_is_helper_ise_enabled (slot);
6021 InfoManager::signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot)
6023 return m_impl->signal_connect_get_ise_information (slot);
6027 InfoManager::signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot)
6029 return m_impl->signal_connect_get_keyboard_ise_list (slot);
6033 InfoManager::signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot)
6035 return m_impl->signal_connect_update_ise_geometry (slot);
6039 InfoManager::signal_connect_get_language_list (InfoManagerSlotStringVector* slot)
6041 return m_impl->signal_connect_get_language_list (slot);
6045 InfoManager::signal_connect_get_all_language (InfoManagerSlotStringVector* slot)
6047 return m_impl->signal_connect_get_all_language (slot);
6051 InfoManager::signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot)
6053 return m_impl->signal_connect_get_ise_language (slot);
6057 InfoManager::signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot)
6059 return m_impl->signal_connect_get_ise_info_by_uuid (slot);
6063 InfoManager::signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot)
6065 return m_impl->signal_connect_send_key_event (slot);
6069 InfoManager::signal_connect_accept_connection (InfoManagerSlotInt* slot)
6071 return m_impl->signal_connect_accept_connection (slot);
6075 InfoManager::signal_connect_close_connection (InfoManagerSlotInt* slot)
6077 return m_impl->signal_connect_close_connection (slot);
6081 InfoManager::signal_connect_exit (InfoManagerSlotVoid* slot)
6083 return m_impl->signal_connect_exit (slot);
6087 InfoManager::signal_connect_transaction_start (InfoManagerSlotVoid* slot)
6089 return m_impl->signal_connect_transaction_start (slot);
6093 InfoManager::signal_connect_transaction_end (InfoManagerSlotVoid* slot)
6095 return m_impl->signal_connect_transaction_end (slot);
6099 InfoManager::signal_connect_lock (InfoManagerSlotVoid* slot)
6101 return m_impl->signal_connect_lock (slot);
6105 InfoManager::signal_connect_unlock (InfoManagerSlotVoid* slot)
6107 return m_impl->signal_connect_unlock (slot);
6111 InfoManager::signal_connect_update_input_context (InfoManagerSlotIntInt* slot)
6113 return m_impl->signal_connect_update_input_context (slot);
6117 InfoManager::signal_connect_show_ise (InfoManagerSlotVoid* slot)
6119 return m_impl->signal_connect_show_ise (slot);
6123 InfoManager::signal_connect_hide_ise (InfoManagerSlotVoid* slot)
6125 return m_impl->signal_connect_hide_ise (slot);
6129 InfoManager::signal_connect_will_show_ack (InfoManagerSlotVoid* slot)
6131 return m_impl->signal_connect_will_show_ack (slot);
6135 InfoManager::signal_connect_will_hide_ack (InfoManagerSlotVoid* slot)
6137 return m_impl->signal_connect_will_hide_ack (slot);
6141 InfoManager::signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot)
6143 return m_impl->signal_connect_set_keyboard_mode (slot);
6147 InfoManager::signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot)
6149 return m_impl->signal_connect_candidate_will_hide_ack (slot);
6153 InfoManager::signal_connect_get_ise_state (InfoManagerSlotInt2* slot)
6155 return m_impl->signal_connect_get_ise_state (slot);
6159 InfoManager::signal_connect_run_helper (InfoManagerSlotString3* slot)
6161 return m_impl->signal_connect_run_helper (slot);
6165 InfoManager::signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
6167 return m_impl->signal_connect_launch_option_application (slot);
6171 InfoManager::signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
6173 return m_impl->signal_connect_get_ise_setting_appid (slot);
6177 InfoManager::signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot)
6179 return m_impl->signal_connect_get_recent_ise_geometry (slot);
6183 InfoManager::signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
6185 return m_impl->signal_connect_check_privilege_by_sockfd (slot);
6189 InfoManager::signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
6191 return m_impl->signal_connect_remoteinput_send_input_message (slot);
6195 InfoManager::signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
6197 return m_impl->signal_connect_remoteinput_send_surrounding_text (slot);
6200 } /* namespace scim */
6203 vi:ts=4:nowrap:ai:expandtab