Initialize efl-assist
[platform/core/uifw/efl-assist.git] / src / include / efl_assist_editfield.h
1 /*
2  * Copyright (c) 2013 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 __EFL_ASSIST_EDITFIELD_H__
19 #define __EFL_ASSIST_EDITFIELD_H__
20
21 #include <Elementary.h>
22 #include <stdbool.h>
23 #ifndef DESKTOP
24         #include <tizen.h>
25 #endif
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /**
32  * @typedef Ea_Editfield_Type
33  *
34  * Editfield Entry types.
35  *
36  * @see ea_editfield_add()
37  */
38 typedef enum
39 {
40    EA_EDITFIELD_SINGLELINE,
41    EA_EDITFIELD_MULTILINE,
42    EA_EDITFIELD_SCROLL_SINGLELINE,
43    EA_EDITFIELD_SCROLL_MULTILINE,
44    EA_EDITFIELD_SCROLL_SINGLELINE_PASSWORD,
45    EA_EDITFIELD_SEARCHBAR
46 } Ea_Editfield_Type;
47
48 /**
49  * @brief Add an elementary entry widget with clear button and rename icon.
50  *
51  * @details Add an elementary entry widget with some special features.
52  *          The first is clear button that will delete all characters in current entry widget.
53  *          The second is rename icon which symbolizes the editable field in dialogue view.
54  *          Visible state of each clear button and rename icon will be changed automatically.
55  *          This API will return an elementary entry widget, and some elm_entry APIs can change
56  *          the internal state of this widget. For maintaining the original states of entry widget,
57  *          following signal emitting is needed :
58  *
59  *          1. For maintaining visible state of rename icon :
60  *                 "elm,state,rename,visible", "elm,state,rename,hidden"
61  *
62  *          2. For maintaining visible state of clear button :
63  *                 "elm,state,clear,visible", "elm,state,clear,hidden"
64  *
65  *          3. For maintaining scrollable state of entry :
66  *                 "elm,state,scroll,enabled", "elm,state,scroll,disabled"
67  *
68  *
69  * @param [in] parent The parent widget object
70  * @param [in] type Types for supporting different entry widget modes.
71  *
72  * @return elementary entry widget
73  *
74  */
75 Evas_Object *ea_editfield_add(Evas_Object *parent, Ea_Editfield_Type type);
76
77 /**
78  * @}
79  */
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 #endif /* __EFL_ASSIST_EDITFIELD_H__ */