summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-04-26 14:29:38 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2016-05-16 11:17:55 +0300
commit26571dea0093c969f363da42f366d72447b95606 (patch)
treec06ddedf91519b63383a6ba3414cbe47ed9a0242
parent251b5eb566b54173d33b34068ef90d5f050b160c (diff)
downloadefl-26571dea0093c969f363da42f366d72447b95606.tar.gz
Evas textblock: port cursor_content_get to eo
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c10
-rw-r--r--src/lib/evas/canvas/evas_textblock.eo13
2 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 0ac8b29a5d..24600259f1 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10078,8 +10078,16 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
EAPI char *
evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
{
+ if (!cur) return NULL;
+ return evas_obj_textblock_cursor_content_get(cur->obj, cur);
+}
+
+EOLIAN static char *
+_evas_textblock_cursor_content_get(Eo *eo_obj,
+ Evas_Textblock_Data *o EINA_UNUSED, const Evas_Textblock_Cursor *cur)
+{
if (!cur || !cur->node) 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);
if (evas_textblock_cursor_format_is_visible_get(cur))
{
diff --git a/src/lib/evas/canvas/evas_textblock.eo b/src/lib/evas/canvas/evas_textblock.eo
index ff6893e401..8f1dbc7f9c 100644
--- a/src/lib/evas/canvas/evas_textblock.eo
+++ b/src/lib/evas/canvas/evas_textblock.eo
@@ -470,6 +470,19 @@ class Evas.Textblock (Evas.Object)
the text. Markup - in textblock markup. Plain - UTF8.]]
}
}
+ cursor_content_get {
+ [[Returns the content in the given cursor's position
+
+ The content is a representation of the actual content: if it is a
+ visible format, then it will return a markup string (e.g. "<ps>"); if
+ it is a unicode character, then it will return the UTF-8 encoding of
+ this character.
+ ]]
+ return: own(char*); [[The representation of the content at $cur.]]
+ params {
+ @in cur: const(Evas.Textblock.Cursor)*; [[The cursor to query.]]
+ }
+ }
style_user_peek @const {
[[Get (don't remove) the style at the top of the user style stack.