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 ();
1549 m_ise_context_buffer = new char [len];
1550 if (m_ise_context_buffer) {
1551 m_ise_context_length = len;
1552 memcpy (m_ise_context_buffer, data, m_ise_context_length);
1557 m_signal_show_ise ();
1559 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
1560 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
1561 if (launch_ise_on_request || !enable_auto_restart)
1562 m_signal_start_default_ise (true);
1566 //ISM_TRANS_CMD_HIDE_ISE_PANEL
1567 void hide_ise_panel (int client_id, uint32 client, uint32 context) {
1568 SCIM_DEBUG_MAIN (4) << "InfoManager::hide_ise_panel ()\n";
1569 LOGD ("prepare to hide ISE, %d %d", client_id, m_show_request_client_id);
1570 SCIM_DEBUG_MAIN (4) << __func__ << " (client:" << client << " context:" << context << ")\n";
1572 m_reshow_needed = false;
1573 if (m_panel_client_map[client_id] == m_current_socket_client || client_id == m_show_request_client_id) {
1574 // && (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
1576 uint32 focused_context;
1577 get_focused_context (focused_client, focused_context);
1579 if (focused_client == -1 && m_active_client_id != -1) {
1580 focused_client = m_panel_client_map[m_active_client_id];
1581 focused_context = 0;
1584 m_signal_hide_ise ();
1588 void hide_helper_ise (void) {
1591 uint32 focused_context;
1592 get_focused_context (focused_client, focused_context);
1593 m_panel_agent_manager.hide_helper_ise (focused_client, focused_context);
1595 m_signal_hide_ise ();
1599 void prelaunch_helper_ise (void) {
1600 SCIM_DEBUG_MAIN (4) << "InfoManager::prelaunch_helper_ise ()\n";
1603 * Currently the SHOW_PREPARE hint is delivered only to the already-running ISEs.
1604 * If the newly launched ise also has to be notified of given optimization hint,
1605 * we'll need to mark the hint somewhere and send the message when a newly launched
1606 * ise connects to the panel.
1608 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1609 if (it != m_helper_client_index.end()) {
1613 get_focused_context(client, context);
1614 ctx = get_helper_ic(client, context);
1615 m_panel_agent_manager.set_helper_optimization_hint(it->second.id, ctx, m_current_helper_uuid, ISE_OPTIMIZATION_HINT_SHOW_PREPARE);
1618 m_signal_start_default_ise(false);
1621 void set_default_ise (const DEFAULT_ISE_T& ise) {
1622 LOGD ("set default ise : %s", ise.uuid.c_str());
1623 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), ise.uuid);
1624 scim_global_config_flush ();
1627 void set_should_shared_ise (const bool should_shared_ise) {
1628 m_should_shared_ise = should_shared_ise;
1630 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
1631 bool process_key_event (KeyEvent& key, uint32 serial, uint32 keycode) {
1632 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1634 if (m_is_ise_alive == false)
1637 if (it != m_helper_client_index.end ()) {
1641 get_focused_context (client, context);
1642 ctx = get_helper_ic (client, context);
1643 return m_panel_agent_manager.process_key_event (it->second.id, ctx, m_current_helper_uuid, key, serial, keycode);
1649 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
1650 bool process_input_device_event(int client_id, uint32 type, const char *data, size_t len, _OUT_ uint32& result) {
1651 SCIM_DEBUG_MAIN(4) << "InfoManager::process_input_device_event ()\n";
1652 HelperClientIndex::iterator it = m_helper_client_index.find(m_current_helper_uuid);
1654 if (it != m_helper_client_index.end()) {
1658 get_focused_context(client, context);
1659 ctx = get_helper_ic(client, context);
1660 return m_panel_agent_manager.process_input_device_event(it->second.id, ctx, m_current_helper_uuid, type, data, len, result);
1666 bool get_helper_geometry (String& uuid, struct rectinfo& info) {
1667 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1669 if (it != m_helper_client_index.end ()) {
1673 get_focused_context (client, context);
1674 ctx = get_helper_ic (client, context);
1675 return m_panel_agent_manager.get_helper_geometry (it->second.id, ctx, uuid, info);
1681 bool get_helper_imdata (String& uuid, char** imdata, size_t& len) {
1682 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1684 if (it != m_helper_client_index.end ()) {
1688 get_focused_context (client, context);
1689 ctx = get_helper_ic (client, context);
1690 m_panel_agent_manager.get_helper_imdata (it->second.id, ctx, uuid, imdata, len);
1697 bool get_helper_layout (String& uuid, uint32& layout) {
1698 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1700 if (it != m_helper_client_index.end ()) {
1704 get_focused_context (client, context);
1705 ctx = get_helper_ic (client, context);
1706 m_panel_agent_manager.get_helper_layout (it->second.id, ctx, uuid, layout);
1712 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
1713 void get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info) {
1714 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1715 m_signal_get_input_panel_geometry (info);
1717 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
1718 void get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info) {
1719 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1720 m_signal_get_candidate_geometry (info);
1722 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
1723 void get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len) {
1724 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1725 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
1726 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1728 if (it != m_helper_client_index.end ()) {
1731 get_focused_context (client, context);
1732 uint32 ctx = get_helper_ic (client, context);
1733 m_panel_agent_manager.get_ise_language_locale (it->second.id, ctx, m_current_helper_uuid, data, len);
1738 void get_current_ise_geometry (rectinfo& rect) {
1739 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
1742 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1743 ret = get_helper_geometry (m_current_helper_uuid, rect);
1753 void set_ise_mode (int client_id, uint32 mode) {
1754 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_mode ()\n";
1756 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1757 set_helper_mode (m_current_helper_uuid, mode);
1759 //ISM_TRANS_CMD_SET_LAYOUT
1760 void set_ise_layout (int client_id, uint32 layout) {
1761 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_layout ()\n";
1762 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1763 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1764 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
1766 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1767 set_helper_layout (m_current_helper_uuid, layout);
1769 //ISM_TRANS_CMD_SET_INPUT_MODE
1770 void set_ise_input_mode (int client_id, uint32 input_mode) {
1771 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_mode ()\n";
1773 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1774 set_helper_input_mode (m_current_helper_uuid, input_mode);
1776 //ISM_TRANS_CMD_SET_INPUT_HINT
1777 void set_ise_input_hint (int client_id, uint32 input_hint) {
1778 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_input_hint ()\n";
1779 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1780 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1781 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(input_hint);
1783 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1784 set_helper_input_hint (m_current_helper_uuid, input_hint);
1786 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
1787 void update_ise_bidi_direction (int client_id, uint32 bidi_direction) {
1788 SCIM_DEBUG_MAIN (4) << "InfoManager::update_ise_bidi_direction ()\n";
1789 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1790 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1791 iseContext->bidi_direction = static_cast<Ecore_IMF_BiDi_Direction>(bidi_direction);
1793 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1794 set_helper_bidi_direction (m_current_helper_uuid, bidi_direction);
1796 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
1797 void set_ise_language (int client_id, uint32 language) {
1798 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_language ()\n";
1799 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
1800 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
1801 iseContext->language = static_cast<Ecore_IMF_Input_Panel_Lang>(language);
1803 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1804 set_helper_language (m_current_helper_uuid, language);
1806 //ISM_TRANS_CMD_SET_ISE_IMDATA
1807 void set_ise_imdata (int client_id, const char* imdata, size_t len) {
1808 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_imdata ()\n";
1810 delete_imdata_buffer ();
1811 m_imdata_buffer = new char [len];
1812 if (m_imdata_buffer) {
1813 m_imdata_length = len;
1814 memcpy (m_imdata_buffer, imdata, m_imdata_length);
1816 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1817 set_helper_imdata (m_current_helper_uuid, imdata, len);
1819 //ISM_TRANS_CMD_GET_ISE_IMDATA
1820 bool get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len) {
1821 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_imdata ()\n";
1824 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1825 ret = get_helper_imdata (m_current_helper_uuid, imdata, len);
1829 //ISM_TRANS_CMD_GET_LAYOUT
1830 bool get_ise_layout (int client_id, _OUT_ uint32& layout) {
1831 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_layout ()\n";
1834 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
1835 ret = get_helper_layout (m_current_helper_uuid, layout);
1839 //ISM_TRANS_CMD_GET_ISE_STATE
1840 void get_ise_state (int client_id, _OUT_ int& state) {
1841 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1842 m_signal_get_ise_state (state);
1844 //ISM_TRANS_CMD_GET_ACTIVE_ISE
1845 void get_active_ise (int client_id, _OUT_ String& default_uuid) {
1846 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1847 default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
1849 //ISM_TRANS_CMD_GET_ISE_LIST
1850 void get_ise_list (int client_id, _OUT_ std::vector<String>& strlist) {
1851 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_list ()\n";
1852 m_signal_get_ise_list (strlist);
1854 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
1855 void get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info) {
1856 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_helper_ise_info ()\n";
1857 m_signal_get_all_helper_ise_info (info);
1859 //1 Check if the current IME's option (setting) is available or not.
1860 for (uint32 i = 0; i < info.appid.size (); i++) {
1861 if (m_current_helper_uuid.compare (info.appid [i]) == 0) { // Find the current IME
1862 // If the current IME's "has_option" is unknown (-1), get it through ISM_TRANS_CMD_CHECK_OPTION_WINDOW command.
1863 // And it's saved to ime_info DB. Then next time this will be skipped.
1864 if (info.has_option [i] >= 2) {
1865 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
1867 if (it != m_helper_client_index.end ()) {
1870 get_focused_context (client, context);
1871 uint32 ctx = get_helper_ic (client, context);
1872 uint32 avail = static_cast<uint32> (-1);
1873 m_panel_agent_manager.check_option_window (it->second.id, ctx, m_current_helper_uuid, avail);
1876 String setting_app = isf_pkg_get_setting_app (m_current_helper_uuid);
1877 if (setting_app.length () > 0)
1882 info.has_option [i] = avail;
1883 // Update "has_option" column of ime_info DB and global variable.
1884 m_signal_set_has_option_helper_ise_info (info.appid [i], static_cast<bool> (avail));
1891 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
1892 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1893 void set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled) {
1894 SCIM_DEBUG_MAIN (4) << "InfoManager::set_enable_helper_ise_info ()\n";
1895 m_signal_set_enable_helper_ise_info (appid, static_cast<bool> (is_enabled));
1897 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
1898 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1899 void show_helper_ise_list (int client_id) {
1900 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_list ()\n";
1901 m_signal_show_helper_ise_list ();
1903 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
1904 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
1905 void show_helper_ise_selector (int client_id) {
1906 SCIM_DEBUG_MAIN (4) << "InfoManager::show_helper_ise_selector ()\n";
1907 m_signal_show_helper_ise_selector ();
1909 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
1911 void is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled) {
1912 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1914 m_signal_is_helper_ise_enabled (strAppid, _nEnabled);
1915 nEnabled = (uint32)_nEnabled;
1917 //ISM_TRANS_CMD_GET_ISE_INFORMATION
1918 void get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
1919 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName) {
1920 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
1921 m_signal_get_ise_information (strUuid, strName, strLanguage, nType, nOption, strModuleName);
1926 void get_language_list (int client_id, _OUT_ std::vector<String>& strlist) {
1927 SCIM_DEBUG_MAIN (4) << "InfoManager::get_language_list ()\n";
1928 m_signal_get_language_list (strlist);
1931 void get_all_language (int client_id, _OUT_ std::vector<String>& strlist) {
1932 SCIM_DEBUG_MAIN (4) << "InfoManager::get_all_language ()\n";
1933 m_signal_get_all_language (strlist);
1938 void get_ise_language (int client_id, char* buf, size_t len, _OUT_ std::vector<String>& strlist) {
1939 SCIM_DEBUG_MAIN (4) << "InfoManager::get_ise_language ()\n";
1940 m_signal_get_ise_language (buf, strlist);
1942 //ISM_TRANS_CMD_RESET_ISE_OPTION
1943 //reply SCIM_TRANS_CMD_OK
1944 bool reset_ise_option (int client_id) {
1945 SCIM_DEBUG_MAIN (1) << "InfoManager::reset_ise_option ()\n";
1949 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
1951 if (it != m_client_context_uuids.end ()) {
1952 get_imengine_client_context (it->first, client, context);
1956 m_panel_agent_manager.reset_ise_option (client, context);
1963 bool find_active_ise_by_uuid (String uuid) {
1964 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
1966 for (; iter != m_helper_info_repository.end (); iter++) {
1967 if (!uuid.compare (iter->second.uuid))
1973 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
1975 bool set_active_ise_by_uuid (int client_id, char* buf, size_t len) {
1976 SCIM_DEBUG_MAIN (4) << "InfoManager::set_active_ise_by_uuid ()\n";
1985 if (!m_signal_get_ise_info_by_uuid (uuid, info)) {
1989 if (info.type == TOOLBAR_KEYBOARD_MODE) {
1990 m_signal_set_active_ise_by_uuid (uuid, 1);
1993 m_signal_set_active_ise_by_uuid (uuid, 1);
1998 if (find_active_ise_by_uuid (uuid)) {
2001 m_ise_pending_repository[uuid] = client_id;
2005 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
2006 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
2007 void set_initial_ise_by_uuid (int client_id, char* buf, size_t len) {
2008 SCIM_DEBUG_MAIN (4) << "InfoManager::set_initial_ise_by_uuid ()\n";
2015 scim_global_config_write (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (uuid));
2016 scim_global_config_flush ();
2018 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
2019 void set_ise_return_key_type (int client_id, uint32 type) {
2020 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2021 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2022 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2023 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(type);
2025 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2026 set_helper_return_key_type (m_current_helper_uuid, type);
2028 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
2030 bool get_ise_return_key_type (int client_id, _OUT_ uint32& type) {
2031 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2034 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2035 ret = get_helper_return_key_type (m_current_helper_uuid, type);
2039 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
2040 void set_ise_return_key_disable (int client_id, uint32 disabled) {
2041 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2042 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2043 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2044 iseContext->return_key_disabled = static_cast<Eina_Bool>(disabled);
2046 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2047 set_helper_return_key_disable (m_current_helper_uuid, disabled);
2049 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
2050 bool get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled) {
2051 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2054 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2055 ret = get_helper_return_key_disable (m_current_helper_uuid, disabled);
2060 void reset_helper_context (const String& uuid) {
2061 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2063 if (it != m_helper_client_index.end ()) {
2067 get_focused_context (client, context);
2068 ctx = get_helper_ic (client, context);
2069 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
2075 void reset_ise_context (int client_id) {
2076 SCIM_DEBUG_MAIN (4) << "InfoManager::reset_ise_context ()\n";
2078 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2079 reset_helper_context (m_current_helper_uuid);
2081 //ISM_TRANS_CMD_SET_CAPS_MODE
2082 void set_ise_caps_mode (int client_id, uint32 mode) {
2083 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_caps_mode ()\n";
2084 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
2085 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
2086 iseContext->caps_mode = static_cast<Eina_Bool>(mode);
2088 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2089 set_helper_caps_mode (m_current_helper_uuid, mode);
2092 //SCIM_TRANS_CMD_RELOAD_CONFIG
2093 void reload_config (void) {
2094 SCIM_DEBUG_MAIN (1) << "InfoManager::reload_config ()\n";
2097 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2098 if (it->second.type == FRONTEND_CLIENT || it->second.type == HELPER_CLIENT) {
2099 m_panel_agent_manager.reload_config (it->first);
2107 SCIM_DEBUG_MAIN (1) << "InfoManager::exit ()\n";
2110 for (ClientRepository::iterator it = m_client_repository.begin (); it != m_client_repository.end (); ++it) {
2111 m_panel_agent_manager.exit (it->first, 0);
2119 void update_ise_list (std::vector<String>& strList) {
2120 /* request PanelClient to update keyboard ise list */
2121 update_keyboard_ise_list ();
2123 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
2124 void will_show_ack (int client_id) {
2125 SCIM_DEBUG_MAIN (4) << "InfoManager::will_show_ack ()\n";
2126 m_signal_will_show_ack ();
2128 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
2129 void will_hide_ack (int client_id) {
2130 SCIM_DEBUG_MAIN (4) << "InfoManager::will_hide_ack ()\n";
2131 m_signal_will_hide_ack ();
2133 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
2134 void reset_default_ise (int client_id) {
2135 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2136 String initial_ise = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2138 if (initial_ise.length () > 0)
2139 m_signal_set_active_ise_by_uuid (initial_ise, 1);
2141 std::cerr << "Read SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID is failed!!!\n";
2143 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
2144 void set_keyboard_mode (int client_id, uint32 mode) {
2145 SCIM_DEBUG_MAIN (4) << "InfoManager::set_keyboard_mode ()\n";
2146 m_signal_set_keyboard_mode (mode);
2147 set_ise_keyboard_mode (client_id, mode);
2149 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
2150 void candidate_will_hide_ack (int client_id) {
2151 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "\n";
2152 m_signal_candidate_will_hide_ack ();
2155 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
2156 void get_active_helper_option (int client_id, _OUT_ uint32& option) {
2157 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2158 option = get_current_helper_option ();
2160 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
2161 void show_ise_option_window (int client_id, int caller_pid) {
2162 SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_option_window ()\n";
2163 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2164 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2165 LOGD ("prepare to show ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2167 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2168 show_helper_option_window (m_current_helper_uuid, caller_pid);
2172 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
2173 void get_ise_setting_appid (int client_id, _OUT_ String &ime_setting_appid) {
2174 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2175 m_signal_get_ise_setting_appid (m_current_helper_uuid, ime_setting_appid);
2178 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
2179 void resume_ise_option_window (int client_id) {
2180 SCIM_DEBUG_MAIN (4) << "InfoManager::resume_ise_option_window ()\n";
2181 String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
2182 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
2183 LOGD ("prepare to resume ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
2185 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
2186 resume_helper_option_window (m_current_helper_uuid);
2190 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
2191 void set_ise_keyboard_mode (int client_id, uint32 mode) {
2192 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_keyboard_mode ()\n";
2193 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2194 set_helper_keyboard_mode (m_current_helper_uuid, mode);
2197 //ISM_TRANS_CMD_SET_PREDICTION_HINT
2198 void set_prediction_hint (int client_id, String prediction_hint) {
2199 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint ()\n";
2200 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2201 set_helper_prediction_hint (m_current_helper_uuid, prediction_hint);
2204 //ISM_TRANS_CMD_SET_MIME_TYPE
2205 void set_ise_mime_type (int client_id, String mime_type) {
2206 SCIM_DEBUG_MAIN (4) << "InfoManager::set_mime_type ()\n";
2207 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2208 set_helper_mime_type (m_current_helper_uuid, mime_type);
2211 //ISM_TRANS_CMD_FINALIZE_CONTENT
2212 void finalize_content (int client_id, String text, uint32 cursor_pos) {
2213 SCIM_DEBUG_MAIN (4) << "InfoManager::finalize_content ()\n";
2214 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2215 finalize_content_helper (m_current_helper_uuid, text, cursor_pos);
2218 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
2219 void set_prediction_hint_data (int client_id, String key, String value) {
2220 SCIM_DEBUG_MAIN (4) << "InfoManager::set_prediction_hint_data ()\n";
2221 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2222 set_helper_prediction_hint_data (m_current_helper_uuid, key, value);
2225 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
2226 void set_optimization_hint(int client_id, uint32 hint) {
2227 SCIM_DEBUG_MAIN(4) << "InfoManager::set_optimization_hint ()\n";
2228 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2229 set_helper_optimization_hint(m_current_helper_uuid, hint);
2232 //ISM_TRANS_CMD_SET_ISE_ENABLE
2233 void set_ise_enable (int client_id, uint32 enabled) {
2234 SCIM_DEBUG_MAIN (4) << "InfoManager::set_ise_enable ()\n";
2235 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2236 set_helper_enable (m_current_helper_uuid, enabled);
2239 //ISM_TRANS_CMD_SET_POSITION_ALIGN
2240 void set_input_panel_position_align (int client_id, uint32 x, uint32 y, uint32 align) {
2241 SCIM_DEBUG_MAIN (4) << "InfoManager::set_input_panel_position_align ()\n";
2242 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2243 set_helper_input_panel_position_align (m_current_helper_uuid, x, y, align);
2246 //ISM_TRANS_CMD_EXPAND_CANDIDATE
2247 void expand_candidate () {
2249 m_signal_expand_candidate ();
2252 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
2253 void contract_candidate () {
2255 m_signal_contract_candidate ();
2257 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
2258 void get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info) {
2259 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
2261 m_signal_get_recent_ise_geometry (angle, info);
2264 bool check_privilege_by_sockfd (int client_id, const String& privilege) {
2265 return m_signal_check_privilege_by_sockfd (client_id, privilege);
2268 bool remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
2270 SCIM_DEBUG_MAIN(1) << "PanelAgent::update_preedit_string ()\n";
2276 get_focused_context (client, context);
2278 m_panel_agent_manager.remote_update_preedit_string (client, context, str, str, attrs, caret);
2286 bool remoteinput_commit_string (const WideString &str)
2288 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_commit_string ()\n";
2294 get_focused_context (client, context);
2296 m_panel_agent_manager.remote_commit_string (client, context, str);
2304 bool remoteinput_send_key_event (const KeyEvent &key)
2306 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_send_key_event ()\n";
2310 get_focused_context (client, context);
2312 m_panel_agent_manager.remote_send_key_event (client, context, key);
2318 bool remoteinput_forward_key_event (const KeyEvent &key)
2320 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_forward_key_event ()\n";
2324 get_focused_context (client, context);
2326 m_panel_agent_manager.remote_forward_key_event (client, context, key);
2332 bool remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
2334 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_delete_surrounding_text ()\n";
2338 get_focused_context (client, context);
2340 m_panel_agent_manager.remote_delete_surrounding_text (client, context, offset, len);
2346 bool remoteinput_set_cursor_position (uint32 cursor)
2348 SCIM_DEBUG_MAIN(1) << "PanelAgent::remote_set_cursor_position ()\n";
2352 get_focused_context (client, context);
2354 m_panel_agent_manager.socket_helper_set_selection (client, context, cursor, cursor);
2360 void reshow_input_panel () {
2361 /* Check whether application is already focus_in */
2362 if (m_refocus_needed) {
2363 LOGD ("Re-focus in");
2364 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
2366 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
2367 reset_keyboard_ise ();
2370 /* Check whether ISE panel is already shown */
2371 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0 && m_reshow_needed) {
2372 LOGD ("Re-show input_panel");
2373 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
2376 uint32 focused_context;
2378 get_focused_context (focused_client, focused_context);
2379 if (focused_client == -1 && m_active_client_id != -1) {
2380 focused_client = m_panel_client_map[m_active_client_id];
2381 focused_context = 0;
2384 m_panel_agent_manager.request_ise_reshow (focused_client, focused_context);
2385 m_panel_agent_manager.update_entry_metadata (focused_client, focused_context);
2386 uint32 ctx = get_helper_ic (focused_client, focused_context);
2387 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
2389 m_signal_show_ise ();
2391 if (m_imdata_buffer && m_imdata_length > 0 && m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2392 set_helper_imdata (m_current_helper_uuid, m_imdata_buffer, m_imdata_length);
2397 void request_ise_terminate () {
2398 if (m_client_context_uuids.size () == 0) {
2399 LOGD("Request to terminate IME");
2400 m_signal_stop_default_ise (true);
2404 void set_floating_mode (uint32 floating_mode) {
2406 uint32 focused_context;
2407 get_focused_context (focused_client, focused_context);
2408 ClientInfo client_info = socket_get_client_info (focused_client);
2410 if (client_info.type == FRONTEND_CLIENT) {
2411 m_panel_agent_manager.set_floating_mode (focused_client, focused_context, floating_mode);
2415 void set_floating_drag_enabled (uint32 enabled) {
2417 uint32 focused_context;
2418 get_focused_context (focused_client, focused_context);
2419 ClientInfo client_info = socket_get_client_info (focused_client);
2421 if (client_info.type == FRONTEND_CLIENT) {
2422 m_panel_agent_manager.set_floating_drag_enabled (focused_client, focused_context, enabled);
2426 void move_resize_floating_window (uint32 x, uint32 y, uint32 width, uint32 height) {
2428 uint32 focused_context;
2429 get_focused_context (focused_client, focused_context);
2430 ClientInfo client_info = socket_get_client_info (focused_client);
2432 if (client_info.type == FRONTEND_CLIENT) {
2433 m_panel_agent_manager.move_resize_floating_window (focused_client, focused_context, x, y, width, height);
2437 void generate_key_event (KeyEvent& key) {
2438 SCIM_DEBUG_MAIN (4) << "InfoManager::generate_key_event\n";
2440 uint32 focused_context;
2441 String focused_uuid;
2443 focused_uuid = get_focused_context (focused_client, focused_context);
2444 uint32 target_ic = get_helper_ic (focused_client, focused_context);
2446 socket_helper_key_event_op (focused_client, SCIM_TRANS_CMD_PROCESS_KEY_EVENT, target_ic, focused_uuid, key);
2449 Connection signal_connect_turn_on (InfoManagerSlotVoid* slot) {
2450 return m_signal_turn_on.connect (slot);
2453 Connection signal_connect_turn_off (InfoManagerSlotVoid* slot) {
2454 return m_signal_turn_off.connect (slot);
2457 Connection signal_connect_show_panel (InfoManagerSlotVoid* slot) {
2458 return m_signal_show_panel.connect (slot);
2461 Connection signal_connect_hide_panel (InfoManagerSlotVoid* slot) {
2462 return m_signal_hide_panel.connect (slot);
2465 Connection signal_connect_update_screen (InfoManagerSlotInt* slot) {
2466 return m_signal_update_screen.connect (slot);
2469 Connection signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot) {
2470 return m_signal_update_spot_location.connect (slot);
2473 Connection signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot) {
2474 return m_signal_update_factory_info.connect (slot);
2477 Connection signal_connect_start_default_ise (InfoManagerSlotBool* slot) {
2478 return m_signal_start_default_ise.connect (slot);
2481 Connection signal_connect_stop_default_ise (InfoManagerSlotBool* slot) {
2482 return m_signal_stop_default_ise.connect (slot);
2485 Connection signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot) {
2486 return m_signal_set_candidate_ui.connect (slot);
2489 Connection signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot) {
2490 return m_signal_get_candidate_ui.connect (slot);
2493 Connection signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot) {
2494 return m_signal_set_candidate_position.connect (slot);
2497 Connection signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot) {
2498 return m_signal_get_candidate_geometry.connect (slot);
2501 Connection signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot) {
2502 return m_signal_get_input_panel_geometry.connect (slot);
2505 Connection signal_connect_set_keyboard_ise (InfoManagerSlotString* slot) {
2506 return m_signal_set_keyboard_ise.connect (slot);
2509 Connection signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot) {
2510 return m_signal_get_keyboard_ise.connect (slot);
2513 Connection signal_connect_show_help (InfoManagerSlotString* slot) {
2514 return m_signal_show_help.connect (slot);
2517 Connection signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot) {
2518 return m_signal_show_factory_menu.connect (slot);
2521 Connection signal_connect_show_preedit_string (InfoManagerSlotVoid* slot) {
2522 return m_signal_show_preedit_string.connect (slot);
2525 Connection signal_connect_show_aux_string (InfoManagerSlotVoid* slot) {
2526 return m_signal_show_aux_string.connect (slot);
2529 Connection signal_connect_show_lookup_table (InfoManagerSlotVoid* slot) {
2530 return m_signal_show_lookup_table.connect (slot);
2533 Connection signal_connect_show_associate_table (InfoManagerSlotVoid* slot) {
2534 return m_signal_show_associate_table.connect (slot);
2537 Connection signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot) {
2538 return m_signal_hide_preedit_string.connect (slot);
2541 Connection signal_connect_hide_aux_string (InfoManagerSlotVoid* slot) {
2542 return m_signal_hide_aux_string.connect (slot);
2545 Connection signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot) {
2546 return m_signal_hide_lookup_table.connect (slot);
2549 Connection signal_connect_hide_associate_table (InfoManagerSlotVoid* slot) {
2550 return m_signal_hide_associate_table.connect (slot);
2553 Connection signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot) {
2554 return m_signal_update_preedit_string.connect (slot);
2557 Connection signal_connect_update_preedit_caret (InfoManagerSlotInt* slot) {
2558 return m_signal_update_preedit_caret.connect (slot);
2561 Connection signal_connect_recapture_string (InfoManagerSlotAttributeInt2String2* slot) {
2562 return m_signal_recapture_string.connect (slot);
2565 Connection signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot) {
2566 return m_signal_update_aux_string.connect (slot);
2569 Connection signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot) {
2570 return m_signal_update_lookup_table.connect (slot);
2573 Connection signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot) {
2574 return m_signal_update_associate_table.connect (slot);
2577 Connection signal_connect_register_properties (InfoManagerSlotPropertyList* slot) {
2578 return m_signal_register_properties.connect (slot);
2581 Connection signal_connect_update_property (InfoManagerSlotProperty* slot) {
2582 return m_signal_update_property.connect (slot);
2585 Connection signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot) {
2586 return m_signal_register_helper_properties.connect (slot);
2589 Connection signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot) {
2590 return m_signal_update_helper_property.connect (slot);
2593 Connection signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot) {
2594 return m_signal_register_helper.connect (slot);
2597 Connection signal_connect_remove_helper (InfoManagerSlotInt* slot) {
2598 return m_signal_remove_helper.connect (slot);
2601 Connection signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot) {
2602 return m_signal_set_active_ise_by_uuid.connect (slot);
2605 Connection signal_connect_focus_in (InfoManagerSlotVoid* slot) {
2606 return m_signal_focus_in.connect (slot);
2609 Connection signal_connect_focus_out (InfoManagerSlotVoid* slot) {
2610 return m_signal_focus_out.connect (slot);
2613 Connection signal_connect_expand_candidate (InfoManagerSlotVoid* slot) {
2614 return m_signal_expand_candidate.connect (slot);
2617 Connection signal_connect_contract_candidate (InfoManagerSlotVoid* slot) {
2618 return m_signal_contract_candidate.connect (slot);
2621 Connection signal_connect_select_candidate (InfoManagerSlotInt* slot) {
2622 return m_signal_select_candidate.connect (slot);
2625 Connection signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot) {
2626 return m_signal_get_ise_list.connect (slot);
2629 Connection signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot) {
2630 return m_signal_get_all_helper_ise_info.connect (slot);
2633 Connection signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot) {
2634 return m_signal_set_has_option_helper_ise_info.connect (slot);
2637 Connection signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot) {
2638 return m_signal_set_enable_helper_ise_info.connect (slot);
2641 Connection signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot) {
2642 return m_signal_show_helper_ise_list.connect (slot);
2645 Connection signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot) {
2646 return m_signal_show_helper_ise_selector.connect (slot);
2649 Connection signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot) {
2650 return m_signal_is_helper_ise_enabled.connect (slot);
2653 Connection signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot) {
2654 return m_signal_get_ise_information.connect (slot);
2657 Connection signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot) {
2658 return m_signal_get_keyboard_ise_list.connect (slot);
2661 Connection signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot) {
2662 return m_signal_update_ise_geometry.connect (slot);
2665 Connection signal_connect_get_language_list (InfoManagerSlotStringVector* slot) {
2666 return m_signal_get_language_list.connect (slot);
2669 Connection signal_connect_get_all_language (InfoManagerSlotStringVector* slot) {
2670 return m_signal_get_all_language.connect (slot);
2673 Connection signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot) {
2674 return m_signal_get_ise_language.connect (slot);
2677 Connection signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot) {
2678 return m_signal_get_ise_info_by_uuid.connect (slot);
2681 Connection signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot) {
2682 return m_signal_send_key_event.connect (slot);
2685 Connection signal_connect_accept_connection (InfoManagerSlotInt* slot) {
2686 return m_signal_accept_connection.connect (slot);
2689 Connection signal_connect_close_connection (InfoManagerSlotInt* slot) {
2690 return m_signal_close_connection.connect (slot);
2693 Connection signal_connect_exit (InfoManagerSlotVoid* slot) {
2694 return m_signal_exit.connect (slot);
2697 Connection signal_connect_transaction_start (InfoManagerSlotVoid* slot) {
2698 return m_signal_transaction_start.connect (slot);
2701 Connection signal_connect_transaction_end (InfoManagerSlotVoid* slot) {
2702 return m_signal_transaction_end.connect (slot);
2705 Connection signal_connect_lock (InfoManagerSlotVoid* slot) {
2706 return m_signal_lock.connect (slot);
2709 Connection signal_connect_unlock (InfoManagerSlotVoid* slot) {
2710 return m_signal_unlock.connect (slot);
2713 Connection signal_connect_update_input_context (InfoManagerSlotIntInt* slot) {
2714 return m_signal_update_input_context.connect (slot);
2717 Connection signal_connect_update_language_locale(InfoManagerSlotString* slot) {
2718 return m_signal_update_language_locale.connect(slot);
2721 Connection signal_connect_show_ise (InfoManagerSlotVoid* slot) {
2722 return m_signal_show_ise.connect (slot);
2725 Connection signal_connect_hide_ise (InfoManagerSlotVoid* slot) {
2726 return m_signal_hide_ise.connect (slot);
2729 Connection signal_connect_will_show_ack (InfoManagerSlotVoid* slot) {
2730 return m_signal_will_show_ack.connect (slot);
2733 Connection signal_connect_will_hide_ack (InfoManagerSlotVoid* slot) {
2734 return m_signal_will_hide_ack.connect (slot);
2737 Connection signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot) {
2738 return m_signal_set_keyboard_mode.connect (slot);
2741 Connection signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot) {
2742 return m_signal_candidate_will_hide_ack.connect (slot);
2745 Connection signal_connect_get_ise_state (InfoManagerSlotInt2* slot) {
2746 return m_signal_get_ise_state.connect (slot);
2749 Connection signal_connect_run_helper (InfoManagerSlotString3* slot)
2751 return m_signal_run_helper.connect (slot);
2754 Connection signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
2756 return m_signal_launch_option_application.connect (slot);
2759 Connection signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
2761 return m_signal_get_ise_setting_appid.connect (slot);
2764 Connection signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot) {
2765 return m_signal_get_recent_ise_geometry.connect (slot);
2768 Connection signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
2770 return m_signal_check_privilege_by_sockfd.connect (slot);
2773 Connection signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
2775 return m_signal_remoteinput_send_input_message.connect (slot);
2778 Connection signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
2780 return m_signal_remoteinput_send_surrounding_text.connect (slot);
2783 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
2784 void register_panel_client (uint32 client_id, uint32 id) {
2785 m_panel_client_map [client_id] = (int)id;
2787 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
2788 void register_input_context (uint32 client_id, uint32 context, String uuid) {
2789 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2790 m_client_context_uuids [ctx] = uuid;
2792 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
2793 void remove_input_context (uint32 client_id, uint32 context) {
2794 uint32 ctx = get_helper_ic (m_panel_client_map[client_id], context);
2795 m_client_context_uuids.erase (ctx);
2797 if (ctx == get_helper_ic (m_current_socket_client, m_current_client_context)) {
2799 m_current_socket_client = m_last_socket_client;
2800 m_current_client_context = m_last_client_context;
2801 m_current_context_uuid = m_last_context_uuid;
2802 m_last_socket_client = -1;
2803 m_last_client_context = 0;
2804 m_last_context_uuid = String ("");
2806 if (m_current_socket_client == -1) {
2808 socket_update_control_panel ();
2812 } else if (ctx == get_helper_ic (m_last_socket_client, m_last_client_context)) {
2814 m_last_socket_client = -1;
2815 m_last_client_context = 0;
2816 m_last_context_uuid = String ("");
2821 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
2822 void socket_reset_input_context (int client_id, uint32 context) {
2823 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_reset_input_context \n";
2825 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2826 socket_reset_helper_input_context (m_current_helper_uuid, m_panel_client_map[client_id], context);
2829 //SCIM_TRANS_CMD_FOCUS_IN
2830 void focus_in (int client_id, uint32 context, String uuid) {
2831 m_refocus_needed = true;
2833 m_signal_focus_in ();
2834 focus_in_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2835 SCIM_DEBUG_MAIN (2) << "PanelAgent::focus_in (" << client_id << "," << context << "," << uuid << ")\n";
2836 m_active_client_id = client_id;
2839 if (m_current_socket_client >= 0) {
2840 m_last_socket_client = m_current_socket_client;
2841 m_last_client_context = m_current_client_context;
2842 m_last_context_uuid = m_current_context_uuid;
2845 m_current_socket_client = m_panel_client_map[client_id];
2846 m_current_client_context = context;
2847 m_current_context_uuid = uuid;
2851 //SCIM_TRANS_CMD_FOCUS_OUT
2852 void focus_out (int client_id, uint32 context) {
2853 m_refocus_needed = false;
2854 m_signal_focus_out ();
2856 focus_out_helper (m_current_helper_uuid, m_panel_client_map[client_id], context);
2858 if (m_current_socket_client >= 0) {
2859 m_last_socket_client = m_current_socket_client;
2860 m_last_client_context = m_current_client_context;
2861 m_last_context_uuid = m_current_context_uuid;
2864 m_current_socket_client = -1;
2865 m_current_client_context = 0;
2866 m_current_context_uuid = String ("");
2869 /* Release ISE context & IMDATA buffer */
2870 delete_imdata_buffer ();
2871 if (!m_reshow_needed)
2872 delete_ise_context_buffer ();
2875 //ISM_TRANS_CMD_TURN_ON_LOG
2876 void socket_turn_on_log (uint32 isOn) {
2878 DebugOutput::enable_debug (SCIM_DEBUG_AllMask);
2879 DebugOutput::set_verbose_level (7);
2880 SCIM_DEBUG_MAIN (4) << __func__ << " on\n";
2882 SCIM_DEBUG_MAIN (4) << __func__ << " off\n";
2883 DebugOutput::disable_debug (SCIM_DEBUG_AllMask);
2884 DebugOutput::set_verbose_level (0);
2888 uint32 focused_context;
2889 get_focused_context (focused_client, focused_context);
2891 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
2892 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
2894 if (it != m_helper_client_index.end ()) {
2895 //uint32 ctx = get_helper_ic (focused_client, focused_context);
2897 //m_panel_agent_manager.socket_turn_on_log (it->second.id, ctx, m_current_helper_uuid, isOn);
2901 if (focused_client == -1) {
2902 std::cerr << __func__ << " get_focused_context is failed!!!\n";
2906 ClientInfo client_info = socket_get_client_info (focused_client);
2908 if (client_info.type == FRONTEND_CLIENT) {
2910 //m_panel_agent_manager.socket_turn_on_log (focused_client, focused_context, isOn);
2915 void add_client (int client_id, uint32 key, ClientType type) {
2916 LOGD ("id:%d, key:%d, type:%d", client_id, key, type);
2920 SCIM_DEBUG_MAIN (4) << "Add client to repository. Type=" << type << " key=" << key << "\n";
2922 m_client_repository [client_id] = info;
2924 if (info.type == HELPER_CLIENT || info.type == HELPER_ACT_CLIENT)
2925 m_is_ise_alive = true;
2927 if (info.type == IMCONTROL_ACT_CLIENT) {
2928 m_pending_active_imcontrol_id = client_id;
2929 } else if (info.type == IMCONTROL_CLIENT) {
2930 m_imcontrol_map [m_pending_active_imcontrol_id] = client_id;
2931 m_pending_active_imcontrol_id = -1;
2932 } else if (info.type == REMOTEINPUT_ACT_CLIENT) {
2933 m_current_send_remoteinput_id.push_back (client_id);
2934 } else if (info.type == REMOTEINPUT_CLIENT) {
2935 m_current_recv_remoteinput_id.push_back (client_id);
2938 LOGD ("%zu clients connecting", m_client_repository.size());
2943 void del_client (int client_id) {
2944 ClientRepository::iterator iter = m_client_repository.find(client_id);
2945 if (iter == m_client_repository.end()) {
2946 LOGW("The client with id %d does not exist in our client repository, returning", client_id);
2950 m_signal_close_connection (client_id);
2951 ClientInfo client_info = socket_get_client_info (client_id);
2952 m_client_repository.erase (client_id);
2953 LOGD ("id:%d, type:%d", client_id, client_info.type);
2954 #ifdef PANEL_SERVER_AUTO_EXIT
2955 /* Exit panel if there is no connected client anymore. */
2956 if (client_info.type != UNKNOWN_CLIENT && m_client_repository.size () == 0 && !m_should_resident) {
2957 SCIM_DEBUG_MAIN (4) << "Exit Socket Server Thread.\n";
2958 server->shutdown ();
2959 m_signal_exit.emit ();
2964 if (client_info.type == FRONTEND_CLIENT) {
2965 SCIM_DEBUG_MAIN (4) << "It's a FrontEnd client.\n";
2967 /* The focused client is closed. */
2968 if (m_current_socket_client == client_id) {
2969 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)
2970 hide_helper (m_current_helper_uuid);
2973 m_current_socket_client = -1;
2974 m_current_client_context = 0;
2975 m_current_context_uuid = String ("");
2977 socket_transaction_start ();
2979 socket_transaction_end ();
2982 if (m_last_socket_client == client_id) {
2984 m_last_socket_client = -1;
2985 m_last_client_context = 0;
2986 m_last_context_uuid = String ("");
2990 /* Erase all associated Client Context UUIDs. */
2991 std::vector <uint32> ctx_list;
2992 ClientContextUUIDRepository::iterator it = m_client_context_uuids.begin ();
2994 for (; it != m_client_context_uuids.end (); ++it) {
2995 if ((it->first & 0xFFFF) == (client_id & 0xFFFF))
2996 ctx_list.push_back (it->first);
2999 for (size_t i = 0; i < ctx_list.size (); ++i)
3000 m_client_context_uuids.erase (ctx_list [i]);
3002 /* Erase all helperise info associated with the client */
3004 it = m_client_context_helper.begin ();
3006 for (; it != m_client_context_helper.end (); ++it) {
3007 if ((it->first & 0xFFFF) == (client_id & 0xFFFF)) {
3008 ctx_list.push_back (it->first);
3009 /* similar to stop_helper except that it will not call get_focused_context() */
3010 String uuid = it->second;
3012 if (m_helper_uuid_count.find (uuid) != m_helper_uuid_count.end ()) {
3013 uint32 count = m_helper_uuid_count[uuid];
3016 m_helper_uuid_count.erase (uuid);
3017 HelperClientIndex::iterator pise = m_helper_client_index.find (uuid);
3019 if (pise != m_helper_client_index.end ()) {
3020 stop_helper (uuid, pise->second.id, it->first);
3023 SCIM_DEBUG_MAIN (1) << "Stop HelperISE " << uuid << " ...\n";
3025 m_helper_uuid_count[uuid] = count - 1;
3026 focus_out_helper (uuid, (it->first & 0xFFFF), ((it->first >> 16) & 0x7FFF));
3027 SCIM_DEBUG_MAIN (1) << "Decrement usage count of HelperISE " << uuid
3028 << " to " << m_helper_uuid_count[uuid] << "\n";
3034 for (size_t i = 0; i < ctx_list.size (); ++i)
3035 m_client_context_helper.erase (ctx_list [i]);
3037 HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
3039 for (; iter != m_helper_info_repository.end (); iter++) {
3040 if (!m_current_helper_uuid.compare (iter->second.uuid))
3041 if (! (iter->second.option & ISM_ISE_HIDE_IN_CONTROL_PANEL))
3042 socket_update_control_panel ();
3044 } else if (client_info.type == FRONTEND_ACT_CLIENT) {
3045 SCIM_DEBUG_MAIN (4) << "It's a FRONTEND_ACT_CLIENT client.\n";
3046 IntIntRepository::iterator iter2 = m_panel_client_map.find (client_id);
3048 if (iter2 != m_panel_client_map.end ())
3049 m_panel_client_map.erase (iter2);
3050 } else if (client_info.type == HELPER_CLIENT) {
3051 SCIM_DEBUG_MAIN (4) << "It's a Helper client.\n";
3053 HelperInfoRepository::iterator hiit = m_helper_info_repository.find (client_id);
3055 bool enable_auto_restart = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE), true);
3056 if (hiit != m_helper_info_repository.end ()) {
3057 bool restart = false;
3058 String uuid = hiit->second.uuid;
3059 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3061 String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
3062 if ((hiit->second.option & SCIM_HELPER_AUTO_RESTART) &&
3063 (default_uuid.compare (uuid) == 0 || default_uuid.compare ("") == 0) &&
3064 (it != m_helper_client_index.end () && it->second.ref > 0)) {
3068 m_helper_client_index.erase (uuid);
3069 m_helper_info_repository.erase (hiit);
3071 m_signal_stop_default_ise (false);
3073 if (m_reshow_needed || enable_auto_restart)
3074 m_restart_needed = true;
3076 if (restart && !m_ise_exiting && m_restart_needed) {
3077 struct tms tiks_buf;
3078 static clock_t start_tiks = times (&tiks_buf);
3079 static clock_t clock_tiks = sysconf (_SC_CLK_TCK);
3080 clock_t curr_tiks = times (&tiks_buf);
3081 clock_t secs = (curr_tiks - start_tiks) / clock_tiks;
3082 double min_restart_interval = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_MINIMUM_RESTART_INTERVAL), (double)MIN_REPEAT_TIME);
3083 static String restart_uuid;
3085 LOGW("time second: %ld, restart inverval : %f", secs, min_restart_interval);
3086 if (restart_uuid != uuid || secs > min_restart_interval) {
3087 scim_usleep (100000);
3091 get_focused_context(client, context);
3093 uint32 ic = get_helper_ic (client, context);
3095 /* Get the context uuid from the client context registration table. */
3097 ClientContextUUIDRepository::iterator it =
3098 m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client], context));
3100 if (it != m_client_context_uuids.end ())
3101 ic_uuid = it->second;
3104 m_start_helper_ic_index[uuid].push_back(std::make_pair(ic, ic_uuid));
3105 m_signal_run_helper (uuid, m_config_name, m_display_name);
3106 restart_uuid = uuid;
3107 LOGE ("Auto restart soft ISE:%s", uuid.c_str ());
3109 reset_default_ise (0);
3110 ISF_SAVE_LOG ("Auto restart is abnormal, reset default ISE");
3113 start_tiks = curr_tiks;
3117 m_ise_exiting = false;
3118 m_restart_needed = false;
3120 socket_transaction_start ();
3121 m_signal_remove_helper (client_id);
3122 socket_transaction_end ();
3123 } else if (client_info.type == HELPER_ACT_CLIENT) {
3124 SCIM_DEBUG_MAIN (4) << "It's a Helper passive client.\n";
3126 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client_id);
3128 if (hiit != m_helper_active_info_repository.end ()) {
3129 if (hiit->second.uuid == m_current_helper_uuid)
3130 m_is_ise_alive = false;
3132 m_helper_active_info_repository.erase (hiit);
3136 } else if (client_info.type == IMCONTROL_ACT_CLIENT) {
3137 SCIM_DEBUG_MAIN (4) << "It's a IMCONTROL_ACT_CLIENT client.\n";
3138 IMControlRepository::iterator iter = m_imcontrol_repository.find (client_id);
3140 if (iter != m_imcontrol_repository.end ()) {
3141 int size = iter->second.info.size ();
3145 stop_helper ((iter->second.info)[i].uuid, (iter->second.count)[i], DEFAULT_CONTEXT_VALUE);
3147 if ((iter->second.info)[i].option & ISM_ISE_HIDE_IN_CONTROL_PANEL)
3148 m_current_helper_uuid = m_last_helper_uuid;
3153 m_imcontrol_repository.erase (iter);
3156 IntIntRepository::iterator iter2 = m_imcontrol_map.find (client_id);
3158 if (iter2 != m_imcontrol_map.end ())
3159 m_imcontrol_map.erase (iter2);
3160 } else if (client_info.type == REMOTEINPUT_ACT_CLIENT) {
3161 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_ACT_CLIENT client.\n";
3163 for (unsigned int i = 0; i < m_current_send_remoteinput_id.size (); i++) {
3164 if (m_current_send_remoteinput_id.at (i) == client_id) {
3165 m_current_send_remoteinput_id.erase (m_current_send_remoteinput_id.begin () + i);
3169 } else if (client_info.type == REMOTEINPUT_CLIENT) {
3170 SCIM_DEBUG_MAIN (4) << "It's a REMOTEINPUT_CLIENT client.\n";
3172 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3173 if (m_current_recv_remoteinput_id.at (i) == client_id) {
3174 m_current_recv_remoteinput_id.erase (m_current_recv_remoteinput_id.begin () + i);
3178 } else if (client_info.type == CONFIG_CLIENT) {
3179 SCIM_DEBUG_MAIN(4) << "It's a CONFIG_CLIENT client.\n";
3181 LOGI ("clients: %zu, panel clients: %zu, imcontrols size: %zu, helper infos: %zu, \
3182 helper active infos: %zu, helper client indexes: %zu, ises pending: %zu, \
3183 imcontrols: %zu, start helper ic indexes: %zu, client context uuids: %zu, \
3184 client context helpers: %zu, helpers uuid count: %zu",
3185 m_client_repository.size(),
3186 m_panel_client_map.size(),
3187 m_imcontrol_map.size(),
3188 m_helper_info_repository.size(),
3189 m_helper_active_info_repository.size(),
3190 m_helper_client_index.size(),
3191 m_ise_pending_repository.size(),
3192 m_imcontrol_repository.size(),
3193 m_start_helper_ic_index.size(),
3194 m_client_context_uuids.size(),
3195 m_client_context_helper.size(),
3196 m_helper_uuid_count.size());
3199 const ClientInfo& socket_get_client_info (int client) {
3200 static ClientInfo null_client = { 0, UNKNOWN_CLIENT };
3201 ClientRepository::iterator it = m_client_repository.find (client);
3203 if (it != m_client_repository.end ())
3209 //SCIM_TRANS_CMD_PANEL_TURN_ON
3210 void socket_turn_on (void) {
3211 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_on ()\n";
3212 m_signal_turn_on ();
3214 //SCIM_TRANS_CMD_PANEL_TURN_OFF
3215 void socket_turn_off (void) {
3216 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_turn_off ()\n";
3217 m_signal_turn_off ();
3219 //SCIM_TRANS_CMD_UPDATE_SCREEN
3220 void socket_update_screen (int client_id, uint32 num) {
3221 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_screen ()\n";
3223 if (((int) num) != m_current_screen) {
3224 SCIM_DEBUG_MAIN (4) << "New Screen number = " << num << "\n";
3225 m_signal_update_screen ((int) num);
3226 helper_all_update_screen ((int) num);
3227 m_current_screen = (num);
3230 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
3231 void socket_update_spot_location (uint32 x, uint32 y, uint32 top_y) {
3232 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_spot_location ()\n";
3233 SCIM_DEBUG_MAIN (4) << "New Spot location x=" << x << " y=" << y << "\n";
3234 m_signal_update_spot_location ((int)x, (int)y, (int)top_y);
3235 helper_all_update_spot_location ((int)x, (int)y);
3237 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
3238 void socket_update_cursor_position (uint32 cursor_pos) {
3239 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_cursor_position ()\n";
3240 SCIM_DEBUG_MAIN (4) << "New cursor position pos=" << cursor_pos << "\n";
3241 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3242 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3243 iseContext->cursor_pos = static_cast<int>(cursor_pos);
3245 helper_all_update_cursor_position ((int)cursor_pos);
3247 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
3248 void socket_update_surrounding_text (String text, uint32 cursor) {
3249 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3250 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3252 if (it != m_helper_client_index.end ()) {
3257 get_focused_context (client, context);
3258 ctx = get_helper_ic (client, context);
3259 m_panel_agent_manager.socket_update_surrounding_text (it->second.id, ctx, m_current_helper_uuid, text, cursor);
3264 void remoteinput_callback_focus_in () {
3265 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3267 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3269 m_panel_agent_manager.socket_remoteinput_focus_in (m_current_recv_remoteinput_id.at (i));
3274 void remoteinput_callback_focus_out () {
3275 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3277 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3279 m_panel_agent_manager.socket_remoteinput_focus_out (m_current_recv_remoteinput_id.at (i));
3284 void remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type) {
3285 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3286 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3287 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3288 iseContext->layout = static_cast<Ecore_IMF_Input_Panel_Layout>(layout);
3289 iseContext->return_key_type = static_cast<Ecore_IMF_Input_Panel_Return_Key_Type>(return_key_type);
3290 iseContext->return_key_disabled = static_cast<Eina_Bool>(return_key_disabled);
3291 iseContext->layout_variation = static_cast<int>(variation);
3292 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(autocapital_type);
3293 iseContext->input_hint = static_cast<Ecore_IMF_Input_Hints>(hint);
3295 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3297 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);
3302 void remoteinput_callback_surrounding_text (String text, uint32 cursor) {
3303 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3305 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3307 m_panel_agent_manager.socket_remoteinput_surrounding_text (m_current_recv_remoteinput_id.at (i), text, cursor);
3312 void remoteinput_callback_input_resource (uint32 input_resource) {
3313 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3315 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3317 m_panel_agent_manager.socket_remoteinput_input_resource (m_current_recv_remoteinput_id.at (i), input_resource);
3322 void remoteinput_callback_key_symbol (String key_symbol, int press, uint32 timestamp) {
3323 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3325 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3327 m_panel_agent_manager.socket_remoteinput_key_symbol (m_current_recv_remoteinput_id.at (i), key_symbol, press, timestamp);
3332 void remoteinput_callback_cursor_position (uint32 cursor) {
3333 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3335 for (unsigned int i = 0; i < m_current_recv_remoteinput_id.size (); i++) {
3337 m_panel_agent_manager.socket_remoteinput_cursor_position (m_current_recv_remoteinput_id.at (i), cursor);
3342 //ISM_TRANS_CMD_UPDATE_SELECTION
3343 void socket_update_selection (String text) {
3344 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
3345 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
3347 if (it != m_helper_client_index.end ()) {
3352 get_focused_context (client, context);
3353 ctx = get_helper_ic (client, context);
3354 m_panel_agent_manager.socket_update_selection (it->second.id, ctx, m_current_helper_uuid, text);
3358 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
3359 void socket_update_factory_info (PanelFactoryInfo& info) {
3360 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_factory_info ()\n";
3361 SCIM_DEBUG_MAIN (4) << "New Factory info uuid=" << info.uuid << " name=" << info.name << "\n";
3362 info.lang = scim_get_normalized_language (info.lang);
3363 m_signal_update_factory_info (info);
3365 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
3366 void socket_show_help (String help) {
3367 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_help ()\n";
3368 m_signal_show_help (help);
3370 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
3371 void socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec) {
3372 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_factory_menu ()\n";
3375 m_signal_show_factory_menu (vec);
3378 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3379 void socket_show_preedit_string (void) {
3380 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_preedit_string ()\n";
3381 m_signal_show_preedit_string ();
3383 //SCIM_TRANS_CMD_SHOW_AUX_STRING
3384 void socket_show_aux_string (void) {
3385 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_aux_string ()\n";
3386 m_signal_show_aux_string ();
3388 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
3389 void socket_show_lookup_table (void) {
3390 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_lookup_table ()\n";
3392 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
3393 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
3394 if (iseContext->layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD || iseContext->input_hint & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
3398 m_signal_show_lookup_table ();
3400 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
3401 void socket_show_associate_table (void) {
3402 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_show_associate_table ()\n";
3403 m_signal_show_associate_table ();
3405 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3406 void socket_hide_preedit_string (void) {
3407 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_preedit_string ()\n";
3408 m_signal_hide_preedit_string ();
3410 //SCIM_TRANS_CMD_HIDE_AUX_STRING
3411 void socket_hide_aux_string (void) {
3412 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_aux_string ()\n";
3413 m_signal_hide_aux_string ();
3415 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
3416 void socket_hide_lookup_table (void) {
3417 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_lookup_table ()\n";
3418 m_signal_hide_lookup_table ();
3420 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
3421 void socket_hide_associate_table (void) {
3422 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_associate_table ()\n";
3423 m_signal_hide_associate_table ();
3425 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3426 void socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret) {
3427 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_string ()\n";
3428 m_signal_update_preedit_string (str, attrs, (int) caret);
3430 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
3431 void socket_update_preedit_caret (uint32 caret) {
3432 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3433 m_signal_update_preedit_caret ((int) caret);
3435 //ISM_TRANS_CMD_RECAPTURE_STRING
3436 void socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs) {
3437 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_preedit_caret ()\n";
3438 m_signal_recapture_string (offset, len, preedit, commit, attrs);
3440 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
3441 void socket_update_aux_string (String& str, const AttributeList& attrs) {
3442 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_aux_string ()\n";
3443 m_signal_update_aux_string (str, attrs);
3444 m_is_imengine_aux = true;
3446 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
3447 void socket_update_lookup_table (const LookupTable& table) {
3448 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_lookup_table ()\n";
3450 //g_isf_candidate_table = _isf_candidate_table;
3451 m_signal_update_lookup_table (table);
3452 m_is_imengine_candidate = true;
3454 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
3455 void socket_update_associate_table (const LookupTable& table) {
3456 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_associate_table ()\n";
3457 m_signal_update_associate_table (table);
3460 void socket_update_control_panel (void) {
3461 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_control_panel ()\n";
3463 m_signal_get_keyboard_ise (name, uuid);
3464 PanelFactoryInfo info;
3466 if (name.length () > 0)
3467 info = PanelFactoryInfo (uuid, name, String (""), String (""));
3469 info = PanelFactoryInfo (String (""), String (_ ("English Keyboard")), String ("C"), String (SCIM_KEYBOARD_ICON_FILE));
3471 m_signal_update_factory_info (info);
3473 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3474 void socket_register_properties (const PropertyList& properties) {
3475 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_register_properties ()\n";
3476 m_signal_register_properties (properties);
3478 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3479 void socket_update_property (const Property& property) {
3480 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_update_property ()\n";
3481 m_signal_update_property (property);
3483 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
3484 void socket_get_keyboard_ise_list (String& uuid) {
3485 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise_list ()\n";
3486 std::vector<String> list;
3488 m_signal_get_keyboard_ise_list (list);
3489 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3491 if (it != m_helper_client_index.end ()) {
3494 get_focused_context (client, context);
3495 uint32 ctx = get_helper_ic (client, context);
3496 m_panel_agent_manager.socket_get_keyboard_ise_list (it->second.id, ctx, uuid, list);
3499 //ISM_TRANS_CMD_SET_CANDIDATE_UI
3500 void socket_set_candidate_ui (uint32 portrait_line, uint32 mode) {
3501 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3502 m_signal_set_candidate_ui (portrait_line, mode);
3504 //ISM_TRANS_CMD_GET_CANDIDATE_UI
3505 void socket_get_candidate_ui (String uuid) {
3506 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_candidate_ui ()\n";
3507 int style = 0, mode = 0;
3508 m_signal_get_candidate_ui (style, mode);
3509 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3511 if (it != m_helper_client_index.end ()) {
3514 get_focused_context (client, context);
3515 uint32 ctx = get_helper_ic (client, context);
3516 m_panel_agent_manager.socket_get_candidate_ui (it->second.id, ctx, uuid, style, mode);
3519 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
3520 void socket_set_candidate_position (uint32 left, uint32 top) {
3521 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_candidate_position ()\n";
3522 m_signal_set_candidate_position (left, top);
3524 //ISM_TRANS_CMD_HIDE_CANDIDATE
3525 void socket_hide_candidate (void) {
3526 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_hide_candidate ()\n";
3527 m_signal_hide_preedit_string ();
3528 m_signal_hide_aux_string ();
3529 m_signal_hide_lookup_table ();
3530 m_signal_hide_associate_table ();
3532 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
3533 void socket_get_candidate_geometry (String& uuid) {
3534 SCIM_DEBUG_MAIN (4) << __func__ << " \n";
3535 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3537 if (it != m_helper_client_index.end ()) {
3538 struct rectinfo info = {0, 0, 0, 0};
3539 m_signal_get_candidate_geometry (info);
3542 get_focused_context (client, context);
3543 uint32 ctx = get_helper_ic (client, context);
3544 m_panel_agent_manager.socket_get_candidate_geometry (it->second.id, ctx, uuid, info);
3547 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
3548 void socket_set_keyboard_ise (String uuid) {
3549 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3551 m_signal_set_keyboard_ise (uuid);
3553 //ISM_TRANS_CMD_SELECT_CANDIDATE
3554 void socket_helper_select_candidate (uint32 index) {
3555 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_set_keyboard_ise ()\n";
3557 m_signal_select_candidate (index);
3559 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
3560 void socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height) {
3561 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
3564 uint32 focused_context;
3565 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
3567 if (it != m_helper_active_info_repository.end ()) {
3568 if (it->second.uuid == m_current_helper_uuid) {
3569 m_signal_update_ise_geometry (x, y, width, height);
3571 get_focused_context (focused_client, focused_context);
3572 ClientInfo client_info = socket_get_client_info (focused_client);
3573 if (client_info.type == FRONTEND_CLIENT) {
3574 m_panel_agent_manager.update_ise_geometry (focused_client, focused_context, x, y, width, height);
3579 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
3580 void socket_get_keyboard_ise (String uuid) {
3581 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_get_keyboard_ise ()\n";
3582 String ise_name, ise_uuid;
3586 get_focused_context (client, context);
3587 ctx = get_helper_ic (client, context);
3589 if (m_client_context_uuids.find (ctx) != m_client_context_uuids.end ())
3590 ise_uuid = m_client_context_uuids[ctx];
3592 m_signal_get_keyboard_ise (ise_name, ise_uuid);
3593 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3595 if (it != m_helper_client_index.end ()) {
3596 get_focused_context (client, context);
3597 ctx = get_helper_ic (client, context);
3598 m_panel_agent_manager.socket_get_keyboard_ise (it->second.id, ctx, uuid, ise_name, ise_uuid);
3602 //SCIM_TRANS_CMD_START_HELPER
3603 void socket_start_helper (int client_id, uint32 context, String uuid) {
3604 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_start_helper ()\n";
3605 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3607 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3609 /* Get the context uuid from the client context registration table. */
3611 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3613 if (it != m_client_context_uuids.end ())
3614 ic_uuid = it->second;
3617 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3618 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3619 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3620 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3623 if (it == m_helper_client_index.end ()) {
3624 SCIM_DEBUG_MAIN (5) << "Run this Helper.\n";
3625 m_start_helper_ic_index [uuid].push_back (std::make_pair (ic, ic_uuid));
3626 m_signal_run_helper (uuid, m_config_name, m_display_name);
3628 SCIM_DEBUG_MAIN (5) << "Increase the Reference count.\n";
3629 m_panel_agent_manager.socket_start_helper (it->second.id, ic, ic_uuid);
3635 //SCIM_TRANS_CMD_STOP_HELPER
3636 void socket_stop_helper (int client_id, uint32 context, String uuid) {
3637 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_stop_helper ()\n";
3638 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3640 uint32 ic = get_helper_ic (m_panel_client_map[client_id], context);
3642 if (it != m_helper_client_index.end ()) {
3643 SCIM_DEBUG_MAIN (5) << "Decrease the Reference count.\n";
3646 /* Get the context uuid from the client context registration table. */
3648 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3650 if (it != m_client_context_uuids.end ())
3651 ic_uuid = it->second;
3654 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3655 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3656 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3657 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3660 m_panel_agent_manager.helper_detach_input_context (it->second.id, ic, ic_uuid);
3662 if (it->second.ref <= 0)
3663 m_panel_agent_manager.exit (it->second.id, ic);
3668 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
3669 void socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans) {
3670 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_send_helper_event ()\n";
3671 HelperClientIndex::iterator it = m_helper_client_index.find (uuid);
3673 if (it != m_helper_client_index.end ()) {
3675 /* Get the context uuid from the client context registration table. */
3677 ClientContextUUIDRepository::iterator it = m_client_context_uuids.find (get_helper_ic (m_panel_client_map[client_id], context));
3679 if (it != m_client_context_uuids.end ())
3680 ic_uuid = it->second;
3683 if (m_current_socket_client == m_panel_client_map[client_id] && m_current_client_context == context) {
3684 if (!ic_uuid.length ()) ic_uuid = m_current_context_uuid;
3685 } else if (m_last_socket_client == m_panel_client_map[client_id] && m_last_client_context == context) {
3686 if (!ic_uuid.length ()) ic_uuid = m_last_context_uuid;
3689 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);
3693 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
3694 void socket_helper_register_properties (int client, PropertyList& properties) {
3695 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_properties (" << client << ")\n";
3696 m_signal_register_helper_properties (client, properties);
3698 #if 0 //why? remove if useless, infinite loop
3699 /* Check whether application is already focus_in */
3700 if (m_current_socket_client != -1) {
3701 SCIM_DEBUG_MAIN (2) << "Application is already focus_in!\n";
3702 focus_in_helper (m_current_helper_uuid, m_current_socket_client, m_current_client_context);
3703 reset_keyboard_ise ();
3706 /* Check whether ISE panel is already shown */
3707 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode && m_ise_context_length > 0) {
3708 SCIM_DEBUG_MAIN (2) << "Re-show ISE panel!\n";
3710 uint32 focused_context;
3711 get_focused_context (focused_client, focused_context);
3713 if (focused_client == -1 && m_active_client_id != -1) {
3714 focused_client = m_panel_client_map[m_active_client_id];
3715 focused_context = 0;
3718 uint32 ctx = get_helper_ic (focused_client, focused_context);
3719 bool ret = show_helper (m_current_helper_uuid, m_ise_context_buffer, m_ise_context_length, ctx);
3722 m_signal_show_ise ();
3726 //SCIM_TRANS_CMD_UPDATE_PROPERTY
3727 void socket_helper_update_property (int client, Property& property) {
3728 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_property (" << client << ")\n";
3729 m_signal_update_helper_property (client, property);
3731 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
3732 void socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans) {
3733 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_imengine_event (" << client << ")\n";
3734 HelperInfoRepository::iterator hiit = m_helper_active_info_repository.find (client);
3736 if (hiit != m_helper_active_info_repository.end ()) {
3738 uint32 target_context;
3739 get_imengine_client_context (target_ic, target_client, target_context);
3741 uint32 focused_context;
3742 String focused_uuid;
3743 focused_uuid = get_focused_context (focused_client, focused_context);
3745 if (target_ic == (uint32) (-1)) {
3746 target_client = focused_client;
3747 target_context = focused_context;
3750 if (target_uuid.length () == 0)
3751 target_uuid = focused_uuid;
3753 ClientInfo client_info = socket_get_client_info (target_client);
3754 SCIM_DEBUG_MAIN (5) << "Target UUID = " << target_uuid << " Focused UUId = " << focused_uuid << "\nTarget Client = " << target_client << "\n";
3756 if (client_info.type == FRONTEND_CLIENT) {
3757 /* If the original context value is greater than 0x7FFF, the line below would not work properly
3758 since the target_context acquired by get_imengine_client_context() is always smaller than 0x7FFF.
3759 But since the send_imengine_event() of scim_helper module will call IMEngine's
3760 process_helper_event() function directly, instead of sending SEND_IMENGINE_EVENT message.
3761 So we are not going to handle this kind of exceptional case for now. */
3762 m_panel_agent_manager.process_helper_event (target_client, target_context, target_uuid, hiit->second.uuid, nest_trans);
3767 void socket_helper_key_event_op (int client, int cmd, uint32 target_ic, String& target_uuid, KeyEvent& key) {
3768 if (!key.empty ()) {
3770 uint32 target_context;
3771 get_imengine_client_context (target_ic, target_client, target_context);
3773 uint32 focused_context;
3774 String focused_uuid;
3775 focused_uuid = get_focused_context (focused_client, focused_context);
3777 if (target_ic == (uint32) (-1)) {
3778 target_client = focused_client;
3779 target_context = focused_context;
3782 if (target_uuid.length () == 0)
3783 target_uuid = focused_uuid;
3785 if (target_client == -1) {
3786 /* FIXUP: monitor 'Invalid Window' error */
3787 LOGW ("focused target client is NULL");
3788 } else if (target_uuid == focused_uuid &&
3789 clients_equal (target_client, focused_client) &&
3790 contexts_equal (target_context, focused_context)) {
3791 ClientInfo client_info = socket_get_client_info (focused_client);
3793 if (client_info.type == FRONTEND_CLIENT) {
3794 m_panel_agent_manager.socket_helper_key_event (focused_client, focused_context, cmd, key);
3797 LOGD ("[target_client : %d, focused_client : %d] => %d, [target_context : %u, focused_context : %u] => %d",
3798 target_client, focused_client, clients_equal (target_client, focused_client),
3799 target_context, focused_context, contexts_equal (target_context, focused_context));
3803 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
3804 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
3805 void socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3806 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_send_key_event (" << client << ")\n";
3807 ISF_PROF_DEBUG ("first message")
3808 socket_helper_key_event_op (client, SCIM_TRANS_CMD_PROCESS_KEY_EVENT, target_ic, target_uuid, key);
3810 initialize_remote_input_vconf_key ();
3812 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
3813 void socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key) {
3814 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_forward_key_event (" << client << ")\n";
3815 socket_helper_key_event_op (client, SCIM_TRANS_CMD_FORWARD_KEY_EVENT, target_ic, target_uuid, key);
3817 initialize_remote_input_vconf_key ();
3820 //SCIM_TRANS_CMD_COMMIT_STRING
3821 void socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr) {
3822 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_commit_string (" << client << ")\n";
3824 if (wstr.length ()) {
3826 uint32 target_context;
3827 get_imengine_client_context (target_ic, target_client, target_context);
3829 uint32 focused_context;
3830 String focused_uuid;
3831 focused_uuid = get_focused_context (focused_client, focused_context);
3833 if (target_ic == (uint32) (-1)) {
3834 target_client = focused_client;
3835 target_context = focused_context;
3838 if (target_uuid.length () == 0)
3839 target_uuid = focused_uuid;
3841 if (target_uuid == focused_uuid &&
3842 clients_equal (target_client, focused_client) &&
3843 contexts_equal (target_context, focused_context)) {
3844 ClientInfo client_info = socket_get_client_info (focused_client);
3846 if (client_info.type == FRONTEND_CLIENT) {
3847 m_panel_agent_manager.commit_string (focused_client, focused_context, wstr);
3849 initialize_remote_input_vconf_key ();
3851 std::cerr << "target client is not existed!!!" << "\n";
3856 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
3857 void socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after) {
3858 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3860 uint32 focused_context;
3861 get_focused_context (focused_client, focused_context);
3862 ClientInfo client_info = socket_get_client_info (focused_client);
3864 /* If the get_surrounding_text was received when there is no client available,
3865 * return empty surrounding text since the sender would be waiting for reply */
3866 if (focused_client == -1) {
3867 socket_update_surrounding_text("", 0);
3869 if (client_info.type == FRONTEND_CLIENT) {
3870 m_panel_agent_manager.socket_helper_get_surrounding_text (focused_client, focused_context, maxlen_before, maxlen_after);
3874 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
3875 void socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len) {
3876 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3878 uint32 focused_context;
3879 get_focused_context (focused_client, focused_context);
3880 ClientInfo client_info = socket_get_client_info (focused_client);
3882 if (client_info.type == FRONTEND_CLIENT) {
3883 m_panel_agent_manager.socket_helper_delete_surrounding_text (focused_client, focused_context, offset, len);
3885 initialize_remote_input_vconf_key ();
3888 //SCIM_TRANS_CMD_GET_SELECTION
3889 void socket_helper_get_selection (int client, String uuid) {
3890 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3892 uint32 focused_context;
3893 get_focused_context (focused_client, focused_context);
3894 ClientInfo client_info = socket_get_client_info (focused_client);
3896 if (client_info.type == FRONTEND_CLIENT) {
3897 m_panel_agent_manager.socket_helper_get_selection (focused_client, focused_context);
3900 //SCIM_TRANS_CMD_SET_SELECTION
3901 void socket_helper_set_selection (int client, uint32 start, uint32 end) {
3902 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
3904 uint32 focused_context;
3905 get_focused_context (focused_client, focused_context);
3906 ClientInfo client_info = socket_get_client_info (focused_client);
3908 if (client_info.type == FRONTEND_CLIENT) {
3909 m_panel_agent_manager.socket_helper_set_selection (focused_client, focused_context, start, end);
3913 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
3914 void socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid) {
3915 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_show_preedit_string (" << client << ")\n";
3917 uint32 target_context;
3918 get_imengine_client_context (target_ic, target_client, target_context);
3920 uint32 focused_context;
3921 String focused_uuid = get_focused_context (focused_client, focused_context);
3923 if (target_ic == (uint32) (-1)) {
3924 target_client = focused_client;
3925 target_context = focused_context;
3928 if (target_uuid.length () == 0)
3929 target_uuid = focused_uuid;
3931 if (target_uuid == focused_uuid &&
3932 clients_equal (target_client, focused_client) &&
3933 contexts_equal (target_context, focused_context)) {
3934 ClientInfo client_info = socket_get_client_info (focused_client);
3936 if (client_info.type == FRONTEND_CLIENT) {
3937 m_panel_agent_manager.show_preedit_string (focused_client, focused_context);
3941 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
3942 void socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid) {
3943 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_hide_preedit_string (" << client << ")\n";
3945 uint32 target_context;
3946 get_imengine_client_context (target_ic, target_client, target_context);
3948 uint32 focused_context;
3949 String focused_uuid = get_focused_context (focused_client, focused_context);
3951 if (target_ic == (uint32) (-1)) {
3952 target_client = focused_client;
3953 target_context = focused_context;
3956 if (target_uuid.length () == 0)
3957 target_uuid = focused_uuid;
3959 if (target_uuid == focused_uuid &&
3960 clients_equal (target_client, focused_client) &&
3961 contexts_equal (target_context, focused_context)) {
3962 ClientInfo client_info = socket_get_client_info (focused_client);
3964 if (client_info.type == FRONTEND_CLIENT) {
3965 m_panel_agent_manager.hide_preedit_string (focused_client, focused_context);
3969 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
3970 void socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret) {
3971 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_preedit_string (" << client << ")\n";
3973 uint32 target_context;
3974 get_imengine_client_context (target_ic, target_client, target_context);
3976 uint32 focused_context;
3977 String focused_uuid;
3978 focused_uuid = get_focused_context (focused_client, focused_context);
3980 if (target_ic == (uint32) (-1)) {
3981 target_client = focused_client;
3982 target_context = focused_context;
3985 if (target_uuid.length () == 0)
3986 target_uuid = focused_uuid;
3988 if (target_uuid == focused_uuid &&
3989 clients_equal (target_client, focused_client) &&
3990 contexts_equal (target_context, focused_context)) {
3991 ClientInfo client_info = socket_get_client_info (focused_client);
3993 if (client_info.type == FRONTEND_CLIENT) {
3994 m_panel_agent_manager.update_preedit_string (focused_client, focused_context, preedit, commit, attrs, caret);
3996 initialize_remote_input_vconf_key ();
4000 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
4001 void socket_helper_update_preedit_caret (int client, uint32 caret) {
4002 SCIM_DEBUG_MAIN (4) << __func__ << " (" << client << ")\n";
4004 uint32 focused_context;
4005 String focused_uuid;
4006 focused_uuid = get_focused_context (focused_client, focused_context);
4007 ClientInfo client_info = socket_get_client_info (focused_client);
4009 if (client_info.type == FRONTEND_CLIENT) {
4010 m_panel_agent_manager.update_preedit_caret (focused_client, focused_context, caret);
4014 //ISM_TRANS_CMD_RECAPTURE_STRING
4015 void socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
4016 WideString commit, AttributeList& attrs) {
4017 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_recapture_string (" << client << ")\n";
4019 uint32 target_context;
4020 get_imengine_client_context (target_ic, target_client, target_context);
4022 uint32 focused_context;
4023 String focused_uuid;
4024 focused_uuid = get_focused_context (focused_client, focused_context);
4026 if (target_ic == (uint32) (-1)) {
4027 target_client = focused_client;
4028 target_context = focused_context;
4031 if (target_uuid.length () == 0)
4032 target_uuid = focused_uuid;
4034 if (target_uuid == focused_uuid &&
4035 clients_equal (target_client, focused_client) &&
4036 contexts_equal (target_context, focused_context)) {
4037 ClientInfo client_info = socket_get_client_info (focused_client);
4039 if (client_info.type == FRONTEND_CLIENT) {
4040 m_panel_agent_manager.recapture_string (focused_client, focused_context, offset, len, preedit, commit, attrs);
4042 initialize_remote_input_vconf_key ();
4047 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
4048 void socket_helper_register_helper (int client, HelperInfo& info) {
4049 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper (" << client << ")\n";
4050 bool result = false;
4057 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4058 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4062 info.option = option;
4064 if (info.uuid.length ()) {
4065 SCIM_DEBUG_MAIN (4) << "New Helper uuid=" << info.uuid << " name=" << info.name << "\n";
4066 HelperClientIndex::iterator it = m_helper_client_index.find (info.uuid);
4068 if (it == m_helper_client_index.end ()) {
4069 m_helper_info_repository [client] = info;
4070 m_helper_client_index [info.uuid] = HelperClientStub (client, 1);
4071 StartHelperICIndex::iterator icit = m_start_helper_ic_index.find (info.uuid);
4073 if (icit != m_start_helper_ic_index.end ()) {
4074 m_panel_agent_manager.helper_attach_input_context_and_update_screen (client, icit->second, m_current_screen);
4075 m_start_helper_ic_index.erase (icit);
4078 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4079 m_panel_agent_manager.send_fail_reply(client);
4082 LOGW ("Failed to register IME : %s", info.uuid.c_str ());
4083 m_panel_agent_manager.send_fail_reply(client);
4090 LOGD ("Succeed to register IME : %s", info.uuid.c_str ());
4091 m_signal_register_helper (client, info);
4095 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
4096 void socket_helper_register_helper_passive (int client, HelperInfo& info) {
4097 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_register_helper_passive (" << client << ")\n";
4104 if (!m_signal_get_ise_information (info.uuid, info.name, language, type, option, module_name)) {
4105 LOGW ("This helper (%s) is not IME", info.uuid.c_str ());
4109 info.option = option;
4111 if (info.uuid.length ()) {
4112 SCIM_DEBUG_MAIN (4) << "New Helper Passive uuid=" << info.uuid << " name=" << info.name << "\n";
4113 HelperInfoRepository::iterator it = m_helper_active_info_repository.find (client);
4115 if (it == m_helper_active_info_repository.end ()) {
4116 m_helper_active_info_repository[client] = info;
4119 StringIntRepository::iterator iter = m_ise_pending_repository.find (info.uuid);
4121 if (iter != m_ise_pending_repository.end ()) {
4122 m_ise_pending_repository.erase (iter);
4125 iter = m_ise_pending_repository.find (info.name);
4127 if (iter != m_ise_pending_repository.end ()) {
4128 m_ise_pending_repository.erase (iter);
4134 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
4135 void socket_helper_update_input_context (int client, uint32 type, uint32 value) {
4136 SCIM_DEBUG_MAIN (4) << "InfoManager::socket_helper_update_input_context (" << client << ")\n";
4137 m_signal_update_input_context ((int)type, (int)value);
4139 uint32 focused_context;
4140 get_focused_context (focused_client, focused_context);
4141 ClientInfo client_info = socket_get_client_info (focused_client);
4143 if (client_info.type == FRONTEND_CLIENT) {
4144 m_panel_agent_manager.update_ise_input_context (focused_client, focused_context, type, value);
4146 std::cerr << "focused client is not existed!!!" << "\n";
4149 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
4150 void socket_helper_update_language_locale(int client, String locale) {
4151 SCIM_DEBUG_MAIN(4) << "InfoManager::socket_helper_update_language_locale (" << client << ")\n";
4152 m_signal_update_language_locale(locale);
4155 uint32 focused_context;
4156 get_focused_context(focused_client, focused_context);
4157 ClientInfo client_info = socket_get_client_info(focused_client);
4159 if (client_info.type == FRONTEND_CLIENT) {
4160 m_panel_agent_manager.update_ise_language_locale(focused_client, focused_context, locale);
4162 std::cerr << "focused client is not existed!!!" << "\n";
4165 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
4166 void socket_helper_send_private_command (int client, String command) {
4167 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4169 uint32 focused_context;
4170 get_focused_context (focused_client, focused_context);
4171 ClientInfo client_info = socket_get_client_info (focused_client);
4173 if (client_info.type == FRONTEND_CLIENT) {
4174 m_panel_agent_manager.send_private_command (focused_client, focused_context, command);
4177 //SCIM_TRANS_CMD_COMMIT_CONTENT
4178 void socket_helper_commit_content (int client, String content, String description, String mime_types) {
4179 SCIM_DEBUG_MAIN (4) << __FUNCTION__ << " (" << client << ")\n";
4181 uint32 focused_context;
4182 get_focused_context (focused_client, focused_context);
4183 ClientInfo client_info = socket_get_client_info (focused_client);
4185 if (client_info.type == FRONTEND_CLIENT) {
4186 m_panel_agent_manager.commit_content (focused_client, focused_context, content, description, mime_types);
4189 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
4190 void UPDATE_ISE_EXIT (int client) {
4191 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4192 bool launch_ise_on_request = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST), false);
4193 if (launch_ise_on_request && !m_refocus_needed && !m_reshow_needed)
4194 m_restart_needed = false;
4197 void process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial) {
4199 uint32 focused_context;
4200 get_focused_context (focused_client, focused_context);
4201 ClientInfo client_info = socket_get_client_info (focused_client);
4203 if (client_info.type == FRONTEND_CLIENT) {
4204 m_panel_agent_manager.process_key_event_done (focused_client, focused_context, key, ret, serial);
4208 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
4209 void request_ise_hide () {
4211 uint32 focused_context;
4212 get_focused_context (focused_client, focused_context);
4213 ClientInfo client_info = socket_get_client_info (focused_client);
4215 if (client_info.type == FRONTEND_CLIENT) {
4216 m_panel_agent_manager.request_ise_hide (focused_client, focused_context);
4220 void socket_reset_helper_input_context (const String& uuid, int client, uint32 context) {
4221 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4223 if (it != m_helper_client_index.end ()) {
4224 uint32 ctx = get_helper_ic (client, context);
4225 m_panel_agent_manager.reset_helper_context (it->second.id, ctx, uuid);
4229 bool helper_select_aux (uint32 item) {
4230 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_aux \n";
4232 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4233 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4235 if (it != m_helper_client_index.end ()) {
4239 get_focused_context (client, context);
4240 ctx = get_helper_ic (client, context);
4241 m_panel_agent_manager.select_aux (it->second.id, ctx, item);
4249 bool helper_select_candidate (uint32 item) {
4250 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_candidate \n";
4252 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4253 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4255 if (it != m_helper_client_index.end ()) {
4259 get_focused_context (client, context);
4260 ctx = get_helper_ic (client, context);
4261 m_panel_agent_manager.select_candidate (it->second.id, ctx, item);
4269 bool helper_lookup_table_page_up (void) {
4270 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_up \n";
4272 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4273 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4275 if (it != m_helper_client_index.end ()) {
4279 get_focused_context (client, context);
4280 ctx = get_helper_ic (client, context);
4281 m_panel_agent_manager.lookup_table_page_up (it->second.id, ctx);
4289 bool helper_lookup_table_page_down (void) {
4290 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_lookup_table_page_down \n";
4292 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4293 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4295 if (it != m_helper_client_index.end ()) {
4299 get_focused_context (client, context);
4300 ctx = get_helper_ic (client, context);
4301 m_panel_agent_manager.lookup_table_page_down (it->second.id, ctx);
4309 bool helper_update_lookup_table_page_size (uint32 size) {
4310 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_lookup_table_page_size \n";
4312 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4313 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4315 if (it != m_helper_client_index.end ()) {
4319 get_focused_context (client, context);
4320 ctx = get_helper_ic (client, context);
4321 m_panel_agent_manager.update_lookup_table_page_size (it->second.id, ctx, size);
4329 bool helper_update_candidate_item_layout (const std::vector<uint32>& row_items) {
4330 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4332 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4333 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4335 if (it != m_helper_client_index.end ()) {
4339 get_focused_context (client, context);
4340 ctx = get_helper_ic (client, context);
4341 m_panel_agent_manager.update_candidate_item_layout (it->second.id, ctx, row_items);
4349 bool helper_select_associate (uint32 item) {
4350 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_select_associate \n";
4352 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4353 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4355 if (it != m_helper_client_index.end ()) {
4359 get_focused_context (client, context);
4360 ctx = get_helper_ic (client, context);
4361 m_panel_agent_manager.select_associate (it->second.id, ctx, item);
4369 bool helper_associate_table_page_up (void) {
4370 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_up \n";
4372 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4373 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4375 if (it != m_helper_client_index.end ()) {
4379 get_focused_context (client, context);
4380 ctx = get_helper_ic (client, context);
4381 m_panel_agent_manager.associate_table_page_up (it->second.id, ctx);
4389 bool helper_associate_table_page_down (void) {
4390 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_associate_table_page_down \n";
4392 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4393 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4395 if (it != m_helper_client_index.end ()) {
4399 get_focused_context (client, context);
4400 ctx = get_helper_ic (client, context);
4401 m_panel_agent_manager.associate_table_page_down (it->second.id, ctx);
4409 bool helper_update_associate_table_page_size (uint32 size) {
4410 SCIM_DEBUG_MAIN (4) << "InfoManager::helper_update_associate_table_page_size \n";
4412 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4413 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4415 if (it != m_helper_client_index.end ()) {
4419 get_focused_context (client, context);
4420 ctx = get_helper_ic (client, context);
4421 m_panel_agent_manager.update_associate_table_page_size (it->second.id, ctx, size);
4429 bool helper_update_displayed_candidate_number (uint32 size) {
4430 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4432 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4433 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4435 if (it != m_helper_client_index.end ()) {
4439 get_focused_context (client, context);
4440 ctx = get_helper_ic (client, context);
4441 m_panel_agent_manager.update_displayed_candidate_number (it->second.id, ctx, size);
4449 bool helper_longpress_candidate (uint32 index) {
4450 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4452 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
4453 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4455 if (it != m_helper_client_index.end ()) {
4459 get_focused_context (client, context);
4460 ctx = get_helper_ic (client, context);
4461 m_panel_agent_manager.send_longpress_event (it->second.id, ctx, index);
4466 std::cerr << __func__ << " is failed!!!\n";
4470 void helper_all_update_spot_location (int x, int y) {
4471 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_spot_location (" << x << "," << y << ")\n";
4472 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4475 String uuid = get_focused_context (client, context);
4477 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4478 if (hiit->second.option & SCIM_HELPER_NEED_SPOT_LOCATION_INFO) {
4479 m_panel_agent_manager.helper_all_update_spot_location (hiit->first, get_helper_ic (client, context), uuid, x, y);
4484 void helper_all_update_cursor_position (int cursor_pos) {
4485 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_cursor_position (" << cursor_pos << ")\n";
4486 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4489 String uuid = get_focused_context (client, context);
4491 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4492 m_panel_agent_manager.helper_all_update_cursor_position (hiit->first, get_helper_ic (client, context), uuid, cursor_pos);
4496 void helper_all_update_screen (int screen) {
4497 SCIM_DEBUG_MAIN (5) << "InfoManager::helper_all_update_screen (" << screen << ")\n";
4498 HelperInfoRepository::iterator hiit = m_helper_info_repository.begin ();
4502 uuid = get_focused_context (client, context);
4504 for (; hiit != m_helper_info_repository.end (); ++ hiit) {
4505 if (hiit->second.option & SCIM_HELPER_NEED_SCREEN_INFO) {
4506 m_panel_agent_manager.helper_all_update_screen (hiit->first, get_helper_ic (client, context), uuid, screen);
4511 bool set_autocapital_type (int mode) {
4512 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4513 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4514 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4515 iseContext->autocapital_type = static_cast<Ecore_IMF_Autocapital_Type>(mode);
4517 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4518 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4520 if (it != m_helper_client_index.end ()) {
4524 get_focused_context (client, context);
4525 ctx = get_helper_ic (client, context);
4526 m_panel_agent_manager.set_autocapital_type (it->second.id, ctx, m_current_helper_uuid, mode);
4531 std::cerr << __func__ << " is failed!!!\n";
4535 bool set_prediction_allow (int client, int mode) {
4536 SCIM_DEBUG_MAIN (4) << __func__ << "\n";
4537 if (m_ise_context_buffer != NULL && m_ise_context_length > 0) {
4538 Ise_Context *iseContext = reinterpret_cast<Ise_Context *>(m_ise_context_buffer);
4539 iseContext->prediction_allow = static_cast<Eina_Bool>(mode);
4541 if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || (m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
4542 HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
4544 if (it != m_helper_client_index.end ()) {
4546 uint32 focused_context;
4548 get_focused_context (focused_client, focused_context);
4549 ctx = get_helper_ic (focused_client, focused_context);
4550 m_panel_agent_manager.set_prediction_allow (it->second.id, ctx, m_current_helper_uuid, mode);
4555 std::cerr << __func__ << " is failed!!!\n";
4559 const String& get_focused_context (int& client, uint32& context, bool force_last_context = false) const {
4560 if (m_current_socket_client >= 0) {
4561 client = m_current_socket_client;
4562 context = m_current_client_context;
4563 return m_current_context_uuid;
4565 client = m_last_socket_client;
4566 context = m_last_client_context;
4567 return m_last_context_uuid;
4572 void socket_transaction_start (void) {
4573 m_signal_transaction_start ();
4576 void socket_transaction_end (void) {
4577 m_signal_transaction_end ();
4583 void unlock (void) {
4588 InfoManager::InfoManager ()
4589 : m_impl (new InfoManagerImpl ())
4593 InfoManager::~InfoManager ()
4599 InfoManager::initialize (InfoManager* info_manager, const ConfigPointer& config, const String& display, bool resident)
4601 return m_impl->initialize (info_manager, config, display, resident);
4605 InfoManager::valid (void) const
4607 return m_impl->valid ();
4611 InfoManager::stop (void)
4618 InfoManager::socket_get_client_info (int client) const
4620 return m_impl->socket_get_client_info (client);
4623 void InfoManager::hide_helper (const String& uuid)
4625 m_impl->hide_helper (uuid);
4628 InfoManager::get_current_toolbar_mode () const
4630 return m_impl->get_current_toolbar_mode ();
4634 InfoManager::get_current_ise_geometry (rectinfo& rect)
4636 m_impl->get_current_ise_geometry (rect);
4640 InfoManager::get_current_helper_uuid () const
4642 return m_impl->get_current_helper_uuid ();
4646 InfoManager::get_current_ise_name () const
4648 return m_impl->get_current_ise_name ();
4652 InfoManager::set_current_toolbar_mode (TOOLBAR_MODE_T mode)
4654 m_impl->set_current_toolbar_mode (mode);
4658 InfoManager::set_current_ise_name (String& name)
4660 m_impl->set_current_ise_name (name);
4664 InfoManager::set_current_helper_option (uint32 option)
4666 m_impl->set_current_helper_option (option);
4670 InfoManager::update_candidate_panel_event (uint32 nType, uint32 nValue)
4672 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISF_CANDIDATE_PANEL, nType, nValue);
4676 InfoManager::update_input_panel_event (uint32 nType, uint32 nValue)
4678 m_impl->update_panel_event (ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT, nType, nValue);
4682 InfoManager::move_preedit_caret (uint32 position)
4684 return m_impl->move_preedit_caret (position);
4690 InfoManager::request_help (void)
4692 return m_impl->request_help ();
4696 InfoManager::request_factory_menu (void)
4698 return m_impl->request_factory_menu ();
4703 InfoManager::change_factory (const String& uuid)
4705 return m_impl->change_factory (uuid);
4709 InfoManager::helper_candidate_show (void)
4711 return m_impl->helper_candidate_show ();
4715 InfoManager::helper_candidate_hide (void)
4717 return m_impl->helper_candidate_hide ();
4721 InfoManager::candidate_more_window_show (void)
4723 return m_impl->candidate_more_window_show ();
4727 InfoManager::candidate_more_window_hide (void)
4729 return m_impl->candidate_more_window_hide ();
4733 InfoManager::update_helper_lookup_table (const LookupTable& table)
4735 return m_impl->update_helper_lookup_table (table);
4739 InfoManager::select_aux (uint32 item)
4741 return m_impl->select_aux (item);
4745 InfoManager::select_candidate (uint32 item)
4747 return m_impl->select_candidate (item);
4751 InfoManager::lookup_table_page_up (void)
4753 return m_impl->lookup_table_page_up ();
4757 InfoManager::lookup_table_page_down (void)
4759 return m_impl->lookup_table_page_down ();
4763 InfoManager::update_lookup_table_page_size (uint32 size)
4765 return m_impl->update_lookup_table_page_size (size);
4769 InfoManager::update_candidate_item_layout (const std::vector<uint32>& row_items)
4771 return m_impl->update_candidate_item_layout (row_items);
4775 InfoManager::select_associate (uint32 item)
4777 return m_impl->select_associate (item);
4781 InfoManager::associate_table_page_up (void)
4783 return m_impl->associate_table_page_up ();
4787 InfoManager::associate_table_page_down (void)
4789 return m_impl->associate_table_page_down ();
4793 InfoManager::update_associate_table_page_size (uint32 size)
4795 return m_impl->update_associate_table_page_size (size);
4799 InfoManager::update_displayed_candidate_number (uint32 size)
4801 return m_impl->update_displayed_candidate_number (size);
4805 InfoManager::send_longpress_event (int type, int index)
4807 m_impl->send_longpress_event (type, index);
4811 InfoManager::trigger_property (const String& property)
4813 return m_impl->trigger_property (property);
4817 InfoManager::start_helper (const String& uuid)
4819 return m_impl->start_helper (uuid, -2, 0);
4823 InfoManager::stop_helper (const String& uuid)
4825 return m_impl->stop_helper (uuid, -2, 0);
4829 InfoManager::set_default_ise (const DEFAULT_ISE_T& ise)
4831 m_impl->set_default_ise (ise);
4835 InfoManager::set_should_shared_ise (const bool should_shared_ise)
4837 m_impl->set_should_shared_ise (should_shared_ise);
4841 //InfoManager::reload_config (void)
4843 // m_impl->reload_config ();
4847 InfoManager::exit (void)
4849 return m_impl->exit ();
4852 InfoManager::update_ise_list (std::vector<String>& strList)
4854 m_impl->update_ise_list (strList);
4858 InfoManager::remoteinput_update_preedit_string (WideString str, AttributeList &attrs, uint32 caret)
4860 return m_impl->remoteinput_update_preedit_string (str, attrs, caret);
4864 InfoManager::remoteinput_commit_string (const WideString &str)
4866 return m_impl->remoteinput_commit_string (str);
4870 InfoManager::remoteinput_send_key_event (const KeyEvent &key)
4872 return m_impl->remoteinput_send_key_event (key);
4876 InfoManager::remoteinput_forward_key_event (const KeyEvent &key)
4878 return m_impl->remoteinput_forward_key_event (key);
4882 InfoManager::remoteinput_delete_surrounding_text (uint32 offset, uint32 len)
4884 return m_impl->remoteinput_delete_surrounding_text (offset, len);
4888 InfoManager::remoteinput_set_cursor_position (uint32 cursor)
4890 return m_impl->remoteinput_set_cursor_position (cursor);
4893 /////////////////////////////////Message function begin/////////////////////////////////////////
4895 //ISM_TRANS_CMD_PANEL_RESET_KEYBOARD_ISE
4896 bool InfoManager:: reset_keyboard_ise (void)
4898 return m_impl->reset_keyboard_ise ();
4901 //ISM_TRANS_CMD_SHOW_ISF_CONTROL
4902 void InfoManager::show_isf_panel (int client_id)
4904 m_impl->show_isf_panel (client_id);
4907 //ISM_TRANS_CMD_HIDE_ISF_CONTROL
4908 void InfoManager::hide_isf_panel (int client_id)
4910 m_impl->hide_isf_panel (client_id);
4913 //ISM_TRANS_CMD_SHOW_ISE_PANEL
4914 void InfoManager::show_ise_panel (int client_id, uint32 client, uint32 context, char* data, size_t len)
4916 m_impl->show_ise_panel (client_id, client, context, data, len);
4919 //ISM_TRANS_CMD_HIDE_ISE_PANEL
4920 void InfoManager::hide_ise_panel (int client_id, uint32 client, uint32 context)
4922 m_impl->hide_ise_panel (client_id, client, context);
4925 //ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
4926 void InfoManager::hide_helper_ise (void)
4928 m_impl->hide_helper_ise ();
4931 //ISM_TRANS_CMD_LAUNCH_ISE from ISF control
4932 void InfoManager::prelaunch_helper_ise (void)
4934 m_impl->prelaunch_helper_ise ();
4937 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
4938 bool InfoManager::process_key_event (KeyEvent& key, uint32 serial, uint32 keycode)
4940 return m_impl->process_key_event (key, serial, keycode);
4943 //ISM_TRANS_CMD_GET_ACTIVE_ISE_GEOMETRY
4944 void InfoManager::get_input_panel_geometry (int client_id, _OUT_ struct rectinfo& info)
4946 m_impl->get_input_panel_geometry (client_id, info);
4949 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
4950 void InfoManager::get_candidate_window_geometry (int client_id, _OUT_ struct rectinfo& info)
4952 m_impl->get_candidate_window_geometry (client_id, info);
4955 //ISM_TRANS_CMD_GET_ISE_LANGUAGE_LOCALE
4956 void InfoManager::get_ise_language_locale (int client_id, _OUT_ char** data, _OUT_ size_t& len)
4958 m_impl->get_ise_language_locale (client_id, data, len);
4961 //ISM_TRANS_CMD_SET_LAYOUT
4962 void InfoManager::set_ise_layout (int client_id, uint32 layout)
4964 m_impl->set_ise_layout (client_id, layout);
4967 //ISM_TRANS_CMD_SET_INPUT_MODE
4968 void InfoManager::set_ise_input_mode (int client_id, uint32 input_mode)
4970 m_impl->set_ise_input_mode (client_id, input_mode);
4973 //ISM_TRANS_CMD_SET_INPUT_HINT
4974 void InfoManager::set_ise_input_hint (int client_id, uint32 input_hint)
4976 m_impl->set_ise_input_hint (client_id, input_hint);
4979 //ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION
4980 void InfoManager::update_ise_bidi_direction (int client_id, uint32 bidi_direction)
4982 m_impl->update_ise_bidi_direction (client_id, bidi_direction);
4986 //ISM_TRANS_CMD_SET_ISE_LANGUAGE
4987 void InfoManager::set_ise_language (int client_id, uint32 language)
4989 m_impl->set_ise_language (client_id, language);
4992 //ISM_TRANS_CMD_SET_ISE_IMDATA
4993 void InfoManager::set_ise_imdata (int client_id, const char* imdata, size_t len)
4995 m_impl->set_ise_imdata (client_id, imdata, len);
4998 //ISM_TRANS_CMD_GET_ISE_IMDATA
4999 bool InfoManager:: get_ise_imdata (int client_id, _OUT_ char** imdata, _OUT_ size_t& len)
5001 return m_impl->get_ise_imdata (client_id, imdata, len);
5004 //ISM_TRANS_CMD_GET_LAYOUT
5005 bool InfoManager:: get_ise_layout (int client_id, _OUT_ uint32& layout)
5007 return m_impl->get_ise_layout (client_id, layout);
5010 //ISM_TRANS_CMD_GET_ISE_STATE
5011 void InfoManager::get_ise_state (int client_id, _OUT_ int& state)
5013 m_impl->get_ise_state (client_id, state);
5016 //ISM_TRANS_CMD_GET_ACTIVE_ISE
5017 void InfoManager::get_active_ise (int client_id, _OUT_ String& default_uuid)
5019 m_impl->get_active_ise (client_id, default_uuid);
5022 //ISM_TRANS_CMD_GET_ISE_LIST
5023 void InfoManager::get_ise_list (int client_id, _OUT_ std::vector<String>& strlist)
5025 m_impl->get_ise_list (client_id, strlist);
5028 //ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO
5029 void InfoManager::get_all_helper_ise_info (int client_id, _OUT_ HELPER_ISE_INFO& info)
5031 m_impl->get_all_helper_ise_info (client_id, info);
5034 //ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO
5035 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5036 void InfoManager::set_enable_helper_ise_info (int client_id, String appid, uint32 is_enabled)
5038 m_impl->set_enable_helper_ise_info (client_id, appid, is_enabled);
5041 //ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST
5042 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5043 void InfoManager::show_helper_ise_list (int client_id)
5045 m_impl->show_helper_ise_list (client_id);
5048 //ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR
5049 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5050 void InfoManager::show_helper_ise_selector (int client_id)
5052 m_impl->show_helper_ise_selector (client_id);
5055 //ISM_TRANS_CMD_IS_HELPER_ISE_ENABLED
5057 void InfoManager::is_helper_ise_enabled (int client_id, String strAppid, _OUT_ uint32& nEnabled)
5059 m_impl->is_helper_ise_enabled (client_id, strAppid, nEnabled);
5062 //ISM_TRANS_CMD_GET_ISE_INFORMATION
5063 void InfoManager::get_ise_information (int client_id, String strUuid, _OUT_ String& strName, _OUT_ String& strLanguage,
5064 _OUT_ int& nType, _OUT_ int& nOption, _OUT_ String& strModuleName)
5066 m_impl->get_ise_information (client_id, strUuid, strName, strLanguage, nType, nOption, strModuleName);
5069 //ISM_TRANS_CMD_RESET_ISE_OPTION
5070 //reply SCIM_TRANS_CMD_OK
5071 bool InfoManager:: reset_ise_option (int client_id)
5073 return m_impl->reset_ise_option (client_id);
5076 //ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID
5078 bool InfoManager:: set_active_ise_by_uuid (int client_id, char* buf, size_t len)
5080 return m_impl->set_active_ise_by_uuid (client_id, buf, len);
5083 //ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID
5084 //reply SCIM_TRANS_CMD_FAIL or SCIM_TRANS_CMD_OK
5085 void InfoManager::set_initial_ise_by_uuid (int client_id, char* buf, size_t len)
5087 m_impl->set_initial_ise_by_uuid (client_id, buf, len);
5090 //ISM_TRANS_CMD_SET_RETURN_KEY_TYPE
5091 void InfoManager::set_ise_return_key_type (int client_id, uint32 type)
5093 m_impl->set_ise_return_key_type (client_id, type);
5096 //ISM_TRANS_CMD_GET_RETURN_KEY_TYPE
5098 bool InfoManager:: get_ise_return_key_type (int client_id, _OUT_ uint32& type)
5100 return m_impl->get_ise_return_key_type (client_id, type);
5104 //ISM_TRANS_CMD_SET_RETURN_KEY_DISABLE
5105 void InfoManager::set_ise_return_key_disable (int client_id, uint32 disabled)
5107 m_impl->set_ise_return_key_disable (client_id, disabled);
5110 //ISM_TRANS_CMD_GET_RETURN_KEY_DISABLE
5111 bool InfoManager::get_ise_return_key_disable (int client_id, _OUT_ uint32& disabled)
5113 return m_impl->get_ise_return_key_disable (client_id, disabled);
5116 //ISM_TRANS_CMD_SET_CAPS_MODE
5117 void InfoManager::set_ise_caps_mode (int client_id, uint32 mode)
5119 m_impl->set_ise_caps_mode (client_id, mode);
5122 //SCIM_TRANS_CMD_RELOAD_CONFIG
5123 void InfoManager::reload_config (void)
5125 m_impl->reload_config ();
5128 //ISM_TRANS_CMD_SEND_WILL_SHOW_ACK
5129 void InfoManager::will_show_ack (int client_id)
5131 m_impl->will_show_ack (client_id);
5134 //ISM_TRANS_CMD_SEND_WILL_HIDE_ACK
5135 void InfoManager::will_hide_ack (int client_id)
5137 m_impl->will_hide_ack (client_id);
5140 //ISM_TRANS_CMD_RESET_DEFAULT_ISE
5141 void InfoManager::reset_default_ise (int client_id)
5143 m_impl->reset_default_ise (client_id);
5146 //ISM_TRANS_CMD_SET_HARDWARE_KEYBOARD_MODE
5147 void InfoManager::set_keyboard_mode (int client_id, uint32 mode)
5149 m_impl->set_keyboard_mode (client_id, mode);
5152 //ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK
5153 void InfoManager::candidate_will_hide_ack (int client_id)
5155 m_impl->candidate_will_hide_ack (client_id);
5158 //ISM_TRANS_CMD_GET_ACTIVE_HELPER_OPTION
5159 void InfoManager::get_active_helper_option (int client_id, _OUT_ uint32& option)
5161 m_impl->get_active_helper_option (client_id, option);
5164 //ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
5165 void InfoManager::show_ise_option_window (int client_id, int caller_pid)
5167 m_impl->show_ise_option_window (client_id, caller_pid);
5170 //ISM_TRANS_CMD_GET_ISE_SETTING_APPID
5171 void InfoManager::get_ise_setting_appid (int client_id, String &ime_setting_appid)
5173 m_impl->get_ise_setting_appid (client_id, ime_setting_appid);
5176 //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
5177 void InfoManager::resume_ise_option_window (int client_id)
5179 m_impl->resume_ise_option_window (client_id);
5182 //ISM_TRANS_CMD_SET_KEYBOARD_MODE
5183 void InfoManager::set_ise_keyboard_mode (int client_id, uint32 mode)
5185 m_impl->set_ise_keyboard_mode (client_id, mode);
5188 //ISM_TRANS_CMD_SET_PREDICTION_HINT
5189 void InfoManager::set_prediction_hint (int client_id, String prediction_hint)
5191 m_impl->set_prediction_hint (client_id, prediction_hint);
5194 //ISM_TRANS_CMD_SET_MIME_TYPE
5195 void InfoManager::set_ise_mime_type (int client_id, String mime_type)
5197 m_impl->set_ise_mime_type (client_id, mime_type);
5200 //ISM_TRANS_CMD_FINALIZE_CONTENT
5201 void InfoManager::finalize_content (int client_id, String text, uint32 cursor_pos)
5203 m_impl->finalize_content (client_id, text, cursor_pos);
5206 //ISM_TRANS_CMD_SET_PREDICTION_HINT_DATA
5207 void InfoManager::set_prediction_hint_data (int client_id, String key, String value)
5209 m_impl->set_prediction_hint_data (client_id, key, value);
5212 //ISM_TRANS_CMD_SET_OPTIMIZATION_HINT
5213 void InfoManager::set_optimization_hint(int client_id, uint32 hint)
5215 m_impl->set_optimization_hint(client_id, hint);
5218 //ISM_TRANS_CMD_SET_ISE_ENABLE
5219 void InfoManager::set_ise_enable (int client_id, uint32 enabled)
5221 m_impl->set_ise_enable (client_id, enabled);
5224 //ISM_TRANS_CMD_SET_POSITION_ALIGN
5225 void InfoManager::set_input_panel_position_align (int client_id, uint32 x, uint32 y, uint32 align)
5227 m_impl->set_input_panel_position_align (client_id, x, y, align);
5230 //ISM_TRANS_CMD_EXPAND_CANDIDATE
5231 void InfoManager::expand_candidate ()
5233 m_impl->expand_candidate ();
5236 //ISM_TRANS_CMD_CONTRACT_CANDIDATE
5237 void InfoManager::contract_candidate ()
5239 m_impl->contract_candidate ();
5242 //ISM_TRANS_CMD_GET_RECENT_ISE_GEOMETRY
5243 void InfoManager::get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ struct rectinfo& info)
5245 m_impl->get_recent_ise_geometry (client_id, angle, info);
5248 //ISM_TRANS_CMD_SEND_REMOTE_INPUT_MESSAGE
5249 bool InfoManager::remoteinput_send_input_message (int client_id, char* buf, size_t len)
5251 return m_impl->send_remote_input_message (client_id, buf, len);
5254 void InfoManager::remoteinput_send_surrounding_text (const char* text, uint32 cursor)
5256 return m_impl->send_remote_surrounding_text (text, cursor);
5259 //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT
5260 void InfoManager::register_panel_client (uint32 client_id, uint32 id)
5262 m_impl->register_panel_client (client_id, id);
5265 //SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT
5266 void InfoManager::register_input_context (uint32 client_id, uint32 context, String uuid)
5268 m_impl->register_input_context (client_id, context, uuid);
5271 //SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT
5272 void InfoManager::remove_input_context (uint32 client_id, uint32 context)
5274 m_impl->remove_input_context (client_id, context);
5277 //SCIM_TRANS_CMD_PANEL_RESET_INPUT_CONTEXT
5278 void InfoManager::socket_reset_input_context (int client_id, uint32 context)
5280 m_impl->socket_reset_input_context (client_id, context);
5283 //SCIM_TRANS_CMD_FOCUS_IN
5284 void InfoManager::focus_in (int client_id, uint32 context, String uuid)
5286 m_impl->focus_in (client_id, context, uuid);
5289 //SCIM_TRANS_CMD_FOCUS_OUT
5290 void InfoManager::focus_out (int client_id, uint32 context)
5292 m_impl->focus_out (client_id, context);
5295 //ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT
5296 bool InfoManager::process_input_device_event(int client, uint32 type, const char *data, size_t len, _OUT_ uint32& result)
5298 return m_impl->process_input_device_event(client, type, data, len, result);
5301 //ISM_TRANS_CMD_TURN_ON_LOG
5302 void InfoManager::socket_turn_on_log (uint32 isOn)
5304 m_impl->socket_turn_on_log (isOn);
5307 //SCIM_TRANS_CMD_PANEL_TURN_ON
5308 void InfoManager::socket_turn_on (void)
5310 m_impl->socket_turn_on ();
5313 //SCIM_TRANS_CMD_PANEL_TURN_OFF
5314 void InfoManager::socket_turn_off (void)
5316 m_impl->socket_turn_off ();
5319 //SCIM_TRANS_CMD_UPDATE_SCREEN
5320 void InfoManager::socket_update_screen (int client_id, uint32 num)
5322 m_impl->socket_update_screen (client_id, num);
5325 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
5326 void InfoManager::socket_update_spot_location (uint32 x, uint32 y, uint32 top_y)
5328 m_impl->socket_update_spot_location (x, y, top_y);
5331 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
5332 void InfoManager::socket_update_cursor_position (uint32 cursor_pos)
5334 m_impl->socket_update_cursor_position (cursor_pos);
5337 //ISM_TRANS_CMD_UPDATE_SURROUNDING_TEXT
5338 void InfoManager::socket_update_surrounding_text (String text, uint32 cursor)
5340 m_impl->socket_update_surrounding_text (text, cursor);
5343 void InfoManager::remoteinput_callback_focus_in (void)
5345 m_impl->remoteinput_callback_focus_in ();
5348 void InfoManager::remoteinput_callback_focus_out (void)
5350 m_impl->remoteinput_callback_focus_out ();
5353 void InfoManager::remoteinput_callback_entry_metadata (uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type)
5355 m_impl->remoteinput_callback_entry_metadata (hint, layout, variation, autocapital_type, return_key_disabled, return_key_type);
5358 void InfoManager::remoteinput_callback_surrounding_text (String text, uint32 cursor)
5360 m_impl->remoteinput_callback_surrounding_text (text, cursor);
5363 void InfoManager::remoteinput_callback_input_resource (uint32 input_resource)
5365 m_impl->remoteinput_callback_input_resource (input_resource);
5368 void InfoManager::remoteinput_callback_key_symbol (String key_symbol, bool press, uint32 timestamp)
5370 m_impl->remoteinput_callback_key_symbol (key_symbol, press, timestamp);
5373 void InfoManager::remoteinput_callback_cursor_position (uint32 cursor)
5375 m_impl->remoteinput_callback_cursor_position (cursor);
5378 //ISM_TRANS_CMD_UPDATE_SELECTION
5379 void InfoManager::socket_update_selection (String text)
5381 m_impl->socket_update_selection (text);
5384 //FIXME: useless anymore
5385 //SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO
5386 void InfoManager::socket_update_factory_info (PanelFactoryInfo& info)
5388 m_impl->socket_update_factory_info (info);
5391 //SCIM_TRANS_CMD_PANEL_SHOW_HELP
5392 void InfoManager::socket_show_help (String help)
5394 m_impl->socket_show_help (help);
5397 //SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU
5398 void InfoManager::socket_show_factory_menu (std::vector <PanelFactoryInfo>& vec)
5400 m_impl->socket_show_factory_menu (vec);
5403 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5404 void InfoManager::socket_show_preedit_string (void)
5406 m_impl->socket_show_preedit_string ();
5409 //SCIM_TRANS_CMD_SHOW_AUX_STRING
5410 void InfoManager::socket_show_aux_string (void)
5412 m_impl->socket_show_aux_string ();
5415 //SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE
5416 void InfoManager::socket_show_lookup_table (void)
5418 m_impl->socket_show_lookup_table ();
5421 //ISM_TRANS_CMD_SHOW_ASSOCIATE_TABLE
5422 void InfoManager::socket_show_associate_table (void)
5424 m_impl->socket_show_associate_table ();
5427 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5428 void InfoManager::socket_hide_preedit_string (void)
5430 m_impl->socket_hide_preedit_string ();
5433 //SCIM_TRANS_CMD_HIDE_AUX_STRING
5434 void InfoManager::socket_hide_aux_string (void)
5436 m_impl->socket_hide_aux_string ();
5439 //SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE
5440 void InfoManager::socket_hide_lookup_table (void)
5442 m_impl->socket_hide_lookup_table ();
5445 //ISM_TRANS_CMD_HIDE_ASSOCIATE_TABLE
5446 void InfoManager::socket_hide_associate_table (void)
5448 m_impl->socket_hide_associate_table ();
5451 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5452 void InfoManager::socket_update_preedit_string (String& str, const AttributeList& attrs, uint32 caret)
5454 m_impl->socket_update_preedit_string (str, attrs, caret);
5457 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5458 void InfoManager::socket_update_preedit_caret (uint32 caret)
5460 m_impl->socket_update_preedit_caret (caret);
5463 //ISM_TRANS_CMD_RECAPTURE_STRING
5464 void InfoManager::socket_recapture_string (int offset, int len, String& preedit, String& commit, const AttributeList& attrs)
5466 m_impl->socket_recapture_string (offset, len, preedit, commit, attrs);
5469 //SCIM_TRANS_CMD_UPDATE_AUX_STRING
5470 void InfoManager::socket_update_aux_string (String& str, const AttributeList& attrs)
5472 m_impl->socket_update_aux_string (str, attrs);
5475 //SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE
5476 void InfoManager::socket_update_lookup_table (const LookupTable& table)
5478 m_impl->socket_update_lookup_table (table);
5481 //ISM_TRANS_CMD_UPDATE_ASSOCIATE_TABLE
5482 void InfoManager::socket_update_associate_table (const LookupTable& table)
5484 m_impl->socket_update_associate_table (table);
5487 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5488 void InfoManager::socket_register_properties (const PropertyList& properties)
5490 m_impl->socket_register_properties (properties);
5493 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5494 void InfoManager::socket_update_property (const Property& property)
5496 m_impl->socket_update_property (property);
5499 //ISM_TRANS_CMD_GET_KEYBOARD_ISE_LIST
5500 void InfoManager::socket_get_keyboard_ise_list (String& uuid)
5502 m_impl->socket_get_keyboard_ise_list (uuid);
5505 //ISM_TRANS_CMD_SET_CANDIDATE_UI
5506 void InfoManager::socket_set_candidate_ui (uint32 portrait_line, uint32 mode)
5508 m_impl->socket_set_candidate_ui (portrait_line, mode);
5511 //ISM_TRANS_CMD_GET_CANDIDATE_UI
5512 void InfoManager::socket_get_candidate_ui (String uuid)
5514 m_impl->socket_get_candidate_ui (uuid);
5517 //ISM_TRANS_CMD_SET_CANDIDATE_POSITION
5518 void InfoManager::socket_set_candidate_position (uint32 left, uint32 top)
5520 m_impl->socket_set_candidate_position (left, top);
5523 //ISM_TRANS_CMD_HIDE_CANDIDATE
5524 void InfoManager::socket_hide_candidate (void)
5526 m_impl->socket_hide_candidate ();
5529 //ISM_TRANS_CMD_GET_CANDIDATE_GEOMETRY
5530 void InfoManager::socket_get_candidate_geometry (String& uuid)
5532 m_impl->socket_get_candidate_geometry (uuid);
5535 //ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID
5536 void InfoManager::socket_set_keyboard_ise (String uuid)
5538 m_impl->socket_set_keyboard_ise (uuid);
5541 //ISM_TRANS_CMD_SELECT_CANDIDATE
5542 void InfoManager::socket_helper_select_candidate (uint32 index)
5544 m_impl->socket_helper_select_candidate (index);
5547 //ISM_TRANS_CMD_UPDATE_ISE_GEOMETRY
5548 void InfoManager::socket_helper_update_ise_geometry (int client, uint32 x, uint32 y, uint32 width, uint32 height)
5550 m_impl->socket_helper_update_ise_geometry (client, x, y, width, height);
5553 //ISM_TRANS_CMD_GET_KEYBOARD_ISE
5554 void InfoManager::socket_get_keyboard_ise (String uuid)
5556 m_impl->socket_get_keyboard_ise (uuid);
5559 //SCIM_TRANS_CMD_START_HELPER
5560 void InfoManager::socket_start_helper (int client_id, uint32 context, String uuid)
5562 m_impl->socket_start_helper (client_id, context, uuid);
5565 //SCIM_TRANS_CMD_STOP_HELPER
5566 void InfoManager::socket_stop_helper (int client_id, uint32 context, String uuid)
5568 m_impl->socket_stop_helper (client_id, context, uuid);
5571 //SCIM_TRANS_CMD_SEND_HELPER_EVENT
5572 void InfoManager::socket_send_helper_event (int client_id, uint32 context, String uuid, const Transaction& _nest_trans)
5574 m_impl->socket_send_helper_event (client_id, context, uuid, _nest_trans);
5577 //SCIM_TRANS_CMD_REGISTER_PROPERTIES
5578 void InfoManager::socket_helper_register_properties (int client, PropertyList& properties)
5580 m_impl->socket_helper_register_properties (client, properties);
5583 //SCIM_TRANS_CMD_UPDATE_PROPERTY
5584 void InfoManager::socket_helper_update_property (int client, Property& property)
5586 m_impl->socket_helper_update_property (client, property);
5589 //SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT
5590 void InfoManager::socket_helper_send_imengine_event (int client, uint32 target_ic, String target_uuid , Transaction& nest_trans)
5592 m_impl->socket_helper_send_imengine_event (client, target_ic, target_uuid, nest_trans);
5595 //SCIM_TRANS_CMD_PROCESS_KEY_EVENT
5596 //SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT
5597 void InfoManager::socket_helper_send_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5599 m_impl->socket_helper_send_key_event (client, target_ic, target_uuid, key);
5602 //SCIM_TRANS_CMD_FORWARD_KEY_EVENT
5603 void InfoManager::socket_helper_forward_key_event (int client, uint32 target_ic, String target_uuid, KeyEvent key)
5605 m_impl->socket_helper_forward_key_event (client, target_ic, target_uuid, key);
5608 //SCIM_TRANS_CMD_COMMIT_STRING
5609 void InfoManager::socket_helper_commit_string (int client, uint32 target_ic, String target_uuid, WideString wstr)
5611 m_impl->socket_helper_commit_string (client, target_ic, target_uuid, wstr);
5614 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
5615 void InfoManager::socket_helper_get_surrounding_text (int client, String uuid, uint32 maxlen_before, uint32 maxlen_after)
5617 m_impl->socket_helper_get_surrounding_text (client, uuid, maxlen_before, maxlen_after);
5620 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
5621 void InfoManager::socket_helper_delete_surrounding_text (int client, uint32 offset, uint32 len)
5623 m_impl->socket_helper_delete_surrounding_text (client, offset, len);
5626 //SCIM_TRANS_CMD_GET_SELECTION
5627 void InfoManager::socket_helper_get_selection (int client, String uuid)
5629 m_impl->socket_helper_get_selection (client, uuid);
5632 //SCIM_TRANS_CMD_SET_SELECTION
5633 void InfoManager::socket_helper_set_selection (int client, uint32 start, uint32 end)
5635 m_impl->socket_helper_set_selection (client, start, end);
5638 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
5639 void InfoManager::socket_helper_show_preedit_string (int client, uint32 target_ic, String target_uuid)
5641 m_impl->socket_helper_show_preedit_string (client, target_ic, target_uuid);
5644 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
5645 void InfoManager::socket_helper_hide_preedit_string (int client, uint32 target_ic, String target_uuid)
5647 m_impl->socket_helper_hide_preedit_string (client, target_ic, target_uuid);
5650 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
5651 void InfoManager::socket_helper_update_preedit_string (int client, uint32 target_ic, String target_uuid, WideString preedit,
5652 WideString commit, AttributeList& attrs, uint32 caret)
5654 m_impl->socket_helper_update_preedit_string (client, target_ic, target_uuid, preedit, commit, attrs, caret);
5657 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
5658 void InfoManager::socket_helper_update_preedit_caret (int client, uint32 caret)
5660 m_impl->socket_helper_update_preedit_caret (client, caret);
5663 //ISM_TRANS_CMD_RECAPTURE_STRING
5664 void InfoManager::socket_helper_recapture_string (int client, uint32 target_ic, String target_uuid, int offset, int len, WideString preedit,
5665 WideString commit, AttributeList& attrs)
5667 m_impl->socket_helper_recapture_string (client, target_ic, target_uuid, offset, len, preedit, commit, attrs);
5670 //SCIM_TRANS_CMD_PANEL_REGISTER_HELPER
5671 void InfoManager::socket_helper_register_helper (int client, HelperInfo& info)
5673 m_impl->socket_helper_register_helper (client, info);
5676 //SCIM_TRANS_CMD_PANEL_REGISTER_ACTIVE_HELPER
5677 void InfoManager::socket_helper_register_helper_passive (int client, HelperInfo& info)
5679 m_impl->socket_helper_register_helper_passive (client, info);
5682 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
5683 void InfoManager::socket_helper_update_input_context (int client, uint32 type, uint32 value)
5685 m_impl->socket_helper_update_input_context (client, type, value);
5688 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
5689 void InfoManager::socket_helper_update_language_locale(int client, String locale)
5691 m_impl->socket_helper_update_language_locale(client, locale);
5694 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
5695 void InfoManager::socket_helper_send_private_command (int client, String command)
5697 m_impl->socket_helper_send_private_command (client, command);
5700 //SCIM_TRANS_CMD_COMMIT_CONTENT
5701 void InfoManager::socket_helper_commit_content (int client, String content, String description, String mime_types)
5703 m_impl->socket_helper_commit_content (client, content, description, mime_types);
5706 //ISM_TRANS_CMD_UPDATE_ISE_EXIT
5707 void InfoManager::UPDATE_ISE_EXIT (int client)
5709 m_impl->UPDATE_ISE_EXIT (client);
5712 //ISM_TRANS_CMD_PROCESS_KEY_EVENT_DONE
5713 void InfoManager::process_key_event_done (KeyEvent &key, uint32 ret, uint32 serial)
5715 m_impl->process_key_event_done (key, ret, serial);
5718 //ISM_TRANS_CMD_REQUEST_ISE_HIDE
5719 void InfoManager::request_ise_hide ()
5721 m_impl->request_ise_hide ();
5724 bool InfoManager::check_privilege_by_sockfd (int client_id, const String& privilege) {
5725 return m_impl->check_privilege_by_sockfd (client_id, privilege);
5728 void InfoManager::add_client (int client_id, uint32 key, ClientType type)
5730 m_impl->add_client (client_id, key, type);
5733 void InfoManager::del_client (int client_id)
5735 m_impl->del_client (client_id);
5738 bool InfoManager::set_autocapital_type (int mode)
5740 return m_impl->set_autocapital_type (mode);
5743 void InfoManager::set_prediction_allow (int client, bool mode)
5745 m_impl->set_prediction_allow (client, mode);
5748 void InfoManager::reshow_input_panel ()
5750 m_impl->reshow_input_panel ();
5753 void InfoManager::request_ise_terminate ()
5755 m_impl->request_ise_terminate ();
5758 void InfoManager::set_floating_mode (uint32 floating_mode)
5760 m_impl->set_floating_mode (floating_mode);
5763 void InfoManager::set_floating_drag_enabled (uint32 enabled)
5765 m_impl->set_floating_drag_enabled (enabled);
5768 void InfoManager::move_resize_floating_window (uint32 x, uint32 y, uint32 width, uint32 height)
5770 m_impl->move_resize_floating_window (x, y, width, height);
5773 void InfoManager::generate_key_event (KeyEvent& key)
5775 m_impl->generate_key_event (key);
5778 //////////////////////////////////Message function end/////////////////////////////////////////
5781 InfoManager::signal_connect_turn_on (InfoManagerSlotVoid* slot)
5783 return m_impl->signal_connect_turn_on (slot);
5787 InfoManager::signal_connect_turn_off (InfoManagerSlotVoid* slot)
5789 return m_impl->signal_connect_turn_off (slot);
5793 InfoManager::signal_connect_show_panel (InfoManagerSlotVoid* slot)
5795 return m_impl->signal_connect_show_panel (slot);
5799 InfoManager::signal_connect_hide_panel (InfoManagerSlotVoid* slot)
5801 return m_impl->signal_connect_hide_panel (slot);
5805 InfoManager::signal_connect_update_screen (InfoManagerSlotInt* slot)
5807 return m_impl->signal_connect_update_screen (slot);
5811 InfoManager::signal_connect_update_spot_location (InfoManagerSlotIntIntInt* slot)
5813 return m_impl->signal_connect_update_spot_location (slot);
5817 InfoManager::signal_connect_update_factory_info (InfoManagerSlotFactoryInfo* slot)
5819 return m_impl->signal_connect_update_factory_info (slot);
5823 InfoManager::signal_connect_start_default_ise (InfoManagerSlotBool* slot)
5825 return m_impl->signal_connect_start_default_ise (slot);
5829 InfoManager::signal_connect_stop_default_ise (InfoManagerSlotBool* slot)
5831 return m_impl->signal_connect_stop_default_ise (slot);
5835 InfoManager::signal_connect_set_candidate_ui (InfoManagerSlotIntInt* slot)
5837 return m_impl->signal_connect_set_candidate_ui (slot);
5841 InfoManager::signal_connect_get_candidate_ui (InfoManagerSlotIntInt2* slot)
5843 return m_impl->signal_connect_get_candidate_ui (slot);
5847 InfoManager::signal_connect_set_candidate_position (InfoManagerSlotIntInt* slot)
5849 return m_impl->signal_connect_set_candidate_position (slot);
5853 InfoManager::signal_connect_get_candidate_geometry (InfoManagerSlotRect* slot)
5855 return m_impl->signal_connect_get_candidate_geometry (slot);
5859 InfoManager::signal_connect_get_input_panel_geometry (InfoManagerSlotRect* slot)
5861 return m_impl->signal_connect_get_input_panel_geometry (slot);
5865 InfoManager::signal_connect_set_keyboard_ise (InfoManagerSlotString* slot)
5867 return m_impl->signal_connect_set_keyboard_ise (slot);
5871 InfoManager::signal_connect_get_keyboard_ise (InfoManagerSlotString2* slot)
5873 return m_impl->signal_connect_get_keyboard_ise (slot);
5877 InfoManager::signal_connect_show_help (InfoManagerSlotString* slot)
5879 return m_impl->signal_connect_show_help (slot);
5883 InfoManager::signal_connect_show_factory_menu (InfoManagerSlotFactoryInfoVector* slot)
5885 return m_impl->signal_connect_show_factory_menu (slot);
5889 InfoManager::signal_connect_show_preedit_string (InfoManagerSlotVoid* slot)
5891 return m_impl->signal_connect_show_preedit_string (slot);
5895 InfoManager::signal_connect_show_aux_string (InfoManagerSlotVoid* slot)
5897 return m_impl->signal_connect_show_aux_string (slot);
5901 InfoManager::signal_connect_show_lookup_table (InfoManagerSlotVoid* slot)
5903 return m_impl->signal_connect_show_lookup_table (slot);
5907 InfoManager::signal_connect_show_associate_table (InfoManagerSlotVoid* slot)
5909 return m_impl->signal_connect_show_associate_table (slot);
5913 InfoManager::signal_connect_hide_preedit_string (InfoManagerSlotVoid* slot)
5915 return m_impl->signal_connect_hide_preedit_string (slot);
5919 InfoManager::signal_connect_hide_aux_string (InfoManagerSlotVoid* slot)
5921 return m_impl->signal_connect_hide_aux_string (slot);
5925 InfoManager::signal_connect_hide_lookup_table (InfoManagerSlotVoid* slot)
5927 return m_impl->signal_connect_hide_lookup_table (slot);
5931 InfoManager::signal_connect_hide_associate_table (InfoManagerSlotVoid* slot)
5933 return m_impl->signal_connect_hide_associate_table (slot);
5937 InfoManager::signal_connect_update_preedit_string (InfoManagerSlotAttributeStringInt* slot)
5939 return m_impl->signal_connect_update_preedit_string (slot);
5943 InfoManager::signal_connect_update_preedit_caret (InfoManagerSlotInt* slot)
5945 return m_impl->signal_connect_update_preedit_caret (slot);
5949 InfoManager::signal_connect_update_aux_string (InfoManagerSlotAttributeString* slot)
5951 return m_impl->signal_connect_update_aux_string (slot);
5955 InfoManager::signal_connect_update_lookup_table (InfoManagerSlotLookupTable* slot)
5957 return m_impl->signal_connect_update_lookup_table (slot);
5961 InfoManager::signal_connect_update_associate_table (InfoManagerSlotLookupTable* slot)
5963 return m_impl->signal_connect_update_associate_table (slot);
5967 InfoManager::signal_connect_register_properties (InfoManagerSlotPropertyList* slot)
5969 return m_impl->signal_connect_register_properties (slot);
5973 InfoManager::signal_connect_update_property (InfoManagerSlotProperty* slot)
5975 return m_impl->signal_connect_update_property (slot);
5979 InfoManager::signal_connect_register_helper_properties (InfoManagerSlotIntPropertyList* slot)
5981 return m_impl->signal_connect_register_helper_properties (slot);
5985 InfoManager::signal_connect_update_helper_property (InfoManagerSlotIntProperty* slot)
5987 return m_impl->signal_connect_update_helper_property (slot);
5991 InfoManager::signal_connect_register_helper (InfoManagerSlotIntHelperInfo* slot)
5993 return m_impl->signal_connect_register_helper (slot);
5997 InfoManager::signal_connect_remove_helper (InfoManagerSlotInt* slot)
5999 return m_impl->signal_connect_remove_helper (slot);
6003 InfoManager::signal_connect_set_active_ise_by_uuid (InfoManagerSlotStringBool* slot)
6005 return m_impl->signal_connect_set_active_ise_by_uuid (slot);
6009 InfoManager::signal_connect_focus_in (InfoManagerSlotVoid* slot)
6011 return m_impl->signal_connect_focus_in (slot);
6015 InfoManager::signal_connect_focus_out (InfoManagerSlotVoid* slot)
6017 return m_impl->signal_connect_focus_out (slot);
6021 InfoManager::signal_connect_expand_candidate (InfoManagerSlotVoid* slot)
6023 return m_impl->signal_connect_expand_candidate (slot);
6027 InfoManager::signal_connect_contract_candidate (InfoManagerSlotVoid* slot)
6029 return m_impl->signal_connect_contract_candidate (slot);
6033 InfoManager::signal_connect_select_candidate (InfoManagerSlotInt* slot)
6035 return m_impl->signal_connect_select_candidate (slot);
6039 InfoManager::signal_connect_get_ise_list (InfoManagerSlotBoolStringVector* slot)
6041 return m_impl->signal_connect_get_ise_list (slot);
6045 InfoManager::signal_connect_get_all_helper_ise_info (InfoManagerSlotBoolHelperInfo* slot)
6047 return m_impl->signal_connect_get_all_helper_ise_info (slot);
6051 InfoManager::signal_connect_set_has_option_helper_ise_info (InfoManagerSlotStringBool* slot)
6053 return m_impl->signal_connect_set_has_option_helper_ise_info (slot);
6057 InfoManager::signal_connect_set_enable_helper_ise_info (InfoManagerSlotStringBool* slot)
6059 return m_impl->signal_connect_set_enable_helper_ise_info (slot);
6063 InfoManager::signal_connect_show_helper_ise_list (InfoManagerSlotVoid* slot)
6065 return m_impl->signal_connect_show_helper_ise_list (slot);
6069 InfoManager::signal_connect_show_helper_ise_selector (InfoManagerSlotVoid* slot)
6071 return m_impl->signal_connect_show_helper_ise_selector (slot);
6075 InfoManager::signal_connect_is_helper_ise_enabled (InfoManagerSlotStringInt* slot)
6077 return m_impl->signal_connect_is_helper_ise_enabled (slot);
6081 InfoManager::signal_connect_get_ise_information (InfoManagerSlotBoolString4int2* slot)
6083 return m_impl->signal_connect_get_ise_information (slot);
6087 InfoManager::signal_connect_get_keyboard_ise_list (InfoManagerSlotBoolStringVector* slot)
6089 return m_impl->signal_connect_get_keyboard_ise_list (slot);
6093 InfoManager::signal_connect_update_ise_geometry (InfoManagerSlotIntIntIntInt* slot)
6095 return m_impl->signal_connect_update_ise_geometry (slot);
6099 InfoManager::signal_connect_get_language_list (InfoManagerSlotStringVector* slot)
6101 return m_impl->signal_connect_get_language_list (slot);
6105 InfoManager::signal_connect_get_all_language (InfoManagerSlotStringVector* slot)
6107 return m_impl->signal_connect_get_all_language (slot);
6111 InfoManager::signal_connect_get_ise_language (InfoManagerSlotStrStringVector* slot)
6113 return m_impl->signal_connect_get_ise_language (slot);
6117 InfoManager::signal_connect_get_ise_info_by_uuid (InfoManagerSlotStringISEINFO* slot)
6119 return m_impl->signal_connect_get_ise_info_by_uuid (slot);
6123 InfoManager::signal_connect_send_key_event (InfoManagerSlotKeyEvent* slot)
6125 return m_impl->signal_connect_send_key_event (slot);
6129 InfoManager::signal_connect_accept_connection (InfoManagerSlotInt* slot)
6131 return m_impl->signal_connect_accept_connection (slot);
6135 InfoManager::signal_connect_close_connection (InfoManagerSlotInt* slot)
6137 return m_impl->signal_connect_close_connection (slot);
6141 InfoManager::signal_connect_exit (InfoManagerSlotVoid* slot)
6143 return m_impl->signal_connect_exit (slot);
6147 InfoManager::signal_connect_transaction_start (InfoManagerSlotVoid* slot)
6149 return m_impl->signal_connect_transaction_start (slot);
6153 InfoManager::signal_connect_transaction_end (InfoManagerSlotVoid* slot)
6155 return m_impl->signal_connect_transaction_end (slot);
6159 InfoManager::signal_connect_lock (InfoManagerSlotVoid* slot)
6161 return m_impl->signal_connect_lock (slot);
6165 InfoManager::signal_connect_unlock (InfoManagerSlotVoid* slot)
6167 return m_impl->signal_connect_unlock (slot);
6171 InfoManager::signal_connect_update_input_context (InfoManagerSlotIntInt* slot)
6173 return m_impl->signal_connect_update_input_context (slot);
6177 InfoManager::signal_connect_show_ise (InfoManagerSlotVoid* slot)
6179 return m_impl->signal_connect_show_ise (slot);
6183 InfoManager::signal_connect_hide_ise (InfoManagerSlotVoid* slot)
6185 return m_impl->signal_connect_hide_ise (slot);
6189 InfoManager::signal_connect_will_show_ack (InfoManagerSlotVoid* slot)
6191 return m_impl->signal_connect_will_show_ack (slot);
6195 InfoManager::signal_connect_will_hide_ack (InfoManagerSlotVoid* slot)
6197 return m_impl->signal_connect_will_hide_ack (slot);
6201 InfoManager::signal_connect_set_keyboard_mode (InfoManagerSlotInt* slot)
6203 return m_impl->signal_connect_set_keyboard_mode (slot);
6207 InfoManager::signal_connect_candidate_will_hide_ack (InfoManagerSlotVoid* slot)
6209 return m_impl->signal_connect_candidate_will_hide_ack (slot);
6213 InfoManager::signal_connect_get_ise_state (InfoManagerSlotInt2* slot)
6215 return m_impl->signal_connect_get_ise_state (slot);
6219 InfoManager::signal_connect_run_helper (InfoManagerSlotString3* slot)
6221 return m_impl->signal_connect_run_helper (slot);
6225 InfoManager::signal_connect_launch_option_application (InfoManagerSlotBoolString* slot)
6227 return m_impl->signal_connect_launch_option_application (slot);
6231 InfoManager::signal_connect_get_ise_setting_appid (InfoManagerSlotBoolString2* slot)
6233 return m_impl->signal_connect_get_ise_setting_appid (slot);
6237 InfoManager::signal_connect_get_recent_ise_geometry (InfoManagerSlotIntRect* slot)
6239 return m_impl->signal_connect_get_recent_ise_geometry (slot);
6243 InfoManager::signal_connect_check_privilege_by_sockfd (InfoManagerSlotIntString2* slot)
6245 return m_impl->signal_connect_check_privilege_by_sockfd (slot);
6249 InfoManager::signal_connect_remoteinput_send_input_message (InfoManagerSlotStringBool* slot)
6251 return m_impl->signal_connect_remoteinput_send_input_message (slot);
6255 InfoManager::signal_connect_remoteinput_send_surrounding_text (InfoManagerSlotIntString* slot)
6257 return m_impl->signal_connect_remoteinput_send_surrounding_text (slot);
6260 } /* namespace scim */
6263 vi:ts=4:nowrap:ai:expandtab