Terminal Input Interface 0.3

** Description **

Terminal Input Interface simplifies the process of including many languages
by combining various input methods into one interface, supporting input of
many languages with just a couple of pre-defined functions.
TII supports IIIMF(using IIIMCF), so now you can use the same IM used in
X on the terminal. As of version 0.3, it only supports IIIMF (which itself
supports numerous input methods), but it is easily extensible and in the
future will include more input methods not included in IIIMF.


** Test Programs **

You need im-sdk source to compile the test programs. (I might be wrong here.)
You can get the latest im-sdk src using subversion on the IIIMF website.
I also have some snapshot versions of tar.gz'd im-sdk source. Go to
http://kldp.net/projects/hangul-jfbterm and click on Downloads, and under the
im-sdk section I have some source packages I've downloaded.

Try compiling, if it spits out a lot of errors, try compiling just the 
'iiimsf,' 'leif,' and 'lib' subdirectories, and copy the include files into 
/usr/local/include. I don't know much about compiling im-sdk, so if there's
something I've got wrong please tell me.

After you've succefully compiled and installed im-sdk, return to this
directory and type:

# make IIIMF_SRC=/path/to/im-sdk/src

where /path/to/im-sdk/src is the path to your im-sdk source. For example mine
is 'make IIIMF_SRC=/usr/local/src/im-sdk/trunk'

Run 'htt_server' (usually in '/usr/lib/im/htt_server'). Run the test program.
If everything went correctly, you'll be able to see many lines showing the
status of the input method. (You'll need a terminal that supports Korean to
actually see the characters printed in the test program.)


** Using TII in YOUR program **

Now that you've got the test programs to work, let's see HOW they work so
you'll be able to input languages in your program.

- The following need to be included as your headers:
	tii.h
	global.h

- To initialize:
	IMList * im;
	tii_global_use_im("IM NAME");
	im = tii_get_im();
	im->init();

- To send a character:
	im->sendkey('KEY', SHIFT_STATE);

- To exit:
	im->exit();

- Change the definitions of the handler functions in global.h to your handler
  functions

- Include the definitions of your handler functions in global.h

- To compile include the following options
	-DHAVE_CONFIG_H
	-DUSE_TII
	-I$(IIIMF_SRC)/lib/iiimp
	-I$(IIIMF_SRC)/include
	-liiimcf
	where $(IIIMF_SRC) is the location of your im-sdk source

- Make sure htt_server is running. It will SEGFAULT if it isn't.


** To support a new LEIF(IIIMF) **

If the name of your LEIF is 'sample',
- in iiimcf/tii-iiimcf.c, add:
  IMList im_sample = {"sample",
			tii_iiimcf_init,
			tii_iiimcf_sendkey,
			tii_iiimcf_exit};
- in tii.c, add '&im_sample' to the list of input methods
- in tii.h, add 'extern IMList im_sample'
- The same applies to non-IIIMF input methods, only iiimcf/tii-iiimcf.c
  file will need to be changed to the file where your IM is.




This README is not complete;
more content will be included in future versions of TII.
