/*
Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: The above copyright notice and this
permission notice shall be included in all copies or substantial
portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.


Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.


X Window System is a trademark of The Open Group

OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
logo, LBX, X Window System, and Xinerama are trademarks of the Open
Group. All other trademarks and registered trademarks mentioned herein
are the property of their respective owners. No right, title or
interest in or to any trademark, service mark, logo or trade name of
Sun Microsystems, Inc. or its licensors is granted.

*/

Please refer 

	doc/SPI/Language_Engine_Interface.html

for detail of Language Engine Interface

INSTALLATION 
------------

  Solaris
	After completion of buld for all compoments, make SUNWiiimd
	pkg for Solaris platform. 

	% cd pkgs
	% gnumake
	   will generate SUNWiiimu and SUNWiiimr pkgs
	% gnumake SUNWiiimd
	   will generate SUNWiiimd pkg

	Add these pkgs by pkgadd. htt_server can be started by

	% /usr/bin/iiimd -if sampleja &
	% /usr/lib/iiim/iiim-xbe -if sampleja &

	But, please check the following files are installed before
	you run htt_server.

	sampleja.so: leif module

		/usr/lib/iiim/le/sampleja/sampleja.so

	sample_obj.jar: Java Aux

		/usr/lib/iiim/le/sampleja/sample_obj.jar

	aux.so: X Aux

		/usr/lib/iiim/le/sampleja/aux.so

	aux_ext: X Aux

		/usr/lib/iiim/le/sampleja/aux.so

  Windows

	sampleja.dll: leif module

		d:\winnt\system32\iiimf\sampleja.dll

	sample_obj.jar: Java Aux

		d:\sample_obj.jar

OPERATIONS
----------

sampleja LE module is now supporting simple preedit
drawing, status drawing and lookup choice operation.

Basic
	CTRL+SPACE		conversion on/off

Preedit (Preedit is drawn with Underline attribute)

	BACKSPACE		Remove one character of current preedit
	SPACE			Reverse current Preedit
	SPACE			Convert (when reversed preedit exists)
	SPACE			popup LUC (when conversion is performed once)

	CONVERT (Henkan Key)	Reverse current Preedit

	LEFT,CTRL+K		Shrink Reversed Preedit

	RIGHT,CTRL+L		Expand Reversed Preedit

	DOWN,CTRL+N		Commit Reversed Preedit then draw Preedit
				(if no Reversed Preedit, whole preedit
				 will be committed)

	CTRL+LEFT		move caret to left
				   using iml_make_preedit_caret_inst()
	CTRL+RIGHT		move caret to right
				   using iml_make_preedit_caret_inst()

	CTRL+I			to Katakana
	CTRL+U			to Hiragana

Commit
	ENTER			Commit whole Preedit
				  using iml_make_commit_inst()

Lookup Choice (invoked by SPACE)
    When Lookup Choice is invoked by SPACE key, the lookup is
    managed by the Language Engine, which means the LE uses IMIsOwner
    for Lookup Choice start.

	SPACE			popup LUC (when Reversed preedit exists)

	CTRL+P			jump to next LUC page (when LUC exists)
	CTRL+N			jump to prev LUC page (when LUC exists)

	SPACE			focus to next candidate
	LUC Label Key		commit a candidate

Special for Debug
	CTRL+J			replace 4 characters from position 0
				with 2 characters
				  using iml_make_preedit_draw_with_chgpos_inst()

HOW AUX WORKS
-------------
sampleja has two AUX GUIs, Panel and Dictool.

   Panel:   classname=com.sun.iiim.sample.sampleja.SamplePanel
   Dictool: classname=com.sun.iiim.sample.sampleja.SampleAux

The following shows how AUX and sampleja communicate. The source codes
for Java AUX exists under,

    src/client/jdk12_iiimf_adapter/sample_classes/com/sun/iiim/sample/sampleja

Also for X Aux examples exist under

    src/server/programs/language_engines/sampleja/xaux

    However, the example is just reference, will not act same with
    Java AUX.

Please make sure the object files are installed into proper
location on your system.

 Conversion ON/OFF
 -----------------

 Action		Data			From	 TO		AUX
 ------		----			----	 --		---
 Conversion ON	count_integer_values=1	sampleja SamplePanel	Show AUX
 (Ctrl+SPACE)	integer_values[0]=2
		count_string_values=0
		string_values=null

 Conversion OFF	count_integer_values=1	sampleja SamplePanel	Hide AUX
 (Ctrl+SPACE)	integer_values[0]=3
		count_string_values=0
		string_values=null

 Dic tool
 --------

 Action		Data			From	    TO		sampleja
 ------		----			----	    --		--------
 Click on DicBtn count_integer_values=1	SamplePanel sampleja	aux_start
		integer_values[0]=1				for SampleAux
		count_string_values=1
		string_values[0]="DICT"

 Add word on Dic tool
 --------------------
 Click on AddBtn count_integer_values=0	SampleAux sampleja	Add words
		integer_values=null				"FROM" and "TO"
		count_string_values=2				to dictionary
		string_values[0]="FROM"
		string_values[1]="TO"

		"FROM" and "TO" are from
		text fields on SampleAux

For Developer:

	If DONOTSTART_AUX_AT_SC_REALIZE environment variable is set,
	AUX will not be started at the first session is created.

	After turning the conversion on, the following key starts AUX
	and sends the AUX data.

	Ctrl+Q		aux_start()

	Conversion ON
	Ctrl+SPACE	aux_draw()	int[0]=2

	Conversion OFF
	Ctrl+SPACE	aux_draw()	int[0]=3

	Ctrl+E
			aux_draw()	int[0]=1
					string[0]="Japanese"

	It is useful for debugging.
