summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-04-25 13:55:23 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2016-05-16 11:17:53 +0300
commit5605a6be81b31df4dcd54ceedfc6513ab12ae9bb (patch)
tree5e66b184f2ca942e8bfc48a9f98845c18592857e
parent4ba7eef10517c300b17f792f187d51c02a78f729 (diff)
downloadefl-5605a6be81b31df4dcd54ceedfc6513ab12ae9bb.tar.gz
Evas textblock: port cursor_compare to eo
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c10
-rw-r--r--src/lib/evas/canvas/evas_textblock.eo12
2 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index ef4fb601e0..55fcbae83d 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -9156,11 +9156,19 @@ _evas_textblock_cursor_line_set(Eo *eo_obj,
EAPI int
evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
{
+ return evas_obj_textblock_cursor_compare(cur1->obj, cur1, cur2);
+}
+
+EOLIAN static int
+_evas_textblock_cursor_compare(Eo *eo_obj,
+ Evas_Textblock_Data *o EINA_UNUSED,
+ const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
+{
Eina_Inlist *l1, *l2;
if (!cur1) return 0;
if (!cur2) return 0;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (cur1->obj != cur2->obj) return 0;
if ((!cur1->node) || (!cur2->node)) return 0;
diff --git a/src/lib/evas/canvas/evas_textblock.eo b/src/lib/evas/canvas/evas_textblock.eo
index c3df1ff1ba..3af636146c 100644
--- a/src/lib/evas/canvas/evas_textblock.eo
+++ b/src/lib/evas/canvas/evas_textblock.eo
@@ -352,6 +352,18 @@ class Evas.Textblock (Evas.Object)
@in cur: Evas.Textblock.Cursor *; [[The cursor to move.]]
}
}
+ cursor_compare {
+ [[Compares two cursors.
+
+ Note that 0 will be returned if they are cursors of different
+ textblock objects.
+ ]]
+ return: int; [[-1 if cur1 < cur2, 0 if cur1 == cur2, 1 otherwise.]]
+ params {
+ @in cur1: const(Evas.Textblock.Cursor)*; [[The first cursor.]]
+ @in cur2: const(Evas.Textblock.Cursor)*; [[The second cursor.]]
+ }
+ }
style_user_peek @const {
[[Get (don't remove) the style at the top of the user style stack.