summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-01-09 13:57:04 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2020-01-09 13:57:04 +0900
commitb03f06ca8d9ff95a11b2d9be7b522c2d591adf66 (patch)
tree5ebb0620311d180ac521371d047905e3c1b78adc
parent622f0b188f165e5b561eb3acae9721a62e731333 (diff)
efl_ui_textbox: replace elm_obj stuff and focuse stuff
Summary: efl_ui_textbox: replace elm_obj stuff and focuse stuff Reviewers: woohyun, bu5hm4n Reviewed By: woohyun, bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8522 Differential Revision: https://phab.enlightenment.org/D11025
-rw-r--r--src/lib/elementary/efl_ui_textbox.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index 507d7866a8..0f545e319f 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -259,7 +259,7 @@ _load_do(Evas_Object *obj)
259 259
260 if (!sd->file) 260 if (!sd->file)
261 { 261 {
262 elm_object_text_set(obj, ""); 262 efl_text_set(obj, "");
263 return 0; 263 return 0;
264 } 264 }
265 265
@@ -556,15 +556,13 @@ static void
556_dnd_enter_cb(void *data EINA_UNUSED, 556_dnd_enter_cb(void *data EINA_UNUSED,
557 Evas_Object *obj) 557 Evas_Object *obj)
558{ 558{
559 elm_object_focus_set(obj, EINA_TRUE); 559 efl_ui_focus_util_focus(obj);
560} 560}
561 561
562static void 562static void
563_dnd_leave_cb(void *data EINA_UNUSED, 563_dnd_leave_cb(void *data EINA_UNUSED,
564 Evas_Object *obj) 564 Evas_Object *obj)
565{ 565{
566 if (_elm_config->desktop_entry)
567 elm_object_focus_set(obj, EINA_FALSE);
568} 566}
569 567
570static void 568static void
@@ -820,7 +818,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
820 818
821 if (efl_ui_focus_object_focus_get(obj)) 819 if (efl_ui_focus_object_focus_get(obj))
822 { 820 {
823 evas_object_focus_set(sd->text_obj, EINA_TRUE); 821 efl_canvas_object_key_focus_set(sd->text_obj, EINA_TRUE);
824 822
825 _edje_signal_emit(sd, "efl,action,focus", "efl"); 823 _edje_signal_emit(sd, "efl,action,focus", "efl");
826 824
@@ -834,7 +832,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
834 Eo *sw = sd->text_obj; 832 Eo *sw = sd->text_obj;
835 833
836 _edje_signal_emit(sd, "efl,action,unfocus", "efl"); 834 _edje_signal_emit(sd, "efl,action,unfocus", "efl");
837 evas_object_focus_set(sw, EINA_FALSE); 835 efl_canvas_object_key_focus_set(sw, EINA_FALSE);
838 836
839 if (top && top_is_win && efl_input_text_input_panel_autoshow_get(obj)) 837 if (top && top_is_win && efl_input_text_input_panel_autoshow_get(obj))
840 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF); 838 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
@@ -2173,6 +2171,17 @@ _efl_ui_textbox_select_region_set(Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED,
2173 efl_text_cursor_position_set(sel_end, end); 2171 efl_text_cursor_position_set(sel_end, end);
2174} 2172}
2175 2173
2174static void
2175_efl_ui_textbox_select_region_get(Eo *obj, int *start, int *end)
2176{
2177 Efl_Text_Cursor *sel_start, *sel_end;
2178
2179 efl_text_interactive_selection_cursors_get(obj, &sel_start, &sel_end);
2180
2181 if(start) *start = efl_text_cursor_position_get(sel_start);
2182 if(end) *end = efl_text_cursor_position_get(sel_end);
2183}
2184
2176EOLIAN static void 2185EOLIAN static void
2177_efl_ui_textbox_selection_cut(Eo *obj, Efl_Ui_Textbox_Data *sd) 2186_efl_ui_textbox_selection_cut(Eo *obj, Efl_Ui_Textbox_Data *sd)
2178{ 2187{
@@ -2264,7 +2273,7 @@ EOLIAN static void
2264_efl_ui_textbox_efl_file_unload(Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED) 2273_efl_ui_textbox_efl_file_unload(Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED)
2265{ 2274{
2266 efl_file_unload(efl_super(obj, MY_CLASS)); 2275 efl_file_unload(efl_super(obj, MY_CLASS));
2267 elm_object_text_set(obj, ""); 2276 efl_text_set(obj, "");
2268} 2277}
2269 2278
2270EOLIAN static Eina_Error 2279EOLIAN static Eina_Error
@@ -2553,7 +2562,7 @@ _efl_ui_textbox_efl_access_text_access_selection_get(const Eo *obj, Efl_Ui_Textb
2553{ 2562{
2554 if (selection_number != 0) return; 2563 if (selection_number != 0) return;
2555 2564
2556 elm_obj_entry_select_region_get(obj, start_offset, end_offset); 2565 _efl_ui_textbox_select_region_get((Eo *)obj, start_offset, end_offset);
2557} 2566}
2558 2567
2559EOLIAN static Eina_Bool 2568EOLIAN static Eina_Bool