Page MenuHomePhabricator

Evas_textblock: Add evas_textblock_cursor_is_inside_word_get API
Needs RevisionPublic

Authored by shilpasingh on Dec 30 2015, 6:39 AM.

Details

Summary

Add evas_textblock_cursor_is_inside_word_get API to determine whether cursor is
inside a word or is pointing to a word break character.
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>

@feature

Test Plan

API should return EINA_TRUE if cursor is inside word else EINA_FALSE, test case also updated

Diff Detail

Repository
rEFL core/efl
Branch
textblock
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1001
Build 1066: arc lint + arc unit
shilpasingh updated this revision to Diff 8010.Dec 30 2015, 6:39 AM
shilpasingh retitled this revision from to Evas_textblock: Add evas_textblock_cursor_is_inside_word API.
shilpasingh updated this object.
shilpasingh edited the test plan for this revision. (Show Details)
shilpasingh added reviewers: tasn, herdsman.
shilpasingh added subscribers: thiepha, subodh6129.
This comment was removed by shilpasingh.
shilpasingh updated this revision to Diff 8017.Dec 31 2015, 2:04 AM

Added test case

shilpasingh updated this revision to Diff 8018.Dec 31 2015, 2:29 AM

Updated test case.

tasn requested changes to this revision.Dec 31 2015, 6:12 AM
tasn edited edge metadata.

What's the purpose of this API? Also, the naming of this API does not conform with our naming convention. The correct naming would be:

evas_textblock_cursor_word_is_inside(), but even that is not a good name. Maybe evas_textblock_cursor_word_is() would be better.

Anyhow, I don't understand the purpose of this API, more info would be appreciated.

This revision now requires changes to proceed.Dec 31 2015, 6:12 AM
shilpasingh added a comment.EditedJan 4 2016, 10:36 PM

@tasn,

How about evas_textblock_cursor_is_inside_word_get
some what similar to name evas_textblock_cursor_format_is_visible_get
and also purpose becomes clearly understandable?
else evas_textblock_cursor_word_is() also seems fine.

Purpose:
For requirements/applications which track input and need to know when was word inputted. For e.g:
Spellchecker: In entry changed, the Input text is monitored continuously and once its known that word was successfully inputted, the word is sent for spellchecking and not just that this API is also used for further other
logic's as well. (as this API gives more control)

Applications which track word input will need this, say for e.g: Transliteration
I am using english keyboard and once I have entered the word successfully, that word gets replaced by original
script, if not for above API, I wont know when to actually replace

shilpasingh requested a review of this revision.Jan 4 2016, 11:32 PM
shilpasingh edited edge metadata.
shilpasingh updated this revision to Diff 8052.Jan 4 2016, 11:49 PM
shilpasingh edited edge metadata.

API name modified.

shilpasingh updated this revision to Diff 8053.Jan 4 2016, 11:51 PM

Test case also updated

shilpasingh retitled this revision from Evas_textblock: Add evas_textblock_cursor_is_inside_word API to Evas_textblock: Add evas_textblock_cursor_is_inside_word_get API.Jan 4 2016, 11:52 PM
shilpasingh updated this object.
shilpasingh edited the test plan for this revision. (Show Details)
shilpasingh updated this object.Jan 5 2016, 11:26 PM
shilpasingh added subscribers: rajeshps, govi.
raster edited edge metadata.Jul 11 2016, 7:08 PM

sorry shilpa! this one seems to have languished. i think it's time to push it along again. @tasn - yes name will have to change and interfaces api makes all of this be different now. i can see this as convenient.

In D3511#69139, @raster wrote:

sorry shilpa! this one seems to have languished. i think it's time to push it along again. @tasn - yes name will have to change and interfaces api makes all of this be different now. i can see this as convenient.

@raster, I changed the name from evas_textblock_cursor_is_inside_word to evas_textblock_cursor_is_inside_word_get based on @tasn comment
some what similar to name evas_textblock_cursor_format_is_visible_get
and by this name it looks like the purpose of API becomes clearly understandable

what do you think? @tasn also suggested below name
evas_textblock_cursor_word_is() should I use this name?

and anyother change is needed?

jpeg added a comment.Sep 20 2016, 10:35 PM

@herdsman could this patch be translated to a proper eo function for the new text interface?

src/lib/evas/canvas/evas_object_textblock.c
8285

no safety check on the index i ?

zmike added a project: efl.May 2 2018, 3:30 PM
zmike added a subscriber: zmike.

This needs rebasing.

@herdsman

This revision now requires changes to proceed.May 2 2018, 3:30 PM