2 * Copyright 2012-2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.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://floralicense.org/license/
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_UIIMPL_H__
19 #define __SCL_UIIMPL_H__
22 #include "sclstructs.h"
23 #include "scleventcallback.h"
30 * @brief The base class to work as a soft-based keyboard
32 * This class implements all functions for working as a soft-based keyboard
33 * In side of ISE developer, they can modify it by their requirements.
38 static CSCLUIImpl* m_instance; /* For singleton */
43 static CSCLUIImpl* get_instance();
45 sclboolean init(sclwindow parent, SCLParserType parser_type, const char *entry_filepath);
50 void set_ui_event_callback(ISCLUIEventCallback *callback, const sclchar *input_mode);
52 sclboolean set_rotation(SCLRotation degree);
53 SCLRotation get_rotation();
55 SCLDisplayMode get_display_mode();
57 sclboolean set_input_mode(const sclchar *input_mode);
58 const sclchar* get_input_mode();
60 void set_update_pending(sclboolean pend);
62 sclint set_private_key(const sclchar* custom_id, sclchar* label, sclchar* imagelabel[SCL_BUTTON_STATE_MAX], sclchar* imagebg[SCL_BUTTON_STATE_MAX], sclulong key_event, sclchar *key_value, sclboolean redraw);
63 void unset_private_key(const sclchar* custom_id);
65 void enable_button(const sclchar* custom_id, sclboolean enabled);
67 sclboolean set_cur_themename(const sclchar *themename);
69 sclboolean set_cur_sublayout(const sclchar *sub_layout_name);
70 const sclchar* get_cur_sublayout();
72 void set_shift_state(SCLShiftState state);
73 SCLShiftState get_shift_state();
75 void notify_app_focus_changed();
76 void reset_popup_timeout();
77 void close_all_popups();
79 SclRectangle get_main_window_rect();
80 SclSize get_input_mode_size(const sclchar *input_mode, SCLDisplayMode display_mode);
81 void get_screen_resolution(sclint *width, sclint *height);
83 scl16 get_scale_x(scl16 x);
84 scl16 get_scale_y(scl16 y);
85 sclfloat get_scale_rate();
87 sclint get_multi_touch_context_num();
88 sclboolean get_multi_touch_event(sclint seqorder, SclUIEventDesc *desc);
90 void set_debug_mode(SCLDebugMode mode);
91 SCLDebugMode get_debug_mode();
93 sclboolean set_longkey_duration(scllong msc);
94 sclboolean set_longkey_cancel_dist(sclshort dist);
95 sclboolean set_repeatkey_duration(scllong msc);
96 sclboolean set_autopoup_key_duration(scllong msc);
97 sclboolean set_button_delay_duration(scllong msc);
99 void enable_magnifier(sclboolean enabled);
100 void enable_sound(sclboolean enabled);
101 void enable_vibration(sclboolean enabled);
102 void enable_tts(sclboolean enabled);
103 void enable_shift_multi_touch(sclboolean enabled);
105 void enable_touch_offset(sclboolean enabled);
106 void disable_input_events(sclboolean disabled);
108 void set_custom_magnifier_label(scltouchdevice touch_id, sclint index, const sclchar* label);
110 void set_string_substitution(const sclchar *original, const sclchar *substitute);
111 void unset_string_substitution(const sclchar *original);
112 sclint get_caps_mode();
113 void set_caps_mode(sclint caps_mode);
115 sclboolean m_initialized;
123 #endif //__SCL_UIIMPL_H__