Move Input Method enumerations to public API
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / input-method.h
1 #ifndef __DALI_INPUT_MEHTOD_H__
2 #define __DALI_INPUT_MEHTOD_H__
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/common/dali-common.h>
23
24 namespace Dali
25 {
26 /**
27  * @addtogroup dali_adaptor_framework
28  * @{
29  */
30
31 /**
32  * @brief Enumeration for input method.
33  * @SINCE_1_0.0
34  */
35 namespace InputMethod
36 {
37
38 /**
39  * @brief Enumeration for settings that can be changed in the system Input Method.
40  *
41  * Key types of map to change virtual keyboard settings in INPUT_METHOD_SETTINGS property.
42  * @SINCE_1_3.20
43  */
44 namespace Category
45 {
46
47 /**
48 * @brief Enumeration for Category type.
49 *
50 * @SINCE_1_3.20
51 */
52 enum Type
53 {
54   PANEL_LAYOUT,        ///< Set Keyboard layout @SINCE_1_3.20
55   BUTTON_ACTION,       ///< Set Button Action @SINCE_1_3.20
56   AUTO_CAPITALIZE,     ///< Set Auto capitalize of input @SINCE_1_3.20
57   VARIATION            ///< Set variation @SINCE_1_3.20
58 };
59
60 } // namespace Category
61
62 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
63 /////////////////////////// The enumerations below is to set each type of Category. ///////////////////////////////////
64 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
65
66 /**
67  * @brief Sets Input panel (virtual keyboard) layout types.
68  *
69  * @SINCE_1_3.20
70  */
71 namespace PanelLayout
72 {
73
74 /**
75 * @brief Enumeration for PanelLayout type.
76 *
77 * @SINCE_1_3.20
78 */
79 enum Type
80 {
81   NORMAL,          ///< Default layout @SINCE_1_3.20
82   NUMBER,          ///< Number layout @SINCE_1_3.20
83   EMAIL,           ///< Email layout @SINCE_1_3.20
84   URL,             ///< URL layout @SINCE_1_3.20
85   PHONENUMBER,     ///< Phone Number layout @SINCE_1_3.20
86   IP,              ///< IP layout @SINCE_1_3.20
87   MONTH,           ///< Month layout @SINCE_1_3.20
88   NUMBER_ONLY,     ///< Number Only layout @SINCE_1_3.20
89   HEX,             ///< Hexadecimal layout @SINCE_1_3.20
90   TERMINAL,        ///< Command-line terminal layout including ESC, Alt, Ctrl key, so on (no auto-correct, no auto-capitalization) @SINCE_1_3.20
91   PASSWORD,        ///< Like normal, but no auto-correct, no auto-capitalization etc @SINCE_1_3.20
92   DATE_TIME,       ///< Date and time layout @SINCE_1_3.20
93   EMOTICON         ///< Emoticon layout @SINCE_1_3.20
94 };
95
96 } // namespace PanelLayout
97
98 /**
99  * @brief Enumeration for specifying what the Input Method "action" button functionality is set to.
100  *
101  * The 'Action' button is traditionally the [RETURN] or [DONE] button.
102  * Not all these actions are supported by all systems.
103  * Setting a custom label will still require one of these actions to be set.
104  * @SINCE_1_3.20
105  */
106 namespace ButtonAction
107 {
108
109 /**
110 * @brief Enumeration for ButtonAction type.
111 *
112 * @SINCE_1_3.20
113 */
114 enum Type
115 {
116   DEFAULT,       ///< Default action @SINCE_1_3.20
117   DONE,          ///< Done @SINCE_1_3.20
118   GO,            ///< Go action @SINCE_1_3.20
119   JOIN,          ///< Join action @SINCE_1_3.20
120   LOGIN,         ///< Login action @SINCE_1_3.20
121   NEXT,          ///< Next action @SINCE_1_3.20
122   PREVIOUS,      ///< Previous action @SINCE_1_3.20
123   SEARCH,        ///< Search action @SINCE_1_3.20
124   SEND,          ///< Send action @SINCE_1_3.20
125   SIGNIN,        ///< Sign in action @SINCE_1_3.20
126   UNSPECIFIED,   ///< Unspecified action @SINCE_1_3.20
127   NONE           ///< Nothing to do @SINCE_1_3.20
128 };
129
130 } // namespace ButtonAction
131
132
133 /**
134  * @brief Sets Autocapitalization Types.
135  *
136  * @SINCE_1_3.20
137  */
138 namespace AutoCapital
139 {
140
141 /**
142 * @brief Enumeration for AutoCapital type.
143 *
144 * @SINCE_1_3.20
145 */
146 enum Type
147 {
148   NONE,         ///< No auto-capitalization when typing @SINCE_1_3.20
149   WORD,         ///< Autocapitalize each word typed @SINCE_1_3.20
150   SENTENCE,     ///< Autocapitalize the start of each sentence @SINCE_1_3.20
151   ALL_CHARACTER ///< Autocapitalize all letters @SINCE_1_3.20
152 };
153
154 } // namespace AutoCapital
155
156
157 /////////////////////////// VARIATION based on PANEL_LAYOUT //////////////////////////////////
158
159 /**
160  * @brief Available variation for Normal layout.
161  *
162  * @SINCE_1_3.20
163  */
164 namespace NormalLayout
165 {
166
167 /**
168 * @brief Enumeration for NormalLayout Variation type.
169 *
170 * @SINCE_1_3.20
171 */
172 enum Type
173 {
174   NORMAL,                 ///< The plain normal layout @SINCE_1_3.20
175   WITH_FILENAME,          ///< Filename layout. Symbols such as '/' should be disabled @SINCE_1_3.20
176   WITH_PERSON_NAME        ///< The name of a person @SINCE_1_3.20
177 };
178
179 } // namespace NormalLayout
180
181 /**
182  * @brief Available variation for Number only layout.
183  *
184  * @SINCE_1_3.20
185  */
186 namespace NumberOnlyLayout
187 {
188
189 /**
190 * @brief Enumeration for NumberOnlyLayout Variation type.
191 *
192 * @SINCE_1_3.20
193 */
194 enum Type
195 {
196   NORMAL,                 ///< The plain normal number layout @SINCE_1_3.20
197   WITH_SIGNED,            ///< The number layout to allow a positive or negative sign at the start @SINCE_1_3.20
198   WITH_DECIMAL,           ///< The number layout to allow decimal point to provide fractional value @SINCE_1_3.20
199   WITH_SIGNED_AND_DECIMAL ///< The number layout to allow decimal point and negative sign @SINCE_1_3.20
200 };
201
202 } // namespace NumberOnlyLayout
203
204 /**
205  * @brief Available variation for Password layout.
206  *
207  * @SINCE_1_3.20
208  */
209 namespace PasswordLayout
210 {
211
212 /**
213 * @brief Enumeration for PasswordLayout Variation type.
214 *
215 * @SINCE_1_3.20
216 */
217 enum Type
218 {
219   NORMAL,               ///< The normal password layout @SINCE_1_3.20
220   WITH_NUMBER_ONLY      ///< The password layout to allow only number @SINCE_1_3.20
221 };
222
223 } // namespace PasswordLayout
224
225
226 /**
227  * @DEPRECATED_1_3.20 Use ButtonAction instead.
228  * @brief Enumeration for specifying what the Input Method "action" button functionality is set to.
229  *
230  * The 'Action' button is traditionally the [RETURN] or [DONE] button.
231  *
232  * Not all these actions are supported by all systems.
233  *
234  * Setting a custom label will still require one of these actions to be set.
235  * @SINCE_1_0.0
236  */
237 enum ActionButton
238 {
239   ACTION_DEFAULT,       ///< Default action @SINCE_1_0.0
240   ACTION_DONE,          ///< Done @SINCE_1_0.0
241   ACTION_GO,            ///< Go action @SINCE_1_0.0
242   ACTION_JOIN,          ///< Join action @SINCE_1_0.0
243   ACTION_LOGIN,         ///< Login action @SINCE_1_0.0
244   ACTION_NEXT,          ///< Next action @SINCE_1_0.0
245   ACTION_PREVIOUS,      ///< Previous action @SINCE_1_0.0
246   ACTION_SEARCH,        ///< Search action @SINCE_1_0.0
247   ACTION_SEND,          ///< Send action @SINCE_1_0.0
248   ACTION_SIGNIN,        ///< Sign in action @SINCE_1_0.0
249   ACTION_UNSPECIFIED,   ///< Unspecified action @SINCE_1_0.0
250   ACTION_NONE           ///< Nothing to do @SINCE_1_0.0
251 };
252
253 /**
254  * @DEPRECATED_1_3.20 Use Category instead.
255  * @brief Enumeration for settings that can be changed in the system Input Method.
256  *
257  * Not all these settings are supported by all systems.
258  * @SINCE_1_0.0
259  */
260 enum Settings
261 {
262   ACTION_BUTTON,          ///< ActionButton. Apply the one of the ActionButton functions to the action button (return button). @SINCE_1_0.0
263   AUTO_CAPITALISE,        ///< boolean.      Capitalize the first letter of each sentence automatically. @SINCE_1_0.0
264   AUTO_COMPLETE,          ///< boolean.      Suggest words based on the current input. @SINCE_1_0.0
265   AUTO_CORRECT            ///< boolean.      Automatically correct commonly misspelt words. @SINCE_1_0.0
266 };
267
268 } // namespace InputMethod
269
270 /**
271  * @}
272  */
273 } // namespace Dali
274
275 #endif // __DALI_INPUT_MEHTOD_H__