diff options
author | Ali Alzyod <ali198724@gmail.com> | 2019-11-22 17:35:54 +0900 |
---|---|---|
committer | WooHyun Jung <wh0705.jung@samsung.com> | 2019-11-22 17:35:54 +0900 |
commit | d7352f4db41dc8975eaeb3f79dff326338a5a63c (patch) | |
tree | be0fc63995e40f4c3a764f2ffdb66716dfcc6c38 /src/lib/efl/Efl.h | |
parent | 17ba8515f1c9534ebd47a71adda71db2eff6799a (diff) |
Efl.Text.Cursor
Summary:
Implementation of new cursor text object.
This Patch Contains :
1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor
=> there are some modifications on cursor methods
2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces
3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory
4- Add main cursor property into efl.text.interactive
5- Add cursor_new method in efl.ui.text (I think we may move it into efl.text.interactive interface)
There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement.
```
enum @beta Efl.Text.Cursor_Move_Type
{
[[Text cursor movement types]]
char_next, [[Advances to the next character]]
char_prev, [[Advances to the previous character]]
cluster_next, [[Advances to the next grapheme cluster]]
cluster_prev, [[Advances to the previous grapheme cluster]]
paragraph_start, [[Advances to the first character in this paragraph]]
paragraph_end, [[Advances to the last character in this paragraph]]
word_start, [[Advance to current word start]]
word_end, [[Advance to current word end]]
line_start, [[Advance to current line first character]]
line_end, [[Advance to current line last character]]
paragraph_first, [[Advance to current paragraph first character]]
paragraph_last, [[Advance to current paragraph last character]]
paragraph_next, [[Advances to the start of the next text node]]
paragraph_prev [[Advances to the end of the previous text node]]
}
move {
[[Move the cursor]]
params {
@in type: Efl.Text.Cursor_Move_Type; [[The type of movement]]
}
return: bool; [[True if actually moved]]
}
```
or old way:
```
char_next {
[[Advances to the next character]]
// FIXME: Make the number of characters we moved by? Useful for all the other functions
return: bool; [[True if actually moved]]
}
char_prev {
[[Advances to the previous character]]
return: bool; [[True if actually moved]]
}
char_delete {
[[Deletes a single character from position pointed by given cursor.]]
}
cluster_next {
[[Advances to the next grapheme cluster]]
return: bool; [[True if actually moved]]
}
cluster_prev {
[[Advances to the previous grapheme cluster]]
return: bool; [[True if actually moved]]
}
// FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character.
paragraph_start {
[[Advances to the first character in this paragraph]]
return: bool; [[True if actually moved]]
}
paragraph_end {
[[Advances to the last character in this paragraph]]
return: bool; [[True if actually moved]]
}
word_start {
[[Advance to current word start]]
return: bool; [[True if actually moved]]
}
word_end {
[[Advance to current word end]]
return: bool; [[True if actually moved]]
}
line_start {
[[Advance to current line first character]]
return: bool; [[True if actually moved]]
}
line_end {
[[Advance to current line last character]]
return: bool; [[True if actually moved]]
}
paragraph_first {
[[Advance to current paragraph first character]]
return: bool; [[True if actually moved]]
}
paragraph_last {
[[Advance to current paragraph last character]]
return: bool; [[True if actually moved]]
}
paragraph_next {
[[Advances to the start of the next text node]]
return: bool; [[True if actually moved]]
}
paragraph_prev {
[[Advances to the end of the previous text node]]
return: bool; [[True if actually moved]]
}
```
Reviewers: woohyun, tasn, segfaultxavi
Reviewed By: woohyun
Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10542
Diffstat (limited to '')
-rw-r--r-- | src/lib/efl/Efl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index bcdaef98b8..c78d105c5b 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h | |||
@@ -68,7 +68,8 @@ extern "C" { | |||
68 | */ | 68 | */ |
69 | typedef struct tm Efl_Time; | 69 | typedef struct tm Efl_Time; |
70 | 70 | ||
71 | typedef struct _Efl_Text_Cursor_Cursor Efl_Text_Cursor_Cursor; | 71 | typedef struct _Efl_Text_Cursor_Handle Efl_Text_Cursor_Handle; |
72 | typedef struct _Efl_Text_Cursor_Handle _Efl_Text_Cursor_Handle; | ||
72 | typedef struct _Efl_Text_Annotate_Annotation Efl_Text_Annotate_Annotation; | 73 | typedef struct _Efl_Text_Annotate_Annotation Efl_Text_Annotate_Annotation; |
73 | 74 | ||
74 | #include "interfaces/efl_types.eot.h" | 75 | #include "interfaces/efl_types.eot.h" |
@@ -210,10 +211,8 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; | |||
210 | #include "interfaces/efl_text_font.eo.h" | 211 | #include "interfaces/efl_text_font.eo.h" |
211 | #include "interfaces/efl_text_style.eo.h" | 212 | #include "interfaces/efl_text_style.eo.h" |
212 | #include "interfaces/efl_text_format.eo.h" | 213 | #include "interfaces/efl_text_format.eo.h" |
213 | #include "interfaces/efl_text_cursor.eo.h" | ||
214 | #include "interfaces/efl_text_annotate.eo.h" | 214 | #include "interfaces/efl_text_annotate.eo.h" |
215 | #include "interfaces/efl_text_markup.eo.h" | 215 | #include "interfaces/efl_text_markup.eo.h" |
216 | #include "interfaces/efl_text_markup_interactive.eo.h" | ||
217 | #include "interfaces/efl_text_markup_util.eo.h" | 216 | #include "interfaces/efl_text_markup_util.eo.h" |
218 | 217 | ||
219 | #ifdef EFL_BETA_API_SUPPORT | 218 | #ifdef EFL_BETA_API_SUPPORT |