summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-03-22 19:47:48 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-03-22 19:47:51 +0830
commitb76f9c8f6e96b9bc5d468bb0d2d26343a4011e4d (patch)
tree02769b2f744fd92d7641dbc5a397d84e7b3bc09b /legacy
parent3642ac66f667123bdccb01227d1ffb217f9230d2 (diff)
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
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/lib/elm_entry.c17
-rw-r--r--legacy/elementary/src/lib/elm_entry.eo27
-rw-r--r--legacy/elementary/src/lib/elm_entry_legacy.h29
3 files changed, 25 insertions, 48 deletions
diff --git a/legacy/elementary/src/lib/elm_entry.c b/legacy/elementary/src/lib/elm_entry.c
index 81676b2fa7..42279fa09d 100644
--- a/legacy/elementary/src/lib/elm_entry.c
+++ b/legacy/elementary/src/lib/elm_entry.c
@@ -4107,7 +4107,7 @@ _elm_entry_line_wrap_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
4107} 4107}
4108 4108
4109EOLIAN static void 4109EOLIAN static void
4110_elm_entry_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool editable) 4110_elm_entry_editable_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool editable)
4111{ 4111{
4112 if (sd->editable == editable) return; 4112 if (sd->editable == editable) return;
4113 sd->editable = editable; 4113 sd->editable = editable;
@@ -4130,7 +4130,7 @@ _elm_entry_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Entry_Data *sd,
4130} 4130}
4131 4131
4132EOLIAN static Eina_Bool 4132EOLIAN static Eina_Bool
4133_elm_entry_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) 4133_elm_entry_editable_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
4134{ 4134{
4135 return sd->editable; 4135 return sd->editable;
4136} 4136}
@@ -5855,17 +5855,4 @@ _elm_entry_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Entry_Data *sd)
5855 return ret ? strdup(ret) : NULL; 5855 return ret ? strdup(ret) : NULL;
5856} 5856}
5857 5857
5858/* Legacy deprecated functions */
5859EAPI void
5860elm_entry_editable_set(Evas_Object *obj, Eina_Bool edit)
5861{
5862 evas_draggable_interface_drag_target_set(obj, edit);
5863}
5864
5865EAPI Eina_Bool
5866elm_entry_editable_get(const Evas_Object *obj)
5867{
5868 return evas_draggable_interface_drag_target_get(obj);
5869}
5870
5871#include "elm_entry.eo.c" 5858#include "elm_entry.eo.c"
diff --git a/legacy/elementary/src/lib/elm_entry.eo b/legacy/elementary/src/lib/elm_entry.eo
index 71825e23c2..166c6c75b9 100644
--- a/legacy/elementary/src/lib/elm_entry.eo
+++ b/legacy/elementary/src/lib/elm_entry.eo
@@ -112,8 +112,7 @@ enum Elm.Cnp_Mode
112 112
113class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface, 113class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
114 Elm.Interface_Atspi_Text, Elm.Interface_Atspi_Editable_Text, Efl.File, 114 Elm.Interface_Atspi_Text, Elm.Interface_Atspi_Editable_Text, Efl.File,
115 Evas.Selectable_Interface, Evas.Scrollable_Interface, 115 Evas.Selectable_Interface, Evas.Scrollable_Interface)
116 Evas.Draggable_Interface)
117{ 116{
118 eo_prefix: elm_obj_entry; 117 eo_prefix: elm_obj_entry;
119 methods { 118 methods {
@@ -262,6 +261,28 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
262 autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]] 261 autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]]
263 } 262 }
264 } 263 }
264 @property editable {
265 set {
266 [[Sets if the entry is to be editable or not.
267
268 By default, entries are editable and when focused, any text input by the
269 user will be inserted at the current cursor position. But calling this
270 function with $editable as $false will prevent the user from
271 inputting text into the entry.
272
273 The only way to change the text of a non-editable entry is to use
274 \@ref elm_object_text_set, \@ref elm_entry_entry_insert and other related
275 functions.
276 ]]
277 }
278 get {
279 [[Get whether the entry is editable or not.]]
280 }
281 values {
282 editable: bool; [[If $true, user input will be inserted in the entry,
283 if not, the entry is read-only and no user input is allowed.]]
284 }
285 }
265 @property anchor_hover_style { 286 @property anchor_hover_style {
266 set { 287 set {
267 [[Set the style that the hover should use 288 [[Set the style that the hover should use
@@ -904,8 +925,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
904 Evas.Object_Smart.del; 925 Evas.Object_Smart.del;
905 Evas.Object_Smart.show; 926 Evas.Object_Smart.show;
906 Evas.Object_Smart.hide; 927 Evas.Object_Smart.hide;
907 Evas.Draggable_Interface.drag_target.set;
908 Evas.Draggable_Interface.drag_target.get;
909 Elm.Widget.activate; 928 Elm.Widget.activate;
910 Elm.Widget.focus_direction_manager_is; 929 Elm.Widget.focus_direction_manager_is;
911 Elm.Widget.theme_apply; 930 Elm.Widget.theme_apply;
diff --git a/legacy/elementary/src/lib/elm_entry_legacy.h b/legacy/elementary/src/lib/elm_entry_legacy.h
index 040fef50c4..2a305440e5 100644
--- a/legacy/elementary/src/lib/elm_entry_legacy.h
+++ b/legacy/elementary/src/lib/elm_entry_legacy.h
@@ -71,32 +71,3 @@ EAPI Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, E
71 * @param[out] format The file format 71 * @param[out] format The file format
72 */ 72 */
73EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format); 73EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format);
74
75/**
76 * @brief Sets if the entry is to be editable or not.
77 *
78 * By default, entries are editable and when focused, any text input by the
79 * user will be inserted at the current cursor position. But calling this
80 * function with @c editable as @c false will prevent the user from inputting
81 * text into the entry.
82 *
83 * The only way to change the text of a non-editable entry is to use @ref
84 * elm_object_text_set, @ref elm_entry_entry_insert and other related
85 * functions.
86 *
87 * @param[in] editable If @c true, user input will be inserted in the entry, if
88 * not, the entry is read-only and no user input is allowed.
89 *
90 * @ingroup Elm_Entry
91 */
92EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
93
94/**
95 * @brief Get whether the entry is editable or not.
96 *
97 * @return If @c true, user input will be inserted in the entry, if not, the
98 * entry is read-only and no user input is allowed.
99 *
100 * @ingroup Elm_Entry
101 */
102EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj);