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"
50 #include "isf_debug.h"
55 #define LOG_TAG "ISF_PANEL_AGENT_BASE"
62 PanelAgentBase::PanelAgentBase (const String& name)
67 PanelAgentBase::~PanelAgentBase ()
71 bool PanelAgentBase::initialize (InfoManager* info_manager, const String& display, bool resident)
73 LOGW ("not implemented for %s", m_name.c_str ());
77 bool PanelAgentBase::valid (void) const
79 LOGW ("not implemented for %s", m_name.c_str ());
83 void PanelAgentBase::stop (void)
85 LOGW ("not implemented for %s", m_name.c_str ());
89 void PanelAgentBase::update_panel_event (int client, uint32 context, int cmd, uint32 nType, uint32 nValue)
91 LOGW ("not implemented for %s", m_name.c_str ());
94 void PanelAgentBase::reset_keyboard_ise (int client, uint32 context)
96 LOGW ("not implemented for %s", m_name.c_str ());
99 void PanelAgentBase::update_keyboard_ise_list (int client, uint32 context)
101 LOGW ("not implemented for %s", m_name.c_str ());
104 void PanelAgentBase::change_factory (int client, uint32 context, const String& uuid)
106 LOGW ("not implemented for %s", m_name.c_str ());
109 void PanelAgentBase::helper_candidate_show (int client, uint32 context, const String& uuid)
111 LOGW ("not implemented for %s", m_name.c_str ());
114 void PanelAgentBase::helper_candidate_hide (int client, uint32 context, const String& uuid)
116 LOGW ("not implemented for %s", m_name.c_str ());
119 /* if the uuid is empty, it must send to panelclient otherwise HelperAgent
121 void PanelAgentBase::candidate_more_window_show (int client, uint32 context)
123 LOGW ("not implemented for %s", m_name.c_str ());
125 /* if the uuid is empty, it must send to panelclient otherwise HelperAgent
127 void PanelAgentBase::candidate_more_window_hide (int client, uint32 context)
129 LOGW ("not implemented for %s", m_name.c_str ());
132 void PanelAgentBase::update_helper_lookup_table (int client, uint32 context, const String& uuid, const LookupTable& table)
134 LOGW ("not implemented for %s", m_name.c_str ());
139 //SCIM_TRANS_CMD_SELECT_AUX
140 //this function called by two places, will send message to help(with uuid) or app
141 void PanelAgentBase::select_aux (int client, uint32 context, uint32 item)
143 LOGW ("not implemented for %s", m_name.c_str ());
145 //SCIM_TRANS_CMD_SELECT_CANDIDATE
146 //this function called by two places, will send message to help(with uuid) or app
147 void PanelAgentBase::select_candidate (int client, uint32 context, uint32 item)
149 LOGW ("not implemented for %s", m_name.c_str ());
152 void PanelAgentBase::lookup_table_page_up (int client, uint32 context)
154 LOGW ("not implemented for %s", m_name.c_str ());
157 void PanelAgentBase::lookup_table_page_down (int client, uint32 context)
159 LOGW ("not implemented for %s", m_name.c_str ());
162 void PanelAgentBase::update_lookup_table_page_size (int client, uint32 context, uint32 size)
164 LOGW ("not implemented for %s", m_name.c_str ());
167 void PanelAgentBase::update_candidate_item_layout (int client, uint32 context, const std::vector<uint32>& row_items)
169 LOGW ("not implemented for %s", m_name.c_str ());
172 void PanelAgentBase::select_associate (int client, uint32 context, uint32 item)
174 LOGW ("not implemented for %s", m_name.c_str ());
177 void PanelAgentBase::associate_table_page_up (int client, uint32 context)
179 LOGW ("not implemented for %s", m_name.c_str ());
182 void PanelAgentBase::associate_table_page_down (int client, uint32 context)
184 LOGW ("not implemented for %s", m_name.c_str ());
187 void PanelAgentBase::update_associate_table_page_size (int client, uint32 context, uint32 size)
189 LOGW ("not implemented for %s", m_name.c_str ());
192 void PanelAgentBase::update_displayed_candidate_number (int client, uint32 context, uint32 size)
194 LOGW ("not implemented for %s", m_name.c_str ());
197 void PanelAgentBase::send_longpress_event (int client, uint32 context, uint32 index)
199 LOGW ("not implemented for %s", m_name.c_str ());
202 void PanelAgentBase::trigger_property (int client, uint32 context, const String& property)
204 LOGW ("not implemented for %s", m_name.c_str ());
207 void PanelAgentBase::socket_start_helper (int client, uint32 context, const String& ic_uuid)
209 LOGW ("not implemented for %s", m_name.c_str ());
213 void PanelAgentBase::exit (int client, uint32 context)
215 LOGW ("not implemented for %s", m_name.c_str ());
218 void PanelAgentBase::focus_out_helper (int client, uint32 context, const String& uuid)
220 LOGW ("not implemented for %s", m_name.c_str ());
223 void PanelAgentBase::focus_in_helper (int client, uint32 context, const String& uuid)
225 LOGW ("not implemented for %s", m_name.c_str ());
228 void PanelAgentBase::show_helper (int client, uint32 context, const String& uuid, char* data, size_t& len)
230 LOGW ("not implemented for %s", m_name.c_str ());
233 void PanelAgentBase::hide_helper (int client, uint32 context, const String& uuid)
235 LOGW ("not implemented for %s", m_name.c_str ());
238 void PanelAgentBase::set_helper_mode (int client, uint32 context, const String& uuid, uint32& mode)
240 LOGW ("not implemented for %s", m_name.c_str ());
243 void PanelAgentBase::set_helper_language (int client, uint32 context, const String& uuid, uint32& language)
245 LOGW ("not implemented for %s", m_name.c_str ());
248 void PanelAgentBase::set_helper_imdata (int client, uint32 context, const String& uuid, const char* imdata, size_t& len)
250 LOGW ("not implemented for %s", m_name.c_str ());
253 void PanelAgentBase::set_helper_return_key_type (int client, uint32 context, const String& uuid, uint32 type)
255 LOGW ("not implemented for %s", m_name.c_str ());
258 void PanelAgentBase::get_helper_return_key_type (int client, uint32 context, const String& uuid, _OUT_ uint32& type)
260 LOGW ("not implemented for %s", m_name.c_str ());
263 void PanelAgentBase::set_helper_return_key_disable (int client, uint32 context, const String& uuid, uint32 disabled)
265 LOGW ("not implemented for %s", m_name.c_str ());
268 void PanelAgentBase::get_helper_return_key_disable (int client, uint32 context, const String& uuid, _OUT_ uint32& disabled)
270 LOGW ("not implemented for %s", m_name.c_str ());
273 void PanelAgentBase::set_helper_layout (int client, uint32 context, const String& uuid, uint32& layout)
275 LOGW ("not implemented for %s", m_name.c_str ());
278 void PanelAgentBase::set_helper_input_mode (int client, uint32 context, const String& uuid, uint32& mode)
280 LOGW ("not implemented for %s", m_name.c_str ());
283 void PanelAgentBase::set_helper_input_hint (int client, uint32 context, const String& uuid, uint32& hint)
285 LOGW ("not implemented for %s", m_name.c_str ());
288 void PanelAgentBase::set_helper_bidi_direction (int client, uint32 context, const String& uuid, uint32& direction)
290 LOGW ("not implemented for %s", m_name.c_str ());
293 void PanelAgentBase::set_helper_caps_mode (int client, uint32 context, const String& uuid, uint32& mode)
295 LOGW ("not implemented for %s", m_name.c_str ());
298 void PanelAgentBase::show_helper_option_window (int client, uint32 context, const String& uuid)
300 LOGW ("not implemented for %s", m_name.c_str ());
303 bool PanelAgentBase::process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, uint32 serial)
305 LOGW ("not implemented for %s", m_name.c_str ());
309 bool PanelAgentBase::get_helper_geometry (int client, uint32 context, String& uuid, _OUT_ struct rectinfo& info)
311 LOGW ("not implemented for %s", m_name.c_str ());
315 void PanelAgentBase::get_helper_imdata (int client, uint32 context, String& uuid, _OUT_ char** imdata, _OUT_ size_t& len)
317 LOGW ("not implemented for %s", m_name.c_str ());
320 void PanelAgentBase::get_helper_layout (int client, uint32 context, String& uuid, uint32& layout)
322 LOGW ("not implemented for %s", m_name.c_str ());
326 void PanelAgentBase::get_ise_language_locale (int client, uint32 context, String& uuid, _OUT_ char** data, _OUT_ size_t& len)
328 LOGW ("not implemented for %s", m_name.c_str ());
331 void PanelAgentBase::check_option_window (int client, uint32 context, String& uuid, _OUT_ uint32& avail)
333 LOGW ("not implemented for %s", m_name.c_str ());
336 void PanelAgentBase::reset_ise_option (int client, uint32 context)
338 LOGW ("not implemented for %s", m_name.c_str ());
341 void PanelAgentBase::reset_helper_context (int client, uint32 context, const String& uuid)
343 LOGW ("not implemented for %s", m_name.c_str ());
346 void PanelAgentBase::reload_config (int client)
348 LOGW ("not implemented for %s", m_name.c_str ());
351 void PanelAgentBase::socket_update_surrounding_text (int client, uint32 context, const String& uuid, String& text, uint32 cursor)
353 LOGW ("not implemented for %s", m_name.c_str ());
356 void PanelAgentBase::socket_remoteinput_focus_in (int client)
358 LOGW ("not implemented for %s", m_name.c_str ());
361 void PanelAgentBase::socket_remoteinput_focus_out (int client)
363 LOGW ("not implemented for %s", m_name.c_str ());
366 void PanelAgentBase::socket_remoteinput_entry_metadata (int client, uint32 hint, uint32 layout, int variation, uint32 autocapital_type)
368 LOGW ("not implemented for %s", m_name.c_str ());
371 void PanelAgentBase::socket_remoteinput_default_text (int client, String& text, uint32 cursor)
373 LOGW ("not implemented for %s", m_name.c_str ());
376 void PanelAgentBase::socket_update_selection (int client, uint32 context, String& uuid, String text)
378 LOGW ("not implemented for %s", m_name.c_str ());
381 void PanelAgentBase::socket_get_keyboard_ise_list (int client, uint32 context, const String& uuid, std::vector<String>& list)
383 LOGW ("not implemented for %s", m_name.c_str ());
386 void PanelAgentBase::socket_get_candidate_ui (int client, uint32 context, const String& uuid, int style, int mode)
388 LOGW ("not implemented for %s", m_name.c_str ());
391 void PanelAgentBase::socket_get_candidate_geometry (int client, uint32 context, const String& uuid, struct rectinfo& info)
393 LOGW ("not implemented for %s", m_name.c_str ());
395 void PanelAgentBase::socket_get_keyboard_ise (int client, uint32 context, const String& uuid, String& ise_name, String& ise_uuid)
397 LOGW ("not implemented for %s", m_name.c_str ());
400 void PanelAgentBase::helper_detach_input_context (int client, uint32 context, const String& ic_uuid)
402 LOGW ("not implemented for %s", m_name.c_str ());
405 void PanelAgentBase::helper_process_imengine_event (int client, uint32 context, const String& ic_uuid, const Transaction& nest_transaction)
407 LOGW ("not implemented for %s", m_name.c_str ());
410 void PanelAgentBase::process_helper_event (int client, uint32 context, String target_uuid, String active_uuid, Transaction& nest_trans)
412 LOGW ("not implemented for %s", m_name.c_str ());
415 void PanelAgentBase::socket_helper_key_event (int client, uint32 context, int cmd , KeyEvent& key)
417 LOGW ("not implemented for %s", m_name.c_str ());
420 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
421 //socket_helper_get_surrounding_text
422 void PanelAgentBase::socket_helper_get_surrounding_text (int client, uint32 context, uint32 maxlen_before, uint32 maxlen_after)
424 LOGW ("not implemented for %s", m_name.c_str ());
426 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
427 //socket_helper_delete_surrounding_text
428 void PanelAgentBase::socket_helper_delete_surrounding_text (int client, uint32 context, uint32 offset, uint32 len)
430 LOGD ("not implemented ");
432 //SCIM_TRANS_CMD_GET_SELECTION
433 void PanelAgentBase::socket_helper_get_selection (int client, uint32 context)
435 LOGW ("not implemented for %s", m_name.c_str ());
437 //SCIM_TRANS_CMD_SET_SELECTION
438 void PanelAgentBase::socket_helper_set_selection (int client, uint32 context, uint32 start, uint32 end)
440 LOGW ("not implemented for %s", m_name.c_str ());
443 //socket_helper_update_input_context
444 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
445 void PanelAgentBase::update_ise_input_context (int client, uint32 context, uint32 type, uint32 value)
447 LOGW ("not implemented for %s", m_name.c_str ());
450 //socket_helper_send_private_command
451 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
452 void PanelAgentBase::send_private_command (int client, uint32 context, const String& command)
454 LOGW ("not implemented for %s", m_name.c_str ());
457 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
458 void PanelAgentBase::helper_all_update_spot_location (int client, uint32 context, String uuid, int x, int y)
460 LOGW ("not implemented for %s", m_name.c_str ());
462 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
463 void PanelAgentBase::helper_all_update_cursor_position (int client, uint32 context, String uuid, int cursor_pos)
465 LOGW ("not implemented for %s", m_name.c_str ());
467 //SCIM_TRANS_CMD_UPDATE_SCREEN
468 void PanelAgentBase::helper_all_update_screen (int client, uint32 context, String uuid, int screen)
470 LOGW ("not implemented for %s", m_name.c_str ());
473 //socket_helper_commit_string
474 //SCIM_TRANS_CMD_COMMIT_STRING
475 void PanelAgentBase::commit_string (int client, uint32 context,const WideString& wstr)
477 LOGW ("not implemented for %s", m_name.c_str ());
479 //socket_helper_show_preedit_string
480 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
481 void PanelAgentBase::show_preedit_string (int client, uint32 context)
483 LOGW ("not implemented for %s", m_name.c_str ());
485 //socket_helper_hide_preedit_string
486 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
487 void PanelAgentBase::hide_preedit_string (int client, uint32 context)
489 LOGW ("not implemented for %s", m_name.c_str ());
491 //socket_helper_update_preedit_string
492 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
493 void PanelAgentBase::update_preedit_string (int client, uint32 context, WideString wstr, AttributeList& attrs, uint32 caret)
495 LOGW ("not implemented for %s", m_name.c_str ());
497 //socket_helper_update_preedit_caret
498 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
499 void PanelAgentBase::update_preedit_caret (int client, uint32 context, uint32 caret)
501 LOGW ("not implemented for %s", m_name.c_str ());
503 //socket_helper_register_helper
504 //SCIM_TRANS_CMD_HELPER_ATTACH_INPUT_CONTEXT
505 //SCIM_TRANS_CMD_UPDATE_SCREEN
506 void PanelAgentBase::helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index,
507 uint32 current_screen)
509 LOGW ("not implemented for %s", m_name.c_str ());
512 void PanelAgentBase::hide_helper_ise (int client, uint32 context)
514 LOGW ("not implemented for %s", m_name.c_str ());
517 bool PanelAgentBase::process_input_device_event(int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result)
519 LOGW("not implemented for %s", m_name.c_str());
523 void PanelAgentBase::process_key_event_done(int client, uint32 context, KeyEvent &key, uint32 ret, uint32 serial)
525 LOGW("not implemented for %s", m_name.c_str());
528 void PanelAgentBase::set_autocapital_type(int client, uint32 context, String uuid, int mode)
530 LOGW("not implemented for %s", m_name.c_str());
533 void PanelAgentBase::update_preedit_string (int client, uint32 context,const WideString &str, const AttributeList &attrs)
535 LOGW ("not implemented for %s", m_name.c_str ());
538 void PanelAgentBase::send_key_event (int client, uint32 context,const KeyEvent &key)
540 LOGW ("not implemented for %s", m_name.c_str ());
543 void PanelAgentBase::forward_key_event (int client, uint32 context,const KeyEvent &key)
545 LOGW ("not implemented for %s", m_name.c_str ());
548 } /* namespace scim */
551 vi:ts=4:nowrap:ai:expandtab