Fix logical error unsigned variable compares with negative value
[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 /**
39  * @brief The base class that provides features for a soft-keyboard
40  *
41  * This class implements all functions for working as a soft-based keyboard
42  */
43 class CSCLCoreUI
44 {
45 public:
46     CSCLCoreUI();
47     virtual ~CSCLCoreUI();
48
49     std::string get_backend_indentifier();
50
51     virtual sclboolean init();
52     virtual void fini();
53
54     virtual void run(const sclchar *display);
55
56     /**
57      * @brief This API returns the pointer to main keyboard window
58      */
59     virtual sclwindow get_main_window();
60
61     /**
62      * @brief This API returns the rotation angle of the current screen
63      */
64     virtual int get_screen_rotation_degree();
65
66     /**
67      * @brief This API updates the keyboard window's geometry information
68      */
69     virtual void set_keyboard_size_hints(SclSize portrait, SclSize landscape);
70
71     /**
72      * @brief Requests to create an option window
73      */
74     virtual sclwindow create_option_window(SCLOptionWindowType type);
75
76     /**
77      * @brief Requests to show existing option window
78      */
79     virtual bool show_option_window(SCLOptionWindowType type);
80
81     /**
82      * @brief Requests to destroy an option window
83      */
84     virtual void destroy_option_window(sclwindow window);
85
86     /**
87     * @brief This API requests each SCLCoreUI backends to process keyboard UI state change event
88     */
89     virtual void process_keyboard_ui_state_change(KEYBOARD_UI_STATE state);
90
91 protected:
92     std::string m_backend_identifier;
93
94 private:
95     CSCLCoreUI *m_impl;
96 };
97
98 }
99
100 //SCL_END_DECLS
101
102 #endif //__SCL_CORE_UI_H__