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.
18 #ifndef __SCL_CORE_IMPL_H__
19 #define __SCL_CORE_IMPL_H__
22 #include "sclcoreui.h"
23 #include "sclcorecallback.h"
24 #include "sclconnection.h"
40 static CSCLCoreImpl* get_instance();
46 void on_run(const sclchar *uuid, const sclchar *display);
49 void set_core_event_callback(ISCLCoreEventCallback *callback);
50 ISCLCoreEventCallback* get_core_event_callback();
52 CSCLCoreUI* get_core_ui();
53 CSCLConnection* get_connection();
57 sclboolean config_read_int(const sclchar *name, sclint &value);
58 sclboolean config_read_string(const sclchar *name, std::string &value);
59 sclboolean config_write_int(const sclchar *name, sclint value);
60 sclboolean config_write_string(const sclchar *name, const std::string value);
61 sclboolean config_erase(const sclchar *name);
62 sclboolean config_flush(void);
64 void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value);
65 void reset_keyboard_ise();
66 void flush_keyboard_ise();
67 void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask);
68 void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask);
69 void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str);
70 void select_candidate(int index);
71 void show_preedit_string(sclint ic, const sclchar *ic_uuid);
72 void show_aux_string(void);
73 void show_candidate_string(void);
74 void show_associate_string(void);
75 void hide_preedit_string(sclint ic, const sclchar *ic_uuid);
76 void hide_aux_string(void);
77 void hide_candidate_string(void);
78 void hide_associate_string(void);
79 void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str);
80 void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs);
81 void update_preedit_caret(sclint caret);
82 //void update_aux_string (const sclchar *str, const AttributeList &attrs) const;
83 void update_aux_string(const sclchar *str);
84 //void update_candidate_string (const LookupTable &table) const;
85 //void update_associate_string (const LookupTable &table) const;
86 void update_input_context(sclu32 type, sclu32 value);
87 void update_geometry(sclint x, sclint y, sclint width, sclint height);
88 void get_surrounding_text(const sclchar* ic_uuid, sclint maxlen_before, sclint maxlen_after) const;
89 void delete_surrounding_text(sclint offset, sclint len) const;
90 void set_candidate_position(sclint left, sclint top);
91 void enable_soft_candidate(sclboolean enable);
92 void candidate_hide(void);
93 //void get_candidate_window_geometry (const String &uuid) const;
94 void set_keyboard_ise_by_uuid(const sclchar *uuid);
95 void get_keyboard_ise(const sclchar *uuid);
96 //void get_keyboard_ise_list (const String &uuid) const;
98 sclwindow get_main_window();
99 int get_screen_rotation_degree();
100 void set_keyboard_size_hints(SclSize portrait, SclSize landscape);
102 sclwindow create_option_window();
103 void destroy_option_window(sclwindow window);
105 void set_selection(sclint start, sclint end);
106 void send_private_command(const sclchar *command);
107 sclint get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
108 void get_selection_text(sclchar **text);
110 void request_ise_hide();
111 void commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
112 void set_floating_mode(sclboolean floating_mode);
113 void set_floating_drag_enabled(sclboolean enabled);
115 void set_window_creation_defer_flag(sclboolean flag);
116 void update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret);
117 void recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs);
118 void update_lookup_table(const scim::LookupTable &table);
119 void register_properties(const scim::PropertyList &properties);
120 void update_property(const scim::Property &property);
121 void expand_candidate(void);
122 void contract_candidate(void);
123 void set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
124 void set_engine_loader_flag(sclboolean flag);
125 void send_key_event_processing_result(scim::KeyEvent &key, sclu32 serial, sclboolean is_success);
126 void set_dotnet_flag(sclboolean flag);
128 ISCLCoreEventCallback *m_event_callback;
130 CSCLConnection m_connection;
131 CSCLCoreUI m_core_ui;
134 sclboolean m_window_creation_defer_flag;
135 sclboolean m_window_created;
142 #endif //__SCL_CORE_IMPL_H__