2 * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "sclcoreimpl.h"
23 CSCLCore::CSCLCore(ISCLCoreEventCallback *callback)
25 m_impl = CSCLCoreImpl::get_instance();
28 m_impl->set_core_event_callback(callback);
44 void CSCLCore::prepare()
65 void CSCLCore::config_reload()
68 m_impl->config_reload();
72 sclboolean CSCLCore::config_read_int(const sclchar *name, sclint &value)
74 sclboolean ret = FALSE;
76 ret = m_impl->config_read_int(name, value);
81 sclboolean CSCLCore::config_read_string(const sclchar *name, std::string &value)
83 sclboolean ret = FALSE;
85 ret = m_impl->config_read_string(name, value);
90 sclboolean CSCLCore::config_write_int(const sclchar *name, sclint value)
92 sclboolean ret = FALSE;
94 ret = m_impl->config_write_int(name, value);
99 sclboolean CSCLCore::config_write_string(const sclchar *name, const std::string value)
101 sclboolean ret = FALSE;
103 ret = m_impl->config_write_string(name, value);
108 sclboolean CSCLCore::config_erase(const sclchar *name)
110 sclboolean ret = FALSE;
112 ret = m_impl->config_erase(name);
117 sclboolean CSCLCore::config_flush(void)
119 sclboolean ret = FALSE;
121 ret = m_impl->config_flush();
126 void CSCLCore::send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value)
129 m_impl->send_imengine_event(ic, ic_uuid, command, value);
133 void CSCLCore::reset_keyboard_ise()
136 m_impl->reset_keyboard_ise();
140 void CSCLCore::flush_keyboard_ise()
143 m_impl->flush_keyboard_ise();
147 void CSCLCore::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
150 m_impl->send_key_event(ic, ic_uuid, keycode, keymask);
154 void CSCLCore::forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
157 m_impl->forward_key_event(ic, ic_uuid, keycode, keymask);
161 void CSCLCore::commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
164 m_impl->commit_string(ic, ic_uuid, str);
168 void CSCLCore::select_candidate(int index)
171 m_impl->select_candidate(index);
175 void CSCLCore::show_preedit_string(sclint ic, const sclchar *ic_uuid)
178 m_impl->show_preedit_string(ic, ic_uuid);
182 void CSCLCore::show_aux_string(void)
185 m_impl->show_aux_string();
189 void CSCLCore::show_candidate_string(void)
192 m_impl->show_candidate_string();
196 void CSCLCore::show_associate_string(void)
199 m_impl->show_associate_string();
203 void CSCLCore::hide_preedit_string(sclint ic, const sclchar *ic_uuid)
206 m_impl->hide_preedit_string(ic, ic_uuid);
210 void CSCLCore::hide_aux_string(void)
213 m_impl->hide_aux_string();
217 void CSCLCore::hide_candidate_string(void)
220 m_impl->hide_candidate_string();
224 void CSCLCore::hide_associate_string(void)
227 m_impl->hide_associate_string();
231 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
234 m_impl->update_preedit_string(ic, ic_uuid, str);
238 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs)
241 m_impl->update_preedit_string(ic, ic_uuid, str, attrs);
245 void CSCLCore::update_preedit_caret(sclint caret)
248 m_impl->update_preedit_caret(caret);
252 void CSCLCore::update_aux_string(const sclchar *str)
255 m_impl->update_aux_string(str);
259 void CSCLCore::update_input_context(sclu32 type, sclu32 value)
262 m_impl->update_input_context(type, value);
266 void CSCLCore::update_geometry(sclint x, sclint y, sclint width, sclint height)
269 m_impl->update_geometry(x, y, width, height);
273 void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
276 m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
280 sclint CSCLCore::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor) const
284 ret = m_impl->get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
289 void CSCLCore::delete_surrounding_text(sclint offset, sclint len) const
292 m_impl->delete_surrounding_text(offset, len);
296 void CSCLCore::set_candidate_position(sclint left, sclint top)
299 m_impl->set_candidate_position(left, top);
303 void CSCLCore::enable_soft_candidate(sclboolean enable)
306 m_impl->enable_soft_candidate(enable);
310 void CSCLCore::candidate_hide(void)
313 m_impl->candidate_hide();
317 void CSCLCore::set_keyboard_ise_by_uuid(const sclchar *uuid)
320 m_impl->set_keyboard_ise_by_uuid(uuid);
324 void CSCLCore::get_keyboard_ise(const sclchar *uuid)
327 m_impl->get_keyboard_ise(uuid);
331 sclwindow CSCLCore::get_main_window()
333 sclwindow ret = SCLWINDOW_INVALID;
335 ret = m_impl->get_main_window();
340 void CSCLCore::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
343 m_impl->set_keyboard_size_hints(portrait, landscape);
347 sclwindow CSCLCore::create_option_window()
349 sclwindow ret = SCLWINDOW_INVALID;
351 ret = m_impl->create_option_window();
356 void CSCLCore::destroy_option_window(sclwindow window)
359 m_impl->destroy_option_window(window);
363 void CSCLCore::set_selection(sclint start, sclint end)
366 m_impl->set_selection(start, end);
370 void CSCLCore::send_private_command(const sclchar *command)
373 m_impl->send_private_command(command);
377 void CSCLCore::get_selection_text(sclchar **text) const
380 m_impl->get_selection_text(text);
384 void CSCLCore::request_ise_hide() const
387 m_impl->request_ise_hide();
391 void CSCLCore::commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types)
394 m_impl->commit_content(content, description, mime_types);
398 void CSCLCore::update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret)
401 m_impl->update_preedit_string_with_commit(preedit, commit, attrs, caret);
405 void CSCLCore::recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs)
408 m_impl->recapture_string(offset, len, preedit, commit, attrs);
412 void CSCLCore::update_lookup_table(const scim::LookupTable &table)
415 m_impl->update_lookup_table(table);
419 void CSCLCore::register_properties(const scim::PropertyList &properties)
422 m_impl->register_properties(properties);
426 void CSCLCore::update_property(const scim::Property &property)
429 m_impl->update_property(property);
433 void CSCLCore::expand_candidate(void)
436 m_impl->expand_candidate();
440 void CSCLCore::contract_candidate(void)
443 m_impl->contract_candidate();
447 void CSCLCore::set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode)
450 m_impl->set_candidate_style(portrait_line, mode);
454 void CSCLCore::set_floating_mode(sclboolean floating_mode)
457 m_impl->set_floating_mode(floating_mode);
461 void CSCLCore::set_floating_drag_enabled(sclboolean enabled)
464 m_impl->set_floating_drag_enabled(enabled);
468 void CSCLCore::set_window_creation_defer_flag(sclboolean flag)
471 m_impl->set_window_creation_defer_flag(flag);
475 void CSCLCore::set_engine_loader_flag(sclboolean flag)
478 m_impl->set_engine_loader_flag(flag);
482 void CSCLCore::send_key_event_processing_result(scim::KeyEvent &key, sclu32 serial, sclboolean is_success)
485 m_impl->send_key_event_processing_result(key, serial, is_success);
489 void CSCLCore::set_dotnet_flag(sclboolean flag)
492 m_impl->set_dotnet_flag(flag);