OVERVIEW
========
Here is a simple diagram to show the structures of XSunIM Adapter.

		parent process	    -> | <-  child process
								    LE
  SunIM    XSunIMWrapper  XSunIMAdapter	XSunIMManager  LEHandler    cm.so
  =====	   =============  ============= =============  =========    =====

 start      If_OpenIF()	  start VM	start		dlopen()
			  separator	LEhandler	dlsym()
			  				if_OpenIF() if_OpenIF()

 event	   If_SendEvent() Convert SunIM call LEHandler  If_SendEvent()
 occurs			  based event to			  if_SendEvent()
			  XSunIM based

								  iml_inst(s)
						    <--		  are stored at
								  XSunIMSubr.c
			  Read data from shared
			  memory.
			  Convert XSunIM based
			  data structures to
		  	  SunIM based structures
	    <--		  at XSunIMIml.c.
preedit			  Make iml_inst and call
draw			  iml_execute()

SOURCE FILES
============
   XSunIM Adapter uses VM_Separator library. Please refer the documentation
   of VM_Separator also.

   HotKey.cpp,HotKey.hh
	Hotkye support for chinese locale. 
	Get If methods table name from hotkey.dat file.

   LEHandler.cpp, LEHandler.hh
	LEHandler class calls If methods of LEs. This class does,

		- dlopen and dlsym for .so module
		- call If methods

	While processing of each If method of LE, the operations
	executed in the If methods are stored into the shared
	memory in iml_execute() of XSunIMSubr.c.

   Public.h, Old_Interface.h
	headers

   Utility.cpp, Utility.hh
	Utility class is used for code conversion and keyevent conversion.
	CSConv is used here.

   XSunIMAdapter.cpp, XSunIMIml.cpp, XSunIMAdapter.hh
	XSunIMAdapter class is a main class of XSunIM adapter. The class is
	initialized when If methods of XSunIMWrapper is called, and
	VM separator is started.

	XSunIMAdapter converts SunIM based data structures, such as
	keyevent, to XSunIM based data structures, then stores them
	into the shared memory.

	Next XSunIMAdapter calls sendRequest() to execute If methods
	in the child process. The operation on the child process will
	be stored into the shared memory.

	After the execution, XSunIMIml.cpp reads the data from shared
	memory and translate them to SunIM based data structures,
	creates iml_inst and executes iml_execute().

   XSunIMManager.cpp, XSunIMManager.hh
	XSunIMManager class is inherited from DrvManager class of
	VM separator and it acts as a wrapper of LEHandler class.
	XSunIMManager reads data from shared memory and throws the
	data to LEHandler class.

   XSunIMWrapper.cpp
	If methods table is defined, which is referred by SunIM library.
	If SunIM library decides the LE is XSunIM based, the methods
	are used instead.

   XSunIMLookup.c, XSunIMLookup.h
	XSunIM based htt_server handles Lookup choice management,
	for example, jumping to prev/next pages and focusing candidate.
	These codes are from old htt_server.

   XSunIMSubr.c
	XSunIM based IML methods are defined. Most of codes are from 
	XSunIMSubr.c of XSunIM library.

	iml_execute() is defined here, which is called by LEs when LEs
	wants to send operations to IM client. This function actually
	writes data into the shared memory.

About XSunIM Adapter (for code review)
======================================
- what is your component for?

	- what functionaties?
	  XSunIM Adapter is designed for reusing XSunIM based language engines. 
	  With XSunIM Adapter, these engines neen't be porting to adapt new SPI.

	- who uses your component?
	  SunIM library.

	- when is your component used?
	  SunIM will judge a LE is XSunIM based or SunIM based. 
	  If SunIM library decides the LE is XSunIM based, XSunIM Adapter is used for
	  openning LE, converting data and communication with the LE.

	- where is your component used?
	  SunIM library 
		src/server/lib/LE_Interface/SunIMConf.c -- link to xsunim_methods table.
		src/server/lib/LE_Interface/SunIM.c -- call If methods.
		
- how is development status?
	- what are done so far?
	  See SOURCE FILES description.

	- what are remaining tasks?
	  More testing and bug fixing for all asia locales LEs.

	- what you know are issues?
		- missing specs?
		- dependency on other components?
		- testing?
		- x window system dependency?
		- locale dependency?

	- how is portability to NT or Linux?
	  It needn't. No XSunIM based LEs on NT or Linux.

	- how is coding style of your component?
				
- Interfaces your component imports from others if any
	- modules(functions) names to import the interfaces

	  Imports SunIM library fuctions for LE's memory allocation

	  src/server/lib/LE_Interface/SunIMMMan.c
 
	  	void *_iml_new(old_iml_session_t *, int);
	  	void *_iml_new2(old_iml_session_t *, int);
	 	void *_iml_delete(old_iml_session_t *);
		void *_iml_delete2(old_iml_session_t *);

	  Uses CSConv fuctions for codeset conversion
	  Uses KeyConverter functions for keycode conversion.
	  Uses VM_Separator functions for open LE in separated VM

	- pointer to documents/specs of the interfaces 

	  src/server/lib/LE_Interface/README
	  doc/SPI/Language_Engine_Interface.html

	  CSConv, KeyConverter, and VM_Separator documents

	- if you know there are other components which imports
	  same interfaces, what are they?
		
- Interfaces your component exports to others if any
	- how stable are the interfaces?
	- modules(functions) names to export the interfaces

	  Export a vaiable to let SunIM library start XSunIM Adapter

	  src/server/lib/XSunIM_Adapter/XSunIMWrapper.cpp
		if_methods_t xsunim_methods;

	- pointer to documents/specs of the interfaces

	  src/server/lib/XSunIM_Adapter/README
	  
	- what components imports the interfaces?
	  SunIM library.

