Update package version to 0.8.5
[platform/core/uifw/libscl-core.git] / src / sclcoreui-efl.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_EFL_H__
19 #define __SCL_CORE_UI_EFL_H__
20
21 #include "sclcoreui.h"
22
23 #include <Ecore.h>
24
25 #ifdef WEBSOCKET
26 #include "legacy_support/websocket.h"
27 #endif
28
29 //SCL_BEGIN_DECLS
30
31 namespace scl
32 {
33
34 typedef struct {
35     sclwindow window;
36 } OptionWindowInfo;
37
38 class CSCLCoreUIEFL : public CSCLCoreUI
39 {
40 public:
41     CSCLCoreUIEFL();
42     ~CSCLCoreUIEFL();
43
44     int create(void *data);
45     int terminate(void *data);
46
47     virtual sclboolean init();
48     virtual void fini();
49
50     virtual void run(const sclchar *display);
51
52     virtual sclboolean create_main_window();
53     virtual sclwindow get_main_window();
54     virtual void set_keyboard_size_hints(SclSize portrait, SclSize landscape);
55     virtual int get_screen_rotation_degree();
56
57     virtual sclwindow create_option_window(SCLOptionWindowType type);
58     virtual bool show_option_window(SCLOptionWindowType type);
59     virtual void destroy_option_window(sclwindow window);
60
61     void set_screen_rotation_degree(int degree);
62
63     void process_keyboard_ui_state_change(KEYBOARD_UI_STATE state);
64
65     void set_floating_mode(sclboolean floating_mode);
66     void set_floating_drag_enabled(sclboolean enabled);
67
68     void update_keyboard_geometry(SclSize portrait, SclSize landscape);
69     void get_keyboard_size(SclSize *portrait, SclSize *landscape);
70 private:
71     sclboolean m_initialized;
72
73     sclint m_rotation_degree;
74     sclwindow m_main_window;
75     const sclchar *m_appid;
76     const sclchar *m_display;
77     SclSize m_portrait_size;
78     SclSize m_landscape_size;
79
80     OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX];
81 };
82
83 }
84
85 //SCL_END_DECLS
86
87 #endif //__SCL_CORE_UI_EFL_H__