forked from enlightenment/terminology
imf: handle cursor move
This commit is contained in:
parent
c31c1cbd9b
commit
4f261e922e
|
@ -3441,9 +3441,6 @@ termio_imf_cursor_set(Evas_Object *obj, Ecore_IMF_Context *imf)
|
|||
evas_object_geometry_get(sd->cursor.obj, &cx, &cy, &cw, &ch);
|
||||
ecore_imf_context_cursor_location_set(imf, cx, cy, cw, ch);
|
||||
ecore_imf_context_cursor_position_set(imf, (sd->cursor.y * sd->grid.w) + sd->cursor.x);
|
||||
/*
|
||||
ecore_imf_context_cursor_position_set(sd->imf, 0); // how to get it?
|
||||
*/
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -5172,9 +5169,12 @@ _cursor_cb_move(void *data,
|
|||
void *_event EINA_UNUSED)
|
||||
{
|
||||
Termio *sd = evas_object_smart_data_get(data);
|
||||
Ecore_IMF_Context *imf;
|
||||
EINA_SAFETY_ON_NULL_RETURN(sd);
|
||||
/* TODO: boris */
|
||||
//_imf_cursor_set(sd);
|
||||
|
||||
imf = term_imf_context_get(sd->term);
|
||||
if (imf)
|
||||
termio_imf_cursor_set(sd->self, imf);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1186,6 +1186,20 @@ term_preedit_str_get(Term *term)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
Ecore_IMF_Context *
|
||||
term_imf_context_get(Term *term)
|
||||
{
|
||||
Win *wn = term->wn;
|
||||
Term_Container *tc = (Term_Container*) wn;
|
||||
Term *focused;
|
||||
|
||||
tc = (Term_Container*) wn;
|
||||
focused = tc->focused_term_get(tc);
|
||||
if (term == focused)
|
||||
return wn->khdl.imf;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_imf_event_commit_cb(void *data,
|
||||
Ecore_IMF_Context *_ctx EINA_UNUSED,
|
||||
|
|
|
@ -68,6 +68,8 @@ void term_right(Term *term);
|
|||
|
||||
const char *
|
||||
term_preedit_str_get(Term *term);
|
||||
Ecore_IMF_Context *
|
||||
term_imf_context_get(Term *term);
|
||||
|
||||
void win_font_size_set(Win *wn, int new_size);
|
||||
void win_font_update(Term *term);
|
||||
|
|
Loading…
Reference in New Issue