Tizen 2.0 Release
[profile/ivi/libscl-ui.git] / scl / include / sclactionstate.h
1 /*
2  * Copyright 2012-2013 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://floralicense.org/license/
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 #include "sclconfig.h"
19
20 #ifndef __SCL_ACTIONSTATE_H__
21 #define __SCL_ACTIONSTATE_H__
22
23 //SCL_BEGIN_DECLS
24
25 namespace scl
26 {
27
28 #define MAX_ACTION_BUF 50
29
30 /**
31  * @brief The base class to work as a soft-based keyboard
32  *
33  * This class implements all functions for working as a soft-based keyboard
34  * In side of ISE developer, they can modify it by their requirements.
35  */
36 class CSCLActionState
37 {
38 private:
39     static CSCLActionState* m_instance; /* For singleton */
40     CSCLActionState();
41 public:
42     ~CSCLActionState();
43
44     /* for singleton */
45     static CSCLActionState* get_instance();
46
47     /* reset the action state to init status */
48     void reset();
49     void clear_action_buf();
50     SCLActionState get_cur_action_state() {
51         return m_cur_action_state;
52     }
53     void set_cur_action_state(SCLActionState state) {
54         m_cur_action_state = state;
55     }
56
57 public:
58     /* stores the state information */
59     SCLActionState m_action_buffer[MAX_ACTION_BUF];
60     SCLActionState m_cur_action_state;
61 };
62
63 }
64
65 //SCL_END_DECLS
66
67 #endif //__SCL_ACTIONSTATE_H__