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::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
122 m_impl->send_key_event(ic, ic_uuid, keycode, keymask);
126 void CSCLCore::forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
129 m_impl->forward_key_event(ic, ic_uuid, keycode, keymask);
133 void CSCLCore::commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
136 m_impl->commit_string(ic, ic_uuid, str);
140 void CSCLCore::select_candidate(int index)
143 m_impl->select_candidate(index);
147 void CSCLCore::show_preedit_string(sclint ic, const sclchar *ic_uuid)
150 m_impl->show_preedit_string(ic, ic_uuid);
154 void CSCLCore::show_aux_string(void)
157 m_impl->show_aux_string();
161 void CSCLCore::show_candidate_string(void)
164 m_impl->show_candidate_string();
168 void CSCLCore::show_associate_string(void)
171 m_impl->show_associate_string();
175 void CSCLCore::hide_preedit_string(sclint ic, const sclchar *ic_uuid)
178 m_impl->hide_preedit_string(ic, ic_uuid);
182 void CSCLCore::hide_aux_string(void)
185 m_impl->hide_aux_string();
189 void CSCLCore::hide_candidate_string(void)
192 m_impl->hide_candidate_string();
196 void CSCLCore::hide_associate_string(void)
199 m_impl->hide_associate_string();
203 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
206 m_impl->update_preedit_string(ic, ic_uuid, str);
210 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs)
213 m_impl->update_preedit_string(ic, ic_uuid, str, attrs);
217 void CSCLCore::update_aux_string(const sclchar *str)
220 m_impl->update_aux_string(str);
224 void CSCLCore::update_input_context(sclu32 type, sclu32 value)
227 m_impl->update_input_context(type, value);
231 void CSCLCore::update_geometry(sclint x, sclint y, sclint width, sclint height)
234 m_impl->update_geometry(x, y, width, height);
238 void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
241 m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
245 void CSCLCore::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor) const
248 m_impl->get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
252 void CSCLCore::delete_surrounding_text(sclint offset, sclint len) const
255 m_impl->delete_surrounding_text(offset, len);
259 void CSCLCore::set_candidate_position(sclint left, sclint top)
262 m_impl->set_candidate_position(left, top);
266 void CSCLCore::enable_soft_candidate(sclboolean enable)
269 m_impl->enable_soft_candidate(enable);
273 void CSCLCore::candidate_hide(void)
276 m_impl->candidate_hide();
280 void CSCLCore::set_keyboard_ise_by_uuid(const sclchar *uuid)
283 m_impl->set_keyboard_ise_by_uuid(uuid);
287 void CSCLCore::get_keyboard_ise(const sclchar *uuid)
290 m_impl->get_keyboard_ise(uuid);
294 sclwindow CSCLCore::get_main_window()
296 sclwindow ret = SCLWINDOW_INVALID;
298 ret = m_impl->get_main_window();
303 void CSCLCore::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
306 m_impl->set_keyboard_size_hints(portrait, landscape);
310 sclwindow CSCLCore::create_option_window()
312 sclwindow ret = SCLWINDOW_INVALID;
314 ret = m_impl->create_option_window();
319 void CSCLCore::destroy_option_window(sclwindow window)
322 m_impl->destroy_option_window(window);
326 void CSCLCore::set_selection(sclint start, sclint end)
329 m_impl->set_selection(start, end);
333 void CSCLCore::send_private_command(const sclchar *command)
336 m_impl->send_private_command(command);