Edje: move selection-related part_text API to legacy
This commit is contained in:
parent
380b3eb09a
commit
d44131a3aa
|
@ -2548,6 +2548,71 @@ EAPI Eina_Bool edje_object_part_text_input_panel_show_on_demand_get(const Edje_O
|
||||||
*/
|
*/
|
||||||
EAPI void edje_object_part_text_prediction_hint_set(Edje_Object *obj, const char *part, const char *prediction_hint);
|
EAPI void edje_object_part_text_prediction_hint_set(Edje_Object *obj, const char *part, const char *prediction_hint);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Starts selecting at current cursor position
|
||||||
|
*
|
||||||
|
* @param[in] part The part name
|
||||||
|
*
|
||||||
|
* @ingroup Edje_Object
|
||||||
|
*/
|
||||||
|
EAPI void edje_object_part_text_select_begin(const Edje_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Aborts any selection action on a part.
|
||||||
|
*
|
||||||
|
* @param[in] part The part name
|
||||||
|
*
|
||||||
|
* @ingroup Edje_Object
|
||||||
|
*/
|
||||||
|
EAPI void edje_object_part_text_select_abort(const Edje_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Extends the current selection to the current cursor position
|
||||||
|
*
|
||||||
|
* @param[in] part The part name
|
||||||
|
*
|
||||||
|
* @ingroup Edje_Object
|
||||||
|
*/
|
||||||
|
EAPI void edje_object_part_text_select_extend(const Edje_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the selection to be everything.
|
||||||
|
*
|
||||||
|
* This function selects all text of the object of the part.
|
||||||
|
*
|
||||||
|
* @param[in] part The part name
|
||||||
|
*
|
||||||
|
* @ingroup Edje_Object
|
||||||
|
*/
|
||||||
|
EAPI void edje_object_part_text_select_all(const Edje_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the selection to be none.
|
||||||
|
*
|
||||||
|
* This function sets the selection text to be none.
|
||||||
|
*
|
||||||
|
* @param[in] part The part name
|
||||||
|
*
|
||||||
|
* @ingroup Edje_Object
|
||||||
|
*/
|
||||||
|
EAPI void edje_object_part_text_select_none(const Edje_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the selection text of the object part.
|
||||||
|
*
|
||||||
|
* This function returns selection text of the object part.
|
||||||
|
*
|
||||||
|
* See also @ref edje_object_part_text_select_all() and
|
||||||
|
* @ref edje_object_part_text_select_none()
|
||||||
|
*
|
||||||
|
* @param[in] part The part name
|
||||||
|
*
|
||||||
|
* @return The text string
|
||||||
|
*
|
||||||
|
* @ingroup Edje_Object
|
||||||
|
*/
|
||||||
|
EAPI const char *edje_object_part_text_selection_get(const Edje_Object *obj, const char *part);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Whether this object is playing or not.
|
* @brief Whether this object is playing or not.
|
||||||
*
|
*
|
||||||
|
|
|
@ -365,70 +365,6 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
|
||||||
data: void_ptr; [[The data pointer to pass to the func callback]]
|
data: void_ptr; [[The data pointer to pass to the func callback]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property part_text_select_allow {
|
|
||||||
set {
|
|
||||||
[[Enables selection if the entry is an EXPLICIT selection mode
|
|
||||||
type.
|
|
||||||
|
|
||||||
The default is to not allow selection. This function only affects user
|
|
||||||
selection, functions such as edje_object_part_text_select_all() and
|
|
||||||
edje_object_part_text_select_none() are not affected.]]
|
|
||||||
legacy: null;
|
|
||||||
}
|
|
||||||
keys {
|
|
||||||
part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
allow: bool; [[$true to enable, $false otherwise]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part_text_select_begin @const {
|
|
||||||
[[Starts selecting at current cursor position]]
|
|
||||||
params {
|
|
||||||
@in part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part_text_select_abort @const {
|
|
||||||
[[Aborts any selection action on a part.]]
|
|
||||||
params {
|
|
||||||
@in part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part_text_select_extend @const {
|
|
||||||
[[Extends the current selection to the current cursor position]]
|
|
||||||
params {
|
|
||||||
@in part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part_text_select_all @const {
|
|
||||||
[[Sets the selection to be everything.
|
|
||||||
|
|
||||||
This function selects all text of the object of the part.]]
|
|
||||||
params {
|
|
||||||
@in part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part_text_select_none @const {
|
|
||||||
[[Sets the selection to be none.
|
|
||||||
|
|
||||||
This function sets the selection text to be none.]]
|
|
||||||
params {
|
|
||||||
@in part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property part_text_selection {
|
|
||||||
get {
|
|
||||||
[[Returns the selection text of the object part.
|
|
||||||
|
|
||||||
This function returns selection text of the object part.
|
|
||||||
|
|
||||||
See also @.part_text_select_all() and @.part_text_select_none()]]
|
|
||||||
return: string; [[The text string]]
|
|
||||||
}
|
|
||||||
keys {
|
|
||||||
part: string; [[The part name]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* TEXT PART APIS END ------------------------------------------------ */
|
/* TEXT PART APIS END ------------------------------------------------ */
|
||||||
|
|
||||||
@property seat {
|
@property seat {
|
||||||
|
|
|
@ -1978,10 +1978,13 @@ _edje_efl_text_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN const char *
|
EAPI const char *
|
||||||
_edje_object_part_text_selection_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
edje_object_part_text_selection_get(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return NULL;
|
if ((!ed) || (!part)) return NULL;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
@ -1992,10 +1995,13 @@ _edje_object_part_text_selection_get(Eo *obj EINA_UNUSED, Edje *ed, const char *
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN void
|
EAPI void
|
||||||
_edje_object_part_text_select_none(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
edje_object_part_text_select_none(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
@ -2004,10 +2010,13 @@ _edje_object_part_text_select_none(Eo *obj EINA_UNUSED, Edje *ed, const char *pa
|
||||||
_edje_entry_select_none(rp);
|
_edje_entry_select_none(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN void
|
EAPI void
|
||||||
_edje_object_part_text_select_all(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
edje_object_part_text_select_all(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
@ -2037,16 +2046,12 @@ _edje_object_part_text_cursor_geometry_get(Eo *obj EINA_UNUSED, Edje *ed, const
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow)
|
edje_object_part_text_select_allow_set(const Eo *obj, const char *part, Eina_Bool allow)
|
||||||
{
|
|
||||||
edje_obj_part_text_select_allow_set((Eo *)obj, part, allow);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
EOLIAN void
|
|
||||||
_edje_object_part_text_select_allow_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Eina_Bool allow)
|
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
@ -2055,10 +2060,13 @@ _edje_object_part_text_select_allow_set(Eo *obj EINA_UNUSED, Edje *ed, const cha
|
||||||
_edje_entry_select_allow_set(rp, allow);
|
_edje_entry_select_allow_set(rp, allow);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN void
|
EAPI void
|
||||||
_edje_object_part_text_select_abort(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
edje_object_part_text_select_abort(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
@ -2067,10 +2075,13 @@ _edje_object_part_text_select_abort(Eo *obj EINA_UNUSED, Edje *ed, const char *p
|
||||||
_edje_entry_select_abort(rp);
|
_edje_entry_select_abort(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN void
|
EAPI void
|
||||||
_edje_object_part_text_select_begin(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
edje_object_part_text_select_begin(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
@ -2079,10 +2090,13 @@ _edje_object_part_text_select_begin(Eo *obj EINA_UNUSED, Edje *ed, const char *p
|
||||||
_edje_entry_select_begin(rp);
|
_edje_entry_select_begin(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN void
|
EAPI void
|
||||||
_edje_object_part_text_select_extend(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
edje_object_part_text_select_extend(const Eo *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
rp = _edje_real_part_recursive_get(&ed, part);
|
rp = _edje_real_part_recursive_get(&ed, part);
|
||||||
|
|
|
@ -930,13 +930,6 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
|
||||||
elm_widget_theme_object_set
|
elm_widget_theme_object_set
|
||||||
(obj, sd->entry_edje, "efl_ui_text", _efl_ui_text_theme_group_get(obj), style);
|
(obj, sd->entry_edje, "efl_ui_text", _efl_ui_text_theme_group_get(obj), style);
|
||||||
|
|
||||||
if (sd->sel_allow && _elm_config->desktop_entry)
|
|
||||||
edje_obj_part_text_select_allow_set
|
|
||||||
(sd->entry_edje, "elm.text", EINA_TRUE);
|
|
||||||
else
|
|
||||||
edje_obj_part_text_select_allow_set
|
|
||||||
(sd->entry_edje, "elm.text", EINA_FALSE);
|
|
||||||
|
|
||||||
if (elm_widget_disabled_get(obj))
|
if (elm_widget_disabled_get(obj))
|
||||||
edje_object_signal_emit(sd->entry_edje, "elm,state,disabled", "elm");
|
edje_object_signal_emit(sd->entry_edje, "elm,state,disabled", "elm");
|
||||||
|
|
||||||
|
|
|
@ -886,10 +886,10 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
|
||||||
(obj, sd->entry_edje, "entry", _elm_entry_theme_group_get(obj), style);
|
(obj, sd->entry_edje, "entry", _elm_entry_theme_group_get(obj), style);
|
||||||
|
|
||||||
if (sd->sel_allow && _elm_config->desktop_entry)
|
if (sd->sel_allow && _elm_config->desktop_entry)
|
||||||
edje_obj_part_text_select_allow_set
|
edje_object_part_text_select_allow_set
|
||||||
(sd->entry_edje, "elm.text", EINA_TRUE);
|
(sd->entry_edje, "elm.text", EINA_TRUE);
|
||||||
else
|
else
|
||||||
edje_obj_part_text_select_allow_set
|
edje_object_part_text_select_allow_set
|
||||||
(sd->entry_edje, "elm.text", EINA_FALSE);
|
(sd->entry_edje, "elm.text", EINA_FALSE);
|
||||||
|
|
||||||
edje_object_part_text_style_user_push(sd->entry_edje, "elm.text", stl_user);
|
edje_object_part_text_style_user_push(sd->entry_edje, "elm.text", stl_user);
|
||||||
|
@ -5449,7 +5449,7 @@ _elm_entry_select_allow_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, Eina_Bool a
|
||||||
if (sd->sel_allow == allow) return;
|
if (sd->sel_allow == allow) return;
|
||||||
sd->sel_allow = allow;
|
sd->sel_allow = allow;
|
||||||
|
|
||||||
edje_obj_part_text_select_allow_set(sd->entry_edje, "elm.text", allow);
|
edje_object_part_text_select_allow_set(sd->entry_edje, "elm.text", allow);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue