#endif
Ecore_Timer *longpress_timer;
- Edje_elm_function func;
- void *data;
};
struct _Sel
}
_edje_entry_real_part_configure(rp);
_edje_emit(rp->edje, "entry,changed", rp->part->name);
- /*remove the below 2 lines*/
- if (en->func)
- en->func(en->data, NULL);
}
static void
else
{
_backspace(en->cursor, rp->object, en);
- /* if inputting text is not allowed, dont allow text input */
- if (en->func)
- en->func(en->data, NULL);
}
}
_sel_clear(en->cursor, rp->object, en);
else
{
_delete(en->cursor, rp->object, en);
- /*count characters*/
- if (en->func)
- en->func(en->data, NULL);
}
}
_sel_clear(en->cursor, rp->object, en);
}
else if ((!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter")))
{
- /* if inputting text is not allowed, dont allow text input */
- if (en->func)
- {
- if (en->func(en->data, "<br>")) return;
- }
-
if (multiline)
{
if (en->have_selection)
_caps_mode_check(en);
}
_edje_emit(ed, "entry,key,enter", rp->part->name);
- /*count characters*/
- if (en->func)
- en->func(en->data, NULL);
}
else
{
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
{
_edje_entry_hide_visible_password(en->rp);
- /*remove the below 3 lines*/
- if (en->func)
- if (en->func(en->data, (void *)ev->string))
- return;
_text_filter_format_prepend(en, en->cursor, "+ password=off");
_text_filter_markup_prepend(en, en->cursor, ev->string);
_text_filter_format_prepend(en, en->cursor, "- password");
}
else
{
- /*remove the below 3 lines*/
- if (en->func)
- if (en->func(en->data, (void *)ev->string))
- return;
-
//evas_textblock_cursor_text_prepend(en->cursor, ev->string);
_text_filter_text_prepend(en, en->cursor, ev->string);
- /*count characters*/
- if (en->func) en->func(en->data, NULL);
#if 0
// evas_textblock_cursor_text_prepend(en->cursor, ev->string);
_text_filter_text_prepend(en, en->cursor, ev->string);
{
Entry *en = rp->entry_data;
if (!en) return;
- /*if inputtin text is not allowed, dont allow text input*/
- if (en->func)
- {
- if (en->func(en->data, (void *)text)) return;
- }
// prepend markup @ cursor pos
if (en->have_selection)
}
#endif
_edje_entry_real_part_configure(rp);
-
- /* count characters */
- if (en->func)
- en->func(en->data, NULL);
}
void
}
void
-_edje_entry_textinput_callback_set(Edje_Real_Part * rp, Edje_elm_function func,
- void *data)
-{
- Entry *en = rp->entry_data;
- if (!en) return;
-
- en->func = func;
- en->data = data;
-}
-
-void
_edje_entry_select_abort(Edje_Real_Part *rp)
{
Entry *en = rp->entry_data;
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
{
_edje_entry_hide_visible_password(en->rp);
- /* if inputtin text is not allowed, dont allow text input */
- if (en->func)
- {
- if (en->func(en->data, (void *)ev->str)) return ECORE_CALLBACK_PASS_ON;
- }
-
_text_filter_format_prepend(en, tc, "+ password=off");
_text_filter_markup_prepend(en, tc, ev->str);
_text_filter_format_prepend(en, tc, "- password");
else
{
if (!strcmp(ev->str, " ")) _autoperiod_insert(en, tc);
-
- /* if inputtin text is not allowed, dont allow text input */
- if (en->func)
- {
- if (en->func(en->data, ev->str)) return ECORE_CALLBACK_PASS_ON;
- }
-
//evas_textblock_cursor_text_prepend(en->cursor, ev->str);
_text_filter_text_prepend(en, tc, ev->str);
-
- /*count characters*/
- if (en->func) en->func(en->data, NULL);
#if 0
//yy
// evas_textblock_cursor_text_prepend(en->cursor, ev->str);
if (!strcmp(preedit_string, ""))
preedit_end_state = EINA_TRUE;
- /*if inputtin text is not allowed, dont allow text input*/
- if ((en->func) && !en->have_preedit)
- {
- if (en->func(en->data, preedit_string))
- {
- free(preedit_string);
- return ECORE_CALLBACK_PASS_ON;
- }
- }
-
if (en->have_selection && !preedit_end_state)
{
/* delete selected characters */
evas_textblock_cursor_pos_set(en->cursor, preedit_start_pos + cursor_pos);
}
- /* count characters*/
- if (en->func)
- en->func(en->data, NULL);
-
_curs_update_from_curs(en->cursor, rp->object, en);
_anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,changed", rp->part->name);