[aquaskk-changes 360] CVS update: AquaSKK/src/component

Back to archive index

t-suw****@users***** t-suw****@users*****
2007年 9月 2日 (日) 12:36:25 JST


Index: AquaSKK/src/component/SKK.h
diff -u AquaSKK/src/component/SKK.h:1.1.2.1 AquaSKK/src/component/SKK.h:1.1.2.2
--- AquaSKK/src/component/SKK.h:1.1.2.1	Sun Aug 19 19:00:32 2007
+++ AquaSKK/src/component/SKK.h	Sun Sep  2 12:36:24 2007
@@ -1,5 +1,5 @@
 /* -*- C++ -*-
-  $Id: SKK.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $
+  $Id: SKK.h,v 1.1.2.2 2007/09/02 03:36:24 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -31,6 +31,17 @@
 	Jisx0208Latin,
 	Ascii
     };
+
+    enum EditState {
+	DirectInput,
+	EntryInput,
+	OkuriInput,
+	AbbrevInput,
+	Completion,
+	SingleCandidate,
+	MultipleCandidate,
+	EntryRemove
+    };
 }
 
 #endif
Index: AquaSKK/src/component/SKKSession.cpp
diff -u AquaSKK/src/component/SKKSession.cpp:1.1.2.2 AquaSKK/src/component/SKKSession.cpp:1.1.2.3
--- AquaSKK/src/component/SKKSession.cpp:1.1.2.2	Sun Aug 26 01:34:45 2007
+++ AquaSKK/src/component/SKKSession.cpp	Sun Sep  2 12:36:24 2007
@@ -1,5 +1,5 @@
 /* -*- C++ -*-
-   $Id: SKKSession.cpp,v 1.1.2.2 2007/08/25 16:34:45 t-suwa Exp $
+   $Id: SKKSession.cpp,v 1.1.2.3 2007/09/02 03:36:24 t-suwa Exp $
 
    MacOS X implementation of the SKK input method.
 
@@ -29,6 +29,7 @@
 #include "SKKConfig.h"
 
 SKKSession::SKKSession(const ComponentInstance instance) : instance_(instance) {
+    engine_.Start();
 }
 
 // イベント
@@ -36,6 +37,8 @@
     SKKEventParam param = SKKPreProcessor::theInstance().Execute(event);
     std::cerr << param.dump() << std::endl;
 
+    engine_.Dispatch(Event(param.event, param));
+
     // レガシーエンジン
     SKKEvent legacy_event(event);
 
@@ -66,38 +69,48 @@
 
 // 入力モード変更
 void SKKSession::SelectInputMode(SKK::InputMode mode) {
+    SKKEventParam param;
+
     // 入力モードを変更する
     switch(mode) {
     case SKK::Hirakana:
+	param.event = SKK_HIRAKANA;
 	if(!legacy_.isHiraganaInputMode()) {
 	    legacy_.goHiraganaInputMode();
 	}
 	break;
 
     case SKK::Katakana:
+	param.event = SKK_KATAKANA;
 	if(!legacy_.isZenKataInputMode()) {
 	    legacy_.goZenKataInputMode();
 	}
 	break;
 
     case SKK::Jisx0201Kana:
+	param.event = SKK_JISX0201KANA;
 	if(!legacy_.isHanKataInputMode()) {
 	    legacy_.goHanKataInputMode();
 	}
 	break;
 
     case SKK::Jisx0208Latin:
+	param.event = SKK_JISX0208LATIN;
 	if(!legacy_.isZenAscInputMode()) {
 	    legacy_.goZenAscInputMode();
 	}
 	break;
 
     case SKK::Ascii:
+	param.event = SKK_ASCII;
 	if(!legacy_.isHanAscInputMode()) {
 	    legacy_.goHanAscInputMode();
 	}
 	break;
     }
+
+    // 新エンジンの入力モード変更
+    engine_.Dispatch(Event(param.event, param));
 }
 
 Point SKKSession::GetInputPosition(long offset) const {
Index: AquaSKK/src/component/SKKSession.h
diff -u AquaSKK/src/component/SKKSession.h:1.1.2.1 AquaSKK/src/component/SKKSession.h:1.1.2.2
--- AquaSKK/src/component/SKKSession.h:1.1.2.1	Sun Aug 19 19:00:32 2007
+++ AquaSKK/src/component/SKKSession.h	Sun Sep  2 12:36:24 2007
@@ -1,5 +1,5 @@
 /* -*- C++ -*-
-   $Id: SKKSession.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $
+   $Id: SKKSession.h,v 1.1.2.2 2007/09/02 03:36:24 t-suwa Exp $
 
    MacOS X implementation of the SKK input method.
 
@@ -28,9 +28,11 @@
 #include "SKK.h"
 #include "SKKEvent.h"
 #include "IMSessionInputMode.h"
+#include "SKKEngine.h"
 
-class SKKSession {
+class SKKSession : StateContainerTraits<SKKEnvironment> {
     ComponentInstance instance_;
+    SKKEngine engine_;
     IMSessionInputMode legacy_;
 
     struct buffer_size {


aquaskk-changes メーリングリストの案内
Back to archive index