[openi18n-im:01427] Re: patch to export information of input method engine

Federic Zhang <[email protected]> Tue, 21 Jun 2005 16:35:05 +0800
Newsgroups gmane.comp.internationalization.input-methods
Message-ID <[email protected]>
Hi,

Today i commited it with following change:

  - new ime_id (in ASCII) which serves as unique identification to
distinguish
    difference input methods. In some cases, different IMEs would have
same imename.
  - set NULL by default if those optional info isn't given by LE,
including 
    version, description, author, copyright.

Please verify. To check you need to update your LE in this way:

        /* following codes are needed in if_GetIfInfo */
      	case IF_SUPPORTED_IMEINFO:
       	 {
            	  IMEInfo *info = (IMEInfo *)malloc (sizeof (IMEInfo) *
(number of IMEs + 1)); /* Addition one is Must */
               memset (info, 0, sizeof (IMEInfo) * (number of IMEs +
1));

            	  /* fill in the information here */

               args->value = (IMArgVal)info;
        	 }
         break;

Now i plan to use the information in client. The plan is to update
iiimgcf to send the list of 
IME to gimlet together with existing le_list, gimlet displays them in
its language submenu,
once user selects one IME from the list, iiimgcf is notified and send
the change to server,
server does LE switching if necessary and then tells LE to do IME
switching.  Hope the implementation
will be available in this week. Any comment?

-federic


> Sorry!
> 
> Please get the lastest patch through attachment, which i verified is
> ok.
> several modifications have been made: 
> 
>    - exclude 'reserved1' and 'reserved2' from the IMEInfo struct
>    - correct the name of iiimcf_get_input_method_imeinfos in
> libiiimcf.sym
>    - attach the missing comp-imeinfos.c
> 
> Please review. If it is no problem, i will commit in this two days.
> 
> BTW, Ervin suggests to export also the identification (id) of input
> method engine (in ASCII)
> to distinguish different input method engines in client, it is one
> good suggestion.
> 
> -federic
> 
> 
> > Hi,
> > 
> > Attached is patch to export the information of input method engine (IME)
> > to client, the IME refers to the input method that have been implemented
> > within LE. Please review and give comment.
> > 
> > The patch is implemented to extend the existing INPUTMETHOD_DESCRIPTOR
> > attribute by adding two members 'imeinfo_nbyte' and 'imeinfo', please
> > note this information is optional, if one LE decides not to export, it
> > still works.
> >   
> > With this patch, client can get this information with the new API,
> > iiimcf_get_input_method_imeinfos, then client can use it if needed, one
> > example is to notify to gimlet, and gimlet can display in its language
> > submenu all of them which are enabled. Once one input method has been
> > selected by user, client send {lang, le, input method} to server and
> > server can switch LE and let LE to swith input method accordingly.
> > 
> > The known limitation with the implementation are that LE has to load its
> > input method engine in if_GetIfValue in advance instead of if_OpenIf,
> > the second one is once new engine has been dynamically added into LE or
> > one specific engine has been disabled or enabled by auxiliary window
> > (i.e property window), there doesn't exist good mechanism to ask iiimd
> > to dynamically change imeinfos and imdesclist accordingly.
> > 
> > -federic