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 search icon which symbolizes the search field in search bar.
54 * Visible state of the clear button 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 clear button :
60 * "elm,state,clear,visible", "elm,state,clear,hidden"
62 * 2. For maintaining scrollable state of entry :
63 * "elm,state,scroll,enabled", "elm,state,scroll,disabled"
65 * The visible state of search icon can be changed by the following EFL elementary API :
67 * EAPI void elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting)
70 * @param [in] parent The parent widget object
71 * @param [in] type Types for supporting different entry widget modes.
73 * @return elementary entry widget
76 Evas_Object *ea_editfield_add(Evas_Object *parent, Ea_Editfield_Type type);
79 * @brief Disable the clear button. It makes the clear button be hidden always or not.
81 * @details Disable the clear button. If @param disable is EINA_TRUE, it will hide the clear button always.
82 * If @param disable is EINA_FALSE, the clear button will be shown or hidden automatically.
83 * Basically, the clear button will be shown when the text is not empty and
84 * be hidden when the text is empty or the entry loses focus.
86 * @param [in] obj the entry widget object
87 * @param [in] disable EINA_TRUE : the clear button will be hidden always
88 * EINA_FALSE : the clear button will be shown or hidden automatically
91 void ea_editfield_clear_button_disabled_set(Evas_Object *obj, Eina_Bool disable);
94 * @brief Get the disabled state of the clear button.
96 * @details Get the disabled state of clear button. It was seted by ea_editfield_clear_button_disabled_set.
97 * If @return is EINA_TRUE, the clear button was hidden always.
98 * If @return is EINA_FALSE, the clear button will be shown or hidden automatically.
100 * @see ea_editfield_clear_button_disabled_set()
102 * @param [in] obj the entry widget object
104 * @return return the disabled state of the clear button
107 Eina_Bool ea_editfield_clear_button_disabled_get(Evas_Object *obj);
117 #endif /* __EFL_ASSIST_EDITFIELD_H__ */