diff options
author | Ji-Youn Park <jy0703.park@samsung.com> | 2016-03-22 19:47:48 +0830 |
---|---|---|
committer | Ji-Youn Park <jy0703.park@samsung.com> | 2016-03-22 19:47:51 +0830 |
commit | 9a3c486db4a671be25b4b596f054bd0fc3238d0b (patch) | |
tree | 2ed72762f325b4e0d5547abee3342eeaf6301e87 | |
parent | be156f67e5f487ecbcf0e5019a39d4030a9ddf8b (diff) | |
download | elementary-9a3c486db4a671be25b4b596f054bd0fc3238d0b.tar.gz |
elm_entry: revert drag_target_set API in elm_entry.
elm_entry, editable value is used not only drag_target but also other editable feature
-rw-r--r-- | src/lib/elm_entry.c | 17 | ||||
-rw-r--r-- | src/lib/elm_entry.eo | 27 | ||||
-rw-r--r-- | src/lib/elm_entry_legacy.h | 29 |
3 files changed, 25 insertions, 48 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 81676b2fa..42279fa09 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -4107,7 +4107,7 @@ _elm_entry_line_wrap_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) } EOLIAN static void -_elm_entry_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool editable) +_elm_entry_editable_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool editable) { if (sd->editable == editable) return; sd->editable = editable; @@ -4130,7 +4130,7 @@ _elm_entry_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Entry_Data *sd, } EOLIAN static Eina_Bool -_elm_entry_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) +_elm_entry_editable_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) { return sd->editable; } @@ -5855,17 +5855,4 @@ _elm_entry_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Entry_Data *sd) return ret ? strdup(ret) : NULL; } -/* Legacy deprecated functions */ -EAPI void -elm_entry_editable_set(Evas_Object *obj, Eina_Bool edit) -{ - evas_draggable_interface_drag_target_set(obj, edit); -} - -EAPI Eina_Bool -elm_entry_editable_get(const Evas_Object *obj) -{ - return evas_draggable_interface_drag_target_get(obj); -} - #include "elm_entry.eo.c" diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo index 71825e23c..166c6c75b 100644 --- a/src/lib/elm_entry.eo +++ b/src/lib/elm_entry.eo @@ -112,8 +112,7 @@ enum Elm.Cnp_Mode class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface, Elm.Interface_Atspi_Text, Elm.Interface_Atspi_Editable_Text, Efl.File, - Evas.Selectable_Interface, Evas.Scrollable_Interface, - Evas.Draggable_Interface) + Evas.Selectable_Interface, Evas.Scrollable_Interface) { eo_prefix: elm_obj_entry; methods { @@ -262,6 +261,28 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface, autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]] } } + @property editable { + set { + [[Sets if the entry is to be editable or not. + + By default, entries are editable and when focused, any text input by the + user will be inserted at the current cursor position. But calling this + function with $editable as $false will prevent the user from + inputting text into the entry. + + The only way to change the text of a non-editable entry is to use + \@ref elm_object_text_set, \@ref elm_entry_entry_insert and other related + functions. + ]] + } + get { + [[Get whether the entry is editable or not.]] + } + values { + editable: bool; [[If $true, user input will be inserted in the entry, + if not, the entry is read-only and no user input is allowed.]] + } + } @property anchor_hover_style { set { [[Set the style that the hover should use @@ -904,8 +925,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface, Evas.Object_Smart.del; Evas.Object_Smart.show; Evas.Object_Smart.hide; - Evas.Draggable_Interface.drag_target.set; - Evas.Draggable_Interface.drag_target.get; Elm.Widget.activate; Elm.Widget.focus_direction_manager_is; Elm.Widget.theme_apply; diff --git a/src/lib/elm_entry_legacy.h b/src/lib/elm_entry_legacy.h index 040fef50c..2a305440e 100644 --- a/src/lib/elm_entry_legacy.h +++ b/src/lib/elm_entry_legacy.h @@ -71,32 +71,3 @@ EAPI Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, E * @param[out] format The file format */ EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format); - -/** - * @brief Sets if the entry is to be editable or not. - * - * By default, entries are editable and when focused, any text input by the - * user will be inserted at the current cursor position. But calling this - * function with @c editable as @c false will prevent the user from inputting - * text into the entry. - * - * The only way to change the text of a non-editable entry is to use @ref - * elm_object_text_set, @ref elm_entry_entry_insert and other related - * functions. - * - * @param[in] editable If @c true, user input will be inserted in the entry, if - * not, the entry is read-only and no user input is allowed. - * - * @ingroup Elm_Entry - */ -EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable); - -/** - * @brief Get whether the entry is editable or not. - * - * @return If @c true, user input will be inserted in the entry, if not, the - * entry is read-only and no user input is allowed. - * - * @ingroup Elm_Entry - */ -EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj); |