aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-09-19 19:36:43 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-09-20 09:19:33 +0300
commitd44131a3aa220b6482b3eb62e207c8c05c10e02e (patch)
treefb984d264e99eab2e732383598b896ed477d3483 /src/lib/edje
parentEdje: move IMF-related part_text API to legacy (diff)
downloadefl-d44131a3aa220b6482b3eb62e207c8c05c10e02e.tar.gz
Edje: move selection-related part_text API to legacy
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/Edje_Legacy.h65
-rw-r--r--src/lib/edje/edje_object.eo64
-rw-r--r--src/lib/edje/edje_util.c54
3 files changed, 99 insertions, 84 deletions
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 2e1efc8ed4..7086acb4bc 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -2549,6 +2549,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);
/**
+ * @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.
*
* This property indicates whether the object is running or not. If stopped (or
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 2463b8408e..9c4a84bf56 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -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]]
}
}
- @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 ------------------------------------------------ */
@property seat {
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 67c18c6535..e76eb582b2 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -1978,10 +1978,13 @@ _edje_efl_text_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
return NULL;
}
-EOLIAN const char *
-_edje_object_part_text_selection_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+EAPI const char *
+edje_object_part_text_selection_get(const Eo *obj, const char *part)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
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;
}
-EOLIAN void
-_edje_object_part_text_select_none(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+EAPI void
+edje_object_part_text_select_none(const Eo *obj, const char *part)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
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);
}
-EOLIAN void
-_edje_object_part_text_select_all(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+EAPI void
+edje_object_part_text_select_all(const Eo *obj, const char *part)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
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
-edje_object_part_text_select_allow_set(const Evas_Object *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_object_part_text_select_allow_set(const Eo *obj, const char *part, Eina_Bool allow)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
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);
}
-EOLIAN void
-_edje_object_part_text_select_abort(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+EAPI void
+edje_object_part_text_select_abort(const Eo *obj, const char *part)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
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);
}
-EOLIAN void
-_edje_object_part_text_select_begin(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+EAPI void
+edje_object_part_text_select_begin(const Eo *obj, const char *part)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
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);
}
-EOLIAN void
-_edje_object_part_text_select_extend(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+EAPI void
+edje_object_part_text_select_extend(const Eo *obj, const char *part)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(&ed, part);