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 InfoManagerSignalBool m_signal_connect_set_preloading_ise;
430 PanelAgentManager m_panel_agent_manager;
432 void delete_ise_context_buffer (void) {
433 if (m_ise_context_buffer != NULL) {
434 delete[] m_ise_context_buffer;
435 m_ise_context_buffer = NULL;
436 m_ise_context_length = 0;
440 void delete_imdata_buffer (void) {
441 if (m_imdata_buffer != NULL) {
442 delete[] m_imdata_buffer;
443 m_imdata_buffer = NULL;
450 : m_current_screen (0),
451 m_current_socket_client (-1), m_current_client_context (0),
452 m_current_toolbar_mode (TOOLBAR_KEYBOARD_MODE),
453 m_current_helper_option (0),
454 m_pending_active_imcontrol_id (-1),
455 m_show_request_client_id (-1),
456 m_active_client_id (-1),
457 m_should_shared_ise (false),
458 m_ise_exiting (false), m_is_imengine_aux (false), m_is_imengine_candidate (false),
459 m_refocus_needed (false),
460 m_reshow_needed (false),
461 m_restart_needed (false),
462 m_is_ise_alive (false),
463 m_last_socket_client (-1), m_last_client_context (0),
464 m_ise_context_buffer (NULL), m_ise_context_length (0),
465 m_imdata_buffer (NULL), m_imdata_length (0) {
466 m_current_ise_name = String (_ ("English Keyboard"));
467 m_imcontrol_repository.clear ();
468 m_imcontrol_map.clear ();
469 m_current_send_remoteinput_id.clear ();
470 m_current_recv_remoteinput_id.clear ();
471 m_panel_client_map.clear ();
474 ~InfoManagerImpl () {
475 delete_ise_context_buffer ();
476 delete_imdata_buffer ();
479 bool initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident) {
481 m_config_name = "socket";
482 m_display_name = display;
484 return m_panel_agent_manager.initialize (info_manager, config, display, resident);
487 bool valid (void) const {
488 return m_panel_agent_manager.valid ();
494 SCIM_DEBUG_MAIN (1) << "InfoManager::stop ()\n";
496 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
497 String helper_uuid = get_current_helper_uuid ();
498 hide_helper (helper_uuid);
499 stop_helper (helper_uuid, -2, 0);
502 m_panel_agent_manager.stop ();
505 TOOLBAR_MODE_T get_current_toolbar_mode () const {
506 return m_current_toolbar_mode;
509 String get_current_ise_name () const {
510 return m_current_ise_name;
513 String get_current_helper_uuid () const {
514 return m_current_helper_uuid;
517 uint32 get_current_helper_option () const {
518 return m_current_helper_option;
521 void set_current_ise_name (String& name) {
522 m_current_ise_name = name;
525 void set_current_toolbar_mode (TOOLBAR_MODE_T mode) {
526 m_current_toolbar_mode = mode;
529 void set_current_helper_option (uint32 option) {
530 m_current_helper_option = option;
533 void update_panel_event (int cmd, uint32 nType, uint32 nValue) {
535 uint32 focused_context;
536 get_focused_context (focused_client, focused_context);
538 if (focused_client == -1 && m_active_client_id != -1) {
539 focused_client = m_panel_client_map[m_active_client_id];
543 SCIM_DEBUG_MAIN (1) << __func__ << " (" << nType << ", " << nValue << "), client=" << focused_client << "\n";
544 ClientInfo client_info = socket_get_client_info (focused_client);
546 if (client_info.type == FRONTEND_CLIENT) {
547 m_panel_agent_manager.update_panel_event (focused_client, focused_context, cmd, nType, nValue);
549 std::cerr << __func__ << " focused client is not existed!!!" << "\n";
552 if (m_panel_client_map[m_show_request_client_id] != focused_client) {
553 client_info = socket_get_client_info (m_panel_client_map[m_show_request_client_id]);
555 if (client_info.type == FRONTEND_CLIENT) {
556 m_panel_agent_manager.update_panel_event (m_panel_client_map[m_show_request_client_id], 0, cmd, nType, nValue);
557 std::cerr << __func__ << " show request client=" << m_panel_client_map[m_show_request_client_id] << "\n";
559 std::cerr << __func__ << " show request client is not existed!!!" << "\n";
564 bool move_preedit_caret (uint32 position) {
565 SCIM_DEBUG_MAIN (1) << "InfoManager::move_preedit_caret (" << position << ")\n";
569 get_focused_context (client, context);
572 m_panel_agent_manager.update_preedit_caret (client, context, position);
580 bool request_help (void) {
581 SCIM_DEBUG_MAIN (1) << "InfoManager::request_help ()\n";
585 get_focused_context (client, context);
588 m_panel_agent_manager.request_help (client, context);
595 bool request_factory_menu (void) {
596 SCIM_DEBUG_MAIN (1) << "InfoManager::request_factory_menu ()\n";
600 get_focused_context (client, context);
603 m_panel_agent_manager.request_factory_menu (client, context);
611 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
612 bool reset_keyboard_ise (void) {
613 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_keyboard_ise ()\n";
617 get_focused_context (client, context);
620 m_panel_agent_manager.reset_keyboard_ise (client, context);
627 bool update_keyboard_ise_list (void) {
628 SCIM_DEBUG_MAIN (1) << "InfoManager::update_keyboard_ise_list ()\n";
632 get_focused_context (client, context);
635 m_panel_agent_manager.update_keyboard_ise_list (client, context);
642 bool change_factory (const String& uuid) {
643 SCIM_DEBUG_MAIN (1) << "InfoManager::change_factory (" << uuid << ")\n";
647 if (scim_global_config_read (SCIM_GLOBAL_CONFIG_PRELOAD_KEYBOARD_ISE, false))
648 m_helper_manager.preload_keyboard_ise (uuid);
651 get_focused_context (client, context);
654 m_panel_agent_manager.change_factory (client, context, uuid);
661 bool helper_candidate_show (void) {
662 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
667 get_focused_context (client, context);
669 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
670 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
672 if (it != m_helper_client_index.end ()) {
673 uint32 ctx = get_helper_ic (client, context);
674 m_panel_agent_manager.helper_candidate_show (it->second.id, ctx, m_current_helper_uuid);
679 /* Inform wayland module that we are showing candidate window */
681 uint32 focused_context;
682 String focused_uuid = get_focused_context(focused_client, focused_context);
683 m_panel_agent_manager.helper_candidate_show(focused_client, focused_context, focused_uuid);
688 bool helper_candidate_hide (void) {
689 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
694 get_focused_context (client, context);
696 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
697 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
699 if (it != m_helper_client_index.end ()) {
700 uint32 ctx = get_helper_ic (client, context);
701 m_panel_agent_manager.helper_candidate_hide (it->second.id, ctx, m_current_helper_uuid);
706 /* Inform wayland module that we are hiding candidate window */
708 uint32 focused_context;
709 String focused_uuid = get_focused_context(focused_client, focused_context);
710 m_panel_agent_manager.helper_candidate_hide(focused_client, focused_context, focused_uuid);
715 bool candidate_more_window_show (void) {
716 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
719 get_focused_context (client, context);
721 if (m_is_imengine_candidate) {
723 m_panel_agent_manager.candidate_more_window_show (client, context);
727 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
728 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
730 if (it != m_helper_client_index.end ()) {
731 uint32 ctx = get_helper_ic (client, context);
732 m_panel_agent_manager.candidate_more_window_show (it->second.id, ctx);
741 bool candidate_more_window_hide (void) {
742 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
745 get_focused_context (client, context);
747 if (m_is_imengine_candidate) {
749 m_panel_agent_manager.candidate_more_window_hide (client, context);
753 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
754 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
756 if (it != m_helper_client_index.end ()) {
757 uint32 ctx = get_helper_ic (client, context);
758 m_panel_agent_manager.candidate_more_window_hide (it->second.id, ctx);
767 bool update_helper_lookup_table (const LookupTable& table) {
768 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
772 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
773 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
775 if (it != m_helper_client_index.end ()) {
777 get_focused_context (client, context);
778 ctx = get_helper_ic (client, context);
779 m_panel_agent_manager.update_helper_lookup_table (it->second.id, ctx, m_current_helper_uuid, table);
787 bool select_aux (uint32 item) {
788 SCIM_DEBUG_MAIN (1) << "InfoManager::select_aux (" << item << ")\n";
792 get_focused_context (client, context);
794 if (m_is_imengine_aux) {
796 m_panel_agent_manager.select_aux (client, context, item);
799 helper_select_aux (item);
806 bool select_candidate (uint32 item) {
807 SCIM_DEBUG_MAIN (1) << "InfoManager::select_candidate (" << item << ")\n";
811 get_focused_context (client, context);
813 if (m_is_imengine_candidate) {
815 m_panel_agent_manager.select_candidate (client, context, item);
818 helper_select_candidate (item);
825 bool lookup_table_page_up (void) {
826 SCIM_DEBUG_MAIN (1) << "InfoManager::lookup_table_page_up ()\n";
830 get_focused_context (client, context);
832 if (m_is_imengine_candidate) {
834 m_panel_agent_manager.lookup_table_page_up (client, context);
837 helper_lookup_table_page_up ();
844 bool lookup_table_page_down (void) {
845 SCIM_DEBUG_MAIN (1) << "InfoManager::lookup_table_page_down ()\n";
849 get_focused_context (client, context);
851 if (m_is_imengine_candidate) {
853 m_panel_agent_manager.lookup_table_page_down (client, context);
856 helper_lookup_table_page_down ();
863 bool update_lookup_table_page_size (uint32 size) {
864 SCIM_DEBUG_MAIN (1) << "InfoManager::update_lookup_table_page_size (" << size << ")\n";
868 get_focused_context (client, context);
870 if (m_is_imengine_candidate) {
872 m_panel_agent_manager.update_lookup_table_page_size (client, context, size);
875 helper_update_lookup_table_page_size (size);
882 bool update_candidate_item_layout (const std::vector<uint32>& row_items) {
883 SCIM_DEBUG_MAIN (1) << __func__ << " (" << row_items.size () << ")\n";
887 get_focused_context (client, context);
889 if (m_is_imengine_candidate) {
891 m_panel_agent_manager.update_candidate_item_layout (client, context, row_items);
894 helper_update_candidate_item_layout (row_items);
901 bool select_associate (uint32 item) {
902 SCIM_DEBUG_MAIN (1) << "InfoManager::select_associate (" << item << ")\n";
906 get_focused_context (client, context);
909 m_panel_agent_manager.select_associate (client, context, item);
913 helper_select_associate (item);
917 bool associate_table_page_up (void) {
918 SCIM_DEBUG_MAIN (1) << "InfoManager::associate_table_page_up ()\n";
922 get_focused_context (client, context);
925 m_panel_agent_manager.associate_table_page_up (client, context);
929 helper_associate_table_page_up ();
933 bool associate_table_page_down (void) {
934 SCIM_DEBUG_MAIN (1) << "InfoManager::associate_table_page_down ()\n";
938 get_focused_context (client, context);
941 m_panel_agent_manager.associate_table_page_down (client, context);
945 helper_associate_table_page_down ();
949 bool update_associate_table_page_size (uint32 size) {
950 SCIM_DEBUG_MAIN (1) << "InfoManager::update_associate_table_page_size (" << size << ")\n";
954 get_focused_context (client, context);
957 m_panel_agent_manager.update_associate_table_page_size (client, context, size);
961 helper_update_associate_table_page_size (size);
965 bool update_displayed_candidate_number (uint32 size) {
966 SCIM_DEBUG_MAIN (1) << __func__ << " (" << size << ")\n";
970 get_focused_context (client, context);
972 if (m_is_imengine_candidate) {
974 m_panel_agent_manager.update_displayed_candidate_number (client, context, size);
977 helper_update_displayed_candidate_number (size);
984 void send_longpress_event (int type, int index) {
985 SCIM_DEBUG_MAIN (1) << __func__ << " (" << type << ", " << index << ")\n";
988 get_focused_context (client, context);
990 if (m_is_imengine_candidate) {
992 m_panel_agent_manager.send_longpress_event (client, context, index);
995 helper_longpress_candidate (index);
999 bool trigger_property (const String& property) {
1000 SCIM_DEBUG_MAIN (1) << "InfoManager::trigger_property (" << property << ")\n";
1004 get_focused_context (client, context);
1007 m_panel_agent_manager.trigger_property (client, context, property);
1014 bool start_helper (const String& uuid, int client, uint32 context) {
1015 SCIM_DEBUG_MAIN (1) << "InfoManager::start_helper (" << uuid << ")\n";
1016 LOGD ("start ISE(%s)", uuid.c_str ());
1018 if (uuid.length () <= 0)
1022 /*if (m_current_toolbar_mode != TOOLBAR_HELPER_MODE || m_current_helper_uuid.compare (uuid) != 0)*/ {
1023 SCIM_DEBUG_MAIN (1) << "Run_helper\n";
1025 uint32 ic = get_helper_ic (m_panel_client_map[client], context);
1027 /* Get the context uuid from the client context registration table. */
1029 ClientContextUUIDRepository::iterator it =
1030 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
1032 if (it != m_client_context_uuids.end ())
1033 ic_uuid = it->second;
1035 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
1036 m_signal_run_helper (uuid, m_config_name, m_display_name);
1038 m_current_helper_uuid = uuid;
1043 bool stop_helper (const String& uuid, int client, uint32 context) {
1044 char buf[256] = {0};
1045 snprintf (buf, sizeof (buf), "time:%ld pid:%d %s %s prepare to stop ISE(%s)\n",
1046 time (0), getpid (), __FILE__, __func__, uuid.c_str ());
1047 LOGD ("prepare to stop ISE(%s)", uuid.c_str ());
1048 SCIM_DEBUG_MAIN (1) << "InfoManager::stop_helper (" << uuid << ")\n";
1050 if (uuid.length () <= 0)
1054 uint32 ctx = get_helper_ic (client, context);
1055 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
1057 if (it != m_helper_client_index.end ()) {
1058 m_ise_exiting = true;
1059 m_current_helper_uuid = String ("");
1060 m_panel_agent_manager.exit (it->second.id, ctx);
1061 SCIM_DEBUG_MAIN (1) << "Stop helper\n";
1062 ISF_SAVE_LOG ("send SCIM_TRANS_CMD_EXIT message to %s", uuid.c_str ());
1065 /* Since we are stopping this helper, erase information from start_helper_ic_index too */
1066 m_start_helper_ic_index.erase (uuid);
1072 void focus_out_helper (const String& uuid, int client, uint32 context) {
1073 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1075 if (it != m_helper_client_index.end ()) {
1076 uint32 ctx = get_helper_ic (client, context);
1077 m_panel_agent_manager.focus_out_helper (it->second.id, ctx, uuid);
1081 void focus_in_helper (const String& uuid, int client, uint32 context) {
1082 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1084 if (it != m_helper_client_index.end ()) {
1085 uint32 ctx = get_helper_ic (client, context);
1086 m_panel_agent_manager.focus_in_helper (it->second.id, ctx, uuid);
1090 bool show_helper (const String& uuid, char* data, size_t& len, uint32 ctx) {
1091 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1093 if (it != m_helper_client_index.end ()) {
1094 Socket client_socket (it->second.id);
1095 m_panel_agent_manager.show_helper (it->second.id, ctx, uuid, data, len);
1099 LOGW ("Can't find %s", m_current_helper_uuid.c_str ());
1104 void hide_helper (const String& uuid, uint32 ctx = 0) {
1105 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1107 if (it != m_helper_client_index.end ()) {
1112 get_focused_context (client, context);
1113 ctx = get_helper_ic (client, context);
1116 m_panel_agent_manager.hide_helper (it->second.id, ctx, uuid);
1120 bool set_helper_mode (const String& uuid, uint32& mode) {
1121 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1123 if (it != m_helper_client_index.end ()) {
1127 get_focused_context (client, context);
1128 ctx = get_helper_ic (client, context);
1129 m_panel_agent_manager.set_helper_mode (it->second.id, ctx, uuid, mode);
1136 bool set_helper_language (const String& uuid, uint32& language) {
1137 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1139 if (it != m_helper_client_index.end ()) {
1143 get_focused_context (client, context);
1144 ctx = get_helper_ic (client, context);
1145 m_panel_agent_manager.set_helper_language (it->second.id, ctx, uuid, language);
1152 bool set_helper_imdata (const String& uuid, const char* imdata, size_t& len) {
1153 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1155 if (it != m_helper_client_index.end ()) {
1159 get_focused_context (client, context);
1160 ctx = get_helper_ic (client, context);
1161 m_panel_agent_manager.set_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1168 bool set_helper_return_key_type (const String& uuid, int type) {
1169 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1171 if (it != m_helper_client_index.end ()) {
1175 get_focused_context (client, context);
1176 ctx = get_helper_ic (client, context);
1177 m_panel_agent_manager.set_helper_return_key_type (it->second.id, ctx, uuid, type);
1184 bool get_helper_return_key_type (const String& uuid, uint32& type) {
1185 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1187 if (it != m_helper_client_index.end ()) {
1191 get_focused_context (client, context);
1192 ctx = get_helper_ic (client, context);
1193 m_panel_agent_manager.get_helper_return_key_type (it->second.id, ctx, uuid, type);
1200 bool set_helper_return_key_disable (const String& uuid, bool disabled) {
1201 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1203 if (it != m_helper_client_index.end ()) {
1207 get_focused_context (client, context);
1208 ctx = get_helper_ic (client, context);
1209 m_panel_agent_manager.set_helper_return_key_disable (it->second.id, ctx, uuid, disabled);
1216 bool get_helper_return_key_disable (const String& uuid, uint32& disabled) {
1217 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1219 if (it != m_helper_client_index.end ()) {
1223 get_focused_context (client, context);
1224 ctx = get_helper_ic (client, context);
1225 m_panel_agent_manager.get_helper_return_key_disable (it->second.id, ctx, uuid, disabled);
1232 bool set_helper_layout (const String& uuid, uint32& layout) {
1233 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1235 if (it != m_helper_client_index.end ()) {
1239 get_focused_context (client, context);
1240 ctx = get_helper_ic (client, context);
1241 m_panel_agent_manager.set_helper_layout (it->second.id, ctx, uuid, layout);
1248 bool set_helper_input_mode (const String& uuid, uint32& mode) {
1249 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1251 if (it != m_helper_client_index.end ()) {
1255 get_focused_context (client, context);
1256 ctx = get_helper_ic (client, context);
1257 m_panel_agent_manager.set_helper_input_mode (it->second.id, ctx, uuid, mode);
1264 bool set_helper_input_hint (const String& uuid, uint32& hint) {
1265 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1267 if (it != m_helper_client_index.end ()) {
1271 get_focused_context (client, context);
1272 ctx = get_helper_ic (client, context);
1273 m_panel_agent_manager.set_helper_input_hint (it->second.id, ctx, uuid, hint);
1280 bool set_helper_bidi_direction (const String& uuid, uint32& direction) {
1281 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1283 if (it != m_helper_client_index.end ()) {
1287 get_focused_context (client, context);
1288 ctx = get_helper_ic (client, context);
1289 m_panel_agent_manager.set_helper_bidi_direction (it->second.id, ctx, uuid, direction);
1296 bool set_helper_caps_mode (const String& uuid, uint32& mode) {
1297 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1299 if (it != m_helper_client_index.end ()) {
1303 get_focused_context (client, context);
1304 ctx = get_helper_ic (client, context);
1305 m_panel_agent_manager.set_helper_caps_mode (it->second.id, ctx, uuid, mode);
1312 int get_client_pid(int client_id)
1314 Socket client_socket(client_id);
1316 int sockfd = client_socket.get_id();
1318 socklen_t len = sizeof(struct ucred);
1319 if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) == 0) {
1320 LOGI("client pid : %u", ucred.pid);
1323 LOGW("Failed to get socket infomation");
1330 bool show_helper_option_window (const String& uuid, int caller_pid) {
1331 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1333 if (it != m_helper_client_index.end ()) {
1337 get_focused_context (client, context);
1338 ctx = get_helper_ic (client, context);
1340 if (!m_signal_launch_option_application (uuid)) {
1341 LOGD ("call show helper option");
1342 int ime_pid = get_client_pid(it->second.id);
1343 LOGD ("parent : %d, client : %d", caller_pid, ime_pid);
1344 m_panel_agent_manager.show_helper_option_window (it->second.id, ctx, uuid, caller_pid, ime_pid);
1345 m_panel_agent_manager.set_transient_for (caller_pid, ime_pid);
1354 bool resume_helper_option_window (const String& uuid) {
1355 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1357 if (it != m_helper_client_index.end ()) {
1361 get_focused_context (client, context);
1362 ctx = get_helper_ic (client, context);
1363 m_panel_agent_manager.resume_helper_option_window (it->second.id, ctx, uuid);
1370 bool set_helper_keyboard_mode (const String& uuid, uint32& mode) {
1371 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1373 if (it != m_helper_client_index.end ()) {
1377 get_focused_context (client, context);
1378 ctx = get_helper_ic (client, context);
1379 m_panel_agent_manager.set_helper_keyboard_mode (it->second.id, ctx, uuid, mode);
1386 bool set_helper_prediction_hint (const String& uuid, String prediction_hint) {
1387 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1389 if (it != m_helper_client_index.end ()) {
1393 get_focused_context (client, context);
1394 ctx = get_helper_ic (client, context);
1395 m_panel_agent_manager.set_helper_prediction_hint (it->second.id, ctx, uuid, prediction_hint);
1402 bool set_helper_mime_type (const String& uuid, String mime_type) {
1403 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1405 if (it != m_helper_client_index.end ()) {
1409 get_focused_context (client, context);
1410 ctx = get_helper_ic (client, context);
1411 m_panel_agent_manager.set_helper_mime_type (it->second.id, ctx, uuid, mime_type);
1418 bool finalize_content_helper (const String& uuid, String text, uint32 cursor_pos) {
1419 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1421 if (it != m_helper_client_index.end ()) {
1425 get_focused_context (client, context);
1426 ctx = get_helper_ic (client, context);
1427 m_panel_agent_manager.finalize_content_helper (it->second.id, ctx, uuid, text, cursor_pos);
1434 bool set_helper_prediction_hint_data (const String& uuid, String key, String value) {
1435 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1437 if (it != m_helper_client_index.end ()) {
1441 get_focused_context (client, context);
1442 ctx = get_helper_ic (client, context);
1443 m_panel_agent_manager.set_helper_prediction_hint_data (it->second.id, ctx, uuid, key, value);
1450 bool set_helper_optimization_hint(const String& uuid, uint32& hint) {
1451 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1453 if (it != m_helper_client_index.end()) {
1457 get_focused_context(client, context);
1458 ctx = get_helper_ic(client, context);
1459 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, uuid, hint);
1466 bool set_helper_enable (const String& uuid, uint32 enabled) {
1467 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1469 if (it != m_helper_client_index.end ()) {
1473 get_focused_context (client, context);
1474 ctx = get_helper_ic (client, context);
1475 m_panel_agent_manager.set_helper_enable (it->second.id, ctx, uuid, enabled);
1482 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
1483 void show_isf_panel (int client_id) {
1484 SCIM_DEBUG_MAIN (4) << "InfoManager::show_isf_panel ()\n";
1485 m_signal_show_panel ();
1488 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
1489 bool send_remote_input_message (int client_id, char* buf, size_t len) {
1490 SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_input_message ()\n";
1492 if (buf && len > 0) {
1494 m_signal_remoteinput_send_input_message (msg, true);
1501 void send_remote_surrounding_text (const char* text, uint32 cursor) {
1502 SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_surrounding_text ()\n";
1504 m_signal_remoteinput_send_surrounding_text (cursor, text);
1507 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
1508 void hide_isf_panel (int client_id) {
1509 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_isf_panel ()\n";
1510 m_signal_hide_panel ();
1513 //ISM_TRANS_CMD_SHOW_ISE_PANEL
1514 void show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len) {
1515 SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_panel ()\n";
1516 m_reshow_needed = true;
1517 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
1518 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1519 LOGD ("prepare to show ISE %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
1521 m_show_request_client_id = client_id;
1522 m_active_client_id = client_id;
1523 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1525 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
1526 uint32 ctx = get_helper_ic (client, context);
1527 ret = show_helper (m_current_helper_uuid, data, len, ctx);
1530 /* Save ISE context for ISE panel re-showing */
1531 /* The size of data can be bigger than Ise_Context size if there is IMDATA. */
1532 if (data && len > 0) {
1533 delete_imdata_buffer ();
1534 delete_ise_context_buffer ();
1535 m_ise_context_buffer = new char [len];
1536 if (m_ise_context_buffer) {
1537 m_ise_context_length = len;
1538 memcpy (m_ise_context_buffer, data, m_ise_context_length);
1543 m_signal_show_ise ();
1545 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
1546 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
1547 if (launch_ise_on_request || !enable_auto_restart) {
1548 m_signal_connect_set_preloading_ise (false);
1549 m_signal_start_default_ise ();
1554 //ISM_TRANS_CMD_HIDE_ISE_PANEL
1555 void hide_ise_panel (int client_id, uint32 client, uint32 context) {
1556 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_ise_panel ()\n";
1557 LOGD ("prepare to hide ISE, %d %d", client_id, m_show_request_client_id);
1558 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1560 m_reshow_needed = false;
1561 if (m_panel_client_map[client_id] == m_current_socket_client || client_id == m_show_request_client_id) {
1562 // && (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
1564 uint32 focused_context;
1565 get_focused_context (focused_client, focused_context);
1567 if (focused_client == -1 && m_active_client_id != -1) {
1568 focused_client = m_panel_client_map[m_active_client_id];
1569 focused_context = 0;
1572 m_signal_hide_ise ();
1576 void hide_helper_ise (void) {
1579 uint32 focused_context;
1580 get_focused_context (focused_client, focused_context);
1581 m_panel_agent_manager.hide_helper_ise (focused_client, focused_context);
1583 m_signal_hide_ise ();
1587 void prelaunch_helper_ise (void) {
1588 SCIM_DEBUG_MAIN (4) << "InfoManager::prelaunch_helper_ise ()\n";
1591 * Currently the SHOW_PREPARE hint is delivered only to the already-running ISEs.
1592 * If the newly launched ise also has to be notified of given optimization hint,
1593 * we'll need to mark the hint somewhere and send the message when a newly launched
1594 * ise connects to the panel.
1596 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1597 if (it != m_helper_client_index.end()) {
1601 get_focused_context(client, context);
1602 ctx = get_helper_ic(client, context);
1603 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, m_current_helper_uuid, ISE_OPTIMIZATION_HINT_SHOW_PREPARE);
1606 m_signal_connect_set_preloading_ise (true);
1607 m_signal_start_default_ise();
1610 void set_default_ise (const DEFAULT_ISE_T& ise) {
1611 LOGD ("set default ise : %s", ise.uuid.c_str());
1612 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), ise.uuid);
1613 scim_global_config_flush ();
1616 void set_should_shared_ise (const bool should_shared_ise) {
1617 m_should_shared_ise = should_shared_ise;
1619 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
1620 bool process_key_event (KeyEvent& key, uint32 serial, uint32 keycode) {
1621 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1623 if (m_is_ise_alive == false)
1626 if (it != m_helper_client_index.end ()) {
1630 get_focused_context (client, context);
1631 ctx = get_helper_ic (client, context);
1632 return m_panel_agent_manager.process_key_event (it->second.id, ctx, m_current_helper_uuid, key, serial, keycode);
1638 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
1639 bool process_input_device_event(int client_id, uint32 type, const char *data, size_t len, _OUT_ uint32& result) {
1640 SCIM_DEBUG_MAIN(4) << "InfoManager::process_input_device_event ()\n";
1641 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1643 if (it != m_helper_client_index.end()) {
1647 get_focused_context(client, context);
1648 ctx = get_helper_ic(client, context);
1649 return m_panel_agent_manager.process_input_device_event(it->second.id, ctx, m_current_helper_uuid, type, data, len, result);
1655 bool get_helper_geometry (String& uuid, struct rectinfo& info) {
1656 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1658 if (it != m_helper_client_index.end ()) {
1662 get_focused_context (client, context);
1663 ctx = get_helper_ic (client, context);
1664 return m_panel_agent_manager.get_helper_geometry (it->second.id, ctx, uuid, info);
1670 bool get_helper_imdata (String& uuid, char** imdata, size_t& len) {
1671 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1673 if (it != m_helper_client_index.end ()) {
1677 get_focused_context (client, context);
1678 ctx = get_helper_ic (client, context);
1679 m_panel_agent_manager.get_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1686 bool get_helper_layout (String& uuid, uint32& layout) {
1687 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1689 if (it != m_helper_client_index.end ()) {
1693 get_focused_context (client, context);
1694 ctx = get_helper_ic (client, context);
1695 m_panel_agent_manager.get_helper_layout (it->second.id, ctx, uuid, layout);
1701 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
1702 void get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info) {
1703 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1704 m_signal_get_input_panel_geometry (info);
1706 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
1707 void get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info) {
1708 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1709 m_signal_get_candidate_geometry (info);
1711 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
1712 void get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len) {
1713 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1714 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
1715 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1717 if (it != m_helper_client_index.end ()) {
1720 get_focused_context (client, context);
1721 uint32 ctx = get_helper_ic (client, context);
1722 m_panel_agent_manager.get_ise_language_locale (it->second.id, ctx, m_current_helper_uuid, data, len);
1727 void get_current_ise_geometry (rectinfo& rect) {
1728 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
1731 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1732 ret = get_helper_geometry (m_current_helper_uuid, rect);
1742 void set_ise_mode (int client_id, uint32 mode) {
1743 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_mode ()\n";
1745 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1746 set_helper_mode (m_current_helper_uuid, mode);
1748 //ISM_TRANS_CMD_SET_LAYOUT
1749 void set_ise_layout (int client_id, uint32 layout) {
1750 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_layout ()\n";
1751 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1752 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1753 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
1755 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1756 set_helper_layout (m_current_helper_uuid, layout);
1758 //ISM_TRANS_CMD_SET_INPUT_MODE
1759 void set_ise_input_mode (int client_id, uint32 input_mode) {
1760 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_mode ()\n";
1762 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1763 set_helper_input_mode (m_current_helper_uuid, input_mode);
1765 //ISM_TRANS_CMD_SET_INPUT_HINT
1766 void set_ise_input_hint (int client_id, uint32 input_hint) {
1767 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_hint ()\n";
1768 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1769 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1770 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(input_hint);
1772 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1773 set_helper_input_hint (m_current_helper_uuid, input_hint);
1775 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
1776 void update_ise_bidi_direction (int client_id, uint32 bidi_direction) {
1777 SCIM_DEBUG_MAIN (4) << "InfoManager::update_ise_bidi_direction ()\n";
1778 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1779 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1780 iseContext->bidi_direction = static_cast<Ecore_IMF_BiDi_Direction>(bidi_direction);
1782 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1783 set_helper_bidi_direction (m_current_helper_uuid, bidi_direction);
1785 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
1786 void set_ise_language (int client_id, uint32 language) {
1787 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_language ()\n";
1788 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1789 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1790 iseContext->language = static_cast<Ecore_IMF_Input_Panel_Lang>(language);
1792 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1793 set_helper_language (m_current_helper_uuid, language);
1795 //ISM_TRANS_CMD_SET_ISE_IMDATA
1796 void set_ise_imdata (int client_id, const char* imdata, size_t len) {
1797 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_imdata ()\n";
1799 delete_imdata_buffer ();
1800 m_imdata_buffer = new char [len];
1801 if (m_imdata_buffer) {
1802 m_imdata_length = len;
1803 memcpy (m_imdata_buffer, imdata, m_imdata_length);
1805 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1806 set_helper_imdata (m_current_helper_uuid, imdata, len);
1808 //ISM_TRANS_CMD_GET_ISE_IMDATA
1809 bool get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len) {
1810 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_imdata ()\n";
1813 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1814 ret = get_helper_imdata (m_current_helper_uuid, imdata, len);
1818 //ISM_TRANS_CMD_GET_LAYOUT
1819 bool get_ise_layout (int client_id, _OUT_ uint32& layout) {
1820 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_layout ()\n";
1823 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1824 ret = get_helper_layout (m_current_helper_uuid, layout);
1828 //ISM_TRANS_CMD_GET_ISE_STATE
1829 void get_ise_state (int client_id, _OUT_ int& state) {
1830 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1831 m_signal_get_ise_state (state);
1833 //ISM_TRANS_CMD_GET_ACTIVE_ISE
1834 void get_active_ise (int client_id, _OUT_ String& default_uuid) {
1835 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1836 default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1838 //ISM_TRANS_CMD_GET_ISE_LIST
1839 void get_ise_list (int client_id, _OUT_ std::vector<String>& strlist) {
1840 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_list ()\n";
1841 m_signal_get_ise_list (strlist);
1843 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
1844 void get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info) {
1845 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_helper_ise_info ()\n";
1846 m_signal_get_all_helper_ise_info (info);
1848 //1 Check if the current IME's option (setting) is available or not.
1849 for (uint32 i = 0; i < info.appid.size (); i++) {
1850 if (m_current_helper_uuid.compare (info.appid [i]) == 0) { // Find the current IME
1851 // If the current IME's "has_option" is unknown (-1), get it through ISM_TRANS_CMD_CHECK_OPTION_WINDOW command.
1852 // And it's saved to ime_info DB. Then next time this will be skipped.
1853 if (info.has_option [i] >= 2) {
1854 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1856 if (it != m_helper_client_index.end ()) {
1859 get_focused_context (client, context);
1860 uint32 ctx = get_helper_ic (client, context);
1861 uint32 avail = static_cast<uint32> (-1);
1862 m_panel_agent_manager.check_option_window (it->second.id, ctx, m_current_helper_uuid, avail);
1865 String setting_app = isf_pkg_get_setting_app (m_current_helper_uuid);
1866 if (setting_app.length () > 0)
1871 info.has_option [i] = avail;
1872 // Update "has_option" column of ime_info DB and global variable.
1873 m_signal_set_has_option_helper_ise_info (info.appid [i], static_cast<bool> (avail));
1880 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
1881 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1882 void set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled) {
1883 SCIM_DEBUG_MAIN (4) << "InfoManager::set_enable_helper_ise_info ()\n";
1884 m_signal_set_enable_helper_ise_info (appid, static_cast<bool> (is_enabled));
1886 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
1887 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1888 void show_helper_ise_list (int client_id) {
1889 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_list ()\n";
1890 m_signal_show_helper_ise_list ();
1892 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
1893 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1894 void show_helper_ise_selector (int client_id) {
1895 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_selector ()\n";
1896 m_signal_show_helper_ise_selector ();
1898 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
1900 void is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled) {
1901 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1903 m_signal_is_helper_ise_enabled (strAppid, _nEnabled);
1904 nEnabled = (uint32)_nEnabled;
1906 //ISM_TRANS_CMD_GET_ISE_INFORMATION
1907 void get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
1908 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName) {
1909 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1910 m_signal_get_ise_information (strUuid, strName, strLanguage, nType, nOption, strModuleName);
1915 void get_language_list (int client_id, _OUT_ std::vector<String>& strlist) {
1916 SCIM_DEBUG_MAIN (4) << "InfoManager::get_language_list ()\n";
1917 m_signal_get_language_list (strlist);
1920 void get_all_language (int client_id, _OUT_ std::vector<String>& strlist) {
1921 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_language ()\n";
1922 m_signal_get_all_language (strlist);
1927 void get_ise_language (int client_id, char* buf, size_t len, _OUT_ std::vector<String>& strlist) {
1928 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_language ()\n";
1929 m_signal_get_ise_language (buf, strlist);
1931 //ISM_TRANS_CMD_RESET_ISE_OPTION
1932 //reply SCIM_TRANS_CMD_OK
1933 bool reset_ise_option (int client_id) {
1934 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_ise_option ()\n";
1938 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
1940 if (it != m_client_context_uuids.end ()) {
1941 get_imengine_client_context (it->first, client, context);
1945 m_panel_agent_manager.reset_ise_option (client, context);
1952 bool find_active_ise_by_uuid (String uuid) {
1953 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
1955 for (; iter != m_helper_info_repository.end (); iter++) {
1956 if (!uuid.compare (iter->second.uuid))
1962 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
1964 bool set_active_ise_by_uuid (int client_id, char* buf, size_t len) {
1965 SCIM_DEBUG_MAIN (4) << "InfoManager::set_active_ise_by_uuid ()\n";
1974 if (!m_signal_get_ise_info_by_uuid (uuid, info)) {
1978 if (info.type == TOOLBAR_KEYBOARD_MODE) {
1979 m_signal_set_active_ise_by_uuid (uuid, 1);
1982 m_signal_set_active_ise_by_uuid (uuid, 1);
1987 if (find_active_ise_by_uuid (uuid)) {
1990 m_ise_pending_repository[uuid] = client_id;
1994 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
1995 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1996 void set_initial_ise_by_uuid (int client_id, char* buf, size_t len) {
1997 SCIM_DEBUG_MAIN (4) << "InfoManager::set_initial_ise_by_uuid ()\n";
2004 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (uuid));
2005 scim_global_config_flush ();
2007 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
2008 void set_ise_return_key_type (int client_id, uint32 type) {
2009 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2010 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2011 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2012 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(type);
2014 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2015 set_helper_return_key_type (m_current_helper_uuid, type);
2017 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
2019 bool get_ise_return_key_type (int client_id, _OUT_ uint32& type) {
2020 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2023 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2024 ret = get_helper_return_key_type (m_current_helper_uuid, type);
2028 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
2029 void set_ise_return_key_disable (int client_id, uint32 disabled) {
2030 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2031 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2032 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2033 iseContext->return_key_disabled = static_cast<Eina_Bool>(disabled);
2035 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2036 set_helper_return_key_disable (m_current_helper_uuid, disabled);
2038 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
2039 bool get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled) {
2040 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2043 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2044 ret = get_helper_return_key_disable (m_current_helper_uuid, disabled);
2049 void reset_helper_context (const String& uuid) {
2050 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2052 if (it != m_helper_client_index.end ()) {
2056 get_focused_context (client, context);
2057 ctx = get_helper_ic (client, context);
2058 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
2064 void reset_ise_context (int client_id) {
2065 SCIM_DEBUG_MAIN (4) << "InfoManager::reset_ise_context ()\n";
2067 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2068 reset_helper_context (m_current_helper_uuid);
2070 //ISM_TRANS_CMD_SET_CAPS_MODE
2071 void set_ise_caps_mode (int client_id, uint32 mode) {
2072 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_caps_mode ()\n";
2073 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2074 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2075 iseContext->caps_mode = static_cast<Eina_Bool>(mode);
2077 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2078 set_helper_caps_mode (m_current_helper_uuid, mode);
2081 //SCIM_TRANS_CMD_RELOAD_CONFIG
2082 void reload_config (void) {
2083 SCIM_DEBUG_MAIN (1) << "InfoManager::reload_config ()\n";
2086 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2087 if (it->second.type == FRONTEND_CLIENT || it->second.type == HELPER_CLIENT) {
2088 m_panel_agent_manager.reload_config (it->first);
2096 SCIM_DEBUG_MAIN (1) << "InfoManager::exit ()\n";
2099 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2100 m_panel_agent_manager.exit (it->first, 0);
2108 void update_ise_list (std::vector<String>& strList) {
2109 /* request PanelClient to update keyboard ise list */
2110 update_keyboard_ise_list ();
2112 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
2113 void will_show_ack (int client_id) {
2114 SCIM_DEBUG_MAIN (4) << "InfoManager::will_show_ack ()\n";
2115 m_signal_will_show_ack ();
2117 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
2118 void will_hide_ack (int client_id) {
2119 SCIM_DEBUG_MAIN (4) << "InfoManager::will_hide_ack ()\n";
2120 m_signal_will_hide_ack ();
2122 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
2123 void reset_default_ise (int client_id) {
2124 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2125 String initial_ise = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2127 if (initial_ise.length () > 0)
2128 m_signal_set_active_ise_by_uuid (initial_ise, 1);
2130 std::cerr << "Read SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID is failed!!!\n";
2132 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
2133 void set_keyboard_mode (int client_id, uint32 mode) {
2134 SCIM_DEBUG_MAIN (4) << "InfoManager::set_keyboard_mode ()\n";
2135 m_signal_set_keyboard_mode (mode);
2136 set_ise_keyboard_mode (client_id, mode);
2138 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
2139 void candidate_will_hide_ack (int client_id) {
2140 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "\n";
2141 m_signal_candidate_will_hide_ack ();
2144 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
2145 void get_active_helper_option (int client_id, _OUT_ uint32& option) {
2146 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2147 option = get_current_helper_option ();
2149 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
2150 void show_ise_option_window (int client_id, int caller_pid) {
2151 SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_option_window ()\n";
2152 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2153 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2154 LOGD ("prepare to show ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2156 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2157 show_helper_option_window (m_current_helper_uuid, caller_pid);
2161 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
2162 void get_ise_setting_appid (int client_id, _OUT_ String &ime_setting_appid) {
2163 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2164 m_signal_get_ise_setting_appid (m_current_helper_uuid, ime_setting_appid);
2167 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
2168 void resume_ise_option_window (int client_id) {
2169 SCIM_DEBUG_MAIN (4) << "InfoManager::resume_ise_option_window ()\n";
2170 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2171 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2172 LOGD ("prepare to resume ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2174 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2175 resume_helper_option_window (m_current_helper_uuid);
2179 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
2180 void set_ise_keyboard_mode (int client_id, uint32 mode) {
2181 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_keyboard_mode ()\n";
2182 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2183 set_helper_keyboard_mode (m_current_helper_uuid, mode);
2186 //ISM_TRANS_CMD_SET_PREDICTION_HINT
2187 void set_prediction_hint (int client_id, String prediction_hint) {
2188 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint ()\n";
2189 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2190 set_helper_prediction_hint (m_current_helper_uuid, prediction_hint);
2193 //ISM_TRANS_CMD_SET_MIME_TYPE
2194 void set_ise_mime_type (int client_id, String mime_type) {
2195 SCIM_DEBUG_MAIN (4) << "InfoManager::set_mime_type ()\n";
2196 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2197 set_helper_mime_type (m_current_helper_uuid, mime_type);
2200 //ISM_TRANS_CMD_FINALIZE_CONTENT
2201 void finalize_content (int client_id, String text, uint32 cursor_pos) {
2202 SCIM_DEBUG_MAIN (4) << "InfoManager::finalize_content ()\n";
2203 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2204 finalize_content_helper (m_current_helper_uuid, text, cursor_pos);
2207 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
2208 void set_prediction_hint_data (int client_id, String key, String value) {
2209 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint_data ()\n";
2210 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2211 set_helper_prediction_hint_data (m_current_helper_uuid, key, value);
2214 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
2215 void set_optimization_hint(int client_id, uint32 hint) {
2216 SCIM_DEBUG_MAIN(4) << "InfoManager::set_optimization_hint ()\n";
2217 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2218 set_helper_optimization_hint(m_current_helper_uuid, hint);
2221 //ISM_TRANS_CMD_SET_ISE_ENABLE
2222 void set_ise_enable (int client_id, uint32 enabled) {
2223 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_enable ()\n";
2224 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2225 set_helper_enable (m_current_helper_uuid, enabled);
2228 //ISM_TRANS_CMD_EXPAND_CANDIDATE
2229 void expand_candidate () {
2231 m_signal_expand_candidate ();
2234 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
2235 void contract_candidate () {
2237 m_signal_contract_candidate ();
2239 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
2240 void get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info) {
2241 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2243 m_signal_get_recent_ise_geometry (angle, info);
2246 bool check_privilege_by_sockfd (int client_id, const String& privilege) {
2247 return m_signal_check_privilege_by_sockfd (client_id, privilege);
2250 bool remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
2252 SCIM_DEBUG_MAIN(1) << "PanelAgent::update_preedit_string ()\n";
2258 get_focused_context (client, context);
2260 m_panel_agent_manager.remote_update_preedit_string (client, context, str, str, attrs, caret);
2268 bool remoteinput_commit_string (const WideString &str)
2270 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_commit_string ()\n";
2276 get_focused_context (client, context);
2278 m_panel_agent_manager.remote_commit_string (client, context, str);
2286 bool remoteinput_send_key_event (const KeyEvent &key)
2288 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_send_key_event ()\n";
2292 get_focused_context (client, context);
2294 m_panel_agent_manager.remote_send_key_event (client, context, key);
2300 bool remoteinput_forward_key_event (const KeyEvent &key)
2302 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_forward_key_event ()\n";
2306 get_focused_context (client, context);
2308 m_panel_agent_manager.remote_forward_key_event (client, context, key);
2314 bool remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
2316 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_delete_surrounding_text ()\n";
2320 get_focused_context (client, context);
2322 m_panel_agent_manager.remote_delete_surrounding_text (client, context, offset, len);
2328 bool remoteinput_set_cursor_position (uint32 cursor)
2330 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_set_cursor_position ()\n";
2334 get_focused_context (client, context);
2336 m_panel_agent_manager.socket_helper_set_selection (client, context, cursor, cursor);
2342 void reshow_input_panel () {
2343 /* Check whether application is already focus_in */
2344 if (m_refocus_needed) {
2345 LOGD ("Re-focus in");
2346 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
2348 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
2349 reset_keyboard_ise ();
2352 /* Check whether ISE panel is already shown */
2353 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0 && m_reshow_needed) {
2354 LOGD ("Re-show input_panel");
2355 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
2358 uint32 focused_context;
2360 get_focused_context (focused_client, focused_context);
2361 if (focused_client == -1 && m_active_client_id != -1) {
2362 focused_client = m_panel_client_map[m_active_client_id];
2363 focused_context = 0;
2366 m_panel_agent_manager.request_ise_reshow (focused_client, focused_context);
2367 m_panel_agent_manager.update_entry_metadata (focused_client, focused_context);
2368 uint32 ctx = get_helper_ic (focused_client, focused_context);
2369 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
2371 m_signal_show_ise ();
2373 if (m_imdata_buffer && m_imdata_length > 0 && m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2374 set_helper_imdata (m_current_helper_uuid, m_imdata_buffer, m_imdata_length);
2379 void request_ise_terminate () {
2380 if (m_client_context_uuids.size () == 0) {
2381 LOGD("Request to terminate IME");
2382 m_signal_stop_default_ise (true);
2386 void set_floating_mode (uint32 floating_mode) {
2388 uint32 focused_context;
2389 get_focused_context (focused_client, focused_context);
2390 ClientInfo client_info = socket_get_client_info (focused_client);
2392 if (client_info.type == FRONTEND_CLIENT) {
2393 m_panel_agent_manager.set_floating_mode (focused_client, focused_context, floating_mode);
2397 void set_floating_drag_enabled (uint32 enabled) {
2399 uint32 focused_context;
2400 get_focused_context (focused_client, focused_context);
2401 ClientInfo client_info = socket_get_client_info (focused_client);
2403 if (client_info.type == FRONTEND_CLIENT) {
2404 m_panel_agent_manager.set_floating_drag_enabled (focused_client, focused_context, enabled);
2408 Connection signal_connect_turn_on (InfoManagerSlotVoid* slot) {
2409 return m_signal_turn_on.connect (slot);
2412 Connection signal_connect_turn_off (InfoManagerSlotVoid* slot) {
2413 return m_signal_turn_off.connect (slot);
2416 Connection signal_connect_show_panel (InfoManagerSlotVoid* slot) {
2417 return m_signal_show_panel.connect (slot);
2420 Connection signal_connect_hide_panel (InfoManagerSlotVoid* slot) {
2421 return m_signal_hide_panel.connect (slot);
2424 Connection signal_connect_update_screen (InfoManagerSlotInt* slot) {
2425 return m_signal_update_screen.connect (slot);
2428 Connection signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot) {
2429 return m_signal_update_spot_location.connect (slot);
2432 Connection signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot) {
2433 return m_signal_update_factory_info.connect (slot);
2436 Connection signal_connect_start_default_ise (InfoManagerSlotVoid* slot) {
2437 return m_signal_start_default_ise.connect (slot);
2440 Connection signal_connect_stop_default_ise (InfoManagerSlotBool* slot) {
2441 return m_signal_stop_default_ise.connect (slot);
2444 Connection signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot) {
2445 return m_signal_set_candidate_ui.connect (slot);
2448 Connection signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot) {
2449 return m_signal_get_candidate_ui.connect (slot);
2452 Connection signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot) {
2453 return m_signal_set_candidate_position.connect (slot);
2456 Connection signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot) {
2457 return m_signal_get_candidate_geometry.connect (slot);
2460 Connection signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot) {
2461 return m_signal_get_input_panel_geometry.connect (slot);
2464 Connection signal_connect_set_keyboard_ise (InfoManagerSlotString* slot) {
2465 return m_signal_set_keyboard_ise.connect (slot);
2468 Connection signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot) {
2469 return m_signal_get_keyboard_ise.connect (slot);
2472 Connection signal_connect_show_help (InfoManagerSlotString* slot) {
2473 return m_signal_show_help.connect (slot);
2476 Connection signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot) {
2477 return m_signal_show_factory_menu.connect (slot);
2480 Connection signal_connect_show_preedit_string (InfoManagerSlotVoid* slot) {
2481 return m_signal_show_preedit_string.connect (slot);
2484 Connection signal_connect_show_aux_string (InfoManagerSlotVoid* slot) {
2485 return m_signal_show_aux_string.connect (slot);
2488 Connection signal_connect_show_lookup_table (InfoManagerSlotVoid* slot) {
2489 return m_signal_show_lookup_table.connect (slot);
2492 Connection signal_connect_show_associate_table (InfoManagerSlotVoid* slot) {
2493 return m_signal_show_associate_table.connect (slot);
2496 Connection signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot) {
2497 return m_signal_hide_preedit_string.connect (slot);
2500 Connection signal_connect_hide_aux_string (InfoManagerSlotVoid* slot) {
2501 return m_signal_hide_aux_string.connect (slot);
2504 Connection signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot) {
2505 return m_signal_hide_lookup_table.connect (slot);
2508 Connection signal_connect_hide_associate_table (InfoManagerSlotVoid* slot) {
2509 return m_signal_hide_associate_table.connect (slot);
2512 Connection signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot) {
2513 return m_signal_update_preedit_string.connect (slot);
2516 Connection signal_connect_update_preedit_caret (InfoManagerSlotInt* slot) {
2517 return m_signal_update_preedit_caret.connect (slot);
2520 Connection signal_connect_recapture_string (InfoManagerSlotAttributeInt2String2* slot) {
2521 return m_signal_recapture_string.connect (slot);
2524 Connection signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot) {
2525 return m_signal_update_aux_string.connect (slot);
2528 Connection signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot) {
2529 return m_signal_update_lookup_table.connect (slot);
2532 Connection signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot) {
2533 return m_signal_update_associate_table.connect (slot);
2536 Connection signal_connect_register_properties (InfoManagerSlotPropertyList* slot) {
2537 return m_signal_register_properties.connect (slot);
2540 Connection signal_connect_update_property (InfoManagerSlotProperty* slot) {
2541 return m_signal_update_property.connect (slot);
2544 Connection signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot) {
2545 return m_signal_register_helper_properties.connect (slot);
2548 Connection signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot) {
2549 return m_signal_update_helper_property.connect (slot);
2552 Connection signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot) {
2553 return m_signal_register_helper.connect (slot);
2556 Connection signal_connect_remove_helper (InfoManagerSlotInt* slot) {
2557 return m_signal_remove_helper.connect (slot);
2560 Connection signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot) {
2561 return m_signal_set_active_ise_by_uuid.connect (slot);
2564 Connection signal_connect_focus_in (InfoManagerSlotVoid* slot) {
2565 return m_signal_focus_in.connect (slot);
2568 Connection signal_connect_focus_out (InfoManagerSlotVoid* slot) {
2569 return m_signal_focus_out.connect (slot);
2572 Connection signal_connect_expand_candidate (InfoManagerSlotVoid* slot) {
2573 return m_signal_expand_candidate.connect (slot);
2576 Connection signal_connect_contract_candidate (InfoManagerSlotVoid* slot) {
2577 return m_signal_contract_candidate.connect (slot);
2580 Connection signal_connect_select_candidate (InfoManagerSlotInt* slot) {
2581 return m_signal_select_candidate.connect (slot);
2584 Connection signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot) {
2585 return m_signal_get_ise_list.connect (slot);
2588 Connection signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot) {
2589 return m_signal_get_all_helper_ise_info.connect (slot);
2592 Connection signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot) {
2593 return m_signal_set_has_option_helper_ise_info.connect (slot);
2596 Connection signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot) {
2597 return m_signal_set_enable_helper_ise_info.connect (slot);
2600 Connection signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot) {
2601 return m_signal_show_helper_ise_list.connect (slot);
2604 Connection signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot) {
2605 return m_signal_show_helper_ise_selector.connect (slot);
2608 Connection signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot) {
2609 return m_signal_is_helper_ise_enabled.connect (slot);
2612 Connection signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot) {
2613 return m_signal_get_ise_information.connect (slot);
2616 Connection signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot) {
2617 return m_signal_get_keyboard_ise_list.connect (slot);
2620 Connection signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot) {
2621 return m_signal_update_ise_geometry.connect (slot);
2624 Connection signal_connect_get_language_list (InfoManagerSlotStringVector* slot) {
2625 return m_signal_get_language_list.connect (slot);
2628 Connection signal_connect_get_all_language (InfoManagerSlotStringVector* slot) {
2629 return m_signal_get_all_language.connect (slot);
2632 Connection signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot) {
2633 return m_signal_get_ise_language.connect (slot);
2636 Connection signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot) {
2637 return m_signal_get_ise_info_by_uuid.connect (slot);
2640 Connection signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot) {
2641 return m_signal_send_key_event.connect (slot);
2644 Connection signal_connect_accept_connection (InfoManagerSlotInt* slot) {
2645 return m_signal_accept_connection.connect (slot);
2648 Connection signal_connect_close_connection (InfoManagerSlotInt* slot) {
2649 return m_signal_close_connection.connect (slot);
2652 Connection signal_connect_exit (InfoManagerSlotVoid* slot) {
2653 return m_signal_exit.connect (slot);
2656 Connection signal_connect_transaction_start (InfoManagerSlotVoid* slot) {
2657 return m_signal_transaction_start.connect (slot);
2660 Connection signal_connect_transaction_end (InfoManagerSlotVoid* slot) {
2661 return m_signal_transaction_end.connect (slot);
2664 Connection signal_connect_lock (InfoManagerSlotVoid* slot) {
2665 return m_signal_lock.connect (slot);
2668 Connection signal_connect_unlock (InfoManagerSlotVoid* slot) {
2669 return m_signal_unlock.connect (slot);
2672 Connection signal_connect_update_input_context (InfoManagerSlotIntInt* slot) {
2673 return m_signal_update_input_context.connect (slot);
2676 Connection signal_connect_update_language_locale(InfoManagerSlotString* slot) {
2677 return m_signal_update_language_locale.connect(slot);
2680 Connection signal_connect_show_ise (InfoManagerSlotVoid* slot) {
2681 return m_signal_show_ise.connect (slot);
2684 Connection signal_connect_hide_ise (InfoManagerSlotVoid* slot) {
2685 return m_signal_hide_ise.connect (slot);
2688 Connection signal_connect_will_show_ack (InfoManagerSlotVoid* slot) {
2689 return m_signal_will_show_ack.connect (slot);
2692 Connection signal_connect_will_hide_ack (InfoManagerSlotVoid* slot) {
2693 return m_signal_will_hide_ack.connect (slot);
2696 Connection signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot) {
2697 return m_signal_set_keyboard_mode.connect (slot);
2700 Connection signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot) {
2701 return m_signal_candidate_will_hide_ack.connect (slot);
2704 Connection signal_connect_get_ise_state (InfoManagerSlotInt2* slot) {
2705 return m_signal_get_ise_state.connect (slot);
2708 Connection signal_connect_run_helper (InfoManagerSlotString3* slot)
2710 return m_signal_run_helper.connect (slot);
2713 Connection signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
2715 return m_signal_launch_option_application.connect (slot);
2718 Connection signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
2720 return m_signal_get_ise_setting_appid.connect (slot);
2723 Connection signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot) {
2724 return m_signal_get_recent_ise_geometry.connect (slot);
2727 Connection signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
2729 return m_signal_check_privilege_by_sockfd.connect (slot);
2732 Connection signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
2734 return m_signal_remoteinput_send_input_message.connect (slot);
2737 Connection signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
2739 return m_signal_remoteinput_send_surrounding_text.connect (slot);
2742 Connection signal_connect_set_preloading_ise (InfoManagerSlotBool* slot)
2744 return m_signal_connect_set_preloading_ise.connect (slot);
2747 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
2748 void register_panel_client (uint32 client_id, uint32 id) {
2749 m_panel_client_map [client_id] = (int)id;
2751 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
2752 void register_input_context (uint32 client_id, uint32 context, String uuid) {
2753 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2754 m_client_context_uuids [ctx] = uuid;
2756 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
2757 void remove_input_context (uint32 client_id, uint32 context) {
2758 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2759 m_client_context_uuids.erase (ctx);
2761 if (ctx == get_helper_ic (m_current_socket_client, m_current_client_context)) {
2763 m_current_socket_client = m_last_socket_client;
2764 m_current_client_context = m_last_client_context;
2765 m_current_context_uuid = m_last_context_uuid;
2766 m_last_socket_client = -1;
2767 m_last_client_context = 0;
2768 m_last_context_uuid = String ("");
2770 if (m_current_socket_client == -1) {
2772 socket_update_control_panel ();
2776 } else if (ctx == get_helper_ic (m_last_socket_client, m_last_client_context)) {
2778 m_last_socket_client = -1;
2779 m_last_client_context = 0;
2780 m_last_context_uuid = String ("");
2785 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
2786 void socket_reset_input_context (int client_id, uint32 context) {
2787 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_reset_input_context \n";
2789 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2790 socket_reset_helper_input_context (m_current_helper_uuid, m_panel_client_map[client_id], context);
2793 //SCIM_TRANS_CMD_FOCUS_IN
2794 void focus_in (int client_id, uint32 context, String uuid) {
2795 m_refocus_needed = true;
2796 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
2797 if (launch_ise_on_request) {
2798 m_signal_connect_set_preloading_ise (false);
2799 m_signal_start_default_ise ();
2802 m_signal_focus_in ();
2803 focus_in_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2804 SCIM_DEBUG_MAIN (2) << "PanelAgent::focus_in (" << client_id << "," << context << "," << uuid << ")\n";
2805 m_active_client_id = client_id;
2808 if (m_current_socket_client >= 0) {
2809 m_last_socket_client = m_current_socket_client;
2810 m_last_client_context = m_current_client_context;
2811 m_last_context_uuid = m_current_context_uuid;
2814 m_current_socket_client = m_panel_client_map[client_id];
2815 m_current_client_context = context;
2816 m_current_context_uuid = uuid;
2820 //SCIM_TRANS_CMD_FOCUS_OUT
2821 void focus_out (int client_id, uint32 context) {
2822 m_refocus_needed = false;
2823 m_signal_focus_out ();
2825 focus_out_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2827 if (m_current_socket_client >= 0) {
2828 m_last_socket_client = m_current_socket_client;
2829 m_last_client_context = m_current_client_context;
2830 m_last_context_uuid = m_current_context_uuid;
2833 m_current_socket_client = -1;
2834 m_current_client_context = 0;
2835 m_current_context_uuid = String ("");
2838 /* Release ISE context & IMDATA buffer */
2839 delete_imdata_buffer ();
2840 delete_ise_context_buffer ();
2843 //ISM_TRANS_CMD_TURN_ON_LOG
2844 void socket_turn_on_log (uint32 isOn) {
2846 DebugOutput::enable_debug (SCIM_DEBUG_AllMask);
2847 DebugOutput::set_verbose_level (7);
2848 SCIM_DEBUG_MAIN (4) << __func__ << " on\n";
2850 SCIM_DEBUG_MAIN (4) << __func__ << " off\n";
2851 DebugOutput::disable_debug (SCIM_DEBUG_AllMask);
2852 DebugOutput::set_verbose_level (0);
2856 uint32 focused_context;
2857 get_focused_context (focused_client, focused_context);
2859 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
2860 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2862 if (it != m_helper_client_index.end ()) {
2863 //uint32 ctx = get_helper_ic (focused_client, focused_context);
2865 //m_panel_agent_manager.socket_turn_on_log (it->second.id, ctx, m_current_helper_uuid, isOn);
2869 if (focused_client == -1) {
2870 std::cerr << __func__ << " get_focused_context is failed!!!\n";
2874 ClientInfo client_info = socket_get_client_info (focused_client);
2876 if (client_info.type == FRONTEND_CLIENT) {
2878 //m_panel_agent_manager.socket_turn_on_log (focused_client, focused_context, isOn);
2883 void add_client (int client_id, uint32 key, ClientType type) {
2884 LOGD ("id:%d, key:%d, type:%d", client_id, key, type);
2888 SCIM_DEBUG_MAIN (4) << "Add client to repository. Type=" << type << " key=" << key << "\n";
2890 m_client_repository [client_id] = info;
2892 if (info.type == HELPER_CLIENT || info.type == HELPER_ACT_CLIENT)
2893 m_is_ise_alive = true;
2895 if (info.type == IMCONTROL_ACT_CLIENT) {
2896 m_pending_active_imcontrol_id = client_id;
2897 } else if (info.type == IMCONTROL_CLIENT) {
2898 m_imcontrol_map [m_pending_active_imcontrol_id] = client_id;
2899 m_pending_active_imcontrol_id = -1;
2900 } else if (info.type == REMOTEINPUT_ACT_CLIENT) {
2901 m_current_send_remoteinput_id.push_back (client_id);
2902 } else if (info.type == REMOTEINPUT_CLIENT) {
2903 m_current_recv_remoteinput_id.push_back (client_id);
2906 LOGD ("%zu clients connecting", m_client_repository.size());
2911 void del_client (int client_id) {
2912 ClientRepository::iterator iter = m_client_repository.find(client_id);
2913 if (iter == m_client_repository.end()) {
2914 LOGW("The client with id %d does not exist in our client repository, returning", client_id);
2918 m_signal_close_connection (client_id);
2919 ClientInfo client_info = socket_get_client_info (client_id);
2920 m_client_repository.erase (client_id);
2921 LOGD ("id:%d, type:%d", client_id, client_info.type);
2922 #ifdef PANEL_SERVER_AUTO_EXIT
2923 /* Exit panel if there is no connected client anymore. */
2924 if (client_info.type != UNKNOWN_CLIENT && m_client_repository.size () == 0 && !m_should_resident) {
2925 SCIM_DEBUG_MAIN (4) << "Exit Socket Server Thread.\n";
2926 server->shutdown ();
2927 m_signal_exit.emit ();
2932 if (client_info.type == FRONTEND_CLIENT) {
2933 SCIM_DEBUG_MAIN (4) << "It's a FrontEnd client.\n";
2935 /* The focused client is closed. */
2936 if (m_current_socket_client == client_id) {
2937 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2938 hide_helper (m_current_helper_uuid);
2941 m_current_socket_client = -1;
2942 m_current_client_context = 0;
2943 m_current_context_uuid = String ("");
2945 socket_transaction_start ();
2947 socket_transaction_end ();
2950 if (m_last_socket_client == client_id) {
2952 m_last_socket_client = -1;
2953 m_last_client_context = 0;
2954 m_last_context_uuid = String ("");
2958 /* Erase all associated Client Context UUIDs. */
2959 std::vector <uint32> ctx_list;
2960 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
2962 for (; it != m_client_context_uuids.end (); ++it) {
2963 if ((it->first & 0xFFFF) == (client_id & 0xFFFF))
2964 ctx_list.push_back (it->first);
2967 for (size_t i = 0; i < ctx_list.size (); ++i)
2968 m_client_context_uuids.erase (ctx_list [i]);
2970 /* Erase all helperise info associated with the client */
2972 it = m_client_context_helper.begin ();
2974 for (; it != m_client_context_helper.end (); ++it) {
2975 if ((it->first & 0xFFFF) == (client_id & 0xFFFF)) {
2976 ctx_list.push_back (it->first);
2977 /* similar to stop_helper except that it will not call get_focused_context() */
2978 String uuid = it->second;
2980 if (m_helper_uuid_count.find (uuid) != m_helper_uuid_count.end ()) {
2981 uint32 count = m_helper_uuid_count[uuid];
2984 m_helper_uuid_count.erase (uuid);
2985 HelperClientIndex::iterator pise = m_helper_client_index.find (uuid);
2987 if (pise != m_helper_client_index.end ()) {
2988 stop_helper (uuid, pise->second.id, it->first);
2991 SCIM_DEBUG_MAIN (1) << "Stop HelperISE " << uuid << " ...\n";
2993 m_helper_uuid_count[uuid] = count - 1;
2994 focus_out_helper (uuid, (it->first & 0xFFFF), ((it->first >> 16) & 0x7FFF));
2995 SCIM_DEBUG_MAIN (1) << "Decrement usage count of HelperISE " << uuid
2996 << " to " << m_helper_uuid_count[uuid] << "\n";
3002 for (size_t i = 0; i < ctx_list.size (); ++i)
3003 m_client_context_helper.erase (ctx_list [i]);
3005 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
3007 for (; iter != m_helper_info_repository.end (); iter++) {
3008 if (!m_current_helper_uuid.compare (iter->second.uuid))
3009 if (! (iter->second.option & ISM_ISE_HIDE_IN_CONTROL_PANEL))
3010 socket_update_control_panel ();
3012 } else if (client_info.type == FRONTEND_ACT_CLIENT) {
3013 SCIM_DEBUG_MAIN (4) << "It's a FRONTEND_ACT_CLIENT client.\n";
3014 IntIntRepository::iterator iter2 = m_panel_client_map.find (client_id);
3016 if (iter2 != m_panel_client_map.end ())
3017 m_panel_client_map.erase (iter2);
3018 } else if (client_info.type == HELPER_CLIENT) {
3019 SCIM_DEBUG_MAIN (4) << "It's a Helper client.\n";
3021 HelperInfoRepository::iterator hiit = m_helper_info_repository.find (client_id);
3023 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
3024 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
3025 if (hiit != m_helper_info_repository.end ()) {
3026 bool restart = false;
3027 String uuid = hiit->second.uuid;
3028 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3030 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
3031 if ((hiit->second.option & SCIM_HELPER_AUTO_RESTART) &&
3032 (default_uuid.compare (uuid) == 0 || default_uuid.compare ("") == 0) &&
3033 (it != m_helper_client_index.end () && it->second.ref > 0)) {
3037 m_helper_client_index.erase (uuid);
3038 m_helper_info_repository.erase (hiit);
3040 m_signal_stop_default_ise (false);
3042 if ((m_refocus_needed || m_reshow_needed || !launch_ise_on_request) && enable_auto_restart)
3043 m_restart_needed = true;
3045 if (restart && !m_ise_exiting && m_restart_needed) {
3046 struct tms tiks_buf;
3047 static clock_t start_tiks = times (&tiks_buf);
3048 static clock_t clock_tiks = sysconf (_SC_CLK_TCK);
3049 clock_t curr_tiks = times (&tiks_buf);
3050 clock_t secs = (curr_tiks - start_tiks) / clock_tiks;
3051 //LOGE ("time second:%f", secs);
3052 static String restart_uuid;
3054 if (restart_uuid != uuid || secs > MIN_REPEAT_TIME) {
3055 scim_usleep (100000);
3059 get_focused_context(client, context);
3061 uint32 ic = get_helper_ic (client, context);
3063 /* Get the context uuid from the client context registration table. */
3065 ClientContextUUIDRepository::iterator it =
3066 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
3068 if (it != m_client_context_uuids.end ())
3069 ic_uuid = it->second;
3072 m_start_helper_ic_index[uuid].push_back(std::make_pair(ic, ic_uuid));
3073 m_signal_connect_set_preloading_ise (true);
3074 m_signal_run_helper (uuid, m_config_name, m_display_name);
3075 restart_uuid = uuid;
3076 LOGE ("Auto restart soft ISE:%s", uuid.c_str ());
3078 reset_default_ise (0);
3079 ISF_SAVE_LOG ("Auto restart is abnormal, reset default ISE");
3082 start_tiks = curr_tiks;
3086 m_ise_exiting = false;
3087 m_restart_needed = launch_ise_on_request ? false : true;
3089 socket_transaction_start ();
3090 m_signal_remove_helper (client_id);
3091 socket_transaction_end ();
3092 } else if (client_info.type == HELPER_ACT_CLIENT) {
3093 SCIM_DEBUG_MAIN (4) << "It's a Helper passive client.\n";
3095 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client_id);
3097 if (hiit != m_helper_active_info_repository.end ()) {
3098 if (hiit->second.uuid == m_current_helper_uuid)
3099 m_is_ise_alive = false;
3101 m_helper_active_info_repository.erase (hiit);
3105 } else if (client_info.type == IMCONTROL_ACT_CLIENT) {
3106 SCIM_DEBUG_MAIN (4) << "It's a IMCONTROL_ACT_CLIENT client.\n";
3107 IMControlRepository::iterator iter = m_imcontrol_repository.find (client_id);
3109 if (iter != m_imcontrol_repository.end ()) {
3110 int size = iter->second.info.size ();
3114 stop_helper ((iter->second.info)[i].uuid, (iter->second.count)[i], DEFAULT_CONTEXT_VALUE);
3116 if ((iter->second.info)[i].option & ISM_ISE_HIDE_IN_CONTROL_PANEL)
3117 m_current_helper_uuid = m_last_helper_uuid;
3122 m_imcontrol_repository.erase (iter);
3125 IntIntRepository::iterator iter2 = m_imcontrol_map.find (client_id);
3127 if (iter2 != m_imcontrol_map.end ())
3128 m_imcontrol_map.erase (iter2);
3129 } else if (client_info.type == REMOTEINPUT_ACT_CLIENT) {
3130 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_ACT_CLIENT client.\n";
3132 for (unsigned int i = 0; i < m_current_send_remoteinput_id.size (); i++) {
3133 if (m_current_send_remoteinput_id.at (i) == client_id) {
3134 m_current_send_remoteinput_id.erase (m_current_send_remoteinput_id.begin () + i);
3138 } else if (client_info.type == REMOTEINPUT_CLIENT) {
3139 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_CLIENT client.\n";
3141 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3142 if (m_current_recv_remoteinput_id.at (i) == client_id) {
3143 m_current_recv_remoteinput_id.erase (m_current_recv_remoteinput_id.begin () + i);
3147 } else if (client_info.type == CONFIG_CLIENT) {
3148 SCIM_DEBUG_MAIN(4) << "It's a CONFIG_CLIENT client.\n";
3150 LOGI ("clients: %zu, panel clients: %zu, imcontrols size: %zu, helper infos: %zu, \
3151 helper active infos: %zu, helper client indexes: %zu, ises pending: %zu, \
3152 imcontrols: %zu, start helper ic indexes: %zu, client context uuids: %zu, \
3153 client context helpers: %zu, helpers uuid count: %zu",
3154 m_client_repository.size(),
3155 m_panel_client_map.size(),
3156 m_imcontrol_map.size(),
3157 m_helper_info_repository.size(),
3158 m_helper_active_info_repository.size(),
3159 m_helper_client_index.size(),
3160 m_ise_pending_repository.size(),
3161 m_imcontrol_repository.size(),
3162 m_start_helper_ic_index.size(),
3163 m_client_context_uuids.size(),
3164 m_client_context_helper.size(),
3165 m_helper_uuid_count.size());
3168 const ClientInfo& socket_get_client_info (int client) {
3169 static ClientInfo null_client = { 0, UNKNOWN_CLIENT };
3170 ClientRepository::iterator it = m_client_repository.find (client);
3172 if (it != m_client_repository.end ())
3178 //SCIM_TRANS_CMD_PANEL_TURN_ON
3179 void socket_turn_on (void) {
3180 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_on ()\n";
3181 m_signal_turn_on ();
3183 //SCIM_TRANS_CMD_PANEL_TURN_OFF
3184 void socket_turn_off (void) {
3185 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_off ()\n";
3186 m_signal_turn_off ();
3188 //SCIM_TRANS_CMD_UPDATE_SCREEN
3189 void socket_update_screen (int client_id, uint32 num) {
3190 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_screen ()\n";
3192 if (((int) num) != m_current_screen) {
3193 SCIM_DEBUG_MAIN (4) << "New Screen number = " << num << "\n";
3194 m_signal_update_screen ((int) num);
3195 helper_all_update_screen ((int) num);
3196 m_current_screen = (num);
3199 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
3200 void socket_update_spot_location (uint32 x, uint32 y, uint32 top_y) {
3201 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_spot_location ()\n";
3202 SCIM_DEBUG_MAIN (4) << "New Spot location x=" << x << " y=" << y << "\n";
3203 m_signal_update_spot_location ((int)x, (int)y, (int)top_y);
3204 helper_all_update_spot_location ((int)x, (int)y);
3206 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
3207 void socket_update_cursor_position (uint32 cursor_pos) {
3208 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_cursor_position ()\n";
3209 SCIM_DEBUG_MAIN (4) << "New cursor position pos=" << cursor_pos << "\n";
3210 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3211 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3212 iseContext->cursor_pos = static_cast<int>(cursor_pos);
3214 helper_all_update_cursor_position ((int)cursor_pos);
3216 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
3217 void socket_update_surrounding_text (String text, uint32 cursor) {
3218 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3219 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3221 if (it != m_helper_client_index.end ()) {
3226 get_focused_context (client, context);
3227 ctx = get_helper_ic (client, context);
3228 m_panel_agent_manager.socket_update_surrounding_text (it->second.id, ctx, m_current_helper_uuid, text, cursor);
3233 void remoteinput_callback_focus_in () {
3234 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3236 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3238 m_panel_agent_manager.socket_remoteinput_focus_in (m_current_recv_remoteinput_id.at (i));
3243 void remoteinput_callback_focus_out () {
3244 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3246 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3248 m_panel_agent_manager.socket_remoteinput_focus_out (m_current_recv_remoteinput_id.at (i));
3253 void remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type) {
3254 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3255 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3256 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3257 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
3258 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(return_key_type);
3259 iseContext->return_key_disabled = static_cast<Eina_Bool>(return_key_disabled);
3260 iseContext->layout_variation = static_cast<int>(variation);
3261 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(autocapital_type);
3262 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(hint);
3264 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3266 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);
3271 void remoteinput_callback_surrounding_text (String text, uint32 cursor) {
3272 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3274 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3276 m_panel_agent_manager.socket_remoteinput_surrounding_text (m_current_recv_remoteinput_id.at (i), text, cursor);
3281 void remoteinput_callback_input_resource (uint32 input_resource) {
3282 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3284 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3286 m_panel_agent_manager.socket_remoteinput_input_resource (m_current_recv_remoteinput_id.at (i), input_resource);
3291 void remoteinput_callback_key_symbol (String key_symbol, int press, uint32 timestamp) {
3292 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3294 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3296 m_panel_agent_manager.socket_remoteinput_key_symbol (m_current_recv_remoteinput_id.at (i), key_symbol, press, timestamp);
3301 void remoteinput_callback_cursor_position (uint32 cursor) {
3302 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3304 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3306 m_panel_agent_manager.socket_remoteinput_cursor_position (m_current_recv_remoteinput_id.at (i), cursor);
3311 //ISM_TRANS_CMD_UPDATE_SELECTION
3312 void socket_update_selection (String text) {
3313 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3314 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3316 if (it != m_helper_client_index.end ()) {
3321 get_focused_context (client, context);
3322 ctx = get_helper_ic (client, context);
3323 m_panel_agent_manager.socket_update_selection (it->second.id, ctx, m_current_helper_uuid, text);
3327 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
3328 void socket_update_factory_info (PanelFactoryInfo& info) {
3329 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_factory_info ()\n";
3330 SCIM_DEBUG_MAIN (4) << "New Factory info uuid=" << info.uuid << " name=" << info.name << "\n";
3331 info.lang = scim_get_normalized_language (info.lang);
3332 m_signal_update_factory_info (info);
3334 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
3335 void socket_show_help (String help) {
3336 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_help ()\n";
3337 m_signal_show_help (help);
3339 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
3340 void socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec) {
3341 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_factory_menu ()\n";
3344 m_signal_show_factory_menu (vec);
3347 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3348 void socket_show_preedit_string (void) {
3349 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_preedit_string ()\n";
3350 m_signal_show_preedit_string ();
3352 //SCIM_TRANS_CMD_SHOW_AUX_STRING
3353 void socket_show_aux_string (void) {
3354 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_aux_string ()\n";
3355 m_signal_show_aux_string ();
3357 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
3358 void socket_show_lookup_table (void) {
3359 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_lookup_table ()\n";
3361 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3362 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3363 if (iseContext->layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD || iseContext->input_hint & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
3367 m_signal_show_lookup_table ();
3369 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
3370 void socket_show_associate_table (void) {
3371 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_associate_table ()\n";
3372 m_signal_show_associate_table ();
3374 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3375 void socket_hide_preedit_string (void) {
3376 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_preedit_string ()\n";
3377 m_signal_hide_preedit_string ();
3379 //SCIM_TRANS_CMD_HIDE_AUX_STRING
3380 void socket_hide_aux_string (void) {
3381 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_aux_string ()\n";
3382 m_signal_hide_aux_string ();
3384 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
3385 void socket_hide_lookup_table (void) {
3386 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_lookup_table ()\n";
3387 m_signal_hide_lookup_table ();
3389 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
3390 void socket_hide_associate_table (void) {
3391 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_associate_table ()\n";
3392 m_signal_hide_associate_table ();
3394 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3395 void socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret) {
3396 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_string ()\n";
3397 m_signal_update_preedit_string (str, attrs, (int) caret);
3399 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
3400 void socket_update_preedit_caret (uint32 caret) {
3401 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3402 m_signal_update_preedit_caret ((int) caret);
3404 //ISM_TRANS_CMD_RECAPTURE_STRING
3405 void socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs) {
3406 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3407 m_signal_recapture_string (offset, len, preedit, commit, attrs);
3409 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
3410 void socket_update_aux_string (String& str, const AttributeList& attrs) {
3411 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_aux_string ()\n";
3412 m_signal_update_aux_string (str, attrs);
3413 m_is_imengine_aux = true;
3415 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
3416 void socket_update_lookup_table (const LookupTable& table) {
3417 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_lookup_table ()\n";
3419 //g_isf_candidate_table = _isf_candidate_table;
3420 m_signal_update_lookup_table (table);
3421 m_is_imengine_candidate = true;
3423 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
3424 void socket_update_associate_table (const LookupTable& table) {
3425 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_associate_table ()\n";
3426 m_signal_update_associate_table (table);
3429 void socket_update_control_panel (void) {
3430 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_control_panel ()\n";
3432 m_signal_get_keyboard_ise (name, uuid);
3433 PanelFactoryInfo info;
3435 if (name.length () > 0)
3436 info = PanelFactoryInfo (uuid, name, String (""), String (""));
3438 info = PanelFactoryInfo (String (""), String (_ ("English Keyboard")), String ("C"), String (SCIM_KEYBOARD_ICON_FILE));
3440 m_signal_update_factory_info (info);
3442 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3443 void socket_register_properties (const PropertyList& properties) {
3444 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_register_properties ()\n";
3445 m_signal_register_properties (properties);
3447 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3448 void socket_update_property (const Property& property) {
3449 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_property ()\n";
3450 m_signal_update_property (property);
3452 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
3453 void socket_get_keyboard_ise_list (String& uuid) {
3454 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise_list ()\n";
3455 std::vector<String> list;
3457 m_signal_get_keyboard_ise_list (list);
3458 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3460 if (it != m_helper_client_index.end ()) {
3463 get_focused_context (client, context);
3464 uint32 ctx = get_helper_ic (client, context);
3465 m_panel_agent_manager.socket_get_keyboard_ise_list (it->second.id, ctx, uuid, list);
3468 //ISM_TRANS_CMD_SET_CANDIDATE_UI
3469 void socket_set_candidate_ui (uint32 portrait_line, uint32 mode) {
3470 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3471 m_signal_set_candidate_ui (portrait_line, mode);
3473 //ISM_TRANS_CMD_GET_CANDIDATE_UI
3474 void socket_get_candidate_ui (String uuid) {
3475 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_candidate_ui ()\n";
3476 int style = 0, mode = 0;
3477 m_signal_get_candidate_ui (style, mode);
3478 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3480 if (it != m_helper_client_index.end ()) {
3483 get_focused_context (client, context);
3484 uint32 ctx = get_helper_ic (client, context);
3485 m_panel_agent_manager.socket_get_candidate_ui (it->second.id, ctx, uuid, style, mode);
3488 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
3489 void socket_set_candidate_position (uint32 left, uint32 top) {
3490 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_candidate_position ()\n";
3491 m_signal_set_candidate_position (left, top);
3493 //ISM_TRANS_CMD_HIDE_CANDIDATE
3494 void socket_hide_candidate (void) {
3495 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_candidate ()\n";
3496 m_signal_hide_preedit_string ();
3497 m_signal_hide_aux_string ();
3498 m_signal_hide_lookup_table ();
3499 m_signal_hide_associate_table ();
3501 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
3502 void socket_get_candidate_geometry (String& uuid) {
3503 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3504 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3506 if (it != m_helper_client_index.end ()) {
3507 struct rectinfo info = {0, 0, 0, 0};
3508 m_signal_get_candidate_geometry (info);
3511 get_focused_context (client, context);
3512 uint32 ctx = get_helper_ic (client, context);
3513 m_panel_agent_manager.socket_get_candidate_geometry (it->second.id, ctx, uuid, info);
3516 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
3517 void socket_set_keyboard_ise (String uuid) {
3518 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3520 m_signal_set_keyboard_ise (uuid);
3522 //ISM_TRANS_CMD_SELECT_CANDIDATE
3523 void socket_helper_select_candidate (uint32 index) {
3524 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3526 m_signal_select_candidate (index);
3528 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
3529 void socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height) {
3530 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
3533 uint32 focused_context;
3534 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
3536 if (it != m_helper_active_info_repository.end ()) {
3537 if (it->second.uuid == m_current_helper_uuid) {
3538 m_signal_update_ise_geometry (x, y, width, height);
3540 get_focused_context (focused_client, focused_context);
3541 ClientInfo client_info = socket_get_client_info (focused_client);
3542 if (client_info.type == FRONTEND_CLIENT) {
3543 m_panel_agent_manager.update_ise_geometry (focused_client, focused_context, x, y, width, height);
3548 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
3549 void socket_get_keyboard_ise (String uuid) {
3550 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise ()\n";
3551 String ise_name, ise_uuid;
3555 get_focused_context (client, context);
3556 ctx = get_helper_ic (client, context);
3558 if (m_client_context_uuids.find (ctx) != m_client_context_uuids.end ())
3559 ise_uuid = m_client_context_uuids[ctx];
3561 m_signal_get_keyboard_ise (ise_name, ise_uuid);
3562 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3564 if (it != m_helper_client_index.end ()) {
3565 get_focused_context (client, context);
3566 ctx = get_helper_ic (client, context);
3567 m_panel_agent_manager.socket_get_keyboard_ise (it->second.id, ctx, uuid, ise_name, ise_uuid);
3571 //SCIM_TRANS_CMD_START_HELPER
3572 void socket_start_helper (int client_id, uint32 context, String uuid) {
3573 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_start_helper ()\n";
3574 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3576 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3578 /* Get the context uuid from the client context registration table. */
3580 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3582 if (it != m_client_context_uuids.end ())
3583 ic_uuid = it->second;
3586 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3587 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3588 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3589 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3592 if (it == m_helper_client_index.end ()) {
3593 SCIM_DEBUG_MAIN (5) << "Run this Helper.\n";
3594 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
3595 m_signal_run_helper (uuid, m_config_name, m_display_name);
3597 SCIM_DEBUG_MAIN (5) << "Increase the Reference count.\n";
3598 m_panel_agent_manager.socket_start_helper (it->second.id, ic, ic_uuid);
3604 //SCIM_TRANS_CMD_STOP_HELPER
3605 void socket_stop_helper (int client_id, uint32 context, String uuid) {
3606 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_stop_helper ()\n";
3607 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3609 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3611 if (it != m_helper_client_index.end ()) {
3612 SCIM_DEBUG_MAIN (5) << "Decrease the Reference count.\n";
3615 /* Get the context uuid from the client context registration table. */
3617 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3619 if (it != m_client_context_uuids.end ())
3620 ic_uuid = it->second;
3623 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3624 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3625 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3626 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3629 m_panel_agent_manager.helper_detach_input_context (it->second.id, ic, ic_uuid);
3631 if (it->second.ref <= 0)
3632 m_panel_agent_manager.exit (it->second.id, ic);
3637 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
3638 void socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans) {
3639 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_send_helper_event ()\n";
3640 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3642 if (it != m_helper_client_index.end ()) {
3644 /* Get the context uuid from the client context registration table. */
3646 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3648 if (it != m_client_context_uuids.end ())
3649 ic_uuid = it->second;
3652 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3653 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3654 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3655 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3658 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);
3662 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3663 void socket_helper_register_properties (int client, PropertyList& properties) {
3664 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_properties (" << client << ")\n";
3665 m_signal_register_helper_properties (client, properties);
3667 #if 0 //why? remove if useless, infinite loop
3668 /* Check whether application is already focus_in */
3669 if (m_current_socket_client != -1) {
3670 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
3671 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
3672 reset_keyboard_ise ();
3675 /* Check whether ISE panel is already shown */
3676 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0) {
3677 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
3679 uint32 focused_context;
3680 get_focused_context (focused_client, focused_context);
3682 if (focused_client == -1 && m_active_client_id != -1) {
3683 focused_client = m_panel_client_map[m_active_client_id];
3684 focused_context = 0;
3687 uint32 ctx = get_helper_ic (focused_client, focused_context);
3688 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
3691 m_signal_show_ise ();
3695 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3696 void socket_helper_update_property (int client, Property& property) {
3697 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_property (" << client << ")\n";
3698 m_signal_update_helper_property (client, property);
3700 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
3701 void socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans) {
3702 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_imengine_event (" << client << ")\n";
3703 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client);
3705 if (hiit != m_helper_active_info_repository.end ()) {
3707 uint32 target_context;
3708 get_imengine_client_context (target_ic, target_client, target_context);
3710 uint32 focused_context;
3711 String focused_uuid;
3712 focused_uuid = get_focused_context (focused_client, focused_context);
3714 if (target_ic == (uint32) (-1)) {
3715 target_client = focused_client;
3716 target_context = focused_context;
3719 if (target_uuid.length () == 0)
3720 target_uuid = focused_uuid;
3722 ClientInfo client_info = socket_get_client_info (target_client);
3723 SCIM_DEBUG_MAIN (5) << "Target UUID = " << target_uuid << " Focused UUId = " << focused_uuid << "\nTarget Client = " << target_client << "\n";
3725 if (client_info.type == FRONTEND_CLIENT) {
3726 /* If the original context value is greater than 0x7FFF, the line below would not work properly
3727 since the target_context acquired by get_imengine_client_context() is always smaller than 0x7FFF.
3728 But since the send_imengine_event() of scim_helper module will call IMEngine's
3729 process_helper_event() function directly, instead of sending SEND_IMENGINE_EVENT message.
3730 So we are not going to handle this kind of exceptional case for now. */
3731 m_panel_agent_manager.process_helper_event (target_client, target_context, target_uuid, hiit->second.uuid, nest_trans);
3736 void socket_helper_key_event_op (int client, int cmd, uint32 target_ic, String& target_uuid, KeyEvent& key) {
3737 if (!key.empty ()) {
3739 uint32 target_context;
3740 get_imengine_client_context (target_ic, target_client, target_context);
3742 uint32 focused_context;
3743 String focused_uuid;
3744 focused_uuid = get_focused_context (focused_client, focused_context);
3746 if (target_ic == (uint32) (-1)) {
3747 target_client = focused_client;
3748 target_context = focused_context;
3751 if (target_uuid.length () == 0)
3752 target_uuid = focused_uuid;
3754 if (target_client == -1) {
3755 /* FIXUP: monitor 'Invalid Window' error */
3756 LOGW ("focused target client is NULL");
3757 } else if (target_uuid == focused_uuid &&
3758 clients_equal (target_client, focused_client) &&
3759 contexts_equal (target_context, focused_context)) {
3760 ClientInfo client_info = socket_get_client_info (focused_client);
3762 if (client_info.type == FRONTEND_CLIENT) {
3763 m_panel_agent_manager.socket_helper_key_event (focused_client, focused_context, cmd, key);
3766 LOGD ("[target_client : %d, focused_client : %d] => %d, [target_context : %u, focused_context : %u] => %d",
3767 target_client, focused_client, clients_equal (target_client, focused_client),
3768 target_context, focused_context, contexts_equal (target_context, focused_context));
3772 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
3773 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
3774 void socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3775 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_key_event (" << client << ")\n";
3776 ISF_PROF_DEBUG ("first message")
3777 socket_helper_key_event_op (client, SCIM_TRANS_CMD_PROCESS_KEY_EVENT, target_ic, target_uuid, key);
3779 initialize_remote_input_vconf_key ();
3781 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
3782 void socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3783 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_forward_key_event (" << client << ")\n";
3784 socket_helper_key_event_op (client, SCIM_TRANS_CMD_FORWARD_KEY_EVENT, target_ic, target_uuid, key);
3786 initialize_remote_input_vconf_key ();
3789 //SCIM_TRANS_CMD_COMMIT_STRING
3790 void socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr) {
3791 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_commit_string (" << client << ")\n";
3793 if (wstr.length ()) {
3795 uint32 target_context;
3796 get_imengine_client_context (target_ic, target_client, target_context);
3798 uint32 focused_context;
3799 String focused_uuid;
3800 focused_uuid = get_focused_context (focused_client, focused_context);
3802 if (target_ic == (uint32) (-1)) {
3803 target_client = focused_client;
3804 target_context = focused_context;
3807 if (target_uuid.length () == 0)
3808 target_uuid = focused_uuid;
3810 if (target_uuid == focused_uuid &&
3811 clients_equal (target_client, focused_client) &&
3812 contexts_equal (target_context, focused_context)) {
3813 ClientInfo client_info = socket_get_client_info (focused_client);
3815 if (client_info.type == FRONTEND_CLIENT) {
3816 m_panel_agent_manager.commit_string (focused_client, focused_context, wstr);
3818 initialize_remote_input_vconf_key ();
3820 std::cerr << "target client is not existed!!!" << "\n";
3825 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
3826 void socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after) {
3827 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3829 uint32 focused_context;
3830 get_focused_context (focused_client, focused_context);
3831 ClientInfo client_info = socket_get_client_info (focused_client);
3833 /* If the get_surrounding_text was received when there is no client available,
3834 * return empty surrounding text since the sender would be waiting for reply */
3835 if (focused_client == -1) {
3836 socket_update_surrounding_text("", 0);
3838 if (client_info.type == FRONTEND_CLIENT) {
3839 m_panel_agent_manager.socket_helper_get_surrounding_text (focused_client, focused_context, maxlen_before, maxlen_after);
3843 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
3844 void socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len) {
3845 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3847 uint32 focused_context;
3848 get_focused_context (focused_client, focused_context);
3849 ClientInfo client_info = socket_get_client_info (focused_client);
3851 if (client_info.type == FRONTEND_CLIENT) {
3852 m_panel_agent_manager.socket_helper_delete_surrounding_text (focused_client, focused_context, offset, len);
3854 initialize_remote_input_vconf_key ();
3857 //SCIM_TRANS_CMD_GET_SELECTION
3858 void socket_helper_get_selection (int client, String uuid) {
3859 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3861 uint32 focused_context;
3862 get_focused_context (focused_client, focused_context);
3863 ClientInfo client_info = socket_get_client_info (focused_client);
3865 if (client_info.type == FRONTEND_CLIENT) {
3866 m_panel_agent_manager.socket_helper_get_selection (focused_client, focused_context);
3869 //SCIM_TRANS_CMD_SET_SELECTION
3870 void socket_helper_set_selection (int client, uint32 start, uint32 end) {
3871 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3873 uint32 focused_context;
3874 get_focused_context (focused_client, focused_context);
3875 ClientInfo client_info = socket_get_client_info (focused_client);
3877 if (client_info.type == FRONTEND_CLIENT) {
3878 m_panel_agent_manager.socket_helper_set_selection (focused_client, focused_context, start, end);
3882 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3883 void socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid) {
3884 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_show_preedit_string (" << client << ")\n";
3886 uint32 target_context;
3887 get_imengine_client_context (target_ic, target_client, target_context);
3889 uint32 focused_context;
3890 String focused_uuid = get_focused_context (focused_client, focused_context);
3892 if (target_ic == (uint32) (-1)) {
3893 target_client = focused_client;
3894 target_context = focused_context;
3897 if (target_uuid.length () == 0)
3898 target_uuid = focused_uuid;
3900 if (target_uuid == focused_uuid &&
3901 clients_equal (target_client, focused_client) &&
3902 contexts_equal (target_context, focused_context)) {
3903 ClientInfo client_info = socket_get_client_info (focused_client);
3905 if (client_info.type == FRONTEND_CLIENT) {
3906 m_panel_agent_manager.show_preedit_string (focused_client, focused_context);
3910 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3911 void socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid) {
3912 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_hide_preedit_string (" << client << ")\n";
3914 uint32 target_context;
3915 get_imengine_client_context (target_ic, target_client, target_context);
3917 uint32 focused_context;
3918 String focused_uuid = get_focused_context (focused_client, focused_context);
3920 if (target_ic == (uint32) (-1)) {
3921 target_client = focused_client;
3922 target_context = focused_context;
3925 if (target_uuid.length () == 0)
3926 target_uuid = focused_uuid;
3928 if (target_uuid == focused_uuid &&
3929 clients_equal (target_client, focused_client) &&
3930 contexts_equal (target_context, focused_context)) {
3931 ClientInfo client_info = socket_get_client_info (focused_client);
3933 if (client_info.type == FRONTEND_CLIENT) {
3934 m_panel_agent_manager.hide_preedit_string (focused_client, focused_context);
3938 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3939 void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
3940 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_preedit_string (" << client << ")\n";
3942 uint32 target_context;
3943 get_imengine_client_context (target_ic, target_client, target_context);
3945 uint32 focused_context;
3946 String focused_uuid;
3947 focused_uuid = get_focused_context (focused_client, focused_context);
3949 if (target_ic == (uint32) (-1)) {
3950 target_client = focused_client;
3951 target_context = focused_context;
3954 if (target_uuid.length () == 0)
3955 target_uuid = focused_uuid;
3957 if (target_uuid == focused_uuid &&
3958 clients_equal (target_client, focused_client) &&
3959 contexts_equal (target_context, focused_context)) {
3960 ClientInfo client_info = socket_get_client_info (focused_client);
3962 if (client_info.type == FRONTEND_CLIENT) {
3963 m_panel_agent_manager.update_preedit_string (focused_client, focused_context, preedit, commit, attrs, caret);
3965 initialize_remote_input_vconf_key ();
3969 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
3970 void socket_helper_update_preedit_caret (int client, uint32 caret) {
3971 SCIM_DEBUG_MAIN (4) << __func__ << " (" << client << ")\n";
3973 uint32 focused_context;
3974 String focused_uuid;
3975 focused_uuid = get_focused_context (focused_client, focused_context);
3976 ClientInfo client_info = socket_get_client_info (focused_client);
3978 if (client_info.type == FRONTEND_CLIENT) {
3979 m_panel_agent_manager.update_preedit_caret (focused_client, focused_context, caret);
3983 //ISM_TRANS_CMD_RECAPTURE_STRING
3984 void socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
3985 WideString commit, AttributeList& attrs) {
3986 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_recapture_string (" << client << ")\n";
3988 uint32 target_context;
3989 get_imengine_client_context (target_ic, target_client, target_context);
3991 uint32 focused_context;
3992 String focused_uuid;
3993 focused_uuid = get_focused_context (focused_client, focused_context);
3995 if (target_ic == (uint32) (-1)) {
3996 target_client = focused_client;
3997 target_context = focused_context;
4000 if (target_uuid.length () == 0)
4001 target_uuid = focused_uuid;
4003 if (target_uuid == focused_uuid &&
4004 clients_equal (target_client, focused_client) &&
4005 contexts_equal (target_context, focused_context)) {
4006 ClientInfo client_info = socket_get_client_info (focused_client);
4008 if (client_info.type == FRONTEND_CLIENT) {
4009 m_panel_agent_manager.recapture_string (focused_client, focused_context, offset, len, preedit, commit, attrs);
4011 initialize_remote_input_vconf_key ();
4016 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
4017 void socket_helper_register_helper (int client, HelperInfo& info) {
4018 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper (" << client << ")\n";
4019 bool result = false;
4026 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4027 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4031 info.option = option;
4033 if (info.uuid.length ()) {
4034 SCIM_DEBUG_MAIN (4) << "New Helper uuid=" << info.uuid << " name=" << info.name << "\n";
4035 HelperClientIndex::iterator it = m_helper_client_index.find (info.uuid);
4037 if (it == m_helper_client_index.end ()) {
4038 m_helper_info_repository [client] = info;
4039 m_helper_client_index [info.uuid] = HelperClientStub (client, 1);
4040 StartHelperICIndex::iterator icit = m_start_helper_ic_index.find (info.uuid);
4042 if (icit != m_start_helper_ic_index.end ()) {
4043 m_panel_agent_manager.helper_attach_input_context_and_update_screen (client, icit->second, m_current_screen);
4044 m_start_helper_ic_index.erase (icit);
4047 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4048 m_panel_agent_manager.send_fail_reply(client);
4051 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4052 m_panel_agent_manager.send_fail_reply(client);
4059 LOGD ("Succeed to register IME : %s", info.uuid.c_str ());
4060 m_signal_register_helper (client, info);
4064 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
4065 void socket_helper_register_helper_passive (int client, HelperInfo& info) {
4066 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper_passive (" << client << ")\n";
4073 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4074 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4078 info.option = option;
4080 if (info.uuid.length ()) {
4081 SCIM_DEBUG_MAIN (4) << "New Helper Passive uuid=" << info.uuid << " name=" << info.name << "\n";
4082 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
4084 if (it == m_helper_active_info_repository.end ()) {
4085 m_helper_active_info_repository[client] = info;
4088 StringIntRepository::iterator iter = m_ise_pending_repository.find (info.uuid);
4090 if (iter != m_ise_pending_repository.end ()) {
4091 m_ise_pending_repository.erase (iter);
4094 iter = m_ise_pending_repository.find (info.name);
4096 if (iter != m_ise_pending_repository.end ()) {
4097 m_ise_pending_repository.erase (iter);
4103 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
4104 void socket_helper_update_input_context (int client, uint32 type, uint32 value) {
4105 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_input_context (" << client << ")\n";
4106 m_signal_update_input_context ((int)type, (int)value);
4108 uint32 focused_context;
4109 get_focused_context (focused_client, focused_context);
4110 ClientInfo client_info = socket_get_client_info (focused_client);
4112 if (client_info.type == FRONTEND_CLIENT) {
4113 m_panel_agent_manager.update_ise_input_context (focused_client, focused_context, type, value);
4115 std::cerr << "focused client is not existed!!!" << "\n";
4118 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
4119 void socket_helper_update_language_locale(int client, String locale) {
4120 SCIM_DEBUG_MAIN(4) << "InfoManager::socket_helper_update_language_locale (" << client << ")\n";
4121 m_signal_update_language_locale(locale);
4124 uint32 focused_context;
4125 get_focused_context(focused_client, focused_context);
4126 ClientInfo client_info = socket_get_client_info(focused_client);
4128 if (client_info.type == FRONTEND_CLIENT) {
4129 m_panel_agent_manager.update_ise_language_locale(focused_client, focused_context, locale);
4131 std::cerr << "focused client is not existed!!!" << "\n";
4134 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
4135 void socket_helper_send_private_command (int client, String command) {
4136 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4138 uint32 focused_context;
4139 get_focused_context (focused_client, focused_context);
4140 ClientInfo client_info = socket_get_client_info (focused_client);
4142 if (client_info.type == FRONTEND_CLIENT) {
4143 m_panel_agent_manager.send_private_command (focused_client, focused_context, command);
4146 //SCIM_TRANS_CMD_COMMIT_CONTENT
4147 void socket_helper_commit_content (int client, String content, String description, String mime_types) {
4148 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4150 uint32 focused_context;
4151 get_focused_context (focused_client, focused_context);
4152 ClientInfo client_info = socket_get_client_info (focused_client);
4154 if (client_info.type == FRONTEND_CLIENT) {
4155 m_panel_agent_manager.commit_content (focused_client, focused_context, content, description, mime_types);
4158 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
4159 void UPDATE_ISE_EXIT (int client) {
4160 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4161 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
4162 if (launch_ise_on_request && !m_refocus_needed && !m_reshow_needed)
4163 m_restart_needed = false;
4166 void process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial) {
4168 uint32 focused_context;
4169 get_focused_context (focused_client, focused_context);
4170 ClientInfo client_info = socket_get_client_info (focused_client);
4172 if (client_info.type == FRONTEND_CLIENT) {
4173 m_panel_agent_manager.process_key_event_done (focused_client, focused_context, key, ret, serial);
4177 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
4178 void request_ise_hide () {
4180 uint32 focused_context;
4181 get_focused_context (focused_client, focused_context);
4182 ClientInfo client_info = socket_get_client_info (focused_client);
4184 if (client_info.type == FRONTEND_CLIENT) {
4185 m_panel_agent_manager.request_ise_hide (focused_client, focused_context);
4189 void socket_reset_helper_input_context (const String& uuid, int client, uint32 context) {
4190 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4192 if (it != m_helper_client_index.end ()) {
4193 uint32 ctx = get_helper_ic (client, context);
4194 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
4198 bool helper_select_aux (uint32 item) {
4199 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_aux \n";
4201 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4202 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4204 if (it != m_helper_client_index.end ()) {
4208 get_focused_context (client, context);
4209 ctx = get_helper_ic (client, context);
4210 m_panel_agent_manager.select_aux (it->second.id, ctx, item);
4218 bool helper_select_candidate (uint32 item) {
4219 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_candidate \n";
4221 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4222 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4224 if (it != m_helper_client_index.end ()) {
4228 get_focused_context (client, context);
4229 ctx = get_helper_ic (client, context);
4230 m_panel_agent_manager.select_candidate (it->second.id, ctx, item);
4238 bool helper_lookup_table_page_up (void) {
4239 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_up \n";
4241 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4242 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4244 if (it != m_helper_client_index.end ()) {
4248 get_focused_context (client, context);
4249 ctx = get_helper_ic (client, context);
4250 m_panel_agent_manager.lookup_table_page_up (it->second.id, ctx);
4258 bool helper_lookup_table_page_down (void) {
4259 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_down \n";
4261 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4262 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4264 if (it != m_helper_client_index.end ()) {
4268 get_focused_context (client, context);
4269 ctx = get_helper_ic (client, context);
4270 m_panel_agent_manager.lookup_table_page_down (it->second.id, ctx);
4278 bool helper_update_lookup_table_page_size (uint32 size) {
4279 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_lookup_table_page_size \n";
4281 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4282 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4284 if (it != m_helper_client_index.end ()) {
4288 get_focused_context (client, context);
4289 ctx = get_helper_ic (client, context);
4290 m_panel_agent_manager.update_lookup_table_page_size (it->second.id, ctx, size);
4298 bool helper_update_candidate_item_layout (const std::vector<uint32>& row_items) {
4299 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4301 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4302 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4304 if (it != m_helper_client_index.end ()) {
4308 get_focused_context (client, context);
4309 ctx = get_helper_ic (client, context);
4310 m_panel_agent_manager.update_candidate_item_layout (it->second.id, ctx, row_items);
4318 bool helper_select_associate (uint32 item) {
4319 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_associate \n";
4321 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4322 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4324 if (it != m_helper_client_index.end ()) {
4328 get_focused_context (client, context);
4329 ctx = get_helper_ic (client, context);
4330 m_panel_agent_manager.select_associate (it->second.id, ctx, item);
4338 bool helper_associate_table_page_up (void) {
4339 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_up \n";
4341 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4342 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4344 if (it != m_helper_client_index.end ()) {
4348 get_focused_context (client, context);
4349 ctx = get_helper_ic (client, context);
4350 m_panel_agent_manager.associate_table_page_up (it->second.id, ctx);
4358 bool helper_associate_table_page_down (void) {
4359 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_down \n";
4361 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4362 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4364 if (it != m_helper_client_index.end ()) {
4368 get_focused_context (client, context);
4369 ctx = get_helper_ic (client, context);
4370 m_panel_agent_manager.associate_table_page_down (it->second.id, ctx);
4378 bool helper_update_associate_table_page_size (uint32 size) {
4379 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_associate_table_page_size \n";
4381 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4382 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4384 if (it != m_helper_client_index.end ()) {
4388 get_focused_context (client, context);
4389 ctx = get_helper_ic (client, context);
4390 m_panel_agent_manager.update_associate_table_page_size (it->second.id, ctx, size);
4398 bool helper_update_displayed_candidate_number (uint32 size) {
4399 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4401 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4402 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4404 if (it != m_helper_client_index.end ()) {
4408 get_focused_context (client, context);
4409 ctx = get_helper_ic (client, context);
4410 m_panel_agent_manager.update_displayed_candidate_number (it->second.id, ctx, size);
4418 bool helper_longpress_candidate (uint32 index) {
4419 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4421 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4422 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4424 if (it != m_helper_client_index.end ()) {
4428 get_focused_context (client, context);
4429 ctx = get_helper_ic (client, context);
4430 m_panel_agent_manager.send_longpress_event (it->second.id, ctx, index);
4435 std::cerr << __func__ << " is failed!!!\n";
4439 void helper_all_update_spot_location (int x, int y) {
4440 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_spot_location (" << x << "," << y << ")\n";
4441 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4444 String uuid = get_focused_context (client, context);
4446 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4447 if (hiit->second.option & SCIM_HELPER_NEED_SPOT_LOCATION_INFO) {
4448 m_panel_agent_manager.helper_all_update_spot_location (hiit->first, get_helper_ic (client, context), uuid, x, y);
4453 void helper_all_update_cursor_position (int cursor_pos) {
4454 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_cursor_position (" << cursor_pos << ")\n";
4455 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4458 String uuid = get_focused_context (client, context);
4460 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4461 m_panel_agent_manager.helper_all_update_cursor_position (hiit->first, get_helper_ic (client, context), uuid, cursor_pos);
4465 void helper_all_update_screen (int screen) {
4466 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_screen (" << screen << ")\n";
4467 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4471 uuid = get_focused_context (client, context);
4473 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4474 if (hiit->second.option & SCIM_HELPER_NEED_SCREEN_INFO) {
4475 m_panel_agent_manager.helper_all_update_screen (hiit->first, get_helper_ic (client, context), uuid, screen);
4480 bool set_autocapital_type (int mode) {
4481 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4482 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4483 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4484 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(mode);
4486 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4487 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4489 if (it != m_helper_client_index.end ()) {
4493 get_focused_context (client, context);
4494 ctx = get_helper_ic (client, context);
4495 m_panel_agent_manager.set_autocapital_type (it->second.id, ctx, m_current_helper_uuid, mode);
4500 std::cerr << __func__ << " is failed!!!\n";
4504 bool set_prediction_allow (int client, int mode) {
4505 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4506 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4507 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4508 iseContext->prediction_allow = static_cast<Eina_Bool>(mode);
4510 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4511 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4513 if (it != m_helper_client_index.end ()) {
4515 uint32 focused_context;
4517 get_focused_context (focused_client, focused_context);
4518 ctx = get_helper_ic (focused_client, focused_context);
4519 m_panel_agent_manager.set_prediction_allow (it->second.id, ctx, m_current_helper_uuid, mode);
4524 std::cerr << __func__ << " is failed!!!\n";
4528 const String& get_focused_context (int& client, uint32& context, bool force_last_context = false) const {
4529 if (m_current_socket_client >= 0) {
4530 client = m_current_socket_client;
4531 context = m_current_client_context;
4532 return m_current_context_uuid;
4534 client = m_last_socket_client;
4535 context = m_last_client_context;
4536 return m_last_context_uuid;
4541 void socket_transaction_start (void) {
4542 m_signal_transaction_start ();
4545 void socket_transaction_end (void) {
4546 m_signal_transaction_end ();
4552 void unlock (void) {
4557 InfoManager::InfoManager ()
4558 : m_impl (new InfoManagerImpl ())
4562 InfoManager::~InfoManager ()
4568 InfoManager::initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident)
4570 return m_impl->initialize (info_manager, config, display, resident);
4574 InfoManager::valid (void) const
4576 return m_impl->valid ();
4580 InfoManager::stop (void)
4587 InfoManager::socket_get_client_info (int client) const
4589 return m_impl->socket_get_client_info (client);
4592 void InfoManager::hide_helper (const String& uuid)
4594 m_impl->hide_helper (uuid);
4597 InfoManager::get_current_toolbar_mode () const
4599 return m_impl->get_current_toolbar_mode ();
4603 InfoManager::get_current_ise_geometry (rectinfo& rect)
4605 m_impl->get_current_ise_geometry (rect);
4609 InfoManager::get_current_helper_uuid () const
4611 return m_impl->get_current_helper_uuid ();
4615 InfoManager::get_current_ise_name () const
4617 return m_impl->get_current_ise_name ();
4621 InfoManager::set_current_toolbar_mode (TOOLBAR_MODE_T mode)
4623 m_impl->set_current_toolbar_mode (mode);
4627 InfoManager::set_current_ise_name (String& name)
4629 m_impl->set_current_ise_name (name);
4633 InfoManager::set_current_helper_option (uint32 option)
4635 m_impl->set_current_helper_option (option);
4639 InfoManager::update_candidate_panel_event (uint32 nType, uint32 nValue)
4641 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISF_CANDIDATE_PANEL, nType, nValue);
4645 InfoManager::update_input_panel_event (uint32 nType, uint32 nValue)
4647 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT, nType, nValue);
4651 InfoManager::move_preedit_caret (uint32 position)
4653 return m_impl->move_preedit_caret (position);
4659 InfoManager::request_help (void)
4661 return m_impl->request_help ();
4665 InfoManager::request_factory_menu (void)
4667 return m_impl->request_factory_menu ();
4672 InfoManager::change_factory (const String& uuid)
4674 return m_impl->change_factory (uuid);
4678 InfoManager::helper_candidate_show (void)
4680 return m_impl->helper_candidate_show ();
4684 InfoManager::helper_candidate_hide (void)
4686 return m_impl->helper_candidate_hide ();
4690 InfoManager::candidate_more_window_show (void)
4692 return m_impl->candidate_more_window_show ();
4696 InfoManager::candidate_more_window_hide (void)
4698 return m_impl->candidate_more_window_hide ();
4702 InfoManager::update_helper_lookup_table (const LookupTable& table)
4704 return m_impl->update_helper_lookup_table (table);
4708 InfoManager::select_aux (uint32 item)
4710 return m_impl->select_aux (item);
4714 InfoManager::select_candidate (uint32 item)
4716 return m_impl->select_candidate (item);
4720 InfoManager::lookup_table_page_up (void)
4722 return m_impl->lookup_table_page_up ();
4726 InfoManager::lookup_table_page_down (void)
4728 return m_impl->lookup_table_page_down ();
4732 InfoManager::update_lookup_table_page_size (uint32 size)
4734 return m_impl->update_lookup_table_page_size (size);
4738 InfoManager::update_candidate_item_layout (const std::vector<uint32>& row_items)
4740 return m_impl->update_candidate_item_layout (row_items);
4744 InfoManager::select_associate (uint32 item)
4746 return m_impl->select_associate (item);
4750 InfoManager::associate_table_page_up (void)
4752 return m_impl->associate_table_page_up ();
4756 InfoManager::associate_table_page_down (void)
4758 return m_impl->associate_table_page_down ();
4762 InfoManager::update_associate_table_page_size (uint32 size)
4764 return m_impl->update_associate_table_page_size (size);
4768 InfoManager::update_displayed_candidate_number (uint32 size)
4770 return m_impl->update_displayed_candidate_number (size);
4774 InfoManager::send_longpress_event (int type, int index)
4776 m_impl->send_longpress_event (type, index);
4780 InfoManager::trigger_property (const String& property)
4782 return m_impl->trigger_property (property);
4786 InfoManager::start_helper (const String& uuid)
4788 return m_impl->start_helper (uuid, -2, 0);
4792 InfoManager::stop_helper (const String& uuid)
4794 return m_impl->stop_helper (uuid, -2, 0);
4798 InfoManager::set_default_ise (const DEFAULT_ISE_T& ise)
4800 m_impl->set_default_ise (ise);
4804 InfoManager::set_should_shared_ise (const bool should_shared_ise)
4806 m_impl->set_should_shared_ise (should_shared_ise);
4810 //InfoManager::reload_config (void)
4812 // m_impl->reload_config ();
4816 InfoManager::exit (void)
4818 return m_impl->exit ();
4821 InfoManager::update_ise_list (std::vector<String>& strList)
4823 m_impl->update_ise_list (strList);
4827 InfoManager::remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
4829 return m_impl->remoteinput_update_preedit_string (str, attrs, caret);
4833 InfoManager::remoteinput_commit_string (const WideString &str)
4835 return m_impl->remoteinput_commit_string (str);
4839 InfoManager::remoteinput_send_key_event (const KeyEvent &key)
4841 return m_impl->remoteinput_send_key_event (key);
4845 InfoManager::remoteinput_forward_key_event (const KeyEvent &key)
4847 return m_impl->remoteinput_forward_key_event (key);
4851 InfoManager::remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
4853 return m_impl->remoteinput_delete_surrounding_text (offset, len);
4857 InfoManager::remoteinput_set_cursor_position (uint32 cursor)
4859 return m_impl->remoteinput_set_cursor_position (cursor);
4862 /////////////////////////////////Message function begin/////////////////////////////////////////
4864 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
4865 bool InfoManager:: reset_keyboard_ise (void)
4867 return m_impl->reset_keyboard_ise ();
4870 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
4871 void InfoManager::show_isf_panel (int client_id)
4873 m_impl->show_isf_panel (client_id);
4876 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
4877 void InfoManager::hide_isf_panel (int client_id)
4879 m_impl->hide_isf_panel (client_id);
4882 //ISM_TRANS_CMD_SHOW_ISE_PANEL
4883 void InfoManager::show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len)
4885 m_impl->show_ise_panel (client_id, client, context, data, len);
4888 //ISM_TRANS_CMD_HIDE_ISE_PANEL
4889 void InfoManager::hide_ise_panel (int client_id, uint32 client, uint32 context)
4891 m_impl->hide_ise_panel (client_id, client, context);
4894 //ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
4895 void InfoManager::hide_helper_ise (void)
4897 m_impl->hide_helper_ise ();
4900 //ISM_TRANS_CMD_LAUNCH_ISE from ISF control
4901 void InfoManager::prelaunch_helper_ise (void)
4903 m_impl->prelaunch_helper_ise ();
4906 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
4907 bool InfoManager::process_key_event (KeyEvent& key, uint32 serial, uint32 keycode)
4909 return m_impl->process_key_event (key, serial, keycode);
4912 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
4913 void InfoManager::get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info)
4915 m_impl->get_input_panel_geometry (client_id, info);
4918 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
4919 void InfoManager::get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info)
4921 m_impl->get_candidate_window_geometry (client_id, info);
4924 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
4925 void InfoManager::get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len)
4927 m_impl->get_ise_language_locale (client_id, data, len);
4930 //ISM_TRANS_CMD_SET_LAYOUT
4931 void InfoManager::set_ise_layout (int client_id, uint32 layout)
4933 m_impl->set_ise_layout (client_id, layout);
4936 //ISM_TRANS_CMD_SET_INPUT_MODE
4937 void InfoManager::set_ise_input_mode (int client_id, uint32 input_mode)
4939 m_impl->set_ise_input_mode (client_id, input_mode);
4942 //ISM_TRANS_CMD_SET_INPUT_HINT
4943 void InfoManager::set_ise_input_hint (int client_id, uint32 input_hint)
4945 m_impl->set_ise_input_hint (client_id, input_hint);
4948 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
4949 void InfoManager::update_ise_bidi_direction (int client_id, uint32 bidi_direction)
4951 m_impl->update_ise_bidi_direction (client_id, bidi_direction);
4955 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
4956 void InfoManager::set_ise_language (int client_id, uint32 language)
4958 m_impl->set_ise_language (client_id, language);
4961 //ISM_TRANS_CMD_SET_ISE_IMDATA
4962 void InfoManager::set_ise_imdata (int client_id, const char* imdata, size_t len)
4964 m_impl->set_ise_imdata (client_id, imdata, len);
4967 //ISM_TRANS_CMD_GET_ISE_IMDATA
4968 bool InfoManager:: get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len)
4970 return m_impl->get_ise_imdata (client_id, imdata, len);
4973 //ISM_TRANS_CMD_GET_LAYOUT
4974 bool InfoManager:: get_ise_layout (int client_id, _OUT_ uint32& layout)
4976 return m_impl->get_ise_layout (client_id, layout);
4979 //ISM_TRANS_CMD_GET_ISE_STATE
4980 void InfoManager::get_ise_state (int client_id, _OUT_ int& state)
4982 m_impl->get_ise_state (client_id, state);
4985 //ISM_TRANS_CMD_GET_ACTIVE_ISE
4986 void InfoManager::get_active_ise (int client_id, _OUT_ String& default_uuid)
4988 m_impl->get_active_ise (client_id, default_uuid);
4991 //ISM_TRANS_CMD_GET_ISE_LIST
4992 void InfoManager::get_ise_list (int client_id, _OUT_ std::vector<String>& strlist)
4994 m_impl->get_ise_list (client_id, strlist);
4997 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
4998 void InfoManager::get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info)
5000 m_impl->get_all_helper_ise_info (client_id, info);
5003 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
5004 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5005 void InfoManager::set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled)
5007 m_impl->set_enable_helper_ise_info (client_id, appid, is_enabled);
5010 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
5011 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5012 void InfoManager::show_helper_ise_list (int client_id)
5014 m_impl->show_helper_ise_list (client_id);
5017 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
5018 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5019 void InfoManager::show_helper_ise_selector (int client_id)
5021 m_impl->show_helper_ise_selector (client_id);
5024 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
5026 void InfoManager::is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled)
5028 m_impl->is_helper_ise_enabled (client_id, strAppid, nEnabled);
5031 //ISM_TRANS_CMD_GET_ISE_INFORMATION
5032 void InfoManager::get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
5033 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName)
5035 m_impl->get_ise_information (client_id, strUuid, strName, strLanguage, nType, nOption, strModuleName);
5038 //ISM_TRANS_CMD_RESET_ISE_OPTION
5039 //reply SCIM_TRANS_CMD_OK
5040 bool InfoManager:: reset_ise_option (int client_id)
5042 return m_impl->reset_ise_option (client_id);
5045 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
5047 bool InfoManager:: set_active_ise_by_uuid (int client_id, char* buf, size_t len)
5049 return m_impl->set_active_ise_by_uuid (client_id, buf, len);
5052 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
5053 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5054 void InfoManager::set_initial_ise_by_uuid (int client_id, char* buf, size_t len)
5056 m_impl->set_initial_ise_by_uuid (client_id, buf, len);
5059 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
5060 void InfoManager::set_ise_return_key_type (int client_id, uint32 type)
5062 m_impl->set_ise_return_key_type (client_id, type);
5065 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
5067 bool InfoManager:: get_ise_return_key_type (int client_id, _OUT_ uint32& type)
5069 return m_impl->get_ise_return_key_type (client_id, type);
5073 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
5074 void InfoManager::set_ise_return_key_disable (int client_id, uint32 disabled)
5076 m_impl->set_ise_return_key_disable (client_id, disabled);
5079 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
5080 bool InfoManager::get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled)
5082 return m_impl->get_ise_return_key_disable (client_id, disabled);
5085 //ISM_TRANS_CMD_SET_CAPS_MODE
5086 void InfoManager::set_ise_caps_mode (int client_id, uint32 mode)
5088 m_impl->set_ise_caps_mode (client_id, mode);
5091 //SCIM_TRANS_CMD_RELOAD_CONFIG
5092 void InfoManager::reload_config (void)
5094 m_impl->reload_config ();
5097 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
5098 void InfoManager::will_show_ack (int client_id)
5100 m_impl->will_show_ack (client_id);
5103 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
5104 void InfoManager::will_hide_ack (int client_id)
5106 m_impl->will_hide_ack (client_id);
5109 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
5110 void InfoManager::reset_default_ise (int client_id)
5112 m_impl->reset_default_ise (client_id);
5115 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
5116 void InfoManager::set_keyboard_mode (int client_id, uint32 mode)
5118 m_impl->set_keyboard_mode (client_id, mode);
5121 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
5122 void InfoManager::candidate_will_hide_ack (int client_id)
5124 m_impl->candidate_will_hide_ack (client_id);
5127 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
5128 void InfoManager::get_active_helper_option (int client_id, _OUT_ uint32& option)
5130 m_impl->get_active_helper_option (client_id, option);
5133 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
5134 void InfoManager::show_ise_option_window (int client_id, int caller_pid)
5136 m_impl->show_ise_option_window (client_id, caller_pid);
5139 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
5140 void InfoManager::get_ise_setting_appid (int client_id, String &ime_setting_appid)
5142 m_impl->get_ise_setting_appid (client_id, ime_setting_appid);
5145 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
5146 void InfoManager::resume_ise_option_window (int client_id)
5148 m_impl->resume_ise_option_window (client_id);
5151 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
5152 void InfoManager::set_ise_keyboard_mode (int client_id, uint32 mode)
5154 m_impl->set_ise_keyboard_mode (client_id, mode);
5157 //ISM_TRANS_CMD_SET_PREDICTION_HINT
5158 void InfoManager::set_prediction_hint (int client_id, String prediction_hint)
5160 m_impl->set_prediction_hint (client_id, prediction_hint);
5163 //ISM_TRANS_CMD_SET_MIME_TYPE
5164 void InfoManager::set_ise_mime_type (int client_id, String mime_type)
5166 m_impl->set_ise_mime_type (client_id, mime_type);
5169 //ISM_TRANS_CMD_FINALIZE_CONTENT
5170 void InfoManager::finalize_content (int client_id, String text, uint32 cursor_pos)
5172 m_impl->finalize_content (client_id, text, cursor_pos);
5175 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
5176 void InfoManager::set_prediction_hint_data (int client_id, String key, String value)
5178 m_impl->set_prediction_hint_data (client_id, key, value);
5181 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
5182 void InfoManager::set_optimization_hint(int client_id, uint32 hint)
5184 m_impl->set_optimization_hint(client_id, hint);
5187 //ISM_TRANS_CMD_SET_ISE_ENABLE
5188 void InfoManager::set_ise_enable (int client_id, uint32 enabled)
5190 m_impl->set_ise_enable (client_id, enabled);
5193 //ISM_TRANS_CMD_EXPAND_CANDIDATE
5194 void InfoManager::expand_candidate ()
5196 m_impl->expand_candidate ();
5199 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
5200 void InfoManager::contract_candidate ()
5202 m_impl->contract_candidate ();
5205 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
5206 void InfoManager::get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info)
5208 m_impl->get_recent_ise_geometry (client_id, angle, info);
5211 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
5212 bool InfoManager::remoteinput_send_input_message (int client_id, char* buf, size_t len)
5214 return m_impl->send_remote_input_message (client_id, buf, len);
5217 void InfoManager::remoteinput_send_surrounding_text (const char* text, uint32 cursor)
5219 return m_impl->send_remote_surrounding_text (text, cursor);
5222 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
5223 void InfoManager::register_panel_client (uint32 client_id, uint32 id)
5225 m_impl->register_panel_client (client_id, id);
5228 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
5229 void InfoManager::register_input_context (uint32 client_id, uint32 context, String uuid)
5231 m_impl->register_input_context (client_id, context, uuid);
5234 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
5235 void InfoManager::remove_input_context (uint32 client_id, uint32 context)
5237 m_impl->remove_input_context (client_id, context);
5240 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
5241 void InfoManager::socket_reset_input_context (int client_id, uint32 context)
5243 m_impl->socket_reset_input_context (client_id, context);
5246 //SCIM_TRANS_CMD_FOCUS_IN
5247 void InfoManager::focus_in (int client_id, uint32 context, String uuid)
5249 m_impl->focus_in (client_id, context, uuid);
5252 //SCIM_TRANS_CMD_FOCUS_OUT
5253 void InfoManager::focus_out (int client_id, uint32 context)
5255 m_impl->focus_out (client_id, context);
5258 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
5259 bool InfoManager::process_input_device_event(int client, uint32 type, const char *data, size_t len, _OUT_ uint32& result)
5261 return m_impl->process_input_device_event(client, type, data, len, result);
5264 //ISM_TRANS_CMD_TURN_ON_LOG
5265 void InfoManager::socket_turn_on_log (uint32 isOn)
5267 m_impl->socket_turn_on_log (isOn);
5270 //SCIM_TRANS_CMD_PANEL_TURN_ON
5271 void InfoManager::socket_turn_on (void)
5273 m_impl->socket_turn_on ();
5276 //SCIM_TRANS_CMD_PANEL_TURN_OFF
5277 void InfoManager::socket_turn_off (void)
5279 m_impl->socket_turn_off ();
5282 //SCIM_TRANS_CMD_UPDATE_SCREEN
5283 void InfoManager::socket_update_screen (int client_id, uint32 num)
5285 m_impl->socket_update_screen (client_id, num);
5288 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
5289 void InfoManager::socket_update_spot_location (uint32 x, uint32 y, uint32 top_y)
5291 m_impl->socket_update_spot_location (x, y, top_y);
5294 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
5295 void InfoManager::socket_update_cursor_position (uint32 cursor_pos)
5297 m_impl->socket_update_cursor_position (cursor_pos);
5300 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
5301 void InfoManager::socket_update_surrounding_text (String text, uint32 cursor)
5303 m_impl->socket_update_surrounding_text (text, cursor);
5306 void InfoManager::remoteinput_callback_focus_in (void)
5308 m_impl->remoteinput_callback_focus_in ();
5311 void InfoManager::remoteinput_callback_focus_out (void)
5313 m_impl->remoteinput_callback_focus_out ();
5316 void InfoManager::remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type)
5318 m_impl->remoteinput_callback_entry_metadata (hint, layout, variation, autocapital_type, return_key_disabled, return_key_type);
5321 void InfoManager::remoteinput_callback_surrounding_text (String text, uint32 cursor)
5323 m_impl->remoteinput_callback_surrounding_text (text, cursor);
5326 void InfoManager::remoteinput_callback_input_resource (uint32 input_resource)
5328 m_impl->remoteinput_callback_input_resource (input_resource);
5331 void InfoManager::remoteinput_callback_key_symbol (String key_symbol, bool press, uint32 timestamp)
5333 m_impl->remoteinput_callback_key_symbol (key_symbol, press, timestamp);
5336 void InfoManager::remoteinput_callback_cursor_position (uint32 cursor)
5338 m_impl->remoteinput_callback_cursor_position (cursor);
5341 //ISM_TRANS_CMD_UPDATE_SELECTION
5342 void InfoManager::socket_update_selection (String text)
5344 m_impl->socket_update_selection (text);
5347 //FIXME: useless anymore
5348 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
5349 void InfoManager::socket_update_factory_info (PanelFactoryInfo& info)
5351 m_impl->socket_update_factory_info (info);
5354 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
5355 void InfoManager::socket_show_help (String help)
5357 m_impl->socket_show_help (help);
5360 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
5361 void InfoManager::socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec)
5363 m_impl->socket_show_factory_menu (vec);
5366 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5367 void InfoManager::socket_show_preedit_string (void)
5369 m_impl->socket_show_preedit_string ();
5372 //SCIM_TRANS_CMD_SHOW_AUX_STRING
5373 void InfoManager::socket_show_aux_string (void)
5375 m_impl->socket_show_aux_string ();
5378 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
5379 void InfoManager::socket_show_lookup_table (void)
5381 m_impl->socket_show_lookup_table ();
5384 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
5385 void InfoManager::socket_show_associate_table (void)
5387 m_impl->socket_show_associate_table ();
5390 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5391 void InfoManager::socket_hide_preedit_string (void)
5393 m_impl->socket_hide_preedit_string ();
5396 //SCIM_TRANS_CMD_HIDE_AUX_STRING
5397 void InfoManager::socket_hide_aux_string (void)
5399 m_impl->socket_hide_aux_string ();
5402 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
5403 void InfoManager::socket_hide_lookup_table (void)
5405 m_impl->socket_hide_lookup_table ();
5408 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
5409 void InfoManager::socket_hide_associate_table (void)
5411 m_impl->socket_hide_associate_table ();
5414 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5415 void InfoManager::socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret)
5417 m_impl->socket_update_preedit_string (str, attrs, caret);
5420 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5421 void InfoManager::socket_update_preedit_caret (uint32 caret)
5423 m_impl->socket_update_preedit_caret (caret);
5426 //ISM_TRANS_CMD_RECAPTURE_STRING
5427 void InfoManager::socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs)
5429 m_impl->socket_recapture_string (offset, len, preedit, commit, attrs);
5432 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
5433 void InfoManager::socket_update_aux_string (String& str, const AttributeList& attrs)
5435 m_impl->socket_update_aux_string (str, attrs);
5438 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
5439 void InfoManager::socket_update_lookup_table (const LookupTable& table)
5441 m_impl->socket_update_lookup_table (table);
5444 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
5445 void InfoManager::socket_update_associate_table (const LookupTable& table)
5447 m_impl->socket_update_associate_table (table);
5450 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5451 void InfoManager::socket_register_properties (const PropertyList& properties)
5453 m_impl->socket_register_properties (properties);
5456 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5457 void InfoManager::socket_update_property (const Property& property)
5459 m_impl->socket_update_property (property);
5462 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
5463 void InfoManager::socket_get_keyboard_ise_list (String& uuid)
5465 m_impl->socket_get_keyboard_ise_list (uuid);
5468 //ISM_TRANS_CMD_SET_CANDIDATE_UI
5469 void InfoManager::socket_set_candidate_ui (uint32 portrait_line, uint32 mode)
5471 m_impl->socket_set_candidate_ui (portrait_line, mode);
5474 //ISM_TRANS_CMD_GET_CANDIDATE_UI
5475 void InfoManager::socket_get_candidate_ui (String uuid)
5477 m_impl->socket_get_candidate_ui (uuid);
5480 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
5481 void InfoManager::socket_set_candidate_position (uint32 left, uint32 top)
5483 m_impl->socket_set_candidate_position (left, top);
5486 //ISM_TRANS_CMD_HIDE_CANDIDATE
5487 void InfoManager::socket_hide_candidate (void)
5489 m_impl->socket_hide_candidate ();
5492 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
5493 void InfoManager::socket_get_candidate_geometry (String& uuid)
5495 m_impl->socket_get_candidate_geometry (uuid);
5498 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
5499 void InfoManager::socket_set_keyboard_ise (String uuid)
5501 m_impl->socket_set_keyboard_ise (uuid);
5504 //ISM_TRANS_CMD_SELECT_CANDIDATE
5505 void InfoManager::socket_helper_select_candidate (uint32 index)
5507 m_impl->socket_helper_select_candidate (index);
5510 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
5511 void InfoManager::socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height)
5513 m_impl->socket_helper_update_ise_geometry (client, x, y, width, height);
5516 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
5517 void InfoManager::socket_get_keyboard_ise (String uuid)
5519 m_impl->socket_get_keyboard_ise (uuid);
5522 //SCIM_TRANS_CMD_START_HELPER
5523 void InfoManager::socket_start_helper (int client_id, uint32 context, String uuid)
5525 m_impl->socket_start_helper (client_id, context, uuid);
5528 //SCIM_TRANS_CMD_STOP_HELPER
5529 void InfoManager::socket_stop_helper (int client_id, uint32 context, String uuid)
5531 m_impl->socket_stop_helper (client_id, context, uuid);
5534 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
5535 void InfoManager::socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans)
5537 m_impl->socket_send_helper_event (client_id, context, uuid, _nest_trans);
5540 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5541 void InfoManager::socket_helper_register_properties (int client, PropertyList& properties)
5543 m_impl->socket_helper_register_properties (client, properties);
5546 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5547 void InfoManager::socket_helper_update_property (int client, Property& property)
5549 m_impl->socket_helper_update_property (client, property);
5552 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
5553 void InfoManager::socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans)
5555 m_impl->socket_helper_send_imengine_event (client, target_ic, target_uuid, nest_trans);
5558 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
5559 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
5560 void InfoManager::socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5562 m_impl->socket_helper_send_key_event (client, target_ic, target_uuid, key);
5565 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
5566 void InfoManager::socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5568 m_impl->socket_helper_forward_key_event (client, target_ic, target_uuid, key);
5571 //SCIM_TRANS_CMD_COMMIT_STRING
5572 void InfoManager::socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr)
5574 m_impl->socket_helper_commit_string (client, target_ic, target_uuid, wstr);
5577 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
5578 void InfoManager::socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after)
5580 m_impl->socket_helper_get_surrounding_text (client, uuid, maxlen_before, maxlen_after);
5583 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
5584 void InfoManager::socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len)
5586 m_impl->socket_helper_delete_surrounding_text (client, offset, len);
5589 //SCIM_TRANS_CMD_GET_SELECTION
5590 void InfoManager::socket_helper_get_selection (int client, String uuid)
5592 m_impl->socket_helper_get_selection (client, uuid);
5595 //SCIM_TRANS_CMD_SET_SELECTION
5596 void InfoManager::socket_helper_set_selection (int client, uint32 start, uint32 end)
5598 m_impl->socket_helper_set_selection (client, start, end);
5601 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5602 void InfoManager::socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid)
5604 m_impl->socket_helper_show_preedit_string (client, target_ic, target_uuid);
5607 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5608 void InfoManager::socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid)
5610 m_impl->socket_helper_hide_preedit_string (client, target_ic, target_uuid);
5613 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5614 void InfoManager::socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit,
5615 WideString commit, AttributeList& attrs, uint32 caret)
5617 m_impl->socket_helper_update_preedit_string (client, target_ic, target_uuid, preedit, commit, attrs, caret);
5620 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5621 void InfoManager::socket_helper_update_preedit_caret (int client, uint32 caret)
5623 m_impl->socket_helper_update_preedit_caret (client, caret);
5626 //ISM_TRANS_CMD_RECAPTURE_STRING
5627 void InfoManager::socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
5628 WideString commit, AttributeList& attrs)
5630 m_impl->socket_helper_recapture_string (client, target_ic, target_uuid, offset, len, preedit, commit, attrs);
5633 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
5634 void InfoManager::socket_helper_register_helper (int client, HelperInfo& info)
5636 m_impl->socket_helper_register_helper (client, info);
5639 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
5640 void InfoManager::socket_helper_register_helper_passive (int client, HelperInfo& info)
5642 m_impl->socket_helper_register_helper_passive (client, info);
5645 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
5646 void InfoManager::socket_helper_update_input_context (int client, uint32 type, uint32 value)
5648 m_impl->socket_helper_update_input_context (client, type, value);
5651 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
5652 void InfoManager::socket_helper_update_language_locale(int client, String locale)
5654 m_impl->socket_helper_update_language_locale(client, locale);
5657 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
5658 void InfoManager::socket_helper_send_private_command (int client, String command)
5660 m_impl->socket_helper_send_private_command (client, command);
5663 //SCIM_TRANS_CMD_COMMIT_CONTENT
5664 void InfoManager::socket_helper_commit_content (int client, String content, String description, String mime_types)
5666 m_impl->socket_helper_commit_content (client, content, description, mime_types);
5669 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
5670 void InfoManager::UPDATE_ISE_EXIT (int client)
5672 m_impl->UPDATE_ISE_EXIT (client);
5675 //ISM_TRANS_CMD_PROCESS_KEY_EVENT_DONE
5676 void InfoManager::process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial)
5678 m_impl->process_key_event_done (key, ret, serial);
5681 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
5682 void InfoManager::request_ise_hide ()
5684 m_impl->request_ise_hide ();
5687 bool InfoManager::check_privilege_by_sockfd (int client_id, const String& privilege) {
5688 return m_impl->check_privilege_by_sockfd (client_id, privilege);
5691 void InfoManager::add_client (int client_id, uint32 key, ClientType type)
5693 m_impl->add_client (client_id, key, type);
5696 void InfoManager::del_client (int client_id)
5698 m_impl->del_client (client_id);
5701 bool InfoManager::set_autocapital_type (int mode)
5703 return m_impl->set_autocapital_type (mode);
5706 void InfoManager::set_prediction_allow (int client, bool mode)
5708 m_impl->set_prediction_allow (client, mode);
5711 void InfoManager::reshow_input_panel ()
5713 m_impl->reshow_input_panel ();
5716 void InfoManager::request_ise_terminate ()
5718 m_impl->request_ise_terminate ();
5721 void InfoManager::set_floating_mode (uint32 floating_mode)
5723 m_impl->set_floating_mode (floating_mode);
5726 void InfoManager::set_floating_drag_enabled (uint32 enabled)
5728 m_impl->set_floating_drag_enabled (enabled);
5731 //////////////////////////////////Message function end/////////////////////////////////////////
5734 InfoManager::signal_connect_turn_on (InfoManagerSlotVoid* slot)
5736 return m_impl->signal_connect_turn_on (slot);
5740 InfoManager::signal_connect_turn_off (InfoManagerSlotVoid* slot)
5742 return m_impl->signal_connect_turn_off (slot);
5746 InfoManager::signal_connect_show_panel (InfoManagerSlotVoid* slot)
5748 return m_impl->signal_connect_show_panel (slot);
5752 InfoManager::signal_connect_hide_panel (InfoManagerSlotVoid* slot)
5754 return m_impl->signal_connect_hide_panel (slot);
5758 InfoManager::signal_connect_update_screen (InfoManagerSlotInt* slot)
5760 return m_impl->signal_connect_update_screen (slot);
5764 InfoManager::signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot)
5766 return m_impl->signal_connect_update_spot_location (slot);
5770 InfoManager::signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot)
5772 return m_impl->signal_connect_update_factory_info (slot);
5776 InfoManager::signal_connect_start_default_ise (InfoManagerSlotVoid* slot)
5778 return m_impl->signal_connect_start_default_ise (slot);
5782 InfoManager::signal_connect_stop_default_ise (InfoManagerSlotBool* slot)
5784 return m_impl->signal_connect_stop_default_ise (slot);
5788 InfoManager::signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot)
5790 return m_impl->signal_connect_set_candidate_ui (slot);
5794 InfoManager::signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot)
5796 return m_impl->signal_connect_get_candidate_ui (slot);
5800 InfoManager::signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot)
5802 return m_impl->signal_connect_set_candidate_position (slot);
5806 InfoManager::signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot)
5808 return m_impl->signal_connect_get_candidate_geometry (slot);
5812 InfoManager::signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot)
5814 return m_impl->signal_connect_get_input_panel_geometry (slot);
5818 InfoManager::signal_connect_set_keyboard_ise (InfoManagerSlotString* slot)
5820 return m_impl->signal_connect_set_keyboard_ise (slot);
5824 InfoManager::signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot)
5826 return m_impl->signal_connect_get_keyboard_ise (slot);
5830 InfoManager::signal_connect_show_help (InfoManagerSlotString* slot)
5832 return m_impl->signal_connect_show_help (slot);
5836 InfoManager::signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot)
5838 return m_impl->signal_connect_show_factory_menu (slot);
5842 InfoManager::signal_connect_show_preedit_string (InfoManagerSlotVoid* slot)
5844 return m_impl->signal_connect_show_preedit_string (slot);
5848 InfoManager::signal_connect_show_aux_string (InfoManagerSlotVoid* slot)
5850 return m_impl->signal_connect_show_aux_string (slot);
5854 InfoManager::signal_connect_show_lookup_table (InfoManagerSlotVoid* slot)
5856 return m_impl->signal_connect_show_lookup_table (slot);
5860 InfoManager::signal_connect_show_associate_table (InfoManagerSlotVoid* slot)
5862 return m_impl->signal_connect_show_associate_table (slot);
5866 InfoManager::signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot)
5868 return m_impl->signal_connect_hide_preedit_string (slot);
5872 InfoManager::signal_connect_hide_aux_string (InfoManagerSlotVoid* slot)
5874 return m_impl->signal_connect_hide_aux_string (slot);
5878 InfoManager::signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot)
5880 return m_impl->signal_connect_hide_lookup_table (slot);
5884 InfoManager::signal_connect_hide_associate_table (InfoManagerSlotVoid* slot)
5886 return m_impl->signal_connect_hide_associate_table (slot);
5890 InfoManager::signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot)
5892 return m_impl->signal_connect_update_preedit_string (slot);
5896 InfoManager::signal_connect_update_preedit_caret (InfoManagerSlotInt* slot)
5898 return m_impl->signal_connect_update_preedit_caret (slot);
5902 InfoManager::signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot)
5904 return m_impl->signal_connect_update_aux_string (slot);
5908 InfoManager::signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot)
5910 return m_impl->signal_connect_update_lookup_table (slot);
5914 InfoManager::signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot)
5916 return m_impl->signal_connect_update_associate_table (slot);
5920 InfoManager::signal_connect_register_properties (InfoManagerSlotPropertyList* slot)
5922 return m_impl->signal_connect_register_properties (slot);
5926 InfoManager::signal_connect_update_property (InfoManagerSlotProperty* slot)
5928 return m_impl->signal_connect_update_property (slot);
5932 InfoManager::signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot)
5934 return m_impl->signal_connect_register_helper_properties (slot);
5938 InfoManager::signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot)
5940 return m_impl->signal_connect_update_helper_property (slot);
5944 InfoManager::signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot)
5946 return m_impl->signal_connect_register_helper (slot);
5950 InfoManager::signal_connect_remove_helper (InfoManagerSlotInt* slot)
5952 return m_impl->signal_connect_remove_helper (slot);
5956 InfoManager::signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot)
5958 return m_impl->signal_connect_set_active_ise_by_uuid (slot);
5962 InfoManager::signal_connect_focus_in (InfoManagerSlotVoid* slot)
5964 return m_impl->signal_connect_focus_in (slot);
5968 InfoManager::signal_connect_focus_out (InfoManagerSlotVoid* slot)
5970 return m_impl->signal_connect_focus_out (slot);
5974 InfoManager::signal_connect_expand_candidate (InfoManagerSlotVoid* slot)
5976 return m_impl->signal_connect_expand_candidate (slot);
5980 InfoManager::signal_connect_contract_candidate (InfoManagerSlotVoid* slot)
5982 return m_impl->signal_connect_contract_candidate (slot);
5986 InfoManager::signal_connect_select_candidate (InfoManagerSlotInt* slot)
5988 return m_impl->signal_connect_select_candidate (slot);
5992 InfoManager::signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot)
5994 return m_impl->signal_connect_get_ise_list (slot);
5998 InfoManager::signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot)
6000 return m_impl->signal_connect_get_all_helper_ise_info (slot);
6004 InfoManager::signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot)
6006 return m_impl->signal_connect_set_has_option_helper_ise_info (slot);
6010 InfoManager::signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot)
6012 return m_impl->signal_connect_set_enable_helper_ise_info (slot);
6016 InfoManager::signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot)
6018 return m_impl->signal_connect_show_helper_ise_list (slot);
6022 InfoManager::signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot)
6024 return m_impl->signal_connect_show_helper_ise_selector (slot);
6028 InfoManager::signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot)
6030 return m_impl->signal_connect_is_helper_ise_enabled (slot);
6034 InfoManager::signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot)
6036 return m_impl->signal_connect_get_ise_information (slot);
6040 InfoManager::signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot)
6042 return m_impl->signal_connect_get_keyboard_ise_list (slot);
6046 InfoManager::signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot)
6048 return m_impl->signal_connect_update_ise_geometry (slot);
6052 InfoManager::signal_connect_get_language_list (InfoManagerSlotStringVector* slot)
6054 return m_impl->signal_connect_get_language_list (slot);
6058 InfoManager::signal_connect_get_all_language (InfoManagerSlotStringVector* slot)
6060 return m_impl->signal_connect_get_all_language (slot);
6064 InfoManager::signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot)
6066 return m_impl->signal_connect_get_ise_language (slot);
6070 InfoManager::signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot)
6072 return m_impl->signal_connect_get_ise_info_by_uuid (slot);
6076 InfoManager::signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot)
6078 return m_impl->signal_connect_send_key_event (slot);
6082 InfoManager::signal_connect_accept_connection (InfoManagerSlotInt* slot)
6084 return m_impl->signal_connect_accept_connection (slot);
6088 InfoManager::signal_connect_close_connection (InfoManagerSlotInt* slot)
6090 return m_impl->signal_connect_close_connection (slot);
6094 InfoManager::signal_connect_exit (InfoManagerSlotVoid* slot)
6096 return m_impl->signal_connect_exit (slot);
6100 InfoManager::signal_connect_transaction_start (InfoManagerSlotVoid* slot)
6102 return m_impl->signal_connect_transaction_start (slot);
6106 InfoManager::signal_connect_transaction_end (InfoManagerSlotVoid* slot)
6108 return m_impl->signal_connect_transaction_end (slot);
6112 InfoManager::signal_connect_lock (InfoManagerSlotVoid* slot)
6114 return m_impl->signal_connect_lock (slot);
6118 InfoManager::signal_connect_unlock (InfoManagerSlotVoid* slot)
6120 return m_impl->signal_connect_unlock (slot);
6124 InfoManager::signal_connect_update_input_context (InfoManagerSlotIntInt* slot)
6126 return m_impl->signal_connect_update_input_context (slot);
6130 InfoManager::signal_connect_show_ise (InfoManagerSlotVoid* slot)
6132 return m_impl->signal_connect_show_ise (slot);
6136 InfoManager::signal_connect_hide_ise (InfoManagerSlotVoid* slot)
6138 return m_impl->signal_connect_hide_ise (slot);
6142 InfoManager::signal_connect_will_show_ack (InfoManagerSlotVoid* slot)
6144 return m_impl->signal_connect_will_show_ack (slot);
6148 InfoManager::signal_connect_will_hide_ack (InfoManagerSlotVoid* slot)
6150 return m_impl->signal_connect_will_hide_ack (slot);
6154 InfoManager::signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot)
6156 return m_impl->signal_connect_set_keyboard_mode (slot);
6160 InfoManager::signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot)
6162 return m_impl->signal_connect_candidate_will_hide_ack (slot);
6166 InfoManager::signal_connect_get_ise_state (InfoManagerSlotInt2* slot)
6168 return m_impl->signal_connect_get_ise_state (slot);
6172 InfoManager::signal_connect_run_helper (InfoManagerSlotString3* slot)
6174 return m_impl->signal_connect_run_helper (slot);
6178 InfoManager::signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
6180 return m_impl->signal_connect_launch_option_application (slot);
6184 InfoManager::signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
6186 return m_impl->signal_connect_get_ise_setting_appid (slot);
6190 InfoManager::signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot)
6192 return m_impl->signal_connect_get_recent_ise_geometry (slot);
6196 InfoManager::signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
6198 return m_impl->signal_connect_check_privilege_by_sockfd (slot);
6202 InfoManager::signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
6204 return m_impl->signal_connect_remoteinput_send_input_message (slot);
6208 InfoManager::signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
6210 return m_impl->signal_connect_remoteinput_send_surrounding_text (slot);
6214 InfoManager::signal_connect_set_preloading_ise (InfoManagerSlotBool* slot)
6216 return m_impl->signal_connect_set_preloading_ise (slot);
6219 } /* namespace scim */
6222 vi:ts=4:nowrap:ai:expandtab