[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-uim
Subject: [Uim] API for getting available IM engines
From: Takuro Ashie <ashie () good-day ! co ! jp>
Date: 2004-08-05 9:05:38
Message-ID: 20040805180538.7d52a017.ashie () good-day ! co ! jp
[Download RAW message or body]
Hi.
On Wed, 4 Aug 2004 20:39:29 +0900
Takuro Ashie <ashie@homa.ne.jp> wrote:
> This is the current patch agaist r1085:
>
> http://www.homa.ne.jp/~ashie/linux/files/uim-switch-im-test.diff.gz
>
> It has some problems yet, but it can switch IM engine from helper toolbar.
>
> There are some issues about this patch, so I'll describe it later.
BTW, when I was implementing this feature, I noticed that API for
getting available IM engines seems strange.
To get available IM, current uim requires user to create "dummy"
uim_context.
uc = uim_create_context(NULL, "UTF-8",
NULL, NULL, uim_iconv, NULL);
for (i = 0; i < uim_get_nr_im(uc); i++) {
const char *name = uim_get_im_name(uc, i);
}
uim_release_context(uc);
And all uim_context are contains all IM engines list although it can not
switch IM backend engine dynamically.
It may break users mental model.
I think we should change getting IM engines API like this:
int uim_get_nr_im (void);
const char *uim_get_im_name (int nth,
uim_code_converter *conv,
const char *lang);
const char *uim_get_im_lang (int nth,
uim_code_converter *conv,
const char *lang);
And I think uim_create_context() should return NULL for invalid engine
name.
Regards,
--
Takuro Ashie <ashie@good-day.co.jp>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic