summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-04-25 17:00:35 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2016-05-16 11:17:54 +0300
commit0bd5f969bd924f35862d559d5dd15ad052bbafd0 (patch)
tree5d90c0341e2eb85f6d52f371e56cdc44eef0b124
parent194a6e58e3bf98e2866efe8d249f7cacb9f82512 (diff)
downloadefl-0bd5f969bd924f35862d559d5dd15ad052bbafd0.tar.gz
Evas textblock: port cursor_paragraph_text_get to eo
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c9
-rw-r--r--src/lib/evas/canvas/evas_textblock.eo10
2 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 31b8def617..390dc9eb57 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10368,9 +10368,16 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
EAPI const char *
evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
{
+ return evas_obj_textblock_cursor_paragraph_text_get(cur->obj, cur);
+}
+
+EOLIAN static const char *
+_evas_textblock_cursor_paragraph_text_get(Eo *eo_obj,
+ Evas_Textblock_Data *o EINA_UNUSED, const Evas_Textblock_Cursor *cur)
+{
Evas_Textblock_Cursor cur1, cur2;
if (!cur) return NULL;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, NULL);
if (cur->node->utf8)
diff --git a/src/lib/evas/canvas/evas_textblock.eo b/src/lib/evas/canvas/evas_textblock.eo
index d59d12f893..01fe6ceccc 100644
--- a/src/lib/evas/canvas/evas_textblock.eo
+++ b/src/lib/evas/canvas/evas_textblock.eo
@@ -413,6 +413,16 @@ class Evas.Textblock (Evas.Object)
@in cur2: Evas.Textblock.Cursor *; [[Range end position.]]
}
}
+ cursor_paragraph_text_get {
+ [[Returns the text of the paragraph cur points to.
+
+ The text is returned as markup.
+ ]]
+ return: const(char)*; [[The markup of the paragraph point by $cur.]]
+ params {
+ @in cur: const(Evas.Textblock.Cursor)*; [[The cursor we query.]]
+ }
+ }
style_user_peek @const {
[[Get (don't remove) the style at the top of the user style stack.