summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-11-17 14:12:59 +0200
committerDaniel Hirt <daniel.hirt@samsung.com>2016-11-17 14:14:45 +0200
commit406ed0df0694a537a8935e839289a09eeee15e80 (patch)
treeeded305563e11b806ab17c32eeec8629df08898b
parentd604a9b83265ca1e491db63504e9da7a4e7265cb (diff)
downloadefl-406ed0df0694a537a8935e839289a09eeee15e80.tar.gz
Edje object: move part_text_append/prepend to legacy
Part of removal of entry-specific usage.
-rw-r--r--src/lib/edje/Edje_Legacy.h30
-rw-r--r--src/lib/edje/edje_object.eo24
-rw-r--r--src/lib/edje/edje_util.c14
3 files changed, 40 insertions, 28 deletions
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 0ca7323983..8b4b775f26 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -615,5 +615,35 @@ EAPI Eina_Bool edje_object_part_text_set(const Edje_Object *obj, const char *par
*/
EAPI const char * edje_object_part_text_get(const Edje_Object *obj, const char *part);
+/**
+ * @brief Append text for an object part
+ *
+ * This function inserts the text for an object part at the end.
+ * It does not move the cursor.
+ *
+ * @param[in] part The part name
+ * @param[in] The text string
+ *
+ * @see edje_object_part_text_insert
+ *
+ * @ingroup Edje_Object
+ */
+EAPI void edje_object_part_text_append(Edje_Object *obj, const char *part, const char *text);
+
+/**
+ * @brief Append text for an object part
+ *
+ * This function inserts the text for an object part at the end.
+ * It cursor is then advanced one position forward.
+ *
+ * @param[in] part The part name
+ * @param[in] The text string
+ *
+ * @see edje_object_part_text_append
+ *
+ * @ingroup Edje_Object
+ */
+
+EAPI void edje_object_part_text_insert(Edje_Object *obj, const char *part, const char *text);
#include "edje_object.eo.legacy.h"
#include "edje_edit.eo.legacy.h"
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index ee3d808a8c..304f41e0f6 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -1256,30 +1256,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
part: string; [[The part name]]
}
}
- part_text_append {
- [[Insert text for an object part.
-
- This function inserts the text for an object part at the end; It does not
- move the cursor.
-
- @since 1.1]]
-
- params {
- @in part: string; [[The part name]]
- @in text: string; [[The text string]]
- }
- }
- part_text_insert {
- [[Insert text for an object part.
-
- This function inserts the text for an object part just before the
- cursor position.]]
-
- params {
- @in part: string; [[The part name]]
- @in text: string; [[The text string]]
- }
- }
part_text_user_insert @const {
[[This function inserts text as if the user has inserted it.
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index bb15d4dc80..3fc538f9f0 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -2382,10 +2382,13 @@ _edje_object_part_text_select_all(Eo *obj EINA_UNUSED, Edje *ed, const char *par
_edje_entry_select_all(rp);
}
-EOLIAN void
-_edje_object_part_text_insert(Eo *obj, Edje *ed, const char *part, const char *text)
+EAPI void
+edje_object_part_text_insert(Eo *obj, const char *part, const char *text)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = efl_data_scope_get(obj, EDJE_OBJECT_CLASS);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(&ed, part);
@@ -2404,10 +2407,13 @@ _edje_object_part_text_insert(Eo *obj, Edje *ed, const char *part, const char *t
ed->text_change.func(ed->text_change.data, obj, part);
}
-EOLIAN void
-_edje_object_part_text_append(Eo *obj, Edje *ed, const char *part, const char *text)
+EAPI void
+edje_object_part_text_append(Eo *obj, const char *part, const char *text)
{
Edje_Real_Part *rp;
+ Edje *ed;
+
+ ed = efl_data_scope_get(obj, EDJE_OBJECT_CLASS);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(&ed, part);