[uim-commit] r1379 - in trunk: scm uim
tkng at freedesktop.org
tkng at freedesktop.org
Fri Sep 2 09:47:49 EST 2005
Author: tkng
Date: 2005-09-01 16:47:47 -0700 (Thu, 01 Sep 2005)
New Revision: 1379
Modified:
trunk/scm/im.scm
trunk/uim/uim-func.c
Log:
* uim/uim-func.c:
-(switch_im): New function.
* scm/im.scm:
-(switch-im): Call switch_im instead of calling create-context.
This is need because switching input method need C level preedit resetting,
changing current_im_name, and so on.
Modified: trunk/scm/im.scm
===================================================================
--- trunk/scm/im.scm 2005-09-01 16:24:19 UTC (rev 1378)
+++ trunk/scm/im.scm 2005-09-01 23:47:47 UTC (rev 1379)
@@ -194,8 +194,7 @@
(define switch-im
(lambda (id name)
- (release-context id)
- (create-context id #f (next-im name))))
+ (uim-switch-im id (next-im name))))
;;
;; context-management
Modified: trunk/uim/uim-func.c
===================================================================
--- trunk/uim/uim-func.c 2005-09-01 16:24:19 UTC (rev 1378)
+++ trunk/uim/uim-func.c 2005-09-01 23:47:47 UTC (rev 1379)
@@ -721,6 +721,16 @@
return uim_scm_t();
}
+
+static uim_lisp
+switch_im(uim_lisp id_, uim_lisp name_)
+{
+ const char *name= uim_scm_refer_c_str(name_);
+ uim_context uc = uim_find_context(uim_scm_c_int(id_));
+ uim_switch_im(uc, name);
+ return uim_scm_t();
+}
+
void
uim_init_im_subrs(void)
{
@@ -755,4 +765,6 @@
/**/
uim_scm_init_subr_1("im-request-surrounding", im_request_surrounding);
uim_scm_init_subr_3("im-delete-surrounding", im_delete_surrounding);
+ /**/
+ uim_scm_init_subr_2("uim-switch-im", switch_im); /* FIXME: This function name would not be appropriate. */
}
More information about the uim-commit
mailing list