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
This commit is contained in:
WooHyun Jung 2020-01-07 05:35:10 +00:00 committed by Marcel Hollerbach
parent 303baf754a
commit 4b7e7b732d
3 changed files with 13 additions and 13 deletions

View File

@ -18,8 +18,8 @@ struct @beta Efl.Text_Change_Info {
content: string; [[The content added/removed]] content: string; [[The content added/removed]]
position: size; [[The position where it was added/removed]] position: size; [[The position where it was added/removed]]
length: size; [[The length of content in characters (not bytes, actual unicode characters)]] length: size; [[The length of content in characters (not bytes, actual unicode characters)]]
insert: bool; [[$true if the content was inserted, $false if removei]] insertion: bool; [[$true if the content was inserted, $false if removed]]
merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]] mergeable: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]]
} }
struct @beta Efl.Text_Range { struct @beta Efl.Text_Range {
@ -27,4 +27,4 @@ struct @beta Efl.Text_Range {
]] ]]
start: int; [[The start postion.]] start: int; [[The start postion.]]
end: int; [[The end position.]] end: int; [[The end position.]]
} }

View File

@ -263,7 +263,7 @@ _text_filter_markup_prepend_internal(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_
if (changeinfo) if (changeinfo)
{ {
info = calloc(1, sizeof(*info)); info = calloc(1, sizeof(*info));
info->insert = EINA_TRUE; info->insertion = EINA_TRUE;
info->content = eina_stringshare_add(text); info->content = eina_stringshare_add(text);
info->length = info->length =
eina_unicode_utf8_get_len(info->content); eina_unicode_utf8_get_len(info->content);
@ -272,7 +272,7 @@ _text_filter_markup_prepend_internal(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_
{ {
if (have_sel) if (have_sel)
{ {
info->merge = EINA_TRUE; info->mergeable = EINA_TRUE;
} }
info->position = info->position =
efl_text_cursor_position_get(efl_text_interactive_main_cursor_get(obj)); 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
tmp = efl_text_cursor_range_text_get(del_start, del_end); tmp = efl_text_cursor_range_text_get(del_start, del_end);
info.insert = EINA_FALSE; info.insertion = EINA_FALSE;
info.position = start; info.position = start;
info.length = end - start; info.length = end - start;
info.content = tmp; info.content = tmp;
@ -880,7 +880,7 @@ _range_del_emit(Evas_Object *obj, Efl_Text_Cursor *cur1, Efl_Text_Cursor *cur2)
if (start == end) if (start == end)
return; return;
info.insert = EINA_FALSE; info.insertion = EINA_FALSE;
info.position = start; info.position = start;
info.length = end - start; info.length = end - start;
@ -926,7 +926,7 @@ _delete_emit(Eo *obj, Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data
Efl_Text_Change_Info info = { NULL, 0, 0, 0, 0 }; Efl_Text_Change_Info info = { NULL, 0, 0, 0, 0 };
char *tmp = NULL; char *tmp = NULL;
info.insert = EINA_FALSE; info.insertion = EINA_FALSE;
if (backspace) if (backspace)
{ {
@ -972,7 +972,7 @@ _delete_emit(Eo *obj, Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data
evas_textblock_cursor_free(cc); evas_textblock_cursor_free(cc);
} }
info.insert = EINA_FALSE; info.insertion = EINA_FALSE;
info.position = pos; info.position = pos;
info.length = 1; info.length = 1;
info.content = tmp; info.content = tmp;
@ -1452,9 +1452,9 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
if (en->have_selection) if (en->have_selection)
{ {
_sel_range_del_emit(obj, en); _sel_range_del_emit(obj, en);
info.merge = EINA_TRUE; info.mergeable = EINA_TRUE;
} }
info.insert = EINA_TRUE; info.insertion = EINA_TRUE;
info.content = string; info.content = string;
info.position = efl_text_cursor_position_get(cur); info.position = efl_text_cursor_position_get(cur);
info.length = eina_unicode_utf8_get_len(string); info.length = eina_unicode_utf8_get_len(string);

View File

@ -536,7 +536,7 @@ _selection_data_cb(void *data EINA_UNUSED, Eo *obj,
efl_text_interactive_all_unselect(obj); efl_text_interactive_all_unselect(obj);
} }
cur = efl_text_interactive_main_cursor_get(obj); cur = efl_text_interactive_main_cursor_get(obj);
info.insert = EINA_TRUE; info.insertion = EINA_TRUE;
info.position = efl_text_cursor_position_get(cur); info.position = efl_text_cursor_position_get(cur);
info.length = len; info.length = len;
info.content = buf; info.content = buf;
@ -2199,7 +2199,7 @@ _efl_ui_textbox_selection_cut(Eo *obj, Efl_Ui_Textbox_Data *sd)
start_pos = efl_text_cursor_position_get(start); start_pos = efl_text_cursor_position_get(start);
end_pos = efl_text_cursor_position_get(end); end_pos = efl_text_cursor_position_get(end);
tmp = efl_text_cursor_range_text_get(start, end); tmp = efl_text_cursor_range_text_get(start, end);
info.insert = EINA_FALSE; info.insertion = EINA_FALSE;
info.position = start_pos; info.position = start_pos;
info.length = end_pos - start_pos; info.length = end_pos - start_pos;
info.content = tmp; info.content = tmp;