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 InfoManagerSignalBool m_signal_start_default_ise;
342 InfoManagerSignalBool m_signal_stop_default_ise;
343 InfoManagerSignalIntInt m_signal_update_input_context;
344 InfoManagerSignalString m_signal_update_language_locale;
345 InfoManagerSignalIntInt m_signal_set_candidate_ui;
346 InfoManagerSignalIntInt2 m_signal_get_candidate_ui;
347 InfoManagerSignalIntInt m_signal_set_candidate_position;
348 InfoManagerSignalRect m_signal_get_candidate_geometry;
349 InfoManagerSignalRect m_signal_get_input_panel_geometry;
350 InfoManagerSignalString m_signal_set_keyboard_ise;
351 InfoManagerSignalString2 m_signal_get_keyboard_ise;
352 InfoManagerSignalString m_signal_show_help;
353 InfoManagerSignalFactoryInfoVector m_signal_show_factory_menu;
354 InfoManagerSignalVoid m_signal_show_preedit_string;
355 InfoManagerSignalVoid m_signal_show_aux_string;
356 InfoManagerSignalVoid m_signal_show_lookup_table;
357 InfoManagerSignalVoid m_signal_show_associate_table;
358 InfoManagerSignalVoid m_signal_hide_preedit_string;
359 InfoManagerSignalVoid m_signal_hide_aux_string;
360 InfoManagerSignalVoid m_signal_hide_lookup_table;
361 InfoManagerSignalVoid m_signal_hide_associate_table;
362 InfoManagerSignalAttributeStringInt m_signal_update_preedit_string;
363 InfoManagerSignalAttributeInt2String2 m_signal_recapture_string;
364 InfoManagerSignalInt m_signal_update_preedit_caret;
365 InfoManagerSignalAttributeString m_signal_update_aux_string;
366 InfoManagerSignalLookupTable m_signal_update_lookup_table;
367 InfoManagerSignalLookupTable m_signal_update_associate_table;
368 InfoManagerSignalPropertyList m_signal_register_properties;
369 InfoManagerSignalProperty m_signal_update_property;
370 InfoManagerSignalIntPropertyList m_signal_register_helper_properties;
371 InfoManagerSignalIntProperty m_signal_update_helper_property;
372 InfoManagerSignalIntHelperInfo m_signal_register_helper;
373 InfoManagerSignalInt m_signal_remove_helper;
374 InfoManagerSignalStringBool m_signal_set_active_ise_by_uuid;
375 InfoManagerSignalVoid m_signal_focus_in;
376 InfoManagerSignalVoid m_signal_focus_out;
377 InfoManagerSignalVoid m_signal_expand_candidate;
378 InfoManagerSignalVoid m_signal_contract_candidate;
379 InfoManagerSignalInt m_signal_select_candidate;
380 InfoManagerSignalBoolStringVector m_signal_get_ise_list;
381 InfoManagerSignalBoolHelperInfo m_signal_get_all_helper_ise_info;
382 InfoManagerSignalStringBool m_signal_set_has_option_helper_ise_info;
383 InfoManagerSignalStringBool m_signal_set_enable_helper_ise_info;
384 InfoManagerSignalVoid m_signal_show_helper_ise_list;
385 InfoManagerSignalVoid m_signal_show_helper_ise_selector;
386 InfoManagerSignalStringInt m_signal_is_helper_ise_enabled;
387 InfoManagerSignalBoolString4int2 m_signal_get_ise_information;
388 InfoManagerSignalBoolStringVector m_signal_get_keyboard_ise_list;
389 InfoManagerSignalIntIntIntInt m_signal_update_ise_geometry;
390 InfoManagerSignalStringVector m_signal_get_language_list;
391 InfoManagerSignalStringVector m_signal_get_all_language;
392 InfoManagerSignalStrStringVector m_signal_get_ise_language;
393 InfoManagerSignalStringISEINFO m_signal_get_ise_info_by_uuid;
394 InfoManagerSignalKeyEvent m_signal_send_key_event;
396 InfoManagerSignalInt m_signal_accept_connection;
397 InfoManagerSignalInt m_signal_close_connection;
398 InfoManagerSignalVoid m_signal_exit;
400 InfoManagerSignalVoid m_signal_transaction_start;
401 InfoManagerSignalVoid m_signal_transaction_end;
403 InfoManagerSignalVoid m_signal_lock;
404 InfoManagerSignalVoid m_signal_unlock;
406 InfoManagerSignalVoid m_signal_show_ise;
407 InfoManagerSignalVoid m_signal_hide_ise;
409 InfoManagerSignalVoid m_signal_will_show_ack;
410 InfoManagerSignalVoid m_signal_will_hide_ack;
412 InfoManagerSignalInt m_signal_set_keyboard_mode;
414 InfoManagerSignalVoid m_signal_candidate_will_hide_ack;
415 InfoManagerSignalInt2 m_signal_get_ise_state;
416 InfoManagerSignalString3 m_signal_run_helper;
418 InfoManagerSignalIntRect m_signal_get_recent_ise_geometry;
420 InfoManagerSignalStringBool m_signal_remoteinput_send_input_message;
421 InfoManagerSignalIntString m_signal_remoteinput_send_surrounding_text;
423 InfoManagerSignalIntString2 m_signal_check_privilege_by_sockfd;
425 InfoManagerSignalBoolString m_signal_launch_option_application;
426 InfoManagerSignalBoolString2 m_signal_get_ise_setting_appid;
428 PanelAgentManager m_panel_agent_manager;
430 void delete_ise_context_buffer (void) {
431 if (m_ise_context_buffer != NULL) {
432 delete[] m_ise_context_buffer;
433 m_ise_context_buffer = NULL;
434 m_ise_context_length = 0;
438 void delete_imdata_buffer (void) {
439 if (m_imdata_buffer != NULL) {
440 delete[] m_imdata_buffer;
441 m_imdata_buffer = NULL;
448 : m_current_screen (0),
449 m_current_socket_client (-1), m_current_client_context (0),
450 m_current_toolbar_mode (TOOLBAR_KEYBOARD_MODE),
451 m_current_helper_option (0),
452 m_pending_active_imcontrol_id (-1),
453 m_show_request_client_id (-1),
454 m_active_client_id (-1),
455 m_should_shared_ise (false),
456 m_ise_exiting (false), m_is_imengine_aux (false), m_is_imengine_candidate (false),
457 m_refocus_needed (false),
458 m_reshow_needed (false),
459 m_restart_needed (false),
460 m_is_ise_alive (false),
461 m_last_socket_client (-1), m_last_client_context (0),
462 m_ise_context_buffer (NULL), m_ise_context_length (0),
463 m_imdata_buffer (NULL), m_imdata_length (0) {
464 m_current_ise_name = String (_ ("English Keyboard"));
465 m_imcontrol_repository.clear ();
466 m_imcontrol_map.clear ();
467 m_current_send_remoteinput_id.clear ();
468 m_current_recv_remoteinput_id.clear ();
469 m_panel_client_map.clear ();
472 ~InfoManagerImpl () {
473 delete_ise_context_buffer ();
474 delete_imdata_buffer ();
477 bool initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident) {
479 m_config_name = "socket";
480 m_display_name = display;
482 return m_panel_agent_manager.initialize (info_manager, config, display, resident);
485 bool valid (void) const {
486 return m_panel_agent_manager.valid ();
492 SCIM_DEBUG_MAIN (1) << "InfoManager::stop ()\n";
494 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
495 String helper_uuid = get_current_helper_uuid ();
496 hide_helper (helper_uuid);
497 stop_helper (helper_uuid, -2, 0);
500 m_panel_agent_manager.stop ();
503 TOOLBAR_MODE_T get_current_toolbar_mode () const {
504 return m_current_toolbar_mode;
507 String get_current_ise_name () const {
508 return m_current_ise_name;
511 String get_current_helper_uuid () const {
512 return m_current_helper_uuid;
515 uint32 get_current_helper_option () const {
516 return m_current_helper_option;
519 void set_current_ise_name (String& name) {
520 m_current_ise_name = name;
523 void set_current_toolbar_mode (TOOLBAR_MODE_T mode) {
524 m_current_toolbar_mode = mode;
527 void set_current_helper_option (uint32 option) {
528 m_current_helper_option = option;
531 void update_panel_event (int cmd, uint32 nType, uint32 nValue) {
533 uint32 focused_context;
534 get_focused_context (focused_client, focused_context);
536 if (focused_client == -1 && m_active_client_id != -1) {
537 focused_client = m_panel_client_map[m_active_client_id];
541 SCIM_DEBUG_MAIN (1) << __func__ << " (" << nType << ", " << nValue << "), client=" << focused_client << "\n";
542 ClientInfo client_info = socket_get_client_info (focused_client);
544 if (client_info.type == FRONTEND_CLIENT) {
545 m_panel_agent_manager.update_panel_event (focused_client, focused_context, cmd, nType, nValue);
547 std::cerr << __func__ << " focused client is not existed!!!" << "\n";
550 if (m_panel_client_map[m_show_request_client_id] != focused_client) {
551 client_info = socket_get_client_info (m_panel_client_map[m_show_request_client_id]);
553 if (client_info.type == FRONTEND_CLIENT) {
554 m_panel_agent_manager.update_panel_event (m_panel_client_map[m_show_request_client_id], 0, cmd, nType, nValue);
555 std::cerr << __func__ << " show request client=" << m_panel_client_map[m_show_request_client_id] << "\n";
557 std::cerr << __func__ << " show request client is not existed!!!" << "\n";
562 bool move_preedit_caret (uint32 position) {
563 SCIM_DEBUG_MAIN (1) << "InfoManager::move_preedit_caret (" << position << ")\n";
567 get_focused_context (client, context);
570 m_panel_agent_manager.update_preedit_caret (client, context, position);
578 bool request_help (void) {
579 SCIM_DEBUG_MAIN (1) << "InfoManager::request_help ()\n";
583 get_focused_context (client, context);
586 m_panel_agent_manager.request_help (client, context);
593 bool request_factory_menu (void) {
594 SCIM_DEBUG_MAIN (1) << "InfoManager::request_factory_menu ()\n";
598 get_focused_context (client, context);
601 m_panel_agent_manager.request_factory_menu (client, context);
609 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
610 bool reset_keyboard_ise (void) {
611 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_keyboard_ise ()\n";
615 get_focused_context (client, context);
618 m_panel_agent_manager.reset_keyboard_ise (client, context);
625 bool update_keyboard_ise_list (void) {
626 SCIM_DEBUG_MAIN (1) << "InfoManager::update_keyboard_ise_list ()\n";
630 get_focused_context (client, context);
633 m_panel_agent_manager.update_keyboard_ise_list (client, context);
640 bool change_factory (const String& uuid) {
641 SCIM_DEBUG_MAIN (1) << "InfoManager::change_factory (" << uuid << ")\n";
645 if (scim_global_config_read (SCIM_GLOBAL_CONFIG_PRELOAD_KEYBOARD_ISE, false))
646 m_helper_manager.preload_keyboard_ise (uuid);
649 get_focused_context (client, context);
652 m_panel_agent_manager.change_factory (client, context, uuid);
659 bool helper_candidate_show (void) {
660 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
665 get_focused_context (client, context);
667 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
668 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
670 if (it != m_helper_client_index.end ()) {
671 uint32 ctx = get_helper_ic (client, context);
672 m_panel_agent_manager.helper_candidate_show (it->second.id, ctx, m_current_helper_uuid);
677 /* Inform wayland module that we are showing candidate window */
679 uint32 focused_context;
680 String focused_uuid = get_focused_context(focused_client, focused_context);
681 m_panel_agent_manager.helper_candidate_show(focused_client, focused_context, focused_uuid);
686 bool helper_candidate_hide (void) {
687 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
692 get_focused_context (client, context);
694 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
695 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
697 if (it != m_helper_client_index.end ()) {
698 uint32 ctx = get_helper_ic (client, context);
699 m_panel_agent_manager.helper_candidate_hide (it->second.id, ctx, m_current_helper_uuid);
704 /* Inform wayland module that we are hiding candidate window */
706 uint32 focused_context;
707 String focused_uuid = get_focused_context(focused_client, focused_context);
708 m_panel_agent_manager.helper_candidate_hide(focused_client, focused_context, focused_uuid);
713 bool candidate_more_window_show (void) {
714 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
717 get_focused_context (client, context);
719 if (m_is_imengine_candidate) {
721 m_panel_agent_manager.candidate_more_window_show (client, context);
725 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
726 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
728 if (it != m_helper_client_index.end ()) {
729 uint32 ctx = get_helper_ic (client, context);
730 m_panel_agent_manager.candidate_more_window_show (it->second.id, ctx);
739 bool candidate_more_window_hide (void) {
740 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
743 get_focused_context (client, context);
745 if (m_is_imengine_candidate) {
747 m_panel_agent_manager.candidate_more_window_hide (client, context);
751 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
752 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
754 if (it != m_helper_client_index.end ()) {
755 uint32 ctx = get_helper_ic (client, context);
756 m_panel_agent_manager.candidate_more_window_hide (it->second.id, ctx);
765 bool update_helper_lookup_table (const LookupTable& table) {
766 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
770 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
771 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
773 if (it != m_helper_client_index.end ()) {
775 get_focused_context (client, context);
776 ctx = get_helper_ic (client, context);
777 m_panel_agent_manager.update_helper_lookup_table (it->second.id, ctx, m_current_helper_uuid, table);
785 bool select_aux (uint32 item) {
786 SCIM_DEBUG_MAIN (1) << "InfoManager::select_aux (" << item << ")\n";
790 get_focused_context (client, context);
792 if (m_is_imengine_aux) {
794 m_panel_agent_manager.select_aux (client, context, item);
797 helper_select_aux (item);
804 bool select_candidate (uint32 item) {
805 SCIM_DEBUG_MAIN (1) << "InfoManager::select_candidate (" << item << ")\n";
809 get_focused_context (client, context);
811 if (m_is_imengine_candidate) {
813 m_panel_agent_manager.select_candidate (client, context, item);
816 helper_select_candidate (item);
823 bool lookup_table_page_up (void) {
824 SCIM_DEBUG_MAIN (1) << "InfoManager::lookup_table_page_up ()\n";
828 get_focused_context (client, context);
830 if (m_is_imengine_candidate) {
832 m_panel_agent_manager.lookup_table_page_up (client, context);
835 helper_lookup_table_page_up ();
842 bool lookup_table_page_down (void) {
843 SCIM_DEBUG_MAIN (1) << "InfoManager::lookup_table_page_down ()\n";
847 get_focused_context (client, context);
849 if (m_is_imengine_candidate) {
851 m_panel_agent_manager.lookup_table_page_down (client, context);
854 helper_lookup_table_page_down ();
861 bool update_lookup_table_page_size (uint32 size) {
862 SCIM_DEBUG_MAIN (1) << "InfoManager::update_lookup_table_page_size (" << size << ")\n";
866 get_focused_context (client, context);
868 if (m_is_imengine_candidate) {
870 m_panel_agent_manager.update_lookup_table_page_size (client, context, size);
873 helper_update_lookup_table_page_size (size);
880 bool update_candidate_item_layout (const std::vector<uint32>& row_items) {
881 SCIM_DEBUG_MAIN (1) << __func__ << " (" << row_items.size () << ")\n";
885 get_focused_context (client, context);
887 if (m_is_imengine_candidate) {
889 m_panel_agent_manager.update_candidate_item_layout (client, context, row_items);
892 helper_update_candidate_item_layout (row_items);
899 bool select_associate (uint32 item) {
900 SCIM_DEBUG_MAIN (1) << "InfoManager::select_associate (" << item << ")\n";
904 get_focused_context (client, context);
907 m_panel_agent_manager.select_associate (client, context, item);
911 helper_select_associate (item);
915 bool associate_table_page_up (void) {
916 SCIM_DEBUG_MAIN (1) << "InfoManager::associate_table_page_up ()\n";
920 get_focused_context (client, context);
923 m_panel_agent_manager.associate_table_page_up (client, context);
927 helper_associate_table_page_up ();
931 bool associate_table_page_down (void) {
932 SCIM_DEBUG_MAIN (1) << "InfoManager::associate_table_page_down ()\n";
936 get_focused_context (client, context);
939 m_panel_agent_manager.associate_table_page_down (client, context);
943 helper_associate_table_page_down ();
947 bool update_associate_table_page_size (uint32 size) {
948 SCIM_DEBUG_MAIN (1) << "InfoManager::update_associate_table_page_size (" << size << ")\n";
952 get_focused_context (client, context);
955 m_panel_agent_manager.update_associate_table_page_size (client, context, size);
959 helper_update_associate_table_page_size (size);
963 bool update_displayed_candidate_number (uint32 size) {
964 SCIM_DEBUG_MAIN (1) << __func__ << " (" << size << ")\n";
968 get_focused_context (client, context);
970 if (m_is_imengine_candidate) {
972 m_panel_agent_manager.update_displayed_candidate_number (client, context, size);
975 helper_update_displayed_candidate_number (size);
982 void send_longpress_event (int type, int index) {
983 SCIM_DEBUG_MAIN (1) << __func__ << " (" << type << ", " << index << ")\n";
986 get_focused_context (client, context);
988 if (m_is_imengine_candidate) {
990 m_panel_agent_manager.send_longpress_event (client, context, index);
993 helper_longpress_candidate (index);
997 bool trigger_property (const String& property) {
998 SCIM_DEBUG_MAIN (1) << "InfoManager::trigger_property (" << property << ")\n";
1002 get_focused_context (client, context);
1005 m_panel_agent_manager.trigger_property (client, context, property);
1012 bool start_helper (const String& uuid, int client, uint32 context) {
1013 SCIM_DEBUG_MAIN (1) << "InfoManager::start_helper (" << uuid << ")\n";
1014 LOGD ("start ISE(%s)", uuid.c_str ());
1016 if (uuid.length () <= 0)
1020 /*if (m_current_toolbar_mode != TOOLBAR_HELPER_MODE || m_current_helper_uuid.compare (uuid) != 0)*/ {
1021 SCIM_DEBUG_MAIN (1) << "Run_helper\n";
1023 uint32 ic = get_helper_ic (m_panel_client_map[client], context);
1025 /* Get the context uuid from the client context registration table. */
1027 ClientContextUUIDRepository::iterator it =
1028 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
1030 if (it != m_client_context_uuids.end ())
1031 ic_uuid = it->second;
1033 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
1034 m_signal_run_helper (uuid, m_config_name, m_display_name);
1036 m_current_helper_uuid = uuid;
1041 bool stop_helper (const String& uuid, int client, uint32 context) {
1042 char buf[256] = {0};
1043 snprintf (buf, sizeof (buf), "time:%ld pid:%d %s %s prepare to stop ISE(%s)\n",
1044 time (0), getpid (), __FILE__, __func__, uuid.c_str ());
1045 LOGD ("prepare to stop ISE(%s)", uuid.c_str ());
1046 SCIM_DEBUG_MAIN (1) << "InfoManager::stop_helper (" << uuid << ")\n";
1048 if (uuid.length () <= 0)
1052 uint32 ctx = get_helper_ic (client, context);
1053 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
1055 if (it != m_helper_client_index.end ()) {
1056 m_ise_exiting = true;
1057 m_current_helper_uuid = String ("");
1058 m_panel_agent_manager.exit (it->second.id, ctx);
1059 SCIM_DEBUG_MAIN (1) << "Stop helper\n";
1060 ISF_SAVE_LOG ("send SCIM_TRANS_CMD_EXIT message to %s", uuid.c_str ());
1063 /* Since we are stopping this helper, erase information from start_helper_ic_index too */
1064 m_start_helper_ic_index.erase (uuid);
1070 void focus_out_helper (const String& uuid, int client, uint32 context) {
1071 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1073 if (it != m_helper_client_index.end ()) {
1074 uint32 ctx = get_helper_ic (client, context);
1075 m_panel_agent_manager.focus_out_helper (it->second.id, ctx, uuid);
1079 void focus_in_helper (const String& uuid, int client, uint32 context) {
1080 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1082 if (it != m_helper_client_index.end ()) {
1083 uint32 ctx = get_helper_ic (client, context);
1084 m_panel_agent_manager.focus_in_helper (it->second.id, ctx, uuid);
1088 bool show_helper (const String& uuid, char* data, size_t& len, uint32 ctx) {
1089 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1091 if (it != m_helper_client_index.end ()) {
1092 Socket client_socket (it->second.id);
1093 m_panel_agent_manager.show_helper (it->second.id, ctx, uuid, data, len);
1097 LOGW ("Can't find %s", m_current_helper_uuid.c_str ());
1102 void hide_helper (const String& uuid, uint32 ctx = 0) {
1103 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1105 if (it != m_helper_client_index.end ()) {
1110 get_focused_context (client, context);
1111 ctx = get_helper_ic (client, context);
1114 m_panel_agent_manager.hide_helper (it->second.id, ctx, uuid);
1118 bool set_helper_mode (const String& uuid, uint32& mode) {
1119 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1121 if (it != m_helper_client_index.end ()) {
1125 get_focused_context (client, context);
1126 ctx = get_helper_ic (client, context);
1127 m_panel_agent_manager.set_helper_mode (it->second.id, ctx, uuid, mode);
1134 bool set_helper_language (const String& uuid, uint32& language) {
1135 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1137 if (it != m_helper_client_index.end ()) {
1141 get_focused_context (client, context);
1142 ctx = get_helper_ic (client, context);
1143 m_panel_agent_manager.set_helper_language (it->second.id, ctx, uuid, language);
1150 bool set_helper_imdata (const String& uuid, const char* imdata, size_t& len) {
1151 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1153 if (it != m_helper_client_index.end ()) {
1157 get_focused_context (client, context);
1158 ctx = get_helper_ic (client, context);
1159 m_panel_agent_manager.set_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1166 bool set_helper_return_key_type (const String& uuid, int type) {
1167 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1169 if (it != m_helper_client_index.end ()) {
1173 get_focused_context (client, context);
1174 ctx = get_helper_ic (client, context);
1175 m_panel_agent_manager.set_helper_return_key_type (it->second.id, ctx, uuid, type);
1182 bool get_helper_return_key_type (const String& uuid, uint32& type) {
1183 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1185 if (it != m_helper_client_index.end ()) {
1189 get_focused_context (client, context);
1190 ctx = get_helper_ic (client, context);
1191 m_panel_agent_manager.get_helper_return_key_type (it->second.id, ctx, uuid, type);
1198 bool set_helper_return_key_disable (const String& uuid, bool disabled) {
1199 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1201 if (it != m_helper_client_index.end ()) {
1205 get_focused_context (client, context);
1206 ctx = get_helper_ic (client, context);
1207 m_panel_agent_manager.set_helper_return_key_disable (it->second.id, ctx, uuid, disabled);
1214 bool get_helper_return_key_disable (const String& uuid, uint32& disabled) {
1215 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1217 if (it != m_helper_client_index.end ()) {
1221 get_focused_context (client, context);
1222 ctx = get_helper_ic (client, context);
1223 m_panel_agent_manager.get_helper_return_key_disable (it->second.id, ctx, uuid, disabled);
1230 bool set_helper_layout (const String& uuid, uint32& layout) {
1231 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1233 if (it != m_helper_client_index.end ()) {
1237 get_focused_context (client, context);
1238 ctx = get_helper_ic (client, context);
1239 m_panel_agent_manager.set_helper_layout (it->second.id, ctx, uuid, layout);
1246 bool set_helper_input_mode (const String& uuid, uint32& mode) {
1247 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1249 if (it != m_helper_client_index.end ()) {
1253 get_focused_context (client, context);
1254 ctx = get_helper_ic (client, context);
1255 m_panel_agent_manager.set_helper_input_mode (it->second.id, ctx, uuid, mode);
1262 bool set_helper_input_hint (const String& uuid, uint32& hint) {
1263 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1265 if (it != m_helper_client_index.end ()) {
1269 get_focused_context (client, context);
1270 ctx = get_helper_ic (client, context);
1271 m_panel_agent_manager.set_helper_input_hint (it->second.id, ctx, uuid, hint);
1278 bool set_helper_bidi_direction (const String& uuid, uint32& direction) {
1279 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1281 if (it != m_helper_client_index.end ()) {
1285 get_focused_context (client, context);
1286 ctx = get_helper_ic (client, context);
1287 m_panel_agent_manager.set_helper_bidi_direction (it->second.id, ctx, uuid, direction);
1294 bool set_helper_caps_mode (const String& uuid, uint32& mode) {
1295 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1297 if (it != m_helper_client_index.end ()) {
1301 get_focused_context (client, context);
1302 ctx = get_helper_ic (client, context);
1303 m_panel_agent_manager.set_helper_caps_mode (it->second.id, ctx, uuid, mode);
1310 int get_client_pid(int client_id)
1312 Socket client_socket(client_id);
1314 int sockfd = client_socket.get_id();
1316 socklen_t len = sizeof(struct ucred);
1317 if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) == 0) {
1318 LOGI("client pid : %u", ucred.pid);
1321 LOGW("Failed to get socket infomation");
1328 bool show_helper_option_window (const String& uuid, int caller_pid) {
1329 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1331 if (it != m_helper_client_index.end ()) {
1335 get_focused_context (client, context);
1336 ctx = get_helper_ic (client, context);
1338 if (!m_signal_launch_option_application (uuid)) {
1339 LOGD ("call show helper option");
1340 int ime_pid = get_client_pid(it->second.id);
1341 LOGD ("parent : %d, client : %d", caller_pid, ime_pid);
1342 m_panel_agent_manager.show_helper_option_window (it->second.id, ctx, uuid, caller_pid, ime_pid);
1343 m_panel_agent_manager.set_transient_for (caller_pid, ime_pid);
1352 bool resume_helper_option_window (const String& uuid) {
1353 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1355 if (it != m_helper_client_index.end ()) {
1359 get_focused_context (client, context);
1360 ctx = get_helper_ic (client, context);
1361 m_panel_agent_manager.resume_helper_option_window (it->second.id, ctx, uuid);
1368 bool set_helper_keyboard_mode (const String& uuid, uint32& mode) {
1369 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1371 if (it != m_helper_client_index.end ()) {
1375 get_focused_context (client, context);
1376 ctx = get_helper_ic (client, context);
1377 m_panel_agent_manager.set_helper_keyboard_mode (it->second.id, ctx, uuid, mode);
1384 bool set_helper_prediction_hint (const String& uuid, String prediction_hint) {
1385 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1387 if (it != m_helper_client_index.end ()) {
1391 get_focused_context (client, context);
1392 ctx = get_helper_ic (client, context);
1393 m_panel_agent_manager.set_helper_prediction_hint (it->second.id, ctx, uuid, prediction_hint);
1400 bool set_helper_mime_type (const String& uuid, String mime_type) {
1401 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1403 if (it != m_helper_client_index.end ()) {
1407 get_focused_context (client, context);
1408 ctx = get_helper_ic (client, context);
1409 m_panel_agent_manager.set_helper_mime_type (it->second.id, ctx, uuid, mime_type);
1416 bool finalize_content_helper (const String& uuid, String text, uint32 cursor_pos) {
1417 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1419 if (it != m_helper_client_index.end ()) {
1423 get_focused_context (client, context);
1424 ctx = get_helper_ic (client, context);
1425 m_panel_agent_manager.finalize_content_helper (it->second.id, ctx, uuid, text, cursor_pos);
1432 bool set_helper_prediction_hint_data (const String& uuid, String key, String value) {
1433 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1435 if (it != m_helper_client_index.end ()) {
1439 get_focused_context (client, context);
1440 ctx = get_helper_ic (client, context);
1441 m_panel_agent_manager.set_helper_prediction_hint_data (it->second.id, ctx, uuid, key, value);
1448 bool set_helper_optimization_hint(const String& uuid, uint32& hint) {
1449 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1451 if (it != m_helper_client_index.end()) {
1455 get_focused_context(client, context);
1456 ctx = get_helper_ic(client, context);
1457 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, uuid, hint);
1464 bool set_helper_enable (const String& uuid, uint32 enabled) {
1465 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1467 if (it != m_helper_client_index.end ()) {
1471 get_focused_context (client, context);
1472 ctx = get_helper_ic (client, context);
1473 m_panel_agent_manager.set_helper_enable (it->second.id, ctx, uuid, enabled);
1480 bool set_helper_input_panel_position_align (const String& uuid, uint32 x, uint32 y, uint32 align) {
1481 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1483 if (it != m_helper_client_index.end ()) {
1487 get_focused_context (client, context);
1488 ctx = get_helper_ic (client, context);
1489 m_panel_agent_manager.set_helper_input_panel_position_align (it->second.id, ctx, uuid, x, y, align);
1496 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
1497 void show_isf_panel (int client_id) {
1498 SCIM_DEBUG_MAIN (4) << "InfoManager::show_isf_panel ()\n";
1499 m_signal_show_panel ();
1502 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
1503 bool send_remote_input_message (int client_id, char* buf, size_t len) {
1504 SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_input_message ()\n";
1506 if (buf && len > 0) {
1508 m_signal_remoteinput_send_input_message (msg, true);
1515 void send_remote_surrounding_text (const char* text, uint32 cursor) {
1516 SCIM_DEBUG_MAIN(4) << "InfoManager::send_remote_surrounding_text ()\n";
1518 m_signal_remoteinput_send_surrounding_text (cursor, text);
1521 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
1522 void hide_isf_panel (int client_id) {
1523 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_isf_panel ()\n";
1524 m_signal_hide_panel ();
1527 //ISM_TRANS_CMD_SHOW_ISE_PANEL
1528 void show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len) {
1529 SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_panel ()\n";
1530 m_reshow_needed = true;
1531 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
1532 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1533 LOGD ("prepare to show ISE %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
1535 m_show_request_client_id = client_id;
1536 m_active_client_id = client_id;
1537 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1539 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
1540 uint32 ctx = get_helper_ic (client, context);
1541 ret = show_helper (m_current_helper_uuid, data, len, ctx);
1544 /* Save ISE context for ISE panel re-showing */
1545 /* The size of data can be bigger than Ise_Context size if there is IMDATA. */
1546 if (data && len > 0) {
1547 delete_imdata_buffer ();
1548 delete_ise_context_buffer ();
1551 m_ise_context_buffer = new char [len];
1552 m_ise_context_length = len;
1553 memcpy (m_ise_context_buffer, data, m_ise_context_length);
1554 } catch (std::bad_alloc &e) {
1555 LOGE("Memory allocation failed");
1560 m_signal_show_ise ();
1562 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
1563 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
1564 if (launch_ise_on_request || !enable_auto_restart)
1565 m_signal_start_default_ise (true);
1569 //ISM_TRANS_CMD_HIDE_ISE_PANEL
1570 void hide_ise_panel (int client_id, uint32 client, uint32 context) {
1571 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_ise_panel ()\n";
1572 LOGD ("prepare to hide ISE, %d %d", client_id, m_show_request_client_id);
1573 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1575 m_reshow_needed = false;
1576 if (m_panel_client_map[client_id] == m_current_socket_client || client_id == m_show_request_client_id) {
1577 // && (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
1579 uint32 focused_context;
1580 get_focused_context (focused_client, focused_context);
1582 if (focused_client == -1 && m_active_client_id != -1) {
1583 focused_client = m_panel_client_map[m_active_client_id];
1584 focused_context = 0;
1587 m_signal_hide_ise ();
1591 void hide_helper_ise (void) {
1594 uint32 focused_context;
1595 get_focused_context (focused_client, focused_context);
1596 m_panel_agent_manager.hide_helper_ise (focused_client, focused_context);
1598 m_signal_hide_ise ();
1602 void prelaunch_helper_ise (void) {
1603 SCIM_DEBUG_MAIN (4) << "InfoManager::prelaunch_helper_ise ()\n";
1606 * Currently the SHOW_PREPARE hint is delivered only to the already-running ISEs.
1607 * If the newly launched ise also has to be notified of given optimization hint,
1608 * we'll need to mark the hint somewhere and send the message when a newly launched
1609 * ise connects to the panel.
1611 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1612 if (it != m_helper_client_index.end()) {
1616 get_focused_context(client, context);
1617 ctx = get_helper_ic(client, context);
1618 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, m_current_helper_uuid, ISE_OPTIMIZATION_HINT_SHOW_PREPARE);
1621 m_signal_start_default_ise(false);
1624 void set_default_ise (const DEFAULT_ISE_T& ise) {
1625 LOGD ("set default ise : %s", ise.uuid.c_str());
1626 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), ise.uuid);
1627 scim_global_config_flush ();
1630 void set_should_shared_ise (const bool should_shared_ise) {
1631 m_should_shared_ise = should_shared_ise;
1633 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
1634 bool process_key_event (KeyEvent& key, uint32 serial, uint32 keycode) {
1635 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1637 if (m_is_ise_alive == false)
1640 if (it != m_helper_client_index.end ()) {
1644 get_focused_context (client, context);
1645 ctx = get_helper_ic (client, context);
1646 return m_panel_agent_manager.process_key_event (it->second.id, ctx, m_current_helper_uuid, key, serial, keycode);
1652 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
1653 bool process_input_device_event(int client_id, uint32 type, const char *data, size_t len, _OUT_ uint32& result) {
1654 SCIM_DEBUG_MAIN(4) << "InfoManager::process_input_device_event ()\n";
1655 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1657 if (it != m_helper_client_index.end()) {
1661 get_focused_context(client, context);
1662 ctx = get_helper_ic(client, context);
1663 return m_panel_agent_manager.process_input_device_event(it->second.id, ctx, m_current_helper_uuid, type, data, len, result);
1669 bool get_helper_geometry (String& uuid, struct rectinfo& info) {
1670 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1672 if (it != m_helper_client_index.end ()) {
1676 get_focused_context (client, context);
1677 ctx = get_helper_ic (client, context);
1678 return m_panel_agent_manager.get_helper_geometry (it->second.id, ctx, uuid, info);
1684 bool get_helper_imdata (String& uuid, char** imdata, size_t& len) {
1685 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1687 if (it != m_helper_client_index.end ()) {
1691 get_focused_context (client, context);
1692 ctx = get_helper_ic (client, context);
1693 m_panel_agent_manager.get_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1700 bool get_helper_layout (String& uuid, uint32& layout) {
1701 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1703 if (it != m_helper_client_index.end ()) {
1707 get_focused_context (client, context);
1708 ctx = get_helper_ic (client, context);
1709 m_panel_agent_manager.get_helper_layout (it->second.id, ctx, uuid, layout);
1715 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
1716 void get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info) {
1717 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1718 m_signal_get_input_panel_geometry (info);
1720 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
1721 void get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info) {
1722 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1723 m_signal_get_candidate_geometry (info);
1725 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
1726 void get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len) {
1727 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1728 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
1729 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1731 if (it != m_helper_client_index.end ()) {
1734 get_focused_context (client, context);
1735 uint32 ctx = get_helper_ic (client, context);
1736 m_panel_agent_manager.get_ise_language_locale (it->second.id, ctx, m_current_helper_uuid, data, len);
1741 void get_current_ise_geometry (rectinfo& rect) {
1742 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
1745 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1746 ret = get_helper_geometry (m_current_helper_uuid, rect);
1756 void set_ise_mode (int client_id, uint32 mode) {
1757 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_mode ()\n";
1759 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1760 set_helper_mode (m_current_helper_uuid, mode);
1762 //ISM_TRANS_CMD_SET_LAYOUT
1763 void set_ise_layout (int client_id, uint32 layout) {
1764 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_layout ()\n";
1765 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1766 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1767 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
1769 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1770 set_helper_layout (m_current_helper_uuid, layout);
1772 //ISM_TRANS_CMD_SET_INPUT_MODE
1773 void set_ise_input_mode (int client_id, uint32 input_mode) {
1774 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_mode ()\n";
1776 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1777 set_helper_input_mode (m_current_helper_uuid, input_mode);
1779 //ISM_TRANS_CMD_SET_INPUT_HINT
1780 void set_ise_input_hint (int client_id, uint32 input_hint) {
1781 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_hint ()\n";
1782 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1783 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1784 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(input_hint);
1786 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1787 set_helper_input_hint (m_current_helper_uuid, input_hint);
1789 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
1790 void update_ise_bidi_direction (int client_id, uint32 bidi_direction) {
1791 SCIM_DEBUG_MAIN (4) << "InfoManager::update_ise_bidi_direction ()\n";
1792 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1793 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1794 iseContext->bidi_direction = static_cast<Ecore_IMF_BiDi_Direction>(bidi_direction);
1796 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1797 set_helper_bidi_direction (m_current_helper_uuid, bidi_direction);
1799 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
1800 void set_ise_language (int client_id, uint32 language) {
1801 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_language ()\n";
1802 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1803 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1804 iseContext->language = static_cast<Ecore_IMF_Input_Panel_Lang>(language);
1806 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1807 set_helper_language (m_current_helper_uuid, language);
1809 //ISM_TRANS_CMD_SET_ISE_IMDATA
1810 void set_ise_imdata (int client_id, const char* imdata, size_t len) {
1811 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_imdata ()\n";
1813 delete_imdata_buffer ();
1816 m_imdata_buffer = new char [len];
1817 m_imdata_length = len;
1818 memcpy (m_imdata_buffer, imdata, m_imdata_length);
1819 } catch (std::bad_alloc &e) {
1820 LOGE("Memory allocation failed");
1823 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1824 set_helper_imdata (m_current_helper_uuid, imdata, len);
1826 //ISM_TRANS_CMD_GET_ISE_IMDATA
1827 bool get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len) {
1828 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_imdata ()\n";
1831 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1832 ret = get_helper_imdata (m_current_helper_uuid, imdata, len);
1836 //ISM_TRANS_CMD_GET_LAYOUT
1837 bool get_ise_layout (int client_id, _OUT_ uint32& layout) {
1838 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_layout ()\n";
1841 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1842 ret = get_helper_layout (m_current_helper_uuid, layout);
1846 //ISM_TRANS_CMD_GET_ISE_STATE
1847 void get_ise_state (int client_id, _OUT_ int& state) {
1848 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1849 m_signal_get_ise_state (state);
1851 //ISM_TRANS_CMD_GET_ACTIVE_ISE
1852 void get_active_ise (int client_id, _OUT_ String& default_uuid) {
1853 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1854 default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1856 //ISM_TRANS_CMD_GET_ISE_LIST
1857 void get_ise_list (int client_id, _OUT_ std::vector<String>& strlist) {
1858 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_list ()\n";
1859 m_signal_get_ise_list (strlist);
1861 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
1862 void get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info) {
1863 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_helper_ise_info ()\n";
1864 m_signal_get_all_helper_ise_info (info);
1866 //1 Check if the current IME's option (setting) is available or not.
1867 for (uint32 i = 0; i < info.appid.size (); i++) {
1868 if (m_current_helper_uuid.compare (info.appid [i]) == 0) { // Find the current IME
1869 // If the current IME's "has_option" is unknown (-1), get it through ISM_TRANS_CMD_CHECK_OPTION_WINDOW command.
1870 // And it's saved to ime_info DB. Then next time this will be skipped.
1871 if (info.has_option [i] >= 2) {
1872 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1874 if (it != m_helper_client_index.end ()) {
1877 get_focused_context (client, context);
1878 uint32 ctx = get_helper_ic (client, context);
1879 uint32 avail = static_cast<uint32> (-1);
1880 m_panel_agent_manager.check_option_window (it->second.id, ctx, m_current_helper_uuid, avail);
1883 String setting_app = isf_pkg_get_setting_app (m_current_helper_uuid);
1884 if (setting_app.length () > 0)
1889 info.has_option [i] = avail;
1890 // Update "has_option" column of ime_info DB and global variable.
1891 m_signal_set_has_option_helper_ise_info (info.appid [i], static_cast<bool> (avail));
1898 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
1899 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1900 void set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled) {
1901 SCIM_DEBUG_MAIN (4) << "InfoManager::set_enable_helper_ise_info ()\n";
1902 m_signal_set_enable_helper_ise_info (appid, static_cast<bool> (is_enabled));
1904 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
1905 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1906 void show_helper_ise_list (int client_id) {
1907 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_list ()\n";
1908 m_signal_show_helper_ise_list ();
1910 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
1911 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1912 void show_helper_ise_selector (int client_id) {
1913 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_selector ()\n";
1914 m_signal_show_helper_ise_selector ();
1916 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
1918 void is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled) {
1919 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1921 m_signal_is_helper_ise_enabled (strAppid, _nEnabled);
1922 nEnabled = (uint32)_nEnabled;
1924 //ISM_TRANS_CMD_GET_ISE_INFORMATION
1925 void get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
1926 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName) {
1927 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1928 m_signal_get_ise_information (strUuid, strName, strLanguage, nType, nOption, strModuleName);
1933 void get_language_list (int client_id, _OUT_ std::vector<String>& strlist) {
1934 SCIM_DEBUG_MAIN (4) << "InfoManager::get_language_list ()\n";
1935 m_signal_get_language_list (strlist);
1938 void get_all_language (int client_id, _OUT_ std::vector<String>& strlist) {
1939 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_language ()\n";
1940 m_signal_get_all_language (strlist);
1945 void get_ise_language (int client_id, char* buf, size_t len, _OUT_ std::vector<String>& strlist) {
1946 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_language ()\n";
1947 m_signal_get_ise_language (buf, strlist);
1949 //ISM_TRANS_CMD_RESET_ISE_OPTION
1950 //reply SCIM_TRANS_CMD_OK
1951 bool reset_ise_option (int client_id) {
1952 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_ise_option ()\n";
1956 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
1958 if (it != m_client_context_uuids.end ()) {
1959 get_imengine_client_context (it->first, client, context);
1963 m_panel_agent_manager.reset_ise_option (client, context);
1970 bool find_active_ise_by_uuid (String uuid) {
1971 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
1973 for (; iter != m_helper_info_repository.end (); iter++) {
1974 if (!uuid.compare (iter->second.uuid))
1980 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
1982 bool set_active_ise_by_uuid (int client_id, char* buf, size_t len) {
1983 SCIM_DEBUG_MAIN (4) << "InfoManager::set_active_ise_by_uuid ()\n";
1992 if (!m_signal_get_ise_info_by_uuid (uuid, info)) {
1996 if (info.type == TOOLBAR_KEYBOARD_MODE) {
1997 m_signal_set_active_ise_by_uuid (uuid, 1);
2000 m_signal_set_active_ise_by_uuid (uuid, 1);
2005 if (find_active_ise_by_uuid (uuid)) {
2008 m_ise_pending_repository[uuid] = client_id;
2012 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
2013 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
2014 void set_initial_ise_by_uuid (int client_id, char* buf, size_t len) {
2015 SCIM_DEBUG_MAIN (4) << "InfoManager::set_initial_ise_by_uuid ()\n";
2022 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (uuid));
2023 scim_global_config_flush ();
2025 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
2026 void set_ise_return_key_type (int client_id, uint32 type) {
2027 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2028 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2029 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2030 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(type);
2032 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2033 set_helper_return_key_type (m_current_helper_uuid, type);
2035 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
2037 bool get_ise_return_key_type (int client_id, _OUT_ uint32& type) {
2038 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2041 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2042 ret = get_helper_return_key_type (m_current_helper_uuid, type);
2046 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
2047 void set_ise_return_key_disable (int client_id, uint32 disabled) {
2048 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2049 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2050 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2051 iseContext->return_key_disabled = static_cast<Eina_Bool>(disabled);
2053 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2054 set_helper_return_key_disable (m_current_helper_uuid, disabled);
2056 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
2057 bool get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled) {
2058 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2061 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2062 ret = get_helper_return_key_disable (m_current_helper_uuid, disabled);
2067 void reset_helper_context (const String& uuid) {
2068 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2070 if (it != m_helper_client_index.end ()) {
2074 get_focused_context (client, context);
2075 ctx = get_helper_ic (client, context);
2076 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
2082 void reset_ise_context (int client_id) {
2083 SCIM_DEBUG_MAIN (4) << "InfoManager::reset_ise_context ()\n";
2085 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2086 reset_helper_context (m_current_helper_uuid);
2088 //ISM_TRANS_CMD_SET_CAPS_MODE
2089 void set_ise_caps_mode (int client_id, uint32 mode) {
2090 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_caps_mode ()\n";
2091 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2092 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2093 iseContext->caps_mode = static_cast<Eina_Bool>(mode);
2095 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2096 set_helper_caps_mode (m_current_helper_uuid, mode);
2099 //SCIM_TRANS_CMD_RELOAD_CONFIG
2100 void reload_config (void) {
2101 SCIM_DEBUG_MAIN (1) << "InfoManager::reload_config ()\n";
2104 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2105 if (it->second.type == FRONTEND_CLIENT || it->second.type == HELPER_CLIENT) {
2106 m_panel_agent_manager.reload_config (it->first);
2114 SCIM_DEBUG_MAIN (1) << "InfoManager::exit ()\n";
2117 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2118 m_panel_agent_manager.exit (it->first, 0);
2126 void update_ise_list (std::vector<String>& strList) {
2127 /* request PanelClient to update keyboard ise list */
2128 update_keyboard_ise_list ();
2130 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
2131 void will_show_ack (int client_id) {
2132 SCIM_DEBUG_MAIN (4) << "InfoManager::will_show_ack ()\n";
2133 m_signal_will_show_ack ();
2135 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
2136 void will_hide_ack (int client_id) {
2137 SCIM_DEBUG_MAIN (4) << "InfoManager::will_hide_ack ()\n";
2138 m_signal_will_hide_ack ();
2140 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
2141 void reset_default_ise (int client_id) {
2142 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2143 String initial_ise = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2145 if (initial_ise.length () > 0)
2146 m_signal_set_active_ise_by_uuid (initial_ise, 1);
2148 std::cerr << "Read SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID is failed!!!\n";
2150 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
2151 void set_keyboard_mode (int client_id, uint32 mode) {
2152 SCIM_DEBUG_MAIN (4) << "InfoManager::set_keyboard_mode ()\n";
2153 m_signal_set_keyboard_mode (mode);
2154 set_ise_keyboard_mode (client_id, mode);
2156 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
2157 void candidate_will_hide_ack (int client_id) {
2158 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "\n";
2159 m_signal_candidate_will_hide_ack ();
2162 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
2163 void get_active_helper_option (int client_id, _OUT_ uint32& option) {
2164 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2165 option = get_current_helper_option ();
2167 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
2168 void show_ise_option_window (int client_id, int caller_pid) {
2169 SCIM_DEBUG_MAIN (4) << "InfoManager::show_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 show 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 show_helper_option_window (m_current_helper_uuid, caller_pid);
2179 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
2180 void get_ise_setting_appid (int client_id, _OUT_ String &ime_setting_appid) {
2181 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2182 m_signal_get_ise_setting_appid (m_current_helper_uuid, ime_setting_appid);
2185 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
2186 void resume_ise_option_window (int client_id) {
2187 SCIM_DEBUG_MAIN (4) << "InfoManager::resume_ise_option_window ()\n";
2188 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2189 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2190 LOGD ("prepare to resume ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2192 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2193 resume_helper_option_window (m_current_helper_uuid);
2197 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
2198 void set_ise_keyboard_mode (int client_id, uint32 mode) {
2199 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_keyboard_mode ()\n";
2200 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2201 set_helper_keyboard_mode (m_current_helper_uuid, mode);
2204 //ISM_TRANS_CMD_SET_PREDICTION_HINT
2205 void set_prediction_hint (int client_id, String prediction_hint) {
2206 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint ()\n";
2207 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2208 set_helper_prediction_hint (m_current_helper_uuid, prediction_hint);
2211 //ISM_TRANS_CMD_SET_MIME_TYPE
2212 void set_ise_mime_type (int client_id, String mime_type) {
2213 SCIM_DEBUG_MAIN (4) << "InfoManager::set_mime_type ()\n";
2214 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2215 set_helper_mime_type (m_current_helper_uuid, mime_type);
2218 //ISM_TRANS_CMD_FINALIZE_CONTENT
2219 void finalize_content (int client_id, String text, uint32 cursor_pos) {
2220 SCIM_DEBUG_MAIN (4) << "InfoManager::finalize_content ()\n";
2221 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2222 finalize_content_helper (m_current_helper_uuid, text, cursor_pos);
2225 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
2226 void set_prediction_hint_data (int client_id, String key, String value) {
2227 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint_data ()\n";
2228 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2229 set_helper_prediction_hint_data (m_current_helper_uuid, key, value);
2232 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
2233 void set_optimization_hint(int client_id, uint32 hint) {
2234 SCIM_DEBUG_MAIN(4) << "InfoManager::set_optimization_hint ()\n";
2235 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2236 set_helper_optimization_hint(m_current_helper_uuid, hint);
2239 //ISM_TRANS_CMD_SET_ISE_ENABLE
2240 void set_ise_enable (int client_id, uint32 enabled) {
2241 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_enable ()\n";
2242 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2243 set_helper_enable (m_current_helper_uuid, enabled);
2246 //ISM_TRANS_CMD_SET_POSITION_ALIGN
2247 void set_input_panel_position_align (int client_id, uint32 x, uint32 y, uint32 align) {
2248 SCIM_DEBUG_MAIN (4) << "InfoManager::set_input_panel_position_align ()\n";
2249 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2250 set_helper_input_panel_position_align (m_current_helper_uuid, x, y, align);
2253 //ISM_TRANS_CMD_EXPAND_CANDIDATE
2254 void expand_candidate () {
2256 m_signal_expand_candidate ();
2259 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
2260 void contract_candidate () {
2262 m_signal_contract_candidate ();
2264 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
2265 void get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info) {
2266 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2268 m_signal_get_recent_ise_geometry (angle, info);
2271 bool check_privilege_by_sockfd (int client_id, const String& privilege) {
2272 return m_signal_check_privilege_by_sockfd (client_id, privilege);
2275 bool remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
2277 SCIM_DEBUG_MAIN(1) << "PanelAgent::update_preedit_string ()\n";
2283 get_focused_context (client, context);
2285 m_panel_agent_manager.remote_update_preedit_string (client, context, str, str, attrs, caret);
2293 bool remoteinput_commit_string (const WideString &str)
2295 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_commit_string ()\n";
2301 get_focused_context (client, context);
2303 m_panel_agent_manager.remote_commit_string (client, context, str);
2311 bool remoteinput_send_key_event (const KeyEvent &key)
2313 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_send_key_event ()\n";
2317 get_focused_context (client, context);
2319 m_panel_agent_manager.remote_send_key_event (client, context, key);
2325 bool remoteinput_forward_key_event (const KeyEvent &key)
2327 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_forward_key_event ()\n";
2331 get_focused_context (client, context);
2333 m_panel_agent_manager.remote_forward_key_event (client, context, key);
2339 bool remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
2341 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_delete_surrounding_text ()\n";
2345 get_focused_context (client, context);
2347 m_panel_agent_manager.remote_delete_surrounding_text (client, context, offset, len);
2353 bool remoteinput_set_cursor_position (uint32 cursor)
2355 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_set_cursor_position ()\n";
2359 get_focused_context (client, context);
2361 m_panel_agent_manager.socket_helper_set_selection (client, context, cursor, cursor);
2367 void reshow_input_panel () {
2368 /* Check whether application is already focus_in */
2369 if (m_refocus_needed) {
2370 LOGD ("Re-focus in");
2371 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
2373 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
2374 reset_keyboard_ise ();
2377 /* Check whether ISE panel is already shown */
2378 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0 && m_reshow_needed) {
2379 LOGD ("Re-show input_panel");
2380 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
2383 uint32 focused_context;
2385 get_focused_context (focused_client, focused_context);
2386 if (focused_client == -1 && m_active_client_id != -1) {
2387 focused_client = m_panel_client_map[m_active_client_id];
2388 focused_context = 0;
2391 m_panel_agent_manager.request_ise_reshow (focused_client, focused_context);
2392 m_panel_agent_manager.update_entry_metadata (focused_client, focused_context);
2393 uint32 ctx = get_helper_ic (focused_client, focused_context);
2394 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
2396 m_signal_show_ise ();
2398 if (m_imdata_buffer && m_imdata_length > 0 && m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2399 set_helper_imdata (m_current_helper_uuid, m_imdata_buffer, m_imdata_length);
2404 void request_ise_terminate () {
2405 if (m_client_context_uuids.size () == 0) {
2406 LOGD("Request to terminate IME");
2407 m_signal_stop_default_ise (true);
2411 void set_floating_mode (uint32 floating_mode) {
2413 uint32 focused_context;
2414 get_focused_context (focused_client, focused_context);
2415 ClientInfo client_info = socket_get_client_info (focused_client);
2417 if (client_info.type == FRONTEND_CLIENT) {
2418 m_panel_agent_manager.set_floating_mode (focused_client, focused_context, floating_mode);
2422 void set_floating_drag_enabled (uint32 enabled) {
2424 uint32 focused_context;
2425 get_focused_context (focused_client, focused_context);
2426 ClientInfo client_info = socket_get_client_info (focused_client);
2428 if (client_info.type == FRONTEND_CLIENT) {
2429 m_panel_agent_manager.set_floating_drag_enabled (focused_client, focused_context, enabled);
2433 void move_resize_floating_window (uint32 x, uint32 y, uint32 width, uint32 height) {
2435 uint32 focused_context;
2436 get_focused_context (focused_client, focused_context);
2437 ClientInfo client_info = socket_get_client_info (focused_client);
2439 if (client_info.type == FRONTEND_CLIENT) {
2440 m_panel_agent_manager.move_resize_floating_window (focused_client, focused_context, x, y, width, height);
2444 void generate_key_event (KeyEvent& key) {
2445 SCIM_DEBUG_MAIN (4) << "InfoManager::generate_key_event\n";
2447 uint32 focused_context;
2448 String focused_uuid;
2450 focused_uuid = get_focused_context (focused_client, focused_context);
2451 uint32 target_ic = get_helper_ic (focused_client, focused_context);
2453 socket_helper_key_event_op (focused_client, SCIM_TRANS_CMD_PROCESS_KEY_EVENT, target_ic, focused_uuid, key);
2456 Connection signal_connect_turn_on (InfoManagerSlotVoid* slot) {
2457 return m_signal_turn_on.connect (slot);
2460 Connection signal_connect_turn_off (InfoManagerSlotVoid* slot) {
2461 return m_signal_turn_off.connect (slot);
2464 Connection signal_connect_show_panel (InfoManagerSlotVoid* slot) {
2465 return m_signal_show_panel.connect (slot);
2468 Connection signal_connect_hide_panel (InfoManagerSlotVoid* slot) {
2469 return m_signal_hide_panel.connect (slot);
2472 Connection signal_connect_update_screen (InfoManagerSlotInt* slot) {
2473 return m_signal_update_screen.connect (slot);
2476 Connection signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot) {
2477 return m_signal_update_spot_location.connect (slot);
2480 Connection signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot) {
2481 return m_signal_update_factory_info.connect (slot);
2484 Connection signal_connect_start_default_ise (InfoManagerSlotBool* slot) {
2485 return m_signal_start_default_ise.connect (slot);
2488 Connection signal_connect_stop_default_ise (InfoManagerSlotBool* slot) {
2489 return m_signal_stop_default_ise.connect (slot);
2492 Connection signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot) {
2493 return m_signal_set_candidate_ui.connect (slot);
2496 Connection signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot) {
2497 return m_signal_get_candidate_ui.connect (slot);
2500 Connection signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot) {
2501 return m_signal_set_candidate_position.connect (slot);
2504 Connection signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot) {
2505 return m_signal_get_candidate_geometry.connect (slot);
2508 Connection signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot) {
2509 return m_signal_get_input_panel_geometry.connect (slot);
2512 Connection signal_connect_set_keyboard_ise (InfoManagerSlotString* slot) {
2513 return m_signal_set_keyboard_ise.connect (slot);
2516 Connection signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot) {
2517 return m_signal_get_keyboard_ise.connect (slot);
2520 Connection signal_connect_show_help (InfoManagerSlotString* slot) {
2521 return m_signal_show_help.connect (slot);
2524 Connection signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot) {
2525 return m_signal_show_factory_menu.connect (slot);
2528 Connection signal_connect_show_preedit_string (InfoManagerSlotVoid* slot) {
2529 return m_signal_show_preedit_string.connect (slot);
2532 Connection signal_connect_show_aux_string (InfoManagerSlotVoid* slot) {
2533 return m_signal_show_aux_string.connect (slot);
2536 Connection signal_connect_show_lookup_table (InfoManagerSlotVoid* slot) {
2537 return m_signal_show_lookup_table.connect (slot);
2540 Connection signal_connect_show_associate_table (InfoManagerSlotVoid* slot) {
2541 return m_signal_show_associate_table.connect (slot);
2544 Connection signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot) {
2545 return m_signal_hide_preedit_string.connect (slot);
2548 Connection signal_connect_hide_aux_string (InfoManagerSlotVoid* slot) {
2549 return m_signal_hide_aux_string.connect (slot);
2552 Connection signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot) {
2553 return m_signal_hide_lookup_table.connect (slot);
2556 Connection signal_connect_hide_associate_table (InfoManagerSlotVoid* slot) {
2557 return m_signal_hide_associate_table.connect (slot);
2560 Connection signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot) {
2561 return m_signal_update_preedit_string.connect (slot);
2564 Connection signal_connect_update_preedit_caret (InfoManagerSlotInt* slot) {
2565 return m_signal_update_preedit_caret.connect (slot);
2568 Connection signal_connect_recapture_string (InfoManagerSlotAttributeInt2String2* slot) {
2569 return m_signal_recapture_string.connect (slot);
2572 Connection signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot) {
2573 return m_signal_update_aux_string.connect (slot);
2576 Connection signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot) {
2577 return m_signal_update_lookup_table.connect (slot);
2580 Connection signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot) {
2581 return m_signal_update_associate_table.connect (slot);
2584 Connection signal_connect_register_properties (InfoManagerSlotPropertyList* slot) {
2585 return m_signal_register_properties.connect (slot);
2588 Connection signal_connect_update_property (InfoManagerSlotProperty* slot) {
2589 return m_signal_update_property.connect (slot);
2592 Connection signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot) {
2593 return m_signal_register_helper_properties.connect (slot);
2596 Connection signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot) {
2597 return m_signal_update_helper_property.connect (slot);
2600 Connection signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot) {
2601 return m_signal_register_helper.connect (slot);
2604 Connection signal_connect_remove_helper (InfoManagerSlotInt* slot) {
2605 return m_signal_remove_helper.connect (slot);
2608 Connection signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot) {
2609 return m_signal_set_active_ise_by_uuid.connect (slot);
2612 Connection signal_connect_focus_in (InfoManagerSlotVoid* slot) {
2613 return m_signal_focus_in.connect (slot);
2616 Connection signal_connect_focus_out (InfoManagerSlotVoid* slot) {
2617 return m_signal_focus_out.connect (slot);
2620 Connection signal_connect_expand_candidate (InfoManagerSlotVoid* slot) {
2621 return m_signal_expand_candidate.connect (slot);
2624 Connection signal_connect_contract_candidate (InfoManagerSlotVoid* slot) {
2625 return m_signal_contract_candidate.connect (slot);
2628 Connection signal_connect_select_candidate (InfoManagerSlotInt* slot) {
2629 return m_signal_select_candidate.connect (slot);
2632 Connection signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot) {
2633 return m_signal_get_ise_list.connect (slot);
2636 Connection signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot) {
2637 return m_signal_get_all_helper_ise_info.connect (slot);
2640 Connection signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot) {
2641 return m_signal_set_has_option_helper_ise_info.connect (slot);
2644 Connection signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot) {
2645 return m_signal_set_enable_helper_ise_info.connect (slot);
2648 Connection signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot) {
2649 return m_signal_show_helper_ise_list.connect (slot);
2652 Connection signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot) {
2653 return m_signal_show_helper_ise_selector.connect (slot);
2656 Connection signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot) {
2657 return m_signal_is_helper_ise_enabled.connect (slot);
2660 Connection signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot) {
2661 return m_signal_get_ise_information.connect (slot);
2664 Connection signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot) {
2665 return m_signal_get_keyboard_ise_list.connect (slot);
2668 Connection signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot) {
2669 return m_signal_update_ise_geometry.connect (slot);
2672 Connection signal_connect_get_language_list (InfoManagerSlotStringVector* slot) {
2673 return m_signal_get_language_list.connect (slot);
2676 Connection signal_connect_get_all_language (InfoManagerSlotStringVector* slot) {
2677 return m_signal_get_all_language.connect (slot);
2680 Connection signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot) {
2681 return m_signal_get_ise_language.connect (slot);
2684 Connection signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot) {
2685 return m_signal_get_ise_info_by_uuid.connect (slot);
2688 Connection signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot) {
2689 return m_signal_send_key_event.connect (slot);
2692 Connection signal_connect_accept_connection (InfoManagerSlotInt* slot) {
2693 return m_signal_accept_connection.connect (slot);
2696 Connection signal_connect_close_connection (InfoManagerSlotInt* slot) {
2697 return m_signal_close_connection.connect (slot);
2700 Connection signal_connect_exit (InfoManagerSlotVoid* slot) {
2701 return m_signal_exit.connect (slot);
2704 Connection signal_connect_transaction_start (InfoManagerSlotVoid* slot) {
2705 return m_signal_transaction_start.connect (slot);
2708 Connection signal_connect_transaction_end (InfoManagerSlotVoid* slot) {
2709 return m_signal_transaction_end.connect (slot);
2712 Connection signal_connect_lock (InfoManagerSlotVoid* slot) {
2713 return m_signal_lock.connect (slot);
2716 Connection signal_connect_unlock (InfoManagerSlotVoid* slot) {
2717 return m_signal_unlock.connect (slot);
2720 Connection signal_connect_update_input_context (InfoManagerSlotIntInt* slot) {
2721 return m_signal_update_input_context.connect (slot);
2724 Connection signal_connect_update_language_locale(InfoManagerSlotString* slot) {
2725 return m_signal_update_language_locale.connect(slot);
2728 Connection signal_connect_show_ise (InfoManagerSlotVoid* slot) {
2729 return m_signal_show_ise.connect (slot);
2732 Connection signal_connect_hide_ise (InfoManagerSlotVoid* slot) {
2733 return m_signal_hide_ise.connect (slot);
2736 Connection signal_connect_will_show_ack (InfoManagerSlotVoid* slot) {
2737 return m_signal_will_show_ack.connect (slot);
2740 Connection signal_connect_will_hide_ack (InfoManagerSlotVoid* slot) {
2741 return m_signal_will_hide_ack.connect (slot);
2744 Connection signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot) {
2745 return m_signal_set_keyboard_mode.connect (slot);
2748 Connection signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot) {
2749 return m_signal_candidate_will_hide_ack.connect (slot);
2752 Connection signal_connect_get_ise_state (InfoManagerSlotInt2* slot) {
2753 return m_signal_get_ise_state.connect (slot);
2756 Connection signal_connect_run_helper (InfoManagerSlotString3* slot)
2758 return m_signal_run_helper.connect (slot);
2761 Connection signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
2763 return m_signal_launch_option_application.connect (slot);
2766 Connection signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
2768 return m_signal_get_ise_setting_appid.connect (slot);
2771 Connection signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot) {
2772 return m_signal_get_recent_ise_geometry.connect (slot);
2775 Connection signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
2777 return m_signal_check_privilege_by_sockfd.connect (slot);
2780 Connection signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
2782 return m_signal_remoteinput_send_input_message.connect (slot);
2785 Connection signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
2787 return m_signal_remoteinput_send_surrounding_text.connect (slot);
2790 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
2791 void register_panel_client (uint32 client_id, uint32 id) {
2792 m_panel_client_map [client_id] = (int)id;
2794 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
2795 void register_input_context (uint32 client_id, uint32 context, String uuid) {
2796 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2797 m_client_context_uuids [ctx] = uuid;
2799 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
2800 void remove_input_context (uint32 client_id, uint32 context) {
2801 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2802 m_client_context_uuids.erase (ctx);
2804 if (ctx == get_helper_ic (m_current_socket_client, m_current_client_context)) {
2806 m_current_socket_client = m_last_socket_client;
2807 m_current_client_context = m_last_client_context;
2808 m_current_context_uuid = m_last_context_uuid;
2809 m_last_socket_client = -1;
2810 m_last_client_context = 0;
2811 m_last_context_uuid = String ("");
2813 if (m_current_socket_client == -1) {
2815 socket_update_control_panel ();
2819 } else if (ctx == get_helper_ic (m_last_socket_client, m_last_client_context)) {
2821 m_last_socket_client = -1;
2822 m_last_client_context = 0;
2823 m_last_context_uuid = String ("");
2828 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
2829 void socket_reset_input_context (int client_id, uint32 context) {
2830 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_reset_input_context \n";
2832 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2833 socket_reset_helper_input_context (m_current_helper_uuid, m_panel_client_map[client_id], context);
2836 //SCIM_TRANS_CMD_FOCUS_IN
2837 void focus_in (int client_id, uint32 context, String uuid) {
2838 m_refocus_needed = true;
2840 m_signal_focus_in ();
2841 focus_in_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2842 SCIM_DEBUG_MAIN (2) << "PanelAgent::focus_in (" << client_id << "," << context << "," << uuid << ")\n";
2843 m_active_client_id = client_id;
2846 if (m_current_socket_client >= 0) {
2847 m_last_socket_client = m_current_socket_client;
2848 m_last_client_context = m_current_client_context;
2849 m_last_context_uuid = m_current_context_uuid;
2852 m_current_socket_client = m_panel_client_map[client_id];
2853 m_current_client_context = context;
2854 m_current_context_uuid = uuid;
2858 //SCIM_TRANS_CMD_FOCUS_OUT
2859 void focus_out (int client_id, uint32 context) {
2860 m_refocus_needed = false;
2861 m_signal_focus_out ();
2863 focus_out_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2865 if (m_current_socket_client >= 0) {
2866 m_last_socket_client = m_current_socket_client;
2867 m_last_client_context = m_current_client_context;
2868 m_last_context_uuid = m_current_context_uuid;
2871 m_current_socket_client = -1;
2872 m_current_client_context = 0;
2873 m_current_context_uuid = String ("");
2876 /* Release ISE context & IMDATA buffer */
2877 delete_imdata_buffer ();
2878 if (!m_reshow_needed)
2879 delete_ise_context_buffer ();
2882 //ISM_TRANS_CMD_TURN_ON_LOG
2883 void socket_turn_on_log (uint32 isOn) {
2885 DebugOutput::enable_debug (SCIM_DEBUG_AllMask);
2886 DebugOutput::set_verbose_level (7);
2887 SCIM_DEBUG_MAIN (4) << __func__ << " on\n";
2889 SCIM_DEBUG_MAIN (4) << __func__ << " off\n";
2890 DebugOutput::disable_debug (SCIM_DEBUG_AllMask);
2891 DebugOutput::set_verbose_level (0);
2895 uint32 focused_context;
2896 get_focused_context (focused_client, focused_context);
2898 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
2899 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2901 if (it != m_helper_client_index.end ()) {
2902 //uint32 ctx = get_helper_ic (focused_client, focused_context);
2904 //m_panel_agent_manager.socket_turn_on_log (it->second.id, ctx, m_current_helper_uuid, isOn);
2908 if (focused_client == -1) {
2909 std::cerr << __func__ << " get_focused_context is failed!!!\n";
2913 ClientInfo client_info = socket_get_client_info (focused_client);
2915 if (client_info.type == FRONTEND_CLIENT) {
2917 //m_panel_agent_manager.socket_turn_on_log (focused_client, focused_context, isOn);
2922 void add_client (int client_id, uint32 key, ClientType type) {
2923 LOGD ("id:%d, key:%d, type:%d", client_id, key, type);
2927 SCIM_DEBUG_MAIN (4) << "Add client to repository. Type=" << type << " key=" << key << "\n";
2929 m_client_repository [client_id] = info;
2931 if (info.type == HELPER_CLIENT || info.type == HELPER_ACT_CLIENT)
2932 m_is_ise_alive = true;
2934 if (info.type == IMCONTROL_ACT_CLIENT) {
2935 m_pending_active_imcontrol_id = client_id;
2936 } else if (info.type == IMCONTROL_CLIENT) {
2937 m_imcontrol_map [m_pending_active_imcontrol_id] = client_id;
2938 m_pending_active_imcontrol_id = -1;
2939 } else if (info.type == REMOTEINPUT_ACT_CLIENT) {
2940 m_current_send_remoteinput_id.push_back (client_id);
2941 } else if (info.type == REMOTEINPUT_CLIENT) {
2942 m_current_recv_remoteinput_id.push_back (client_id);
2945 LOGD ("%zu clients connecting", m_client_repository.size());
2950 void del_client (int client_id) {
2951 ClientRepository::iterator iter = m_client_repository.find(client_id);
2952 if (iter == m_client_repository.end()) {
2953 LOGW("The client with id %d does not exist in our client repository, returning", client_id);
2957 m_signal_close_connection (client_id);
2958 ClientInfo client_info = socket_get_client_info (client_id);
2959 m_client_repository.erase (client_id);
2960 LOGD ("id:%d, type:%d", client_id, client_info.type);
2961 #ifdef PANEL_SERVER_AUTO_EXIT
2962 /* Exit panel if there is no connected client anymore. */
2963 if (client_info.type != UNKNOWN_CLIENT && m_client_repository.size () == 0 && !m_should_resident) {
2964 SCIM_DEBUG_MAIN (4) << "Exit Socket Server Thread.\n";
2965 server->shutdown ();
2966 m_signal_exit.emit ();
2971 if (client_info.type == FRONTEND_CLIENT) {
2972 SCIM_DEBUG_MAIN (4) << "It's a FrontEnd client.\n";
2974 /* The focused client is closed. */
2975 if (m_current_socket_client == client_id) {
2976 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2977 hide_helper (m_current_helper_uuid);
2980 m_current_socket_client = -1;
2981 m_current_client_context = 0;
2982 m_current_context_uuid = String ("");
2984 socket_transaction_start ();
2986 socket_transaction_end ();
2989 if (m_last_socket_client == client_id) {
2991 m_last_socket_client = -1;
2992 m_last_client_context = 0;
2993 m_last_context_uuid = String ("");
2997 /* Erase all associated Client Context UUIDs. */
2998 std::vector <uint32> ctx_list;
2999 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
3001 for (; it != m_client_context_uuids.end (); ++it) {
3002 if ((it->first & 0xFFFF) == (client_id & 0xFFFF))
3003 ctx_list.push_back (it->first);
3006 for (size_t i = 0; i < ctx_list.size (); ++i)
3007 m_client_context_uuids.erase (ctx_list [i]);
3009 /* Erase all helperise info associated with the client */
3011 it = m_client_context_helper.begin ();
3013 for (; it != m_client_context_helper.end (); ++it) {
3014 if ((it->first & 0xFFFF) == (client_id & 0xFFFF)) {
3015 ctx_list.push_back (it->first);
3016 /* similar to stop_helper except that it will not call get_focused_context() */
3017 String uuid = it->second;
3019 if (m_helper_uuid_count.find (uuid) != m_helper_uuid_count.end ()) {
3020 uint32 count = m_helper_uuid_count[uuid];
3023 m_helper_uuid_count.erase (uuid);
3024 HelperClientIndex::iterator pise = m_helper_client_index.find (uuid);
3026 if (pise != m_helper_client_index.end ()) {
3027 stop_helper (uuid, pise->second.id, it->first);
3030 SCIM_DEBUG_MAIN (1) << "Stop HelperISE " << uuid << " ...\n";
3032 m_helper_uuid_count[uuid] = count - 1;
3033 focus_out_helper (uuid, (it->first & 0xFFFF), ((it->first >> 16) & 0x7FFF));
3034 SCIM_DEBUG_MAIN (1) << "Decrement usage count of HelperISE " << uuid
3035 << " to " << m_helper_uuid_count[uuid] << "\n";
3041 for (size_t i = 0; i < ctx_list.size (); ++i)
3042 m_client_context_helper.erase (ctx_list [i]);
3044 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
3046 for (; iter != m_helper_info_repository.end (); iter++) {
3047 if (!m_current_helper_uuid.compare (iter->second.uuid))
3048 if (! (iter->second.option & ISM_ISE_HIDE_IN_CONTROL_PANEL))
3049 socket_update_control_panel ();
3051 } else if (client_info.type == FRONTEND_ACT_CLIENT) {
3052 SCIM_DEBUG_MAIN (4) << "It's a FRONTEND_ACT_CLIENT client.\n";
3053 IntIntRepository::iterator iter2 = m_panel_client_map.find (client_id);
3055 if (iter2 != m_panel_client_map.end ())
3056 m_panel_client_map.erase (iter2);
3057 } else if (client_info.type == HELPER_CLIENT) {
3058 SCIM_DEBUG_MAIN (4) << "It's a Helper client.\n";
3060 HelperInfoRepository::iterator hiit = m_helper_info_repository.find (client_id);
3062 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
3063 if (hiit != m_helper_info_repository.end ()) {
3064 bool restart = false;
3065 String uuid = hiit->second.uuid;
3066 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3068 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
3069 if ((hiit->second.option & SCIM_HELPER_AUTO_RESTART) &&
3070 (default_uuid.compare (uuid) == 0 || default_uuid.compare ("") == 0) &&
3071 (it != m_helper_client_index.end () && it->second.ref > 0)) {
3075 m_helper_client_index.erase (uuid);
3076 m_helper_info_repository.erase (hiit);
3078 m_signal_stop_default_ise (false);
3080 if (m_reshow_needed || enable_auto_restart)
3081 m_restart_needed = true;
3083 if (restart && !m_ise_exiting && m_restart_needed) {
3084 struct tms tiks_buf;
3085 static clock_t start_tiks = times (&tiks_buf);
3086 static clock_t clock_tiks = sysconf (_SC_CLK_TCK);
3087 clock_t curr_tiks = times (&tiks_buf);
3088 clock_t secs = (curr_tiks - start_tiks) / clock_tiks;
3089 double min_restart_interval = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_MINIMUM_RESTART_INTERVAL), (double)MIN_REPEAT_TIME);
3090 static String restart_uuid;
3092 LOGW("time second: %ld, restart inverval : %f", secs, min_restart_interval);
3093 if (restart_uuid != uuid || secs > min_restart_interval) {
3094 scim_usleep (100000);
3098 get_focused_context(client, context);
3100 uint32 ic = get_helper_ic (client, context);
3102 /* Get the context uuid from the client context registration table. */
3104 ClientContextUUIDRepository::iterator it =
3105 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
3107 if (it != m_client_context_uuids.end ())
3108 ic_uuid = it->second;
3111 m_start_helper_ic_index[uuid].push_back(std::make_pair(ic, ic_uuid));
3112 m_signal_run_helper (uuid, m_config_name, m_display_name);
3113 restart_uuid = uuid;
3114 LOGE ("Auto restart soft ISE:%s", uuid.c_str ());
3116 reset_default_ise (0);
3117 ISF_SAVE_LOG ("Auto restart is abnormal, reset default ISE");
3120 start_tiks = curr_tiks;
3124 m_ise_exiting = false;
3125 m_restart_needed = false;
3127 socket_transaction_start ();
3128 m_signal_remove_helper (client_id);
3129 socket_transaction_end ();
3130 } else if (client_info.type == HELPER_ACT_CLIENT) {
3131 SCIM_DEBUG_MAIN (4) << "It's a Helper passive client.\n";
3133 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client_id);
3135 if (hiit != m_helper_active_info_repository.end ()) {
3136 if (hiit->second.uuid == m_current_helper_uuid)
3137 m_is_ise_alive = false;
3139 m_helper_active_info_repository.erase (hiit);
3143 } else if (client_info.type == IMCONTROL_ACT_CLIENT) {
3144 SCIM_DEBUG_MAIN (4) << "It's a IMCONTROL_ACT_CLIENT client.\n";
3145 IMControlRepository::iterator iter = m_imcontrol_repository.find (client_id);
3147 if (iter != m_imcontrol_repository.end ()) {
3148 int size = iter->second.info.size ();
3152 stop_helper ((iter->second.info)[i].uuid, (iter->second.count)[i], DEFAULT_CONTEXT_VALUE);
3154 if ((iter->second.info)[i].option & ISM_ISE_HIDE_IN_CONTROL_PANEL)
3155 m_current_helper_uuid = m_last_helper_uuid;
3160 m_imcontrol_repository.erase (iter);
3163 IntIntRepository::iterator iter2 = m_imcontrol_map.find (client_id);
3165 if (iter2 != m_imcontrol_map.end ())
3166 m_imcontrol_map.erase (iter2);
3167 } else if (client_info.type == REMOTEINPUT_ACT_CLIENT) {
3168 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_ACT_CLIENT client.\n";
3170 for (unsigned int i = 0; i < m_current_send_remoteinput_id.size (); i++) {
3171 if (m_current_send_remoteinput_id.at (i) == client_id) {
3172 m_current_send_remoteinput_id.erase (m_current_send_remoteinput_id.begin () + i);
3176 } else if (client_info.type == REMOTEINPUT_CLIENT) {
3177 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_CLIENT client.\n";
3179 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3180 if (m_current_recv_remoteinput_id.at (i) == client_id) {
3181 m_current_recv_remoteinput_id.erase (m_current_recv_remoteinput_id.begin () + i);
3185 } else if (client_info.type == CONFIG_CLIENT) {
3186 SCIM_DEBUG_MAIN(4) << "It's a CONFIG_CLIENT client.\n";
3188 LOGI ("clients: %zu, panel clients: %zu, imcontrols size: %zu, helper infos: %zu, \
3189 helper active infos: %zu, helper client indexes: %zu, ises pending: %zu, \
3190 imcontrols: %zu, start helper ic indexes: %zu, client context uuids: %zu, \
3191 client context helpers: %zu, helpers uuid count: %zu",
3192 m_client_repository.size(),
3193 m_panel_client_map.size(),
3194 m_imcontrol_map.size(),
3195 m_helper_info_repository.size(),
3196 m_helper_active_info_repository.size(),
3197 m_helper_client_index.size(),
3198 m_ise_pending_repository.size(),
3199 m_imcontrol_repository.size(),
3200 m_start_helper_ic_index.size(),
3201 m_client_context_uuids.size(),
3202 m_client_context_helper.size(),
3203 m_helper_uuid_count.size());
3206 const ClientInfo& socket_get_client_info (int client) {
3207 static ClientInfo null_client = { 0, UNKNOWN_CLIENT };
3208 ClientRepository::iterator it = m_client_repository.find (client);
3210 if (it != m_client_repository.end ())
3216 //SCIM_TRANS_CMD_PANEL_TURN_ON
3217 void socket_turn_on (void) {
3218 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_on ()\n";
3219 m_signal_turn_on ();
3221 //SCIM_TRANS_CMD_PANEL_TURN_OFF
3222 void socket_turn_off (void) {
3223 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_off ()\n";
3224 m_signal_turn_off ();
3226 //SCIM_TRANS_CMD_UPDATE_SCREEN
3227 void socket_update_screen (int client_id, uint32 num) {
3228 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_screen ()\n";
3230 if (((int) num) != m_current_screen) {
3231 SCIM_DEBUG_MAIN (4) << "New Screen number = " << num << "\n";
3232 m_signal_update_screen ((int) num);
3233 helper_all_update_screen ((int) num);
3234 m_current_screen = (num);
3237 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
3238 void socket_update_spot_location (uint32 x, uint32 y, uint32 top_y) {
3239 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_spot_location ()\n";
3240 SCIM_DEBUG_MAIN (4) << "New Spot location x=" << x << " y=" << y << "\n";
3241 m_signal_update_spot_location ((int)x, (int)y, (int)top_y);
3242 helper_all_update_spot_location ((int)x, (int)y);
3244 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
3245 void socket_update_cursor_position (uint32 cursor_pos) {
3246 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_cursor_position ()\n";
3247 SCIM_DEBUG_MAIN (4) << "New cursor position pos=" << cursor_pos << "\n";
3248 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3249 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3250 iseContext->cursor_pos = static_cast<int>(cursor_pos);
3252 helper_all_update_cursor_position ((int)cursor_pos);
3254 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
3255 void socket_update_surrounding_text (String text, uint32 cursor) {
3256 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3257 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3259 if (it != m_helper_client_index.end ()) {
3264 get_focused_context (client, context);
3265 ctx = get_helper_ic (client, context);
3266 m_panel_agent_manager.socket_update_surrounding_text (it->second.id, ctx, m_current_helper_uuid, text, cursor);
3271 void remoteinput_callback_focus_in () {
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_focus_in (m_current_recv_remoteinput_id.at (i));
3281 void remoteinput_callback_focus_out () {
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_focus_out (m_current_recv_remoteinput_id.at (i));
3291 void remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type) {
3292 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3293 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3294 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3295 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
3296 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(return_key_type);
3297 iseContext->return_key_disabled = static_cast<Eina_Bool>(return_key_disabled);
3298 iseContext->layout_variation = static_cast<int>(variation);
3299 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(autocapital_type);
3300 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(hint);
3302 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3304 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);
3309 void remoteinput_callback_surrounding_text (String text, uint32 cursor) {
3310 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3312 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3314 m_panel_agent_manager.socket_remoteinput_surrounding_text (m_current_recv_remoteinput_id.at (i), text, cursor);
3319 void remoteinput_callback_input_resource (uint32 input_resource) {
3320 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3322 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3324 m_panel_agent_manager.socket_remoteinput_input_resource (m_current_recv_remoteinput_id.at (i), input_resource);
3329 void remoteinput_callback_key_symbol (String key_symbol, int press, uint32 timestamp) {
3330 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3332 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3334 m_panel_agent_manager.socket_remoteinput_key_symbol (m_current_recv_remoteinput_id.at (i), key_symbol, press, timestamp);
3339 void remoteinput_callback_cursor_position (uint32 cursor) {
3340 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3342 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3344 m_panel_agent_manager.socket_remoteinput_cursor_position (m_current_recv_remoteinput_id.at (i), cursor);
3349 //ISM_TRANS_CMD_UPDATE_SELECTION
3350 void socket_update_selection (String text) {
3351 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3352 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3354 if (it != m_helper_client_index.end ()) {
3359 get_focused_context (client, context);
3360 ctx = get_helper_ic (client, context);
3361 m_panel_agent_manager.socket_update_selection (it->second.id, ctx, m_current_helper_uuid, text);
3365 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
3366 void socket_update_factory_info (PanelFactoryInfo& info) {
3367 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_factory_info ()\n";
3368 SCIM_DEBUG_MAIN (4) << "New Factory info uuid=" << info.uuid << " name=" << info.name << "\n";
3369 info.lang = scim_get_normalized_language (info.lang);
3370 m_signal_update_factory_info (info);
3372 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
3373 void socket_show_help (String help) {
3374 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_help ()\n";
3375 m_signal_show_help (help);
3377 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
3378 void socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec) {
3379 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_factory_menu ()\n";
3382 m_signal_show_factory_menu (vec);
3385 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3386 void socket_show_preedit_string (void) {
3387 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_preedit_string ()\n";
3388 m_signal_show_preedit_string ();
3390 //SCIM_TRANS_CMD_SHOW_AUX_STRING
3391 void socket_show_aux_string (void) {
3392 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_aux_string ()\n";
3393 m_signal_show_aux_string ();
3395 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
3396 void socket_show_lookup_table (void) {
3397 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_lookup_table ()\n";
3399 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3400 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3401 if (iseContext->layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD || iseContext->input_hint & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
3405 m_signal_show_lookup_table ();
3407 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
3408 void socket_show_associate_table (void) {
3409 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_associate_table ()\n";
3410 m_signal_show_associate_table ();
3412 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3413 void socket_hide_preedit_string (void) {
3414 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_preedit_string ()\n";
3415 m_signal_hide_preedit_string ();
3417 //SCIM_TRANS_CMD_HIDE_AUX_STRING
3418 void socket_hide_aux_string (void) {
3419 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_aux_string ()\n";
3420 m_signal_hide_aux_string ();
3422 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
3423 void socket_hide_lookup_table (void) {
3424 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_lookup_table ()\n";
3425 m_signal_hide_lookup_table ();
3427 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
3428 void socket_hide_associate_table (void) {
3429 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_associate_table ()\n";
3430 m_signal_hide_associate_table ();
3432 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3433 void socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret) {
3434 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_string ()\n";
3435 m_signal_update_preedit_string (str, attrs, (int) caret);
3437 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
3438 void socket_update_preedit_caret (uint32 caret) {
3439 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3440 m_signal_update_preedit_caret ((int) caret);
3442 //ISM_TRANS_CMD_RECAPTURE_STRING
3443 void socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs) {
3444 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3445 m_signal_recapture_string (offset, len, preedit, commit, attrs);
3447 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
3448 void socket_update_aux_string (String& str, const AttributeList& attrs) {
3449 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_aux_string ()\n";
3450 m_signal_update_aux_string (str, attrs);
3451 m_is_imengine_aux = true;
3453 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
3454 void socket_update_lookup_table (const LookupTable& table) {
3455 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_lookup_table ()\n";
3457 //g_isf_candidate_table = _isf_candidate_table;
3458 m_signal_update_lookup_table (table);
3459 m_is_imengine_candidate = true;
3461 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
3462 void socket_update_associate_table (const LookupTable& table) {
3463 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_associate_table ()\n";
3464 m_signal_update_associate_table (table);
3467 void socket_update_control_panel (void) {
3468 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_control_panel ()\n";
3470 m_signal_get_keyboard_ise (name, uuid);
3471 PanelFactoryInfo info;
3473 if (name.length () > 0)
3474 info = PanelFactoryInfo (uuid, name, String (""), String (""));
3476 info = PanelFactoryInfo (String (""), String (_ ("English Keyboard")), String ("C"), String (SCIM_KEYBOARD_ICON_FILE));
3478 m_signal_update_factory_info (info);
3480 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3481 void socket_register_properties (const PropertyList& properties) {
3482 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_register_properties ()\n";
3483 m_signal_register_properties (properties);
3485 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3486 void socket_update_property (const Property& property) {
3487 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_property ()\n";
3488 m_signal_update_property (property);
3490 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
3491 void socket_get_keyboard_ise_list (String& uuid) {
3492 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise_list ()\n";
3493 std::vector<String> list;
3495 m_signal_get_keyboard_ise_list (list);
3496 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3498 if (it != m_helper_client_index.end ()) {
3501 get_focused_context (client, context);
3502 uint32 ctx = get_helper_ic (client, context);
3503 m_panel_agent_manager.socket_get_keyboard_ise_list (it->second.id, ctx, uuid, list);
3506 //ISM_TRANS_CMD_SET_CANDIDATE_UI
3507 void socket_set_candidate_ui (uint32 portrait_line, uint32 mode) {
3508 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3509 m_signal_set_candidate_ui (portrait_line, mode);
3511 //ISM_TRANS_CMD_GET_CANDIDATE_UI
3512 void socket_get_candidate_ui (String uuid) {
3513 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_candidate_ui ()\n";
3514 int style = 0, mode = 0;
3515 m_signal_get_candidate_ui (style, mode);
3516 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3518 if (it != m_helper_client_index.end ()) {
3521 get_focused_context (client, context);
3522 uint32 ctx = get_helper_ic (client, context);
3523 m_panel_agent_manager.socket_get_candidate_ui (it->second.id, ctx, uuid, style, mode);
3526 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
3527 void socket_set_candidate_position (uint32 left, uint32 top) {
3528 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_candidate_position ()\n";
3529 m_signal_set_candidate_position (left, top);
3531 //ISM_TRANS_CMD_HIDE_CANDIDATE
3532 void socket_hide_candidate (void) {
3533 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_candidate ()\n";
3534 m_signal_hide_preedit_string ();
3535 m_signal_hide_aux_string ();
3536 m_signal_hide_lookup_table ();
3537 m_signal_hide_associate_table ();
3539 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
3540 void socket_get_candidate_geometry (String& uuid) {
3541 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3542 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3544 if (it != m_helper_client_index.end ()) {
3545 struct rectinfo info = {0, 0, 0, 0};
3546 m_signal_get_candidate_geometry (info);
3549 get_focused_context (client, context);
3550 uint32 ctx = get_helper_ic (client, context);
3551 m_panel_agent_manager.socket_get_candidate_geometry (it->second.id, ctx, uuid, info);
3554 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
3555 void socket_set_keyboard_ise (String uuid) {
3556 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3558 m_signal_set_keyboard_ise (uuid);
3560 //ISM_TRANS_CMD_SELECT_CANDIDATE
3561 void socket_helper_select_candidate (uint32 index) {
3562 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3564 m_signal_select_candidate (index);
3566 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
3567 void socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height) {
3568 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
3571 uint32 focused_context;
3572 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
3574 if (it != m_helper_active_info_repository.end ()) {
3575 if (it->second.uuid == m_current_helper_uuid) {
3576 m_signal_update_ise_geometry (x, y, width, height);
3578 get_focused_context (focused_client, focused_context);
3579 ClientInfo client_info = socket_get_client_info (focused_client);
3580 if (client_info.type == FRONTEND_CLIENT) {
3581 m_panel_agent_manager.update_ise_geometry (focused_client, focused_context, x, y, width, height);
3586 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
3587 void socket_get_keyboard_ise (String uuid) {
3588 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise ()\n";
3589 String ise_name, ise_uuid;
3593 get_focused_context (client, context);
3594 ctx = get_helper_ic (client, context);
3596 if (m_client_context_uuids.find (ctx) != m_client_context_uuids.end ())
3597 ise_uuid = m_client_context_uuids[ctx];
3599 m_signal_get_keyboard_ise (ise_name, ise_uuid);
3600 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3602 if (it != m_helper_client_index.end ()) {
3603 get_focused_context (client, context);
3604 ctx = get_helper_ic (client, context);
3605 m_panel_agent_manager.socket_get_keyboard_ise (it->second.id, ctx, uuid, ise_name, ise_uuid);
3609 //SCIM_TRANS_CMD_START_HELPER
3610 void socket_start_helper (int client_id, uint32 context, String uuid) {
3611 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_start_helper ()\n";
3612 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3614 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3616 /* Get the context uuid from the client context registration table. */
3618 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3620 if (it != m_client_context_uuids.end ())
3621 ic_uuid = it->second;
3624 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3625 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3626 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3627 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3630 if (it == m_helper_client_index.end ()) {
3631 SCIM_DEBUG_MAIN (5) << "Run this Helper.\n";
3632 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
3633 m_signal_run_helper (uuid, m_config_name, m_display_name);
3635 SCIM_DEBUG_MAIN (5) << "Increase the Reference count.\n";
3636 m_panel_agent_manager.socket_start_helper (it->second.id, ic, ic_uuid);
3642 //SCIM_TRANS_CMD_STOP_HELPER
3643 void socket_stop_helper (int client_id, uint32 context, String uuid) {
3644 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_stop_helper ()\n";
3645 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3647 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3649 if (it != m_helper_client_index.end ()) {
3650 SCIM_DEBUG_MAIN (5) << "Decrease the Reference count.\n";
3653 /* Get the context uuid from the client context registration table. */
3655 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3657 if (it != m_client_context_uuids.end ())
3658 ic_uuid = it->second;
3661 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3662 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3663 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3664 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3667 m_panel_agent_manager.helper_detach_input_context (it->second.id, ic, ic_uuid);
3669 if (it->second.ref <= 0)
3670 m_panel_agent_manager.exit (it->second.id, ic);
3675 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
3676 void socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans) {
3677 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_send_helper_event ()\n";
3678 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3680 if (it != m_helper_client_index.end ()) {
3682 /* Get the context uuid from the client context registration table. */
3684 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3686 if (it != m_client_context_uuids.end ())
3687 ic_uuid = it->second;
3690 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3691 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3692 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3693 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3696 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);
3700 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3701 void socket_helper_register_properties (int client, PropertyList& properties) {
3702 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_properties (" << client << ")\n";
3703 m_signal_register_helper_properties (client, properties);
3705 #if 0 //why? remove if useless, infinite loop
3706 /* Check whether application is already focus_in */
3707 if (m_current_socket_client != -1) {
3708 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
3709 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
3710 reset_keyboard_ise ();
3713 /* Check whether ISE panel is already shown */
3714 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0) {
3715 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
3717 uint32 focused_context;
3718 get_focused_context (focused_client, focused_context);
3720 if (focused_client == -1 && m_active_client_id != -1) {
3721 focused_client = m_panel_client_map[m_active_client_id];
3722 focused_context = 0;
3725 uint32 ctx = get_helper_ic (focused_client, focused_context);
3726 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
3729 m_signal_show_ise ();
3733 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3734 void socket_helper_update_property (int client, Property& property) {
3735 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_property (" << client << ")\n";
3736 m_signal_update_helper_property (client, property);
3738 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
3739 void socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans) {
3740 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_imengine_event (" << client << ")\n";
3741 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client);
3743 if (hiit != m_helper_active_info_repository.end ()) {
3745 uint32 target_context;
3746 get_imengine_client_context (target_ic, target_client, target_context);
3748 uint32 focused_context;
3749 String focused_uuid;
3750 focused_uuid = get_focused_context (focused_client, focused_context);
3752 if (target_ic == (uint32) (-1)) {
3753 target_client = focused_client;
3754 target_context = focused_context;
3757 if (target_uuid.length () == 0)
3758 target_uuid = focused_uuid;
3760 ClientInfo client_info = socket_get_client_info (target_client);
3761 SCIM_DEBUG_MAIN (5) << "Target UUID = " << target_uuid << " Focused UUId = " << focused_uuid << "\nTarget Client = " << target_client << "\n";
3763 if (client_info.type == FRONTEND_CLIENT) {
3764 /* If the original context value is greater than 0x7FFF, the line below would not work properly
3765 since the target_context acquired by get_imengine_client_context() is always smaller than 0x7FFF.
3766 But since the send_imengine_event() of scim_helper module will call IMEngine's
3767 process_helper_event() function directly, instead of sending SEND_IMENGINE_EVENT message.
3768 So we are not going to handle this kind of exceptional case for now. */
3769 m_panel_agent_manager.process_helper_event (target_client, target_context, target_uuid, hiit->second.uuid, nest_trans);
3774 void socket_helper_key_event_op (int client, int cmd, uint32 target_ic, String& target_uuid, KeyEvent& key) {
3775 if (!key.empty ()) {
3777 uint32 target_context;
3778 get_imengine_client_context (target_ic, target_client, target_context);
3780 uint32 focused_context;
3781 String focused_uuid;
3782 focused_uuid = get_focused_context (focused_client, focused_context);
3784 if (target_ic == (uint32) (-1)) {
3785 target_client = focused_client;
3786 target_context = focused_context;
3789 if (target_uuid.length () == 0)
3790 target_uuid = focused_uuid;
3792 if (target_client == -1) {
3793 /* FIXUP: monitor 'Invalid Window' error */
3794 LOGW ("focused target client is NULL");
3795 } else if (target_uuid == focused_uuid &&
3796 clients_equal (target_client, focused_client) &&
3797 contexts_equal (target_context, focused_context)) {
3798 ClientInfo client_info = socket_get_client_info (focused_client);
3800 if (client_info.type == FRONTEND_CLIENT) {
3801 m_panel_agent_manager.socket_helper_key_event (focused_client, focused_context, cmd, key);
3804 LOGD ("[target_client : %d, focused_client : %d] => %d, [target_context : %u, focused_context : %u] => %d",
3805 target_client, focused_client, clients_equal (target_client, focused_client),
3806 target_context, focused_context, contexts_equal (target_context, focused_context));
3810 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
3811 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
3812 void socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3813 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_key_event (" << client << ")\n";
3814 ISF_PROF_DEBUG ("first message")
3815 socket_helper_key_event_op (client, SCIM_TRANS_CMD_PROCESS_KEY_EVENT, target_ic, target_uuid, key);
3817 initialize_remote_input_vconf_key ();
3819 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
3820 void socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3821 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_forward_key_event (" << client << ")\n";
3822 socket_helper_key_event_op (client, SCIM_TRANS_CMD_FORWARD_KEY_EVENT, target_ic, target_uuid, key);
3824 initialize_remote_input_vconf_key ();
3827 //SCIM_TRANS_CMD_COMMIT_STRING
3828 void socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr) {
3829 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_commit_string (" << client << ")\n";
3831 if (wstr.length ()) {
3833 uint32 target_context;
3834 get_imengine_client_context (target_ic, target_client, target_context);
3836 uint32 focused_context;
3837 String focused_uuid;
3838 focused_uuid = get_focused_context (focused_client, focused_context);
3840 if (target_ic == (uint32) (-1)) {
3841 target_client = focused_client;
3842 target_context = focused_context;
3845 if (target_uuid.length () == 0)
3846 target_uuid = focused_uuid;
3848 if (target_uuid == focused_uuid &&
3849 clients_equal (target_client, focused_client) &&
3850 contexts_equal (target_context, focused_context)) {
3851 ClientInfo client_info = socket_get_client_info (focused_client);
3853 if (client_info.type == FRONTEND_CLIENT) {
3854 m_panel_agent_manager.commit_string (focused_client, focused_context, wstr);
3856 initialize_remote_input_vconf_key ();
3858 std::cerr << "target client is not existed!!!" << "\n";
3863 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
3864 void socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after) {
3865 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3867 uint32 focused_context;
3868 get_focused_context (focused_client, focused_context);
3869 ClientInfo client_info = socket_get_client_info (focused_client);
3871 /* If the get_surrounding_text was received when there is no client available,
3872 * return empty surrounding text since the sender would be waiting for reply */
3873 if (focused_client == -1) {
3874 socket_update_surrounding_text("", 0);
3876 if (client_info.type == FRONTEND_CLIENT) {
3877 m_panel_agent_manager.socket_helper_get_surrounding_text (focused_client, focused_context, maxlen_before, maxlen_after);
3881 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
3882 void socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len) {
3883 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3885 uint32 focused_context;
3886 get_focused_context (focused_client, focused_context);
3887 ClientInfo client_info = socket_get_client_info (focused_client);
3889 if (client_info.type == FRONTEND_CLIENT) {
3890 m_panel_agent_manager.socket_helper_delete_surrounding_text (focused_client, focused_context, offset, len);
3892 initialize_remote_input_vconf_key ();
3895 //SCIM_TRANS_CMD_GET_SELECTION
3896 void socket_helper_get_selection (int client, String uuid) {
3897 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3899 uint32 focused_context;
3900 get_focused_context (focused_client, focused_context);
3901 ClientInfo client_info = socket_get_client_info (focused_client);
3903 if (client_info.type == FRONTEND_CLIENT) {
3904 m_panel_agent_manager.socket_helper_get_selection (focused_client, focused_context);
3907 //SCIM_TRANS_CMD_SET_SELECTION
3908 void socket_helper_set_selection (int client, uint32 start, uint32 end) {
3909 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3911 uint32 focused_context;
3912 get_focused_context (focused_client, focused_context);
3913 ClientInfo client_info = socket_get_client_info (focused_client);
3915 if (client_info.type == FRONTEND_CLIENT) {
3916 m_panel_agent_manager.socket_helper_set_selection (focused_client, focused_context, start, end);
3920 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3921 void socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid) {
3922 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_show_preedit_string (" << client << ")\n";
3924 uint32 target_context;
3925 get_imengine_client_context (target_ic, target_client, target_context);
3927 uint32 focused_context;
3928 String focused_uuid = get_focused_context (focused_client, focused_context);
3930 if (target_ic == (uint32) (-1)) {
3931 target_client = focused_client;
3932 target_context = focused_context;
3935 if (target_uuid.length () == 0)
3936 target_uuid = focused_uuid;
3938 if (target_uuid == focused_uuid &&
3939 clients_equal (target_client, focused_client) &&
3940 contexts_equal (target_context, focused_context)) {
3941 ClientInfo client_info = socket_get_client_info (focused_client);
3943 if (client_info.type == FRONTEND_CLIENT) {
3944 m_panel_agent_manager.show_preedit_string (focused_client, focused_context);
3948 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3949 void socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid) {
3950 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_hide_preedit_string (" << client << ")\n";
3952 uint32 target_context;
3953 get_imengine_client_context (target_ic, target_client, target_context);
3955 uint32 focused_context;
3956 String focused_uuid = get_focused_context (focused_client, focused_context);
3958 if (target_ic == (uint32) (-1)) {
3959 target_client = focused_client;
3960 target_context = focused_context;
3963 if (target_uuid.length () == 0)
3964 target_uuid = focused_uuid;
3966 if (target_uuid == focused_uuid &&
3967 clients_equal (target_client, focused_client) &&
3968 contexts_equal (target_context, focused_context)) {
3969 ClientInfo client_info = socket_get_client_info (focused_client);
3971 if (client_info.type == FRONTEND_CLIENT) {
3972 m_panel_agent_manager.hide_preedit_string (focused_client, focused_context);
3976 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3977 void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
3978 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_preedit_string (" << client << ")\n";
3980 uint32 target_context;
3981 get_imengine_client_context (target_ic, target_client, target_context);
3983 uint32 focused_context;
3984 String focused_uuid;
3985 focused_uuid = get_focused_context (focused_client, focused_context);
3987 if (target_ic == (uint32) (-1)) {
3988 target_client = focused_client;
3989 target_context = focused_context;
3992 if (target_uuid.length () == 0)
3993 target_uuid = focused_uuid;
3995 if (target_uuid == focused_uuid &&
3996 clients_equal (target_client, focused_client) &&
3997 contexts_equal (target_context, focused_context)) {
3998 ClientInfo client_info = socket_get_client_info (focused_client);
4000 if (client_info.type == FRONTEND_CLIENT) {
4001 m_panel_agent_manager.update_preedit_string (focused_client, focused_context, preedit, commit, attrs, caret);
4003 initialize_remote_input_vconf_key ();
4007 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
4008 void socket_helper_update_preedit_caret (int client, uint32 caret) {
4009 SCIM_DEBUG_MAIN (4) << __func__ << " (" << client << ")\n";
4011 uint32 focused_context;
4012 String focused_uuid;
4013 focused_uuid = get_focused_context (focused_client, focused_context);
4014 ClientInfo client_info = socket_get_client_info (focused_client);
4016 if (client_info.type == FRONTEND_CLIENT) {
4017 m_panel_agent_manager.update_preedit_caret (focused_client, focused_context, caret);
4021 //ISM_TRANS_CMD_RECAPTURE_STRING
4022 void socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
4023 WideString commit, AttributeList& attrs) {
4024 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_recapture_string (" << client << ")\n";
4026 uint32 target_context;
4027 get_imengine_client_context (target_ic, target_client, target_context);
4029 uint32 focused_context;
4030 String focused_uuid;
4031 focused_uuid = get_focused_context (focused_client, focused_context);
4033 if (target_ic == (uint32) (-1)) {
4034 target_client = focused_client;
4035 target_context = focused_context;
4038 if (target_uuid.length () == 0)
4039 target_uuid = focused_uuid;
4041 if (target_uuid == focused_uuid &&
4042 clients_equal (target_client, focused_client) &&
4043 contexts_equal (target_context, focused_context)) {
4044 ClientInfo client_info = socket_get_client_info (focused_client);
4046 if (client_info.type == FRONTEND_CLIENT) {
4047 m_panel_agent_manager.recapture_string (focused_client, focused_context, offset, len, preedit, commit, attrs);
4049 initialize_remote_input_vconf_key ();
4054 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
4055 void socket_helper_register_helper (int client, HelperInfo& info) {
4056 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper (" << client << ")\n";
4057 bool result = false;
4064 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4065 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4069 info.option = option;
4071 if (info.uuid.length ()) {
4072 SCIM_DEBUG_MAIN (4) << "New Helper uuid=" << info.uuid << " name=" << info.name << "\n";
4073 HelperClientIndex::iterator it = m_helper_client_index.find (info.uuid);
4075 if (it == m_helper_client_index.end ()) {
4076 m_helper_info_repository [client] = info;
4077 m_helper_client_index [info.uuid] = HelperClientStub (client, 1);
4078 StartHelperICIndex::iterator icit = m_start_helper_ic_index.find (info.uuid);
4080 if (icit != m_start_helper_ic_index.end ()) {
4081 m_panel_agent_manager.helper_attach_input_context_and_update_screen (client, icit->second, m_current_screen);
4082 m_start_helper_ic_index.erase (icit);
4085 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4086 m_panel_agent_manager.send_fail_reply(client);
4089 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4090 m_panel_agent_manager.send_fail_reply(client);
4097 LOGD ("Succeed to register IME : %s", info.uuid.c_str ());
4098 m_signal_register_helper (client, info);
4102 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
4103 void socket_helper_register_helper_passive (int client, HelperInfo& info) {
4104 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper_passive (" << client << ")\n";
4111 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4112 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4116 info.option = option;
4118 if (info.uuid.length ()) {
4119 SCIM_DEBUG_MAIN (4) << "New Helper Passive uuid=" << info.uuid << " name=" << info.name << "\n";
4120 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
4122 if (it == m_helper_active_info_repository.end ()) {
4123 m_helper_active_info_repository[client] = info;
4126 StringIntRepository::iterator iter = m_ise_pending_repository.find (info.uuid);
4128 if (iter != m_ise_pending_repository.end ()) {
4129 m_ise_pending_repository.erase (iter);
4132 iter = m_ise_pending_repository.find (info.name);
4134 if (iter != m_ise_pending_repository.end ()) {
4135 m_ise_pending_repository.erase (iter);
4141 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
4142 void socket_helper_update_input_context (int client, uint32 type, uint32 value) {
4143 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_input_context (" << client << ")\n";
4144 m_signal_update_input_context ((int)type, (int)value);
4146 uint32 focused_context;
4147 get_focused_context (focused_client, focused_context);
4148 ClientInfo client_info = socket_get_client_info (focused_client);
4150 if (client_info.type == FRONTEND_CLIENT) {
4151 m_panel_agent_manager.update_ise_input_context (focused_client, focused_context, type, value);
4153 std::cerr << "focused client is not existed!!!" << "\n";
4156 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
4157 void socket_helper_update_language_locale(int client, String locale) {
4158 SCIM_DEBUG_MAIN(4) << "InfoManager::socket_helper_update_language_locale (" << client << ")\n";
4159 m_signal_update_language_locale(locale);
4162 uint32 focused_context;
4163 get_focused_context(focused_client, focused_context);
4164 ClientInfo client_info = socket_get_client_info(focused_client);
4166 if (client_info.type == FRONTEND_CLIENT) {
4167 m_panel_agent_manager.update_ise_language_locale(focused_client, focused_context, locale);
4169 std::cerr << "focused client is not existed!!!" << "\n";
4172 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
4173 void socket_helper_send_private_command (int client, String command) {
4174 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4176 uint32 focused_context;
4177 get_focused_context (focused_client, focused_context);
4178 ClientInfo client_info = socket_get_client_info (focused_client);
4180 if (client_info.type == FRONTEND_CLIENT) {
4181 m_panel_agent_manager.send_private_command (focused_client, focused_context, command);
4184 //SCIM_TRANS_CMD_COMMIT_CONTENT
4185 void socket_helper_commit_content (int client, String content, String description, String mime_types) {
4186 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4188 uint32 focused_context;
4189 get_focused_context (focused_client, focused_context);
4190 ClientInfo client_info = socket_get_client_info (focused_client);
4192 if (client_info.type == FRONTEND_CLIENT) {
4193 m_panel_agent_manager.commit_content (focused_client, focused_context, content, description, mime_types);
4196 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
4197 void UPDATE_ISE_EXIT (int client) {
4198 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4199 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
4200 if (launch_ise_on_request && !m_refocus_needed && !m_reshow_needed)
4201 m_restart_needed = false;
4204 void process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial) {
4206 uint32 focused_context;
4207 get_focused_context (focused_client, focused_context);
4208 ClientInfo client_info = socket_get_client_info (focused_client);
4210 if (client_info.type == FRONTEND_CLIENT) {
4211 m_panel_agent_manager.process_key_event_done (focused_client, focused_context, key, ret, serial);
4215 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
4216 void request_ise_hide () {
4218 uint32 focused_context;
4219 get_focused_context (focused_client, focused_context);
4220 ClientInfo client_info = socket_get_client_info (focused_client);
4222 if (client_info.type == FRONTEND_CLIENT) {
4223 m_panel_agent_manager.request_ise_hide (focused_client, focused_context);
4227 void socket_reset_helper_input_context (const String& uuid, int client, uint32 context) {
4228 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4230 if (it != m_helper_client_index.end ()) {
4231 uint32 ctx = get_helper_ic (client, context);
4232 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
4236 bool helper_select_aux (uint32 item) {
4237 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_aux \n";
4239 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4240 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4242 if (it != m_helper_client_index.end ()) {
4246 get_focused_context (client, context);
4247 ctx = get_helper_ic (client, context);
4248 m_panel_agent_manager.select_aux (it->second.id, ctx, item);
4256 bool helper_select_candidate (uint32 item) {
4257 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_candidate \n";
4259 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4260 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4262 if (it != m_helper_client_index.end ()) {
4266 get_focused_context (client, context);
4267 ctx = get_helper_ic (client, context);
4268 m_panel_agent_manager.select_candidate (it->second.id, ctx, item);
4276 bool helper_lookup_table_page_up (void) {
4277 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_up \n";
4279 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4280 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4282 if (it != m_helper_client_index.end ()) {
4286 get_focused_context (client, context);
4287 ctx = get_helper_ic (client, context);
4288 m_panel_agent_manager.lookup_table_page_up (it->second.id, ctx);
4296 bool helper_lookup_table_page_down (void) {
4297 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_down \n";
4299 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4300 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4302 if (it != m_helper_client_index.end ()) {
4306 get_focused_context (client, context);
4307 ctx = get_helper_ic (client, context);
4308 m_panel_agent_manager.lookup_table_page_down (it->second.id, ctx);
4316 bool helper_update_lookup_table_page_size (uint32 size) {
4317 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_lookup_table_page_size \n";
4319 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4320 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4322 if (it != m_helper_client_index.end ()) {
4326 get_focused_context (client, context);
4327 ctx = get_helper_ic (client, context);
4328 m_panel_agent_manager.update_lookup_table_page_size (it->second.id, ctx, size);
4336 bool helper_update_candidate_item_layout (const std::vector<uint32>& row_items) {
4337 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4339 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4340 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4342 if (it != m_helper_client_index.end ()) {
4346 get_focused_context (client, context);
4347 ctx = get_helper_ic (client, context);
4348 m_panel_agent_manager.update_candidate_item_layout (it->second.id, ctx, row_items);
4356 bool helper_select_associate (uint32 item) {
4357 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_associate \n";
4359 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4360 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4362 if (it != m_helper_client_index.end ()) {
4366 get_focused_context (client, context);
4367 ctx = get_helper_ic (client, context);
4368 m_panel_agent_manager.select_associate (it->second.id, ctx, item);
4376 bool helper_associate_table_page_up (void) {
4377 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_up \n";
4379 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4380 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4382 if (it != m_helper_client_index.end ()) {
4386 get_focused_context (client, context);
4387 ctx = get_helper_ic (client, context);
4388 m_panel_agent_manager.associate_table_page_up (it->second.id, ctx);
4396 bool helper_associate_table_page_down (void) {
4397 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_down \n";
4399 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4400 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4402 if (it != m_helper_client_index.end ()) {
4406 get_focused_context (client, context);
4407 ctx = get_helper_ic (client, context);
4408 m_panel_agent_manager.associate_table_page_down (it->second.id, ctx);
4416 bool helper_update_associate_table_page_size (uint32 size) {
4417 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_associate_table_page_size \n";
4419 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4420 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4422 if (it != m_helper_client_index.end ()) {
4426 get_focused_context (client, context);
4427 ctx = get_helper_ic (client, context);
4428 m_panel_agent_manager.update_associate_table_page_size (it->second.id, ctx, size);
4436 bool helper_update_displayed_candidate_number (uint32 size) {
4437 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4439 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4440 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4442 if (it != m_helper_client_index.end ()) {
4446 get_focused_context (client, context);
4447 ctx = get_helper_ic (client, context);
4448 m_panel_agent_manager.update_displayed_candidate_number (it->second.id, ctx, size);
4456 bool helper_longpress_candidate (uint32 index) {
4457 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4459 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4460 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4462 if (it != m_helper_client_index.end ()) {
4466 get_focused_context (client, context);
4467 ctx = get_helper_ic (client, context);
4468 m_panel_agent_manager.send_longpress_event (it->second.id, ctx, index);
4473 std::cerr << __func__ << " is failed!!!\n";
4477 void helper_all_update_spot_location (int x, int y) {
4478 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_spot_location (" << x << "," << y << ")\n";
4479 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4482 String uuid = get_focused_context (client, context);
4484 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4485 if (hiit->second.option & SCIM_HELPER_NEED_SPOT_LOCATION_INFO) {
4486 m_panel_agent_manager.helper_all_update_spot_location (hiit->first, get_helper_ic (client, context), uuid, x, y);
4491 void helper_all_update_cursor_position (int cursor_pos) {
4492 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_cursor_position (" << cursor_pos << ")\n";
4493 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4496 String uuid = get_focused_context (client, context);
4498 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4499 m_panel_agent_manager.helper_all_update_cursor_position (hiit->first, get_helper_ic (client, context), uuid, cursor_pos);
4503 void helper_all_update_screen (int screen) {
4504 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_screen (" << screen << ")\n";
4505 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4509 uuid = get_focused_context (client, context);
4511 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4512 if (hiit->second.option & SCIM_HELPER_NEED_SCREEN_INFO) {
4513 m_panel_agent_manager.helper_all_update_screen (hiit->first, get_helper_ic (client, context), uuid, screen);
4518 bool set_autocapital_type (int mode) {
4519 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4520 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4521 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4522 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(mode);
4524 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4525 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4527 if (it != m_helper_client_index.end ()) {
4531 get_focused_context (client, context);
4532 ctx = get_helper_ic (client, context);
4533 m_panel_agent_manager.set_autocapital_type (it->second.id, ctx, m_current_helper_uuid, mode);
4538 std::cerr << __func__ << " is failed!!!\n";
4542 bool set_prediction_allow (int client, int mode) {
4543 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4544 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4545 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4546 iseContext->prediction_allow = static_cast<Eina_Bool>(mode);
4548 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4549 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4551 if (it != m_helper_client_index.end ()) {
4553 uint32 focused_context;
4555 get_focused_context (focused_client, focused_context);
4556 ctx = get_helper_ic (focused_client, focused_context);
4557 m_panel_agent_manager.set_prediction_allow (it->second.id, ctx, m_current_helper_uuid, mode);
4562 std::cerr << __func__ << " is failed!!!\n";
4566 const String& get_focused_context (int& client, uint32& context, bool force_last_context = false) const {
4567 if (m_current_socket_client >= 0) {
4568 client = m_current_socket_client;
4569 context = m_current_client_context;
4570 return m_current_context_uuid;
4572 client = m_last_socket_client;
4573 context = m_last_client_context;
4574 return m_last_context_uuid;
4579 void socket_transaction_start (void) {
4580 m_signal_transaction_start ();
4583 void socket_transaction_end (void) {
4584 m_signal_transaction_end ();
4590 void unlock (void) {
4595 InfoManager::InfoManager ()
4596 : m_impl (new InfoManagerImpl ())
4600 InfoManager::~InfoManager ()
4606 InfoManager::initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident)
4608 return m_impl->initialize (info_manager, config, display, resident);
4612 InfoManager::valid (void) const
4614 return m_impl->valid ();
4618 InfoManager::stop (void)
4625 InfoManager::socket_get_client_info (int client) const
4627 return m_impl->socket_get_client_info (client);
4630 void InfoManager::hide_helper (const String& uuid)
4632 m_impl->hide_helper (uuid);
4635 InfoManager::get_current_toolbar_mode () const
4637 return m_impl->get_current_toolbar_mode ();
4641 InfoManager::get_current_ise_geometry (rectinfo& rect)
4643 m_impl->get_current_ise_geometry (rect);
4647 InfoManager::get_current_helper_uuid () const
4649 return m_impl->get_current_helper_uuid ();
4653 InfoManager::get_current_ise_name () const
4655 return m_impl->get_current_ise_name ();
4659 InfoManager::set_current_toolbar_mode (TOOLBAR_MODE_T mode)
4661 m_impl->set_current_toolbar_mode (mode);
4665 InfoManager::set_current_ise_name (String& name)
4667 m_impl->set_current_ise_name (name);
4671 InfoManager::set_current_helper_option (uint32 option)
4673 m_impl->set_current_helper_option (option);
4677 InfoManager::update_candidate_panel_event (uint32 nType, uint32 nValue)
4679 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISF_CANDIDATE_PANEL, nType, nValue);
4683 InfoManager::update_input_panel_event (uint32 nType, uint32 nValue)
4685 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT, nType, nValue);
4689 InfoManager::move_preedit_caret (uint32 position)
4691 return m_impl->move_preedit_caret (position);
4697 InfoManager::request_help (void)
4699 return m_impl->request_help ();
4703 InfoManager::request_factory_menu (void)
4705 return m_impl->request_factory_menu ();
4710 InfoManager::change_factory (const String& uuid)
4712 return m_impl->change_factory (uuid);
4716 InfoManager::helper_candidate_show (void)
4718 return m_impl->helper_candidate_show ();
4722 InfoManager::helper_candidate_hide (void)
4724 return m_impl->helper_candidate_hide ();
4728 InfoManager::candidate_more_window_show (void)
4730 return m_impl->candidate_more_window_show ();
4734 InfoManager::candidate_more_window_hide (void)
4736 return m_impl->candidate_more_window_hide ();
4740 InfoManager::update_helper_lookup_table (const LookupTable& table)
4742 return m_impl->update_helper_lookup_table (table);
4746 InfoManager::select_aux (uint32 item)
4748 return m_impl->select_aux (item);
4752 InfoManager::select_candidate (uint32 item)
4754 return m_impl->select_candidate (item);
4758 InfoManager::lookup_table_page_up (void)
4760 return m_impl->lookup_table_page_up ();
4764 InfoManager::lookup_table_page_down (void)
4766 return m_impl->lookup_table_page_down ();
4770 InfoManager::update_lookup_table_page_size (uint32 size)
4772 return m_impl->update_lookup_table_page_size (size);
4776 InfoManager::update_candidate_item_layout (const std::vector<uint32>& row_items)
4778 return m_impl->update_candidate_item_layout (row_items);
4782 InfoManager::select_associate (uint32 item)
4784 return m_impl->select_associate (item);
4788 InfoManager::associate_table_page_up (void)
4790 return m_impl->associate_table_page_up ();
4794 InfoManager::associate_table_page_down (void)
4796 return m_impl->associate_table_page_down ();
4800 InfoManager::update_associate_table_page_size (uint32 size)
4802 return m_impl->update_associate_table_page_size (size);
4806 InfoManager::update_displayed_candidate_number (uint32 size)
4808 return m_impl->update_displayed_candidate_number (size);
4812 InfoManager::send_longpress_event (int type, int index)
4814 m_impl->send_longpress_event (type, index);
4818 InfoManager::trigger_property (const String& property)
4820 return m_impl->trigger_property (property);
4824 InfoManager::start_helper (const String& uuid)
4826 return m_impl->start_helper (uuid, -2, 0);
4830 InfoManager::stop_helper (const String& uuid)
4832 return m_impl->stop_helper (uuid, -2, 0);
4836 InfoManager::set_default_ise (const DEFAULT_ISE_T& ise)
4838 m_impl->set_default_ise (ise);
4842 InfoManager::set_should_shared_ise (const bool should_shared_ise)
4844 m_impl->set_should_shared_ise (should_shared_ise);
4848 //InfoManager::reload_config (void)
4850 // m_impl->reload_config ();
4854 InfoManager::exit (void)
4856 return m_impl->exit ();
4859 InfoManager::update_ise_list (std::vector<String>& strList)
4861 m_impl->update_ise_list (strList);
4865 InfoManager::remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
4867 return m_impl->remoteinput_update_preedit_string (str, attrs, caret);
4871 InfoManager::remoteinput_commit_string (const WideString &str)
4873 return m_impl->remoteinput_commit_string (str);
4877 InfoManager::remoteinput_send_key_event (const KeyEvent &key)
4879 return m_impl->remoteinput_send_key_event (key);
4883 InfoManager::remoteinput_forward_key_event (const KeyEvent &key)
4885 return m_impl->remoteinput_forward_key_event (key);
4889 InfoManager::remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
4891 return m_impl->remoteinput_delete_surrounding_text (offset, len);
4895 InfoManager::remoteinput_set_cursor_position (uint32 cursor)
4897 return m_impl->remoteinput_set_cursor_position (cursor);
4900 /////////////////////////////////Message function begin/////////////////////////////////////////
4902 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
4903 bool InfoManager:: reset_keyboard_ise (void)
4905 return m_impl->reset_keyboard_ise ();
4908 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
4909 void InfoManager::show_isf_panel (int client_id)
4911 m_impl->show_isf_panel (client_id);
4914 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
4915 void InfoManager::hide_isf_panel (int client_id)
4917 m_impl->hide_isf_panel (client_id);
4920 //ISM_TRANS_CMD_SHOW_ISE_PANEL
4921 void InfoManager::show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len)
4923 m_impl->show_ise_panel (client_id, client, context, data, len);
4926 //ISM_TRANS_CMD_HIDE_ISE_PANEL
4927 void InfoManager::hide_ise_panel (int client_id, uint32 client, uint32 context)
4929 m_impl->hide_ise_panel (client_id, client, context);
4932 //ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
4933 void InfoManager::hide_helper_ise (void)
4935 m_impl->hide_helper_ise ();
4938 //ISM_TRANS_CMD_LAUNCH_ISE from ISF control
4939 void InfoManager::prelaunch_helper_ise (void)
4941 m_impl->prelaunch_helper_ise ();
4944 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
4945 bool InfoManager::process_key_event (KeyEvent& key, uint32 serial, uint32 keycode)
4947 return m_impl->process_key_event (key, serial, keycode);
4950 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
4951 void InfoManager::get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info)
4953 m_impl->get_input_panel_geometry (client_id, info);
4956 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
4957 void InfoManager::get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info)
4959 m_impl->get_candidate_window_geometry (client_id, info);
4962 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
4963 void InfoManager::get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len)
4965 m_impl->get_ise_language_locale (client_id, data, len);
4968 //ISM_TRANS_CMD_SET_LAYOUT
4969 void InfoManager::set_ise_layout (int client_id, uint32 layout)
4971 m_impl->set_ise_layout (client_id, layout);
4974 //ISM_TRANS_CMD_SET_INPUT_MODE
4975 void InfoManager::set_ise_input_mode (int client_id, uint32 input_mode)
4977 m_impl->set_ise_input_mode (client_id, input_mode);
4980 //ISM_TRANS_CMD_SET_INPUT_HINT
4981 void InfoManager::set_ise_input_hint (int client_id, uint32 input_hint)
4983 m_impl->set_ise_input_hint (client_id, input_hint);
4986 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
4987 void InfoManager::update_ise_bidi_direction (int client_id, uint32 bidi_direction)
4989 m_impl->update_ise_bidi_direction (client_id, bidi_direction);
4993 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
4994 void InfoManager::set_ise_language (int client_id, uint32 language)
4996 m_impl->set_ise_language (client_id, language);
4999 //ISM_TRANS_CMD_SET_ISE_IMDATA
5000 void InfoManager::set_ise_imdata (int client_id, const char* imdata, size_t len)
5002 m_impl->set_ise_imdata (client_id, imdata, len);
5005 //ISM_TRANS_CMD_GET_ISE_IMDATA
5006 bool InfoManager:: get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len)
5008 return m_impl->get_ise_imdata (client_id, imdata, len);
5011 //ISM_TRANS_CMD_GET_LAYOUT
5012 bool InfoManager:: get_ise_layout (int client_id, _OUT_ uint32& layout)
5014 return m_impl->get_ise_layout (client_id, layout);
5017 //ISM_TRANS_CMD_GET_ISE_STATE
5018 void InfoManager::get_ise_state (int client_id, _OUT_ int& state)
5020 m_impl->get_ise_state (client_id, state);
5023 //ISM_TRANS_CMD_GET_ACTIVE_ISE
5024 void InfoManager::get_active_ise (int client_id, _OUT_ String& default_uuid)
5026 m_impl->get_active_ise (client_id, default_uuid);
5029 //ISM_TRANS_CMD_GET_ISE_LIST
5030 void InfoManager::get_ise_list (int client_id, _OUT_ std::vector<String>& strlist)
5032 m_impl->get_ise_list (client_id, strlist);
5035 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
5036 void InfoManager::get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info)
5038 m_impl->get_all_helper_ise_info (client_id, info);
5041 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
5042 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5043 void InfoManager::set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled)
5045 m_impl->set_enable_helper_ise_info (client_id, appid, is_enabled);
5048 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
5049 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5050 void InfoManager::show_helper_ise_list (int client_id)
5052 m_impl->show_helper_ise_list (client_id);
5055 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
5056 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5057 void InfoManager::show_helper_ise_selector (int client_id)
5059 m_impl->show_helper_ise_selector (client_id);
5062 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
5064 void InfoManager::is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled)
5066 m_impl->is_helper_ise_enabled (client_id, strAppid, nEnabled);
5069 //ISM_TRANS_CMD_GET_ISE_INFORMATION
5070 void InfoManager::get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
5071 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName)
5073 m_impl->get_ise_information (client_id, strUuid, strName, strLanguage, nType, nOption, strModuleName);
5076 //ISM_TRANS_CMD_RESET_ISE_OPTION
5077 //reply SCIM_TRANS_CMD_OK
5078 bool InfoManager:: reset_ise_option (int client_id)
5080 return m_impl->reset_ise_option (client_id);
5083 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
5085 bool InfoManager:: set_active_ise_by_uuid (int client_id, char* buf, size_t len)
5087 return m_impl->set_active_ise_by_uuid (client_id, buf, len);
5090 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
5091 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5092 void InfoManager::set_initial_ise_by_uuid (int client_id, char* buf, size_t len)
5094 m_impl->set_initial_ise_by_uuid (client_id, buf, len);
5097 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
5098 void InfoManager::set_ise_return_key_type (int client_id, uint32 type)
5100 m_impl->set_ise_return_key_type (client_id, type);
5103 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
5105 bool InfoManager:: get_ise_return_key_type (int client_id, _OUT_ uint32& type)
5107 return m_impl->get_ise_return_key_type (client_id, type);
5111 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
5112 void InfoManager::set_ise_return_key_disable (int client_id, uint32 disabled)
5114 m_impl->set_ise_return_key_disable (client_id, disabled);
5117 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
5118 bool InfoManager::get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled)
5120 return m_impl->get_ise_return_key_disable (client_id, disabled);
5123 //ISM_TRANS_CMD_SET_CAPS_MODE
5124 void InfoManager::set_ise_caps_mode (int client_id, uint32 mode)
5126 m_impl->set_ise_caps_mode (client_id, mode);
5129 //SCIM_TRANS_CMD_RELOAD_CONFIG
5130 void InfoManager::reload_config (void)
5132 m_impl->reload_config ();
5135 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
5136 void InfoManager::will_show_ack (int client_id)
5138 m_impl->will_show_ack (client_id);
5141 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
5142 void InfoManager::will_hide_ack (int client_id)
5144 m_impl->will_hide_ack (client_id);
5147 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
5148 void InfoManager::reset_default_ise (int client_id)
5150 m_impl->reset_default_ise (client_id);
5153 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
5154 void InfoManager::set_keyboard_mode (int client_id, uint32 mode)
5156 m_impl->set_keyboard_mode (client_id, mode);
5159 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
5160 void InfoManager::candidate_will_hide_ack (int client_id)
5162 m_impl->candidate_will_hide_ack (client_id);
5165 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
5166 void InfoManager::get_active_helper_option (int client_id, _OUT_ uint32& option)
5168 m_impl->get_active_helper_option (client_id, option);
5171 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
5172 void InfoManager::show_ise_option_window (int client_id, int caller_pid)
5174 m_impl->show_ise_option_window (client_id, caller_pid);
5177 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
5178 void InfoManager::get_ise_setting_appid (int client_id, String &ime_setting_appid)
5180 m_impl->get_ise_setting_appid (client_id, ime_setting_appid);
5183 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
5184 void InfoManager::resume_ise_option_window (int client_id)
5186 m_impl->resume_ise_option_window (client_id);
5189 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
5190 void InfoManager::set_ise_keyboard_mode (int client_id, uint32 mode)
5192 m_impl->set_ise_keyboard_mode (client_id, mode);
5195 //ISM_TRANS_CMD_SET_PREDICTION_HINT
5196 void InfoManager::set_prediction_hint (int client_id, String prediction_hint)
5198 m_impl->set_prediction_hint (client_id, prediction_hint);
5201 //ISM_TRANS_CMD_SET_MIME_TYPE
5202 void InfoManager::set_ise_mime_type (int client_id, String mime_type)
5204 m_impl->set_ise_mime_type (client_id, mime_type);
5207 //ISM_TRANS_CMD_FINALIZE_CONTENT
5208 void InfoManager::finalize_content (int client_id, String text, uint32 cursor_pos)
5210 m_impl->finalize_content (client_id, text, cursor_pos);
5213 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
5214 void InfoManager::set_prediction_hint_data (int client_id, String key, String value)
5216 m_impl->set_prediction_hint_data (client_id, key, value);
5219 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
5220 void InfoManager::set_optimization_hint(int client_id, uint32 hint)
5222 m_impl->set_optimization_hint(client_id, hint);
5225 //ISM_TRANS_CMD_SET_ISE_ENABLE
5226 void InfoManager::set_ise_enable (int client_id, uint32 enabled)
5228 m_impl->set_ise_enable (client_id, enabled);
5231 //ISM_TRANS_CMD_SET_POSITION_ALIGN
5232 void InfoManager::set_input_panel_position_align (int client_id, uint32 x, uint32 y, uint32 align)
5234 m_impl->set_input_panel_position_align (client_id, x, y, align);
5237 //ISM_TRANS_CMD_EXPAND_CANDIDATE
5238 void InfoManager::expand_candidate ()
5240 m_impl->expand_candidate ();
5243 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
5244 void InfoManager::contract_candidate ()
5246 m_impl->contract_candidate ();
5249 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
5250 void InfoManager::get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info)
5252 m_impl->get_recent_ise_geometry (client_id, angle, info);
5255 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
5256 bool InfoManager::remoteinput_send_input_message (int client_id, char* buf, size_t len)
5258 return m_impl->send_remote_input_message (client_id, buf, len);
5261 void InfoManager::remoteinput_send_surrounding_text (const char* text, uint32 cursor)
5263 return m_impl->send_remote_surrounding_text (text, cursor);
5266 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
5267 void InfoManager::register_panel_client (uint32 client_id, uint32 id)
5269 m_impl->register_panel_client (client_id, id);
5272 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
5273 void InfoManager::register_input_context (uint32 client_id, uint32 context, String uuid)
5275 m_impl->register_input_context (client_id, context, uuid);
5278 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
5279 void InfoManager::remove_input_context (uint32 client_id, uint32 context)
5281 m_impl->remove_input_context (client_id, context);
5284 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
5285 void InfoManager::socket_reset_input_context (int client_id, uint32 context)
5287 m_impl->socket_reset_input_context (client_id, context);
5290 //SCIM_TRANS_CMD_FOCUS_IN
5291 void InfoManager::focus_in (int client_id, uint32 context, String uuid)
5293 m_impl->focus_in (client_id, context, uuid);
5296 //SCIM_TRANS_CMD_FOCUS_OUT
5297 void InfoManager::focus_out (int client_id, uint32 context)
5299 m_impl->focus_out (client_id, context);
5302 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
5303 bool InfoManager::process_input_device_event(int client, uint32 type, const char *data, size_t len, _OUT_ uint32& result)
5305 return m_impl->process_input_device_event(client, type, data, len, result);
5308 //ISM_TRANS_CMD_TURN_ON_LOG
5309 void InfoManager::socket_turn_on_log (uint32 isOn)
5311 m_impl->socket_turn_on_log (isOn);
5314 //SCIM_TRANS_CMD_PANEL_TURN_ON
5315 void InfoManager::socket_turn_on (void)
5317 m_impl->socket_turn_on ();
5320 //SCIM_TRANS_CMD_PANEL_TURN_OFF
5321 void InfoManager::socket_turn_off (void)
5323 m_impl->socket_turn_off ();
5326 //SCIM_TRANS_CMD_UPDATE_SCREEN
5327 void InfoManager::socket_update_screen (int client_id, uint32 num)
5329 m_impl->socket_update_screen (client_id, num);
5332 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
5333 void InfoManager::socket_update_spot_location (uint32 x, uint32 y, uint32 top_y)
5335 m_impl->socket_update_spot_location (x, y, top_y);
5338 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
5339 void InfoManager::socket_update_cursor_position (uint32 cursor_pos)
5341 m_impl->socket_update_cursor_position (cursor_pos);
5344 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
5345 void InfoManager::socket_update_surrounding_text (String text, uint32 cursor)
5347 m_impl->socket_update_surrounding_text (text, cursor);
5350 void InfoManager::remoteinput_callback_focus_in (void)
5352 m_impl->remoteinput_callback_focus_in ();
5355 void InfoManager::remoteinput_callback_focus_out (void)
5357 m_impl->remoteinput_callback_focus_out ();
5360 void InfoManager::remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type)
5362 m_impl->remoteinput_callback_entry_metadata (hint, layout, variation, autocapital_type, return_key_disabled, return_key_type);
5365 void InfoManager::remoteinput_callback_surrounding_text (String text, uint32 cursor)
5367 m_impl->remoteinput_callback_surrounding_text (text, cursor);
5370 void InfoManager::remoteinput_callback_input_resource (uint32 input_resource)
5372 m_impl->remoteinput_callback_input_resource (input_resource);
5375 void InfoManager::remoteinput_callback_key_symbol (String key_symbol, bool press, uint32 timestamp)
5377 m_impl->remoteinput_callback_key_symbol (key_symbol, press, timestamp);
5380 void InfoManager::remoteinput_callback_cursor_position (uint32 cursor)
5382 m_impl->remoteinput_callback_cursor_position (cursor);
5385 //ISM_TRANS_CMD_UPDATE_SELECTION
5386 void InfoManager::socket_update_selection (String text)
5388 m_impl->socket_update_selection (text);
5391 //FIXME: useless anymore
5392 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
5393 void InfoManager::socket_update_factory_info (PanelFactoryInfo& info)
5395 m_impl->socket_update_factory_info (info);
5398 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
5399 void InfoManager::socket_show_help (String help)
5401 m_impl->socket_show_help (help);
5404 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
5405 void InfoManager::socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec)
5407 m_impl->socket_show_factory_menu (vec);
5410 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5411 void InfoManager::socket_show_preedit_string (void)
5413 m_impl->socket_show_preedit_string ();
5416 //SCIM_TRANS_CMD_SHOW_AUX_STRING
5417 void InfoManager::socket_show_aux_string (void)
5419 m_impl->socket_show_aux_string ();
5422 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
5423 void InfoManager::socket_show_lookup_table (void)
5425 m_impl->socket_show_lookup_table ();
5428 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
5429 void InfoManager::socket_show_associate_table (void)
5431 m_impl->socket_show_associate_table ();
5434 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5435 void InfoManager::socket_hide_preedit_string (void)
5437 m_impl->socket_hide_preedit_string ();
5440 //SCIM_TRANS_CMD_HIDE_AUX_STRING
5441 void InfoManager::socket_hide_aux_string (void)
5443 m_impl->socket_hide_aux_string ();
5446 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
5447 void InfoManager::socket_hide_lookup_table (void)
5449 m_impl->socket_hide_lookup_table ();
5452 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
5453 void InfoManager::socket_hide_associate_table (void)
5455 m_impl->socket_hide_associate_table ();
5458 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5459 void InfoManager::socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret)
5461 m_impl->socket_update_preedit_string (str, attrs, caret);
5464 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5465 void InfoManager::socket_update_preedit_caret (uint32 caret)
5467 m_impl->socket_update_preedit_caret (caret);
5470 //ISM_TRANS_CMD_RECAPTURE_STRING
5471 void InfoManager::socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs)
5473 m_impl->socket_recapture_string (offset, len, preedit, commit, attrs);
5476 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
5477 void InfoManager::socket_update_aux_string (String& str, const AttributeList& attrs)
5479 m_impl->socket_update_aux_string (str, attrs);
5482 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
5483 void InfoManager::socket_update_lookup_table (const LookupTable& table)
5485 m_impl->socket_update_lookup_table (table);
5488 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
5489 void InfoManager::socket_update_associate_table (const LookupTable& table)
5491 m_impl->socket_update_associate_table (table);
5494 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5495 void InfoManager::socket_register_properties (const PropertyList& properties)
5497 m_impl->socket_register_properties (properties);
5500 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5501 void InfoManager::socket_update_property (const Property& property)
5503 m_impl->socket_update_property (property);
5506 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
5507 void InfoManager::socket_get_keyboard_ise_list (String& uuid)
5509 m_impl->socket_get_keyboard_ise_list (uuid);
5512 //ISM_TRANS_CMD_SET_CANDIDATE_UI
5513 void InfoManager::socket_set_candidate_ui (uint32 portrait_line, uint32 mode)
5515 m_impl->socket_set_candidate_ui (portrait_line, mode);
5518 //ISM_TRANS_CMD_GET_CANDIDATE_UI
5519 void InfoManager::socket_get_candidate_ui (String uuid)
5521 m_impl->socket_get_candidate_ui (uuid);
5524 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
5525 void InfoManager::socket_set_candidate_position (uint32 left, uint32 top)
5527 m_impl->socket_set_candidate_position (left, top);
5530 //ISM_TRANS_CMD_HIDE_CANDIDATE
5531 void InfoManager::socket_hide_candidate (void)
5533 m_impl->socket_hide_candidate ();
5536 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
5537 void InfoManager::socket_get_candidate_geometry (String& uuid)
5539 m_impl->socket_get_candidate_geometry (uuid);
5542 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
5543 void InfoManager::socket_set_keyboard_ise (String uuid)
5545 m_impl->socket_set_keyboard_ise (uuid);
5548 //ISM_TRANS_CMD_SELECT_CANDIDATE
5549 void InfoManager::socket_helper_select_candidate (uint32 index)
5551 m_impl->socket_helper_select_candidate (index);
5554 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
5555 void InfoManager::socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height)
5557 m_impl->socket_helper_update_ise_geometry (client, x, y, width, height);
5560 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
5561 void InfoManager::socket_get_keyboard_ise (String uuid)
5563 m_impl->socket_get_keyboard_ise (uuid);
5566 //SCIM_TRANS_CMD_START_HELPER
5567 void InfoManager::socket_start_helper (int client_id, uint32 context, String uuid)
5569 m_impl->socket_start_helper (client_id, context, uuid);
5572 //SCIM_TRANS_CMD_STOP_HELPER
5573 void InfoManager::socket_stop_helper (int client_id, uint32 context, String uuid)
5575 m_impl->socket_stop_helper (client_id, context, uuid);
5578 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
5579 void InfoManager::socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans)
5581 m_impl->socket_send_helper_event (client_id, context, uuid, _nest_trans);
5584 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5585 void InfoManager::socket_helper_register_properties (int client, PropertyList& properties)
5587 m_impl->socket_helper_register_properties (client, properties);
5590 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5591 void InfoManager::socket_helper_update_property (int client, Property& property)
5593 m_impl->socket_helper_update_property (client, property);
5596 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
5597 void InfoManager::socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans)
5599 m_impl->socket_helper_send_imengine_event (client, target_ic, target_uuid, nest_trans);
5602 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
5603 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
5604 void InfoManager::socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5606 m_impl->socket_helper_send_key_event (client, target_ic, target_uuid, key);
5609 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
5610 void InfoManager::socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5612 m_impl->socket_helper_forward_key_event (client, target_ic, target_uuid, key);
5615 //SCIM_TRANS_CMD_COMMIT_STRING
5616 void InfoManager::socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr)
5618 m_impl->socket_helper_commit_string (client, target_ic, target_uuid, wstr);
5621 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
5622 void InfoManager::socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after)
5624 m_impl->socket_helper_get_surrounding_text (client, uuid, maxlen_before, maxlen_after);
5627 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
5628 void InfoManager::socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len)
5630 m_impl->socket_helper_delete_surrounding_text (client, offset, len);
5633 //SCIM_TRANS_CMD_GET_SELECTION
5634 void InfoManager::socket_helper_get_selection (int client, String uuid)
5636 m_impl->socket_helper_get_selection (client, uuid);
5639 //SCIM_TRANS_CMD_SET_SELECTION
5640 void InfoManager::socket_helper_set_selection (int client, uint32 start, uint32 end)
5642 m_impl->socket_helper_set_selection (client, start, end);
5645 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5646 void InfoManager::socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid)
5648 m_impl->socket_helper_show_preedit_string (client, target_ic, target_uuid);
5651 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5652 void InfoManager::socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid)
5654 m_impl->socket_helper_hide_preedit_string (client, target_ic, target_uuid);
5657 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5658 void InfoManager::socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit,
5659 WideString commit, AttributeList& attrs, uint32 caret)
5661 m_impl->socket_helper_update_preedit_string (client, target_ic, target_uuid, preedit, commit, attrs, caret);
5664 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5665 void InfoManager::socket_helper_update_preedit_caret (int client, uint32 caret)
5667 m_impl->socket_helper_update_preedit_caret (client, caret);
5670 //ISM_TRANS_CMD_RECAPTURE_STRING
5671 void InfoManager::socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
5672 WideString commit, AttributeList& attrs)
5674 m_impl->socket_helper_recapture_string (client, target_ic, target_uuid, offset, len, preedit, commit, attrs);
5677 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
5678 void InfoManager::socket_helper_register_helper (int client, HelperInfo& info)
5680 m_impl->socket_helper_register_helper (client, info);
5683 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
5684 void InfoManager::socket_helper_register_helper_passive (int client, HelperInfo& info)
5686 m_impl->socket_helper_register_helper_passive (client, info);
5689 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
5690 void InfoManager::socket_helper_update_input_context (int client, uint32 type, uint32 value)
5692 m_impl->socket_helper_update_input_context (client, type, value);
5695 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
5696 void InfoManager::socket_helper_update_language_locale(int client, String locale)
5698 m_impl->socket_helper_update_language_locale(client, locale);
5701 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
5702 void InfoManager::socket_helper_send_private_command (int client, String command)
5704 m_impl->socket_helper_send_private_command (client, command);
5707 //SCIM_TRANS_CMD_COMMIT_CONTENT
5708 void InfoManager::socket_helper_commit_content (int client, String content, String description, String mime_types)
5710 m_impl->socket_helper_commit_content (client, content, description, mime_types);
5713 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
5714 void InfoManager::UPDATE_ISE_EXIT (int client)
5716 m_impl->UPDATE_ISE_EXIT (client);
5719 //ISM_TRANS_CMD_PROCESS_KEY_EVENT_DONE
5720 void InfoManager::process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial)
5722 m_impl->process_key_event_done (key, ret, serial);
5725 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
5726 void InfoManager::request_ise_hide ()
5728 m_impl->request_ise_hide ();
5731 bool InfoManager::check_privilege_by_sockfd (int client_id, const String& privilege) {
5732 return m_impl->check_privilege_by_sockfd (client_id, privilege);
5735 void InfoManager::add_client (int client_id, uint32 key, ClientType type)
5737 m_impl->add_client (client_id, key, type);
5740 void InfoManager::del_client (int client_id)
5742 m_impl->del_client (client_id);
5745 bool InfoManager::set_autocapital_type (int mode)
5747 return m_impl->set_autocapital_type (mode);
5750 void InfoManager::set_prediction_allow (int client, bool mode)
5752 m_impl->set_prediction_allow (client, mode);
5755 void InfoManager::reshow_input_panel ()
5757 m_impl->reshow_input_panel ();
5760 void InfoManager::request_ise_terminate ()
5762 m_impl->request_ise_terminate ();
5765 void InfoManager::set_floating_mode (uint32 floating_mode)
5767 m_impl->set_floating_mode (floating_mode);
5770 void InfoManager::set_floating_drag_enabled (uint32 enabled)
5772 m_impl->set_floating_drag_enabled (enabled);
5775 void InfoManager::move_resize_floating_window (uint32 x, uint32 y, uint32 width, uint32 height)
5777 m_impl->move_resize_floating_window (x, y, width, height);
5780 void InfoManager::generate_key_event (KeyEvent& key)
5782 m_impl->generate_key_event (key);
5785 //////////////////////////////////Message function end/////////////////////////////////////////
5788 InfoManager::signal_connect_turn_on (InfoManagerSlotVoid* slot)
5790 return m_impl->signal_connect_turn_on (slot);
5794 InfoManager::signal_connect_turn_off (InfoManagerSlotVoid* slot)
5796 return m_impl->signal_connect_turn_off (slot);
5800 InfoManager::signal_connect_show_panel (InfoManagerSlotVoid* slot)
5802 return m_impl->signal_connect_show_panel (slot);
5806 InfoManager::signal_connect_hide_panel (InfoManagerSlotVoid* slot)
5808 return m_impl->signal_connect_hide_panel (slot);
5812 InfoManager::signal_connect_update_screen (InfoManagerSlotInt* slot)
5814 return m_impl->signal_connect_update_screen (slot);
5818 InfoManager::signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot)
5820 return m_impl->signal_connect_update_spot_location (slot);
5824 InfoManager::signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot)
5826 return m_impl->signal_connect_update_factory_info (slot);
5830 InfoManager::signal_connect_start_default_ise (InfoManagerSlotBool* slot)
5832 return m_impl->signal_connect_start_default_ise (slot);
5836 InfoManager::signal_connect_stop_default_ise (InfoManagerSlotBool* slot)
5838 return m_impl->signal_connect_stop_default_ise (slot);
5842 InfoManager::signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot)
5844 return m_impl->signal_connect_set_candidate_ui (slot);
5848 InfoManager::signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot)
5850 return m_impl->signal_connect_get_candidate_ui (slot);
5854 InfoManager::signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot)
5856 return m_impl->signal_connect_set_candidate_position (slot);
5860 InfoManager::signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot)
5862 return m_impl->signal_connect_get_candidate_geometry (slot);
5866 InfoManager::signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot)
5868 return m_impl->signal_connect_get_input_panel_geometry (slot);
5872 InfoManager::signal_connect_set_keyboard_ise (InfoManagerSlotString* slot)
5874 return m_impl->signal_connect_set_keyboard_ise (slot);
5878 InfoManager::signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot)
5880 return m_impl->signal_connect_get_keyboard_ise (slot);
5884 InfoManager::signal_connect_show_help (InfoManagerSlotString* slot)
5886 return m_impl->signal_connect_show_help (slot);
5890 InfoManager::signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot)
5892 return m_impl->signal_connect_show_factory_menu (slot);
5896 InfoManager::signal_connect_show_preedit_string (InfoManagerSlotVoid* slot)
5898 return m_impl->signal_connect_show_preedit_string (slot);
5902 InfoManager::signal_connect_show_aux_string (InfoManagerSlotVoid* slot)
5904 return m_impl->signal_connect_show_aux_string (slot);
5908 InfoManager::signal_connect_show_lookup_table (InfoManagerSlotVoid* slot)
5910 return m_impl->signal_connect_show_lookup_table (slot);
5914 InfoManager::signal_connect_show_associate_table (InfoManagerSlotVoid* slot)
5916 return m_impl->signal_connect_show_associate_table (slot);
5920 InfoManager::signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot)
5922 return m_impl->signal_connect_hide_preedit_string (slot);
5926 InfoManager::signal_connect_hide_aux_string (InfoManagerSlotVoid* slot)
5928 return m_impl->signal_connect_hide_aux_string (slot);
5932 InfoManager::signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot)
5934 return m_impl->signal_connect_hide_lookup_table (slot);
5938 InfoManager::signal_connect_hide_associate_table (InfoManagerSlotVoid* slot)
5940 return m_impl->signal_connect_hide_associate_table (slot);
5944 InfoManager::signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot)
5946 return m_impl->signal_connect_update_preedit_string (slot);
5950 InfoManager::signal_connect_update_preedit_caret (InfoManagerSlotInt* slot)
5952 return m_impl->signal_connect_update_preedit_caret (slot);
5956 InfoManager::signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot)
5958 return m_impl->signal_connect_update_aux_string (slot);
5962 InfoManager::signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot)
5964 return m_impl->signal_connect_update_lookup_table (slot);
5968 InfoManager::signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot)
5970 return m_impl->signal_connect_update_associate_table (slot);
5974 InfoManager::signal_connect_register_properties (InfoManagerSlotPropertyList* slot)
5976 return m_impl->signal_connect_register_properties (slot);
5980 InfoManager::signal_connect_update_property (InfoManagerSlotProperty* slot)
5982 return m_impl->signal_connect_update_property (slot);
5986 InfoManager::signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot)
5988 return m_impl->signal_connect_register_helper_properties (slot);
5992 InfoManager::signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot)
5994 return m_impl->signal_connect_update_helper_property (slot);
5998 InfoManager::signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot)
6000 return m_impl->signal_connect_register_helper (slot);
6004 InfoManager::signal_connect_remove_helper (InfoManagerSlotInt* slot)
6006 return m_impl->signal_connect_remove_helper (slot);
6010 InfoManager::signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot)
6012 return m_impl->signal_connect_set_active_ise_by_uuid (slot);
6016 InfoManager::signal_connect_focus_in (InfoManagerSlotVoid* slot)
6018 return m_impl->signal_connect_focus_in (slot);
6022 InfoManager::signal_connect_focus_out (InfoManagerSlotVoid* slot)
6024 return m_impl->signal_connect_focus_out (slot);
6028 InfoManager::signal_connect_expand_candidate (InfoManagerSlotVoid* slot)
6030 return m_impl->signal_connect_expand_candidate (slot);
6034 InfoManager::signal_connect_contract_candidate (InfoManagerSlotVoid* slot)
6036 return m_impl->signal_connect_contract_candidate (slot);
6040 InfoManager::signal_connect_select_candidate (InfoManagerSlotInt* slot)
6042 return m_impl->signal_connect_select_candidate (slot);
6046 InfoManager::signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot)
6048 return m_impl->signal_connect_get_ise_list (slot);
6052 InfoManager::signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot)
6054 return m_impl->signal_connect_get_all_helper_ise_info (slot);
6058 InfoManager::signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot)
6060 return m_impl->signal_connect_set_has_option_helper_ise_info (slot);
6064 InfoManager::signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot)
6066 return m_impl->signal_connect_set_enable_helper_ise_info (slot);
6070 InfoManager::signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot)
6072 return m_impl->signal_connect_show_helper_ise_list (slot);
6076 InfoManager::signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot)
6078 return m_impl->signal_connect_show_helper_ise_selector (slot);
6082 InfoManager::signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot)
6084 return m_impl->signal_connect_is_helper_ise_enabled (slot);
6088 InfoManager::signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot)
6090 return m_impl->signal_connect_get_ise_information (slot);
6094 InfoManager::signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot)
6096 return m_impl->signal_connect_get_keyboard_ise_list (slot);
6100 InfoManager::signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot)
6102 return m_impl->signal_connect_update_ise_geometry (slot);
6106 InfoManager::signal_connect_get_language_list (InfoManagerSlotStringVector* slot)
6108 return m_impl->signal_connect_get_language_list (slot);
6112 InfoManager::signal_connect_get_all_language (InfoManagerSlotStringVector* slot)
6114 return m_impl->signal_connect_get_all_language (slot);
6118 InfoManager::signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot)
6120 return m_impl->signal_connect_get_ise_language (slot);
6124 InfoManager::signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot)
6126 return m_impl->signal_connect_get_ise_info_by_uuid (slot);
6130 InfoManager::signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot)
6132 return m_impl->signal_connect_send_key_event (slot);
6136 InfoManager::signal_connect_accept_connection (InfoManagerSlotInt* slot)
6138 return m_impl->signal_connect_accept_connection (slot);
6142 InfoManager::signal_connect_close_connection (InfoManagerSlotInt* slot)
6144 return m_impl->signal_connect_close_connection (slot);
6148 InfoManager::signal_connect_exit (InfoManagerSlotVoid* slot)
6150 return m_impl->signal_connect_exit (slot);
6154 InfoManager::signal_connect_transaction_start (InfoManagerSlotVoid* slot)
6156 return m_impl->signal_connect_transaction_start (slot);
6160 InfoManager::signal_connect_transaction_end (InfoManagerSlotVoid* slot)
6162 return m_impl->signal_connect_transaction_end (slot);
6166 InfoManager::signal_connect_lock (InfoManagerSlotVoid* slot)
6168 return m_impl->signal_connect_lock (slot);
6172 InfoManager::signal_connect_unlock (InfoManagerSlotVoid* slot)
6174 return m_impl->signal_connect_unlock (slot);
6178 InfoManager::signal_connect_update_input_context (InfoManagerSlotIntInt* slot)
6180 return m_impl->signal_connect_update_input_context (slot);
6184 InfoManager::signal_connect_show_ise (InfoManagerSlotVoid* slot)
6186 return m_impl->signal_connect_show_ise (slot);
6190 InfoManager::signal_connect_hide_ise (InfoManagerSlotVoid* slot)
6192 return m_impl->signal_connect_hide_ise (slot);
6196 InfoManager::signal_connect_will_show_ack (InfoManagerSlotVoid* slot)
6198 return m_impl->signal_connect_will_show_ack (slot);
6202 InfoManager::signal_connect_will_hide_ack (InfoManagerSlotVoid* slot)
6204 return m_impl->signal_connect_will_hide_ack (slot);
6208 InfoManager::signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot)
6210 return m_impl->signal_connect_set_keyboard_mode (slot);
6214 InfoManager::signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot)
6216 return m_impl->signal_connect_candidate_will_hide_ack (slot);
6220 InfoManager::signal_connect_get_ise_state (InfoManagerSlotInt2* slot)
6222 return m_impl->signal_connect_get_ise_state (slot);
6226 InfoManager::signal_connect_run_helper (InfoManagerSlotString3* slot)
6228 return m_impl->signal_connect_run_helper (slot);
6232 InfoManager::signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
6234 return m_impl->signal_connect_launch_option_application (slot);
6238 InfoManager::signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
6240 return m_impl->signal_connect_get_ise_setting_appid (slot);
6244 InfoManager::signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot)
6246 return m_impl->signal_connect_get_recent_ise_geometry (slot);
6250 InfoManager::signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
6252 return m_impl->signal_connect_check_privilege_by_sockfd (slot);
6256 InfoManager::signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
6258 return m_impl->signal_connect_remoteinput_send_input_message (slot);
6262 InfoManager::signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
6264 return m_impl->signal_connect_remoteinput_send_surrounding_text (slot);
6267 } /* namespace scim */
6270 vi:ts=4:nowrap:ai:expandtab