_edje_focus_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Edje *ed = data;
-#ifdef HAVE_ECORE_IMF
+#ifdef HAVE_ECORE_IMF
Edje_Real_Part *rp;
Entry *en;
#endif
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
- (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
+ (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
return;
if (!en->imf_context) return;
if (!rp) return;
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
- (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
+ (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
return;
if (!en->imf_context) return;
if (ln < 0) ln = 0;
else
{
- if (ln > last) ln = last;
+ if (ln > last) ln = last;
}
if (!evas_object_textblock_line_number_geometry_get(o, ln, &lx, &ly, &lw, &lh))
return;
_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);
}
smart = evas_object_smart_parent_get(o);
clip = evas_object_clip_get(o);
if (en->sel_start)
- range = evas_textblock_cursor_range_geometry_get(en->sel_start, en->sel_end);
+ range = evas_textblock_cursor_range_geometry_get(en->sel_start, en->sel_end);
else
- return;
+ return;
if (eina_list_count(range) != eina_list_count(en->sel))
{
while (en->sel)
en = rp->entry_data;
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) &&
(en->select_allow))
- return;
+ return;
ignored = rp->part->ignore_flags & ev->event_flags;
if ((!ev->event_flags) || (!ignored))
{
len = 200 + strlen(n);
buf = alloca(len);
if (ev->flags & EVAS_BUTTON_TRIPLE_CLICK)
- snprintf(buf, len, "anchor,mouse,down,%i,%s,triple", ev->button, n);
+ snprintf(buf, len, "anchor,mouse,down,%i,%s,triple", ev->button, n);
else if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
- snprintf(buf, len, "anchor,mouse,down,%i,%s,double", ev->button, n);
+ snprintf(buf, len, "anchor,mouse,down,%i,%s,double", ev->button, n);
else
- snprintf(buf, len, "anchor,mouse,down,%i,%s", ev->button, n);
+ snprintf(buf, len, "anchor,mouse,down,%i,%s", ev->button, n);
_edje_emit(rp->edje, buf, rp->part->name);
}
}
ignored = rp->part->ignore_flags & ev->event_flags;
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) &&
(en->select_allow))
- return;
+ return;
n = an->name;
if (!n) n = "";
len = 200 + strlen(n);
en = rp->entry_data;
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) &&
(en->select_allow))
- return;
+ return;
ignored = rp->part->ignore_flags & ev->event_flags;
if ((!ev->event_flags) || (!ignored))
{
free(sel);
an->sel = eina_list_remove_list(an->sel, an->sel);
}
-
+
sel = calloc(1, sizeof(Sel));
an->sel = eina_list_append(an->sel, sel);
-
+
if (en->rp->edje->item_provider.func)
{
ob = en->rp->edje->item_provider.func
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->base.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->base.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->base.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;
+ continue;
evas_object_move(sel->obj, x + cx, y + cy);
evas_object_resize(sel->obj, cw, ch);
}
else
{
Evas_Textblock_Rectangle *r;
-
+
r = range->data;
*(&(sel->rect)) = *r;
if (sel->obj_bg)
_anchors_clear(c, o, en);
c1 = evas_object_textblock_cursor_new(o);
node = evas_textblock_node_format_first_get(o);
- for (; node ; node = evas_textblock_node_format_next_get(node))
+ for (; node; node = evas_textblock_node_format_next_get(node))
{
const char *s;
{
if (an)
{
- /*
+ /*
if (!firsttext)
{
if (an->name) free(an->name);
_backspace(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entry *en __UNUSED__)
{
if (evas_textblock_cursor_char_prev(c))
- evas_textblock_cursor_char_delete(c);
+ evas_textblock_cursor_char_delete(c);
}
static void
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
- return;
+ return;
if (!ev->key) return;
#ifdef HAVE_ECORE_IMF
if (ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_KEY_DOWN,
(Ecore_IMF_Event *)&ecore_ev))
- return;
+ return;
}
#endif
else
{
if (en->have_selection)
- _range_del(en->cursor, rp->object, en);
+ _range_del(en->cursor, rp->object, en);
else
- _backspace(en->cursor, rp->object, en);
+ _backspace(en->cursor, rp->object, en);
}
_sel_clear(en->cursor, rp->object, en);
_curs_update_from_curs(en->cursor, rp->object, en);
else
{
if (en->have_selection)
- _range_del(en->cursor, rp->object, en);
+ _range_del(en->cursor, rp->object, en);
else
- _delete(en->cursor, rp->object, en);
+ _delete(en->cursor, rp->object, en);
}
_sel_clear(en->cursor, rp->object, en);
_curs_update_from_curs(en->cursor, rp->object, en);
else _sel_clear(en->cursor, rp->object, en);
}
if ((control) && (multiline))
- _curs_start(en->cursor, rp->object, en);
+ _curs_start(en->cursor, rp->object, en);
else
- _curs_lin_start(en->cursor, rp->object, en);
+ _curs_lin_start(en->cursor, rp->object, en);
if (en->select_allow)
{
if (shift) _sel_extend(en->cursor, rp->object, en);
else _sel_clear(en->cursor, rp->object, en);
}
if ((control) && (multiline))
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
else
- _curs_lin_end(en->cursor, rp->object, en);
+ _curs_lin_end(en->cursor, rp->object, en);
if (en->select_allow)
{
if (shift) _sel_extend(en->cursor, rp->object, en);
if (multiline)
{
if (en->have_selection)
- _range_del(en->cursor, rp->object, en);
+ _range_del(en->cursor, rp->object, en);
_sel_clear(en->cursor, rp->object, en);
if (shift)
{
if (ev->string)
{
if (en->have_selection)
- _range_del(en->cursor, rp->object, en);
+ _range_del(en->cursor, rp->object, en);
_sel_clear(en->cursor, rp->object, en);
//zz
// evas_textblock_cursor_text_prepend(en->cursor, ev->string);
}
}
if ((old_cur_pos != evas_textblock_cursor_pos_get(en->cursor)) && (!cursor_changed))
- _edje_emit(ed, "cursor,changed", rp->part->name);
+ _edje_emit(ed, "cursor,changed", rp->part->name);
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
- return;
+ return;
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
if (ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_KEY_UP,
(Ecore_IMF_Event *)&ecore_ev))
- return;
+ return;
}
#endif
}
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return;
+ return;
if (ev->button == 2)
{
_edje_emit(rp->edje, "entry,paste,request", rp->part->name);
if (ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_MOUSE_DOWN,
(Ecore_IMF_Event *)&ecore_ev))
- 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)
- dosel = EINA_TRUE;
+ dosel = EINA_TRUE;
else if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
{
if (en->select_allow) dosel = EINA_TRUE;
if (line == -1)
{
if (rp->part->multiline)
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
else
{
evas_textblock_cursor_paragraph_first(en->cursor);
evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh);
if (!evas_textblock_cursor_char_coord_set(en->cursor, en->cx, ly + (lh / 2)))
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
}
}
else
else
{
if (en->cx <= lx)
- _curs_lin_start(en->cursor, rp->object, en);
+ _curs_lin_start(en->cursor, rp->object, en);
else
- _curs_lin_end(en->cursor, rp->object, en);
+ _curs_lin_end(en->cursor, rp->object, en);
}
}
}
if (dosel)
{
- if ((en->have_selection) &&
+ if ((en->have_selection) &&
(rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT))
{
Eina_List *first, *last;
}
}
if (evas_textblock_cursor_compare(tc, en->cursor))
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ _edje_emit(rp->edje, "cursor,changed", rp->part->name);
evas_textblock_cursor_free(tc);
#ifdef HAVE_ECORE_IMF
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return;
+ return;
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
if (ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_MOUSE_UP,
(Ecore_IMF_Event *)&ecore_ev))
- return;
+ return;
}
#endif
if (line == -1)
{
if (rp->part->multiline)
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
else
{
evas_textblock_cursor_paragraph_first(en->cursor);
evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh);
if (!evas_textblock_cursor_char_coord_set(en->cursor, en->cx, ly + (lh / 2)))
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
}
}
else
else
{
if (en->cx <= lx)
- _curs_lin_start(en->cursor, rp->object, en);
+ _curs_lin_start(en->cursor, rp->object, en);
else
- _curs_lin_end(en->cursor, rp->object, en);
+ _curs_lin_end(en->cursor, rp->object, en);
}
}
}
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
- {
+ {
if (en->select_allow)
{
if (en->had_sel)
{
if (en->select_mod_end)
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->cursor, rp->object, en);
else if (en->select_mod_start)
- _sel_preextend(en->cursor, rp->object, en);
+ _sel_preextend(en->cursor, rp->object, en);
}
else
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->cursor, rp->object, en);
//evas_textblock_cursor_copy(en->cursor, en->sel_end);
}
}
else
- evas_textblock_cursor_copy(en->cursor, en->sel_end);
+ evas_textblock_cursor_copy(en->cursor, en->sel_end);
if (en->selecting)
{
if (en->have_selection)
- en->had_sel = EINA_TRUE;
+ en->had_sel = EINA_TRUE;
en->selecting = EINA_FALSE;
}
if (evas_textblock_cursor_compare(tc, en->cursor))
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ _edje_emit(rp->edje, "cursor,changed", rp->part->name);
evas_textblock_cursor_free(tc);
#ifdef HAVE_ECORE_IMF
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return;
+ return;
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
if (ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_MOUSE_MOVE,
(Ecore_IMF_Event *)&ecore_ev))
- return;
+ return;
}
#endif
-
+
if (en->selecting)
{
tc = evas_object_textblock_cursor_new(rp->object);
if (evas_textblock_cursor_line_coord_set(en->cursor, en->cy) < 0)
{
if (rp->part->multiline)
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
else
{
evas_textblock_cursor_paragraph_first(en->cursor);
evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh);
if (!evas_textblock_cursor_char_coord_set(en->cursor, en->cx, ly + (lh / 2)))
- _curs_end(en->cursor, rp->object, en);
+ _curs_end(en->cursor, rp->object, en);
}
}
else
{
evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh);
if (en->cx <= lx)
- _curs_lin_start(en->cursor, rp->object, en);
+ _curs_lin_start(en->cursor, rp->object, en);
else
- _curs_lin_end(en->cursor, rp->object, en);
+ _curs_lin_end(en->cursor, rp->object, en);
}
}
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)
if (en->had_sel)
{
if (en->select_mod_end)
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->cursor, rp->object, en);
else if (en->select_mod_start)
- _sel_preextend(en->cursor, rp->object, en);
+ _sel_preextend(en->cursor, rp->object, en);
}
else
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->cursor, rp->object, en);
}
}
else
if (en->select_allow)
{
if (evas_textblock_cursor_compare(en->sel_start, en->sel_end) != 0)
- _sel_enable(en->cursor, rp->object, en);
+ _sel_enable(en->cursor, rp->object, en);
if (en->have_selection)
- _sel_update(en->cursor, rp->object, en);
+ _sel_update(en->cursor, rp->object, en);
}
if (evas_textblock_cursor_compare(tc, en->cursor))
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ _edje_emit(rp->edje, "cursor,changed", rp->part->name);
evas_textblock_cursor_free(tc);
#ifdef HAVE_ECORE_IMF
_edje_entry_init(Edje *ed)
{
if (!ed->has_entries)
- return;
+ return;
if (ed->entries_inited)
- return;
+ return;
ed->entries_inited = EINA_TRUE;
evas_object_event_callback_add(ed->obj, EVAS_CALLBACK_FOCUS_IN, _edje_focus_in_cb, ed);
_edje_entry_shutdown(Edje *ed)
{
if (!ed->has_entries)
- return;
+ return;
if (!ed->entries_inited)
- return;
+ return;
ed->entries_inited = EINA_FALSE;
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_FOCUS_IN, _edje_focus_in_cb);
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_DOWN, _edje_key_down_cb);
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_UP, _edje_key_up_cb);
if (evas_event_callback_del_full(ed->base.evas, EVAS_CALLBACK_CANVAS_FOCUS_IN, _evas_focus_in_cb, ed) != ed)
- ERR("could not unregister EVAS_CALLBACK_FOCUS_IN");
+ ERR("could not unregister EVAS_CALLBACK_FOCUS_IN");
if (evas_event_callback_del_full(ed->base.evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, _evas_focus_out_cb, ed) != ed)
- ERR("could not unregister EVAS_CALLBACK_FOCUS_OUT");
+ ERR("could not unregister EVAS_CALLBACK_FOCUS_OUT");
}
void
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 = EINA_TRUE;
+ en->select_allow = EINA_TRUE;
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD)
{
Edje_Part_Description_Text *txt;
- txt = (Edje_Part_Description_Text *) rp->chosen_description;
+ txt = (Edje_Part_Description_Text *)rp->chosen_description;
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));
+ evas_object_textblock_replace_char_set(rp->object, edje_string_get(&txt->text.repch));
else
- evas_object_textblock_replace_char_set(rp->object, "*");
+ evas_object_textblock_replace_char_set(rp->object, "*");
}
en->cursor_bg = edje_object_add(rp->edje->base.evas);
}
}
else
- en->imf_context = NULL;
+ en->imf_context = NULL;
if (!en->imf_context) goto done;
ecore_imf_context_client_window_set(en->imf_context, rp->object);
ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->base.evas);
- ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context,
+ ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context,
_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->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 ?
+ ecore_imf_context_input_mode_set(en->imf_context,
+ rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD ?
ECORE_IMF_INPUT_MODE_INVISIBLE : ECORE_IMF_INPUT_MODE_FULL);
#endif
}
if (!en) return NULL;
// get selection - convert to markup
if ((!en->selection) && (en->have_selection))
- en->selection = evas_textblock_cursor_range_text_get
- (en->sel_start, en->sel_end, EVAS_TEXTBLOCK_TEXT_MARKUP);
+ en->selection = evas_textblock_cursor_range_text_get
+ (en->sel_start, en->sel_end, EVAS_TEXTBLOCK_TEXT_MARKUP);
return en->selection;
}
if (!en) return;
// prepend markup @ cursor pos
if (en->have_selection)
- _range_del(en->cursor, rp->object, en);
+ _range_del(en->cursor, rp->object, en);
_sel_clear(en->cursor, rp->object, en);
//xx
// evas_object_textblock_text_markup_prepend(en->cursor, text);
{
if (an->item) continue;
if (!strcmp(anchor, an->name))
- return an->sel;
+ return an->sel;
}
return NULL;
}
{
Entry *en = rp->entry_data;
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
- return;
+ return;
en->select_allow = allow;
}
return en->sel_end;
case EDJE_CURSOR_PREEDIT_START:
if (!en->preedit_start)
- en->preedit_start = evas_object_textblock_cursor_new(rp->object);
+ en->preedit_start = evas_object_textblock_cursor_new(rp->object);
return en->preedit_start;
case EDJE_CURSOR_PREEDIT_END:
if (!en->preedit_end)
- en->preedit_end = evas_object_textblock_cursor_new(rp->object);
+ en->preedit_end = evas_object_textblock_cursor_new(rp->object);
return en->preedit_end;
case EDJE_CURSOR_USER:
if (!en->cursor_user)
- en->cursor_user = evas_object_textblock_cursor_new(rp->object);
+ en->cursor_user = evas_object_textblock_cursor_new(rp->object);
return en->cursor_user;
case EDJE_CURSOR_USER_EXTRA:
if (!en->cursor_user_extra)
- en->cursor_user_extra = evas_object_textblock_cursor_new(rp->object);
+ en->cursor_user_extra = evas_object_textblock_cursor_new(rp->object);
return en->cursor_user_extra;
default:
break;
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL);
ln--;
if (ln < 0) return EINA_FALSE;
- if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
+ if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
&lx, &ly, &lw, &lh))
- return EINA_FALSE;
+ return EINA_FALSE;
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
if (!evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
{
- if (cx < (lx +(lw / 2)))
- evas_textblock_cursor_line_char_last(c);
+ if (cx < (lx + (lw / 2)))
+ evas_textblock_cursor_line_char_last(c);
else
- evas_textblock_cursor_line_char_last(c);
+ evas_textblock_cursor_line_char_last(c);
}
_curs_update_from_curs(c, rp->object, rp->entry_data);
_sel_update(c, rp->object, rp->entry_data);
if (!c) return EINA_FALSE;
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL);
ln++;
- if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
+ if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
&lx, &ly, &lw, &lh))
- return EINA_FALSE;
+ return EINA_FALSE;
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
if (!evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
{
- if (cx < (lx +(lw / 2)))
- evas_textblock_cursor_line_char_last(c);
+ if (cx < (lx + (lw / 2)))
+ evas_textblock_cursor_line_char_last(c);
else
- evas_textblock_cursor_line_char_last(c);
+ evas_textblock_cursor_line_char_last(c);
}
_curs_update_from_curs(c, rp->object, rp->entry_data);
_sel_update(c, rp->object, rp->entry_data);
_edje_entry_real_part_configure(rp);
}
-
Eina_Bool
_edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur,
Evas_Coord x, Evas_Coord y)
static Eina_Bool
_edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, char **text, int *cursor_pos)
{
- Edje* ed = data;
+ Edje *ed = data;
Edje_Real_Part *rp = ed->focused_part;
Entry *en;
const char *str;
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return EINA_FALSE;
+ return EINA_FALSE;
if (text)
{
static Eina_Bool
_edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event)
{
- Edje* ed = data;
+ Edje *ed = data;
Edje_Real_Part *rp = ed->focused_part;
Entry *en;
Ecore_IMF_Event_Commit *ev = event;
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return ECORE_CALLBACK_PASS_ON;
+ 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;
/* calculate the cursor position to insert commit string */
if (en->preedit_start)
- evas_textblock_cursor_copy(en->preedit_start, tc);
+ evas_textblock_cursor_copy(en->preedit_start, tc);
else
- evas_textblock_cursor_copy(en->cursor, tc);
+ evas_textblock_cursor_copy(en->cursor, tc);
#ifdef HAVE_ECORE_IMF
/* delete preedit characters */
#endif
if (evas_textblock_cursor_compare(en->cursor, tc))
- cursor_move = EINA_TRUE;
+ cursor_move = EINA_TRUE;
//yy
// evas_textblock_cursor_text_prepend(en->cursor, ev->str);
static Eina_Bool
_edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *event)
{
- Edje* ed = data;
+ Edje *ed = data;
Edje_Real_Part *rp = ed->focused_part;
Entry *en;
Ecore_IMF_Event_Preedit_Changed *ev = event;
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return ECORE_CALLBACK_PASS_ON;
+ return ECORE_CALLBACK_PASS_ON;
if (!en->imf_context) return ECORE_CALLBACK_PASS_ON;
ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &cursor_pos);
if (!strcmp(preedit_string, ""))
- preedit_end_state = EINA_TRUE;
+ preedit_end_state = EINA_TRUE;
if (en->have_selection && !preedit_end_state)
{
{
/* set preedit start cursor */
if (!en->preedit_start)
- en->preedit_start = evas_object_textblock_cursor_new(rp->object);
+ en->preedit_start = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_copy(en->cursor, en->preedit_start);
/* set preedit end cursor */
if (!en->preedit_end)
- en->preedit_end = evas_object_textblock_cursor_new(rp->object);
+ en->preedit_end = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_copy(en->cursor, en->preedit_end);
preedit_end_pos = evas_textblock_cursor_pos_get(en->cursor);
en = rp->entry_data;
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
- return ECORE_CALLBACK_PASS_ON;
+ 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;