summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-04-21 10:17:21 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2016-05-16 11:17:52 +0300
commiteafd707c7f5b56c4fb87536bb8b4b780db9a114a (patch)
treed6f38849ac273f21123160b303c4e7b5102e56dc
parent3020e014df763e23c75c439702f6d4d2b101645a (diff)
downloadefl-eafd707c7f5b56c4fb87536bb8b4b780db9a114a.tar.gz
Evas textblock: port cursor_paragraph_prev to eo
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c9
-rw-r--r--src/lib/evas/canvas/evas_textblock.eo7
2 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index f8a4750a16..bcadc8604f 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -8140,9 +8140,16 @@ _evas_textblock_cursor_paragraph_next(Eo *eo_obj,
EAPI Eina_Bool
evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur)
{
+ return evas_obj_textblock_cursor_paragraph_prev(cur->obj, cur);
+}
+
+EOLIAN static Eina_Bool
+_evas_textblock_cursor_paragraph_prev(Eo *eo_obj,
+ Evas_Textblock_Data *o EINA_UNUSED, Evas_Textblock_Cursor *cur)
+{
Evas_Object_Textblock_Node_Text *node;
if (!cur) return EINA_FALSE;
- 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, EINA_FALSE);
/* If the current node is a text node, just get the prev if any,
diff --git a/src/lib/evas/canvas/evas_textblock.eo b/src/lib/evas/canvas/evas_textblock.eo
index 41eb7907f1..2fa7fccd45 100644
--- a/src/lib/evas/canvas/evas_textblock.eo
+++ b/src/lib/evas/canvas/evas_textblock.eo
@@ -267,6 +267,13 @@ class Evas.Textblock (Evas.Object)
@in cur: Evas.Textblock.Cursor *; [[The cursor to update.]]
}
}
+ cursor_paragraph_prev {
+ [[Advances to the end of the previous text node]]
+ return: bool; [[$true on success, $false otherwise.]]
+ params {
+ @in cur: Evas.Textblock.Cursor *; [[The cursor to update.]]
+ }
+ }
cursor_word_end {
[[Moves the cursor to the end of the word under the cursor.