1 /** @file isf_panel_agent_base.cpp
2 * @brief Implementation of class PanelAgentBase.
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
31 #define Uses_SCIM_TRANSACTION
32 #define Uses_SCIM_TRANS_COMMANDS
33 #define Uses_SCIM_PANEL_AGENT
34 #define Uses_SCIM_HELPER
35 #define Uses_SCIM_SOCKET
36 #define Uses_SCIM_EVENT
37 #define Uses_SCIM_CONFIG
38 #define Uses_SCIM_CONFIG_MODULE
39 #define Uses_SCIM_CONFIG_PATH
40 #define Uses_SCIM_UTILITY
43 #include <sys/types.h>
44 #include <sys/times.h>
47 #include "scim_private.h"
49 #include "scim_stl_map.h"
54 #define LOG_TAG "ISF_PANEL_AGENT_BASE"
61 PanelAgentBase::PanelAgentBase (const String& name)
66 PanelAgentBase::~PanelAgentBase ()
70 bool PanelAgentBase::initialize (InfoManager* info_manager, const String& display, bool resident)
72 LOGW ("not implemented for %s", m_name.c_str ());
76 bool PanelAgentBase::valid (void) const
78 LOGW ("not implemented for %s", m_name.c_str ());
82 void PanelAgentBase::stop (void)
84 LOGW ("not implemented for %s", m_name.c_str ());
88 void PanelAgentBase::update_panel_event (int client, uint32 context, int cmd, uint32 nType, uint32 nValue)
90 LOGW ("not implemented for %s", m_name.c_str ());
93 void PanelAgentBase::reset_keyboard_ise (int client, uint32 context)
95 LOGW ("not implemented for %s", m_name.c_str ());
98 void PanelAgentBase::update_keyboard_ise_list (int client, uint32 context)
100 LOGW ("not implemented for %s", m_name.c_str ());
103 void PanelAgentBase::change_factory (int client, uint32 context, const String& uuid)
105 LOGW ("not implemented for %s", m_name.c_str ());
108 void PanelAgentBase::helper_candidate_show (int client, uint32 context, const String& uuid)
110 LOGW ("not implemented for %s", m_name.c_str ());
113 void PanelAgentBase::helper_candidate_hide (int client, uint32 context, const String& uuid)
115 LOGW ("not implemented for %s", m_name.c_str ());
118 /* if the uuid is empty, it must send to panelclient otherwise HelperAgent
120 void PanelAgentBase::candidate_more_window_show (int client, uint32 context)
122 LOGW ("not implemented for %s", m_name.c_str ());
124 /* if the uuid is empty, it must send to panelclient otherwise HelperAgent
126 void PanelAgentBase::candidate_more_window_hide (int client, uint32 context)
128 LOGW ("not implemented for %s", m_name.c_str ());
131 void PanelAgentBase::update_helper_lookup_table (int client, uint32 context, const String& uuid, const LookupTable& table)
133 LOGW ("not implemented for %s", m_name.c_str ());
138 //SCIM_TRANS_CMD_SELECT_AUX
139 //this function called by two places, will send message to help(with uuid) or app
140 void PanelAgentBase::select_aux (int client, uint32 context, uint32 item)
142 LOGW ("not implemented for %s", m_name.c_str ());
144 //SCIM_TRANS_CMD_SELECT_CANDIDATE
145 //this function called by two places, will send message to help(with uuid) or app
146 void PanelAgentBase::select_candidate (int client, uint32 context, uint32 item)
148 LOGW ("not implemented for %s", m_name.c_str ());
151 void PanelAgentBase::lookup_table_page_up (int client, uint32 context)
153 LOGW ("not implemented for %s", m_name.c_str ());
156 void PanelAgentBase::lookup_table_page_down (int client, uint32 context)
158 LOGW ("not implemented for %s", m_name.c_str ());
161 void PanelAgentBase::update_lookup_table_page_size (int client, uint32 context, uint32 size)
163 LOGW ("not implemented for %s", m_name.c_str ());
166 void PanelAgentBase::update_candidate_item_layout (int client, uint32 context, const std::vector<uint32>& row_items)
168 LOGW ("not implemented for %s", m_name.c_str ());
171 void PanelAgentBase::select_associate (int client, uint32 context, uint32 item)
173 LOGW ("not implemented for %s", m_name.c_str ());
176 void PanelAgentBase::associate_table_page_up (int client, uint32 context)
178 LOGW ("not implemented for %s", m_name.c_str ());
181 void PanelAgentBase::associate_table_page_down (int client, uint32 context)
183 LOGW ("not implemented for %s", m_name.c_str ());
186 void PanelAgentBase::update_associate_table_page_size (int client, uint32 context, uint32 size)
188 LOGW ("not implemented for %s", m_name.c_str ());
191 void PanelAgentBase::update_displayed_candidate_number (int client, uint32 context, uint32 size)
193 LOGW ("not implemented for %s", m_name.c_str ());
196 void PanelAgentBase::send_longpress_event (int client, uint32 context, uint32 index)
198 LOGW ("not implemented for %s", m_name.c_str ());
201 void PanelAgentBase::trigger_property (int client, uint32 context, const String& property)
203 LOGW ("not implemented for %s", m_name.c_str ());
206 void PanelAgentBase::socket_start_helper (int client, uint32 context, const String& ic_uuid)
208 LOGW ("not implemented for %s", m_name.c_str ());
212 void PanelAgentBase::exit (int client, uint32 context)
214 LOGW ("not implemented for %s", m_name.c_str ());
217 void PanelAgentBase::focus_out_helper (int client, uint32 context, const String& uuid)
219 LOGW ("not implemented for %s", m_name.c_str ());
222 void PanelAgentBase::focus_in_helper (int client, uint32 context, const String& uuid)
224 LOGW ("not implemented for %s", m_name.c_str ());
227 void PanelAgentBase::show_helper (int client, uint32 context, const String& uuid, char* data, size_t& len)
229 LOGW ("not implemented for %s", m_name.c_str ());
232 void PanelAgentBase::hide_helper (int client, uint32 context, const String& uuid)
234 LOGW ("not implemented for %s", m_name.c_str ());
237 void PanelAgentBase::set_helper_mode (int client, uint32 context, const String& uuid, uint32& mode)
239 LOGW ("not implemented for %s", m_name.c_str ());
242 void PanelAgentBase::set_helper_language (int client, uint32 context, const String& uuid, uint32& language)
244 LOGW ("not implemented for %s", m_name.c_str ());
247 void PanelAgentBase::set_helper_imdata (int client, uint32 context, const String& uuid, const char* imdata, size_t& len)
249 LOGW ("not implemented for %s", m_name.c_str ());
252 void PanelAgentBase::set_helper_return_key_type (int client, uint32 context, const String& uuid, uint32 type)
254 LOGW ("not implemented for %s", m_name.c_str ());
257 void PanelAgentBase::get_helper_return_key_type (int client, uint32 context, const String& uuid, _OUT_ uint32& type)
259 LOGW ("not implemented for %s", m_name.c_str ());
262 void PanelAgentBase::set_helper_return_key_disable (int client, uint32 context, const String& uuid, uint32 disabled)
264 LOGW ("not implemented for %s", m_name.c_str ());
267 void PanelAgentBase::get_helper_return_key_disable (int client, uint32 context, const String& uuid, _OUT_ uint32& disabled)
269 LOGW ("not implemented for %s", m_name.c_str ());
272 void PanelAgentBase::set_helper_layout (int client, uint32 context, const String& uuid, uint32& layout)
274 LOGW ("not implemented for %s", m_name.c_str ());
277 void PanelAgentBase::set_helper_input_mode (int client, uint32 context, const String& uuid, uint32& mode)
279 LOGW ("not implemented for %s", m_name.c_str ());
282 void PanelAgentBase::set_helper_input_hint (int client, uint32 context, const String& uuid, uint32& hint)
284 LOGW ("not implemented for %s", m_name.c_str ());
287 void PanelAgentBase::set_helper_bidi_direction (int client, uint32 context, const String& uuid, uint32& direction)
289 LOGW ("not implemented for %s", m_name.c_str ());
292 void PanelAgentBase::set_helper_caps_mode (int client, uint32 context, const String& uuid, uint32& mode)
294 LOGW ("not implemented for %s", m_name.c_str ());
297 void PanelAgentBase::show_helper_option_window (int client, uint32 context, const String& uuid)
299 LOGW ("not implemented for %s", m_name.c_str ());
302 bool PanelAgentBase::process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, _OUT_ uint32& result)
304 LOGW ("not implemented for %s", m_name.c_str ());
308 bool PanelAgentBase::get_helper_geometry (int client, uint32 context, String& uuid, _OUT_ struct rectinfo& info)
310 LOGW ("not implemented for %s", m_name.c_str ());
314 void PanelAgentBase::get_helper_imdata (int client, uint32 context, String& uuid, _OUT_ char** imdata, _OUT_ size_t& len)
316 LOGW ("not implemented for %s", m_name.c_str ());
319 void PanelAgentBase::get_helper_layout (int client, uint32 context, String& uuid, uint32& layout)
321 LOGW ("not implemented for %s", m_name.c_str ());
325 void PanelAgentBase::get_ise_language_locale (int client, uint32 context, String& uuid, _OUT_ char* data, _OUT_ size_t& len)
327 LOGW ("not implemented for %s", m_name.c_str ());
330 void PanelAgentBase::check_option_window (int client, uint32 context, String& uuid, _OUT_ uint32& avail)
332 LOGW ("not implemented for %s", m_name.c_str ());
335 void PanelAgentBase::reset_ise_option (int client, uint32 context)
337 LOGW ("not implemented for %s", m_name.c_str ());
340 void PanelAgentBase::reset_helper_context (int client, uint32 context, const String& uuid)
342 LOGW ("not implemented for %s", m_name.c_str ());
345 void PanelAgentBase::reload_config (int client)
347 LOGW ("not implemented for %s", m_name.c_str ());
350 void PanelAgentBase::socket_update_surrounding_text (int client, uint32 context, const String& uuid, String& text, uint32 cursor)
352 LOGW ("not implemented for %s", m_name.c_str ());
355 void PanelAgentBase::socket_update_selection (int client, uint32 context, String& uuid, String text)
357 LOGW ("not implemented for %s", m_name.c_str ());
360 void PanelAgentBase::socket_get_keyboard_ise_list (int client, uint32 context, const String& uuid, std::vector<String>& list)
362 LOGW ("not implemented for %s", m_name.c_str ());
365 void PanelAgentBase::socket_get_candidate_ui (int client, uint32 context, const String& uuid, int style, int mode)
367 LOGW ("not implemented for %s", m_name.c_str ());
370 void PanelAgentBase::socket_get_candidate_geometry (int client, uint32 context, const String& uuid, struct rectinfo& info)
372 LOGW ("not implemented for %s", m_name.c_str ());
374 void PanelAgentBase::socket_get_keyboard_ise (int client, uint32 context, const String& uuid, String& ise_name, String& ise_uuid)
376 LOGW ("not implemented for %s", m_name.c_str ());
379 void PanelAgentBase::helper_detach_input_context (int client, uint32 context, const String& ic_uuid)
381 LOGW ("not implemented for %s", m_name.c_str ());
384 void PanelAgentBase::helper_process_imengine_event (int client, uint32 context, const String& ic_uuid, const Transaction& nest_transaction)
386 LOGW ("not implemented for %s", m_name.c_str ());
389 void PanelAgentBase::process_helper_event (int client, uint32 context, String target_uuid, String active_uuid, Transaction& nest_trans)
391 LOGW ("not implemented for %s", m_name.c_str ());
394 void PanelAgentBase::socket_helper_key_event (int client, uint32 context, int cmd , KeyEvent& key)
396 LOGW ("not implemented for %s", m_name.c_str ());
399 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
400 //socket_helper_get_surrounding_text
401 void PanelAgentBase::socket_helper_get_surrounding_text (int client, uint32 context, uint32 maxlen_before, uint32 maxlen_after)
403 LOGW ("not implemented for %s", m_name.c_str ());
405 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
406 //socket_helper_delete_surrounding_text
407 void PanelAgentBase::socket_helper_delete_surrounding_text (int client, uint32 context, uint32 offset, uint32 len)
409 LOGD ("not implemented ");
411 //SCIM_TRANS_CMD_GET_SELECTION
412 void PanelAgentBase::socket_helper_get_selection (int client, uint32 context)
414 LOGW ("not implemented for %s", m_name.c_str ());
416 //SCIM_TRANS_CMD_SET_SELECTION
417 void PanelAgentBase::socket_helper_set_selection (int client, uint32 context, uint32 start, uint32 end)
419 LOGW ("not implemented for %s", m_name.c_str ());
422 //socket_helper_update_input_context
423 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
424 void PanelAgentBase::update_ise_input_context (int client, uint32 context, uint32 type, uint32 value)
426 LOGW ("not implemented for %s", m_name.c_str ());
429 //socket_helper_send_private_command
430 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
431 void PanelAgentBase::send_private_command (int client, uint32 context, String command)
433 LOGW ("not implemented for %s", m_name.c_str ());
436 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
437 void PanelAgentBase::helper_all_update_spot_location (int client, uint32 context, String uuid, int x, int y)
439 LOGW ("not implemented for %s", m_name.c_str ());
441 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
442 void PanelAgentBase::helper_all_update_cursor_position (int client, uint32 context, String uuid, int cursor_pos)
444 LOGW ("not implemented for %s", m_name.c_str ());
446 //SCIM_TRANS_CMD_UPDATE_SCREEN
447 void PanelAgentBase::helper_all_update_screen (int client, uint32 context, String uuid, int screen)
449 LOGW ("not implemented for %s", m_name.c_str ());
452 //socket_helper_commit_string
453 //SCIM_TRANS_CMD_COMMIT_STRING
454 void PanelAgentBase::commit_string (int client, uint32 context,const WideString& wstr)
456 LOGW ("not implemented for %s", m_name.c_str ());
458 //socket_helper_show_preedit_string
459 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
460 void PanelAgentBase::show_preedit_string (int client, uint32 context)
462 LOGW ("not implemented for %s", m_name.c_str ());
464 //socket_helper_hide_preedit_string
465 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
466 void PanelAgentBase::hide_preedit_string (int client, uint32 context)
468 LOGW ("not implemented for %s", m_name.c_str ());
470 //socket_helper_update_preedit_string
471 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
472 void PanelAgentBase::update_preedit_string (int client, uint32 context, WideString wstr, AttributeList& attrs, uint32 caret)
474 LOGW ("not implemented for %s", m_name.c_str ());
476 //socket_helper_update_preedit_caret
477 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
478 void PanelAgentBase::update_preedit_caret (int client, uint32 context, uint32 caret)
480 LOGW ("not implemented for %s", m_name.c_str ());
482 //socket_helper_register_helper
483 //SCIM_TRANS_CMD_HELPER_ATTACH_INPUT_CONTEXT
484 //SCIM_TRANS_CMD_UPDATE_SCREEN
485 void PanelAgentBase::helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index,
486 uint32 current_screen)
488 LOGW ("not implemented for %s", m_name.c_str ());
491 void PanelAgentBase::hide_helper_ise (int client, uint32 context)
493 LOGW ("not implemented for %s", m_name.c_str ());
497 } /* namespace scim */
500 vi:ts=4:nowrap:ai:expandtab