(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
return;
- if (en->imf_context)
- {
- ecore_imf_context_reset(en->imf_context);
- ecore_imf_context_focus_in(en->imf_context);
- }
+ if (!en->imf_context) return;
+
+ ecore_imf_context_reset(en->imf_context);
+ ecore_imf_context_focus_in(en->imf_context);
#endif
}
}
if ((evas_textblock_cursor_compare(tc, en->cursor)) && (!cursor_changed))
_edje_emit(ed, "cursor,changed", rp->part->name);
+ evas_textblock_cursor_free(tc);
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
}
#endif
- evas_textblock_cursor_free(tc);
_edje_entry_real_part_configure(rp);
}
return;
}
if (ev->button != 1) return;
+
+#ifdef HAVE_ECORE_IMF
+ if (en->imf_context)
+ {
+ Ecore_IMF_Event_Mouse_Down ecore_ev;
+ ecore_imf_evas_event_mouse_down_wrap(ev, &ecore_ev);
+ if (ecore_imf_context_filter_event(en->imf_context,
+ ECORE_IMF_EVENT_MOUSE_DOWN,
+ (Ecore_IMF_Event *)&ecore_ev))
+ return;
+ }
+#endif
+
en->select_mod_start = EINA_FALSE;
en->select_mod_end = EINA_FALSE;
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
}
if (evas_textblock_cursor_compare(tc, en->cursor))
_edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ evas_textblock_cursor_free(tc);
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
}
#endif
- evas_textblock_cursor_free(tc);
_edje_entry_real_part_configure(rp);
}
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return;
+
+#ifdef HAVE_ECORE_IMF
+ if (en->imf_context)
+ {
+ Ecore_IMF_Event_Mouse_Up ecore_ev;
+ ecore_imf_evas_event_mouse_up_wrap(ev, &ecore_ev);
+ if (ecore_imf_context_filter_event(en->imf_context,
+ ECORE_IMF_EVENT_MOUSE_UP,
+ (Ecore_IMF_Event *)&ecore_ev))
+ return;
+ }
+#endif
+
tc = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_copy(en->cursor, tc);
evas_object_geometry_get(rp->object, &x, &y, &w, &h);
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return;
+
+#ifdef HAVE_ECORE_IMF
+ if (en->imf_context)
+ {
+ Ecore_IMF_Event_Mouse_Move ecore_ev;
+ ecore_imf_evas_event_mouse_move_wrap(ev, &ecore_ev);
+ if (ecore_imf_context_filter_event(en->imf_context,
+ ECORE_IMF_EVENT_MOUSE_MOVE,
+ (Ecore_IMF_Event *)&ecore_ev))
+ return;
+ }
+#endif
+
if (en->selecting)
{
tc = evas_object_textblock_cursor_new(rp->object);
{
Edje *ed = (Edje *)data;
- if (evas_focus_get(e) == ed->obj) {
+ if (evas_focus_get(e) == ed->obj)
+ {
_edje_focus_in_cb(data, NULL, NULL, NULL);
- }
+ }
}
static void
{
Edje *ed = (Edje *)data;
- if (evas_focus_get(e) == ed->obj) {
+ if (evas_focus_get(e) == ed->obj)
+ {
_edje_focus_out_cb(data, NULL, NULL, NULL);
- }
+ }
}
/***************************************************************/
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_MOUSE_MOVE, _edje_part_mouse_move_cb, rp);
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
- en->select_allow = 1;
+ en->select_allow = EINA_TRUE;
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD)
{
txt = (Edje_Part_Description_Text *) rp->chosen_description;
- en->select_allow = 0;
+ en->select_allow = EINA_FALSE;
if (txt && edje_string_get(&txt->text.repch))
evas_object_textblock_replace_char_set(rp->object, edje_string_get(&txt->text.repch));
else
ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->evas);
ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context,
- _edje_entry_imf_retrieve_surrounding_cb, rp);
+ _edje_entry_imf_retrieve_surrounding_cb, rp->edje);
en->imf_ee_handler_commit = ecore_event_handler_add(ECORE_IMF_EVENT_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje);
- en->imf_ee_handler_delete = ecore_event_handler_add(ECORE_IMF_EVENT_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp);
+ en->imf_ee_handler_delete = ecore_event_handler_add(ECORE_IMF_EVENT_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje);
en->imf_ee_handler_changed = ecore_event_handler_add(ECORE_IMF_EVENT_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, rp->edje);
ecore_imf_context_input_mode_set(en->imf_context,
rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD ?
static Eina_Bool
_edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, char **text, int *cursor_pos)
{
- Edje_Real_Part *rp = data;
+ Edje* ed = data;
+ Edje_Real_Part *rp = ed->focused_part;
Entry *en;
const char *str;
Edje_Real_Part *rp = ed->focused_part;
Entry *en;
int length = 0;
- Ecore_IMF_Event_Commit *ev = event;
+ Ecore_IMF_Event_Preedit_Changed *ev = event;
int i = 0;
char *preedit_string;
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return ECORE_CALLBACK_PASS_ON;
+ if (!en->imf_context) return ECORE_CALLBACK_PASS_ON;
if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
cursor_pos = evas_textblock_cursor_pos_get(en->cursor);