2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef __EFL_ASSIST_EDITFIELD_H__
19 #define __EFL_ASSIST_EDITFIELD_H__
21 #include <Elementary.h>
32 * @typedef Ea_Editfield_Type
34 * Editfield Entry types.
36 * @see ea_editfield_add()
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
49 * @brief Add an elementary entry widget with clear button and rename icon.
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 :
59 * 1. For maintaining visible state of rename icon :
60 * "elm,state,rename,visible", "elm,state,rename,hidden"
62 * 2. For maintaining visible state of clear button :
63 * "elm,state,clear,visible", "elm,state,clear,hidden"
65 * 3. For maintaining scrollable state of entry :
66 * "elm,state,scroll,enabled", "elm,state,scroll,disabled"
69 * @param [in] parent The parent widget object
70 * @param [in] type Types for supporting different entry widget modes.
72 * @return elementary entry widget
75 Evas_Object *ea_editfield_add(Evas_Object *parent, Ea_Editfield_Type type);
78 * @brief Disable the clear button. It makes the clear button be hidden always or not.
80 * @details Disable the clear button. If @param disable is EINA_TRUE, it will hide the clear button always.
81 * If @param disable is EINA_FALSE, the clear button will be shown or hidden automatically.
83 * @param [in] obj the entry widget object
84 * @param [in] disable EINA_TRUE : the clear button will be hidden always
85 * EINA_FALSE : the clear button will be shown or hidden automatically
88 EXPORT_API void ea_editfield_clear_button_disabled_set(Evas_Object *obj, Eina_Bool disable);
91 * @brief Get the disabled state of the clear button.
93 * @details Get the disabled state of clear button. It was seted by ea_editfield_clear_button_disabled_set.
94 * If @return is EINA_TRUE, the clear button was hidden always.
95 * If @return is EINA_FALSE, the clear button will be shown or hidden automatically.
97 * @see ea_editfield_clear_button_disabled_set()
99 * @param [in] obj the entry widget object
101 * @return return the disabled state of the clear button
104 EXPORT_API Eina_Bool ea_editfield_clear_button_disabled_get(Evas_Object *obj);
114 #endif /* __EFL_ASSIST_EDITFIELD_H__ */