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::config_reload()
47 m_impl->config_reload();
51 sclboolean CSCLCore::config_read_int(const sclchar *name, sclint &value)
53 sclboolean ret = FALSE;
55 ret = m_impl->config_read_int(name, value);
60 sclboolean CSCLCore::config_read_string(const sclchar *name, std::string &value)
62 sclboolean ret = FALSE;
64 ret = m_impl->config_read_string(name, value);
69 sclboolean CSCLCore::config_write_int(const sclchar *name, sclint value)
71 sclboolean ret = FALSE;
73 ret = m_impl->config_write_int(name, value);
78 sclboolean CSCLCore::config_write_string(const sclchar *name, const std::string value)
80 sclboolean ret = FALSE;
82 ret = m_impl->config_write_string(name, value);
87 sclboolean CSCLCore::config_erase(const sclchar *name)
89 sclboolean ret = FALSE;
91 ret = m_impl->config_erase(name);
96 sclboolean CSCLCore::config_flush(void)
98 sclboolean ret = FALSE;
100 ret = m_impl->config_flush();
105 void CSCLCore::send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value)
108 m_impl->send_imengine_event(ic, ic_uuid, command, value);
112 void CSCLCore::reset_keyboard_ise()
115 m_impl->reset_keyboard_ise();
119 void CSCLCore::flush_keyboard_ise()
122 m_impl->flush_keyboard_ise();
126 void CSCLCore::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
129 m_impl->send_key_event(ic, ic_uuid, keycode, keymask);
133 void CSCLCore::forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
136 m_impl->forward_key_event(ic, ic_uuid, keycode, keymask);
140 void CSCLCore::commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
143 m_impl->commit_string(ic, ic_uuid, str);
147 void CSCLCore::select_candidate(int index)
150 m_impl->select_candidate(index);
154 void CSCLCore::show_preedit_string(sclint ic, const sclchar *ic_uuid)
157 m_impl->show_preedit_string(ic, ic_uuid);
161 void CSCLCore::show_aux_string(void)
164 m_impl->show_aux_string();
168 void CSCLCore::show_candidate_string(void)
171 m_impl->show_candidate_string();
175 void CSCLCore::show_associate_string(void)
178 m_impl->show_associate_string();
182 void CSCLCore::hide_preedit_string(sclint ic, const sclchar *ic_uuid)
185 m_impl->hide_preedit_string(ic, ic_uuid);
189 void CSCLCore::hide_aux_string(void)
192 m_impl->hide_aux_string();
196 void CSCLCore::hide_candidate_string(void)
199 m_impl->hide_candidate_string();
203 void CSCLCore::hide_associate_string(void)
206 m_impl->hide_associate_string();
210 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
213 m_impl->update_preedit_string(ic, ic_uuid, str);
217 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs)
220 m_impl->update_preedit_string(ic, ic_uuid, str, attrs);
224 void CSCLCore::update_aux_string(const sclchar *str)
227 m_impl->update_aux_string(str);
231 void CSCLCore::update_input_context(sclu32 type, sclu32 value)
234 m_impl->update_input_context(type, value);
238 void CSCLCore::update_geometry(sclint x, sclint y, sclint width, sclint height)
241 m_impl->update_geometry(x, y, width, height);
245 void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
248 m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
252 sclint CSCLCore::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor) const
256 ret = m_impl->get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
261 void CSCLCore::delete_surrounding_text(sclint offset, sclint len) const
264 m_impl->delete_surrounding_text(offset, len);
268 void CSCLCore::set_candidate_position(sclint left, sclint top)
271 m_impl->set_candidate_position(left, top);
275 void CSCLCore::enable_soft_candidate(sclboolean enable)
278 m_impl->enable_soft_candidate(enable);
282 void CSCLCore::candidate_hide(void)
285 m_impl->candidate_hide();
289 void CSCLCore::set_keyboard_ise_by_uuid(const sclchar *uuid)
292 m_impl->set_keyboard_ise_by_uuid(uuid);
296 void CSCLCore::get_keyboard_ise(const sclchar *uuid)
299 m_impl->get_keyboard_ise(uuid);
303 sclwindow CSCLCore::get_main_window()
305 sclwindow ret = SCLWINDOW_INVALID;
307 ret = m_impl->get_main_window();
312 void CSCLCore::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
315 m_impl->set_keyboard_size_hints(portrait, landscape);
319 sclwindow CSCLCore::create_option_window()
321 sclwindow ret = SCLWINDOW_INVALID;
323 ret = m_impl->create_option_window();
328 void CSCLCore::destroy_option_window(sclwindow window)
331 m_impl->destroy_option_window(window);
335 void CSCLCore::set_selection(sclint start, sclint end)
338 m_impl->set_selection(start, end);
342 void CSCLCore::send_private_command(const sclchar *command)
345 m_impl->send_private_command(command);
349 void CSCLCore::get_selection_text(sclchar **text) const
352 m_impl->get_selection_text(text);
356 void CSCLCore::request_ise_hide() const
359 m_impl->request_ise_hide();
363 void CSCLCore::update_lookup_table(const scim::LookupTable &table)
366 m_impl->update_lookup_table(table);
370 void CSCLCore::register_properties(const scim::PropertyList &properties)
373 m_impl->register_properties(properties);
377 void CSCLCore::update_property(const scim::Property &property)
380 m_impl->update_property(property);
384 void CSCLCore::expand_candidate(void)
387 m_impl->expand_candidate();
391 void CSCLCore::contract_candidate(void)
394 m_impl->contract_candidate();
398 void CSCLCore::set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode)
401 m_impl->set_candidate_style(portrait_line, mode);
405 void CSCLCore::set_engine_loader_flag(sclboolean flag)
408 m_impl->set_engine_loader_flag(flag);