From: handa Date: Tue, 21 Dec 2004 02:04:17 +0000 (+0000) Subject: (win_callback): Handle Minput_reset. X-Git-Tag: REL-1-2-0~40 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88fe28404f3de4a68ac82d765c61e4c01cb762fc;p=m17n%2Fm17n-lib.git (win_callback): Handle Minput_reset. (minput__win_init): Register reset_ic as a callback for Minput_reset. --- diff --git a/src/input-gui.c b/src/input-gui.c index c3d4202..f4433a7 100644 --- a/src/input-gui.c +++ b/src/input-gui.c @@ -484,6 +484,28 @@ win_callback (MInputContext *ic, MSymbol command) win_ic_info->candidates.mapped = 0; } } + else if (command == Minput_reset) + { + MInputCallbackFunc func; + + if (minput_default_driver.callback_list + && (func = ((MInputCallbackFunc) + mplist_get (minput_default_driver.callback_list, + Minput_reset)))) + { + MInputContextInfo *ic_info + = (MInputContextInfo *) win_ic_info->ic_info; + ic->info = ic_info; + (func) (ic, Minput_reset); + ic->info = win_ic_info; + } + if (ic->preedit_changed) + minput__callback (ic, Minput_preedit_draw); + if (ic->status_changed) + minput__callback (ic, Minput_status_draw); + if (ic->candidates_changed) + minput__callback (ic, Minput_candidates_draw); + } } static int @@ -525,6 +547,7 @@ minput__win_init () plist = mplist_add (plist, Minput_candidates_done, (void *) win_callback); plist = mplist_add (plist, Minput_set_spot, (void *) win_callback); plist = mplist_add (plist, Minput_toggle, (void *) win_callback); + plist = mplist_add (plist, Minput_reset, (void *) win_callback); } minput_driver = &minput_gui_driver;