diff options
author | Daniel Hirt <daniel.hirt@samsung.com> | 2016-05-01 18:33:26 +0300 |
---|---|---|
committer | Daniel Hirt <daniel.hirt@samsung.com> | 2016-05-16 11:17:55 +0300 |
commit | 6eb432350c285147f6b8fc40ed2b40d6f485d020 (patch) | |
tree | 08cfddbde22d19971106d949dd3229dc470e5632 | |
parent | 2e747c7ad53310ef77762df4e25191470e6c119c (diff) | |
download | efl-6eb432350c285147f6b8fc40ed2b40d6f485d020.tar.gz |
Evas textblock: port cursor_visible_range_get to eo
-rw-r--r-- | src/lib/evas/canvas/evas_object_textblock.c | 9 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_textblock.eo | 15 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 468925cba1..e8651d1094 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -10941,9 +10941,16 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) { + return evas_obj_textblock_cursor_visible_range_get(start->obj, start, end); +} + +EOLIAN static Eina_Bool +_evas_textblock_cursor_visible_range_get(Eo *eo_obj, + Evas_Textblock_Data *o EINA_UNUSED, + Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) +{ Evas *eo_e; Evas_Coord cy, ch; - Evas_Object *eo_obj = start->obj; Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); evas_object_async_block(obj); TB_HEAD_RETURN(EINA_FALSE); diff --git a/src/lib/evas/canvas/evas_textblock.eo b/src/lib/evas/canvas/evas_textblock.eo index 04c4e42b10..5fb529571b 100644 --- a/src/lib/evas/canvas/evas_textblock.eo +++ b/src/lib/evas/canvas/evas_textblock.eo @@ -435,6 +435,21 @@ class Evas.Textblock (Evas.Object) the paragraph with.]] } } + cursor_visible_range_get { + [[Return the currently visible range. + + The given $start and $end cursor act like an out-variables here, + as these are set to the positions of the start and the end of the + visible range in the text, respectively. + + @since 1.1. + ]] + return: bool; [[$true on success, $false otherwise.]] + params { + @in start: Evas.Textblock.Cursor *; [[Range start position.]] + @in end: Evas.Textblock.Cursor *; [[Range end position.]] + } + } style_user_peek @const { [[Get (don't remove) the style at the top of the user style stack. |