tc = evas_object_textblock_cursor_new(en->rp->object);
evas_textblock_cursor_copy(en->cursor, tc);
- if (!evas_textblock_cursor_char_prev(tc))
+ if (!evas_textblock_cursor_char_prev(tc))
{
ret = EINA_TRUE;
goto done;
}
else
{
- if (evas_textblock_cursor_char_prev(tc))
+ if (evas_textblock_cursor_char_prev(tc))
{
str = evas_textblock_cursor_range_text_get(tc, en->cursor, EVAS_TEXTBLOCK_TEXT_MARKUP);
if (!str) goto done;
return ECORE_CALLBACK_CANCEL;
}
-static void
+static void
_input_panel_hide_timer_start(void *data)
{
if (hide_timer)
evas_textblock_cursor_range_delete(en->preedit_start, en->preedit_end);
}
-static void
+static void
_edje_entry_focus_in_cb(void *data, Evas_Object *o __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
Edje_Real_Part *rp;
_curs_jump_line_by(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en, int by)
{
int ln;
-
+
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL) + by;
_curs_jump_line(c, o, en, ln);
}
en->selection = NULL;
}
_edje_emit(en->rp->edje, "selection,changed", en->rp->part->name);
-
+
#ifdef HAVE_ECORE_IMF
if (!en->imf_context) return;
ecore_imf_context_reset(en->imf_context);
list_cnt = eina_list_count(en->sel);
list_idx = 0;
-
+
evas_object_hide(en->cursor_fg);
evas_object_hide(en->cursor_bg);
evas_object_move(en->block_handler_btm, x + r->x + r->w, y + r->y + r->h);
evas_object_show(en->block_handler_btm);
}
- }
+ }
*(&(sel->rect)) = *r;
range = eina_list_remove_list(range, range);
free(r);
for (ll = range; ll; ll = eina_list_next(ll))
{
Evas_Object *ob;
-
+
sel = calloc(1, sizeof(Sel));
an->sel = eina_list_append(an->sel, sel);
ob = edje_object_add(en->rp->edje->evas);
evas_object_show(ob);
sel->obj_bg = ob;
en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_bg);
-
+
ob = edje_object_add(en->rp->edje->evas);
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source6);
evas_object_smart_member_add(ob, smart);
evas_object_show(ob);
sel->obj_fg = ob;
en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_fg);
-
+
ob = evas_object_rectangle_add(en->rp->edje->evas);
evas_object_color_set(ob, 0, 0, 0, 0);
evas_object_smart_member_add(ob, smart);
if (an->item)
{
Evas_Coord cx, cy, cw, ch;
-
+
if (!evas_textblock_cursor_format_item_geometry_get
(an->start, &cx, &cy, &cw, &ch))
continue;
else
{
Evas_Textblock_Rectangle *r;
-
+
r = range->data;
*(&(sel->rect)) = *r;
if (sel->obj_bg)
}
}
}
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(rp);
_edje_emit(rp->edje, "entry,changed", rp->part->name);
}
-static Eina_Bool
+static Eina_Bool
_password_timer_cb(void *data)
{
Entry *en = (Entry *)data;
// cut
}
else
- {
+ {
if (en->have_selection)
_range_del(en->cursor, rp->object, en);
else
{
_delete(en->cursor, rp->object, en);
- /*count characters*/
+ /*count characters*/
if (en->func)
en->func(en->data, NULL);
}
_caps_mode_check(en);
}
else if ((!strcmp(ev->key, "ISO_Left_Tab")) && (multiline))
- {
+ {
// remove a tab
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
_caps_mode_check(en);
}
_edje_emit(ed, "entry,key,enter", rp->part->name);
- /*count characters*/
+ /*count characters*/
if (en->func)
en->func(en->data, NULL);
}
_range_del(en->cursor, rp->object, en);
_sel_clear(en->cursor, rp->object, en);
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
- {
- _edje_entry_hide_visible_password(en->rp);
+ {
+ _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->string))
ecore_timer_del(en->pw_timer);
en->pw_timer = NULL;
}
- en->pw_timer = ecore_timer_add(2.0, _password_timer_cb, en);
+ en->pw_timer = ecore_timer_add(2.0, _password_timer_cb, en);
}
else
{
_text_filter_text_prepend(en, en->cursor, ev->string);
/*count characters*/
- if (en->func) en->func(en->data, NULL);
+ 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);
do /* move cursor to the end point of the words */
{
ct = _edje_entry_cursor_content_get(rp, EDJE_CURSOR_MAIN);
- if (block_type != _get_char_type(ct))
+ if (block_type != _get_char_type(ct))
{
//_edje_entry_cursor_prev(rp, EDJE_CURSOR_MAIN);
break;
en->select_allow = EINA_TRUE;
en->had_sel = EINA_TRUE;
en->selecting = EINA_FALSE;
-
+
//printf("string : %s \n", eina_strbuf_string_get(str));
eina_strbuf_free(str);
}
{
ecore_timer_del(en->longpress_timer);
en->longpress_timer = NULL;
- }
-
+ }
+
en->long_pressed = EINA_TRUE;
en->longpress_timer = NULL;
}
en = rp->entry_data;
en->double_clicked = EINA_FALSE;
en->long_pressed = EINA_FALSE;
-
+
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return;
return;
}
#endif
-
+
en->select_mod_start = EINA_FALSE;
en->select_mod_end = EINA_FALSE;
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
evas_object_geometry_get(rp->object, &x, &y, &w, &h);
en->cx = ev->canvas.x - x;
en->cy = ev->canvas.y - y;
-
+
if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
{
evas_textblock_cursor_char_coord_set(en->cursor, en->cx, en->cy);
}
_edje_entry_real_part_configure(rp);
-
+
_edje_emit(en->rp->edje, "handler,moving", en->rp->part->name);
}
}
done:
en->cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(rp->object);
-
+
edje_object_signal_callback_add(rp->edje->obj, "mouse,down,1,double", rp->part->name, _edje_entry_mouse_double_clicked, rp);
}
if (!en) return;
// set text as markup
_sel_clear(en->cursor, rp->object, en);
- evas_object_textblock_text_markup_set(rp->object, text);
+ evas_object_textblock_text_markup_set(rp->object, text);
_anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,changed", rp->part->name);
#endif
_edje_entry_real_part_configure(rp);
-
+
en->select_allow = EINA_TRUE;
en->had_sel = EINA_TRUE;
}
return;
en->select_allow = allow;
-
+
if ((allow) && (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
{
_edje_entry_select_word(rp);
{
Entry *en = rp->entry_data;
if (!en) return;
-
+
en->func = func;
en->data = data;
}
_edje_entry_autoperiod_set(Edje_Real_Part *rp, Eina_Bool autoperiod)
{
Entry *en = rp->entry_data;
- if (!en) return;
+ if (!en) return;
en->autoperiod = autoperiod;
}
if (en->have_selection)
{
- if (strcmp(ev->str, ""))
+ if (strcmp(ev->str, ""))
{
/* delete selected characters */
_range_del(en->cursor, rp->object, en);
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
{
- _edje_entry_hide_visible_password(en->rp);
+ _edje_entry_hide_visible_password(en->rp);
/* if inputtin text is not allowed, dont allow text input */
if (en->func)
{
Eina_List *attrs = NULL;
Ecore_IMF_Preedit_Attr *attr;
Eina_List *l;
- Eina_Strbuf *buf;
+ Eina_Strbuf *buf;
if (!rp) return ECORE_CALLBACK_PASS_ON;
/* insert preedit character(s) */
//xx
- if (strlen(preedit_string) > 0)
+ if (strlen(preedit_string) > 0)
{
buf = eina_strbuf_new();
if (attrs)
{
- EINA_LIST_FOREACH(attrs, l, attr)
+ EINA_LIST_FOREACH(attrs, l, attr)
{
if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1)
{
eina_strbuf_append(buf, "</>");
}
}
- }
+ }
// evas_object_textblock_text_markup_prepend(en->cursor, eina_strbuf_string_get(buf));
_text_filter_markup_prepend(en, en->cursor, eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
if (!preedit_end_state)
{
- /* set preedit start cursor */
+ /* set preedit start cursor */
if (!en->preedit_start)
en->preedit_start = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_copy(en->cursor, en->preedit_start);
evas_textblock_cursor_pos_set(en->cursor, preedit_start_pos + cursor_pos);
}
- /* count characters*/
+ /* count characters*/
if (en->func)
en->func(en->data, NULL);