--- /usr/share/vine/imelib.orig	2006-08-11 01:10:02.000000000 +0900
+++ /usr/share/vine/imelib	2007-12-01 01:42:18.000000000 +0900
@@ -10,7 +10,7 @@
 
 ShowUsage_C() {
 cat <<EOF
-  Usage:  setime [-k] {canna|wnn|wnn6|wnn6xwnmo|wnn7|wnn7xwnmo|FreeWnn|atokx|atokx2|vje|anthy|scim|none|status}
+  Usage:  setime [-k] {canna|wnn|wnn6|wnn6xwnmo|wnn7|wnn7xwnmo|FreeWnn|atokx|atokx2|atokx3|vje|anthy|scim|none|status}
 
      canna:   set Canna as default input method and start kinput2
      wnn:     set Wnn as default input method and start kinput2
@@ -22,6 +22,7 @@
      FreeWnn: set FreeWnn as default input method and start kinput2
      atokx:   set Atok X as default input method
      atokx2:  set "ATOK for Linux" as default input method
+     atokx3:  set "ATOK X3 for Linux" as default input method
      vje:     set VJE-Delta as default input method and start vje
      skk:     set SKK as default input method and start skkinput
      anthy:   set Anthy as default input method and start uim-xim
@@ -37,7 +38,7 @@
 
 ShowUsage_ja() {
 cat <<EOF
-  »ÈÍÑË¡:  setime [-k]{canna|wnn|wnn6|wnn6xwnmo|wnn7|wnn7xwnmo|FreeWnn|atokx|atokx2|vje|anthy|scim|none|status}
+  »ÈÍÑË¡:  setime [-k]{canna|wnn|wnn6|wnn6xwnmo|wnn7|wnn7xwnmo|FreeWnn|atokx|atokx2|atokx3|vje|anthy|scim|none|status}
 
      canna:   ¤«¤ó¤Ê ¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¡¢kinput2 ¤òµ¯Æ°¤·¤Þ¤¹
      wnn:     Wnn ¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¡¢kinput2 ¤òµ¯Æ°¤·¤Þ¤¹
@@ -49,6 +50,7 @@
      FreeWnn: FreeWnn6 ¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¡¢kinput2 ¤òµ¯Æ°¤·¤Þ¤¹
      atokx:   Atok X ¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¤Þ¤¹
      atokx2:  "ATOK for Linux" ¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¤Þ¤¹
+     atokx3:  "ATOK X3 for Linux" ¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¤Þ¤¹
      vje:     VJE-Delta¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¡¢vje ¤òµ¯Æ°¤·¤Þ¤¹
      skk:     SKK¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¡¢skkinput ¤òµ¯Æ°¤·¤Þ¤¹
      anthy:   Anthy¤ò¥Ç¥Õ¥©¥ë¥È¤Î´Á»úÊÑ´¹¥·¥¹¥Æ¥à¤È¤·¡¢uim-xim ¤òµ¯Æ°¤·¤Þ¤¹
@@ -255,6 +257,9 @@
 	wnn*|FreeWnn*|freewnn*)
 		STATUS=wnn
 		;;
+	atokx3* | AtokX3*)
+		STATUS=atokx3
+		;;
 	atokx2* | AtokX2*)
 		STATUS=atokx2
 		;;
@@ -293,6 +298,7 @@
 WNN6RPM=wnn6
 ATOKXRPM=atokx
 ATOKX2RPM=atokx
+ATOKX3RPM=atokx
 VJERPM=vje-delta
 ANTHYRPM=anthy
 UIMXIMRPM=uim-xim
@@ -314,6 +320,7 @@
 [Wnn6]  `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${WNN6RPM} 2>&1`
 [Atokx] `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${ATOKXRPM} 2>&1`
 [AtokX2] `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${ATOKX2RPM} 2>&1`
+[AtokX3] `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${ATOKX3RPM} 2>&1`
 [VJE-Delta] `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${VJERPM} 2>&1`
 [Anthy]  `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${ANTHYRPM} 2>&1`
 [UIM]  `LANG=${LOCALE} LC_ALL=${LOCALE} rpm -q ${UIMRPM} 2>&1`
@@ -403,6 +410,14 @@
 fi
 }
 
+AtokX3Exists(){
+if [ -f "/opt/atokx3/lib/client/atokx3auxd" ] ; then
+    return 0
+else
+    return -1
+fi
+}
+
 AtokX2Exists(){
 if [ -f "/opt/atokx2/sbin/atokx2mngdaemon" ] ; then
     return 0
@@ -616,6 +631,28 @@
 return 0
 }
 
+setAtokX3(){
+export XMODIFIERS="@im=iiimx"
+export HTT_DISABLE_STATUS_WINDOW=t
+export HTT_GENERATES_KANAKEY=t
+export HTT_USES_LINUX_XKEYSYM=t
+export HTT_IGNORES_LOCK_MASK=t
+export JS_FEEDBACK_CONVERT=t
+export GTK_IM_MODULE=iiim
+export QT_IM_MODULE=xim
+
+if [ -z "`ps xc | grep iiimx`" -a -n "$DISPLAY" ]; then
+
+   if [ -f ${HOME}/.Xdefaults ]; then
+      xrdb -merge ${HOME}/.Xdefaults
+    fi
+    /usr/bin/iiimx -iiimd
+
+fi
+
+return 0
+}
+
 setVje(){
 isVjeAlive || return -1
     XMODIFIERS="@im=vje"
@@ -723,6 +760,12 @@
 		XIM_PROG=atokx2
 	    setAtokX2
 	    ;;
+	atokx3)
+		eval SettingIMMsg_$LOCALE atokx3
+		EMACS_IME=atokx3
+		XIM_PROG=atokx3
+	    setAtokX3
+	    ;;
 	vje)
 	    eval SettingIMMsg_$LOCALE vje
 	    EMACS_IME=vje
@@ -785,6 +828,7 @@
 unset -f setLocale CheckOption CheckXIMStatus ShowIMEStatus isCannaAlive isWnnAlive
 unset -f isAtokxAlive AtokxExists setAtokx
 unset -f isAtokX2Alive AtokX2Exists setAtokX2
+unset -f AtokX3Exists setAtokX3
 unset -f isVjeAlive setVje
 unset -f Wnn7Exists Wnn6Exists FreeWnnExists checkKinput2Mod startKinput2 setCanna killXwnmo
 unset -f setWnn7 setWnn6 setFreeWnn setIME setNone unsetImeFuncs
--- /usr/share/vine/vinelib.orig	2006-08-11 01:10:02.000000000 +0900
+++ /usr/share/vine/vinelib	2007-12-01 01:13:40.000000000 +0900
@@ -59,6 +59,10 @@
 		FE=
 		IM=atokx2
 		;;
+	atokx3|AtokX3)
+		FE=
+		IM=atokx3
+		;;
 	vje|Vje|VJE)
 		IM=vje
 		;;
--- /etc/X11/xinit/xinitrc.d/setime.orig	2006-08-11 01:10:02.000000000 +0900
+++ /etc/X11/xinit/xinitrc.d/setime	2007-12-01 01:13:40.000000000 +0900
@@ -53,6 +53,10 @@
         echo "Canna with kinput2, server=${CANNA_SERVER}" >> ${LOG}
         setime Canna >> ${LOG}
         ;;
+    atokx3|ATOKX3)
+        echo "ATOK X3 for Linux" >> ${LOG}
+        setime atokx3 >> ${LOG}
+        ;;
     atokx2|ATOKX2)
         echo "ATOK for Linux" >> ${LOG}
         setime atokx2 >> ${LOG}
