Fix typo in interface name
[platform/core/uifw/libscl-core.git] / src / sclcoreui.h
1 /*
2  * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #ifndef __SCL_CORE_UI_H__
19 #define __SCL_CORE_UI_H__
20
21 //SCL_BEGIN_DECLS
22 #include <string>
23
24 #include "scltypes.h"
25 #include "sclcorecallback.h"
26
27 namespace scl
28 {
29
30 enum KEYBOARD_UI_STATE
31 {
32     KEYBOARD_UI_STATE_DID_HIDE,
33     KEYBOARD_UI_STATE_WILL_HIDE,
34     KEYBOARD_UI_STATE_DID_SHOW,
35     KEYBOARD_UI_STATE_WILL_SHOW,
36 };
37
38 enum KEYBOARD_OPTMIZATION_HINT
39 {
40     KEYBOARD_OPTIMIZATION_HINT_NONE = 0,
41     KEYBOARD_OPTIMIZATION_HINT_SHOW_PREPARE,
42 };
43
44 /**
45  * @brief The base class that provides features for a soft-keyboard
46  *
47  * This class implements all functions for working as a soft-based keyboard
48  */
49 class CSCLCoreUI
50 {
51 public:
52     CSCLCoreUI();
53     virtual ~CSCLCoreUI();
54
55     std::string get_backend_identifier();
56
57     virtual sclboolean init();
58     virtual void fini();
59
60     virtual sclboolean create_main_window();
61
62     virtual void run(const sclchar *display);
63
64     /**
65      * @brief This API returns the pointer to main keyboard window
66      */
67     virtual sclwindow get_main_window();
68
69     /**
70      * @brief This API returns the rotation angle of the current screen
71      */
72     virtual int get_screen_rotation_degree();
73
74     /**
75      * @brief This API updates the keyboard window's geometry information
76      */
77     virtual void set_keyboard_size_hints(SclSize portrait, SclSize landscape);
78
79     /**
80      * @brief Requests to create an option window
81      */
82     virtual sclwindow create_option_window(SCLOptionWindowType type);
83
84     /**
85      * @brief Requests to show existing option window
86      */
87     virtual bool show_option_window(SCLOptionWindowType type);
88
89     /**
90      * @brief Requests to destroy an option window
91      */
92     virtual void destroy_option_window(sclwindow window);
93
94     /**
95     * @brief This API requests each SCLCoreUI backends to process keyboard UI state change event
96     */
97     virtual void process_keyboard_ui_state_change(KEYBOARD_UI_STATE state);
98
99     /**
100      * @brief Requests to set floating mode
101      */
102     virtual void set_floating_mode(sclboolean floating_mode);
103
104     /**
105      * @brief Request to allow the user to move floating ISE
106      */
107     virtual void set_floating_drag_enabled(sclboolean enabled);
108
109     /**
110      * @brief Requests to update the keyboard window's geometry
111      */
112     virtual void update_keyboard_geometry(SclSize portrait, SclSize landscape);
113
114     /**
115      * @brief Requests to get the keyboard size
116      */
117     virtual void get_keyboard_size(SclSize *portrait, SclSize *landscape);
118
119 protected:
120     std::string m_backend_identifier;
121
122 private:
123     CSCLCoreUI *m_impl;
124 };
125
126 }
127
128 //SCL_END_DECLS
129
130 #endif //__SCL_CORE_UI_H__