From 68fdddb40c6a1bc165674e957f785628222263c9 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 2 Jul 2012 02:52:48 +0000 Subject: [PATCH] more touch (coform+imf) integration done in preparation. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/terminology@73120 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- README | 13 +++++++++++++ src/bin/main.c | 9 ++++++++- src/bin/termio.c | 19 ++++++++++++++++--- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/README b/README index 5fdec77..e809648 100644 --- a/README +++ b/README @@ -49,3 +49,16 @@ Right mouse button = controls menu Middle mouse button = paste highlight selection Left mouse button/drag = make highlight Wheel = scroll up or down in history + +Extended escapes for terminology only: + +[\033][{][COMMAND][\000] +i.e. + 1. ESC char (\033 or 0x1b) + 2. { char + 3... sequence of UTF8 chars other than nul (\000 or 0x00). + 4 \000 char (nul byte or 0x00 to indicate end of sequence) +e.g. + echo -n '\033{Hello world\000' + +Commands understood: diff --git a/src/bin/main.c b/src/bin/main.c index b42e013..a17a0bd 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -13,6 +13,7 @@ int _log_domain = -1; static Evas_Object *win = NULL, *bg = NULL, *term = NULL, *media = NULL; +static Evas_Object *conform = NULL; static Ecore_Timer *flush_timer = NULL; static Eina_Bool focused = EINA_FALSE; @@ -283,6 +284,12 @@ elm_main(int argc, char **argv) putenv("TERMINOLOGY=1"); win = tg_win_add(); + + conform = o = elm_conformant_add(win); + evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_win_resize_object_add(win, o); + evas_object_show(o); bg = o = edje_object_add(evas_object_evas_get(win)); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -294,7 +301,7 @@ elm_main(int argc, char **argv) goto end; } theme_auto_reload_enable(o); - elm_win_resize_object_add(win, o); + elm_object_content_set(conform, o); evas_object_show(o); term = o = termio_add(win, config, cmd, 80, 24); diff --git a/src/bin/termio.c b/src/bin/termio.c index 17309b8..e4db2d4 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -674,6 +674,7 @@ _smart_cb_focus_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_TERMINAL); if (sd->imf) { + ecore_imf_context_input_panel_show(sd->imf); ecore_imf_context_reset(sd->imf); ecore_imf_context_focus_in(sd->imf); _imf_cursor_set(sd); @@ -695,6 +696,7 @@ _smart_cb_focus_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, ecore_imf_context_reset(sd->imf); _imf_cursor_set(sd); ecore_imf_context_focus_out(sd->imf); + ecore_imf_context_input_panel_hide(sd->imf); } } @@ -1416,9 +1418,20 @@ _smart_add(Evas_Object *obj) (sd->imf, ECORE_IMF_CALLBACK_COMMIT, _imf_event_commit_cb, sd); /* make IMF usable by a terminal - no preedit, prediction... */ - ecore_imf_context_use_preedit_set(sd->imf, EINA_FALSE); - ecore_imf_context_prediction_allow_set(sd->imf, EINA_FALSE); - ecore_imf_context_autocapital_type_set(sd->imf, ECORE_IMF_AUTOCAPITAL_TYPE_NONE); + ecore_imf_context_use_preedit_set + (sd->imf, EINA_FALSE); + ecore_imf_context_prediction_allow_set + (sd->imf, EINA_FALSE); + ecore_imf_context_autocapital_type_set + (sd->imf, ECORE_IMF_AUTOCAPITAL_TYPE_NONE); + ecore_imf_context_input_panel_layout_set + (sd->imf, ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL); + ecore_imf_context_input_mode_set + (sd->imf, ECORE_IMF_INPUT_MODE_FULL); + ecore_imf_context_input_panel_language_set + (sd->imf, ECORE_IMF_INPUT_PANEL_LANG_ALPHABET); + ecore_imf_context_input_panel_return_key_type_set + (sd->imf, ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT); imf_done: if (sd->imf) DBG("Ecore IMF Setup"); else WRN("Ecore IMF failed"); -- 2.7.4