forked from enlightenment/efl
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
This commit is contained in:
parent
3642ac66f6
commit
b76f9c8f6e
|
@ -4107,7 +4107,7 @@ _elm_entry_line_wrap_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
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;
|
if (sd->editable == editable) return;
|
||||||
sd->editable = editable;
|
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
|
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;
|
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;
|
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"
|
#include "elm_entry.eo.c"
|
||||||
|
|
|
@ -112,8 +112,7 @@ enum Elm.Cnp_Mode
|
||||||
|
|
||||||
class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
|
class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
|
||||||
Elm.Interface_Atspi_Text, Elm.Interface_Atspi_Editable_Text, Efl.File,
|
Elm.Interface_Atspi_Text, Elm.Interface_Atspi_Editable_Text, Efl.File,
|
||||||
Evas.Selectable_Interface, Evas.Scrollable_Interface,
|
Evas.Selectable_Interface, Evas.Scrollable_Interface)
|
||||||
Evas.Draggable_Interface)
|
|
||||||
{
|
{
|
||||||
eo_prefix: elm_obj_entry;
|
eo_prefix: elm_obj_entry;
|
||||||
methods {
|
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.]]
|
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 {
|
@property anchor_hover_style {
|
||||||
set {
|
set {
|
||||||
[[Set the style that the hover should use
|
[[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.del;
|
||||||
Evas.Object_Smart.show;
|
Evas.Object_Smart.show;
|
||||||
Evas.Object_Smart.hide;
|
Evas.Object_Smart.hide;
|
||||||
Evas.Draggable_Interface.drag_target.set;
|
|
||||||
Evas.Draggable_Interface.drag_target.get;
|
|
||||||
Elm.Widget.activate;
|
Elm.Widget.activate;
|
||||||
Elm.Widget.focus_direction_manager_is;
|
Elm.Widget.focus_direction_manager_is;
|
||||||
Elm.Widget.theme_apply;
|
Elm.Widget.theme_apply;
|
||||||
|
|
|
@ -71,32 +71,3 @@ EAPI Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, E
|
||||||
* @param[out] format The file format
|
* @param[out] format The file format
|
||||||
*/
|
*/
|
||||||
EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *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);
|
|
||||||
|
|
Loading…
Reference in New Issue