summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2020-01-07 05:35:10 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-07 11:00:38 +0100
commit4b7e7b732d12a00f9fc737ff9508885d5a227f00 (patch)
tree89d4ea61b2c0e69cf8f595d5a97dd182c95e2645
parent303baf754a69503f5f00067efb7d753615eb548e (diff)
efl_text_change_info: rename some properties
insert -> insertion merge -> mergeable ref T7933 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11016
-rw-r--r--src/lib/efl/interfaces/efl_text_types.eot6
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.c16
-rw-r--r--src/lib/elementary/efl_ui_textbox.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/efl/interfaces/efl_text_types.eot b/src/lib/efl/interfaces/efl_text_types.eot
index 8c9e7583db..d32ab8d2d3 100644
--- a/src/lib/efl/interfaces/efl_text_types.eot
+++ b/src/lib/efl/interfaces/efl_text_types.eot
@@ -18,8 +18,8 @@ struct @beta Efl.Text_Change_Info {
18 content: string; [[The content added/removed]] 18 content: string; [[The content added/removed]]
19 position: size; [[The position where it was added/removed]] 19 position: size; [[The position where it was added/removed]]
20 length: size; [[The length of content in characters (not bytes, actual unicode characters)]] 20 length: size; [[The length of content in characters (not bytes, actual unicode characters)]]
21 insert: bool; [[$true if the content was inserted, $false if removei]] 21 insertion: bool; [[$true if the content was inserted, $false if removed]]
22 merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]] 22 mergeable: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]]
23} 23}
24 24
25struct @beta Efl.Text_Range { 25struct @beta Efl.Text_Range {
@@ -27,4 +27,4 @@ struct @beta Efl.Text_Range {
27 ]] 27 ]]
28 start: int; [[The start postion.]] 28 start: int; [[The start postion.]]
29 end: int; [[The end position.]] 29 end: int; [[The end position.]]
30} \ No newline at end of file 30}
diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c
index 4958a83582..3212632532 100644
--- a/src/lib/elementary/efl_ui_internal_text_interactive.c
+++ b/src/lib/elementary/efl_ui_internal_text_interactive.c
@@ -263,7 +263,7 @@ _text_filter_markup_prepend_internal(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_
263 if (changeinfo) 263 if (changeinfo)
264 { 264 {
265 info = calloc(1, sizeof(*info)); 265 info = calloc(1, sizeof(*info));
266 info->insert = EINA_TRUE; 266 info->insertion = EINA_TRUE;
267 info->content = eina_stringshare_add(text); 267 info->content = eina_stringshare_add(text);
268 info->length = 268 info->length =
269 eina_unicode_utf8_get_len(info->content); 269 eina_unicode_utf8_get_len(info->content);
@@ -272,7 +272,7 @@ _text_filter_markup_prepend_internal(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_
272 { 272 {
273 if (have_sel) 273 if (have_sel)
274 { 274 {
275 info->merge = EINA_TRUE; 275 info->mergeable = EINA_TRUE;
276 } 276 }
277 info->position = 277 info->position =
278 efl_text_cursor_position_get(efl_text_interactive_main_cursor_get(obj)); 278 efl_text_cursor_position_get(efl_text_interactive_main_cursor_get(obj));
@@ -589,7 +589,7 @@ _entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_U
589 589
590 tmp = efl_text_cursor_range_text_get(del_start, del_end); 590 tmp = efl_text_cursor_range_text_get(del_start, del_end);
591 591
592 info.insert = EINA_FALSE; 592 info.insertion = EINA_FALSE;
593 info.position = start; 593 info.position = start;
594 info.length = end - start; 594 info.length = end - start;
595 info.content = tmp; 595 info.content = tmp;
@@ -880,7 +880,7 @@ _range_del_emit(Evas_Object *obj, Efl_Text_Cursor *cur1, Efl_Text_Cursor *cur2)
880 if (start == end) 880 if (start == end)
881 return; 881 return;
882 882
883 info.insert = EINA_FALSE; 883 info.insertion = EINA_FALSE;
884 info.position = start; 884 info.position = start;
885 info.length = end - start; 885 info.length = end - start;
886 886
@@ -926,7 +926,7 @@ _delete_emit(Eo *obj, Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data
926 926
927 Efl_Text_Change_Info info = { NULL, 0, 0, 0, 0 }; 927 Efl_Text_Change_Info info = { NULL, 0, 0, 0, 0 };
928 char *tmp = NULL; 928 char *tmp = NULL;
929 info.insert = EINA_FALSE; 929 info.insertion = EINA_FALSE;
930 if (backspace) 930 if (backspace)
931 { 931 {
932 932
@@ -972,7 +972,7 @@ _delete_emit(Eo *obj, Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data
972 evas_textblock_cursor_free(cc); 972 evas_textblock_cursor_free(cc);
973 } 973 }
974 974
975 info.insert = EINA_FALSE; 975 info.insertion = EINA_FALSE;
976 info.position = pos; 976 info.position = pos;
977 info.length = 1; 977 info.length = 1;
978 info.content = tmp; 978 info.content = tmp;
@@ -1452,9 +1452,9 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1452 if (en->have_selection) 1452 if (en->have_selection)
1453 { 1453 {
1454 _sel_range_del_emit(obj, en); 1454 _sel_range_del_emit(obj, en);
1455 info.merge = EINA_TRUE; 1455 info.mergeable = EINA_TRUE;
1456 } 1456 }
1457 info.insert = EINA_TRUE; 1457 info.insertion = EINA_TRUE;
1458 info.content = string; 1458 info.content = string;
1459 info.position = efl_text_cursor_position_get(cur); 1459 info.position = efl_text_cursor_position_get(cur);
1460 info.length = eina_unicode_utf8_get_len(string); 1460 info.length = eina_unicode_utf8_get_len(string);
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index aeff628640..dd25e39419 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -536,7 +536,7 @@ _selection_data_cb(void *data EINA_UNUSED, Eo *obj,
536 efl_text_interactive_all_unselect(obj); 536 efl_text_interactive_all_unselect(obj);
537 } 537 }
538 cur = efl_text_interactive_main_cursor_get(obj); 538 cur = efl_text_interactive_main_cursor_get(obj);
539 info.insert = EINA_TRUE; 539 info.insertion = EINA_TRUE;
540 info.position = efl_text_cursor_position_get(cur); 540 info.position = efl_text_cursor_position_get(cur);
541 info.length = len; 541 info.length = len;
542 info.content = buf; 542 info.content = buf;
@@ -2199,7 +2199,7 @@ _efl_ui_textbox_selection_cut(Eo *obj, Efl_Ui_Textbox_Data *sd)
2199 start_pos = efl_text_cursor_position_get(start); 2199 start_pos = efl_text_cursor_position_get(start);
2200 end_pos = efl_text_cursor_position_get(end); 2200 end_pos = efl_text_cursor_position_get(end);
2201 tmp = efl_text_cursor_range_text_get(start, end); 2201 tmp = efl_text_cursor_range_text_get(start, end);
2202 info.insert = EINA_FALSE; 2202 info.insertion = EINA_FALSE;
2203 info.position = start_pos; 2203 info.position = start_pos;
2204 info.length = end_pos - start_pos; 2204 info.length = end_pos - start_pos;
2205 info.content = tmp; 2205 info.content = tmp;