summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_text.c')
-rw-r--r--src/lib/elementary/efl_ui_text.c125
1 files changed, 65 insertions, 60 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index f70bb65..53dddbe 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -15,7 +15,7 @@
15#include "elm_entry_common.h" 15#include "elm_entry_common.h"
16#include "elm_widget_entry.h" 16#include "elm_widget_entry.h"
17#include "efl_ui_text.eo.h" 17#include "efl_ui_text.eo.h"
18#include "elm_hoversel.eo.h" 18#include "elm_hoversel_eo.h"
19#include "efl_ui_text_part.eo.h" 19#include "efl_ui_text_part.eo.h"
20#include "elm_part_helper.h" 20#include "elm_part_helper.h"
21 21
@@ -251,14 +251,13 @@ static void _selection_defer(Eo *obj, Efl_Ui_Text_Data *sd);
251static Eina_Position2D _decoration_calc_offset(Efl_Ui_Text_Data *sd); 251static Eina_Position2D _decoration_calc_offset(Efl_Ui_Text_Data *sd);
252 252
253static char * 253static char *
254_file_load(const char *file) 254_file_load(Eo *obj)
255{ 255{
256 Eina_File *f; 256 Eina_File *f;
257 char *text = NULL; 257 char *text = NULL;
258 void *tmp = NULL; 258 void *tmp = NULL;
259 259
260 f = eina_file_open(file, EINA_FALSE); 260 f = eina_file_dup(efl_file_mmap_get(obj));
261 if (!f) return NULL;
262 261
263 tmp = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); 262 tmp = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
264 if (!tmp) goto on_error; 263 if (!tmp) goto on_error;
@@ -282,29 +281,35 @@ _file_load(const char *file)
282} 281}
283 282
284static char * 283static char *
285_plain_load(const char *file) 284_plain_load(Eo *obj)
286{ 285{
287 return _file_load(file); 286 return _file_load(obj);
288} 287}
289 288
290static Eina_Bool 289static Eina_Error
291_load_do(Evas_Object *obj) 290_load_do(Evas_Object *obj)
292{ 291{
293 char *text; 292 char *text;
293 Eina_Error err = 0;
294 294
295 EFL_UI_TEXT_DATA_GET(obj, sd); 295 EFL_UI_TEXT_DATA_GET(obj, sd);
296 296
297 if (!sd->file) 297 if (!sd->file)
298 { 298 {
299 elm_object_text_set(obj, ""); 299 elm_object_text_set(obj, "");
300 return EINA_TRUE; 300 return 0;
301 } 301 }
302 302
303 switch (sd->format) 303 switch (sd->format)
304 { 304 {
305 /* Only available format */ 305 /* Only available format */
306 case ELM_TEXT_FORMAT_PLAIN_UTF8: 306 case ELM_TEXT_FORMAT_PLAIN_UTF8:
307 text = _plain_load(sd->file); 307 text = _plain_load(obj);
308 if (!text)
309 {
310 err = errno;
311 if (!err) err = ENOENT;
312 }
308 break; 313 break;
309 314
310 default: 315 default:
@@ -316,13 +321,10 @@ _load_do(Evas_Object *obj)
316 { 321 {
317 efl_text_set(obj, text); 322 efl_text_set(obj, text);
318 free(text); 323 free(text);
319 return EINA_TRUE; 324 return 0;
320 }
321 else
322 {
323 efl_text_set(obj, "");
324 return EINA_FALSE;
325 } 325 }
326 efl_text_set(obj, "");
327 return err;
326} 328}
327 329
328static void 330static void
@@ -609,7 +611,7 @@ _selection_data_cb(void *data EINA_UNUSED, Eo *obj,
609 { 611 {
610 efl_canvas_text_range_delete(obj, start, end); 612 efl_canvas_text_range_delete(obj, start, end);
611 } 613 }
612 cur = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN); 614 cur = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
613 info.insert = EINA_TRUE; 615 info.insert = EINA_TRUE;
614 info.position = efl_text_cursor_position_get(obj, cur); 616 info.position = efl_text_cursor_position_get(obj, cur);
615 info.length = len; 617 info.length = len;
@@ -696,10 +698,12 @@ _get_drop_format(Evas_Object *obj)
696} 698}
697 699
698/* we can't reuse layout's here, because it's on entry_edje only */ 700/* we can't reuse layout's here, because it's on entry_edje only */
699EOLIAN static Eina_Bool 701EOLIAN static void
700_efl_ui_text_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Bool disabled) 702_efl_ui_text_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Bool disabled)
701{ 703{
702 const char *emission ; 704 const char *emission;
705
706 efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
703 707
704 elm_drop_target_del(obj, sd->drop_format, 708 elm_drop_target_del(obj, sd->drop_format,
705 _dnd_enter_cb, NULL, 709 _dnd_enter_cb, NULL,
@@ -707,16 +711,16 @@ _efl_ui_text_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Text_Data *sd, Ein
707 _dnd_pos_cb, NULL, 711 _dnd_pos_cb, NULL,
708 _dnd_drop_cb, NULL); 712 _dnd_drop_cb, NULL);
709 713
710 emission = disabled ? "efl,state,disabled" : "efl,state,enabled"; 714 emission = efl_ui_widget_disabled_get(obj) ? "efl,state,disabled" : "efl,state,enabled";
711 edje_object_signal_emit(sd->entry_edje, emission, "efl"); 715 edje_object_signal_emit(sd->entry_edje, emission, "efl");
712 if (sd->scroll) 716 if (sd->scroll)
713 { 717 {
714 edje_object_signal_emit(sd->scr_edje, emission, "efl"); 718 edje_object_signal_emit(sd->scr_edje, emission, "efl");
715 //elm_interface_scrollable_freeze_set(obj, disabled); 719 elm_interface_scrollable_freeze_set(obj, efl_ui_widget_disabled_get(obj));
716 } 720 }
717 sd->disabled = disabled; 721 sd->disabled = efl_ui_widget_disabled_get(obj);
718 722
719 if (!disabled) 723 if (!efl_ui_widget_disabled_get(obj))
720 { 724 {
721 sd->drop_format = _get_drop_format(obj); 725 sd->drop_format = _get_drop_format(obj);
722 elm_drop_target_add(obj, sd->drop_format, 726 elm_drop_target_add(obj, sd->drop_format,
@@ -725,23 +729,21 @@ _efl_ui_text_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Text_Data *sd, Ein
725 _dnd_pos_cb, NULL, 729 _dnd_pos_cb, NULL,
726 _dnd_drop_cb, NULL); 730 _dnd_drop_cb, NULL);
727 } 731 }
728
729 return EINA_TRUE;
730} 732}
731 733
732/* we can't issue the layout's theming code here, cause it assumes an 734/* we can't issue the layout's theming code here, cause it assumes an
733 * unique edje object, always */ 735 * unique edje object, always */
734EOLIAN static Efl_Ui_Theme_Apply_Result 736EOLIAN static Eina_Error
735_efl_ui_text_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd) 737_efl_ui_text_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
736{ 738{
737 Efl_Ui_Theme_Apply_Result theme_apply; 739 Eina_Error theme_apply;
738 740
739 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 741 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
740 742
741 // Note: We are skipping elm_layout here! This is by design. 743 // Note: We are skipping elm_layout here! This is by design.
742 // This assumes the following inheritance: my_class -> layout -> widget ... 744 // This assumes the following inheritance: my_class -> layout -> widget ...
743 theme_apply = efl_ui_widget_theme_apply(efl_cast(obj, EFL_UI_WIDGET_CLASS)); 745 theme_apply = efl_ui_widget_theme_apply(efl_cast(obj, EFL_UI_WIDGET_CLASS));
744 if (!theme_apply) return EFL_UI_THEME_APPLY_RESULT_FAIL; 746 if (theme_apply == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
745 747
746 efl_event_freeze(obj); 748 efl_event_freeze(obj);
747 749
@@ -832,7 +834,7 @@ _cursor_geometry_recalc(Evas_Object *obj)
832 x = y = w = h = 0; 834 x = y = w = h = 0;
833 835
834 Efl_Text_Cursor_Cursor *main_cur = 836 Efl_Text_Cursor_Cursor *main_cur =
835 efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN); 837 efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
836 838
837 efl_text_cursor_geometry_get(obj, main_cur, 839 efl_text_cursor_geometry_get(obj, main_cur,
838 EFL_TEXT_CURSOR_TYPE_BEFORE, 840 EFL_TEXT_CURSOR_TYPE_BEFORE,
@@ -951,7 +953,7 @@ _efl_ui_text_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Text_Data *sd)
951 if (top && top_is_win && sd->input_panel_enable && !sd->input_panel_show_on_demand) 953 if (top && top_is_win && sd->input_panel_enable && !sd->input_panel_show_on_demand)
952 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON); 954 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
953 if (_elm_config->atspi_mode) 955 if (_elm_config->atspi_mode)
954 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_FOCUSED, EINA_TRUE); 956 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
955 _return_key_enabled_check(obj); 957 _return_key_enabled_check(obj);
956 _validate(obj); 958 _validate(obj);
957 } 959 }
@@ -967,7 +969,7 @@ _efl_ui_text_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Text_Data *sd)
967 if (top && top_is_win && sd->input_panel_enable) 969 if (top && top_is_win && sd->input_panel_enable)
968 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF); 970 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
969 if (_elm_config->atspi_mode) 971 if (_elm_config->atspi_mode)
970 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_FOCUSED, EINA_FALSE); 972 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_FALSE);
971 973
972 if (_elm_config->selection_clear_enable) 974 if (_elm_config->selection_clear_enable)
973 { 975 {
@@ -993,7 +995,7 @@ _efl_ui_text_efl_ui_widget_interest_region_get(const Eo *obj EINA_UNUSED, Efl_Ui
993 Eina_Rect r = {}; 995 Eina_Rect r = {};
994 996
995 efl_text_cursor_geometry_get(obj, 997 efl_text_cursor_geometry_get(obj,
996 efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN), 998 efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN),
997 EFL_TEXT_CURSOR_TYPE_BEFORE, 999 EFL_TEXT_CURSOR_TYPE_BEFORE,
998 &r.x, &r.y, &r.w, &r.h, 1000 &r.x, &r.y, &r.w, &r.h,
999 NULL, NULL, NULL, NULL); 1001 NULL, NULL, NULL, NULL);
@@ -1703,7 +1705,7 @@ _selection_handlers_offset_calc(Evas_Object *obj, Evas_Object *handler)
1703 1705
1704 pos = efl_gfx_entity_position_get(sd->text_obj); 1706 pos = efl_gfx_entity_position_get(sd->text_obj);
1705 efl_text_cursor_geometry_get(obj, 1707 efl_text_cursor_geometry_get(obj,
1706 efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN), 1708 efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN),
1707 EFL_TEXT_CURSOR_TYPE_BEFORE, 1709 EFL_TEXT_CURSOR_TYPE_BEFORE,
1708 &cx, &cy, &cw, &ch, 1710 &cx, &cy, &cw, &ch,
1709 NULL, NULL, NULL, NULL); 1711 NULL, NULL, NULL, NULL);
@@ -1741,7 +1743,7 @@ _start_handler_mouse_down_cb(void *data,
1741 1743
1742 /* Get the cursors */ 1744 /* Get the cursors */
1743 efl_text_interactive_selection_cursors_get(text_obj, &sel_start, &sel_end); 1745 efl_text_interactive_selection_cursors_get(text_obj, &sel_start, &sel_end);
1744 main_cur = efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_MAIN); 1746 main_cur = efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
1745 1747
1746 start_pos = efl_text_cursor_position_get(text_obj, sel_start); 1748 start_pos = efl_text_cursor_position_get(text_obj, sel_start);
1747 end_pos = efl_text_cursor_position_get(text_obj, sel_end); 1749 end_pos = efl_text_cursor_position_get(text_obj, sel_end);
@@ -1800,7 +1802,7 @@ _start_handler_mouse_move_cb(void *data,
1800 1802
1801 /* Set the main cursor. */ 1803 /* Set the main cursor. */
1802 efl_text_cursor_position_set(sd->text_obj, 1804 efl_text_cursor_position_set(sd->text_obj,
1803 efl_text_cursor_get(sd->text_obj, EFL_TEXT_CURSOR_GET_MAIN), pos); 1805 efl_text_cursor_get(sd->text_obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN), pos);
1804 1806
1805 ELM_SAFE_FREE(sd->longpress_timer, ecore_timer_del); 1807 ELM_SAFE_FREE(sd->longpress_timer, ecore_timer_del);
1806 sd->long_pressed = EINA_FALSE; 1808 sd->long_pressed = EINA_FALSE;
@@ -1823,7 +1825,7 @@ _end_handler_mouse_down_cb(void *data,
1823 Eo *text_obj = sd->text_obj; 1825 Eo *text_obj = sd->text_obj;
1824 1826
1825 efl_text_interactive_selection_cursors_get(text_obj, &sel_start, &sel_end); 1827 efl_text_interactive_selection_cursors_get(text_obj, &sel_start, &sel_end);
1826 main_cur = efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_MAIN); 1828 main_cur = efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
1827 1829
1828 start_pos = efl_text_cursor_position_get(text_obj, sel_start); 1830 start_pos = efl_text_cursor_position_get(text_obj, sel_start);
1829 end_pos = efl_text_cursor_position_get(text_obj, sel_end); 1831 end_pos = efl_text_cursor_position_get(text_obj, sel_end);
@@ -1881,7 +1883,7 @@ _end_handler_mouse_move_cb(void *data,
1881 efl_text_cursor_coord_set(sd->text_obj, sd->sel_handler_cursor, cx, cy); 1883 efl_text_cursor_coord_set(sd->text_obj, sd->sel_handler_cursor, cx, cy);
1882 pos = efl_text_cursor_position_get(sd->text_obj, sd->sel_handler_cursor); 1884 pos = efl_text_cursor_position_get(sd->text_obj, sd->sel_handler_cursor);
1883 /* Set the main cursor. */ 1885 /* Set the main cursor. */
1884 efl_text_cursor_position_set(sd->text_obj, efl_text_cursor_get(data, EFL_TEXT_CURSOR_GET_MAIN), pos); 1886 efl_text_cursor_position_set(sd->text_obj, efl_text_cursor_get(data, EFL_TEXT_CURSOR_GET_TYPE_MAIN), pos);
1885 ELM_SAFE_FREE(sd->longpress_timer, ecore_timer_del); 1887 ELM_SAFE_FREE(sd->longpress_timer, ecore_timer_del);
1886 sd->long_pressed = EINA_FALSE; 1888 sd->long_pressed = EINA_FALSE;
1887} 1889}
@@ -2069,7 +2071,7 @@ _format_color_parse(const char *str, int slen,
2069/** 2071/**
2070 * @internal 2072 * @internal
2071 * Updates the text properties of the object from the theme. 2073 * Updates the text properties of the object from the theme.
2072 * 2074 *
2073 * This update functions skips any property that was already set, 2075 * This update functions skips any property that was already set,
2074 * to allow users to override the theme during the construction of the widget. 2076 * to allow users to override the theme during the construction of the widget.
2075 */ 2077 */
@@ -2163,11 +2165,11 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
2163 _dnd_pos_cb, NULL, 2165 _dnd_pos_cb, NULL,
2164 _dnd_drop_cb, NULL); 2166 _dnd_drop_cb, NULL);
2165 2167
2166 if (!elm_widget_theme_object_set(obj, wd->resize_obj, 2168 if (elm_widget_theme_object_set(obj, wd->resize_obj,
2167 elm_widget_theme_klass_get(obj), 2169 elm_widget_theme_klass_get(obj),
2168 elm_widget_theme_element_get(obj), 2170 elm_widget_theme_element_get(obj),
2169 elm_widget_theme_style_get(obj))) 2171 elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
2170 CRI("Failed tp set layout!"); 2172 CRI("Failed to set layout!");
2171 2173
2172 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_ENTRY); 2174 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_ENTRY);
2173 efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _cb_added, NULL); 2175 efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _cb_added, NULL);
@@ -2382,7 +2384,7 @@ _efl_ui_text_selection_handler_disabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Te
2382static void 2384static void
2383_efl_ui_text_entry_insert(Eo *obj, Efl_Ui_Text_Data *sd, const char *entry) 2385_efl_ui_text_entry_insert(Eo *obj, Efl_Ui_Text_Data *sd, const char *entry)
2384{ 2386{
2385 Efl_Text_Cursor_Cursor *cur_obj = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN); 2387 Efl_Text_Cursor_Cursor *cur_obj = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
2386 efl_text_cursor_text_insert(obj, cur_obj, entry); 2388 efl_text_cursor_text_insert(obj, cur_obj, entry);
2387 sd->text_changed = EINA_TRUE; 2389 sd->text_changed = EINA_TRUE;
2388 elm_layout_sizing_eval(obj); 2390 elm_layout_sizing_eval(obj);
@@ -2528,21 +2530,24 @@ _efl_ui_text_context_menu_disabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Da
2528 return !sd->context_menu; 2530 return !sd->context_menu;
2529} 2531}
2530 2532
2531EOLIAN static Eina_Bool 2533EOLIAN static Eina_Error
2532_efl_ui_text_efl_file_file_set(Eo *obj, Efl_Ui_Text_Data *sd, const char *file, const char *group EINA_UNUSED) 2534_efl_ui_text_efl_file_file_set(Eo *obj, Efl_Ui_Text_Data *sd, const char *file)
2533{ 2535{
2534 ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
2535 if (sd->auto_save) _save_do(obj);
2536 eina_stringshare_replace(&sd->file, file); 2536 eina_stringshare_replace(&sd->file, file);
2537 Eina_Bool int_ret = _load_do(obj); 2537 return efl_file_set(efl_super(obj, MY_CLASS), file);
2538 return int_ret;
2539} 2538}
2540 2539
2541EOLIAN static void 2540EOLIAN static Eina_Error
2542_efl_ui_text_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, const char **file, const char **group) 2541_efl_ui_text_efl_file_load(Eo *obj, Efl_Ui_Text_Data *sd)
2543{ 2542{
2544 if (file) *file = sd->file; 2543 Eina_Error err;
2545 if (group) *group = NULL; 2544
2545 if (efl_file_loaded_get(obj)) return 0;
2546 err = efl_file_load(efl_super(obj, MY_CLASS));
2547 if (err) return err;
2548 ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
2549 if (sd->auto_save) _save_do(obj);
2550 return _load_do(obj);
2546} 2551}
2547 2552
2548EOLIAN static void 2553EOLIAN static void
@@ -2982,13 +2987,13 @@ fail:
2982EOLIAN static int 2987EOLIAN static int
2983_efl_ui_text_efl_access_text_caret_offset_get(const Eo *obj, Efl_Ui_Text_Data *_pd EINA_UNUSED) 2988_efl_ui_text_efl_access_text_caret_offset_get(const Eo *obj, Efl_Ui_Text_Data *_pd EINA_UNUSED)
2984{ 2989{
2985 return efl_text_cursor_position_get(obj, efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN)); 2990 return efl_text_cursor_position_get(obj, efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN));
2986} 2991}
2987 2992
2988EOLIAN static Eina_Bool 2993EOLIAN static Eina_Bool
2989_efl_ui_text_efl_access_text_caret_offset_set(Eo *obj, Efl_Ui_Text_Data *_pd EINA_UNUSED, int offset) 2994_efl_ui_text_efl_access_text_caret_offset_set(Eo *obj, Efl_Ui_Text_Data *_pd EINA_UNUSED, int offset)
2990{ 2995{
2991 efl_text_cursor_position_set(obj, efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN), offset); 2996 efl_text_cursor_position_set(obj, efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN), offset);
2992 return EINA_TRUE; 2997 return EINA_TRUE;
2993} 2998}
2994 2999
@@ -3295,7 +3300,7 @@ _efl_ui_text_efl_access_editable_text_text_content_set(Eo *obj, Efl_Ui_Text_Data
3295EOLIAN static Eina_Bool 3300EOLIAN static Eina_Bool
3296_efl_ui_text_efl_access_editable_text_insert(Eo *obj, Efl_Ui_Text_Data *pd, const char *string, int position) 3301_efl_ui_text_efl_access_editable_text_insert(Eo *obj, Efl_Ui_Text_Data *pd, const char *string, int position)
3297{ 3302{
3298 Efl_Text_Cursor_Cursor *cur_obj = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN); 3303 Efl_Text_Cursor_Cursor *cur_obj = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
3299 efl_text_cursor_position_set(obj, cur_obj, position); 3304 efl_text_cursor_position_set(obj, cur_obj, position);
3300 _efl_ui_text_entry_insert(obj, pd, string); 3305 _efl_ui_text_entry_insert(obj, pd, string);
3301 3306
@@ -3345,7 +3350,7 @@ _efl_ui_text_efl_access_editable_text_delete(Eo *obj, Efl_Ui_Text_Data *pd, int
3345EOLIAN static Eina_Bool 3350EOLIAN static Eina_Bool
3346_efl_ui_text_efl_access_editable_text_paste(Eo *obj, Efl_Ui_Text_Data *_pd EINA_UNUSED, int position) 3351_efl_ui_text_efl_access_editable_text_paste(Eo *obj, Efl_Ui_Text_Data *_pd EINA_UNUSED, int position)
3347{ 3352{
3348 Efl_Text_Cursor_Cursor *cur_obj = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN); 3353 Efl_Text_Cursor_Cursor *cur_obj = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN);
3349 efl_text_cursor_position_set(obj, cur_obj, position); 3354 efl_text_cursor_position_set(obj, cur_obj, position);
3350 efl_ui_text_selection_paste(obj); 3355 efl_ui_text_selection_paste(obj);
3351 return EINA_TRUE; 3356 return EINA_TRUE;
@@ -3366,7 +3371,7 @@ _efl_ui_text_efl_access_object_state_set_get(const Eo *obj, Efl_Ui_Text_Data *_p
3366 ret = efl_access_object_state_set_get(efl_super(obj, EFL_UI_TEXT_CLASS)); 3371 ret = efl_access_object_state_set_get(efl_super(obj, EFL_UI_TEXT_CLASS));
3367 3372
3368 if (efl_text_interactive_editable_get(obj)) 3373 if (efl_text_interactive_editable_get(obj))
3369 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_EDITABLE); 3374 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_EDITABLE);
3370 3375
3371 return ret; 3376 return ret;
3372} 3377}
@@ -3466,7 +3471,7 @@ _update_text_cursors(Eo *obj)
3466 xx = yy = ww = hh = -1; 3471 xx = yy = ww = hh = -1;
3467 off =_decoration_calc_offset(sd); 3472 off =_decoration_calc_offset(sd);
3468 bidi_cursor = efl_text_cursor_geometry_get(obj, 3473 bidi_cursor = efl_text_cursor_geometry_get(obj,
3469 efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_MAIN), 3474 efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_TYPE_MAIN),
3470 EFL_TEXT_CURSOR_TYPE_BEFORE, &xx, &yy, &ww, &hh, &xx2, &yy2, 3475 EFL_TEXT_CURSOR_TYPE_BEFORE, &xx, &yy, &ww, &hh, &xx2, &yy2,
3471 NULL, NULL); 3476 NULL, NULL);
3472 if (ww < 1) ww = 1; 3477 if (ww < 1) ww = 1;
@@ -3637,7 +3642,7 @@ _anchor_format_parse(const char *item)
3637static Anchor * 3642static Anchor *
3638_anchor_get(Eo *obj, Efl_Ui_Text_Data *sd, Efl_Text_Annotate_Annotation *an) 3643_anchor_get(Eo *obj, Efl_Ui_Text_Data *sd, Efl_Text_Annotate_Annotation *an)
3639{ 3644{
3640 Anchor *anc; 3645 Anchor *anc;
3641 Eina_List *i; 3646 Eina_List *i;
3642 const char *str; 3647 const char *str;
3643 3648
@@ -3734,7 +3739,7 @@ _anchors_update(Eo *obj, Efl_Ui_Text_Data *sd)
3734 { 3739 {
3735 efl_canvas_group_member_add(smart, ob); 3740 efl_canvas_group_member_add(smart, ob);
3736 efl_gfx_stack_above(ob, obj); 3741 efl_gfx_stack_above(ob, obj);
3737 efl_canvas_object_clip_set(ob, clip); 3742 efl_canvas_object_clipper_set(ob, clip);
3738 efl_canvas_object_pass_events_set(ob, EINA_TRUE); 3743 efl_canvas_object_pass_events_set(ob, EINA_TRUE);
3739 rect->obj = ob; 3744 rect->obj = ob;
3740 } 3745 }