diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2018-08-20 07:21:53 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2018-08-20 10:29:32 -0400 |
commit | 517018e00897f61136418861563a49144a5fe39a (patch) | |
tree | 694c299402631380a10a7ad6ddbebfbb774e7e91 /src/lib/efl/interfaces/efl_text_cursor.eo | |
parent | 8da56ac873d5bb083b7cfe08aeefdaa2ad9a4b99 (diff) |
evas textblock: add/apply cursor cluster APIs based on grapheme cluster
Summary:
Add a feature for moving cursor over a grapheme cluster.
It is applied to edje_entry.c and elm_entry.c for improving
cursor handling just like other modern text editors. ex) gedit
The patch on Evas needs to update libunibreak library.
So, the patch will update libunibreak, too.
@feature
Test Plan:
1. Put "ഹലോ" in your entry.
2. Your cursor can reach at the end of text from the beginning
only in 2 right key event with this feature.
Reviewers: raster, cedric, jpeg, herdsman, zmike, devilhorns
Reviewed By: herdsman, zmike
Subscribers: #reviewers, #committers, zmike, bowonryu, woohyun
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D5490
Diffstat (limited to '')
-rw-r--r-- | src/lib/efl/interfaces/efl_text_cursor.eo | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_text_cursor.eo b/src/lib/efl/interfaces/efl_text_cursor.eo index 973c7d85bd..b0e4c28b51 100644 --- a/src/lib/efl/interfaces/efl_text_cursor.eo +++ b/src/lib/efl/interfaces/efl_text_cursor.eo | |||
@@ -145,6 +145,20 @@ interface Efl.Text_Cursor { | |||
145 | /* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]] | 145 | /* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]] |
146 | } | 146 | } |
147 | } | 147 | } |
148 | cursor_cluster_next { | ||
149 | [[Advances to the next grapheme cluster]] | ||
150 | legacy: null; | ||
151 | params { | ||
152 | /* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]] | ||
153 | } | ||
154 | } | ||
155 | cursor_cluster_prev { | ||
156 | [[Advances to the previous grapheme cluster]] | ||
157 | legacy: null; | ||
158 | params { | ||
159 | /* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]] | ||
160 | } | ||
161 | } | ||
148 | cursor_paragraph_char_first { | 162 | cursor_paragraph_char_first { |
149 | [[Advances to the first character in this paragraph]] | 163 | [[Advances to the first character in this paragraph]] |
150 | legacy: null; | 164 | legacy: null; |
@@ -232,6 +246,17 @@ interface Efl.Text_Cursor { | |||
232 | @in y: int; [[Y coord to set by.]] | 246 | @in y: int; [[Y coord to set by.]] |
233 | } | 247 | } |
234 | } | 248 | } |
249 | cursor_cluster_coord_set { | ||
250 | [[Set cursor coordinates according to grapheme clusters. | ||
251 | It does not allow to put a cursor to the middle of a grapheme cluster. | ||
252 | ]] | ||
253 | legacy: null; | ||
254 | params { | ||
255 | /* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]] | ||
256 | @in x: int; [[X coord to set by.]] | ||
257 | @in y: int; [[Y coord to set by.]] | ||
258 | } | ||
259 | } | ||
235 | cursor_text_insert { | 260 | cursor_text_insert { |
236 | [[Adds text to the current cursor position and set the cursor to | 261 | [[Adds text to the current cursor position and set the cursor to |
237 | *after* the start of the text just added. | 262 | *after* the start of the text just added. |