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);
37 void CSCLCore::init(sclwindow main_window)
40 m_impl->init(main_window);
58 void CSCLCore::config_reload()
61 m_impl->config_reload();
65 sclboolean CSCLCore::config_read_int(const sclchar *name, sclint &value)
67 sclboolean ret = FALSE;
69 ret = m_impl->config_read_int(name, value);
74 sclboolean CSCLCore::config_read_string(const sclchar *name, std::string &value)
76 sclboolean ret = FALSE;
78 ret = m_impl->config_read_string(name, value);
83 sclboolean CSCLCore::config_write_int(const sclchar *name, sclint value)
85 sclboolean ret = FALSE;
87 ret = m_impl->config_write_int(name, value);
92 sclboolean CSCLCore::config_write_string(const sclchar *name, const std::string value)
94 sclboolean ret = FALSE;
96 ret = m_impl->config_write_string(name, value);
101 sclboolean CSCLCore::config_erase(const sclchar *name)
103 sclboolean ret = FALSE;
105 ret = m_impl->config_erase(name);
110 sclboolean CSCLCore::config_flush(void)
112 sclboolean ret = FALSE;
114 ret = m_impl->config_flush();
119 void CSCLCore::send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value)
122 m_impl->send_imengine_event(ic, ic_uuid, command, value);
126 void CSCLCore::reset_keyboard_ise()
129 m_impl->reset_keyboard_ise();
133 void CSCLCore::flush_keyboard_ise()
136 m_impl->flush_keyboard_ise();
140 void CSCLCore::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
143 m_impl->send_key_event(ic, ic_uuid, keycode, keymask);
147 void CSCLCore::forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask)
150 m_impl->forward_key_event(ic, ic_uuid, keycode, keymask);
154 void CSCLCore::commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
157 m_impl->commit_string(ic, ic_uuid, str);
161 void CSCLCore::select_candidate(int index)
164 m_impl->select_candidate(index);
168 void CSCLCore::show_preedit_string(sclint ic, const sclchar *ic_uuid)
171 m_impl->show_preedit_string(ic, ic_uuid);
175 void CSCLCore::show_aux_string(void)
178 m_impl->show_aux_string();
182 void CSCLCore::show_candidate_string(void)
185 m_impl->show_candidate_string();
189 void CSCLCore::show_associate_string(void)
192 m_impl->show_associate_string();
196 void CSCLCore::hide_preedit_string(sclint ic, const sclchar *ic_uuid)
199 m_impl->hide_preedit_string(ic, ic_uuid);
203 void CSCLCore::hide_aux_string(void)
206 m_impl->hide_aux_string();
210 void CSCLCore::hide_candidate_string(void)
213 m_impl->hide_candidate_string();
217 void CSCLCore::hide_associate_string(void)
220 m_impl->hide_associate_string();
224 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str)
227 m_impl->update_preedit_string(ic, ic_uuid, str);
231 void CSCLCore::update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs)
234 m_impl->update_preedit_string(ic, ic_uuid, str, attrs);
238 void CSCLCore::update_aux_string(const sclchar *str)
241 m_impl->update_aux_string(str);
245 void CSCLCore::update_input_context(sclu32 type, sclu32 value)
248 m_impl->update_input_context(type, value);
252 void CSCLCore::update_geometry(sclint x, sclint y, sclint width, sclint height)
255 m_impl->update_geometry(x, y, width, height);
259 void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
262 m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
266 sclint CSCLCore::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor) const
270 ret = m_impl->get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
275 void CSCLCore::delete_surrounding_text(sclint offset, sclint len) const
278 m_impl->delete_surrounding_text(offset, len);
282 void CSCLCore::set_candidate_position(sclint left, sclint top)
285 m_impl->set_candidate_position(left, top);
289 void CSCLCore::enable_soft_candidate(sclboolean enable)
292 m_impl->enable_soft_candidate(enable);
296 void CSCLCore::candidate_hide(void)
299 m_impl->candidate_hide();
303 void CSCLCore::set_keyboard_ise_by_uuid(const sclchar *uuid)
306 m_impl->set_keyboard_ise_by_uuid(uuid);
310 void CSCLCore::get_keyboard_ise(const sclchar *uuid)
313 m_impl->get_keyboard_ise(uuid);
317 sclwindow CSCLCore::get_main_window()
319 sclwindow ret = SCLWINDOW_INVALID;
321 ret = m_impl->get_main_window();
326 void CSCLCore::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
329 m_impl->set_keyboard_size_hints(portrait, landscape);
333 sclwindow CSCLCore::create_option_window()
335 sclwindow ret = SCLWINDOW_INVALID;
337 ret = m_impl->create_option_window();
342 void CSCLCore::destroy_option_window(sclwindow window)
345 m_impl->destroy_option_window(window);
349 void CSCLCore::set_selection(sclint start, sclint end)
352 m_impl->set_selection(start, end);
356 void CSCLCore::send_private_command(const sclchar *command)
359 m_impl->send_private_command(command);
363 void CSCLCore::get_selection_text(sclchar **text) const
366 m_impl->get_selection_text(text);
370 void CSCLCore::request_ise_hide() const
373 m_impl->request_ise_hide();