nanogui: Is there chinese input mechod for microwindow?


Previous by date: 25 Apr 2001 10:39:07 -0000 Re: Is there chinese input mechod for microwindow?, jacky
Next by date: 25 Apr 2001 10:39:07 -0000 Re: a question about flnx on framebuffer, Jeff Moellmer
Previous in thread: 25 Apr 2001 10:39:07 -0000 Re: Is there chinese input mechod for microwindow?, jacky
Next in thread: 25 Apr 2001 10:39:07 -0000 Re: Is there chinese input mechod for microwindow?, jacky

Subject: RE: Is there chinese input mechod for microwindow?
From: "Jim Shiu" ####@####.####
Date: 25 Apr 2001 10:39:07 -0000
Message-Id: <002f01c0cd73$7b0fa590$7201a8c0@shiu>

Dear Jacky,

Attached please find the readme of our Chinese IME implemented to 
work with Nano-X API of Microwindows-0.89 pre7. It will help us a lot if you can test
it and let us know how it runs on you platform.

Best Regards,

Jim Shiu

================================================================
  Traditional Chinese Input Method Editor (IME) version beta 1 
              for Nano-X API of Micriowindows
================================================================
                     Installation guide

This traditional Chinese Input Method Editor is for Nano-X API of
Microwindows-0.89 pre7. In current version, it supports two input 
methods: Phone and ChangJei, in Big-5 codes. You can download 
this patch file from 

  ftp://ftp.setabox.com/pub/chinese/ime/ime-beta-1.patch 

==============
Prerequirement 
============== 

You must have following files to build your own Nano-X with 
Chinese display ability: 

  microwindows-0.89pre7.tar.gz 
  micorwindows-fonts-chinese-0.89pre2.tar.gz 

If you don't have such files, you can download these two files from 

  ftp://ftp.microwindows.org/ 

=============
Quick Install 
============= 

1) Untar the necessary files. 

     tar zxvf microwindows-0.89pre7.tar.gz 
     tar zxvf micorwindows-fonts-chinese-0.89pre2.tar.gz 

2) Modify the line in microwin/src/config with 
     HAVE_BIG5_SUPPORT = N 
   to 
     HAVE_BIG5_SUPPORT = Y 
   in order to enable traditional Chinese fonts display. 

3) Save ime-beta-1.patch in the parent directory of 'your microwin directory'. 
   Then type 

     patch -p0 < ime-beta-1.patch 

   to apply IME patch. 

4) Change directory to microwin/src/ and finish the installation in the following 
   steps: 

     make 
     make install 

5) Set NANOX_IME_PATH environment variable which will be used by IME: 

   In bash: 
  
     export NANOX_IME_PATH='your microwin directory'/src/bin/ime 
  
   In csh: 
  
     setenv NANOX_IME_PATH 'your microwin directory'/src/bin/ime 

   ps: You can put this line in .bash_profile or .login, so that you don't 
       need to set this environment variable every time you login. 
  
=======
Testing
======= 
  
If you want to see if your system can work correctly, you can execute 
microwin/src/demos/kbd/demo1 or microwin/src/demos/kbd/demo2. 

  ./demo1 

or 

  ./demo2 

In demo1, if you can see a new window when you press Ctrl-Space, your installation 
is successful. In demo2, you can see a terminal window. When you move your mouse 
into this window and press Ctrl-Space, you can have a Chinese input editor, and 
you can type Chinese word in this terminal window. 

===============================================
Modify Your Application to Accept Chinese Input 
=============================================== 

Because a Chinese character is double-byte encoded, something special must be done 
to handle these Chinese characters. During the input process, the first byte of 
Chinese characters must be buffered, and a complete Chinese character can not be 
composed correctly until the arrival of the second byte. In our system, whenever 
the keystroke event, GR_EVENT_KEYSTROKE, occurs, The 'ch' field of the keystroke 
event must be checked to see if this value becomes MWKEY_BIG5. If 'ch' field 
becomes MWKEY_BIG5, the value of field 'scancode' will be a part of a Chinese 
character. 

Sample: 

  void writeChinese(char ch) 
  { 
    static char ChineseChar[2] = {'\0', '\0'}; 
  
    /* support BIG5 */ 
    if ( ChineseChar[0] != '\0') 
    { 
      ChineseChar[1] = ch;
      GrText(w, gc, 10, 10, ChineseChar, 2, GR_TFTOP);

      ChineseChar[0] = '\0'; 
      return;
    } 
    if ( (unsigned char)ch >= 0xA1 && (unsigned char)ch <= 0xFE ) { 
      ChineseChar[0] = ch; 
      return; 
    } 
  } 
  
  void Handler(void) 
  { 
    GR_EVENT             wevent; 
    GR_EVENT_KEYSTROKE   *kp; 
    unsigned char        buf[LARGEBUFFER]; 
  
      GrGetNextEvent(&wevent); 
      switch(wevent.type) { 
                ... 
      case GR_EVENT_TYPE_KEY_DOWN: 
        kp=(GR_EVENT_KEYSTROKE *)&wevent; 
        /* toss all special keys*/ 
        if (kp->ch == MWKEY_BIG5) 
        { 
          writeChinese(kp->scancode); 
        } 
        else 
        { 
          if (kp->ch & MWKEY_NONASCII_MASK) 
            break; 
          *buf = kp->ch & 0xff; 
          write(pipeh, buf,1); 
          break; 
        } 
      ... 
    } 
  } 

=========
Todo List
=========

1. Add a resource file to record some environment settings.
2. Modify the UI of our programs.
3. Improve IME API.

=====================
Supporting Institutes
=====================
  
Many thanks to go to Setabox Co., Ltd. and CML (Communication and
Multimedia Laboratory, http://www.cmlab.csie.ntu.edu.tw/) in the 
Department of Computer Science and Information Engineering of 
National Taiwan University for supporting this porting project.
  

-----Original Message-----
From: jacky ####@####.####
Sent: Wednesday, April 25, 2001 4:52 PM
To: Greg Haerr; ####@####.####
Subject: Re: Is there chinese input mechod for microwindow?


Hi, Haerr, I have seen your mail, and I am greatly interested
in the chinese inputting method, could you mail to me a copy,
thanks a lot.


----- Original Message -----
From: "Greg Haerr" ####@####.####
To: "fuzhenyu" ####@####.#### ####@####.####
Sent: Friday, March 30, 2001 1:35 AM
Subject: Re: Is there chinese input mechod for microwindow?


> : I used the Assabet and Armlinux,I have download microwindow successful
to
> : assabet.
> : I want to know How can i input chinese in microwindow.
>
> I have an unintegrated chinese input method editor for the Nano-X
> API, I haven't tested it and have asked several times for volunteers,
> and found none.
>
> Regards,
>
> Greg
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####

Previous by date: 25 Apr 2001 10:39:07 -0000 Re: Is there chinese input mechod for microwindow?, jacky
Next by date: 25 Apr 2001 10:39:07 -0000 Re: a question about flnx on framebuffer, Jeff Moellmer
Previous in thread: 25 Apr 2001 10:39:07 -0000 Re: Is there chinese input mechod for microwindow?, jacky
Next in thread: 25 Apr 2001 10:39:07 -0000 Re: Is there chinese input mechod for microwindow?, jacky


Powered by ezmlm-browse 0.20.