From t-suwa users.sourceforge.jp Tue Aug 14 15:39:31 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 15:39:31 +0900 Subject: [aquaskk-changes 319] CVS update: AquaSKK/src Message-ID: <20070814063934.1E5252AC031@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:15 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:15 +0900 Subject: [aquaskk-changes 320] CVS update: AquaSKK/src/utility Message-ID: <20070814080415.623922AC024@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:18 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:18 +0900 Subject: [aquaskk-changes 321] CVS update: AquaSKK/src/statemachine Message-ID: <20070814080418.BF5102AC03E@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:22 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:22 +0900 Subject: [aquaskk-changes 322] CVS update: AquaSKK/src/keybindings Message-ID: <20070814080422.29DAA2AC024@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:25 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:25 +0900 Subject: [aquaskk-changes 323] CVS update: AquaSKK/src/frontend Message-ID: <20070814080425.719032AC036@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:29 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:29 +0900 Subject: [aquaskk-changes 324] CVS update: AquaSKK/src/editor Message-ID: <20070814080429.185142AC041@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:39 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:39 +0900 Subject: [aquaskk-changes 325] CVS update: AquaSKK/src/controller Message-ID: <20070814080439.5FB9F2AC042@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:42 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:42 +0900 Subject: [aquaskk-changes 326] CVS update: AquaSKK/src/context Message-ID: <20070814080442.86AFF2AC036@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:49 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:49 +0900 Subject: [aquaskk-changes 327] CVS update: AquaSKK/src/backend Message-ID: <20070814080449.2970B2AC036@users.sourceforge.jp> From t-suwa users.sourceforge.jp Tue Aug 14 17:04:45 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Tue, 14 Aug 2007 17:04:45 +0900 Subject: [aquaskk-changes 328] CVS update: AquaSKK/src/component Message-ID: <20070814080445.C02482AC042@users.sourceforge.jp> From t-suwa users.sourceforge.jp Thu Aug 16 19:58:18 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Thu, 16 Aug 2007 19:58:18 +0900 Subject: [aquaskk-changes 329] CVS update: AquaSKK Message-ID: <20070816105818.D098C2AC01D@users.sourceforge.jp> Index: AquaSKK/AsciiConversionMode.cpp diff -u AquaSKK/AsciiConversionMode.cpp:1.7.2.4 AquaSKK/AsciiConversionMode.cpp:1.7.2.5 --- AquaSKK/AsciiConversionMode.cpp:1.7.2.4 Sat Feb 3 17:52:48 2007 +++ AquaSKK/AsciiConversionMode.cpp Thu Aug 16 19:58:18 2007 @@ -1,5 +1,5 @@ /* - $Id: AsciiConversionMode.cpp,v 1.7.2.4 2007/02/03 08:52:48 t-suwa Exp $ + $Id: AsciiConversionMode.cpp,v 1.7.2.5 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -33,7 +33,8 @@ AsciiConversionMode::AsciiConversionMode(ParentInputMode& src) :ChildInputMode(src), - word_register_mode(NULL), + word_register_mode(0), + old_word_register_mode(0), status(STATUS_NULL), show_cands_window_after_Nth_cand(5), completion_mode(false), @@ -42,9 +43,8 @@ } AsciiConversionMode::~AsciiConversionMode() { - if(word_register_mode) { - delete word_register_mode; - } + delete word_register_mode; + delete old_word_register_mode; } void AsciiConversionMode::start() { @@ -61,12 +61,12 @@ bool AsciiConversionMode::handleInputChar(SKKChar skkchar) { if(word_register_mode) { word_register_mode->handleInput(skkchar); - return false; // WordRegisterMode::handleInput()??????????????? + return false; // WordRegisterMode::handleInput()????????????確????????? } if(SKKConfig::AbbrevNextKey() == skkchar) { if(status == STATUS_WHITE && completion_mode) { - // ???????????????????B + // 次????????????????????????? current_completion_index++; if (current_completion_index >= completions.size()) { current_completion_index = 0; @@ -78,7 +78,7 @@ if(SKKConfig::AbbrevPrevKey() == skkchar) { if(status == STATUS_WHITE && completion_mode) { - // ??????????s????????? + // ??????????????????????????? if(current_completion_index == 0) { current_completion_index = completions.size() - 1; } else { @@ -89,14 +89,14 @@ } } - // tab,????,????????????????????????????? + // tab,??????,???????????????????????????????????????? completion_mode = false; if(SKKConfig::ToggleKanaKey() == skkchar) { if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // ????????? - // 1) ????????????????? - // 2) ????????????? + // ???????確???+ // 1) 平仮????????????????????+ // 2) ???以????平仮??????? parent->setEnabledKanjiMode(false); if(parent->isHiraganaInputMode()) { parent->goZenKataInputMode(); @@ -109,7 +109,7 @@ if(SKKConfig::PrevKouhoKey() == skkchar) { if(status == STATUS_BLACK) { - // ???????????????????[????? + // ???????????????????????????????? if(current_candidate_index > 0) { current_candidate_index--; } else { @@ -118,17 +118,17 @@ return false; } else if(status == STATUS_BLACK_WITH_WINDOW) { - // delete??????????? + // delete???????????????? handleBackSpace(); return false; } - // ????????? + // ???以???????? } if(SKKConfig::PurgeFromJisyoKey() == skkchar) { if(status == STATUS_BLACK) { - // ??v???????B????????????????????????- // ?????????????????????????????? + // ??????????????????????????????????????????????????+ // ???????????????????????????????????????? status = STATUS_PROMPT; prompt_type = PROMPT_DELETE_FROM_USER_DIC; prompt_input.clear(); @@ -144,7 +144,7 @@ if(SKKConfig::ToggleKatakanaKey() == skkchar) { if(status == STATUS_WHITE) { - // ????????????????????????+ // ???????????????????????????? parent->fix(ZenAscInputMode::convert(index)); parent->setEnabledAsciiConversionMode(false); @@ -153,9 +153,9 @@ return false; } if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // ????????????? - // 1) ????????????????? - // 2) ????????????????? + // ???????確?????????+ // 1) ?????????????平仮???????+ // 2) ???以?????????????????? parent->setEnabledAsciiConversionMode(false); if (parent->isHanKataInputMode()) { parent->goHiraganaInputMode(); @@ -167,12 +167,12 @@ } if(SKKConfig::KakuteiKey() == skkchar) { - return true; // ???? + return true; // 確???? } if(SKKConfig::LatinModeKey() == skkchar || SKKConfig::Jisx0208LatinModeKey() == skkchar) { if(status == STATUS_BLACK) { - // ???????????/?????????? + // ????????????????????????? if(SKKConfig::LatinModeKey() == skkchar) { parent->goHanAscInputMode(); } else { @@ -180,7 +180,14 @@ } return true; } - // ????????????????? + // ??????????????????????+ } + + if(SKKConfig::SetHenkanPointKey() == skkchar) { + if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { + parent->fix(getStringToFix()); + return parent->handleInput(skkchar); + } } if(SKKConfig::SetHenkanPointKey() == skkchar) { @@ -201,67 +208,67 @@ if(SKKConfig::NextKouhoKey() == skkchar) { if(status == STATUS_WHITE) { if(index.length() == 0) { - // ??+ // ?? parent->setEnabledAsciiConversionMode(false); parent->display(CppCFString()); initialize(); return false; } - // ??????? + // ????????? askServerTheCandidates(); if(candidates.size() > 0) { - // ?????????????? + // ?????????????????? status = STATUS_BLACK; - current_candidate_index = 0; // ?????B + current_candidate_index = 0; // ???????? } else { - // ???????????????? + // ?????????????????? startRegisteringWord(); } } else if(status == STATUS_BLACK) { - // ????? + // 次?????? current_candidate_index++; - if(current_candidate_index >= candidates.size()) { // ?????s?????????? + if(current_candidate_index >= candidates.size()) { // ?????????????????? startRegisteringWord(); } else if(current_candidate_index >= show_cands_window_after_Nth_cand - 1) { - // ??????????????????????????? + // ???以????????????????????????示???? status = STATUS_BLACK_WITH_WINDOW; openCandidatesWindow(); } } else if(status == STATUS_BLACK_WITH_WINDOW) { if(candidates_window_current_frame < candidates_window_num_of_frames - 1) { - // ??????????????????????? + // ?????????????????????????????????? goToNextCandidatesFrame(); } else { - // ???????????????????? + // ??????????????????????????? closeCandidatesWindow(); startRegisteringWord(); } } } else { if(status == STATUS_WHITE) { - // index?????? + // index???????? index += skkchar; } else if(status == STATUS_BLACK) { - // ?????????????p? + // ???????確??????????? parent->fix(getStringToFix()); return parent->handleInput(skkchar); } else if(status == STATUS_BLACK_WITH_WINDOW) { - // asdfjkl?1????????????7????????????B???????? - // ???????????? - // ???????????????????? + // asdfjkl????????????????7????????????????????????????+ // ???????????????? + // ?????????現?????????確?????? int cand_index = CppCFString("asdfjkl").substring(0, candidates_window_cands_per_frame).indexOf(skkchar); if(cand_index != -1) { unsigned new_index = current_candidate_index + cand_index; if(new_index < candidates.size()) { - // ??????????????????? + // ?????????????許???????確??? current_candidate_index = new_index; return true; } @@ -269,7 +276,7 @@ return false; } else if(status == STATUS_PROMPT) { - // ????prompt_input???? + // ?????prompt_input????? prompt_input += skkchar; } } @@ -284,7 +291,7 @@ bool AsciiConversionMode::handleBackSpace() { if(word_register_mode) { word_register_mode->handleBackSpace(); - return true; // WordRegisterMode::handleBackSpace()???????????????B + return true; // WordRegisterMode::handleBackSpace()???????????????????????? } if(status == STATUS_NULL) { @@ -292,32 +299,32 @@ } if(status == STATUS_WHITE) { - // index?????????I? - // ??????index?????????B + // index????????????????+ // 空???????index?????????????? if(index.length() == 0) { parent->setEnabledAsciiConversionMode(false); parent->display(CppCFString()); initialize(); } else { - completion_mode = false; // ??????????????[?????? + completion_mode = false; // ?????????????????????????? index.eraseLast(1); } } else if(status == STATUS_BLACK) { - // ???????????????+ // ???????確?????????? CppCFString str(getStringToFix()); str.eraseLast(1); parent->fix(str); parent->display(CppCFString()); } else if(status == STATUS_BLACK_WITH_WINDOW) { - // ???t????????????? - // ??????????????? + // ???????????????????????+ // ????????????????????? if(candidates_window_current_frame == 0) { - // ???????????? + // ???????????????? current_candidate_index = show_cands_window_after_Nth_cand - 2; - // ?????????? + // ?????????????? closeCandidatesWindow(); status = STATUS_BLACK; @@ -326,7 +333,7 @@ } } else if(status == STATUS_PROMPT) { - // prompt_input???????????????B + // prompt_input????????????????????? if(prompt_input.length() > 0) { prompt_input.eraseLast(1); } @@ -339,23 +346,23 @@ word_register_mode->handleReturn(); if(word_register_mode) { - // handleReturn??wordRegistrationFinished??????word_register_mode????????? + // handleReturn???wordRegistrationFinished????????word_register_mode????????????? word_register_mode->redisplay(); } - return true; // ??rue???? + return true; // 常?true?????? } if(status == STATUS_PROMPT) { switch(prompt_type) { case PROMPT_DELETE_FROM_USER_DIC: { - // prompt_input?yes??????TATUS_WHITE???? - // ??????STATUS_BLACK???? + // prompt_input??es?????????STATUS_WHITE?????? + // ???以????STATUS_BLACK?????? if(prompt_input == "yes") { - // ??+ // ??? makeServerRemoveWord(); - // STATUS_WHITE? + // STATUS_WHITE?? status = STATUS_WHITE; } else { status = STATUS_BLACK; @@ -370,8 +377,8 @@ } if(ClientConfiguration::theInstance().isSkkEggLikeNewline()) { - // skk-egglike-newline????????????????????rue???? - // ???? + // skk-egglike-newline????????????確????????????????rue?????? + // ???? parent->fix(getStringToFix()); return true; } else { @@ -381,15 +388,15 @@ bool AsciiConversionMode::handleArrow(SKKChar skkchar) { if(word_register_mode) { - return word_register_mode->handleArrow(skkchar); // ??+ return word_register_mode->handleArrow(skkchar); // ?? } if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // ?????????? + // ???????確???? parent->fix(getStringToFix()); } - // ??????????????B + // ?????????????????? parent->setEnabledAsciiConversionMode(false); initialize(); return false; @@ -400,18 +407,18 @@ return word_register_mode->handleCg(); } - // ????????????handleCg????getStringToFix()?????????? + // 平仮?????????????handleCg?????getStringToFix()????????????? parent->getCurrentInputMode().handleCg(); parent->getCurrentInputMode().getStringToFix(); if(status == STATUS_WHITE) { - // ???????????+ // ???????????? parent->setEnabledAsciiConversionMode(false); initialize(); } else if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // okuri????STATUS_WHITE_ROOT?????????STATUS_WHITE_OKURI?? - // ????????????????? + // okuri??????STATUS_WHITE_ROOT????????????TATUS_WHITE_OKURI?? + // ????????????????????????? if(status == STATUS_BLACK_WITH_WINDOW) { closeCandidatesWindow(); } @@ -436,17 +443,17 @@ if(status == STATUS_WHITE) { if(completion_mode) { - // ???????????????????B + // 次????????????????????????? current_completion_index++; if(current_completion_index >= completions.size()) { current_completion_index = 0; } index = completions[current_completion_index]; } else { - // ????????? + // ???????????? askServerTheCompletions(); - // ?????????????????????????? + // ???????????????????????????????? if(completions.size() > 0) { completion_mode = true; index = completions[0]; @@ -461,72 +468,78 @@ void AsciiConversionMode::terminate() { if(word_register_mode) { word_register_mode->terminate(); + resetRegistrationMode(); } - parent->fix(getStringToFix()); // ???? + parent->fix(getStringToFix()); // 確???? parent->setEnabledAsciiConversionMode(false); initialize(); } +// ???????????????????????????????????+void AsciiConversionMode::resetRegistrationMode() { + delete old_word_register_mode; + old_word_register_mode = word_register_mode; + word_register_mode = 0; +} + void AsciiConversionMode::wordRegistrationFinished() { if(word_register_mode) { CppCFString content = word_register_mode->getContent(); if(content.length() > 0) { - // ???? + // ???? sendWordToServerToRegister(index,content); - // ?? + // 確? parent->fix(content); - // ??+ // ?? parent->setEnabledAsciiConversionMode(false); initialize(); } else { status = STATUS_WHITE; } - delete word_register_mode; - word_register_mode = NULL; + resetRegistrationMode(); parent->updatePencilMenuIcon(); } } void AsciiConversionMode::wordRegistrationCanceled() { - delete word_register_mode; - word_register_mode = NULL; + resetRegistrationMode(); parent->updatePencilMenuIcon(); if(status == STATUS_WHITE) { // do nothing } else if(status == STATUS_BLACK) { - current_candidate_index = candidates.size() - 1; // ??????? + current_candidate_index = candidates.size() - 1; // ?????????? } else if(status == STATUS_BLACK_WITH_WINDOW) { - // ???????????????????- current_candidate_index = show_cands_window_after_Nth_cand - 1; // goToNextCandidatesFrame()????? + // ??????????????????????????+ current_candidate_index = show_cands_window_after_Nth_cand - 1; // goToNextCandidatesFrame()??????? openCandidatesWindow(OpenReverse); } } CppCFString AsciiConversionMode::getStringToDisplay() { if(word_register_mode) { - // ?????????????WordRegisterMode??????????????? + // ??????????????????ordRegisterMode?????????潰???????? return CppCFString().append(kIgnoreThis); } if(status == STATUS_WHITE) { - // ?index + // ??ndex return CppCFString().append(0x25bd).append(index); } else if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { CppCFString str(convertNumeric(numconv_, candidates[current_candidate_index])); - // ?????? + // ?現????? return CppCFString().append(0x25bc).append(str); } else if(status == STATUS_PROMPT) { - // [?????][??] + // [???????[??] return CppCFString('[').append(prompt).append("][").append(prompt_input).append(kCaret).append(']'); } else { return CppCFString().append(kIgnoreThis); @@ -541,24 +554,24 @@ else if(status == STATUS_BLACK) { result = convertNumeric(numconv_, candidates[current_candidate_index]); - // ???? + // ???? sendCurrentCandidateToServerToRegister(); } else if(status == STATUS_BLACK_WITH_WINDOW) { result = convertNumeric(numconv_, candidates[current_candidate_index]); - // ???? + // ???? sendCurrentCandidateToServerToRegister(); - // ?????????? + // ?????????????? closeCandidatesWindow(); } else /* if (status == STATUS_NULL) */ { result = CppCFString().append(kIgnoreThis); } - // ?????????????fix??????????????????????B - // ?????B + // ???????????????????ix??????????????????????????????+ // ????????? parent->setEnabledAsciiConversionMode(false); initialize(); @@ -580,14 +593,14 @@ str.append(index); - // ahya???-ahya + // ahya?????ahya CppCFData query; query.own(str.toCFData()); current_candidate_index = 0; ::askServerTheCandidates(query, candidates); - // ????????? + // ??????????? if(ClientConfiguration::theInstance().useNumericConversion() && numconv_.Setup(index.toStdString(kCFStringEncodingUTF8))) { CppCFString normalized(numconv_.NormalizedKey().c_str(), kCFStringEncodingUTF8); @@ -603,7 +616,7 @@ } void AsciiConversionMode::askServerTheCompletions() { - // ????? + // ?????? CppCFData cfdata_query; cfdata_query.own(index.toCFData()); @@ -612,16 +625,16 @@ } void AsciiConversionMode::sendCurrentCandidateToServerToRegister() { - // ???? + // ???? sendWordToServerToRegister(index,candidates[current_candidate_index]); } void AsciiConversionMode::makeServerRemoveWord() { CppCFString query; - // ahya ??????-ahya ??? + // ahya ??????????-ahya ?????? query.append('-').append(index).append(SKK_MSG_DELIMITER).append(candidates[current_candidate_index]); - // ???? + // ??渡? CppCFData cfdata_query; cfdata_query.own(query.toCFData()); ::makeServerRemoveWord(cfdata_query); @@ -645,45 +658,35 @@ } void AsciiConversionMode::goToNextCandidatesFrame() { - // ?????ID(UInt16)???CFData?????????? + // ???????D(UInt16)?????FData?????????????? CppCFData reply(ServerConnectionFactory::theInstance().newConnection(). send(kSKKCandidatesWindowNext, newCFDataRefWithWindowID(candidates_window_id), kAquaSKKServerRunLoopMode)); - // ????????????????? + // ?????????????????????? ++ candidates_window_current_frame; - // ???????????????????????? + // ????????????????????????????? current_candidate_index += candidates_window_cands_per_frame; candidates_window_cands_per_frame = CFSwapInt16BigToHost(reply.getUInt16(0)); } void AsciiConversionMode::goToPrevCandidatesFrame() { - // ?????ID(UInt16)???CFData?????????? + // ???????D(UInt16)?????FData?????????????? CppCFData reply(ServerConnectionFactory::theInstance().newConnection(). send(kSKKCandidatesWindowPrev, newCFDataRefWithWindowID(candidates_window_id), kAquaSKKServerRunLoopMode)); - // ???????????????? + // ????????????????????? -- candidates_window_current_frame; - // ???????????????????????? + // ????????????????????????????? candidates_window_cands_per_frame = CFSwapInt16BigToHost(reply.getUInt16(0)); current_candidate_index -= candidates_window_cands_per_frame; } -void AsciiConversionMode::suspendCandidatesWindow() { - ServerConnectionFactory::theInstance().newConnection(). - send(kSKKSuspendCandidatesWindow, newCFDataRefWithWindowID(candidates_window_id)); -} - -void AsciiConversionMode::resumeCandidatesWindow() { - ServerConnectionFactory::theInstance().newConnection(). - send(kSKKResumeCandidatesWindow, newCFDataRefWithWindowID(candidates_window_id)); -} - void AsciiConversionMode::closeCandidatesWindow() { - // ?????ID(UInt16)???CFData?????????? + // ???????D(UInt16)?????FData?????????????? ServerConnectionFactory::theInstance().newConnection(). send(kSKKCloseCandidatesWindow, newCFDataRefWithWindowID(candidates_window_id)); } Index: AquaSKK/AsciiConversionMode.h diff -u AquaSKK/AsciiConversionMode.h:1.5.2.1 AquaSKK/AsciiConversionMode.h:1.5.2.2 --- AquaSKK/AsciiConversionMode.h:1.5.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/AsciiConversionMode.h Thu Aug 16 19:58:18 2007 @@ -1,5 +1,5 @@ /* - $Id: AsciiConversionMode.h,v 1.5.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: AsciiConversionMode.h,v 1.5.2.2 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -38,35 +38,36 @@ NumericConverter numconv_; protected: - static const int STATUS_NULL = 0; // ??????????????????B?????????? - static const int STATUS_WHITE = 1; // ???? - static const int STATUS_BLACK = 2; // ???? - static const int STATUS_BLACK_WITH_WINDOW = 3; // ?????????????????????? - static const int STATUS_PROMPT = 4; // ???????????B + static const int STATUS_NULL = 0; // ??????????????????????????????????????? + static const int STATUS_WHITE = 1; // ???? + static const int STATUS_BLACK = 2; // ???? + static const int STATUS_BLACK_WITH_WINDOW = 3; // ???????????????????????????? + static const int STATUS_PROMPT = 4; // ???????????????? - WordRegisterMode* word_register_mode; // NULL????????????????? + WordRegisterMode* word_register_mode; // NULL????????????????????+ WordRegisterMode* old_word_register_mode; // ??????????????????? int status; - CppCFString index; // ????+ CppCFString index; // ????? - static const int PROMPT_DELETE_FROM_USER_DIC = 1; // ???????P????- int prompt_type; // ????????? - CppCFString prompt; // ????? - CppCFString prompt_input; // ?????????????????? - - std::vector candidates; // ????? - unsigned current_candidate_index; // ??????? - - unsigned show_cands_window_after_Nth_cand; // ???????????????????????? - - unsigned candidates_window_id; // status?STATUS_BLACK_WITH_WINDOW??????????????ID? - unsigned candidates_window_current_frame; // ????????????????? - unsigned candidates_window_cands_per_frame; // ??????????1??????????? - unsigned candidates_window_num_of_frames; // ??????????????? - - bool completion_mode; // ???????[????????????????????????????? - std::vector completions; // ????? - unsigned current_completion_index; // ?????????? + static const int PROMPT_DELETE_FROM_USER_DIC = 1; // ??????????????????+ int prompt_type; // ????????????+ CppCFString prompt; // ???????+ CppCFString prompt_input; // ???????????????????????? + + std::vector candidates; // ???????+ unsigned current_candidate_index; // ?????????+ + unsigned show_cands_window_after_Nth_cand; // ?????????????????????????示??????+ + unsigned candidates_window_id; // status??TATUS_BLACK_WITH_WINDOW???????????????????ID??+ unsigned candidates_window_current_frame; // ???????????????????????+ unsigned candidates_window_cands_per_frame; // ?????????????1???????????????+ unsigned candidates_window_num_of_frames; // ????????????????????+ + bool completion_mode; // ??????????????????????????????????????????使??????+ std::vector completions; // ??????+ unsigned current_completion_index; // ????????????? bool henkanModeStatus; @@ -78,16 +79,15 @@ virtual void openCandidatesWindow(OpenDirection mode = OpenNormal); virtual void goToPrevCandidatesFrame(); virtual void goToNextCandidatesFrame(); - virtual void suspendCandidatesWindow(); - virtual void resumeCandidatesWindow(); virtual void closeCandidatesWindow(); virtual void initialize(); + virtual void resetRegistrationMode(); public: AsciiConversionMode(class ParentInputMode& parent); virtual ~AsciiConversionMode(); - virtual void start(); // ???????????????? + virtual void start(); // ????????????????????? virtual bool handleInput(SKKChar skkchar); virtual bool handleBackSpace(); virtual bool handleReturn(); @@ -99,8 +99,8 @@ virtual CppCFString getStringToDisplay(); virtual CppCFString getStringToFix(); - virtual void wordRegistrationFinished(); // WordRegisterMode??? - virtual void wordRegistrationCanceled(); // WordRegisterMode??? + virtual void wordRegistrationFinished(); // WordRegisterMode????+ virtual void wordRegistrationCanceled(); // WordRegisterMode???? }; #endif // INC__AsciiConversionMode__ Index: AquaSKK/BIMClientServer.h diff -u AquaSKK/BIMClientServer.h:1.6.2.1 AquaSKK/BIMClientServer.h:1.6.2.2 --- AquaSKK/BIMClientServer.h:1.6.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/BIMClientServer.h Thu Aug 16 19:58:18 2007 @@ -1,5 +1,5 @@ /* - $Id: BIMClientServer.h,v 1.6.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: BIMClientServer.h,v 1.6.2.2 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -24,29 +24,27 @@ #ifndef INC__BIMClientServer__ #define INC__BIMClientServer__ -// ????????????? +// ??????????????????? #define kIMBundleIdentifier "jp.sourceforge.AquaSKKInputMethod" -// ????? -//#define kBasicServerName "\pAquaSKKServer.app" +// ??????? #define kCSTR_SKKServerName "AquaSKKServer.app" -// ???????? +// ??????????? #define kBasicServerPortName "jp.sourceforge.AquaSKKServer" -// ????? RunLoopMode +// ???????RunLoopMode #define kAquaSKKServerRunLoopMode CFSTR("AquaSKK::ServerRunLoopMode") -// ??????? RunLoopMode +// ?????????RunLoopMode #define kAquaSKKClientRunLoopMode CFSTR("AquaSKK::ClientRunLoopMode") -// ????????????????????content?????????? +// ??????????????????????content?????????????? struct BasicMessageHeader { ProcessSerialNumber fProcessSerialNumber; }; -typedef struct BasicMessageHeader BasicMessageHeader; -// TSM???????o??????????? +// TSM???????????????????????????? struct OffsetToPosParams { long fRefCon; long fTextOffset; @@ -70,46 +68,75 @@ typedef SInt32 BasicMessageID; -// ??????????? -#define SKK_MSG_DELIMITER (0x0b) /* ???? */ +// ????????????+#define SKK_MSG_DELIMITER (0x0b) // ????? -enum { // ???????????????? - kBasicMessageActivated = 100, // SKK??????????? - kBasicMessageDeactivated = 101, // SKK????????????? - kBasicMessageHidePalettes = 102, // ??????????TSM????? - - kSKKMessageSearch = 200, // ?????????UniChar????????+??e ????-?????? - // ???????????+?????-????????????p????????????? - // ???????????? ?????? ?????????????????????? - kSKKCreateCandidatesWindow = 201, // ????????? - // ?????? - // +0 ????x??(QuickDraw??) ????2????? - // +2 ????y??(QuickDraw??) ????2????? - // +4 ??(?? UniChar?? - // ??:?? ? ? ????????????????????????????? +enum { // ???????????????????? + // SKK????????????? + kBasicMessageActivated = 100, + + // SKK????????????????+ kBasicMessageDeactivated = 101, + + // ???????????????TSM???示???? + kBasicMessageHidePalettes = 102, + + // ??????????niChar??????????+???e ??????-????????+ // ???????????????????????? + // ?????????????? SKK_MSG_DELIMITER ??????????? + // ??????????????? ???????????SKK_MSG_DELIMITER ??????????? + kSKKMessageSearch = 200, + + // ??????????+ // ??????形???+ // +0 ??????座?(QuickDraw座?) ????????????+ // +2 ??????座?(QuickDraw座?) ????????????+ // +4 ???(?) UniChar??? + // ???:??? ???????????漢??????? SKK_MSG_DELIMITER ?????????????? // - // ?????? - // +0 ??????ID ????2????? - // +2 1???????????? ????2????? - // +4 ????? ????2????? - // ?6???? - kSKKCandidatesWindowNext = 202, // ???????????????????????2??????????ID????????? - kSKKCandidatesWindowPrev = 203, // ??????????Next???? - kSKKCloseCandidatesWindow = 204, // ??????Next???? - kSKKRegisterThisToUserDic = 205, // ???????o????????UniChar????? - // ????+??e ? ???-???? ??????????????????? - kSKKRemoveThisFromUserDic = 206, // ?????????B??????kSKKRegisterThisToUserDic???? - kSKKSuspendCandidatesWindow = 207, - kSKKResumeCandidatesWindow = 208, - - kSKKShowAboutBox = 300, // AboutBox?????????????? - kSKKShowPreferencesBox = 301, // ??????????????????????? - kSKKShowWordRegistrationBox = 302, // ??????????????????????? + // ???????? + // +0 ???????ID ????????????+ // +2 1???????示????????????????????+ // +4 ??????? ????????????+ kSKKCreateCandidatesWindow = 201, + + // ??????????????????????? + // ??????2????????????? ID + kSKKCandidatesWindowNext = 202, + + // ??????????+ kSKKCandidatesWindowPrev = 203, + + // ?????+ kSKKCloseCandidatesWindow = 204, + + // ??????????? + // ??????形???niChar????????+ // ????+???e ???????????? ??????????????+ kSKKRegisterThisToUserDic = 205, + + // ????????????? + // ??????形???SKKRegisterThisToUserDic?????+ kSKKRemoveThisFromUserDic = 206, + + // AboutBox??示???????????) + kSKKShowAboutBox = 300, + + // ?????????????(????????) + kSKKShowPreferencesBox = 301, + + // ??????????????(????????) + kSKKShowWordRegistrationBox = 302, + + // ???????? + // ??????形???niChar??????????????? + // ???????????????????????? SKK_MSG_DELIMITER ?????????????????? + kSKKFetchCompletions = 400, - kSKKFetchCompletions = 400, // ???????????????UniChar????? - // ???????????????? ??????????????????????????X?? + // ???????????????????+ kSKKRegisterToggleEntry = 401, - kBasicMessageIsSkkEggLikeNewline = 500, // + kBasicMessageIsSkkEggLikeNewline = 500, kBasicMessageIsNumericKeypad_HalfWidth = 501, kBasicMessageIsAsciiModeStartup = 502, kBasicMessageUseNumericConversion = 503, @@ -117,7 +144,7 @@ kBasicMessage__EOF }; -// ????????????????????? +// ?????????????????????????? enum { kSKKClientConfigurationModified = 100 }; Index: AquaSKK/CandidatesManager.h diff -u AquaSKK/CandidatesManager.h:1.4.2.1 AquaSKK/CandidatesManager.h:1.4.2.2 --- AquaSKK/CandidatesManager.h:1.4.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/CandidatesManager.h Thu Aug 16 19:58:18 2007 @@ -1,5 +1,5 @@ /* - $Id: CandidatesManager.h,v 1.4.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: CandidatesManager.h,v 1.4.2.2 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -39,8 +39,6 @@ unsigned createAndShow(SInt16 qd_x, SInt16 qd_y, const CppCFString& candidates, bool showLast = false); void windowNext(unsigned int window_id); void windowPrev(unsigned int window_id); - void suspendWindow(unsigned int window_id); - void resumeWindow(unsigned int window_id); void closeWindow(unsigned int window_id); CandidatesWindowController* getWindowController(unsigned window_id); }; Index: AquaSKK/CandidatesManager.mm diff -u AquaSKK/CandidatesManager.mm:1.6.2.1 AquaSKK/CandidatesManager.mm:1.6.2.2 --- AquaSKK/CandidatesManager.mm:1.6.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/CandidatesManager.mm Thu Aug 16 19:58:18 2007 @@ -1,5 +1,5 @@ /* -*- objc -*- - $Id: CandidatesManager.mm,v 1.6.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: CandidatesManager.mm,v 1.6.2.2 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -103,18 +103,6 @@ [cand_windows[window_id] showPrevFrame]; } -void CandidatesManager::suspendWindow(unsigned int window_id) { - CandidatesWindowController* cwc = cand_windows[window_id]; - - [[cwc window] orderOut:nil]; -} - -void CandidatesManager::resumeWindow(unsigned int window_id) { - CandidatesWindowController* cwc = cand_windows[window_id]; - - [[cwc window] orderFront:nil]; -} - void CandidatesManager::closeWindow(unsigned int window_id) { CandidatesWindowController* cwc = cand_windows[window_id]; Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.33.2.8 AquaSKK/ChangeLog:1.33.2.9 --- AquaSKK/ChangeLog:1.33.2.8 Sat Feb 3 17:52:48 2007 +++ AquaSKK/ChangeLog Thu Aug 16 19:58:18 2007 @@ -1,3 +1,36 @@ +2007-06-15 Tomotaka SUWA + + * AquaSKK.pbproj/project.pbxproj: Panther ??????????????+ ?OkuriganaEntry ???????+ +2007-06-14 Tomotaka SUWA + + * *ConversionMode.*: ???????????????????????????+ + * KanjiConversionMode.*: + (1) ?????????????????????????+ (2) ????????????????????????正???????????????+ (3) ?????????????????????????????? + +2007-06-12 Tomotaka SUWA + + * ServerMessageReceiver.* (registerToggleEntry): ?????????????+ ????????????????????空? + + * KanjiConversionMode.* (registerToggleEntry): ??追????????+ ???????????????? + + * DictionarySet.cpp (RegisterOkuriNasi): entry.empty() ????????? + ????????正???????????????????ntry ????????? + + * Dictionary.h: SKKEntry ??????????対???+ + * BIMClientServer.h: kSKKRegisterToggleEntry ??????????形? + +2007-06-09 Tomotaka SUWA + + * AquaSKK 3.4 ???????+ 2007-02-03 Tomotaka SUWA * tests/TestAquaSKK.scpt: ??追???ppleScript ?????????????Index: AquaSKK/Dictionary.h diff -u AquaSKK/Dictionary.h:1.4.2.6 AquaSKK/Dictionary.h:1.4.2.7 --- AquaSKK/Dictionary.h:1.4.2.6 Sat Feb 3 17:52:48 2007 +++ AquaSKK/Dictionary.h Thu Aug 16 19:58:18 2007 @@ -1,10 +1,10 @@ /* -*- C++ -*- - $Id: Dictionary.h,v 1.4.2.6 2007/02/03 08:52:48 t-suwa Exp $ + $Id: Dictionary.h,v 1.4.2.7 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -354,6 +354,9 @@ } void addCandidate(const SKKCandidate& theCandidate) { + // ????????????????+ if(theCandidate.IsEmpty()) return; + // 註???????????????????? SKKCandidateIterator i = getCandidateIterator(theCandidate); @@ -367,6 +370,9 @@ } void updateCandidate(const SKKCandidate& theCandidate) { + // ????????????????+ if(theCandidate.IsEmpty()) return; + SKKCandidate target; // 註????????????????????Index: AquaSKK/DictionarySet.cpp diff -u AquaSKK/DictionarySet.cpp:1.5.2.7 AquaSKK/DictionarySet.cpp:1.5.2.8 --- AquaSKK/DictionarySet.cpp:1.5.2.7 Sat Feb 3 17:52:48 2007 +++ AquaSKK/DictionarySet.cpp Thu Aug 16 19:58:18 2007 @@ -1,10 +1,10 @@ /* - $Id: DictionarySet.cpp,v 1.5.2.7 2007/02/03 08:52:48 t-suwa Exp $ + $Id: DictionarySet.cpp,v 1.5.2.8 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -273,7 +273,8 @@ } void DictionarySet::RegisterOkuriNasi(const std::string& key, const std::string& entry) { - if(key.empty() || entry.empty()) { + // key ????????????(?????????????? entry ???) + if(key.empty()) { std::cerr << "AquaSKK: Invalid registration received" << std::endl; } else { userdict_->registerOkuriNasi(key, entry); Index: AquaSKK/KanjiConversionMode.cpp diff -u AquaSKK/KanjiConversionMode.cpp:1.8.2.5 AquaSKK/KanjiConversionMode.cpp:1.8.2.6 --- AquaSKK/KanjiConversionMode.cpp:1.8.2.5 Sat Feb 3 17:52:48 2007 +++ AquaSKK/KanjiConversionMode.cpp Thu Aug 16 19:58:18 2007 @@ -1,5 +1,5 @@ /* - $Id: KanjiConversionMode.cpp,v 1.8.2.5 2007/02/03 08:52:48 t-suwa Exp $ + $Id: KanjiConversionMode.cpp,v 1.8.2.6 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -41,33 +41,34 @@ #endif /* - ?????????????????????????? - ?????????????????????handleInput?????? + ??????????大?????????????????????? + 漢???????????????????????????andleInput???????? - handleInput????????????????????iraganaInputMode???? - ????????????????????????? + handleInput????????????????????????????iraganaInputMode????? + ????????????????????????????????? - Oku ? ??? - OkuR ? ???*r - OkuRi ? ???*? ? ??? + Oku ?????? OkuR ?????? + OkuRi ??????? ?????? - ???????????????????????KanjiConversionMode?????? + 漢???????????????????????????????anjiConversionMode???????? */ KanjiConversionMode::KanjiConversionMode(ParentInputMode& src) :ChildInputMode(src), - word_register_mode(NULL), + word_register_mode(0), + old_word_register_mode(0), status(STATUS_NULL), show_cands_window_after_Nth_cand(5), completion_mode(false), - henkanModeStatus(false) { - + henkanModeStatus(false), + priorInputMode_(Hirakana) { + // empty } KanjiConversionMode::~KanjiConversionMode() { - if(word_register_mode) { - delete word_register_mode; - } + delete word_register_mode; + delete old_word_register_mode; } bool KanjiConversionMode::handleInput(SKKChar skkchar) { @@ -80,12 +81,12 @@ bool KanjiConversionMode::handleInputChar(SKKChar skkchar) { if(word_register_mode) { word_register_mode->handleInput(skkchar); - return false; // WordRegisterMode::handleInput()??????????????? + return false; // WordRegisterMode::handleInput()????????????確????????? } if(SKKConfig::AbbrevNextKey() == skkchar) { if(status == STATUS_WHITE_ROOT && completion_mode) { - // ???????????????????B + // 次????????????????????????? current_completion_index++; if(current_completion_index >= completions.size()) { current_completion_index = 0; @@ -98,7 +99,7 @@ if(SKKConfig::AbbrevPrevKey() == skkchar) { if(status == STATUS_WHITE_ROOT && completion_mode) { - // ??????????s????????? + // ??????????????????????????? if(current_completion_index == 0) { current_completion_index = completions.size() - 1; } else { @@ -110,20 +111,20 @@ } } - // tab,????,????????????????????????????? + // tab,??????,???????????????????????????????????????? completion_mode = false; if(SKKConfig::ToggleKanaKey() == skkchar) { if(status == STATUS_WHITE_ROOT || status == STATUS_WHITE_OKURI) { - // currenInputMode?terminate???root?getStringToFix()?????????? + // currenInputMode??erminate?????oot??etStringToFix()?????????????? parent->getCurrentInputMode().terminate(); CppCFString to_fix(parent->getCurrentInputMode().getStringToFix()); if (status == STATUS_WHITE_ROOT) { root += to_fix; } - // root???????????????????B - // ???????????????????????? + // root????????????????????????? + // ????????????????????????????? CppCFString cand; if(parent->isZenKataInputMode()) { cand = HiraganaInputMode::convert(root); @@ -131,8 +132,8 @@ cand = ZenKataInputMode::convert(root); } - // ????o??? - sendWordToServerToRegister(root, cand); + // ??????????????????+ registerToggleEntry(root); parent->fix(cand); parent->setEnabledKanjiMode(false); @@ -141,9 +142,9 @@ return false; } else if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // ????????? - // 1) ????????????????? - // 2) ??????????????? + // ???????確???+ // 1) ?????????????平仮???????+ // 2) ???以???????????????? parent->setEnabledKanjiMode(false); if(parent->isZenKataInputMode()) { @@ -157,7 +158,7 @@ if(SKKConfig::PrevKouhoKey() == skkchar) { if(status == STATUS_BLACK) { - // ???????????????????[????? + // ???????????????????????????????? if(current_candidate_index > 0) { current_candidate_index--; } else { @@ -169,17 +170,17 @@ return false; } else if(status == STATUS_BLACK_WITH_WINDOW) { - // delete??????????? + // delete???????????????? handleBackSpace(); return false; } - // ????????? + // ???以???????? } if(SKKConfig::PurgeFromJisyoKey() == skkchar) { if(status == STATUS_BLACK) { - // ??v???????B????????????????????????- // ?????????????????????????????? + // ??????????????????????????????????????????????????+ // ???????????????????????????????????????? status = STATUS_PROMPT; prompt_type = PROMPT_DELETE_FROM_USER_DIC; prompt_input.clear(); @@ -199,28 +200,31 @@ if(SKKConfig::ToggleKatakanaKey() == skkchar) { if(status == STATUS_WHITE_ROOT || status == STATUS_WHITE_OKURI) { - // currenInputMode?terminate???root?getStringToFix()?????????? + // currenInputMode??erminate?????oot??etStringToFix()?????????????? parent->getCurrentInputMode().terminate(); CppCFString to_fix(parent->getCurrentInputMode().getStringToFix()); if (status == STATUS_WHITE_ROOT) { root += to_fix; } - // root???????????????????B - // ???????????????????????? + // root????????????????????????? + // ?????????????????????????????? if(parent->isHanKataInputMode()) { parent->fix(HiraganaInputMode::convert(root)); } else { parent->fix(HanKataInputMode::convert(root)); } + // ??????????????????+ registerToggleEntry(root); + parent->setEnabledKanjiMode(false); initialize(); return false; } else if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // ????????????? - // 1) ????????????????? - // 2) ????????????????? + // ???????確?????????+ // 1) ?????????????平仮???????+ // 2) ???以?????????????????? parent->setEnabledKanjiMode(false); if(parent->isHanKataInputMode()) { @@ -233,12 +237,12 @@ } if(SKKConfig::KakuteiKey() == skkchar) { - return true; // ???? + return true; // 確???? } if(SKKConfig::LatinModeKey() == skkchar || SKKConfig::Jisx0208LatinModeKey() == skkchar) { if(status == STATUS_WHITE_ROOT || status == STATUS_WHITE_OKURI || status == STATUS_BLACK) { - // ???????????/?????????? + // ????????????????????????? if(SKKConfig::LatinModeKey() == skkchar) { parent->goHanAscInputMode(); } else { @@ -246,15 +250,15 @@ } return true; } - // ???????????? + // ??????????????? } if(SKKConfig::AbbrevModeKey() == skkchar) { - // ?????????????????I????? - // ???????/fix???????????? - // ???????????????arent?handleInput???? - // KanjiConversionMode?STATUS_NULL???? - // ??IgnoreThis???? + // ???????確??????????????????????+ // ??????????/fix??????????????????+ // 漢?????????????????parent??andleInput????? + // KanjiConversionMode??TATUS_NULL?????? + // 常?kIgnoreThis?????? parent->fix(getStringToFix()); return parent->handleInput(skkchar); @@ -262,14 +266,14 @@ if(SKKConfig::NextKouhoKey() == skkchar) { if(status == STATUS_WHITE_ROOT || status == STATUS_WHITE_OKURI) { - // currenInputMode?terminate???root????okuri?getStringToFix()?????????? + // currenInputMode??erminate?????oot??????kuri??etStringToFix()?????????????? parent->getCurrentInputMode().terminate(); if(status == STATUS_WHITE_ROOT) { root += parent->getCurrentInputMode().getStringToFix(); root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); if(root.length() == 0) { - // ??+ // ?? parent->setEnabledKanjiMode(false); parent->display(CppCFString()); initialize(); @@ -285,33 +289,33 @@ } if(candidates.size() > 0) { - // ?????????????? + // ?????????????????? status = STATUS_BLACK; - current_candidate_index = 0; // ?????B + current_candidate_index = 0; // ???????? } else { - // ???????????????? + // ?????????????????? startRegisteringWord(); } } else if(status == STATUS_BLACK) { - // ????? + // 次?????? current_candidate_index++; - if(current_candidate_index >= candidates.size()) { // ?????s?????????? + if(current_candidate_index >= candidates.size()) { // ?????????????????? startRegisteringWord(); } else if(current_candidate_index >= show_cands_window_after_Nth_cand - 1) { - // ??????????????????????????? + // ???以????????????????????????示???? status = STATUS_BLACK_WITH_WINDOW; openCandidatesWindow(); } } else if(status == STATUS_BLACK_WITH_WINDOW) { if(candidates_window_current_frame < candidates_window_num_of_frames - 1) { - // ??????????????????????? + // ?????????????????????????????????? goToNextCandidatesFrame(); } else { - // ???????????????????? + // ??????????????????????????? closeCandidatesWindow(); startRegisteringWord(); } @@ -319,17 +323,17 @@ return false; } - // ????????????????? + // ?????????????????????? if(SKKConfig::SetHenkanPointKey() == skkchar) { if(status == STATUS_NULL || (status == STATUS_WHITE_ROOT && root.length() == 0)) { - status = STATUS_WHITE_ROOT; // ?????? + status = STATUS_WHITE_ROOT; // ?????? - // ???? + // ????? root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); return false; } - // ?????? + // 確?????? if(status == STATUS_WHITE_ROOT || status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { parent->fix(getStringToFix()); parent->setEnabledKanjiMode(true); @@ -337,13 +341,13 @@ } } - // ???????? + // ????????追? if(status == STATUS_PROMPT) { prompt_input += skkchar; return false; } - // ???????????? + // ??????????確???? if(status == STATUS_BLACK_WITH_WINDOW) { CppCFString labels = CppCFString("asdfjkl").substring(0, candidates_window_cands_per_frame); int cand_index = labels.indexOf(std::tolower(skkchar)); @@ -351,7 +355,7 @@ if(cand_index != -1) { unsigned new_index = current_candidate_index + cand_index; if(new_index < candidates.size()) { - // ??????????????????? + // ?????????????許???????確??? current_candidate_index = new_index; return true; } @@ -361,109 +365,109 @@ if('A' <= skkchar && skkchar <= 'Z') { if(status == STATUS_NULL || status == STATUS_WHITE_ROOT && root.length() == 0) { - status = STATUS_WHITE_ROOT; // ?????? + status = STATUS_WHITE_ROOT; // ?????? - // ????????????s? + // ?????????????????? parent->getCurrentInputMode().handleInput(skkchar + 0x20); - // ????????fix?????root???? + // ?????????fix????????oot?追??? root += parent->getCurrentInputMode().getStringToFix(); - // ???? + // ????? root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); - // okuri??????B?????m????????? + // okuri??????????????????確????????????? okuri.clear(); } else if(status == STATUS_WHITE_ROOT) { - // terminate??????????????? - // ????????KesSite?????????????? - // ????????????A?????????????????- // (??I???????n)?????????? + // terminate????????????????込???+ // ????????????KesSite???????????????????? + // ????????????????????????????????????????+ // (?????????????n)?????????????? CppCFString tmp_queue(skkchar + 0x20); CppCFString result = KanaTreeController::defaultTreeController().trace(KanaTreeController::OUTPUT_HIRAGANA, tmp_queue); if(result.length() == 0 && tmp_queue != "n") { - parent->getCurrentInputMode().handleInput(skkchar + 0x20); // ???+ parent->getCurrentInputMode().handleInput(skkchar + 0x20); // ??? } - // currentInputMode?terminate???root?getStringToFix()?????????? + // currentInputMode??erminate?????oot??etStringToFix()?????????????? parent->getCurrentInputMode().terminate(); root += parent->getCurrentInputMode().getStringToFix(); root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); - status = STATUS_WHITE_OKURI; // ?????????? + status = STATUS_WHITE_OKURI; // ??????????? - okuri_head = skkchar + 0x20; // ???+ okuri_head = skkchar + 0x20; // ??? - // ????????????s? + // ?????????????????? bool fix = parent->getCurrentInputMode().handleInput(okuri_head); - // ????????fix?????okuri????? + // ?????????fix????????kuri??????? okuri += parent->getCurrentInputMode().getStringToFix(); - // ???? + // ????? okuri_to_display.clear().append(okuri).append(parent->getCurrentInputMode().getStringToDisplay()); - // ?????????????????????? + // ?????空?????????????????????? if(fix && parent->getCurrentInputMode().isQueueEmpty()) { - // ????? - return handleInput(' '); // ???????????????continue? + // ?????? + return handleInput(' '); // ??????????????????continue?? } } else if(status == STATUS_WHITE_OKURI) { - // ????????????s? + // ?????????????????? bool fix = parent->getCurrentInputMode().handleInput(skkchar + 0x20); - // ????????fix?????okuri????? + // ?????????fix????????kuri??????? okuri += parent->getCurrentInputMode().getStringToFix(); - // ???? + // ????? okuri_to_display.clear().append(okuri).append(parent->getCurrentInputMode().getStringToDisplay()); - // ?????????????????????? + // ?????空?????????????????????? if(fix && parent->getCurrentInputMode().isQueueEmpty()) { - // ????? - return handleInput(' '); // ???????????????continue? + // ?????? + return handleInput(' '); // ??????????????????continue?? } } else if(status == STATUS_BLACK) { - // ???????????? + // ???????確?????? parent->fix(getStringToFix()); parent->setEnabledKanjiMode(true); return handleInput(skkchar); } } else { if(status == STATUS_WHITE_ROOT) { - // ??????? + // ????????? parent->getCurrentInputMode().handleInput(skkchar); - // root???? + // root????? root += parent->getCurrentInputMode().getStringToFix(); - // ???? + // ????? root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); } else if(status == STATUS_WHITE_OKURI) { - // currentInputMode::handleInput()????true????????????????? - // ????????currentInputMode::handleInput()?????? + // currentInputMode::handleInput()??????true?????????????????????? + // ??????????currentInputMode::handleInput()???????? bool fix = parent->getCurrentInputMode().handleInput(skkchar); const CppCFString& kanainput_result = parent->getCurrentInputMode().getStringToFix(); - // okuri???? + // okuri????? okuri += kanainput_result; - // ???? + // ????? okuri_to_display.clear().append(okuri).append(parent->getCurrentInputMode().getStringToDisplay()); - // ?????????????????? + // ?????空????????????????? if(fix && parent->getCurrentInputMode().isQueueEmpty()) { - // ????? - return handleInput(' '); // ???????????????continue? + // ?????? + return handleInput(' '); // ??????????????????continue?? } } else if(status == STATUS_BLACK) { - // ???????????? + // ???????確?????? parent->fix(getStringToFix()); return parent->handleInput(skkchar); } @@ -474,15 +478,25 @@ void KanjiConversionMode::startRegisteringWord() { CppCFString register_title; - if (okuri.length() > 0) { + + if(okuri.length() > 0) { register_title.append(root).append('*').append(okuri); - } - else { + } else { register_title = root; } - register_title = HiraganaInputMode::convert(register_title); // ?????????? - - word_register_mode = new WordRegisterMode(*this,register_title); + + // ???????????????????? if(parent->isHiraganaInputMode()) { + priorInputMode_ = Hirakana; + } + if(parent->isZenKataInputMode()) { + priorInputMode_ = Katakana; + } + if(parent->isHanKataInputMode()) { + priorInputMode_ = Jisx0201Kana; + } + + word_register_mode = new WordRegisterMode(*this, HiraganaInputMode::convert(register_title)); word_register_mode->redisplay(); word_register_mode->updatePencilMenuIcon(); } @@ -490,7 +504,7 @@ bool KanjiConversionMode::handleBackSpace() { if (word_register_mode) { word_register_mode->handleBackSpace(); - return true; // WordRegisterMode::handleBackSpace()???????????????B + return true; // WordRegisterMode::handleBackSpace()???????????????????????? } if (status == STATUS_NULL) { @@ -498,10 +512,10 @@ } if (status == STATUS_WHITE_ROOT) { - // hiraganaInputMode->handleBackSpace()?true?????root_to_display?????? - // false????? - // root?????????I?? - // ??????root?????????B + // hiraganaInputMode->handleBackSpace()??rue????????oot_to_display???????? + // false????????+ // root????????????????? + // 空???????root?????????????? if (parent->getCurrentInputMode().handleBackSpace()) { root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); } @@ -512,20 +526,20 @@ initialize(); } else { - completion_mode = false; // ??????????????[?????? + completion_mode = false; // ?????????????????????????? root.eraseLast(1); root_to_display = root; } } } else if (status == STATUS_WHITE_OKURI) { - // hiraganaInputMode->handleBackSpace()? - // true????? - // okuri_to_display?????? - // ????okuri??????????STATUS_WHITE_ROOT???? - // false????? - // okuri??????????STATUS_WHITE_ROOT???? - // ?????????kuri?????????B + // hiraganaInputMode->handleBackSpace()??+ // true????????+ // okuri_to_display???????? + // ??????okuri??????????????STATUS_WHITE_ROOT????? + // false????????+ // okuri??????????????STATUS_WHITE_ROOT????? + // ?????????kuri?????????????? if (parent->getCurrentInputMode().handleBackSpace()) { okuri_to_display.clear().append(okuri).append(parent->getCurrentInputMode().getStringToDisplay()); if (okuri.length() <= 1) { @@ -545,20 +559,20 @@ } } else if (status == STATUS_BLACK) { - // ???????????????+ // ???????確?????????? CppCFString str(getStringToFix()); str.eraseLast(1); parent->fix(str); parent->display(CppCFString()); } else if (status == STATUS_BLACK_WITH_WINDOW) { - // ???t????????????? - // ??????????????? + // ????????????????????????+ // ????????????????????? if (candidates_window_current_frame == 0) { - // ???????????? + // ???????????????? current_candidate_index = show_cands_window_after_Nth_cand - 2; - // ?????????? + // ?????????????? closeCandidatesWindow(); status = STATUS_BLACK; @@ -568,7 +582,7 @@ } } else if (status == STATUS_PROMPT) { - // prompt_input???????????????B + // prompt_input????????????????????? if (prompt_input.length() > 0) { prompt_input.eraseLast(1); } @@ -581,23 +595,23 @@ word_register_mode->handleReturn(); if (word_register_mode) { - // handleReturn??wordRegistrationFinished??????word_register_mode????????? + // handleReturn???wordRegistrationFinished????????word_register_mode????????????? word_register_mode->redisplay(); } - return true; // ??rue???? + return true; // 常?true?????? } if (status == STATUS_PROMPT) { switch (prompt_type) { case PROMPT_DELETE_FROM_USER_DIC: { - // prompt_input?yes??????TATUS_WHITE_ROOT???? - // ??????STATUS_BLACK???? + // prompt_input??es?????????STATUS_WHITE_ROOT?????? + // ???以????STATUS_BLACK?????? if (prompt_input == "yes") { - // ??+ // ??? makeServerRemoveWord(); - // STATUS_WHITE_ROOT? + // STATUS_WHITE_ROOT?? if (okuri.length() > 0) { root += okuri; root_to_display = root; @@ -620,9 +634,9 @@ } if (ClientConfiguration::theInstance().isSkkEggLikeNewline()) { - // skk-egglike-newline????????????????????rue???? + // skk-egglike-newline????????????確????????????????rue?????? - // ???????A?????????? + // ???????????強????確??????? parent->fix(getStringToFix()); return true; } @@ -633,19 +647,19 @@ bool KanjiConversionMode::handleArrow(SKKChar skkchar) { if (word_register_mode) { - return word_register_mode->handleArrow(skkchar); // ??+ return word_register_mode->handleArrow(skkchar); // ?? } - // ????????????handleArrow????getStringToFix()?????????? + // 平仮?????????????handleArrow?????getStringToFix()????????????? parent->getCurrentInputMode().handleArrow(skkchar); parent->getCurrentInputMode().getStringToFix(); if (status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // ???????? + // ???????確? parent->fix(getStringToFix()); } - // ????????????B + // 漢?????????????? parent->setEnabledKanjiMode(false); initialize(); return false; @@ -656,18 +670,18 @@ return word_register_mode->handleCg(); } - // ????????????handleCg????getStringToFix()?????????? + // 平仮?????????????handleCg?????getStringToFix()????????????? parent->getCurrentInputMode().handleCg(); parent->getCurrentInputMode().getStringToFix(); if (status == STATUS_WHITE_ROOT || status == STATUS_WHITE_OKURI) { - // ?????????+ // 漢???????? parent->setEnabledKanjiMode(false); initialize(); } else if (status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // root?okuri??????STATUS_WHITE_ROOT? - // ????????????????? + // root??kuri????????STATUS_WHITE_ROOT??+ // ????????????????????????? if (status == STATUS_BLACK_WITH_WINDOW) { closeCandidatesWindow(); } @@ -699,7 +713,7 @@ if (status == STATUS_WHITE_ROOT) { if (completion_mode) { - // ???????????????????B + // 次????????????????????????? current_completion_index++; if (current_completion_index >= completions.size()) { current_completion_index = 0; @@ -708,15 +722,15 @@ root_to_display = root; } else { - // currentInputMode?terminate???root?getStringToFix()?????????? + // currentInputMode??erminate?????oot??etStringToFix()?????????????? parent->getCurrentInputMode().terminate(); root += parent->getCurrentInputMode().getStringToFix(); root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); - // ????????? + // ???????????? askServerTheCompletions(); - // ?????????????????????????? + // ???????????????????????????????? if (completions.size() > 0) { completion_mode = true; root = completions[0]; @@ -734,67 +748,89 @@ if (word_register_mode) { word_register_mode->terminate(); - delete word_register_mode; - word_register_mode = NULL; + resetRegistrationMode(); } - // currenInputMode?terminate???root?getStringToFix()?????????? + // currenInputMode??erminate?????oot??etStringToFix()?????????????? parent->getCurrentInputMode().terminate(); CppCFString to_fix(parent->getCurrentInputMode().getStringToFix()); if (status == STATUS_WHITE_ROOT) { root += to_fix; } - parent->fix(getStringToFix()); // ???? + parent->fix(getStringToFix()); // 確???? parent->setEnabledKanjiMode(false); initialize(); } +// ???????????????????????????????????+void KanjiConversionMode::resetRegistrationMode() { + delete old_word_register_mode; + old_word_register_mode = word_register_mode; + word_register_mode = 0; +} + +// ???????????????????? +void KanjiConversionMode::restoreInputMode() { + switch(priorInputMode_) { + case Hirakana: + parent->goHiraganaInputMode(); + break; + case Katakana: + parent->goZenKataInputMode(); + break; + case Jisx0201Kana: + parent->goHanKataInputMode(); + break; + } + + parent->updatePencilMenuIcon(); +} + void KanjiConversionMode::wordRegistrationFinished() { if(word_register_mode) { CppCFString content = word_register_mode->getContent(); if(content.length() > 0) { - // ????? + // ?????? if(okuri.length() > 0) { if(SKKConfig::UseKanaToOkuri()) { -#ifdef DEBUG - cerr << "(A)OKURI-HEAD: " << okuri[0] << " - " << SKKConfig::ConvertKanaToOkuri(okuri[0]) << endl; -#endif - sendWordToServerToRegister(root + SKKConfig::ConvertKanaToOkuri(okuri[0]), okuri, content); + sendWordToServerToRegister( + HiraganaInputMode::convert(root) + SKKConfig::ConvertKanaToOkuri(okuri[0]), + HiraganaInputMode::convert(okuri), content); } else { - sendWordToServerToRegister(root + okuri_head, okuri, content); + sendWordToServerToRegister( + HiraganaInputMode::convert(root) + okuri_head, + HiraganaInputMode::convert(okuri), content); } } else { - sendWordToServerToRegister(root, content); + sendWordToServerToRegister(HiraganaInputMode::convert(root), content); } - // ??? - parent->fix(content + okuri); // ???????? + // 確???+ parent->fix(content + okuri); // ??????????? - // ??B + // ???? parent->setEnabledKanjiMode(false); initialize(); } else { - if(okuri.length() > 0) { // ???????? + if(okuri.length() > 0) { // ??????????? status = STATUS_WHITE_OKURI; } else { status = STATUS_WHITE_ROOT; } } - delete word_register_mode; - word_register_mode = NULL; - parent->updatePencilMenuIcon(); + resetRegistrationMode(); + restoreInputMode(); } } void KanjiConversionMode::wordRegistrationCanceled() { - delete word_register_mode; - word_register_mode = NULL; - parent->updatePencilMenuIcon(); - + resetRegistrationMode(); + restoreInputMode(); + if (status == STATUS_WHITE_ROOT || status == STATUS_WHITE_OKURI) { - // root?okuri??????STATUS_WHITE_ROOT? + // root??kuri????????STATUS_WHITE_ROOT?? root += okuri; okuri.clear(); @@ -804,36 +840,36 @@ status = STATUS_WHITE_ROOT; } else if (status == STATUS_BLACK) { - current_candidate_index = candidates.size() - 1; // ??????? + current_candidate_index = candidates.size() - 1; // ?????????? } else if (status == STATUS_BLACK_WITH_WINDOW) { - // ???????????????????- current_candidate_index = show_cands_window_after_Nth_cand - 1; // goToNextCandidatesFrame()????? + // ??????????????????????????+ current_candidate_index = show_cands_window_after_Nth_cand - 1; // goToNextCandidatesFrame()??????? openCandidatesWindow(OpenReverse); } } CppCFString KanjiConversionMode::getStringToDisplay() { if (word_register_mode) { - // ?????????????WordRegisterMode??????????????? + // ??????????????????ordRegisterMode?????????潰???????? return CppCFString().append(kIgnoreThis); } if (status == STATUS_WHITE_ROOT) { - // ?root + // ??oot return CppCFString().append(0x25bd).append(root_to_display); } else if (status == STATUS_WHITE_OKURI) { - // ?root*okuri + // ??oot*okuri return CppCFString().append(0x25bd).append(root_to_display).append('*').append(okuri_to_display); } else if (status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { CppCFString str = convertNumeric(numconv_, candidates[current_candidate_index]); - // ?????? + // ?現????? return CppCFString().append(0x25bc).append(str); } else if (status == STATUS_PROMPT) { - // [?????][??] + // [???????[??] return CppCFString('[').append(prompt).append("][").append(prompt_input).append(kCaret).append(']'); } else { @@ -852,16 +888,16 @@ else if (status == STATUS_BLACK) { result = convertNumeric(numconv_, candidates[current_candidate_index]); - // ???? + // ???? sendCurrentCandidateToServerToRegister(); } else if (status == STATUS_BLACK_WITH_WINDOW) { result = convertNumeric(numconv_, candidates[current_candidate_index]); - // ???? + // ???? sendCurrentCandidateToServerToRegister(); - // ?????????? + // ?????????????? closeCandidatesWindow(); } else /* if (status == STATUS_NULL) */ { @@ -869,8 +905,8 @@ result = CppCFString().append(kIgnoreThis); } - // ?????????????fix??????????????????B - // ?????B + // ???????????????????ix????????????????漢????????+ // ????????? parent->setEnabledKanjiMode(false); initialize(); @@ -891,22 +927,19 @@ } void KanjiConversionMode::sendCurrentCandidateToServerToRegister() { - // ????? - // ????????????? + // ??????+ // ?????平仮????????? if(okuri.length() > 0) { if(SKKConfig::UseKanaToOkuri()) { -#ifdef DEBUG - cerr << "(B)OKURI-HEAD: " << okuri[0] << " - " << SKKConfig::ConvertKanaToOkuri(okuri[0]) << endl; -#endif sendWordToServerToRegister( HiraganaInputMode::convert(root) + SKKConfig::ConvertKanaToOkuri(okuri[0]), HiraganaInputMode::convert(okuri), - candidates[current_candidate_index].clone().eraseLast(okuri.length())); // ???????B + candidates[current_candidate_index].clone().eraseLast(okuri.length())); // ??????????? } else { sendWordToServerToRegister( HiraganaInputMode::convert(root) + okuri_head, HiraganaInputMode::convert(okuri), - candidates[current_candidate_index].clone().eraseLast(okuri.length())); // ???????B + candidates[current_candidate_index].clone().eraseLast(okuri.length())); // ??????????? } } else { sendWordToServerToRegister(HiraganaInputMode::convert(root), candidates[current_candidate_index]); @@ -914,41 +947,41 @@ } void KanjiConversionMode::askServerTheCandidates(bool hasOkuri) { - // ???????????+?????-????? + // ???????????????????????????????? CppCFString query; if(hasOkuri) { query.append('+').append(root); if(SKKConfig::UseKanaToOkuri()) { query.append(SKKConfig::ConvertKanaToOkuri(okuri[0])).append(SKK_MSG_DELIMITER).append(okuri); } else { - // ??????+??r ? + // ?????????+???r ?? query.append(okuri_head).append(SKK_MSG_DELIMITER).append(okuri); } } else { - // ?????-?? + // ??????????? query = CppCFString().append('-').append(root); } - // ???????????????? + // ????????????平仮????? query = HiraganaInputMode::convert(query); D_PRINTF("query: %s\n",query.toCString(kCFStringEncodingEUC_JP)); - // ????? + // ?????? CppCFData cfdata_query; cfdata_query.own(query.toCFData()); current_candidate_index = 0; ::askServerTheCandidates(cfdata_query, candidates); - // ????????? + // ???????????? if(hasOkuri) { for(unsigned i = 0; i < candidates.size(); ++ i) { candidates[i] += okuri; } } - // ????????? + // ??????????? if(!hasOkuri && ClientConfiguration::theInstance().useNumericConversion() && numconv_.Setup(root.toStdString(kCFStringEncodingUTF8))) { CppCFString normalized(numconv_.NormalizedKey().c_str(), kCFStringEncodingUTF8); @@ -963,7 +996,7 @@ } } -// ???? +// ????? void askServerTheCandidates(const CppCFData& query, std::vector& candidates) { CppCFString reply(ServerConnectionFactory::theInstance().newConnection(). send(kSKKMessageSearch, query, kAquaSKKServerRunLoopMode).getData()); @@ -978,8 +1011,8 @@ void KanjiConversionMode::makeServerRemoveWord() { CppCFString query; if(okuri.length() > 0) { - // ??? ?????+??r ? ? - // ??????????????????????? + // ????????????????r ????+ // ????????????????????????????? query.append('+'); if (SKKConfig::UseKanaToOkuri()) { #ifdef DEBUG @@ -990,35 +1023,53 @@ query.append(HiraganaInputMode::convert(root)).append(okuri_head); } query.append(SKK_MSG_DELIMITER).append( - candidates[current_candidate_index].clone().eraseLast(okuri.length())); // ???????B + candidates[current_candidate_index].clone().eraseLast(okuri.length())); // ??????????? } else { - // ?? ?????-?? ?? - // ??????????????????????? + // ??? ?????????? ?? + // ????????????????????????????? query.append('-').append(HiraganaInputMode::convert(root)).append(SKK_MSG_DELIMITER); query.append(candidates[current_candidate_index]); } - // ???? + // ??渡? CppCFData cfdata_query; cfdata_query.own(query.toCFData()); ::makeServerRemoveWord(cfdata_query); } -// ???? +// ????? void makeServerRemoveWord(const CppCFData& query) { ServerConnectionFactory::theInstance().newConnection().send(kSKKRemoveThisFromUserDic, query); } void KanjiConversionMode::askServerTheCompletions() { - // ???????????????? + // ????????????平仮????? CppCFString query = HiraganaInputMode::convert(root); - // ????? + // ?????? CppCFData cfdata_query; cfdata_query.own(query.toCFData()); current_completion_index = 0; ::askServerTheCompletions(cfdata_query, completions); + + // ??????????+ struct convert { + static void ToZenKana(CppCFString& str) { + str = ZenKataInputMode::convert(str); + } + static void ToHanKana(CppCFString& str) { + str = HanKataInputMode::convert(str); + } + }; + + // ?????????????????????????????????+ if(parent->isZenKataInputMode()) { + std::for_each(completions.begin(), completions.end(), &convert::ToZenKana); + } + if(parent->isHanKataInputMode()) { + std::for_each(completions.begin(), completions.end(), &convert::ToHanKana); + } } void askServerTheCompletions(const CppCFData& query, std::vector& completions) { @@ -1028,7 +1079,7 @@ completions = reply.split(SKK_MSG_DELIMITER); } -// ???? +// ????? void sendWordToServerToRegister(const CppCFString& index,const CppCFString& okuri,const CppCFString& kanji) { CppCFData query; @@ -1060,6 +1111,15 @@ ServerConnectionFactory::theInstance().newConnection().send(kSKKRegisterThisToUserDic, query); } +// ??????????????????+void registerToggleEntry(const CppCFString& entry) { + CppCFData query; + + query.own(HiraganaInputMode::convert(entry).toCFData()); + + ServerConnectionFactory::theInstance().newConnection().send(kSKKRegisterToggleEntry, query); +} + void KanjiConversionMode::openCandidatesWindow(OpenDirection mode) { std::vector cands_without_okuri; unsigned okuri_length = okuri.length(); @@ -1083,7 +1143,7 @@ current_candidate_index, candidates.size(), mode); } -// ???? +// ????? void openCandidatesWindow(const CppCFString& str_candidates, unsigned& window_id, unsigned& cands_per_frame, @@ -1092,7 +1152,7 @@ unsigned& current_index, size_t num_of_candidates, SInt16 open_direction) { - // ??????????????????? + // ????????????????????????? struct OffsetToPosParams offset_to_pos_params; offset_to_pos_params.fRefCon = 0; offset_to_pos_params.fTextOffset = 0; @@ -1103,7 +1163,7 @@ SInt16 qd_x = offset_to_pos_params.fReplyPoint.h; SInt16 qd_y = offset_to_pos_params.fReplyPoint.v; - // ??????????CFData???? + // ??????????????CFData?????? CppCFData cands_to_be_attached; cands_to_be_attached.own(str_candidates.toCFData()); CppCFData attachment; @@ -1112,14 +1172,14 @@ attachment.append(CFSwapInt16HostToBig(open_direction)); attachment.append(cands_to_be_attached); - // ??? + // ??? CppCFData reply(ServerConnectionFactory::theInstance().newConnection(). send(kSKKCreateCandidatesWindow, attachment, kAquaSKKServerRunLoopMode)); - // ???????????????? - // +0 ??????ID ????2????? - // +2 1???????????? ????2????? - // +4 ????? ????2????? + // ?????????????解?????? + // +0 ???????ID ????????????+ // +2 1???????示???????? ????????????+ // +4 ??????? ???????????? //CppCFData reply(reply_data); window_id = CFSwapInt16BigToHost(reply.getUInt16(0)); cands_per_frame = CFSwapInt16BigToHost(reply.getUInt16(2)); @@ -1133,7 +1193,7 @@ } } -// ???? +// ????? CppCFData newCFDataRefWithWindowID(unsigned window_id) { CppCFData result; result.append(static_cast(CFSwapInt16HostToBig(window_id))); @@ -1142,45 +1202,35 @@ } void KanjiConversionMode::goToNextCandidatesFrame() { - // ?????ID(UInt16)???CFData?????????? + // ???????D(UInt16)?????FData?????????????? CppCFData reply(ServerConnectionFactory::theInstance().newConnection(). send(kSKKCandidatesWindowNext, newCFDataRefWithWindowID(candidates_window_id), kAquaSKKServerRunLoopMode)); - // ????????????????? + // ?????????????????????? ++ candidates_window_current_frame; - // ???????????????????????? + // ????????????????????????????? current_candidate_index += candidates_window_cands_per_frame; candidates_window_cands_per_frame = CFSwapInt16BigToHost(reply.getUInt16(0)); } void KanjiConversionMode::goToPrevCandidatesFrame() { - // ?????ID(UInt16)???CFData?????????? + // ???????D(UInt16)?????FData?????????????? CppCFData reply(ServerConnectionFactory::theInstance().newConnection(). send(kSKKCandidatesWindowPrev, newCFDataRefWithWindowID(candidates_window_id), kAquaSKKServerRunLoopMode)); - // ???????????????? + // ????????????????????? -- candidates_window_current_frame; - // ???????????????????????? + // ????????????????????????????? candidates_window_cands_per_frame = CFSwapInt16BigToHost(reply.getUInt16(0)); current_candidate_index -= candidates_window_cands_per_frame; } -void KanjiConversionMode::suspendCandidatesWindow() { - ServerConnectionFactory::theInstance().newConnection(). - send(kSKKSuspendCandidatesWindow, newCFDataRefWithWindowID(candidates_window_id)); -} - -void KanjiConversionMode::resumeCandidatesWindow() { - ServerConnectionFactory::theInstance().newConnection(). - send(kSKKResumeCandidatesWindow, newCFDataRefWithWindowID(candidates_window_id)); -} - void KanjiConversionMode::closeCandidatesWindow() { - // ?????ID(UInt16)???CFData?????????? + // ???????D(UInt16)?????FData?????????????? ServerConnectionFactory::theInstance().newConnection(). send(kSKKCloseCandidatesWindow, newCFDataRefWithWindowID(candidates_window_id)); } @@ -1192,7 +1242,7 @@ check.insert(CppCFString(numconv.OriginalKey().c_str(), kCFStringEncodingUTF8)); - // ??+ // ?? for(std::vector::iterator iter = master.begin(); iter != master.end(); ++ iter) { if(check.find(*iter) != check.end()) continue; @@ -1200,7 +1250,7 @@ result.push_back(*iter); } - // ??? + // ????? for(std::vector::iterator iter = cands.begin(); iter != cands.end(); ++ iter) { CppCFString target(convertNumeric(numconv, *iter)); if(check.find(target) != check.end()) continue; Index: AquaSKK/KanjiConversionMode.h diff -u AquaSKK/KanjiConversionMode.h:1.6.2.4 AquaSKK/KanjiConversionMode.h:1.6.2.5 --- AquaSKK/KanjiConversionMode.h:1.6.2.4 Sat Feb 3 17:52:48 2007 +++ AquaSKK/KanjiConversionMode.h Thu Aug 16 19:58:18 2007 @@ -1,10 +1,10 @@ /* - $Id: KanjiConversionMode.h,v 1.6.2.4 2007/02/03 08:52:48 t-suwa Exp $ + $Id: KanjiConversionMode.h,v 1.6.2.5 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2006 Tomotaka SUWA + Copyright (C) 2006-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,43 +37,47 @@ class KanjiConversionMode: public ChildInputMode, public RegistrationStarter { bool handleInputChar(SKKChar skkchar); NumericConverter numconv_; + int priorInputMode_; + + enum { Hirakana, Katakana, Jisx0201Kana }; protected: - static const int STATUS_NULL = 0; // ????????????????B?????????? - static const int STATUS_WHITE_ROOT = 1; // ??????????????? - static const int STATUS_WHITE_OKURI = 2; // ??????????????? - static const int STATUS_BLACK = 3; // ???? - static const int STATUS_BLACK_WITH_WINDOW = 4; // ?????????????????????? - static const int STATUS_PROMPT = 5; // ???????????B + static const int STATUS_NULL = 0; // 漢??????????????????????????????????? + static const int STATUS_WHITE_ROOT = 1; // ???????????????????+ static const int STATUS_WHITE_OKURI = 2; // ??????????????????+ static const int STATUS_BLACK = 3; // ???? + static const int STATUS_BLACK_WITH_WINDOW = 4; // ???????????????????????????? + static const int STATUS_PROMPT = 5; // ???????????????? - WordRegisterMode* word_register_mode; // NULL????????????????? + WordRegisterMode* word_register_mode; // NULL????????????????????+ WordRegisterMode* old_word_register_mode; // ??????????????????? int status; - CppCFString root; // ?????????????????????? - CppCFString okuri; // ??????????????????? - UniChar okuri_head; // ????????????????????????r? - CppCFString root_to_display,okuri_to_display; // ??????????????????????? - - static const int PROMPT_DELETE_FROM_USER_DIC = 1; // ???????P????- int prompt_type; // ????????? - CppCFString prompt; // ????? - CppCFString prompt_input; // ?????????????????? - - std::vector candidates; // ????? - unsigned current_candidate_index; // ??????? - - unsigned show_cands_window_after_Nth_cand; // ???????????????????????? - - unsigned candidates_window_id; // status?STATUS_BLACK_WITH_WINDOW??????????????ID? - unsigned candidates_window_current_frame; // ????????????????? - unsigned candidates_window_cands_per_frame; // ??????????1??????????? - unsigned candidates_window_num_of_frames; // ??????????????? - - bool completion_mode; // ???????[????????????????????????????? - std::vector completions; // ????? - unsigned current_completion_index; // ?????????? + CppCFString root; // ???????????????????????????????+ CppCFString okuri; // ???????????????????????????+ UniChar okuri_head; // ?????????????????????????????????r??+ CppCFString root_to_display,okuri_to_display; // ?????????????????????????????? + + static const int PROMPT_DELETE_FROM_USER_DIC = 1; // ??????????????????+ int prompt_type; // ????????????+ CppCFString prompt; // ???????+ CppCFString prompt_input; // ???????????????????????? + + std::vector candidates; // ???????+ unsigned current_candidate_index; // ?????????+ + unsigned show_cands_window_after_Nth_cand; // ?????????????????????????示??????+ + unsigned candidates_window_id; // status??TATUS_BLACK_WITH_WINDOW???????????????????ID??+ unsigned candidates_window_current_frame; // ???????????????????????+ unsigned candidates_window_cands_per_frame; // ?????????????1???????????????+ unsigned candidates_window_num_of_frames; // ????????????????????+ + bool completion_mode; // ??????????????????????????????????????????使??????+ std::vector completions; // ??????+ unsigned current_completion_index; // ????????????? - bool henkanModeStatus; //?????????????B + bool henkanModeStatus; //??????????????????? virtual void startRegisteringWord(); virtual void askServerTheCandidates(bool hasOkuri); @@ -83,10 +87,10 @@ virtual void openCandidatesWindow(OpenDirection mode = OpenNormal); virtual void goToPrevCandidatesFrame(); virtual void goToNextCandidatesFrame(); - virtual void suspendCandidatesWindow(); - virtual void resumeCandidatesWindow(); virtual void closeCandidatesWindow(); virtual void initialize(); + virtual void resetRegistrationMode(); + virtual void restoreInputMode(); public: KanjiConversionMode(class ParentInputMode& parent); @@ -103,14 +107,15 @@ virtual CppCFString getStringToDisplay(); virtual CppCFString getStringToFix(); - virtual void wordRegistrationFinished(); // WordRegisterMode??? - virtual void wordRegistrationCanceled(); // WordRegisterMode??? + virtual void wordRegistrationFinished(); // WordRegisterMode????+ virtual void wordRegistrationCanceled(); // WordRegisterMode???? }; void askServerTheCandidates(const CppCFData& query, std::vector& candidates); void addCandidate(const CppCFString& candidate, std::vector& candidates); void sendWordToServerToRegister(const CppCFString& index,const CppCFString& okuri,const CppCFString& kanji); void sendWordToServerToRegister(const CppCFString& index,const CppCFString& kanji); +void registerToggleEntry(const CppCFString& entry); void askServerTheCompletions(const CppCFData& query, std::vector& completions); void makeServerRemoveWord(const CppCFData& query); void openCandidatesWindow(const CppCFString& str_candidates, Index: AquaSKK/ServerMessageReceiver.h diff -u AquaSKK/ServerMessageReceiver.h:1.5.2.1 AquaSKK/ServerMessageReceiver.h:1.5.2.2 --- AquaSKK/ServerMessageReceiver.h:1.5.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/ServerMessageReceiver.h Thu Aug 16 19:58:18 2007 @@ -1,10 +1,10 @@ /* - $Id: ServerMessageReceiver.h,v 1.5.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: ServerMessageReceiver.h,v 1.5.2.2 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2005 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#pragma once +#ifndef INC__ServerMessageReceiver__ +#define INC__ServerMessageReceiver__ #include #include @@ -30,7 +31,7 @@ class CppCFData; /* - ????????????????????????? + ????????????????????????????????? */ class ServerMessageReceiver: public CppMessagePortServer { @@ -42,10 +43,9 @@ CppCFData createCandidatesWindow(const CppCFData& attachment); CppCFData candidatesWindowNext(const CppCFData& attachment); CppCFData candidatesWindowPrev(const CppCFData& attachment); - void suspendCandidatesWindow(const CppCFData& attachment); - void resumeCandidatesWindow(const CppCFData& attachment); void closeCandidatesWindow(const CppCFData& attachment); void registerThisToUserDic(const CppCFData& attachment); + void registerToggleEntry(const CppCFData& attachment); void removeThisFromUserDic(const CppCFData& attachment); void showAboutBox(); void showPreferencesBox(); @@ -55,3 +55,5 @@ public: static void start(const CFStringRef loopMode); }; + +#endif Index: AquaSKK/ServerMessageReceiver.mm diff -u AquaSKK/ServerMessageReceiver.mm:1.7.2.4 AquaSKK/ServerMessageReceiver.mm:1.7.2.5 --- AquaSKK/ServerMessageReceiver.mm:1.7.2.4 Sat Feb 3 17:52:48 2007 +++ AquaSKK/ServerMessageReceiver.mm Thu Aug 16 19:58:18 2007 @@ -1,10 +1,10 @@ /* -*- objc -*- - $Id: ServerMessageReceiver.mm,v 1.7.2.4 2007/02/03 08:52:48 t-suwa Exp $ + $Id: ServerMessageReceiver.mm,v 1.7.2.5 2007/08/16 10:58:18 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,13 +51,13 @@ CppCFData ServerMessageReceiver::messageReceived(SInt32 msgid, const CppCFData& packet) { CppCFData reply; - // ????????B???????PSN??????? + // ??????????????????????PSN?????????? BasicMessageHeader header; if(packet.getLength() > 0) { packet.copyData(0, sizeof(BasicMessageHeader), &header); } - // PSN ? Host Endian ??? + // PSN ??Host Endian ????? #define Big2Host32(arg) arg = CFSwapInt32BigToHost(arg) Big2Host32(header.fProcessSerialNumber.highLongOfPSN); Big2Host32(header.fProcessSerialNumber.lowLongOfPSN); @@ -68,10 +68,10 @@ } switch(msgid) { - case kBasicMessageActivated: // ???????????????? + case kBasicMessageActivated: // ???????????????????? ClientConnectionFactory::theInstance().setDefaultTarget(header.fProcessSerialNumber); break; - case kBasicMessageDeactivated: { // ?????????????????? + case kBasicMessageDeactivated: { // ??????????????????????? ProcessSerialNumber psn; psn.highLongOfPSN = 0; psn.lowLongOfPSN = kNoProcess; @@ -79,7 +79,7 @@ ClientConnectionFactory::theInstance().setDefaultTarget(psn); break; } - case kBasicMessageHidePalettes: // ?????????TSM??????? + case kBasicMessageHidePalettes: // ??????????????SM?????????? break; case kSKKMessageSearch: reply = searchWord(body); @@ -99,6 +99,9 @@ case kSKKRegisterThisToUserDic: registerThisToUserDic(body); break; + case kSKKRegisterToggleEntry: + registerToggleEntry(body); + break; case kSKKRemoveThisFromUserDic: removeThisFromUserDic(body); break; @@ -141,7 +144,7 @@ std::string query = data.toStdString(kCFStringEncodingUTF8).substr(1); std::string result; - // ????? + // ??????? if(data[0] == '+') { int pos = query.find_first_of(SKK_MSG_DELIMITER); @@ -159,7 +162,7 @@ } CppCFData ServerMessageReceiver::createCandidatesWindow(const CppCFData& attachment) { - // ????????QuickDraw???UniChar??????? + // 追?????????QuickDraw座???niChar??????????? SInt16 qd_x = CFSwapInt16BigToHost(attachment.getSInt16(0)); SInt16 qd_y = CFSwapInt16BigToHost(attachment.getSInt16(2)); int showLast = CFSwapInt16BigToHost(attachment.getSInt16(4)); @@ -208,14 +211,6 @@ return reply; } -void ServerMessageReceiver::suspendCandidatesWindow(const CppCFData& attachment) { - CandidatesManager::sharedManager().suspendWindow(CFSwapInt16BigToHost(attachment.getUInt16(0))); -} - -void ServerMessageReceiver::resumeCandidatesWindow(const CppCFData& attachment) { - CandidatesManager::sharedManager().resumeWindow(CFSwapInt16BigToHost(attachment.getUInt16(0))); -} - void ServerMessageReceiver::closeCandidatesWindow(const CppCFData& attachment) { CandidatesManager::sharedManager().closeWindow(CFSwapInt16BigToHost(attachment.getUInt16(0))); } @@ -225,7 +220,7 @@ std::string query = data.toStdString(kCFStringEncodingUTF8).substr(1); - // ????? + // ??????? if(data[0] == '+') { int pos1 = query.find_first_of(SKK_MSG_DELIMITER); int pos2 = query.find_first_of(SKK_MSG_DELIMITER, pos1 + 1); @@ -245,6 +240,15 @@ } } +void ServerMessageReceiver::registerToggleEntry(const CppCFData& attachment) { + CppCFString data(attachment.getData()); + + std::string key = data.toStdString(kCFStringEncodingUTF8); + + // ????????????? + DictionarySet::theInstance().RegisterOkuriNasi(key, ""); +} + void ServerMessageReceiver::removeThisFromUserDic(const CppCFData& attachment) { CppCFString data(attachment.getData()); @@ -255,7 +259,7 @@ std::string key = query.substr(0, pos); std::string kanji = query.substr(pos + 1); - // ????? + // ??????? if(data[0] == '+') { DictionarySet::theInstance().RemoveOkuriAri(key, kanji); } else { From t-suwa users.sourceforge.jp Thu Aug 16 19:58:27 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Thu, 16 Aug 2007 19:58:27 +0900 Subject: [aquaskk-changes 330] CVS update: AquaSKK/AquaSKK.pbproj Message-ID: <20070816105827.8826C2AC01D@users.sourceforge.jp> Index: AquaSKK/AquaSKK.pbproj/project.pbxproj diff -u AquaSKK/AquaSKK.pbproj/project.pbxproj:1.8.2.1 AquaSKK/AquaSKK.pbproj/project.pbxproj:1.8.2.2 --- AquaSKK/AquaSKK.pbproj/project.pbxproj:1.8.2.1 Mon Nov 27 15:16:27 2006 +++ AquaSKK/AquaSKK.pbproj/project.pbxproj Thu Aug 16 19:58:27 2007 @@ -54,8 +54,6 @@ F5DEF61A0357174401CD0AD3, F5DEF6150357002B01CD0AD3, F5DEF6160357002B01CD0AD3, - F522695402FB791D01CD4EB1, - F522695302FB791D01CD4EB1, F50D1141034C4ED001CD4EB1, F5BADAD302F4D02501CD4EB1, F5BADAD202F4D02501CD4EB1, @@ -964,7 +962,6 @@ 849E109E055023C8009C3C25, 849E109F055023C8009C3C25, 849E10A3055023C8009C3C25, - 849E10A4055023C8009C3C25, 849E10A6055023C8009C3C25, 849E10A7055023C8009C3C25, 849E10A8055023C8009C3C25, @@ -1016,12 +1013,6 @@ settings = { }; }; - 849E10A4055023C8009C3C25 = { - fileRef = F522695402FB791D01CD4EB1; - isa = PBXBuildFile; - settings = { - }; - }; 849E10A6055023C8009C3C25 = { fileRef = F5FDA61702FF7DA801CD4EB1; isa = PBXBuildFile; @@ -1142,7 +1133,6 @@ files = ( 849E10BF055023C8009C3C25, 849E10C3055023C8009C3C25, - 849E10C4055023C8009C3C25, 849E10C6055023C8009C3C25, 849E10C7055023C8009C3C25, 849E10C8055023C8009C3C25, @@ -1182,12 +1172,6 @@ settings = { }; }; - 849E10C4055023C8009C3C25 = { - fileRef = F522695302FB791D01CD4EB1; - isa = PBXBuildFile; - settings = { - }; - }; 849E10C6055023C8009C3C25 = { fileRef = F5FDA61802FF7DA801CD4EB1; isa = PBXBuildFile; @@ -2312,22 +2296,6 @@ refType = 4; sourceTree = ""; }; - F522695302FB791D01CD4EB1 = { - fileEncoding = "-2147483647"; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - path = OkuriganaEntry.cpp; - refType = 4; - sourceTree = ""; - }; - F522695402FB791D01CD4EB1 = { - fileEncoding = "-2147483647"; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = OkuriganaEntry.h; - refType = 4; - sourceTree = ""; - }; F5238B2802F2EFCC01CD4EB1 = { fileEncoding = "-2147483647"; isa = PBXFileReference; From t-suwa users.sourceforge.jp Fri Aug 17 18:19:02 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 18:19:02 +0900 Subject: [aquaskk-changes 331] CVS update: AquaSKK/proj Message-ID: <20070817091902.23DA02AC06A@users.sourceforge.jp> From t-suwa users.sourceforge.jp Fri Aug 17 18:20:22 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 18:20:22 +0900 Subject: [aquaskk-changes 332] CVS update: AquaSKK/proj/AquaSKK.xcodeproj Message-ID: <20070817092022.358AE2AC073@users.sourceforge.jp> From t-suwa users.sourceforge.jp Fri Aug 17 21:47:27 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 21:47:27 +0900 Subject: [aquaskk-changes 333] CVS update: AquaSKK Message-ID: <20070817124727.0DE462AC07D@users.sourceforge.jp> Index: AquaSKK/AquaSKKServer.mm diff -u AquaSKK/AquaSKKServer.mm:1.2.2.4 AquaSKK/AquaSKKServer.mm:1.2.2.5 --- AquaSKK/AquaSKKServer.mm:1.2.2.4 Sat Feb 3 17:52:48 2007 +++ AquaSKK/AquaSKKServer.mm Fri Aug 17 21:47:26 2007 @@ -1,10 +1,10 @@ /* -*- objc -*- - $Id: AquaSKKServer.mm,v 1.2.2.4 2007/02/03 08:52:48 t-suwa Exp $ + $Id: AquaSKKServer.mm,v 1.2.2.5 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ */ #include +#include #include "BIMClientServer.h" #include "AquaSKKServer.h" #include "PreferencesController.h" Index: AquaSKK/BIM.cpp diff -u AquaSKK/BIM.cpp:1.14.2.2 AquaSKK/BIM.cpp:1.14.2.3 --- AquaSKK/BIM.cpp:1.14.2.2 Sat Feb 3 17:52:48 2007 +++ AquaSKK/BIM.cpp Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* - $Id: BIM.cpp,v 1.14.2.2 2007/02/03 08:52:48 t-suwa Exp $ + $Id: BIM.cpp,v 1.14.2.3 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -27,8 +27,6 @@ #include #include -#include "SKKPreProcessor.h" - #include "BIM.h" #include "BIMInputEvents.h" #include "BIMClientServer.h" @@ -153,10 +151,7 @@ menuEventSpec.eventKind = kEventProcessCommand; result = InstallMenuEventHandler(gPencilMenu, NewEventHandlerUPP(BIMPencilMenuEventHandler), 1, &menuEventSpec, NULL, NULL); - - // ???????????- SKKPreProcessor::theInstance().Initialize(); - + // ????????????? ClientMessageReceiver::start(kAquaSKKClientRunLoopMode); @@ -200,8 +195,6 @@ (**outSessionHandle)->terminate_disabled = false; (**outSessionHandle)->asciimode_startup = ClientConfiguration::theInstance().isAsciiModeStartup(); (**outSessionHandle)->imsession_input_mode = new IMSessionInputMode(*outSessionHandle); - (**outSessionHandle)->engine = new SKKEngine(); - (**outSessionHandle)->engine->Start(); // ???????????????? InitializeKeyboardLayout(); @@ -226,7 +219,6 @@ } delete (*inSessionHandle)->imsession_input_mode; - delete (*inSessionHandle)->engine; DisposeHandle((Handle)inSessionHandle ); } @@ -264,20 +256,6 @@ ComponentResult BIMSessionEvent(BIMSessionHandle inSessionHandle, EventRef inEventRef) { SKKEvent event(inEventRef); - SKKEventParam param = SKKPreProcessor::theInstance().Execute(inEventRef); - if(param.event != SKK_NULL) { - SKKEngine* engine = (*inSessionHandle)->engine; - - int serial = engine->Result(); - - engine->Dispatch(SKKEnvironment::Event(param.event, param)); - - // ?????H - if(serial != engine->Result()) { - std::cerr << "SKKEngine: handled" << std::endl; - } - } - if(0) { event.Dump(); } Index: AquaSKK/BIM.h diff -u AquaSKK/BIM.h:1.4.2.1 AquaSKK/BIM.h:1.4.2.2 --- AquaSKK/BIM.h:1.4.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/BIM.h Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* - $Id: BIM.h,v 1.4.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: BIM.h,v 1.4.2.2 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -25,7 +25,6 @@ #define INC__BIM__ #include "SKKEvent.h" -#include "SKKEngine.h" enum { kHiraganaIconIndex = 0, @@ -47,7 +46,6 @@ bool terminate_disabled; // true ?? terminate ??? bool asciimode_startup; class IMSessionInputMode* imsession_input_mode; - SKKEngine* engine; }; typedef struct BIMSessionRecord BIMSessionRecord; Index: AquaSKK/BIMComponent.cpp diff -u AquaSKK/BIMComponent.cpp:1.6.2.1 AquaSKK/BIMComponent.cpp:1.6.2.2 --- AquaSKK/BIMComponent.cpp:1.6.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/BIMComponent.cpp Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* - $Id: BIMComponent.cpp,v 1.6.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: BIMComponent.cpp,v 1.6.2.2 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -372,16 +372,11 @@ BIMLog("Can't SetTextServiceProperty[%d]\n", tag); return tsmComponentPropertyUnsupportedErr; } - CFStringRef newMode = (CFStringRef)value; IMSessionInputMode* inputMode = (*(BIMSessionHandle)inSessionHandle)->imsession_input_mode; - SKKEngine* engine = (*(BIMSessionHandle)inSessionHandle)->engine; - SKKEventParam param; // ?????????? if(CFStringCompare(newMode, kTextServiceInputModeJapanese, 0) == 0) { - param.event = SKK_HIRAKANA; - engine->Dispatch(SKKEnvironment::Event(param.event, param)); if(!inputMode->isHiraganaInputMode()) { inputMode->goHiraganaInputMode(); return noErr; @@ -389,8 +384,6 @@ } if(CFStringCompare(newMode, kTextServiceInputModeJapaneseKatakana, 0) == 0) { - param.event = SKK_KATAKANA; - engine->Dispatch(SKKEnvironment::Event(param.event, param)); if(!inputMode->isZenKataInputMode()) { inputMode->goZenKataInputMode(); return noErr; @@ -398,8 +391,6 @@ } if(CFStringCompare(newMode, kTextServiceInputModeJapaneseHalfWidthKana, 0) == 0) { - param.event = SKK_JISX0201KANA; - engine->Dispatch(SKKEnvironment::Event(param.event, param)); if(!inputMode->isHanKataInputMode()) { inputMode->goHanKataInputMode(); return noErr; @@ -407,8 +398,6 @@ } if(CFStringCompare(newMode, kTextServiceInputModeJapaneseFullWidthRoman, 0) == 0) { - param.event = SKK_JISX0208LATIN; - engine->Dispatch(SKKEnvironment::Event(param.event, param)); if(!inputMode->isZenAscInputMode()) { inputMode->goZenAscInputMode(); return noErr; @@ -416,8 +405,6 @@ } if(CFStringCompare(newMode, kTextServiceInputModeRoman, 0) == 0) { - param.event = SKK_ASCII; - engine->Dispatch(SKKEnvironment::Event(param.event, param)); if(!inputMode->isHanAscInputMode()) { inputMode->goHanAscInputMode(); return noErr; Index: AquaSKK/CandidatesManager.mm diff -u AquaSKK/CandidatesManager.mm:1.6.2.2 AquaSKK/CandidatesManager.mm:1.6.2.3 --- AquaSKK/CandidatesManager.mm:1.6.2.2 Thu Aug 16 19:58:18 2007 +++ AquaSKK/CandidatesManager.mm Fri Aug 17 21:47:26 2007 @@ -1,10 +1,10 @@ /* -*- objc -*- - $Id: CandidatesManager.mm,v 1.6.2.2 2007/08/16 10:58:18 t-suwa Exp $ + $Id: CandidatesManager.mm,v 1.6.2.3 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,9 +21,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#import -#import "CandidatesView.h" -#import "CandidatesWindowController.h" +#include +#include +#include "CandidatesView.h" +#include "CandidatesWindowController.h" #include "BIMClientServer.h" #include "CppCFString.h" Index: AquaSKK/ClientConnectionFactory.cpp diff -u AquaSKK/ClientConnectionFactory.cpp:1.3 AquaSKK/ClientConnectionFactory.cpp:1.3.2.1 --- AquaSKK/ClientConnectionFactory.cpp:1.3 Wed Apr 26 22:36:12 2006 +++ AquaSKK/ClientConnectionFactory.cpp Fri Aug 17 21:47:26 2007 @@ -1,10 +1,10 @@ /* - $Id: ClientConnectionFactory.cpp,v 1.3 2006/04/26 13:36:12 t-suwa Exp $ + $Id: ClientConnectionFactory.cpp,v 1.3.2.1 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2006 Tomotaka SUWA + Copyright (C) 2006-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #include #include "BIMClientServer.h" #include "CppCFString.h" Index: AquaSKK/DictionarySet.cpp diff -u AquaSKK/DictionarySet.cpp:1.5.2.8 AquaSKK/DictionarySet.cpp:1.5.2.9 --- AquaSKK/DictionarySet.cpp:1.5.2.8 Thu Aug 16 19:58:18 2007 +++ AquaSKK/DictionarySet.cpp Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* - $Id: DictionarySet.cpp,v 1.5.2.8 2007/08/16 10:58:18 t-suwa Exp $ + $Id: DictionarySet.cpp,v 1.5.2.9 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include "BIMClientServer.h" Index: AquaSKK/PreferenceKeys.h diff -u AquaSKK/PreferenceKeys.h:1.3.2.1 AquaSKK/PreferenceKeys.h:1.3.2.2 --- AquaSKK/PreferenceKeys.h:1.3.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/PreferenceKeys.h Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* -*- objc -*- - $Id: PreferenceKeys.h,v 1.3.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: PreferenceKeys.h,v 1.3.2.2 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -42,6 +42,4 @@ extern NSString* KEY_skkserv_port; extern NSString* KEY_skkserv_localonly; -extern NSString* KEY_use_brand_new_engine; - #endif Index: AquaSKK/PreferencesController.mm diff -u AquaSKK/PreferencesController.mm:1.8.2.4 AquaSKK/PreferencesController.mm:1.8.2.5 --- AquaSKK/PreferencesController.mm:1.8.2.4 Sat Feb 3 17:52:48 2007 +++ AquaSKK/PreferencesController.mm Fri Aug 17 21:47:26 2007 @@ -1,10 +1,10 @@ /* -*- objc -*- - $Id: PreferencesController.mm,v 1.8.2.4 2007/02/03 08:52:48 t-suwa Exp $ + $Id: PreferencesController.mm,v 1.8.2.5 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA + Copyright (C) 2005-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ */ #include +#include #include "PreferencesController.h" #include "BIMClientServer.h" @@ -49,8 +50,6 @@ NSString* KEY_skkserv_port = @"skkserv_port"; NSString* KEY_skkserv_localonly = @"skkserv_localonly"; -NSString* KEY_use_brand_new_engine = @"use_brand_new_engine"; - // ???? NSString* path_for_library = @"Library/AquaSKK"; NSString* path_for_dictionary_set = @"DictionarySet.plist"; Index: AquaSKK/SKKConfig.cpp diff -u AquaSKK/SKKConfig.cpp:1.2.2.1 AquaSKK/SKKConfig.cpp:1.2.2.2 --- AquaSKK/SKKConfig.cpp:1.2.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKConfig.cpp Fri Aug 17 21:47:26 2007 @@ -1,9 +1,9 @@ /* - $Id: SKKConfig.cpp,v 1.2.2.1 2007/02/03 07:53:29 t-suwa Exp $ + $Id: SKKConfig.cpp,v 1.2.2.2 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. - Copyright (C) 2006 Tomotaka SUWA + Copyright (C) 2006-2007 Tomotaka SUWA This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ * */ +#include #include #include #include Index: AquaSKK/ServerMessageReceiver.mm diff -u AquaSKK/ServerMessageReceiver.mm:1.7.2.5 AquaSKK/ServerMessageReceiver.mm:1.7.2.6 --- AquaSKK/ServerMessageReceiver.mm:1.7.2.5 Thu Aug 16 19:58:18 2007 +++ AquaSKK/ServerMessageReceiver.mm Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* -*- objc -*- - $Id: ServerMessageReceiver.mm,v 1.7.2.5 2007/08/16 10:58:18 t-suwa Exp $ + $Id: ServerMessageReceiver.mm,v 1.7.2.6 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -22,6 +22,7 @@ */ #include +#include #include "CandidatesView.h" #include "CandidatesWindowController.h" #include "PreferenceKeys.h" Index: AquaSKK/skkserv.cpp diff -u AquaSKK/skkserv.cpp:1.3.2.6 AquaSKK/skkserv.cpp:1.3.2.7 --- AquaSKK/skkserv.cpp:1.3.2.6 Sat Feb 3 17:52:48 2007 +++ AquaSKK/skkserv.cpp Fri Aug 17 21:47:26 2007 @@ -1,5 +1,5 @@ /* - $Id: skkserv.cpp,v 1.3.2.6 2007/02/03 08:52:48 t-suwa Exp $ + $Id: skkserv.cpp,v 1.3.2.7 2007/08/17 12:47:26 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include From t-suwa users.sourceforge.jp Fri Aug 17 21:47:34 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 21:47:34 +0900 Subject: [aquaskk-changes 334] CVS update: AquaSKK/AquaSKK.xcodeproj Message-ID: <20070817124734.F19F62AC080@users.sourceforge.jp> Index: AquaSKK/AquaSKK.xcodeproj/project.pbxproj diff -u AquaSKK/AquaSKK.xcodeproj/project.pbxproj:1.10.2.6 AquaSKK/AquaSKK.xcodeproj/project.pbxproj:1.10.2.7 --- AquaSKK/AquaSKK.xcodeproj/project.pbxproj:1.10.2.6 Sat Feb 3 18:03:54 2007 +++ AquaSKK/AquaSKK.xcodeproj/project.pbxproj Fri Aug 17 21:47:34 2007 @@ -123,9 +123,7 @@ D3332EFE086DB196001C607D /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3332EFD086DB196001C607D /* CoreServices.framework */; }; D3332EFF086DB196001C607D /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3332EFD086DB196001C607D /* CoreServices.framework */; }; D33EC09E0970E61C00305791 /* AquaSKK-InputMethod.tif in Resources */ = {isa = PBXBuildFile; fileRef = D33EC09D0970E61C00305791 /* AquaSKK-InputMethod.tif */; }; - D3454AAA0B4E35E100AEEC97 /* SKKPreProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = D3454AA70B4E35E100AEEC97 /* SKKPreProcessor.h */; }; D34ED13109A7862400F0986F /* PreferenceKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = D34ED13009A7862400F0986F /* PreferenceKeys.h */; }; - D35523040B50A8D0007ECFCB /* SKK.h in Headers */ = {isa = PBXBuildFile; fileRef = D35523030B50A8D0007ECFCB /* SKK.h */; }; D35D2BC909A2363D004409C7 /* KotoeriDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D35D2BC709A2363D004409C7 /* KotoeriDictionary.cpp */; }; D35D2BCA09A2363D004409C7 /* KotoeriDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = D35D2BC809A2363D004409C7 /* KotoeriDictionary.h */; }; D35D2BCD09A23931004409C7 /* DictionarySet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D35D2BCB09A23931004409C7 /* DictionarySet.cpp */; }; @@ -144,13 +142,6 @@ D369F6BF0A1A29C800784FF4 /* SKKChar.h in Headers */ = {isa = PBXBuildFile; fileRef = D369F6BB0A1A29C800784FF4 /* SKKChar.h */; }; D369F6C00A1A29C800784FF4 /* SKKEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = D369F6BC0A1A29C800784FF4 /* SKKEvent.h */; }; D369F6CE0A1A2D9C00784FF4 /* config in Resources */ = {isa = PBXBuildFile; fileRef = D369F6CD0A1A2D9C00784FF4 /* config */; }; - D385B8890B4E3C2D004203B8 /* keymap.conf in Resources */ = {isa = PBXBuildFile; fileRef = D385B8880B4E3C2D004203B8 /* keymap.conf */; }; - D38706A50B508270004B2C37 /* SKKInputKeymap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D38706A30B508270004B2C37 /* SKKInputKeymap.cpp */; }; - D38706A60B508270004B2C37 /* SKKInputKeymap.h in Headers */ = {isa = PBXBuildFile; fileRef = D38706A40B508270004B2C37 /* SKKInputKeymap.h */; }; - D398B6D80B50AC450082DEC1 /* SKKConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D398B6D40B50AC450082DEC1 /* SKKConverter.cpp */; }; - D398B6D90B50AC450082DEC1 /* SKKConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = D398B6D50B50AC450082DEC1 /* SKKConverter.h */; }; - D398B6DA0B50AC450082DEC1 /* SKKFrontEnd.h in Headers */ = {isa = PBXBuildFile; fileRef = D398B6D60B50AC450082DEC1 /* SKKFrontEnd.h */; }; - D398B6DB0B50AC450082DEC1 /* SKKFrontEnd.mm in Sources */ = {isa = PBXBuildFile; fileRef = D398B6D70B50AC450082DEC1 /* SKKFrontEnd.mm */; }; D39D4D6409A61FD70075FE25 /* skkserv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D39D4D6109A61FD70075FE25 /* skkserv.cpp */; }; D39D4D6509A61FD70075FE25 /* skkserv.h in Headers */ = {isa = PBXBuildFile; fileRef = D39D4D6209A61FD70075FE25 /* skkserv.h */; }; D39D4D6609A61FD70075FE25 /* socketstream.h in Headers */ = {isa = PBXBuildFile; fileRef = D39D4D6309A61FD70075FE25 /* socketstream.h */; }; @@ -158,15 +149,7 @@ D3A9A94309B0964F00DF29C8 /* ProxyDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = D3A9A94109B0964F00DF29C8 /* ProxyDictionary.h */; }; D3B8C26F099ED66600C08C41 /* DictArrayController.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B8C26D099ED66600C08C41 /* DictArrayController.h */; }; D3B8C270099ED66600C08C41 /* DictArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3B8C26E099ED66600C08C41 /* DictArrayController.m */; }; - D3C19A3E0B478873000FC898 /* SKKContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19A3D0B478873000FC898 /* SKKContext.h */; }; - D3C19A5D0B47E683000FC898 /* GenericStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19A2D0B4777CE000FC898 /* GenericStateMachine.h */; }; - D3C19A5E0B47E683000FC898 /* SKKEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19A150B47665C000FC898 /* SKKEnvironment.h */; }; - D3C19A5F0B47E683000FC898 /* SKKEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3C19A140B47665C000FC898 /* SKKEnvironment.cpp */; }; - D3C19A600B47E683000FC898 /* SKKContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19A3D0B478873000FC898 /* SKKContext.h */; }; - D3C19A610B47E683000FC898 /* SKKEventParam.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19A160B47665C000FC898 /* SKKEventParam.h */; }; - D3C19A640B47E683000FC898 /* SKKBackEnd.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19A2F0B4777CE000FC898 /* SKKBackEnd.h */; }; - D3C19A650B47E683000FC898 /* SKKBackEnd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3C19A2E0B4777CE000FC898 /* SKKBackEnd.cpp */; }; - D3C19ACD0B4B2DED000FC898 /* SKKEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C19ACC0B4B2DED000FC898 /* SKKEngine.h */; }; + D3C19A3E0B478873000FC898 /* (null) in Headers */ = {isa = PBXBuildFile; }; D3C7B8AF0B47534900D2B4E0 /* Principal.nib in Resources */ = {isa = PBXBuildFile; fileRef = D3C7B8AD0B47534900D2B4E0 /* Principal.nib */; }; D3D0C6F8086EECA800319954 /* AsciiConversionMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3D0C6F6086EECA800319954 /* AsciiConversionMode.cpp */; }; D3D0C6F9086EECA800319954 /* AsciiConversionMode.h in Headers */ = {isa = PBXBuildFile; fileRef = D3D0C6F7086EECA800319954 /* AsciiConversionMode.h */; }; @@ -240,9 +223,7 @@ D3332EF8086DB18B001C607D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; D3332EFD086DB196001C607D /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; D33EC09D0970E61C00305791 /* AquaSKK-InputMethod.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-InputMethod.tif"; path = "Icons/AquaSKK-InputMethod.tif"; sourceTree = ""; }; - D3454AA70B4E35E100AEEC97 /* SKKPreProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKKPreProcessor.h; sourceTree = ""; }; D34ED13009A7862400F0986F /* PreferenceKeys.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = PreferenceKeys.h; sourceTree = ""; }; - D35523030B50A8D0007ECFCB /* SKK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKK.h; sourceTree = ""; }; D35D2BC709A2363D004409C7 /* KotoeriDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.cpp.cpp; path = KotoeriDictionary.cpp; sourceTree = ""; }; D35D2BC809A2363D004409C7 /* KotoeriDictionary.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = KotoeriDictionary.h; sourceTree = ""; }; D35D2BCB09A23931004409C7 /* DictionarySet.cpp */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.cpp.cpp; path = DictionarySet.cpp; sourceTree = ""; }; @@ -256,13 +237,6 @@ D369F6BB0A1A29C800784FF4 /* SKKChar.h */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = sourcecode.c.h; path = SKKChar.h; sourceTree = ""; }; D369F6BC0A1A29C800784FF4 /* SKKEvent.h */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = sourcecode.c.h; path = SKKEvent.h; sourceTree = ""; }; D369F6CD0A1A2D9C00784FF4 /* config */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = text; name = config; path = Resources/config; sourceTree = ""; }; - D385B8880B4E3C2D004203B8 /* keymap.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = keymap.conf; path = Resources/keymap.conf; sourceTree = ""; }; - D38706A30B508270004B2C37 /* SKKInputKeymap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SKKInputKeymap.cpp; sourceTree = ""; }; - D38706A40B508270004B2C37 /* SKKInputKeymap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKKInputKeymap.h; sourceTree = ""; }; - D398B6D40B50AC450082DEC1 /* SKKConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SKKConverter.cpp; sourceTree = ""; }; - D398B6D50B50AC450082DEC1 /* SKKConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKKConverter.h; sourceTree = ""; }; - D398B6D60B50AC450082DEC1 /* SKKFrontEnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKKFrontEnd.h; sourceTree = ""; }; - D398B6D70B50AC450082DEC1 /* SKKFrontEnd.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SKKFrontEnd.mm; sourceTree = ""; }; D39D4D6109A61FD70075FE25 /* skkserv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = skkserv.cpp; sourceTree = ""; }; D39D4D6209A61FD70075FE25 /* skkserv.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = skkserv.h; sourceTree = ""; }; D39D4D6309A61FD70075FE25 /* socketstream.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = socketstream.h; sourceTree = ""; }; @@ -270,14 +244,6 @@ D3A9A94109B0964F00DF29C8 /* ProxyDictionary.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = ProxyDictionary.h; sourceTree = ""; }; D3B8C26D099ED66600C08C41 /* DictArrayController.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = DictArrayController.h; sourceTree = ""; }; D3B8C26E099ED66600C08C41 /* DictArrayController.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; path = DictArrayController.m; sourceTree = ""; }; - D3C19A140B47665C000FC898 /* SKKEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SKKEnvironment.cpp; sourceTree = ""; }; - D3C19A150B47665C000FC898 /* SKKEnvironment.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = SKKEnvironment.h; sourceTree = ""; }; - D3C19A160B47665C000FC898 /* SKKEventParam.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = SKKEventParam.h; sourceTree = ""; }; - D3C19A2D0B4777CE000FC898 /* GenericStateMachine.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = GenericStateMachine.h; sourceTree = ""; }; - D3C19A2E0B4777CE000FC898 /* SKKBackEnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SKKBackEnd.cpp; sourceTree = ""; }; - D3C19A2F0B4777CE000FC898 /* SKKBackEnd.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = SKKBackEnd.h; sourceTree = ""; }; - D3C19A3D0B478873000FC898 /* SKKContext.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = SKKContext.h; sourceTree = ""; }; - D3C19ACC0B4B2DED000FC898 /* SKKEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKKEngine.h; sourceTree = ""; }; D3C7B8AE0B47534900D2B4E0 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = Japanese.lproj/Principal.nib; sourceTree = ""; }; D3D0C6F6086EECA800319954 /* AsciiConversionMode.cpp */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.cpp.cpp; path = AsciiConversionMode.cpp; sourceTree = ""; }; D3D0C6F7086EECA800319954 /* AsciiConversionMode.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = AsciiConversionMode.h; sourceTree = ""; }; @@ -491,7 +457,6 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( - D385B8880B4E3C2D004203B8 /* keymap.conf */, D369F6CD0A1A2D9C00784FF4 /* config */, D308EC0A09DDED7400CCECDD /* kana-rule-list */, D308EC0B09DDED7400CCECDD /* okuri-list */, @@ -510,7 +475,6 @@ 08FB77ADFE841716C02AAC07 /* Source */ = { isa = PBXGroup; children = ( - D3C19A130B476628000FC898 /* SKKEngine */, D3EDBC060A23611F000C4C11 /* NumericConverter.cpp */, D3EDBC070A23611F000C4C11 /* NumericConverter.h */, D3D0C6F6086EECA800319954 /* AsciiConversionMode.cpp */, @@ -580,29 +544,6 @@ name = Icons; sourceTree = ""; }; - D3C19A130B476628000FC898 /* SKKEngine */ = { - isa = PBXGroup; - children = ( - D35523030B50A8D0007ECFCB /* SKK.h */, - D3C19ACC0B4B2DED000FC898 /* SKKEngine.h */, - D3C19A2D0B4777CE000FC898 /* GenericStateMachine.h */, - D3C19A150B47665C000FC898 /* SKKEnvironment.h */, - D3C19A140B47665C000FC898 /* SKKEnvironment.cpp */, - D3C19A3D0B478873000FC898 /* SKKContext.h */, - D3C19A160B47665C000FC898 /* SKKEventParam.h */, - D3454AA70B4E35E100AEEC97 /* SKKPreProcessor.h */, - D38706A40B508270004B2C37 /* SKKInputKeymap.h */, - D38706A30B508270004B2C37 /* SKKInputKeymap.cpp */, - D398B6D50B50AC450082DEC1 /* SKKConverter.h */, - D398B6D40B50AC450082DEC1 /* SKKConverter.cpp */, - D398B6D60B50AC450082DEC1 /* SKKFrontEnd.h */, - D398B6D70B50AC450082DEC1 /* SKKFrontEnd.mm */, - D3C19A2F0B4777CE000FC898 /* SKKBackEnd.h */, - D3C19A2E0B4777CE000FC898 /* SKKBackEnd.cpp */, - ); - name = SKKEngine; - sourceTree = ""; - }; F51C27800319F9CD01CD4EB1 /* Candidates Window */ = { isa = PBXGroup; children = ( @@ -681,18 +622,7 @@ D369F6BE0A1A29C800784FF4 /* SKKEvent.h in Headers */, D3EDBC090A23611F000C4C11 /* NumericConverter.h in Headers */, D32121960B17D6B5007DEBD0 /* jconv.h in Headers */, - D3C19A3E0B478873000FC898 /* SKKContext.h in Headers */, - D3C19A5D0B47E683000FC898 /* GenericStateMachine.h in Headers */, - D3C19A5E0B47E683000FC898 /* SKKEnvironment.h in Headers */, - D3C19A600B47E683000FC898 /* SKKContext.h in Headers */, - D3C19A610B47E683000FC898 /* SKKEventParam.h in Headers */, - D3C19A640B47E683000FC898 /* SKKBackEnd.h in Headers */, - D3C19ACD0B4B2DED000FC898 /* SKKEngine.h in Headers */, - D3454AAA0B4E35E100AEEC97 /* SKKPreProcessor.h in Headers */, - D38706A60B508270004B2C37 /* SKKInputKeymap.h in Headers */, - D35523040B50A8D0007ECFCB /* SKK.h in Headers */, - D398B6D90B50AC450082DEC1 /* SKKConverter.h in Headers */, - D398B6DA0B50AC450082DEC1 /* SKKFrontEnd.h in Headers */, + D3C19A3E0B478873000FC898 /* (null) in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -816,7 +746,6 @@ D308EC1609DDED7400CCECDD /* tut-config in Resources */, D308EC1709DDED7400CCECDD /* tut-kana-rule-list in Resources */, D369F6CE0A1A2D9C00784FF4 /* config in Resources */, - D385B8890B4E3C2D004203B8 /* keymap.conf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -887,11 +816,6 @@ D369F6B60A1A27ED00784FF4 /* SKKConfig.cpp in Sources */, D3EDBC080A23611F000C4C11 /* NumericConverter.cpp in Sources */, D32121930B17D6A0007DEBD0 /* jconv.cpp in Sources */, - D3C19A5F0B47E683000FC898 /* SKKEnvironment.cpp in Sources */, - D3C19A650B47E683000FC898 /* SKKBackEnd.cpp in Sources */, - D38706A50B508270004B2C37 /* SKKInputKeymap.cpp in Sources */, - D398B6D80B50AC450082DEC1 /* SKKConverter.cpp in Sources */, - D398B6DB0B50AC450082DEC1 /* SKKFrontEnd.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From t-suwa users.sourceforge.jp Fri Aug 17 21:57:12 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 21:57:12 +0900 Subject: [aquaskk-changes 335] CVS update: AquaSKK Message-ID: <20070817125712.A24252AC07A@users.sourceforge.jp> Index: AquaSKK/SKK.h diff -u AquaSKK/SKK.h:1.1.2.1 AquaSKK/SKK.h:removed --- AquaSKK/SKK.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKK.h Fri Aug 17 21:57:12 2007 @@ -1,32 +0,0 @@ -/* -*- C++ -*- - $Id: SKK.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKK__ -#define INC__SKK__ - -namespace SKK { - enum InputMode { - Hirakana, Katakana, Jisx0201Kana, Jisx0208Latin, Ascii - }; -} - -#endif Index: AquaSKK/SKKBackEnd.cpp diff -u AquaSKK/SKKBackEnd.cpp:1.1.2.1 AquaSKK/SKKBackEnd.cpp:removed --- AquaSKK/SKKBackEnd.cpp:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKBackEnd.cpp Fri Aug 17 21:57:12 2007 @@ -1,79 +0,0 @@ -/* -*- C++ -*- - $Id: SKKBackEnd.cpp,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include - -#include "SKKBackEnd.h" -#include "CppCFData.h" -#include "CppCFString.h" -#include "ServerConnection.h" -#include "ServerConnectionFactory.h" -#include "BIMClientServer.h" - -// ?? -bool SKKBackEnd::Complete(const std::string& entry, std::vector& result) { - CppCFString query(entry.c_str(), kCFStringEncodingUTF8); - CppCFData data; - data.own(query.toCFData()); - - ServerConnection connection = ServerConnectionFactory::theInstance().newConnection(); - CppCFString str(connection.send(kSKKFetchCompletions, data, kAquaSKKServerRunLoopMode).getData()); - - std::string tmp = str.toStdString(kCFStringEncodingUTF8); - std::replace(tmp.begin(), tmp.end(), (char)SKK_MSG_DELIMITER, ' '); - std::stringstream buf(tmp); - - result.clear(); - while(buf >> tmp) { - result.push_back(tmp); - } - - return !result.empty(); -} - -// ? -bool SKKBackEnd::FindOkuriAri(const std::string& entry, std::vector& result) { - return true; -} - -bool SKKBackEnd::FindOkuriNasi(const std::string& entry, std::vector& result) { - return true; -} - -// ?? -bool SKKBackEnd::RegisterOkuriAri(const std::string& entry, const std::string& candidate, const std::string& okuri) { - return true; -} - -bool SKKBackEnd::RegisterOkuriNasi(const std::string& entry, const std::string& candidate) { - return true; -} - -// ??? -bool SKKBackEnd::RemoveOkuriAri(const std::string& entry, const std::string& candidate) { - return true; -} - -bool SKKBackEnd::RemoveOkuriNasi(const std::string& entry, const std::string& candidate) { - return true; -} Index: AquaSKK/SKKBackEnd.h diff -u AquaSKK/SKKBackEnd.h:1.1.2.1 AquaSKK/SKKBackEnd.h:removed --- AquaSKK/SKKBackEnd.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKBackEnd.h Fri Aug 17 21:57:12 2007 @@ -1,48 +0,0 @@ -/* -*- C++ -*- - $Id: SKKBackEnd.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKBackEnd__ -#define INC__SKKBackEnd__ - -#include -#include - -// ????????-class SKKBackEnd { -public: - // ?? - bool Complete(const std::string& entry, std::vector& result); - - // ? - bool FindOkuriAri(const std::string& entry, std::vector& result); - bool FindOkuriNasi(const std::string& entry, std::vector& result); - - // ?? - bool RegisterOkuriAri(const std::string& entry, const std::string& candidate, const std::string& okuri); - bool RegisterOkuriNasi(const std::string& entry, const std::string& candidate); - - // ??? - bool RemoveOkuriAri(const std::string& entry, const std::string& candidate); - bool RemoveOkuriNasi(const std::string& entry, const std::string& candidate); -}; - -#endif Index: AquaSKK/SKKContext.h diff -u AquaSKK/SKKContext.h:1.1.2.1 AquaSKK/SKKContext.h:removed --- AquaSKK/SKKContext.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKContext.h Fri Aug 17 21:57:12 2007 @@ -1,66 +0,0 @@ -/* -*- C++ -*- - $Id: SKKContext.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKContext__ -#define INC__SKKContext__ - -#include -#include -#include "utf8iterator.h" - -// ????????? -struct SKKContext { - std::string prompt; // ???????- std::string input; // ???????? - std::string fixed; // 確????????- std::string display; // ?????????- int caret_position; // ?????????? - - SKKContext() {} - SKKContext(const std::string& entry) : prompt(entry) {} - - bool pop(bool for_fixed) { - if(!input.empty()) { - input.erase(input.end() - 1); - return true; - } else { - if(for_fixed) { - if(!fixed.empty()) { - utf8iterator iter(fixed); - fixed.erase(iter.last()); - return true; - } - } - } - - return false; - } - - void clear() { - input.clear(); - fixed.clear(); - display.clear(); - caret_position = 0; - } -}; - -#endif Index: AquaSKK/SKKConverter.cpp diff -u AquaSKK/SKKConverter.cpp:1.1.2.1 AquaSKK/SKKConverter.cpp:removed --- AquaSKK/SKKConverter.cpp:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKConverter.cpp Fri Aug 17 21:57:12 2007 @@ -1,195 +0,0 @@ -/* -*- C++ -*- - $Id: SKKConverter.cpp,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include "jconv.h" -#include "SKKConverter.h" - -// ====================================================================== -// ???????????-// ====================================================================== - -void unescape_string(std::string& str) { - static struct { - std::string from; - const char* to; - } escape[] = { - { ",", "," }, - { "&space;", " " }, - { "♯", "#" }, - { "", 0x00 }, - }; - - for(int i = 0; escape[i].to != 0x00; ++ i) { - std::string& target = escape[i].from; - for(unsigned pos = str.find(target); pos != std::string::npos; pos = str.find(target)) { - str.replace(pos, target.length(), escape[i].to); - } - } -} - -// ====================================================================== -// ???????????? -// ====================================================================== - -SKKConverter::SKKConverter() { -} - -SKKConverter& SKKConverter::theInstance() { - static SKKConverter obj; - return obj; -} - -void SKKConverter::Initialize(const std::string& path) { - std::ifstream rule_list(path.c_str()); - std::string str; - - if(!rule_list) { - std::cerr << "SKKConverter::Initialize(): can't open file [" << path << "]" << std::endl; - return; - } - - // ?????- root_ = Node(); - - while(std::getline(rule_list, str)) { - if(str.empty() || str[0] == '#') continue; - - // EUC-JP ??UTF-8 ??- std::string utf8; - jconv::convert_eucj_to_utf8(str, utf8); - - // ?????',' ???????????解???- std::replace(utf8.begin(), utf8.end(), ',', ' '); - std::stringstream buf(utf8); - - // ??????????- Node rule; - if(buf >> rule.label >> rule.hirakana >> rule.katakana >> rule.jisx0201kana) { - // ???????次?????? - buf >> rule.next; - - // ??????????????? - unescape_string(rule.label); - unescape_string(rule.hirakana); - unescape_string(rule.katakana); - unescape_string(rule.jisx0201kana); - unescape_string(rule.next); - - Node* current = &root_; - unsigned depth; - - // ??辿?(????????) - for(depth = 0; depth < rule.label.size() - 1; ++ depth) { - if(!current->match(rule.label[depth], current)) { - current = current->add(rule.label.substr(depth, 1)); - } - } - - // ???追? - rule.label = rule.label[depth]; - current->add(rule); - } else { - // ????? std::cerr << "SKKConverter::Initialize(): invalid rule [" << utf8 << "]" << std::endl; - } - } -} - -SKKConverter::trace SKKConverter::traverse(Node& node, std::string& str, Node*& leaf, unsigned depth) { - // [1] ??????ex. "k" ??"ch" ???) - if(depth == str.size()) { - return SHORT; - } - - // ???????? - if(node.match(str[depth], leaf)) { - // ??辿???????帰???- if(leaf->has_child()) { - return traverse(*leaf, str, leaf, depth + 1); - } - - // [2] ???? - str = str.substr(depth + 1); - return MATCH; - } - - // [3] ?????(ex. "kb" ??"chm" ???) - if(depth > 0) { - // ??????????????? - str = str.substr(depth); - - // ????????????????????????????????????- if(!leaf->empty()) { - return MATCH; - } - - return RESTART; - } - - // [4] ???????????????????????- return SHIFT; -} - -std::string SKKConverter::Execute(SKK::InputMode mode, const std::string& str, std::string& next) { - std::string in(str); - std::string out; - Node* leaf; - - while(!in.empty()) { - switch(traverse(root_, in, leaf)) { - case SHORT: // ?????- next = in; - break; - case MATCH: // ?? - next = leaf->next; - switch(mode) { - case SKK::Hirakana: - out += leaf->hirakana; - break; - case SKK::Katakana: - out += leaf->katakana; - break; - case SKK::Jisx0201Kana: - out += leaf->jisx0201kana; - break; - default: - std::cerr << "SKKConverter::Execute(): invalid mode [" << mode << "]" << std::endl; - break; - } - continue; - case RESTART: // ????? - continue; - case SHIFT: // ????- out += in[0]; - in = in.substr(1); - continue; - } - - // SHORT ???????????- break; - } - - return out; -} Index: AquaSKK/SKKConverter.h diff -u AquaSKK/SKKConverter.h:1.1.2.1 AquaSKK/SKKConverter.h:removed --- AquaSKK/SKKConverter.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKConverter.h Fri Aug 17 21:57:12 2007 @@ -1,84 +0,0 @@ -/* -*- C++ -*- - $Id: SKKConverter.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKConverter__ -#define INC__SKKConverter__ - -#include -#include -#include "SKK.h" - -class SKKConverter { - struct Node { - std::string label; - std::string hirakana; - std::string katakana; - std::string jisx0201kana; - std::string next; - std::vector childs; - - Node(const std::string& node = "") : label(node), hirakana(""), katakana(""), jisx0201kana(""), next("") {} - - Node* add(const Node& leaf) { - childs.push_back(leaf); - return &childs.back(); - } - - bool match(char ch, Node*& leaf) { - for(unsigned i = 0; i < childs.size(); ++ i) { - if(ch == childs[i].label[0]) { - leaf = &childs[i]; - return true; - } - } - - return false; - } - - bool has_child() const { - return !childs.empty(); - } - - bool empty() const { - return hirakana.empty() && katakana.empty() && jisx0201kana.empty(); - } - }; - - Node root_; - - enum trace { - SHORT, MATCH, RESTART, SHIFT - }; - - trace traverse(Node& node, std::string& in, Node*& leaf, unsigned depth = 0); - - SKKConverter(); - SKKConverter(const SKKConverter&); - -public: - static SKKConverter& theInstance(); - void Initialize(const std::string& path); - bool Execute(SKK::InputMode mode, const std::string& in, std::string& out, std::string& next); - std::string Execute(SKK::InputMode mode, const std::string& in, std::string& next); -}; - -#endif Index: AquaSKK/SKKEngine.h diff -u AquaSKK/SKKEngine.h:1.1.2.1 AquaSKK/SKKEngine.h:removed --- AquaSKK/SKKEngine.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKEngine.h Fri Aug 17 21:57:12 2007 @@ -1,89 +0,0 @@ -/* -*- C++ -*- - $Id: SKKEngine.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKEngine__ -#define INC__SKKEngine__ - -#include "SKKEnvironment.h" - -template -struct DebugInvoker { - typedef typename StateContainer::Handler Handler; - typedef typename StateContainer::Event Event; - typedef typename StateContainer::State State; - - StateContainer& instance_; - -public: - DebugInvoker(StateContainer& obj) : instance_(obj) {} - - State operator()(const Handler handler, const Event& event) { - assert(handler != 0 && "Invalid handler address."); - -#define DEFINE_State(arg) { &SKKEnvironment::arg, #arg } - const static struct { - Handler handler; - const char* name; - } states[] = { - DEFINE_State(KanaInput), - DEFINE_State(Hirakana), - DEFINE_State(Katakana), - DEFINE_State(Jisx0201Kana), - DEFINE_State(LatinInput), - DEFINE_State(Ascii), - DEFINE_State(Jisx0208Latin), - DEFINE_State(PreConversion), - DEFINE_State(EntryInput), - DEFINE_State(Japanese), - DEFINE_State(Abbreviation), - DEFINE_State(EntryCompletion), - DEFINE_State(SelectCandidate), - DEFINE_State(Inline), - DEFINE_State(Window), - DEFINE_State(EntryRemove), - { 0, 0x00 } - }; -#undef DEFINE_State(arg) - - static char* system_event[] = { "<>", "<>", "<>" }; - - if(event != 0) { - for(int i = 0; states[i].handler != 0; ++ i) { - if(handler == states[i].handler) { - std::cerr << "SKKEnvironment::" << states[i].name << ": "; - if(event < 0) { - std::cerr << system_event[event + 3] << std::endl; - } else { - std::cerr << event.Param().dump() << std::endl; - } - break; - } - } - } - return (instance_.*handler)(event); - } -}; - -//typedef GenericStateMachine SKKEngine; -typedef GenericStateMachine SKKEngine; - -#endif Index: AquaSKK/SKKEnvironment.cpp diff -u AquaSKK/SKKEnvironment.cpp:1.1.2.1 AquaSKK/SKKEnvironment.cpp:removed --- AquaSKK/SKKEnvironment.cpp:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKEnvironment.cpp Fri Aug 17 21:57:12 2007 @@ -1,754 +0,0 @@ -/* -*- C++ -*- - $Id: SKKEnvironment.cpp,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include "SKKConfig.h" -#include "SKKEnvironment.h" - -typedef SKKEnvironment::Event Event; -typedef SKKEnvironment::State State; - -// ====================================================================== -// ???????????-// ====================================================================== -bool forKanaInput(const Event& event) { - const SKKEventParam& param = event.Param(); - - return - param.IsDirect() || - param.IsUpperCases() || - param.IsSwitchToAscii() || - param.IsSwitchToJisx0208Latin() || - param.IsEnterJapanese() || - param.IsEnterAbbrev(); -} - -// ====================================================================== -// ?????????-// ====================================================================== -SKKEnvironment::SKKEnvironment() : converter_(SKKConverter::theInstance()) {} - -// ====================================================================== -// ???????????? -// ====================================================================== -SKKContext& SKKEnvironment::topContext() { - if(stack_.empty()) { - return top_; - } - return stack_.back(); -} - -void SKKEnvironment::pushContext() { - stack_.push_back(topContext().display); -} - -void SKKEnvironment::commitContext() { - if(!stack_.empty()) { - std::string fixed = topContext().fixed; - rollbackContext(); - topContext().fixed += fixed; - } -} - -void SKKEnvironment::rollbackContext() { - if(!stack_.empty()) { - stack_.pop_back(); - } -} - -// ====================================================================== -// ??????????? -// ====================================================================== -void SKKEnvironment::push(unsigned char ch, bool entry) { - std::string& input = topContext().input; - std::string& out = topContext().fixed; - std::string next; - - serial_.update(); - - input += ch; - - do { - if(mode_ == SKK::Ascii) { - out += input; - input = next; - break; - } - - if(mode_ == SKK::Jisx0208Latin) { - out = input; // XXX ????? - input = next; - break; - } - - // ???????????- if(entry) { - out += converter_.Execute(mode_, input, next); - } else { - out = converter_.Execute(mode_, input, next); - } - - input = next; - } while(0); - - std::cerr << "input=" << input << ", fixed=" << out << std::endl; -} - -void SKKEnvironment::pop(bool for_fixed) { - if(topContext().pop(for_fixed)) { - serial_.update(); - std::cerr << "input=" << topContext().input << ", fixed=" << topContext().fixed << std::endl; - } -} - -void SKKEnvironment::clear() { - topContext().clear(); -} - -// ====================================================================== -// level 1???????-// ====================================================================== -State SKKEnvironment::KanaInput(const Event& event) { - switch(event) { - case ENTRY_EVENT: - // ??????????????????調? - return 0; - case INIT_EVENT: - return State::ShallowHistory(&SKKEnvironment::Hirakana); - case EXIT_EVENT: - return State::SaveHistory(); - case SKK_ENTER: - // ??????????? - if(!stack_.empty()) { - // ???????????? - if(0) { - // ?????????????? - } - return State::DeepHistory(&SKKEnvironment::SelectCandidate); - } - return 0; - case SKK_LEFT: - case SKK_RIGHT: - case SKK_UP: - case SKK_DOWN: - // ??????????? - if(!stack_.empty()) { - // 移? - } else { - // 確? - } - return 0; - case SKK_BACKSPACE: - pop(); - return 0; - case SKK_CANCEL: - // ???????????????????- if(!stack_.empty()) { - return State::DeepHistory(&SKKEnvironment::SelectCandidate); - } - return 0; - case SKK_ASCII: - return State::Transition(&SKKEnvironment::Ascii); - case SKK_JISX0208LATIN: - return State::Transition(&SKKEnvironment::Jisx0208Latin); - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - // ??????? - if(param.IsDirect()) { - return 0; - } - - if(param.IsSwitchToAscii()) { - push(param.code); - if(topContext().input[0] == param.code) { - return State::Transition(&SKKEnvironment::Ascii); - } - } - - if(param.IsSwitchToJisx0208Latin()) { - push(param.code); - if(topContext().input[0] == param.code) { - return State::Transition(&SKKEnvironment::Jisx0208Latin); - } - } - - if(param.IsUpperCases()) { - topContext().fixed.clear(); // XXX ??????- compose_push(std::tolower(param.code)); - // ??????????? - return State::Transition(&SKKEnvironment::Japanese); - } - - if(param.IsEnterJapanese()) { // Shift-Q - return State::Transition(&SKKEnvironment::Japanese); - } - - if(param.IsEnterAbbrev()) { // '/' - push(param.code); - if(topContext().fixed[0] == param.code) { - return State::Transition(&SKKEnvironment::Abbreviation); - } - } - } while(0); - } - - return State::Super(&SKKEnvironment::TopState); -} - -// ====================================================================== -// level 2 of KanaInput???????-// ====================================================================== -State SKKEnvironment::Hirakana(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - clear(); - mode_ = SKK::Hirakana; - return 0; - case SKK_KATAKANA: - return State::Transition(&SKKEnvironment::Katakana); - case SKK_JISX0201KANA: - return State::Transition(&SKKEnvironment::Jisx0201Kana); - case SKK_CHAR: - // ????????????- if(forKanaInput(event)) { - break; - } - - do { - const SKKEventParam& param = event.Param(); - - if(param.IsToggleKana()) { - return State::Transition(&SKKEnvironment::Katakana); - } - - if(param.IsToggleJisx0201Kana()) { - return State::Transition(&SKKEnvironment::Jisx0201Kana); - } - - // ????? - push(param.code); - - return 0; - } while(0); - } - - return State::Super(&SKKEnvironment::KanaInput); -} - -// ====================================================================== -// level 2 of KanaInput??????-// ====================================================================== -State SKKEnvironment::Katakana(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - clear(); - mode_ = SKK::Katakana; - return 0; - case SKK_HIRAKANA: - return State::Transition(&SKKEnvironment::Hirakana); - case SKK_JISX0201KANA: - return State::Transition(&SKKEnvironment::Jisx0201Kana); - case SKK_CHAR: - // ????????????- if(forKanaInput(event)) { - break; - } - - do { - const SKKEventParam& param = event.Param(); - - if(param.IsToggleKana()) { - return State::Transition(&SKKEnvironment::Hirakana); - } - - if(param.IsToggleJisx0201Kana()) { - return State::Transition(&SKKEnvironment::Jisx0201Kana); - } - - // ????? - push(param.code); - - return 0; - } while(0); - } - - return State::Super(&SKKEnvironment::KanaInput); -} - -// ====================================================================== -// level 2 of KanaInput????????-// ====================================================================== -State SKKEnvironment::Jisx0201Kana(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - clear(); - mode_ = SKK::Jisx0201Kana; - return 0; - case SKK_HIRAKANA: - return State::Transition(&SKKEnvironment::Hirakana); - case SKK_CHAR: - // ????????????- if(forKanaInput(event)) { - break; - } - - do { - const SKKEventParam& param = event.Param(); - - if(param.IsToggleKana() || param.IsToggleJisx0201Kana()) { - return State::Transition(&SKKEnvironment::Hirakana); - } - - // ????? - push(param.code); - - return 0; - } while(0); - } - - return State::Super(&SKKEnvironment::KanaInput); -} - -// ====================================================================== -// level 1?atin ?? -// ====================================================================== -State SKKEnvironment::LatinInput(const Event& event) { - switch(event) { - case SKK_JMODE: - case SKK_HIRAKANA: - return State::Transition(&SKKEnvironment::Hirakana); - } - - return State::Super(&SKKEnvironment::TopState); -} - -// ====================================================================== -// level 2 of LatinInput?SCII -// ====================================================================== -State SKKEnvironment::Ascii(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - clear(); - mode_ = SKK::Ascii; - return 0; - } - - return State::Super(&SKKEnvironment::LatinInput); -} - -// ====================================================================== -// level 2 of LatinInput??????-// ====================================================================== -State SKKEnvironment::Jisx0208Latin(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - clear(); - mode_ = SKK::Jisx0208Latin; - return 0; - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsDirect()) { - // ????- return 0; - } - - // ????? - push(param.code); - - return 0; - } while(0); - } - - return State::Super(&SKKEnvironment::LatinInput); -} - -// ====================================================================== -// level 1????? -// ====================================================================== -State SKKEnvironment::PreConversion(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - return 0; - case SKK_ENTER: - // ?????????????- case SKK_JMODE: - // ?????確? - return State::Transition(&SKKEnvironment::KanaInput); - case SKK_LEFT: - case SKK_RIGHT: - case SKK_UP: - case SKK_DOWN: - // ?? - return 0; - case SKK_CANCEL: - // ???????- return State::Transition(&SKKEnvironment::KanaInput); - case SKK_TAB: - // ??????- completions_.clear(); - if(backend_.Complete(topContext().fixed, completions_)) { - return State::Transition(&SKKEnvironment::EntryCompletion); - } - break; - case SKK_BACKSPACE: - serial_.update(); - - // ?????? - compose_pop(); - - // ???????????????- if(compose_empty()) { - return State::Transition(&SKKEnvironment::KanaInput); - } - return 0; - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsNextCandidate()) { - // ??- return State::Transition(&SKKEnvironment::SelectCandidate); - } - } while(0); - } - - return State::Super(&SKKEnvironment::TopState); -} - -// ====================================================================== -// level 2 of PreConversion????????-// ====================================================================== -State SKKEnvironment::EntryInput(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - return 0; - case EXIT_EVENT: - return State::SaveHistory(); - case SKK_PASTE: - // ????? - serial_.update(); - return 0; - } - - return State::Super(&SKKEnvironment::PreConversion); -} - -// ====================================================================== -// level 3 of EntryInput????? -// ====================================================================== -State SKKEnvironment::Japanese(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - return 0; - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsNextCandidate()) { - // ???????- break; - } - if(param.IsDirect()) { - // ????????- return 0; - } - if(param.IsSwitchToAscii()) { - // 確? - return State::Transition(&SKKEnvironment::Ascii); - } - if(param.IsSwitchToJisx0208Latin()) { - // 確? - return State::Transition(&SKKEnvironment::Jisx0208Latin); - } - if(param.IsToggleKana()) { - // ????????- return State::Transition(&SKKEnvironment::KanaInput); - } - if(param.IsEnterJapanese()) { - // 確???????己??- return State::Transition(&SKKEnvironment::Japanese); - } - if(param.IsUpperCases()) { - // ????????? - return 0; - } - - // ????????- compose_push(param.code); - - return 0; - } while(0); - } - - return State::Super(&SKKEnvironment::EntryInput); -} - -// ====================================================================== -// level 3 of EntryInput???表?-// ====================================================================== -State SKKEnvironment::Abbreviation(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - clear(); - mode_ = SKK::Ascii; - break; - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsNextCandidate()) { - // ???????- break; - } - - if(param.IsToggleJisx0201Kana()) { - // ????????- return 0; - } - - // ????? - compose_push(param.code); - - return 0; - } while(0); - } - - return State::Super(&SKKEnvironment::EntryInput); -} - -// ====================================================================== -// level 2 of PreConversion???????-// ====================================================================== -State SKKEnvironment::EntryCompletion(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - // ???????????? - std::cerr << "completion=" << completions_.item() << std::endl; - return 0; - case SKK_TAB: - // 次???? - serial_.update(); - std::cerr << "completion=" << completions_.next().item() << std::endl; - return 0; - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsNextCandidate()) { - // ???????- break; - } - - serial_.update(); - - if(param.IsNextCompletion()) { - // 次???? - std::cerr << "completion=" << completions_.next().item() << std::endl; - return 0; - } - if(param.IsPrevCompletion()) { - // ?????? - std::cerr << "completion=" << completions_.prev().item() << std::endl; - return 0; - } - - // ?????以?????????- return State::DeepForward(&SKKEnvironment::EntryInput); - } while(0); - } - - return State::Super(&SKKEnvironment::PreConversion); -} - -// ====================================================================== -// level 1??????-// ====================================================================== -State SKKEnvironment::SelectCandidate(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - // ? - return 0; - case INIT_EVENT: - return State::Initial(&SKKEnvironment::Inline); - case EXIT_EVENT: - return State::SaveHistory(); - case SKK_ENTER: - // ???????? - case SKK_JMODE: - // ???????確? - commitContext(); - // ??????????? - return State::Transition(&SKKEnvironment::KanaInput); - case SKK_CANCEL: - // ??????????? - return State::DeepHistory(&SKKEnvironment::EntryInput); - case SKK_CHAR: - // ???????確? - // ??????????? - commitContext(); - // ????????- return State::Forward(&SKKEnvironment::KanaInput); - } - - return State::Super(&SKKEnvironment::TopState); -} - -// ====================================================================== -// level 2 of SelectCandidate??????? -// ====================================================================== -State SKKEnvironment::Inline(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - // 次?????????? - if(0) { - // ?????????????- pushContext(); - return State::Transition(&SKKEnvironment::Hirakana); - } - // ??????- return 0; - case SKK_BACKSPACE: - // 確??????????- commitContext(); - return State::Transition(&SKKEnvironment::Hirakana); - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsNextCandidate()) { - // ?????????? n ???以??- if(0) { - return State::Transition(&SKKEnvironment::Window); - } - return State::Transition(&SKKEnvironment::Inline); - } - - if(param.IsPrevCandidate()) { - // ???????? - return State::Transition(&SKKEnvironment::Inline); - } - - if(param.IsRemoveTrigger()) { - return State::Transition(&SKKEnvironment::EntryRemove); - } - } while(0); - } - - return State::Super(&SKKEnvironment::SelectCandidate); -} - -// ====================================================================== -// level 2 of SelectCandidate???????? -// ====================================================================== -State SKKEnvironment::Window(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - // 次?????????? - if(0) { - // ?????????????- pushContext(); - return State::Transition(&SKKEnvironment::Hirakana); - } - // ??????- return 0; - case SKK_BACKSPACE: - // ??????????n ???????- if(0) { - return State::Transition(&SKKEnvironment::Inline); - } - return State::Transition(&SKKEnvironment::Window); - case SKK_CHAR: - do { - const SKKEventParam& param = event.Param(); - - if(param.IsNextCandidate()) { - // ?????????- return State::Transition(&SKKEnvironment::Window); - } - if(param.IsPrevCandidate()) { - // ??????????n ???????- if(0) { - return State::Transition(&SKKEnvironment::Inline); - } - return State::Transition(&SKKEnvironment::Window); - } - // ??????????? - if(0) { - // ??????????????確? - commitContext(); - return State::Transition(&SKKEnvironment::KanaInput); - } - } while(0); - } - - return State::Super(&SKKEnvironment::SelectCandidate); -} - -// ====================================================================== -// level 1??????-// ====================================================================== -State SKKEnvironment::EntryRemove(const Event& event) { - switch(event) { - case ENTRY_EVENT: - serial_.update(); - // ???????示???- return 0; - case SKK_YES: - // ?????? - return State::Transition(&SKKEnvironment::KanaInput); - case SKK_NO: - return State::Transition(&SKKEnvironment::Inline); - case SKK_ENTER: - if(0) { // yes - return State::Transition(&SKKEnvironment::KanaInput); - } - if(0) { // no - return State::Transition(&SKKEnvironment::Inline); - } - // ???????????? - return 0; - case SKK_CHAR: - if(0) { - // ENTER??????????????? - } - return 0; - } - - return State::Super(&SKKEnvironment::TopState); -} Index: AquaSKK/SKKEnvironment.h diff -u AquaSKK/SKKEnvironment.h:1.1.2.1 AquaSKK/SKKEnvironment.h:removed --- AquaSKK/SKKEnvironment.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKEnvironment.h Fri Aug 17 21:57:12 2007 @@ -1,159 +0,0 @@ -/* -*- C++ -*- - $Id: SKKEnvironment.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKEnvironment__ -#define INC__SKKEnvironment__ - -#include "SKK.h" -#include "GenericStateMachine.h" -#include "SKKEventParam.h" -#include "SKKContext.h" -#include "SKKConverter.h" -#include "SKKFrontEnd.h" -#include "SKKBackEnd.h" - -using namespace statemachinecxx_sourceforge_jp; - -class SerialNumber { - unsigned char value_; - -public: - SerialNumber() : value_(0) {} - operator int() const { - return value_; - } - void update() { - value_ = (value_ + 1) % 0xff; - } -}; - -template -class RingBuffer { - int pos_; - std::vector array_; - -public: - operator std::vector&() { - return array_; - } - const T& item() const { - return array_[pos_]; - } - T& item() { - return array_[pos_]; - } - void clear() { - pos_ = 0; - array_.clear(); - } - RingBuffer& next() { - pos_ = pos_ + 1 % array_.size(); - return *this; - } - RingBuffer& prev() { - if(pos_ == 0) { - pos_ = array_.size(); - } - pos_ = pos_ - 1 % array_.size(); - return *this; - } -}; - -struct SKKEnvironment { - DECLARE_StateContainer(SKKEnvironment, SKKEventParam, SerialNumber, KanaInput); - - SKKEnvironment(); - - const Output& Result() const { - return serial_; - } - - // level 1(initial state) - State KanaInput(const Event& event); - - // level 2(sub of KanaInput) - State Hirakana(const Event& event); - State Katakana(const Event& event); - State Jisx0201Kana(const Event& event); - - // level 1 - State LatinInput(const Event& event); - - // level2 (sub of LatinInput) - State Ascii(const Event& event); - State Jisx0208Latin(const Event& event); - - // level 1 - State PreConversion(const Event& event); - - // level 2(sub of PreConversion) - State EntryInput(const Event& event); - - // lelvel 3(sub of EntryInput) - State Japanese(const Event& event); - State Abbreviation(const Event& event); - - // level 2(sub of PreConversion) - State EntryCompletion(const Event& event); - - // level 1 - State SelectCandidate(const Event& event); - - // level 2(sub of SelectCandidate) - State Inline(const Event& event); - State Window(const Event& event); - - // level 1 - State EntryRemove(const Event& event); - -private: - SKK::InputMode mode_; - SKKContext top_; - std::vector stack_; - - SKKFrontEnd frontend_; - SKKBackEnd backend_; - SKKConverter& converter_; - SerialNumber serial_; - - RingBuffer completions_; - - // ====================================================================== - // ???????????? - // ====================================================================== - SKKContext& topContext(); - void pushContext(); - void commitContext(); - void rollbackContext(); - - // ====================================================================== - // ??????????? - // ====================================================================== - void push(unsigned char ch, bool entry = false); - void pop(bool entry = false); - inline void compose_push(unsigned char ch) { push(ch, true); } - inline void compose_pop() { pop(true); } - inline bool compose_empty() { return topContext().fixed.empty(); } - void clear(); -}; - -#endif Index: AquaSKK/SKKEventParam.h diff -u AquaSKK/SKKEventParam.h:1.1.2.1 AquaSKK/SKKEventParam.h:removed --- AquaSKK/SKKEventParam.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKEventParam.h Fri Aug 17 21:57:12 2007 @@ -1,134 +0,0 @@ -/* -*- C++ -*- - $Id: SKKEventParam.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKEventParam__ -#define INC__SKKEventParam__ - -#include -#include "GenericStateMachine.h" - -// ????????? -enum { - SKK_NULL = statemachinecxx_sourceforge_jp::USER_EVENT, // ??????????- SKK_JMODE, // Ctrl-J - SKK_ENTER, // Ctrl-M - SKK_BACKSPACE, // Ctrl-H - SKK_TAB, // Ctrl-I - SKK_CANCEL, // Ctrl-G - SKK_PASTE, // Ctrl-Y - SKK_LEFT, // ??- SKK_UP, // ??- SKK_RIGHT, // ??- SKK_DOWN, // ??- SKK_CHAR, // ????????????? - SKK_YES, // ?????? - SKK_NO, // ?????? - SKK_ON, // ?????? - SKK_OFF, // ?????? - SKK_HIRAKANA, // ??????????????- SKK_KATAKANA, // ???????????????- SKK_JISX0201KANA, // ???????????????- SKK_JISX0208LATIN, // ??????????????- SKK_ASCII // ???????ASCII??-}; - -// SKK_CHAR ?? -enum { - None, - Direct = 1, - UpperCases = 2, - ToggleKana = 4, - ToggleJisx0201Kana = 8, - SwitchToAscii = 16, - SwitchToJisx0208Latin = 32, - EnterJapanese = 64, - EnterAbbrev = 128, - NextCompletion = 256, - PrevCompletion = 512, - NextCandidate = 1024, - PrevCandidate = 2048, - RemoveTrigger = 4096 -}; - -// ???????????-struct SKKEventParam { - SKKEventParam() : event(0), code(0), attribute(0) {} - SKKEventParam(int e, unsigned char c, int a = None) : event(e), code(c), attribute(a) {} - const static SKKEventParam& Null() { static SKKEventParam null(SKK_NULL, 0, 0); return null; } - - int event; // ????(????????????? - unsigned char code; // ????????? - int attribute; // ???????? - - bool operator==(const SKKEventParam& rhs) const { - return (event == rhs.event && code == rhs.code && attribute == rhs.attribute); - } - - bool IsDirect() const { return attribute & Direct; } - bool IsUpperCases() const { return attribute & UpperCases; } - bool IsToggleKana() const { return attribute & ToggleKana; } - bool IsToggleJisx0201Kana() const { return attribute & ToggleJisx0201Kana; } - bool IsSwitchToAscii() const { return attribute & SwitchToAscii; } - bool IsSwitchToJisx0208Latin() const { return attribute & SwitchToJisx0208Latin; } - bool IsEnterJapanese() const { return attribute & EnterJapanese; } - bool IsEnterAbbrev() const { return attribute & EnterAbbrev; } - bool IsNextCompletion() const { return attribute & NextCompletion; } - bool IsPrevCompletion() const { return attribute & PrevCompletion; } - bool IsNextCandidate() const { return attribute & NextCandidate; } - bool IsPrevCandidate() const { return attribute & PrevCandidate; } - bool IsRemoveTrigger() const { return attribute & RemoveTrigger; } - - std::string dump() const { - const char* event_name[] = { - "SKK_NULL", - "SKK_JMODE", - "SKK_ENTER", - "SKK_BACKSPACE", - "SKK_TAB", - "SKK_CANCEL", - "SKK_PASTE", - "SKK_LEFT", - "SKK_UP", - "SKK_RIGHT", - "SKK_DOWN", - "SKK_CHAR", - "SKK_YES", - "SKK_NO", - "SKK_ON", - "SKK_OFF", - "SKK_HIRAKANA", - "SKK_KATAKANA", - "SKK_JISX0201KANA", - "SKK_JISX0208LATIN", - "SKK_ASCII" - }; - - std::stringstream buf; - buf << "event=" << event_name[event - SKK_NULL] << ", " - << "code=" << std::hex << (unsigned int)code << ", " - << "attr=" << std::dec << attribute; - - return buf.str(); - } -}; - -#endif Index: AquaSKK/SKKFrontEnd.h diff -u AquaSKK/SKKFrontEnd.h:1.1.2.1 AquaSKK/SKKFrontEnd.h:removed --- AquaSKK/SKKFrontEnd.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKFrontEnd.h Fri Aug 17 21:57:12 2007 @@ -1,82 +0,0 @@ -/* -*- C++ -*- - $Id: SKKFrontEnd.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKFrontEnd__ -#define INC__SKKFrontEnd__ - -#include -#include -#include "SKK.h" - -// ????????-struct SKKFrontEndInterface { - virtual ~SKKFrontEndInterface() {} - - // ???????- virtual void SelectInputMode(SKK::InputMode /* index */) {} - - // ?????? - virtual void ShowString(const std::string& /* str */) {} - - // 確??????- virtual void FixString(const std::string& /* str */) {} - - // ??? - virtual void Cancel() {} - - // ????? - virtual void ShowEntry(const std::string& /* entry */) {} - - // ??? - virtual void ShowCandidate(const std::string& /* candidate */) {} - - // ??????????- virtual void PrepareWindow(const std::string& /* labels */, const std::vector& /* candidates */) {} - virtual void ShowWindow(int /* index */) {} - virtual void CloseWindow() {} - - // ???????????????????????????- virtual int LastWindowIndex() { return 0; } - virtual int NumCandidatesInWindow(int /* index */) { return 0; } - - // ????? - virtual void AddEntry(const std::string& /* entry */) {} - - // ?????? - virtual void RemoveEntry(const std::string& /* entry */, const std::string& /* candidate */) {} - - // ?????????????? - virtual void ShowCompletion(const std::vector& /* completions */) {} - - // ???????????????- virtual void ShowMessage(const std::string& /* message */) {} -}; - -class SKKFrontEnd : public SKKFrontEndInterface { -public: - SKKFrontEnd(); - virtual ~SKKFrontEnd() {} - virtual void SelectInputMode(SKK::InputMode index); - virtual void Cancel(); -}; - -#endif Index: AquaSKK/SKKFrontEnd.mm diff -u AquaSKK/SKKFrontEnd.mm:1.1.2.1 AquaSKK/SKKFrontEnd.mm:removed --- AquaSKK/SKKFrontEnd.mm:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKFrontEnd.mm Fri Aug 17 21:57:12 2007 @@ -1,80 +0,0 @@ -/* -*- C++ -*- - $Id: SKKFrontEnd.mm,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include "SKKFrontEnd.h" -#include "BIM.h" -#include "BIMClientServer.h" -#include "BIMInputEvents.h" - -class AutoreleasePool { - NSAutoreleasePool* pool_; - -public: - AutoreleasePool() { - pool_ = [[NSAutoreleasePool alloc] init]; - } - - ~AutoreleasePool() { - [pool_ release]; - } -}; - -SKKFrontEnd::SKKFrontEnd() { - NSApplicationLoad(); -} - -void SKKFrontEnd::SelectInputMode(SKK::InputMode index) { - const CFStringRef inputModes[] = { - kTextServiceInputModeJapanese, - kTextServiceInputModeJapaneseKatakana, - kTextServiceInputModeJapaneseHalfWidthKana, - kTextServiceInputModeJapaneseFullWidthRoman, - kTextServiceInputModeRoman, - 0 - }; - - // BIM.r ?????- ComponentDescription cd; - cd.componentType = 'tsvc'; - cd.componentSubType = 'inpm'; - cd.componentManufacturer = 'askk'; - cd.componentFlags = 0; - cd.componentFlagsMask = 0; - - TSMSelectInputMode(FindNextComponent(0, &cd), inputModes[index]); -} - -void SKKFrontEnd::Cancel() { - AutoreleasePool pool; - - OffsetToPosParams params; - - memset(¶ms, 0x00, sizeof(params)); - BIMHandleOffsetToPos(¶ms); - - CGRect mainscreen = CGDisplayBounds(CGMainDisplayID()); - float cg_x = params.fReplyPoint.h; - float cg_y = mainscreen.size.height - params.fReplyPoint.v; - - NSShowAnimationEffect(NSAnimationEffectPoof, NSMakePoint(cg_x, cg_y), NSZeroSize, nil, 0, 0); -} Index: AquaSKK/SKKInputKeymap.cpp diff -u AquaSKK/SKKInputKeymap.cpp:1.1.2.2 AquaSKK/SKKInputKeymap.cpp:removed --- AquaSKK/SKKInputKeymap.cpp:1.1.2.2 Sat Feb 3 18:03:53 2007 +++ AquaSKK/SKKInputKeymap.cpp Fri Aug 17 21:57:12 2007 @@ -1,281 +0,0 @@ -/* -*- C++ -*- - $Id: SKKInputKeymap.cpp,v 1.1.2.2 2007/02/03 09:03:53 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include "SKKInputKeymap.h" - -enum { TYPE_EVENT, TYPE_ATTRIBUTE }; - -const struct { - int type; - int id; - const char* name; -} values[] = { - { TYPE_EVENT, SKK_JMODE, "SKK_JMODE" }, - { TYPE_EVENT, SKK_ENTER, "SKK_ENTER" }, - { TYPE_EVENT, SKK_BACKSPACE, "SKK_BACKSPACE" }, - { TYPE_EVENT, SKK_TAB, "SKK_TAB" }, - { TYPE_EVENT, SKK_CANCEL, "SKK_CANCEL" }, - { TYPE_EVENT, SKK_PASTE, "SKK_PASTE" }, - { TYPE_EVENT, SKK_LEFT, "SKK_LEFT" }, - { TYPE_EVENT, SKK_UP, "SKK_UP" }, - { TYPE_EVENT, SKK_RIGHT, "SKK_RIGHT" }, - { TYPE_EVENT, SKK_DOWN, "SKK_DOWN" }, - { TYPE_EVENT, SKK_CHAR, "SKK_CHAR" }, - { TYPE_EVENT, SKK_YES, "SKK_YES" }, - { TYPE_EVENT, SKK_NO, "SKK_NO" }, - { TYPE_ATTRIBUTE, Direct, "Direct" }, - { TYPE_ATTRIBUTE, UpperCases, "UpperCases" }, - { TYPE_ATTRIBUTE, ToggleKana, "ToggleKana" }, - { TYPE_ATTRIBUTE, ToggleJisx0201Kana, "ToggleJisx0201Kana" }, - { TYPE_ATTRIBUTE, SwitchToAscii, "SwitchToAscii" }, - { TYPE_ATTRIBUTE, SwitchToJisx0208Latin, "SwitchToJisx0208Latin" }, - { TYPE_ATTRIBUTE, EnterJapanese, "EnterJapanese" }, - { TYPE_ATTRIBUTE, EnterAbbrev, "EnterAbbrev" }, - { TYPE_ATTRIBUTE, NextCompletion, "NextCompletion" }, - { TYPE_ATTRIBUTE, PrevCompletion, "PrevCompletion" }, - { TYPE_ATTRIBUTE, NextCandidate, "NextCandidate" }, - { TYPE_ATTRIBUTE, PrevCandidate, "PrevCandidate" }, - { TYPE_ATTRIBUTE, RemoveTrigger, "RemoveTrigger" }, - { 0, 0, 0x00 } -}; - -int fetchIndex(const std::string& key) { - for(int i = 0; values[i].name != 0x00; ++ i) { - if(key == values[i].name) { - return i; - } - } - - return -1; -} - -void SKKInputKeymap::parse(const std::string& value, int index) { - std::string str(value); - - // ?????"::" ??????????- const std::string type_separator = "::"; - for(unsigned pos = str.find(type_separator); pos != std::string::npos; pos = str.find(type_separator)) { - str.replace(pos, type_separator.size(), " "); - } - std::stringstream buf(str); - - int code = 0; - int labels = 0; - while(buf >> str) { - if(str == "group") labels += LABEL_GROUP; - if(str == "ctrl") labels += LABEL_CTRL; - if(str == "ascii") labels += LABEL_ASCII; - if(str == "keycode") labels += LABEL_KEYCODE; - } - - if(labels & LABEL_ASCII && labels & LABEL_KEYCODE) { - std::cerr << "SKKInputKeymap::parse(): invalid syntax ignored [" - << values[index].name << "]" << std::endl; - return; - } - - // ???????? - if(!(labels & LABEL_GROUP)) { - code = get_code(str, labels); - store_state(code, labels, index); - } else { - // ???????????????? ',' ??????????- std::replace(str.begin(), str.end(), ',', ' '); - std::stringstream group_buf(str); - - while(group_buf >> str) { - // ?????????- unsigned pos = str.find_first_of('-'); - if(pos == std::string::npos) { - code = get_code(str, labels); - store_state(code, labels, index); - } else { - // from-to ????????????-' ??????????- str[pos] = ' '; - std::stringstream from_to(str); - - int from = 0; - int to = -1; - if(from_to >> str) { - from = get_code(str, labels); - } - if(from_to >> str) { - to = get_code(str, labels); - } - - if(!(from < to)) { - std::cerr << "SKKInputKeymap::parse(): invalid sequence [" - << values[index].name << "]" << std::endl; - continue; - } - - // ?????????? - for(int i = from; i < to + 1; ++ i) { - store_state(i, labels, index); - } - } - } - } -} - -int SKKInputKeymap::get_code(const std::string& str, int labels) { - std::stringstream buf(str); - int result; - - if(labels & (LABEL_ASCII | LABEL_KEYCODE)) { - buf >> std::hex >> result; - } else { - result = str[0]; - } - - return result; -} - -void SKKInputKeymap::store_state(int code, int labels, int index) { - int state; - - if(labels & LABEL_KEYCODE) { - state = KeyState::Keycode(code, labels & LABEL_CTRL); - } else { - state = KeyState::Ascii(code, labels & LABEL_CTRL); - } - - if(values[index].type == TYPE_EVENT) { - events_[state] = values[index].id; - } else { - events_[state] = SKK_CHAR; - attributes_[state] |= values[index].id; - } - -#if 0 - std::cerr <<"STORE: name=" << values[index].name << ", " - << "code=" << std::hex << code << ", " - << "keycode=" << std::boolalpha << keycode << ", " - << "ctrl=" << std::boolalpha << ctrl << std::endl; -#endif -} - -// keymap.conf ????込??-void SKKInputKeymap::Initialize(const std::string& path) { - std::ifstream config(path.c_str()); - - if(!config) { - std::cerr << "SKKInputKeymap::Initialize(): can't open file [" << path << "]" << std::endl; - return; - } - - std::string key; - std::string value; - - events_.clear(); - attributes_.clear(); - - while(config >> key) { - do { - // ??????????? - if(key.empty() || key[0] == '#') break; - - // ?????????? - int index = fetchIndex(key); - if(index < 0) { - std::cerr << "SKKInputKeymap::Initialize(): invalid key name[" << key << "]" << std::endl; - break; - } - - config >> value; - - // ?????"||" ???????- static const std::string separator = "||"; - for(unsigned pos = value.find(separator); pos != std::string::npos; pos = value.find(separator)) { - value.replace(pos, separator.size(), " "); - } - std::stringstream buf(value); - - // ?????????????- while(buf >> value) { - parse(value, index); - } - } while(0); - - // ??????????- config.ignore(0xff, '\n'); - } -} - -SKKEventParam SKKInputKeymap::Fetch(int ascii, int keycode, bool ctrl) { - SKKEventParam param; - Keymap* map; - Keymap::iterator iter; - - // ???????- param.code = ascii; - - // ????????- map = &events_; - do { - // keycode ??????????調????????) - iter = map->find(KeyState::Keycode(keycode, ctrl)); - if(iter != map->end()) { - param.event = iter->second; - break; - } - - // ascii ???? - iter = map->find(KeyState::Ascii(ascii, ctrl)); - if(iter != map->end()) { - param.event = iter->second; - break; - } - - // ????????- if(!ctrl) { - param.event = SKK_CHAR; - } else { - param.event = SKK_NULL; - } - } while(0); - - // SKK_CHAR ????????????調???- if(param.event == SKK_CHAR) { - map = &attributes_; - - do { - // keycode ????????調????????) - iter = map->find(KeyState::Keycode(keycode, ctrl)); - if(iter != map->end()) { - param.attribute = iter->second; - break; - } - - // ascii ?? - iter = map->find(KeyState::Ascii(ascii, ctrl)); - if(iter != map->end()) { - param.attribute = iter->second; - } - } while(0); - } - - return param; -} Index: AquaSKK/SKKInputKeymap.h diff -u AquaSKK/SKKInputKeymap.h:1.1.2.2 AquaSKK/SKKInputKeymap.h:removed --- AquaSKK/SKKInputKeymap.h:1.1.2.2 Sat Feb 3 18:03:53 2007 +++ AquaSKK/SKKInputKeymap.h Fri Aug 17 21:57:12 2007 @@ -1,67 +0,0 @@ -/* -*- C++ -*- - $Id: SKKInputKeymap.h,v 1.1.2.2 2007/02/03 09:03:53 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKInputKeymap__ -#define INC__SKKInputKeymap__ - -#include -#include -#include "SKKEventParam.h" - -// ????????-class SKKInputKeymap { - class KeyState { - int state_; - - public: - KeyState() : state_(0) {} - KeyState(int ascii, int keycode, bool ctrl) { - state_ = (0xff & ascii) | ((0xff & keycode) << 8) | (ctrl << 16); - } - static KeyState Keycode(int keycode, bool ctrl) { - return KeyState(0, keycode, ctrl); - } - static KeyState Ascii(int ascii, bool ctrl) { - return KeyState(ascii, 0, ctrl); - } - operator int() const { - return state_; - } - }; - - typedef std::map Keymap; - - Keymap events_; - Keymap attributes_; - - enum { LABEL_GROUP = 1, LABEL_CTRL = 2, LABEL_ASCII = 4, LABEL_KEYCODE = 8 }; - - void parse(const std::string& value, int index); - int get_code(const std::string& str, int labels); - void store_state(int code, int labels, int index); - -public: - void Initialize(const std::string& path); - SKKEventParam Fetch(int ascii, int keycode, bool ctrl); -}; - -#endif Index: AquaSKK/SKKPreProcessor.h diff -u AquaSKK/SKKPreProcessor.h:1.1.2.1 AquaSKK/SKKPreProcessor.h:removed --- AquaSKK/SKKPreProcessor.h:1.1.2.1 Sat Feb 3 16:53:29 2007 +++ AquaSKK/SKKPreProcessor.h Fri Aug 17 21:57:12 2007 @@ -1,106 +0,0 @@ -/* -*- C++ -*- - $Id: SKKPreProcessor.h,v 1.1.2.1 2007/02/03 07:53:29 t-suwa Exp $ - - MacOS X implementation of the SKK input method. - - Copyright (C) 2007 Tomotaka SUWA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef INC__SKKPreProcessor__ -#define INC__SKKPreProcessor__ - -#include -#include "SKKInputKeymap.h" -#include "SKKConfig.h" -#include "SKKConverter.h" - -// ??????????-class SKKPreProcessor { - SKKInputKeymap keymap_; - - SKKPreProcessor() {} - - // ====================================================================== - // Ctrl ?????????????????7bit ??????????????? - // http://developer.apple.com/qa/qa2005/qa1446.html - // ====================================================================== - char repair(unsigned int keycode, unsigned int kbdtype, unsigned int modifier, UniChar uc) const { - long smv = GetScriptManagerVariable(smKeyScript); - Handle uchrHandle = GetResource('uchr', GetScriptVariable(smv, smScriptKeys)); - UInt32 dummy = 0; - UCKeyTranslate((UCKeyboardLayout*)*uchrHandle, keycode, kUCKeyActionDisplay, - (modifier & ~controlKey) >> 8, kbdtype, kUCKeyTranslateNoDeadKeysMask, &dummy, 1, &dummy, &uc); - - return uc; - } - -public: - static SKKPreProcessor& theInstance() { - static SKKPreProcessor obj; - return obj; - } - - void Initialize() { - // ?????????????? - keymap_.Initialize(SKKConfig::ResourceDirectory() + "keymap.conf"); - keymap_.Initialize(SKKConfig::LibraryDirectory() + "keymap.conf"); - - // ?????- SKKConverter::theInstance().Initialize(SKKConfig::ResourceDirectory() + "kana-rule-list"); - SKKConverter::theInstance().Initialize(SKKConfig::LibraryDirectory() + "kana-rule-list"); - } - - SKKEventParam Execute(const EventRef event) { - switch(GetEventClass(event)) { - case kEventClassKeyboard: - break; - default: - return SKKEventParam::Null(); - } - - char charcode; - unsigned int modifier; - unsigned int keycode; - unsigned int kbdtype; - UniChar uc; - - switch(GetEventKind(event)) { - case kEventRawKeyDown: - case kEventRawKeyRepeat: - GetEventParameter(event, kEventParamKeyMacCharCodes, typeChar, 0, sizeof(charcode), 0, &charcode); - GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, 0, sizeof(modifier), 0, &modifier); - GetEventParameter(event, kEventParamKeyCode, typeUInt32, 0, sizeof(keycode), 0, &keycode); - GetEventParameter(event, kEventParamKeyUnicodes, typeUnicodeText, 0, sizeof(uc), 0, &uc); - GetEventParameter(event, kEventParamKeyboardType, typeUInt32, 0, sizeof(kbdtype), 0, &kbdtype); - break; - default: - return SKKEventParam::Null(); - } - - if(modifier & cmdKey) { - return SKKEventParam::Null(); - } - - if(modifier & controlKey) { - charcode = repair(keycode, modifier, kbdtype, uc); - } - - return keymap_.Fetch(charcode, keycode, modifier & controlKey); - } -}; - -#endif From t-suwa users.sourceforge.jp Fri Aug 17 21:58:31 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 21:58:31 +0900 Subject: [aquaskk-changes 336] CVS update: AquaSKK/Resources Message-ID: <20070817125831.2F59C2AC07A@users.sourceforge.jp> Index: AquaSKK/Resources/keymap.conf diff -u AquaSKK/Resources/keymap.conf:1.1.2.1 AquaSKK/Resources/keymap.conf:removed --- AquaSKK/Resources/keymap.conf:1.1.2.1 Sat Feb 3 16:53:31 2007 +++ AquaSKK/Resources/keymap.conf Fri Aug 17 21:58:31 2007 @@ -1,42 +0,0 @@ -### -### keymap.conf -### - -# ====================================================================== -# event section -# ====================================================================== - -SKK_JMODE ctrl::j -SKK_ENTER group::ascii::0x03,0x0a,0x0d||ctrl::m -SKK_TAB ascii::0x09||ctrl::i -SKK_BACKSPACE ascii::0x08 -SKK_BACKSPACE ctrl::h -SKK_CANCEL ctrl::g -SKK_PASTE ctrl::y -SKK_LEFT ascii::0x1c||ctrl::b -SKK_RIGHT ascii::0x1d||ctrl::f -SKK_UP ascii::0x1e||ctrl::p -SKK_DOWN ascii::0x1f||ctrl::n - -# ====================================================================== -# attribute section(for SKK_CHAR) -# ====================================================================== - -ToggleKana q -ToggleJisx0201Kana ctrl::q -SwitchToAscii l -SwitchToJisx0208Latin L - -EnterAbbrev / -EnterJapanese Q -#EnterJapanese keycode::0x66 # EISU -#EnterJapanese keycode::0x68 # KANA -NextCompletion . -PrevCompletion , -NextCandidate ascii::0x20 -PrevCandidate x -RemoveTrigger X - -UpperCases group::A-K,M-P,R-W,Z - -Direct group::keycode::0x41,0x43,0x45,0x4b,0x4e,0x51-0x59,0x5b,0x5c,0x5f From t-suwa users.sourceforge.jp Fri Aug 17 22:02:31 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 22:02:31 +0900 Subject: [aquaskk-changes 337] CVS update: AquaSKK/proj Message-ID: <20070817130231.22B572AC07A@users.sourceforge.jp> Index: AquaSKK/proj/AquaSKKInputMethod-Info.plist diff -u /dev/null AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.1 --- /dev/null Fri Aug 17 22:02:31 2007 +++ AquaSKK/proj/AquaSKKInputMethod-Info.plist Fri Aug 17 22:02:30 2007 @@ -0,0 +1,155 @@ + + + + + CFBundleDevelopmentRegion + Japanese + CFBundleExecutable + AquaSKKInputMethod + CFBundleGetInfoString + Copyright © 2002-2005 phonohawk + CFBundleIdentifier + jp.sourceforge.AquaSKKInputMethod + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + thng + CFBundleShortVersionString + brand-new-engine 0.1 + CFBundleSignature + askk + CFBundleVersion + 2007-08-16 + CSResourcesFileMapped + yes + tsInputMethodIconFileKey + AquaSKK-InputMethod.tif + ComponentInputModeDict + + tsInputModeListKey + + com.apple.inputmethod.Japanese + + tsInputModeAlternateMenuIconFileKey + AquaSKK-Hirakana.tif + tsInputModeDefaultStateKey + + tsInputModeIsVisibleKey + + tsInputModeJISKeyboardShortcutKey + 1 + tsInputModeKeyEquivalentKey + J + tsInputModeKeyEquivalentModifiersKey + 4096 + tsInputModeMenuIconFileKey + AquaSKK-Hirakana.tif + tsInputModePaletteIconFileKey + AquaSKK-Hirakana.tif + tsInputModePrimaryInScriptKey + + tsInputModeScriptKey + smJapanese + + com.apple.inputmethod.Japanese.FullWidthRoman + + tsInputModeAlternateMenuIconFileKey + AquaSKK-FullRoman.tif + tsInputModeDefaultStateKey + + tsInputModeIsVisibleKey + + tsInputModeJISKeyboardShortcutKey + 0 + tsInputModeKeyEquivalentKey + L + tsInputModeKeyEquivalentModifiersKey + 512 + tsInputModeMenuIconFileKey + AquaSKK-FullRoman.tif + tsInputModePaletteIconFileKey + AquaSKK-FullRoman.tif + tsInputModePrimaryInScriptKey + + tsInputModeScriptKey + smJapanese + + com.apple.inputmethod.Japanese.HalfWidthKana + + tsInputModeAlternateMenuIconFileKey + AquaSKK-HalfKatakana.tif + tsInputModeDefaultStateKey + + tsInputModeIsVisibleKey + + tsInputModeKeyEquivalentKey + Q + tsInputModeKeyEquivalentModifiersKey + 4096 + tsInputModeMenuIconFileKey + AquaSKK-HalfKatakana.tif + tsInputModePaletteIconFileKey + HalfKatakana.tif + tsInputModePrimaryInScriptKey + + tsInputModeScriptKey + smJapanese + + com.apple.inputmethod.Japanese.Katakana + + tsInputModeAlternateMenuIconFileKey + AquaSKK-Katakana.tif + tsInputModeDefaultStateKey + + tsInputModeIsVisibleKey + + tsInputModeJISKeyboardShortcutKey + 2 + tsInputModeKeyEquivalentKey + Q + tsInputModeKeyEquivalentModifiersKey + 0 + tsInputModeMenuIconFileKey + AquaSKK-Katakana.tif + tsInputModePaletteIconFileKey + AquaSKK-Katakana.tif + tsInputModePrimaryInScriptKey + + tsInputModeScriptKey + smJapanese + + com.apple.inputmethod.Roman + + tsInputModeAlternateMenuIconFileKey + AquaSKK-Roman.tif + tsInputModeDefaultStateKey + + tsInputModeIsVisibleKey + + tsInputModeJISKeyboardShortcutKey + 3 + tsInputModeKeyEquivalentKey + l + tsInputModeKeyEquivalentModifiersKey + 0 + tsInputModeMenuIconFileKey + AquaSKK-Roman.tif + tsInputModePaletteIconFileKey + AquaSKK-Roman.tif + tsInputModePrimaryInScriptKey + + tsInputModeScriptKey + smRoman + + + tsVisibleInputModeOrderedArrayKey + + com.apple.inputmethod.Japanese + com.apple.inputmethod.Japanese.Katakana + com.apple.inputmethod.Japanese.FullWidthRoman + com.apple.inputmethod.Japanese.HalfWidthKana + com.apple.inputmethod.Roman + + + + Index: AquaSKK/proj/AquaSKKServer-Info.plist diff -u /dev/null AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.1 --- /dev/null Fri Aug 17 22:02:31 2007 +++ AquaSKK/proj/AquaSKKServer-Info.plist Fri Aug 17 22:02:30 2007 @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + Japanese + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleGetInfoString + Copyright © 2005-2007, AquaSKK Project + CFBundleIdentifier + jp.sourceforge.AquaSKKServer + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + brand-new-engine 0.1 + CFBundleSignature + askk + CFBundleVersion + 2007-08-16 + NSMainNibFile + Principal + NSPrincipalClass + NSApplication + + From t-suwa users.sourceforge.jp Fri Aug 17 22:02:38 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 22:02:38 +0900 Subject: [aquaskk-changes 338] CVS update: AquaSKK/proj/AquaSKK.xcodeproj Message-ID: <20070817130238.E20AE2AC07D@users.sourceforge.jp> Index: AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj diff -u /dev/null AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.1 --- /dev/null Fri Aug 17 22:02:38 2007 +++ AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj Fri Aug 17 22:02:38 2007 @@ -0,0 +1,1220 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + D37894580C752CAC00BE9E85 /* CppCFData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894440C752CAC00BE9E85 /* CppCFData.cpp */; }; + D37894590C752CAC00BE9E85 /* CppCFData.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894450C752CAC00BE9E85 /* CppCFData.h */; }; + D378945A0C752CAC00BE9E85 /* CppCFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894460C752CAC00BE9E85 /* CppCFString.cpp */; }; + D378945B0C752CAC00BE9E85 /* CppCFString.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894470C752CAC00BE9E85 /* CppCFString.h */; }; + D378945C0C752CAC00BE9E85 /* CppMessagePortConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894480C752CAC00BE9E85 /* CppMessagePortConnection.cpp */; }; + D378945D0C752CAC00BE9E85 /* CppMessagePortConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894490C752CAC00BE9E85 /* CppMessagePortConnection.h */; }; + D378945E0C752CAC00BE9E85 /* CppMessagePortServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378944A0C752CAC00BE9E85 /* CppMessagePortServer.cpp */; }; + D378945F0C752CAC00BE9E85 /* CppMessagePortServer.h in Headers */ = {isa = PBXBuildFile; fileRef = D378944B0C752CAC00BE9E85 /* CppMessagePortServer.h */; }; + D37894600C752CAC00BE9E85 /* jconv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378944C0C752CAC00BE9E85 /* jconv.cpp */; }; + D37894610C752CAC00BE9E85 /* jconv.h in Headers */ = {isa = PBXBuildFile; fileRef = D378944D0C752CAC00BE9E85 /* jconv.h */; }; + D37894620C752CAC00BE9E85 /* Mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = D378944E0C752CAC00BE9E85 /* Mutex.h */; }; + D37894630C752CAC00BE9E85 /* NumericConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378944F0C752CAC00BE9E85 /* NumericConverter.cpp */; }; + D37894640C752CAC00BE9E85 /* NumericConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894500C752CAC00BE9E85 /* NumericConverter.h */; }; + D37894650C752CAC00BE9E85 /* PrivateRunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894510C752CAC00BE9E85 /* PrivateRunLoop.h */; }; + D37894660C752CAC00BE9E85 /* PrivateRunLoop.mm in Sources */ = {isa = PBXBuildFile; fileRef = D37894520C752CAC00BE9E85 /* PrivateRunLoop.mm */; }; + D37894670C752CAC00BE9E85 /* SKKChar.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894530C752CAC00BE9E85 /* SKKChar.h */; }; + D37894680C752CAC00BE9E85 /* SKKConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894540C752CAC00BE9E85 /* SKKConfig.cpp */; }; + D37894690C752CAC00BE9E85 /* SKKConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894550C752CAC00BE9E85 /* SKKConfig.h */; }; + D378946A0C752CAC00BE9E85 /* SKKEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894560C752CAC00BE9E85 /* SKKEvent.h */; }; + D378946B0C752CAC00BE9E85 /* socketstream.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894570C752CAC00BE9E85 /* socketstream.h */; }; + D37894750C752DAF00BE9E85 /* BIMClientServer.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894740C752DAE00BE9E85 /* BIMClientServer.h */; }; + D37894920C752F2700BE9E85 /* AboutBoxController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D378947F0C752F2700BE9E85 /* AboutBoxController.mm */; }; + D37894930C752F2700BE9E85 /* AquaSKKServer.mm in Sources */ = {isa = PBXBuildFile; fileRef = D37894810C752F2700BE9E85 /* AquaSKKServer.mm */; }; + D37894940C752F2700BE9E85 /* DictArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = D37894830C752F2700BE9E85 /* DictArrayController.m */; }; + D37894950C752F2700BE9E85 /* DictionarySet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894850C752F2700BE9E85 /* DictionarySet.cpp */; }; + D37894960C752F2700BE9E85 /* KotoeriDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894870C752F2700BE9E85 /* KotoeriDictionary.cpp */; }; + D37894970C752F2700BE9E85 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D37894890C752F2700BE9E85 /* main.m */; }; + D37894980C752F2700BE9E85 /* PreferencesController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D378948B0C752F2700BE9E85 /* PreferencesController.mm */; }; + D37894990C752F2700BE9E85 /* ProxyDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378948C0C752F2700BE9E85 /* ProxyDictionary.cpp */; }; + D378949A0C752F2700BE9E85 /* SKKDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378948E0C752F2700BE9E85 /* SKKDictionary.cpp */; }; + D378949B0C752F2700BE9E85 /* skkserv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894900C752F2700BE9E85 /* skkserv.cpp */; }; + D37894A10C752FEF00BE9E85 /* PreferenceKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894A00C752FEF00BE9E85 /* PreferenceKeys.h */; }; + D37894A70C75304000BE9E85 /* ClientConnectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894A30C75304000BE9E85 /* ClientConnectionFactory.cpp */; }; + D37894A80C75304000BE9E85 /* ServerMessageReceiver.mm in Sources */ = {isa = PBXBuildFile; fileRef = D37894A60C75304000BE9E85 /* ServerMessageReceiver.mm */; }; + D37894AF0C75309800BE9E85 /* CandidatesFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = D37894AA0C75309800BE9E85 /* CandidatesFrame.m */; }; + D37894B00C75309800BE9E85 /* CandidatesManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = D37894AC0C75309800BE9E85 /* CandidatesManager.mm */; }; + D37894B10C75309800BE9E85 /* CandidatesView.mm in Sources */ = {isa = PBXBuildFile; fileRef = D37894AE0C75309800BE9E85 /* CandidatesView.mm */; }; + D37895540C75392F00BE9E85 /* CandidatesWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D37895530C75392F00BE9E85 /* CandidatesWindowController.mm */; }; + D37895610C7539CF00BE9E85 /* libAquaSKKLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */; }; + D37895620C7539CF00BE9E85 /* libAquaSKKLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */; }; + D37895BA0C753A9000BE9E85 /* AsciiConversionMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378958B0C753A9000BE9E85 /* AsciiConversionMode.cpp */; }; + D37895BB0C753A9000BE9E85 /* BIM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378958D0C753A9000BE9E85 /* BIM.cpp */; }; + D37895BC0C753A9000BE9E85 /* BIMComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895900C753A9000BE9E85 /* BIMComponent.cpp */; }; + D37895BD0C753A9000BE9E85 /* BIMInputEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895920C753A9000BE9E85 /* BIMInputEvents.cpp */; }; + D37895BE0C753A9000BE9E85 /* CharacterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895940C753A9000BE9E85 /* CharacterTranslator.cpp */; }; + D37895BF0C753A9000BE9E85 /* ChildInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895960C753A9000BE9E85 /* ChildInputMode.cpp */; }; + D37895C00C753A9000BE9E85 /* ClientConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895980C753A9000BE9E85 /* ClientConfiguration.cpp */; }; + D37895C10C753A9000BE9E85 /* ClientMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378959A0C753A9000BE9E85 /* ClientMessageReceiver.cpp */; }; + D37895C20C753A9000BE9E85 /* HanAscInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378959C0C753A9000BE9E85 /* HanAscInputMode.cpp */; }; + D37895C30C753A9000BE9E85 /* HanKataInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378959E0C753A9000BE9E85 /* HanKataInputMode.cpp */; }; + D37895C40C753A9000BE9E85 /* HiraganaInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A00C753A9000BE9E85 /* HiraganaInputMode.cpp */; }; + D37895C50C753A9000BE9E85 /* IMSessionInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A20C753A9000BE9E85 /* IMSessionInputMode.cpp */; }; + D37895C60C753A9000BE9E85 /* KanaTreeController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A50C753A9000BE9E85 /* KanaTreeController.cpp */; }; + D37895C70C753A9000BE9E85 /* KanaTreeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A70C753A9000BE9E85 /* KanaTreeElement.cpp */; }; + D37895C80C753A9000BE9E85 /* KanjiConversionMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A90C753A9000BE9E85 /* KanjiConversionMode.cpp */; }; + D37895C90C753A9000BE9E85 /* ParentInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895AB0C753A9000BE9E85 /* ParentInputMode.cpp */; }; + D37895CA0C753A9000BE9E85 /* ServerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895AE0C753A9000BE9E85 /* ServerConnection.cpp */; }; + D37895CB0C753A9000BE9E85 /* ServerConnectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B00C753A9000BE9E85 /* ServerConnectionFactory.cpp */; }; + D37895CD0C753A9000BE9E85 /* WordRegisterMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B40C753A9000BE9E85 /* WordRegisterMode.cpp */; }; + D37895CE0C753A9000BE9E85 /* ZenAscInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B60C753A9000BE9E85 /* ZenAscInputMode.cpp */; }; + D37895CF0C753A9000BE9E85 /* ZenKataInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B80C753A9000BE9E85 /* ZenKataInputMode.cpp */; }; + D37895E10C75423A00BE9E85 /* AboutBox.nib in Resources */ = {isa = PBXBuildFile; fileRef = D37895D70C75423A00BE9E85 /* AboutBox.nib */; }; + D37895E20C75423A00BE9E85 /* Candidates.nib in Resources */ = {isa = PBXBuildFile; fileRef = D37895D90C75423A00BE9E85 /* Candidates.nib */; }; + D37895E40C75423A00BE9E85 /* Preferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = D37895DD0C75423A00BE9E85 /* Preferences.nib */; }; + D37895E50C75423A00BE9E85 /* Principal.nib in Resources */ = {isa = PBXBuildFile; fileRef = D37895DF0C75423A00BE9E85 /* Principal.nib */; }; + D378963C0C75501400BE9E85 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D37896380C75501400BE9E85 /* InfoPlist.strings */; }; + D378963D0C75501400BE9E85 /* Menu.nib in Resources */ = {isa = PBXBuildFile; fileRef = D378963A0C75501400BE9E85 /* Menu.nib */; }; + D37896470C75514A00BE9E85 /* kana-rule-list in Resources */ = {isa = PBXBuildFile; fileRef = D37896400C75514A00BE9E85 /* kana-rule-list */; }; + D37896480C75514A00BE9E85 /* okuri-list in Resources */ = {isa = PBXBuildFile; fileRef = D37896410C75514A00BE9E85 /* okuri-list */; }; + D37896490C75514A00BE9E85 /* translation-to-hankata in Resources */ = {isa = PBXBuildFile; fileRef = D37896420C75514A00BE9E85 /* translation-to-hankata */; }; + D378964A0C75514A00BE9E85 /* translation-to-hiragana in Resources */ = {isa = PBXBuildFile; fileRef = D37896430C75514A00BE9E85 /* translation-to-hiragana */; }; + D378964B0C75514A00BE9E85 /* translation-to-katakana in Resources */ = {isa = PBXBuildFile; fileRef = D37896440C75514A00BE9E85 /* translation-to-katakana */; }; + D378964C0C75514A00BE9E85 /* tut-config in Resources */ = {isa = PBXBuildFile; fileRef = D37896450C75514A00BE9E85 /* tut-config */; }; + D378964D0C75514A00BE9E85 /* tut-kana-rule-list in Resources */ = {isa = PBXBuildFile; fileRef = D37896460C75514A00BE9E85 /* tut-kana-rule-list */; }; + D37896510C7551F900BE9E85 /* DictionarySet.plist in Resources */ = {isa = PBXBuildFile; fileRef = D378964F0C7551F900BE9E85 /* DictionarySet.plist */; }; + D37896520C7551F900BE9E85 /* UserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = D37896500C7551F900BE9E85 /* UserDefaults.plist */; }; + D37896540C75522200BE9E85 /* config in Resources */ = {isa = PBXBuildFile; fileRef = D37896530C75522200BE9E85 /* config */; }; + D37896B90C75998E00BE9E85 /* TransparentWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = D37895B30C753A9000BE9E85 /* TransparentWindow.m */; }; + D37896C50C759A4800BE9E85 /* AquaSKK-FullRoman.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896BF0C759A4800BE9E85 /* AquaSKK-FullRoman.tif */; }; + D37896C60C759A4800BE9E85 /* AquaSKK-HalfKatakana.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C00C759A4800BE9E85 /* AquaSKK-HalfKatakana.tif */; }; + D37896C70C759A4800BE9E85 /* AquaSKK-Hirakana.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C10C759A4800BE9E85 /* AquaSKK-Hirakana.tif */; }; + D37896C80C759A4800BE9E85 /* AquaSKK-InputMethod.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C20C759A4800BE9E85 /* AquaSKK-InputMethod.tif */; }; + D37896C90C759A4800BE9E85 /* AquaSKK-Katakana.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C30C759A4800BE9E85 /* AquaSKK-Katakana.tif */; }; + D37896CA0C759A4800BE9E85 /* AquaSKK-Roman.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C40C759A4800BE9E85 /* AquaSKK-Roman.tif */; }; + D37896DE0C759B0800BE9E85 /* BIM.r in Rez */ = {isa = PBXBuildFile; fileRef = D378958F0C753A9000BE9E85 /* BIM.r */; }; + D37896E10C759B3B00BE9E85 /* AquaSKKServer.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = D37894180C74851300BE9E85 /* AquaSKKServer.app */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D378943C0C752B7400BE9E85 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D37893480C747CAB00BE9E85 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D37894350C752A3000BE9E85 /* AquaSKKLibrary */; + remoteInfo = AquaSKKLibrary; + }; + D378943E0C752B7A00BE9E85 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D37893480C747CAB00BE9E85 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D37894170C74851300BE9E85 /* AquaSKKServer */; + remoteInfo = AquaSKKServer; + }; + D37894400C752B8900BE9E85 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D37893480C747CAB00BE9E85 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D37894350C752A3000BE9E85 /* AquaSKKLibrary */; + remoteInfo = AquaSKKLibrary; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D37896DF0C759B1F00BE9E85 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 12; + files = ( + D37896E10C759B3B00BE9E85 /* AquaSKKServer.app in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D37893650C74802700BE9E85 /* AquaSKKInputMethod.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AquaSKKInputMethod.component; sourceTree = BUILT_PRODUCTS_DIR; }; + D37893660C74802700BE9E85 /* AquaSKKInputMethod-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "AquaSKKInputMethod-Info.plist"; sourceTree = ""; }; + D37894180C74851300BE9E85 /* AquaSKKServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AquaSKKServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D378941A0C74851300BE9E85 /* AquaSKKServer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "AquaSKKServer-Info.plist"; sourceTree = ""; }; + D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libAquaSKKLibrary.a; path = build/Debug/libAquaSKKLibrary.a; sourceTree = ""; }; + D37894440C752CAC00BE9E85 /* CppCFData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppCFData.cpp; path = ../CppCFData.cpp; sourceTree = SOURCE_ROOT; }; + D37894450C752CAC00BE9E85 /* CppCFData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppCFData.h; path = ../CppCFData.h; sourceTree = SOURCE_ROOT; }; + D37894460C752CAC00BE9E85 /* CppCFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppCFString.cpp; path = ../CppCFString.cpp; sourceTree = SOURCE_ROOT; }; + D37894470C752CAC00BE9E85 /* CppCFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppCFString.h; path = ../CppCFString.h; sourceTree = SOURCE_ROOT; }; + D37894480C752CAC00BE9E85 /* CppMessagePortConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppMessagePortConnection.cpp; path = ../CppMessagePortConnection.cpp; sourceTree = SOURCE_ROOT; }; + D37894490C752CAC00BE9E85 /* CppMessagePortConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppMessagePortConnection.h; path = ../CppMessagePortConnection.h; sourceTree = SOURCE_ROOT; }; + D378944A0C752CAC00BE9E85 /* CppMessagePortServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppMessagePortServer.cpp; path = ../CppMessagePortServer.cpp; sourceTree = SOURCE_ROOT; }; + D378944B0C752CAC00BE9E85 /* CppMessagePortServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppMessagePortServer.h; path = ../CppMessagePortServer.h; sourceTree = SOURCE_ROOT; }; + D378944C0C752CAC00BE9E85 /* jconv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jconv.cpp; path = ../jconv.cpp; sourceTree = SOURCE_ROOT; }; + D378944D0C752CAC00BE9E85 /* jconv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jconv.h; path = ../jconv.h; sourceTree = SOURCE_ROOT; }; + D378944E0C752CAC00BE9E85 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mutex.h; path = ../Mutex.h; sourceTree = SOURCE_ROOT; }; + D378944F0C752CAC00BE9E85 /* NumericConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NumericConverter.cpp; path = ../NumericConverter.cpp; sourceTree = SOURCE_ROOT; }; + D37894500C752CAC00BE9E85 /* NumericConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NumericConverter.h; path = ../NumericConverter.h; sourceTree = SOURCE_ROOT; }; + D37894510C752CAC00BE9E85 /* PrivateRunLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrivateRunLoop.h; path = ../PrivateRunLoop.h; sourceTree = SOURCE_ROOT; }; + D37894520C752CAC00BE9E85 /* PrivateRunLoop.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PrivateRunLoop.mm; path = ../PrivateRunLoop.mm; sourceTree = SOURCE_ROOT; }; + D37894530C752CAC00BE9E85 /* SKKChar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKChar.h; path = ../SKKChar.h; sourceTree = SOURCE_ROOT; }; + D37894540C752CAC00BE9E85 /* SKKConfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKConfig.cpp; path = ../SKKConfig.cpp; sourceTree = SOURCE_ROOT; }; + D37894550C752CAC00BE9E85 /* SKKConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKConfig.h; path = ../SKKConfig.h; sourceTree = SOURCE_ROOT; }; + D37894560C752CAC00BE9E85 /* SKKEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKEvent.h; path = ../SKKEvent.h; sourceTree = SOURCE_ROOT; }; + D37894570C752CAC00BE9E85 /* socketstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = socketstream.h; path = ../socketstream.h; sourceTree = SOURCE_ROOT; }; + D37894740C752DAE00BE9E85 /* BIMClientServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIMClientServer.h; path = ../BIMClientServer.h; sourceTree = SOURCE_ROOT; }; + D378947E0C752F2700BE9E85 /* AboutBoxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AboutBoxController.h; path = ../AboutBoxController.h; sourceTree = SOURCE_ROOT; }; + D378947F0C752F2700BE9E85 /* AboutBoxController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AboutBoxController.mm; path = ../AboutBoxController.mm; sourceTree = SOURCE_ROOT; }; + D37894800C752F2700BE9E85 /* AquaSKKServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AquaSKKServer.h; path = ../AquaSKKServer.h; sourceTree = SOURCE_ROOT; }; + D37894810C752F2700BE9E85 /* AquaSKKServer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AquaSKKServer.mm; path = ../AquaSKKServer.mm; sourceTree = SOURCE_ROOT; }; + D37894820C752F2700BE9E85 /* DictArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DictArrayController.h; path = ../DictArrayController.h; sourceTree = SOURCE_ROOT; }; + D37894830C752F2700BE9E85 /* DictArrayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DictArrayController.m; path = ../DictArrayController.m; sourceTree = SOURCE_ROOT; }; + D37894840C752F2700BE9E85 /* Dictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Dictionary.h; path = ../Dictionary.h; sourceTree = SOURCE_ROOT; }; + D37894850C752F2700BE9E85 /* DictionarySet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DictionarySet.cpp; path = ../DictionarySet.cpp; sourceTree = SOURCE_ROOT; }; + D37894860C752F2700BE9E85 /* DictionarySet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DictionarySet.h; path = ../DictionarySet.h; sourceTree = SOURCE_ROOT; }; + D37894870C752F2700BE9E85 /* KotoeriDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KotoeriDictionary.cpp; path = ../KotoeriDictionary.cpp; sourceTree = SOURCE_ROOT; }; + D37894880C752F2700BE9E85 /* KotoeriDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KotoeriDictionary.h; path = ../KotoeriDictionary.h; sourceTree = SOURCE_ROOT; }; + D37894890C752F2700BE9E85 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../main.m; sourceTree = SOURCE_ROOT; }; + D378948A0C752F2700BE9E85 /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreferencesController.h; path = ../PreferencesController.h; sourceTree = SOURCE_ROOT; }; + D378948B0C752F2700BE9E85 /* PreferencesController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PreferencesController.mm; path = ../PreferencesController.mm; sourceTree = SOURCE_ROOT; }; + D378948C0C752F2700BE9E85 /* ProxyDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProxyDictionary.cpp; path = ../ProxyDictionary.cpp; sourceTree = SOURCE_ROOT; }; + D378948D0C752F2700BE9E85 /* ProxyDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProxyDictionary.h; path = ../ProxyDictionary.h; sourceTree = SOURCE_ROOT; }; + D378948E0C752F2700BE9E85 /* SKKDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKDictionary.cpp; path = ../SKKDictionary.cpp; sourceTree = SOURCE_ROOT; }; + D378948F0C752F2700BE9E85 /* SKKDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKDictionary.h; path = ../SKKDictionary.h; sourceTree = SOURCE_ROOT; }; + D37894900C752F2700BE9E85 /* skkserv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = skkserv.cpp; path = ../skkserv.cpp; sourceTree = SOURCE_ROOT; }; + D37894910C752F2700BE9E85 /* skkserv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = skkserv.h; path = ../skkserv.h; sourceTree = SOURCE_ROOT; }; + D37894A00C752FEF00BE9E85 /* PreferenceKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreferenceKeys.h; path = ../PreferenceKeys.h; sourceTree = SOURCE_ROOT; }; + D37894A30C75304000BE9E85 /* ClientConnectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientConnectionFactory.cpp; path = ../ClientConnectionFactory.cpp; sourceTree = SOURCE_ROOT; }; + D37894A40C75304000BE9E85 /* ClientConnectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientConnectionFactory.h; path = ../ClientConnectionFactory.h; sourceTree = SOURCE_ROOT; }; + D37894A50C75304000BE9E85 /* ServerMessageReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerMessageReceiver.h; path = ../ServerMessageReceiver.h; sourceTree = SOURCE_ROOT; }; + D37894A60C75304000BE9E85 /* ServerMessageReceiver.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ServerMessageReceiver.mm; path = ../ServerMessageReceiver.mm; sourceTree = SOURCE_ROOT; }; + D37894A90C75309800BE9E85 /* CandidatesFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CandidatesFrame.h; path = ../CandidatesFrame.h; sourceTree = SOURCE_ROOT; }; + D37894AA0C75309800BE9E85 /* CandidatesFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CandidatesFrame.m; path = ../CandidatesFrame.m; sourceTree = SOURCE_ROOT; }; + D37894AB0C75309800BE9E85 /* CandidatesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CandidatesManager.h; path = ../CandidatesManager.h; sourceTree = SOURCE_ROOT; }; + D37894AC0C75309800BE9E85 /* CandidatesManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CandidatesManager.mm; path = ../CandidatesManager.mm; sourceTree = SOURCE_ROOT; }; + D37894AD0C75309800BE9E85 /* CandidatesView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CandidatesView.h; path = ../CandidatesView.h; sourceTree = SOURCE_ROOT; }; + D37894AE0C75309800BE9E85 /* CandidatesView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CandidatesView.mm; path = ../CandidatesView.mm; sourceTree = SOURCE_ROOT; }; + D37895520C75392F00BE9E85 /* CandidatesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CandidatesWindowController.h; path = ../CandidatesWindowController.h; sourceTree = SOURCE_ROOT; }; + D37895530C75392F00BE9E85 /* CandidatesWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CandidatesWindowController.mm; path = ../CandidatesWindowController.mm; sourceTree = SOURCE_ROOT; }; + D378958B0C753A9000BE9E85 /* AsciiConversionMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AsciiConversionMode.cpp; path = ../AsciiConversionMode.cpp; sourceTree = SOURCE_ROOT; }; + D378958C0C753A9000BE9E85 /* AsciiConversionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsciiConversionMode.h; path = ../AsciiConversionMode.h; sourceTree = SOURCE_ROOT; }; + D378958D0C753A9000BE9E85 /* BIM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIM.cpp; path = ../BIM.cpp; sourceTree = SOURCE_ROOT; }; + D378958E0C753A9000BE9E85 /* BIM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIM.h; path = ../BIM.h; sourceTree = SOURCE_ROOT; }; + D378958F0C753A9000BE9E85 /* BIM.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = BIM.r; path = ../BIM.r; sourceTree = SOURCE_ROOT; }; + D37895900C753A9000BE9E85 /* BIMComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIMComponent.cpp; path = ../BIMComponent.cpp; sourceTree = SOURCE_ROOT; }; + D37895910C753A9000BE9E85 /* BIMComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIMComponent.h; path = ../BIMComponent.h; sourceTree = SOURCE_ROOT; }; + D37895920C753A9000BE9E85 /* BIMInputEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIMInputEvents.cpp; path = ../BIMInputEvents.cpp; sourceTree = SOURCE_ROOT; }; + D37895930C753A9000BE9E85 /* BIMInputEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIMInputEvents.h; path = ../BIMInputEvents.h; sourceTree = SOURCE_ROOT; }; + D37895940C753A9000BE9E85 /* CharacterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterTranslator.cpp; path = ../CharacterTranslator.cpp; sourceTree = SOURCE_ROOT; }; + D37895950C753A9000BE9E85 /* CharacterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterTranslator.h; path = ../CharacterTranslator.h; sourceTree = SOURCE_ROOT; }; + D37895960C753A9000BE9E85 /* ChildInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChildInputMode.cpp; path = ../ChildInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895970C753A9000BE9E85 /* ChildInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChildInputMode.h; path = ../ChildInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895980C753A9000BE9E85 /* ClientConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientConfiguration.cpp; path = ../ClientConfiguration.cpp; sourceTree = SOURCE_ROOT; }; + D37895990C753A9000BE9E85 /* ClientConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientConfiguration.h; path = ../ClientConfiguration.h; sourceTree = SOURCE_ROOT; }; + D378959A0C753A9000BE9E85 /* ClientMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientMessageReceiver.cpp; path = ../ClientMessageReceiver.cpp; sourceTree = SOURCE_ROOT; }; + D378959B0C753A9000BE9E85 /* ClientMessageReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientMessageReceiver.h; path = ../ClientMessageReceiver.h; sourceTree = SOURCE_ROOT; }; + D378959C0C753A9000BE9E85 /* HanAscInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HanAscInputMode.cpp; path = ../HanAscInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D378959D0C753A9000BE9E85 /* HanAscInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HanAscInputMode.h; path = ../HanAscInputMode.h; sourceTree = SOURCE_ROOT; }; + D378959E0C753A9000BE9E85 /* HanKataInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HanKataInputMode.cpp; path = ../HanKataInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D378959F0C753A9000BE9E85 /* HanKataInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HanKataInputMode.h; path = ../HanKataInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895A00C753A9000BE9E85 /* HiraganaInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HiraganaInputMode.cpp; path = ../HiraganaInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895A10C753A9000BE9E85 /* HiraganaInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HiraganaInputMode.h; path = ../HiraganaInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895A20C753A9000BE9E85 /* IMSessionInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IMSessionInputMode.cpp; path = ../IMSessionInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895A30C753A9000BE9E85 /* IMSessionInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IMSessionInputMode.h; path = ../IMSessionInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895A40C753A9000BE9E85 /* InputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputMode.h; path = ../InputMode.h; sourceTree = SOURCE_ROOT; }; + D37895A50C753A9000BE9E85 /* KanaTreeController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KanaTreeController.cpp; path = ../KanaTreeController.cpp; sourceTree = SOURCE_ROOT; }; + D37895A60C753A9000BE9E85 /* KanaTreeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KanaTreeController.h; path = ../KanaTreeController.h; sourceTree = SOURCE_ROOT; }; + D37895A70C753A9000BE9E85 /* KanaTreeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KanaTreeElement.cpp; path = ../KanaTreeElement.cpp; sourceTree = SOURCE_ROOT; }; + D37895A80C753A9000BE9E85 /* KanaTreeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KanaTreeElement.h; path = ../KanaTreeElement.h; sourceTree = SOURCE_ROOT; }; + D37895A90C753A9000BE9E85 /* KanjiConversionMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KanjiConversionMode.cpp; path = ../KanjiConversionMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895AA0C753A9000BE9E85 /* KanjiConversionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KanjiConversionMode.h; path = ../KanjiConversionMode.h; sourceTree = SOURCE_ROOT; }; + D37895AB0C753A9000BE9E85 /* ParentInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParentInputMode.cpp; path = ../ParentInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895AC0C753A9000BE9E85 /* ParentInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParentInputMode.h; path = ../ParentInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895AD0C753A9000BE9E85 /* RegistrationStarter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegistrationStarter.h; path = ../RegistrationStarter.h; sourceTree = SOURCE_ROOT; }; + D37895AE0C753A9000BE9E85 /* ServerConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerConnection.cpp; path = ../ServerConnection.cpp; sourceTree = SOURCE_ROOT; }; + D37895AF0C753A9000BE9E85 /* ServerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerConnection.h; path = ../ServerConnection.h; sourceTree = SOURCE_ROOT; }; + D37895B00C753A9000BE9E85 /* ServerConnectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerConnectionFactory.cpp; path = ../ServerConnectionFactory.cpp; sourceTree = SOURCE_ROOT; }; + D37895B10C753A9000BE9E85 /* ServerConnectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerConnectionFactory.h; path = ../ServerConnectionFactory.h; sourceTree = SOURCE_ROOT; }; + D37895B20C753A9000BE9E85 /* TransparentWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TransparentWindow.h; path = ../TransparentWindow.h; sourceTree = SOURCE_ROOT; }; + D37895B30C753A9000BE9E85 /* TransparentWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TransparentWindow.m; path = ../TransparentWindow.m; sourceTree = SOURCE_ROOT; }; + D37895B40C753A9000BE9E85 /* WordRegisterMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordRegisterMode.cpp; path = ../WordRegisterMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895B50C753A9000BE9E85 /* WordRegisterMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordRegisterMode.h; path = ../WordRegisterMode.h; sourceTree = SOURCE_ROOT; }; + D37895B60C753A9000BE9E85 /* ZenAscInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZenAscInputMode.cpp; path = ../ZenAscInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895B70C753A9000BE9E85 /* ZenAscInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZenAscInputMode.h; path = ../ZenAscInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895B80C753A9000BE9E85 /* ZenKataInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZenKataInputMode.cpp; path = ../ZenKataInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D37895B90C753A9000BE9E85 /* ZenKataInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZenKataInputMode.h; path = ../ZenKataInputMode.h; sourceTree = SOURCE_ROOT; }; + D37895D80C75423A00BE9E85 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = ../Japanese.lproj/AboutBox.nib; sourceTree = SOURCE_ROOT; }; + D37895DA0C75423A00BE9E85 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = ../Japanese.lproj/Candidates.nib; sourceTree = SOURCE_ROOT; }; + D37895DE0C75423A00BE9E85 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = ../Japanese.lproj/Preferences.nib; sourceTree = SOURCE_ROOT; }; + D37895E00C75423A00BE9E85 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = ../Japanese.lproj/Principal.nib; sourceTree = SOURCE_ROOT; }; + D37896390C75501400BE9E85 /* Japanese */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Japanese; path = ../Japanese.lproj/InfoPlist.strings; sourceTree = SOURCE_ROOT; }; + D378963B0C75501400BE9E85 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = ../Japanese.lproj/Menu.nib; sourceTree = SOURCE_ROOT; }; + D37896400C75514A00BE9E85 /* kana-rule-list */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "kana-rule-list"; path = "../Resources/kana-rule-list"; sourceTree = SOURCE_ROOT; }; + D37896410C75514A00BE9E85 /* okuri-list */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "okuri-list"; path = "../Resources/okuri-list"; sourceTree = SOURCE_ROOT; }; + D37896420C75514A00BE9E85 /* translation-to-hankata */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "translation-to-hankata"; path = "../Resources/translation-to-hankata"; sourceTree = SOURCE_ROOT; }; + D37896430C75514A00BE9E85 /* translation-to-hiragana */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "translation-to-hiragana"; path = "../Resources/translation-to-hiragana"; sourceTree = SOURCE_ROOT; }; + D37896440C75514A00BE9E85 /* translation-to-katakana */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "translation-to-katakana"; path = "../Resources/translation-to-katakana"; sourceTree = SOURCE_ROOT; }; + D37896450C75514A00BE9E85 /* tut-config */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "tut-config"; path = "../Resources/tut-config"; sourceTree = SOURCE_ROOT; }; + D37896460C75514A00BE9E85 /* tut-kana-rule-list */ = {isa = PBXFileReference; fileEncoding = 3; lastKnownFileType = text; name = "tut-kana-rule-list"; path = "../Resources/tut-kana-rule-list"; sourceTree = SOURCE_ROOT; }; + D378964F0C7551F900BE9E85 /* DictionarySet.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = DictionarySet.plist; path = ../Resources/DictionarySet.plist; sourceTree = SOURCE_ROOT; }; + D37896500C7551F900BE9E85 /* UserDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = UserDefaults.plist; path = ../Resources/UserDefaults.plist; sourceTree = SOURCE_ROOT; }; + D37896530C75522200BE9E85 /* config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = config; path = ../Resources/config; sourceTree = SOURCE_ROOT; }; + D37896BF0C759A4800BE9E85 /* AquaSKK-FullRoman.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-FullRoman.tif"; path = "../Icons/AquaSKK-FullRoman.tif"; sourceTree = SOURCE_ROOT; }; + D37896C00C759A4800BE9E85 /* AquaSKK-HalfKatakana.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-HalfKatakana.tif"; path = "../Icons/AquaSKK-HalfKatakana.tif"; sourceTree = SOURCE_ROOT; }; + D37896C10C759A4800BE9E85 /* AquaSKK-Hirakana.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-Hirakana.tif"; path = "../Icons/AquaSKK-Hirakana.tif"; sourceTree = SOURCE_ROOT; }; + D37896C20C759A4800BE9E85 /* AquaSKK-InputMethod.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-InputMethod.tif"; path = "../Icons/AquaSKK-InputMethod.tif"; sourceTree = SOURCE_ROOT; }; + D37896C30C759A4800BE9E85 /* AquaSKK-Katakana.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-Katakana.tif"; path = "../Icons/AquaSKK-Katakana.tif"; sourceTree = SOURCE_ROOT; }; + D37896C40C759A4800BE9E85 /* AquaSKK-Roman.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-Roman.tif"; path = "../Icons/AquaSKK-Roman.tif"; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D37893630C74802700BE9E85 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D37895610C7539CF00BE9E85 /* libAquaSKKLibrary.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D37894160C74851300BE9E85 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D37895620C7539CF00BE9E85 /* libAquaSKKLibrary.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D37894340C752A3000BE9E85 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D37893460C747CAB00BE9E85 = { + isa = PBXGroup; + children = ( + D37893710C7482BA00BE9E85 /* AquaSKKInputMethod */, + D37893720C7482CE00BE9E85 /* AquaSKKServer */, + D37894310C75294A00BE9E85 /* AquaSKKLibrary */, + D378936F0C74829D00BE9E85 /* Products */, + ); + sourceTree = ""; + }; + D378936F0C74829D00BE9E85 /* Products */ = { + isa = PBXGroup; + children = ( + D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */, + D37893650C74802700BE9E85 /* AquaSKKInputMethod.component */, + D37894180C74851300BE9E85 /* AquaSKKServer.app */, + ); + name = Products; + sourceTree = ""; + }; + D37893710C7482BA00BE9E85 /* AquaSKKInputMethod */ = { + isa = PBXGroup; + children = ( + D37893660C74802700BE9E85 /* AquaSKKInputMethod-Info.plist */, + D37893730C74838800BE9E85 /* src */, + D378963E0C75501A00BE9E85 /* resource */, + D378963F0C75511500BE9E85 /* data */, + ); + name = AquaSKKInputMethod; + sourceTree = ""; + }; + D37893720C7482CE00BE9E85 /* AquaSKKServer */ = { + isa = PBXGroup; + children = ( + D378941A0C74851300BE9E85 /* AquaSKKServer-Info.plist */, + D37894260C7487DF00BE9E85 /* src */, + D37895D60C75420000BE9E85 /* resource */, + D378964E0C7551CE00BE9E85 /* data */, + ); + name = AquaSKKServer; + sourceTree = ""; + }; + D37893730C74838800BE9E85 /* src */ = { + isa = PBXGroup; + children = ( + D37894300C7496A500BE9E85 /* legacy */, + D37894280C74881700BE9E85 /* component */, + D378942D0C74886700BE9E85 /* keybindings */, + D378942E0C74887500BE9E85 /* statemachine */, + D378942A0C74882600BE9E85 /* controller */, + D378942B0C74882B00BE9E85 /* editor */, + D37894290C74881E00BE9E85 /* context */, + D378942C0C74883400BE9E85 /* frontend */, + D37894270C74880F00BE9E85 /* backend */, + D37894720C752D3200BE9E85 /* utility */, + ); + name = src; + sourceTree = ""; + }; + D37894260C7487DF00BE9E85 /* src */ = { + isa = PBXGroup; + children = ( + D37894890C752F2700BE9E85 /* main.m */, + D37894800C752F2700BE9E85 /* AquaSKKServer.h */, + D37894810C752F2700BE9E85 /* AquaSKKServer.mm */, + D37894A50C75304000BE9E85 /* ServerMessageReceiver.h */, + D37894A60C75304000BE9E85 /* ServerMessageReceiver.mm */, + D37894860C752F2700BE9E85 /* DictionarySet.h */, + D37894850C752F2700BE9E85 /* DictionarySet.cpp */, + D37894A40C75304000BE9E85 /* ClientConnectionFactory.h */, + D37894A30C75304000BE9E85 /* ClientConnectionFactory.cpp */, + D378949C0C752F2E00BE9E85 /* dictionary */, + D37894B20C75309C00BE9E85 /* candidate window */, + D378949E0C752F7700BE9E85 /* skkserv */, + D378949D0C752F5800BE9E85 /* preference */, + D378949F0C752F9800BE9E85 /* about box */, + ); + name = src; + sourceTree = ""; + }; + D37894270C74880F00BE9E85 /* backend */ = { + isa = PBXGroup; + children = ( + ); + name = backend; + sourceTree = ""; + }; + D37894280C74881700BE9E85 /* component */ = { + isa = PBXGroup; + children = ( + ); + name = component; + sourceTree = ""; + }; + D37894290C74881E00BE9E85 /* context */ = { + isa = PBXGroup; + children = ( + ); + name = context; + sourceTree = ""; + }; + D378942A0C74882600BE9E85 /* controller */ = { + isa = PBXGroup; + children = ( + ); + name = controller; + sourceTree = ""; + }; + D378942B0C74882B00BE9E85 /* editor */ = { + isa = PBXGroup; + children = ( + ); + name = editor; + sourceTree = ""; + }; + D378942C0C74883400BE9E85 /* frontend */ = { + isa = PBXGroup; + children = ( + ); + name = frontend; + sourceTree = ""; + }; + D378942D0C74886700BE9E85 /* keybindings */ = { + isa = PBXGroup; + children = ( + ); + name = keybindings; + sourceTree = ""; + }; + D378942E0C74887500BE9E85 /* statemachine */ = { + isa = PBXGroup; + children = ( + ); + name = statemachine; + sourceTree = ""; + }; + D37894300C7496A500BE9E85 /* legacy */ = { + isa = PBXGroup; + children = ( + D378958F0C753A9000BE9E85 /* BIM.r */, + D378958E0C753A9000BE9E85 /* BIM.h */, + D378958D0C753A9000BE9E85 /* BIM.cpp */, + D37895910C753A9000BE9E85 /* BIMComponent.h */, + D37895900C753A9000BE9E85 /* BIMComponent.cpp */, + D37895930C753A9000BE9E85 /* BIMInputEvents.h */, + D37895920C753A9000BE9E85 /* BIMInputEvents.cpp */, + D37895AF0C753A9000BE9E85 /* ServerConnection.h */, + D37895AE0C753A9000BE9E85 /* ServerConnection.cpp */, + D37895B10C753A9000BE9E85 /* ServerConnectionFactory.h */, + D37895B00C753A9000BE9E85 /* ServerConnectionFactory.cpp */, + D37895D10C75409100BE9E85 /* input mode */, + D37896350C75447C00BE9E85 /* roman kana conversion */, + D37896360C7544E000BE9E85 /* configuration */, + ); + name = legacy; + sourceTree = ""; + }; + D37894310C75294A00BE9E85 /* AquaSKKLibrary */ = { + isa = PBXGroup; + children = ( + D37894420C752B9E00BE9E85 /* src */, + ); + name = AquaSKKLibrary; + sourceTree = ""; + }; + D37894420C752B9E00BE9E85 /* src */ = { + isa = PBXGroup; + children = ( + D37894A00C752FEF00BE9E85 /* PreferenceKeys.h */, + D37894740C752DAE00BE9E85 /* BIMClientServer.h */, + D37894450C752CAC00BE9E85 /* CppCFData.h */, + D37894440C752CAC00BE9E85 /* CppCFData.cpp */, + D37894470C752CAC00BE9E85 /* CppCFString.h */, + D37894460C752CAC00BE9E85 /* CppCFString.cpp */, + D37894490C752CAC00BE9E85 /* CppMessagePortConnection.h */, + D37894480C752CAC00BE9E85 /* CppMessagePortConnection.cpp */, + D378944B0C752CAC00BE9E85 /* CppMessagePortServer.h */, + D378944A0C752CAC00BE9E85 /* CppMessagePortServer.cpp */, + D378944D0C752CAC00BE9E85 /* jconv.h */, + D378944C0C752CAC00BE9E85 /* jconv.cpp */, + D378944E0C752CAC00BE9E85 /* Mutex.h */, + D37894500C752CAC00BE9E85 /* NumericConverter.h */, + D378944F0C752CAC00BE9E85 /* NumericConverter.cpp */, + D37894510C752CAC00BE9E85 /* PrivateRunLoop.h */, + D37894520C752CAC00BE9E85 /* PrivateRunLoop.mm */, + D37894530C752CAC00BE9E85 /* SKKChar.h */, + D37894550C752CAC00BE9E85 /* SKKConfig.h */, + D37894540C752CAC00BE9E85 /* SKKConfig.cpp */, + D37894560C752CAC00BE9E85 /* SKKEvent.h */, + D37894570C752CAC00BE9E85 /* socketstream.h */, + ); + name = src; + sourceTree = ""; + }; + D37894720C752D3200BE9E85 /* utility */ = { + isa = PBXGroup; + children = ( + ); + name = utility; + sourceTree = ""; + }; + D378949C0C752F2E00BE9E85 /* dictionary */ = { + isa = PBXGroup; + children = ( + D37894840C752F2700BE9E85 /* Dictionary.h */, + D378948F0C752F2700BE9E85 /* SKKDictionary.h */, + D378948E0C752F2700BE9E85 /* SKKDictionary.cpp */, + D37894880C752F2700BE9E85 /* KotoeriDictionary.h */, + D37894870C752F2700BE9E85 /* KotoeriDictionary.cpp */, + D378948D0C752F2700BE9E85 /* ProxyDictionary.h */, + D378948C0C752F2700BE9E85 /* ProxyDictionary.cpp */, + ); + name = dictionary; + sourceTree = ""; + }; + D378949D0C752F5800BE9E85 /* preference */ = { + isa = PBXGroup; + children = ( + D378948A0C752F2700BE9E85 /* PreferencesController.h */, + D378948B0C752F2700BE9E85 /* PreferencesController.mm */, + D37894820C752F2700BE9E85 /* DictArrayController.h */, + D37894830C752F2700BE9E85 /* DictArrayController.m */, + ); + name = preference; + sourceTree = ""; + }; + D378949E0C752F7700BE9E85 /* skkserv */ = { + isa = PBXGroup; + children = ( + D37894910C752F2700BE9E85 /* skkserv.h */, + D37894900C752F2700BE9E85 /* skkserv.cpp */, + ); + name = skkserv; + sourceTree = ""; + }; + D378949F0C752F9800BE9E85 /* about box */ = { + isa = PBXGroup; + children = ( + D378947E0C752F2700BE9E85 /* AboutBoxController.h */, + D378947F0C752F2700BE9E85 /* AboutBoxController.mm */, + ); + name = "about box"; + sourceTree = ""; + }; + D37894B20C75309C00BE9E85 /* candidate window */ = { + isa = PBXGroup; + children = ( + D37895B20C753A9000BE9E85 /* TransparentWindow.h */, + D37895B30C753A9000BE9E85 /* TransparentWindow.m */, + D37894AB0C75309800BE9E85 /* CandidatesManager.h */, + D37894AC0C75309800BE9E85 /* CandidatesManager.mm */, + D37895520C75392F00BE9E85 /* CandidatesWindowController.h */, + D37895530C75392F00BE9E85 /* CandidatesWindowController.mm */, + D37894AD0C75309800BE9E85 /* CandidatesView.h */, + D37894AE0C75309800BE9E85 /* CandidatesView.mm */, + D37894A90C75309800BE9E85 /* CandidatesFrame.h */, + D37894AA0C75309800BE9E85 /* CandidatesFrame.m */, + ); + name = "candidate window"; + sourceTree = ""; + }; + D37895D10C75409100BE9E85 /* input mode */ = { + isa = PBXGroup; + children = ( + D37895A40C753A9000BE9E85 /* InputMode.h */, + D37895D50C75416800BE9E85 /* parent input mode */, + D37896370C75454000BE9E85 /* child input mode */, + D37895D20C75409B00BE9E85 /* conversion mode */, + ); + name = "input mode"; + sourceTree = ""; + }; + D37895D20C75409B00BE9E85 /* conversion mode */ = { + isa = PBXGroup; + children = ( + D37895AD0C753A9000BE9E85 /* RegistrationStarter.h */, + D37895AA0C753A9000BE9E85 /* KanjiConversionMode.h */, + D37895A90C753A9000BE9E85 /* KanjiConversionMode.cpp */, + D378958C0C753A9000BE9E85 /* AsciiConversionMode.h */, + D378958B0C753A9000BE9E85 /* AsciiConversionMode.cpp */, + ); + name = "conversion mode"; + sourceTree = ""; + }; + D37895D30C7540BE00BE9E85 /* kana */ = { + isa = PBXGroup; + children = ( + D37895A10C753A9000BE9E85 /* HiraganaInputMode.h */, + D37895A00C753A9000BE9E85 /* HiraganaInputMode.cpp */, + D37895B90C753A9000BE9E85 /* ZenKataInputMode.h */, + D37895B80C753A9000BE9E85 /* ZenKataInputMode.cpp */, + D378959F0C753A9000BE9E85 /* HanKataInputMode.h */, + D378959E0C753A9000BE9E85 /* HanKataInputMode.cpp */, + ); + name = kana; + sourceTree = ""; + }; + D37895D40C75410700BE9E85 /* latin */ = { + isa = PBXGroup; + children = ( + D378959D0C753A9000BE9E85 /* HanAscInputMode.h */, + D378959C0C753A9000BE9E85 /* HanAscInputMode.cpp */, + D37895B70C753A9000BE9E85 /* ZenAscInputMode.h */, + D37895B60C753A9000BE9E85 /* ZenAscInputMode.cpp */, + ); + name = latin; + sourceTree = ""; + }; + D37895D50C75416800BE9E85 /* parent input mode */ = { + isa = PBXGroup; + children = ( + D37895AC0C753A9000BE9E85 /* ParentInputMode.h */, + D37895AB0C753A9000BE9E85 /* ParentInputMode.cpp */, + D37895A30C753A9000BE9E85 /* IMSessionInputMode.h */, + D37895A20C753A9000BE9E85 /* IMSessionInputMode.cpp */, + D37895B50C753A9000BE9E85 /* WordRegisterMode.h */, + D37895B40C753A9000BE9E85 /* WordRegisterMode.cpp */, + ); + name = "parent input mode"; + sourceTree = ""; + }; + D37895D60C75420000BE9E85 /* resource */ = { + isa = PBXGroup; + children = ( + D37895DF0C75423A00BE9E85 /* Principal.nib */, + D37895D90C75423A00BE9E85 /* Candidates.nib */, + D37895DD0C75423A00BE9E85 /* Preferences.nib */, + D37895D70C75423A00BE9E85 /* AboutBox.nib */, + ); + name = resource; + sourceTree = ""; + }; + D37896350C75447C00BE9E85 /* roman kana conversion */ = { + isa = PBXGroup; + children = ( + D37895A60C753A9000BE9E85 /* KanaTreeController.h */, + D37895A50C753A9000BE9E85 /* KanaTreeController.cpp */, + D37895A80C753A9000BE9E85 /* KanaTreeElement.h */, + D37895A70C753A9000BE9E85 /* KanaTreeElement.cpp */, + ); + name = "roman kana conversion"; + sourceTree = ""; + }; + D37896360C7544E000BE9E85 /* configuration */ = { + isa = PBXGroup; + children = ( + D378959B0C753A9000BE9E85 /* ClientMessageReceiver.h */, + D378959A0C753A9000BE9E85 /* ClientMessageReceiver.cpp */, + D37895990C753A9000BE9E85 /* ClientConfiguration.h */, + D37895980C753A9000BE9E85 /* ClientConfiguration.cpp */, + ); + name = configuration; + sourceTree = ""; + }; + D37896370C75454000BE9E85 /* child input mode */ = { + isa = PBXGroup; + children = ( + D37895970C753A9000BE9E85 /* ChildInputMode.h */, + D37895960C753A9000BE9E85 /* ChildInputMode.cpp */, + D37895950C753A9000BE9E85 /* CharacterTranslator.h */, + D37895940C753A9000BE9E85 /* CharacterTranslator.cpp */, + D37895D30C7540BE00BE9E85 /* kana */, + D37895D40C75410700BE9E85 /* latin */, + ); + name = "child input mode"; + sourceTree = ""; + }; + D378963E0C75501A00BE9E85 /* resource */ = { + isa = PBXGroup; + children = ( + D37896BE0C759A2C00BE9E85 /* icons */, + D37896380C75501400BE9E85 /* InfoPlist.strings */, + D378963A0C75501400BE9E85 /* Menu.nib */, + ); + name = resource; + sourceTree = ""; + }; + D378963F0C75511500BE9E85 /* data */ = { + isa = PBXGroup; + children = ( + D37896530C75522200BE9E85 /* config */, + D37896400C75514A00BE9E85 /* kana-rule-list */, + D37896410C75514A00BE9E85 /* okuri-list */, + D37896420C75514A00BE9E85 /* translation-to-hankata */, + D37896430C75514A00BE9E85 /* translation-to-hiragana */, + D37896440C75514A00BE9E85 /* translation-to-katakana */, + D37896450C75514A00BE9E85 /* tut-config */, + D37896460C75514A00BE9E85 /* tut-kana-rule-list */, + ); + name = data; + sourceTree = ""; + }; + D378964E0C7551CE00BE9E85 /* data */ = { + isa = PBXGroup; + children = ( + D378964F0C7551F900BE9E85 /* DictionarySet.plist */, + D37896500C7551F900BE9E85 /* UserDefaults.plist */, + ); + name = data; + sourceTree = ""; + }; + D37896BE0C759A2C00BE9E85 /* icons */ = { + isa = PBXGroup; + children = ( + D37896BF0C759A4800BE9E85 /* AquaSKK-FullRoman.tif */, + D37896C00C759A4800BE9E85 /* AquaSKK-HalfKatakana.tif */, + D37896C10C759A4800BE9E85 /* AquaSKK-Hirakana.tif */, + D37896C20C759A4800BE9E85 /* AquaSKK-InputMethod.tif */, + D37896C30C759A4800BE9E85 /* AquaSKK-Katakana.tif */, + D37896C40C759A4800BE9E85 /* AquaSKK-Roman.tif */, + ); + name = icons; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D37894320C752A3000BE9E85 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D37894590C752CAC00BE9E85 /* CppCFData.h in Headers */, + D378945B0C752CAC00BE9E85 /* CppCFString.h in Headers */, + D378945D0C752CAC00BE9E85 /* CppMessagePortConnection.h in Headers */, + D378945F0C752CAC00BE9E85 /* CppMessagePortServer.h in Headers */, + D37894610C752CAC00BE9E85 /* jconv.h in Headers */, + D37894620C752CAC00BE9E85 /* Mutex.h in Headers */, + D37894640C752CAC00BE9E85 /* NumericConverter.h in Headers */, + D37894650C752CAC00BE9E85 /* PrivateRunLoop.h in Headers */, + D37894670C752CAC00BE9E85 /* SKKChar.h in Headers */, + D37894690C752CAC00BE9E85 /* SKKConfig.h in Headers */, + D378946A0C752CAC00BE9E85 /* SKKEvent.h in Headers */, + D378946B0C752CAC00BE9E85 /* socketstream.h in Headers */, + D37894750C752DAF00BE9E85 /* BIMClientServer.h in Headers */, + D37894A10C752FEF00BE9E85 /* PreferenceKeys.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D37893640C74802700BE9E85 /* AquaSKKInputMethod */ = { + isa = PBXNativeTarget; + buildConfigurationList = D37893680C74802700BE9E85 /* Build configuration list for PBXNativeTarget "AquaSKKInputMethod" */; + buildPhases = ( + D37893610C74802700BE9E85 /* Resources */, + D37893620C74802700BE9E85 /* Sources */, + D37893630C74802700BE9E85 /* Frameworks */, + D37896D80C759AF500BE9E85 /* Rez */, + D37896DF0C759B1F00BE9E85 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + D378943D0C752B7400BE9E85 /* PBXTargetDependency */, + D378943F0C752B7A00BE9E85 /* PBXTargetDependency */, + ); + name = AquaSKKInputMethod; + productName = AquaSKKInputMethod; + productReference = D37893650C74802700BE9E85 /* AquaSKKInputMethod.component */; + productType = "com.apple.product-type.bundle"; + }; + D37894170C74851300BE9E85 /* AquaSKKServer */ = { + isa = PBXNativeTarget; + buildConfigurationList = D378941B0C74851300BE9E85 /* Build configuration list for PBXNativeTarget "AquaSKKServer" */; + buildPhases = ( + D37894140C74851300BE9E85 /* Resources */, + D37894150C74851300BE9E85 /* Sources */, + D37894160C74851300BE9E85 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + D37894410C752B8900BE9E85 /* PBXTargetDependency */, + ); + name = AquaSKKServer; + productName = AquaSKKServer; + productReference = D37894180C74851300BE9E85 /* AquaSKKServer.app */; + productType = "com.apple.product-type.application"; + }; + D37894350C752A3000BE9E85 /* AquaSKKLibrary */ = { + isa = PBXNativeTarget; + buildConfigurationList = D37894370C752A6000BE9E85 /* Build configuration list for PBXNativeTarget "AquaSKKLibrary" */; + buildPhases = ( + D37894320C752A3000BE9E85 /* Headers */, + D37894330C752A3000BE9E85 /* Sources */, + D37894340C752A3000BE9E85 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AquaSKKLibrary; + productName = AquaSKKLibrary; + productReference = D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D37893480C747CAB00BE9E85 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = D37893490C747CAB00BE9E85 /* Build configuration list for PBXProject "AquaSKK" */; + hasScannedForEncodings = 0; + mainGroup = D37893460C747CAB00BE9E85; + productRefGroup = D37893460C747CAB00BE9E85; + projectDirPath = ""; + targets = ( + D37893640C74802700BE9E85 /* AquaSKKInputMethod */, + D37894170C74851300BE9E85 /* AquaSKKServer */, + D37894350C752A3000BE9E85 /* AquaSKKLibrary */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D37893610C74802700BE9E85 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D378963C0C75501400BE9E85 /* InfoPlist.strings in Resources */, + D378963D0C75501400BE9E85 /* Menu.nib in Resources */, + D37896470C75514A00BE9E85 /* kana-rule-list in Resources */, + D37896480C75514A00BE9E85 /* okuri-list in Resources */, + D37896490C75514A00BE9E85 /* translation-to-hankata in Resources */, + D378964A0C75514A00BE9E85 /* translation-to-hiragana in Resources */, + D378964B0C75514A00BE9E85 /* translation-to-katakana in Resources */, + D378964C0C75514A00BE9E85 /* tut-config in Resources */, + D378964D0C75514A00BE9E85 /* tut-kana-rule-list in Resources */, + D37896540C75522200BE9E85 /* config in Resources */, + D37896C50C759A4800BE9E85 /* AquaSKK-FullRoman.tif in Resources */, + D37896C60C759A4800BE9E85 /* AquaSKK-HalfKatakana.tif in Resources */, + D37896C70C759A4800BE9E85 /* AquaSKK-Hirakana.tif in Resources */, + D37896C80C759A4800BE9E85 /* AquaSKK-InputMethod.tif in Resources */, + D37896C90C759A4800BE9E85 /* AquaSKK-Katakana.tif in Resources */, + D37896CA0C759A4800BE9E85 /* AquaSKK-Roman.tif in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D37894140C74851300BE9E85 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D37895E10C75423A00BE9E85 /* AboutBox.nib in Resources */, + D37895E20C75423A00BE9E85 /* Candidates.nib in Resources */, + D37895E40C75423A00BE9E85 /* Preferences.nib in Resources */, + D37895E50C75423A00BE9E85 /* Principal.nib in Resources */, + D37896510C7551F900BE9E85 /* DictionarySet.plist in Resources */, + D37896520C7551F900BE9E85 /* UserDefaults.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + D37896D80C759AF500BE9E85 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + D37896DE0C759B0800BE9E85 /* BIM.r in Rez */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D37893620C74802700BE9E85 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D37895BA0C753A9000BE9E85 /* AsciiConversionMode.cpp in Sources */, + D37895BB0C753A9000BE9E85 /* BIM.cpp in Sources */, + D37895BC0C753A9000BE9E85 /* BIMComponent.cpp in Sources */, + D37895BD0C753A9000BE9E85 /* BIMInputEvents.cpp in Sources */, + D37895BE0C753A9000BE9E85 /* CharacterTranslator.cpp in Sources */, + D37895BF0C753A9000BE9E85 /* ChildInputMode.cpp in Sources */, + D37895C00C753A9000BE9E85 /* ClientConfiguration.cpp in Sources */, + D37895C10C753A9000BE9E85 /* ClientMessageReceiver.cpp in Sources */, + D37895C20C753A9000BE9E85 /* HanAscInputMode.cpp in Sources */, + D37895C30C753A9000BE9E85 /* HanKataInputMode.cpp in Sources */, + D37895C40C753A9000BE9E85 /* HiraganaInputMode.cpp in Sources */, + D37895C50C753A9000BE9E85 /* IMSessionInputMode.cpp in Sources */, + D37895C60C753A9000BE9E85 /* KanaTreeController.cpp in Sources */, + D37895C70C753A9000BE9E85 /* KanaTreeElement.cpp in Sources */, + D37895C80C753A9000BE9E85 /* KanjiConversionMode.cpp in Sources */, + D37895C90C753A9000BE9E85 /* ParentInputMode.cpp in Sources */, + D37895CA0C753A9000BE9E85 /* ServerConnection.cpp in Sources */, + D37895CB0C753A9000BE9E85 /* ServerConnectionFactory.cpp in Sources */, + D37895CD0C753A9000BE9E85 /* WordRegisterMode.cpp in Sources */, + D37895CE0C753A9000BE9E85 /* ZenAscInputMode.cpp in Sources */, + D37895CF0C753A9000BE9E85 /* ZenKataInputMode.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D37894150C74851300BE9E85 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D37894920C752F2700BE9E85 /* AboutBoxController.mm in Sources */, + D37894930C752F2700BE9E85 /* AquaSKKServer.mm in Sources */, + D37894940C752F2700BE9E85 /* DictArrayController.m in Sources */, + D37894950C752F2700BE9E85 /* DictionarySet.cpp in Sources */, + D37894960C752F2700BE9E85 /* KotoeriDictionary.cpp in Sources */, + D37894970C752F2700BE9E85 /* main.m in Sources */, + D37894980C752F2700BE9E85 /* PreferencesController.mm in Sources */, + D37894990C752F2700BE9E85 /* ProxyDictionary.cpp in Sources */, + D378949A0C752F2700BE9E85 /* SKKDictionary.cpp in Sources */, + D378949B0C752F2700BE9E85 /* skkserv.cpp in Sources */, + D37894A70C75304000BE9E85 /* ClientConnectionFactory.cpp in Sources */, + D37894A80C75304000BE9E85 /* ServerMessageReceiver.mm in Sources */, + D37894AF0C75309800BE9E85 /* CandidatesFrame.m in Sources */, + D37894B00C75309800BE9E85 /* CandidatesManager.mm in Sources */, + D37894B10C75309800BE9E85 /* CandidatesView.mm in Sources */, + D37895540C75392F00BE9E85 /* CandidatesWindowController.mm in Sources */, + D37896B90C75998E00BE9E85 /* TransparentWindow.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D37894330C752A3000BE9E85 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D37894580C752CAC00BE9E85 /* CppCFData.cpp in Sources */, + D378945A0C752CAC00BE9E85 /* CppCFString.cpp in Sources */, + D378945C0C752CAC00BE9E85 /* CppMessagePortConnection.cpp in Sources */, + D378945E0C752CAC00BE9E85 /* CppMessagePortServer.cpp in Sources */, + D37894600C752CAC00BE9E85 /* jconv.cpp in Sources */, + D37894630C752CAC00BE9E85 /* NumericConverter.cpp in Sources */, + D37894660C752CAC00BE9E85 /* PrivateRunLoop.mm in Sources */, + D37894680C752CAC00BE9E85 /* SKKConfig.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D378943D0C752B7400BE9E85 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D37894350C752A3000BE9E85 /* AquaSKKLibrary */; + targetProxy = D378943C0C752B7400BE9E85 /* PBXContainerItemProxy */; + }; + D378943F0C752B7A00BE9E85 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D37894170C74851300BE9E85 /* AquaSKKServer */; + targetProxy = D378943E0C752B7A00BE9E85 /* PBXContainerItemProxy */; + }; + D37894410C752B8900BE9E85 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D37894350C752A3000BE9E85 /* AquaSKKLibrary */; + targetProxy = D37894400C752B8900BE9E85 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + D37895D70C75423A00BE9E85 /* AboutBox.nib */ = { + isa = PBXVariantGroup; + children = ( + D37895D80C75423A00BE9E85 /* Japanese */, + ); + name = AboutBox.nib; + sourceTree = ""; + }; + D37895D90C75423A00BE9E85 /* Candidates.nib */ = { + isa = PBXVariantGroup; + children = ( + D37895DA0C75423A00BE9E85 /* Japanese */, + ); + name = Candidates.nib; + sourceTree = ""; + }; + D37895DD0C75423A00BE9E85 /* Preferences.nib */ = { + isa = PBXVariantGroup; + children = ( + D37895DE0C75423A00BE9E85 /* Japanese */, + ); + name = Preferences.nib; + sourceTree = ""; + }; + D37895DF0C75423A00BE9E85 /* Principal.nib */ = { + isa = PBXVariantGroup; + children = ( + D37895E00C75423A00BE9E85 /* Japanese */, + ); + name = Principal.nib; + sourceTree = ""; + }; + D37896380C75501400BE9E85 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + D37896390C75501400BE9E85 /* Japanese */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + D378963A0C75501400BE9E85 /* Menu.nib */ = { + isa = PBXVariantGroup; + children = ( + D378963B0C75501400BE9E85 /* Japanese */, + ); + name = Menu.nib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + D378934A0C747CAB00BE9E85 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + }; + name = Debug; + }; + D378934B0C747CAB00BE9E85 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.3; + SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk; + }; + name = Release; + }; + D37893690C74802700BE9E85 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "AquaSKKInputMethod-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.3; + OTHER_LDFLAGS = ( + "-framework", + Carbon, + "-framework", + Foundation, + ); + PREBINDING = NO; + PRODUCT_NAME = AquaSKKInputMethod; + WRAPPER_EXTENSION = component; + ZERO_LINK = YES; + }; + name = Debug; + }; + D378936A0C74802700BE9E85 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "AquaSKKInputMethod-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + MACOSX_DEPLOYMENT_TARGET = ""; + MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.3; + OTHER_LDFLAGS = ( + "-framework", + Carbon, + "-framework", + Foundation, + ); + PREBINDING = NO; + PRODUCT_NAME = AquaSKKInputMethod; + SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk; + WRAPPER_EXTENSION = component; + ZERO_LINK = NO; + }; + name = Release; + }; + D378941C0C74851300BE9E85 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PFE_FILE_C_DIALECTS = "c objective-c c++ objective-c++"; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "AquaSKKServer-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + "-framework", + Carbon, + ); + PREBINDING = NO; + PRODUCT_NAME = AquaSKKServer; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + D378941D0C74851300BE9E85 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PFE_FILE_C_DIALECTS = "c objective-c c++ objective-c++"; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "AquaSKKServer-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; + MACOSX_DEPLYOMENT_TARGET_ppc = 10.3; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + "-framework", + Carbon, + ); + PREBINDING = NO; + PRODUCT_NAME = AquaSKKServer; + SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + D37894380C752A6000BE9E85 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INSTALL_PATH = /usr/local/lib; + PREBINDING = NO; + PRODUCT_NAME = AquaSKKLibrary; + ZERO_LINK = YES; + }; + name = Debug; + }; + D37894390C752A6000BE9E85 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + PREBINDING = NO; + PRODUCT_NAME = AquaSKKLibrary; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D37893490C747CAB00BE9E85 /* Build configuration list for PBXProject "AquaSKK" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D378934A0C747CAB00BE9E85 /* Debug */, + D378934B0C747CAB00BE9E85 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D37893680C74802700BE9E85 /* Build configuration list for PBXNativeTarget "AquaSKKInputMethod" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D37893690C74802700BE9E85 /* Debug */, + D378936A0C74802700BE9E85 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D378941B0C74851300BE9E85 /* Build configuration list for PBXNativeTarget "AquaSKKServer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D378941C0C74851300BE9E85 /* Debug */, + D378941D0C74851300BE9E85 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D37894370C752A6000BE9E85 /* Build configuration list for PBXNativeTarget "AquaSKKLibrary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D37894380C752A6000BE9E85 /* Debug */, + D37894390C752A6000BE9E85 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D37893480C747CAB00BE9E85 /* Project object */; +} From t-suwa users.sourceforge.jp Fri Aug 17 22:22:36 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Fri, 17 Aug 2007 22:22:36 +0900 Subject: [aquaskk-changes 339] CVS update: AquaSKK Message-ID: <20070817132236.6331A2AC077@users.sourceforge.jp> Index: AquaSKK/SKKChar.h diff -u /dev/null AquaSKK/SKKChar.h:1.1.2.2 --- /dev/null Fri Aug 17 22:22:36 2007 +++ AquaSKK/SKKChar.h Fri Aug 17 22:22:36 2007 @@ -0,0 +1,32 @@ +/* -*- c++ -*- + $Id: SKKChar.h,v 1.1.2.2 2007/08/17 13:22:36 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2006 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKChar__ +#define INC__SKKChar__ + +// ϥ⡼ɤñ +typedef int SKKChar; + +// ξ֤Ǽ(Shift 16bit) +#define SKKCHAR(code, mods) (code | ((mods & ~shiftKey & 0xffff) << 8)) + +#endif // INC__SKKChar__ From t-suwa users.sourceforge.jp Sun Aug 19 19:00:24 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Sun, 19 Aug 2007 19:00:24 +0900 Subject: [aquaskk-changes 340] CVS update: AquaSKK/proj Message-ID: <20070819100024.90ABD2AC02B@users.sourceforge.jp> Index: AquaSKK/proj/AquaSKKInputMethod-Info.plist diff -u AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.1 AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.2 --- AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.1 Fri Aug 17 22:02:30 2007 +++ AquaSKK/proj/AquaSKKInputMethod-Info.plist Sun Aug 19 19:00:24 2007 @@ -19,7 +19,7 @@ CFBundleSignature askk CFBundleVersion - 2007-08-16 + 2007-08-19 CSResourcesFileMapped yes tsInputMethodIconFileKey Index: AquaSKK/proj/AquaSKKInputMethod-Prefix.h diff -u /dev/null AquaSKK/proj/AquaSKKInputMethod-Prefix.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:24 2007 +++ AquaSKK/proj/AquaSKKInputMethod-Prefix.h Sun Aug 19 19:00:24 2007 @@ -0,0 +1,5 @@ +// +// AquaSKKInputMethod Prefix header +// + +#include Index: AquaSKK/proj/AquaSKKServer-Info.plist diff -u AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.1 AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.2 --- AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.1 Fri Aug 17 22:02:30 2007 +++ AquaSKK/proj/AquaSKKServer-Info.plist Sun Aug 19 19:00:24 2007 @@ -19,10 +19,12 @@ CFBundleSignature askk CFBundleVersion - 2007-08-16 + 2007-08-19 NSMainNibFile Principal NSPrincipalClass NSApplication + NSUIElement + 1 From t-suwa users.sourceforge.jp Sun Aug 19 19:00:27 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Sun, 19 Aug 2007 19:00:27 +0900 Subject: [aquaskk-changes 341] CVS update: AquaSKK/proj/AquaSKK.xcodeproj Message-ID: <20070819100027.D5BD02AC098@users.sourceforge.jp> Index: AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj diff -u AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.1 AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.2 --- AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.1 Fri Aug 17 22:02:38 2007 +++ AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj Sun Aug 19 19:00:27 2007 @@ -7,6 +7,14 @@ objects = { /* Begin PBXBuildFile section */ + D34E8D9F0C76B23E001CD839 /* SKK.r in Rez */ = {isa = PBXBuildFile; fileRef = D34E8D990C76B23E001CD839 /* SKK.r */; }; + D34E8DA00C76B23E001CD839 /* SKKComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8D9A0C76B23E001CD839 /* SKKComponent.cpp */; }; + D34E8DA20C76B23E001CD839 /* SKKEntryPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8D9C0C76B23E001CD839 /* SKKEntryPoint.cpp */; }; + D34E8DA30C76B23E001CD839 /* SKKSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8D9D0C76B23E001CD839 /* SKKSession.cpp */; }; + D34E8DC50C76BA4D001CD839 /* IMSessionInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8DC10C76BA4D001CD839 /* IMSessionInputMode.cpp */; }; + D34E8DC70C76BA4D001CD839 /* WordRegisterMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8DC30C76BA4D001CD839 /* WordRegisterMode.cpp */; }; + D34E8E0E0C77B119001CD839 /* BIMInputEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8E0C0C77B119001CD839 /* BIMInputEvents.cpp */; }; + D34E8E150C77B890001CD839 /* BIM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8E140C77B890001CD839 /* BIM.cpp */; }; D37894580C752CAC00BE9E85 /* CppCFData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894440C752CAC00BE9E85 /* CppCFData.cpp */; }; D37894590C752CAC00BE9E85 /* CppCFData.h in Headers */ = {isa = PBXBuildFile; fileRef = D37894450C752CAC00BE9E85 /* CppCFData.h */; }; D378945A0C752CAC00BE9E85 /* CppCFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37894460C752CAC00BE9E85 /* CppCFString.cpp */; }; @@ -48,9 +56,6 @@ D37895610C7539CF00BE9E85 /* libAquaSKKLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */; }; D37895620C7539CF00BE9E85 /* libAquaSKKLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */; }; D37895BA0C753A9000BE9E85 /* AsciiConversionMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378958B0C753A9000BE9E85 /* AsciiConversionMode.cpp */; }; - D37895BB0C753A9000BE9E85 /* BIM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378958D0C753A9000BE9E85 /* BIM.cpp */; }; - D37895BC0C753A9000BE9E85 /* BIMComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895900C753A9000BE9E85 /* BIMComponent.cpp */; }; - D37895BD0C753A9000BE9E85 /* BIMInputEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895920C753A9000BE9E85 /* BIMInputEvents.cpp */; }; D37895BE0C753A9000BE9E85 /* CharacterTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895940C753A9000BE9E85 /* CharacterTranslator.cpp */; }; D37895BF0C753A9000BE9E85 /* ChildInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895960C753A9000BE9E85 /* ChildInputMode.cpp */; }; D37895C00C753A9000BE9E85 /* ClientConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895980C753A9000BE9E85 /* ClientConfiguration.cpp */; }; @@ -58,14 +63,12 @@ D37895C20C753A9000BE9E85 /* HanAscInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378959C0C753A9000BE9E85 /* HanAscInputMode.cpp */; }; D37895C30C753A9000BE9E85 /* HanKataInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D378959E0C753A9000BE9E85 /* HanKataInputMode.cpp */; }; D37895C40C753A9000BE9E85 /* HiraganaInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A00C753A9000BE9E85 /* HiraganaInputMode.cpp */; }; - D37895C50C753A9000BE9E85 /* IMSessionInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A20C753A9000BE9E85 /* IMSessionInputMode.cpp */; }; D37895C60C753A9000BE9E85 /* KanaTreeController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A50C753A9000BE9E85 /* KanaTreeController.cpp */; }; D37895C70C753A9000BE9E85 /* KanaTreeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A70C753A9000BE9E85 /* KanaTreeElement.cpp */; }; D37895C80C753A9000BE9E85 /* KanjiConversionMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895A90C753A9000BE9E85 /* KanjiConversionMode.cpp */; }; D37895C90C753A9000BE9E85 /* ParentInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895AB0C753A9000BE9E85 /* ParentInputMode.cpp */; }; D37895CA0C753A9000BE9E85 /* ServerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895AE0C753A9000BE9E85 /* ServerConnection.cpp */; }; D37895CB0C753A9000BE9E85 /* ServerConnectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B00C753A9000BE9E85 /* ServerConnectionFactory.cpp */; }; - D37895CD0C753A9000BE9E85 /* WordRegisterMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B40C753A9000BE9E85 /* WordRegisterMode.cpp */; }; D37895CE0C753A9000BE9E85 /* ZenAscInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B60C753A9000BE9E85 /* ZenAscInputMode.cpp */; }; D37895CF0C753A9000BE9E85 /* ZenKataInputMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D37895B80C753A9000BE9E85 /* ZenKataInputMode.cpp */; }; D37895E10C75423A00BE9E85 /* AboutBox.nib in Resources */ = {isa = PBXBuildFile; fileRef = D37895D70C75423A00BE9E85 /* AboutBox.nib */; }; @@ -91,7 +94,6 @@ D37896C80C759A4800BE9E85 /* AquaSKK-InputMethod.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C20C759A4800BE9E85 /* AquaSKK-InputMethod.tif */; }; D37896C90C759A4800BE9E85 /* AquaSKK-Katakana.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C30C759A4800BE9E85 /* AquaSKK-Katakana.tif */; }; D37896CA0C759A4800BE9E85 /* AquaSKK-Roman.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C40C759A4800BE9E85 /* AquaSKK-Roman.tif */; }; - D37896DE0C759B0800BE9E85 /* BIM.r in Rez */ = {isa = PBXBuildFile; fileRef = D378958F0C753A9000BE9E85 /* BIM.r */; }; D37896E10C759B3B00BE9E85 /* AquaSKKServer.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = D37894180C74851300BE9E85 /* AquaSKKServer.app */; }; /* End PBXBuildFile section */ @@ -100,21 +102,21 @@ isa = PBXContainerItemProxy; containerPortal = D37893480C747CAB00BE9E85 /* Project object */; proxyType = 1; - remoteGlobalIDString = D37894350C752A3000BE9E85 /* AquaSKKLibrary */; + remoteGlobalIDString = D37894350C752A3000BE9E85; remoteInfo = AquaSKKLibrary; }; D378943E0C752B7A00BE9E85 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D37893480C747CAB00BE9E85 /* Project object */; proxyType = 1; - remoteGlobalIDString = D37894170C74851300BE9E85 /* AquaSKKServer */; + remoteGlobalIDString = D37894170C74851300BE9E85; remoteInfo = AquaSKKServer; }; D37894400C752B8900BE9E85 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D37893480C747CAB00BE9E85 /* Project object */; proxyType = 1; - remoteGlobalIDString = D37894350C752A3000BE9E85 /* AquaSKKLibrary */; + remoteGlobalIDString = D37894350C752A3000BE9E85; remoteInfo = AquaSKKLibrary; }; /* End PBXContainerItemProxy section */ @@ -133,11 +135,25 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + D34E8D990C76B23E001CD839 /* SKK.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = SKK.r; path = ../src/component/SKK.r; sourceTree = SOURCE_ROOT; }; + D34E8D9A0C76B23E001CD839 /* SKKComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKComponent.cpp; path = ../src/component/SKKComponent.cpp; sourceTree = SOURCE_ROOT; }; + D34E8D9B0C76B23E001CD839 /* SKKComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKComponent.h; path = ../src/component/SKKComponent.h; sourceTree = SOURCE_ROOT; }; + D34E8D9C0C76B23E001CD839 /* SKKEntryPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKEntryPoint.cpp; path = ../src/component/SKKEntryPoint.cpp; sourceTree = SOURCE_ROOT; }; + D34E8D9D0C76B23E001CD839 /* SKKSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKSession.cpp; path = ../src/component/SKKSession.cpp; sourceTree = SOURCE_ROOT; }; + D34E8D9E0C76B23E001CD839 /* SKKSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKSession.h; path = ../src/component/SKKSession.h; sourceTree = SOURCE_ROOT; }; + D34E8DA60C76B3EE001CD839 /* SKK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKK.h; path = ../src/component/SKK.h; sourceTree = SOURCE_ROOT; }; + D34E8DC10C76BA4D001CD839 /* IMSessionInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IMSessionInputMode.cpp; path = ../src/component/IMSessionInputMode.cpp; sourceTree = SOURCE_ROOT; }; + D34E8DC20C76BA4D001CD839 /* IMSessionInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IMSessionInputMode.h; path = ../src/component/IMSessionInputMode.h; sourceTree = SOURCE_ROOT; }; + D34E8DC30C76BA4D001CD839 /* WordRegisterMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordRegisterMode.cpp; path = ../src/component/WordRegisterMode.cpp; sourceTree = SOURCE_ROOT; }; + D34E8DC40C76BA4D001CD839 /* WordRegisterMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordRegisterMode.h; path = ../src/component/WordRegisterMode.h; sourceTree = SOURCE_ROOT; }; + D34E8E0C0C77B119001CD839 /* BIMInputEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIMInputEvents.cpp; path = ../src/component/BIMInputEvents.cpp; sourceTree = SOURCE_ROOT; }; + D34E8E0D0C77B119001CD839 /* BIMInputEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIMInputEvents.h; path = ../src/component/BIMInputEvents.h; sourceTree = SOURCE_ROOT; }; + D34E8E140C77B890001CD839 /* BIM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIM.cpp; path = ../src/component/BIM.cpp; sourceTree = SOURCE_ROOT; }; D37893650C74802700BE9E85 /* AquaSKKInputMethod.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AquaSKKInputMethod.component; sourceTree = BUILT_PRODUCTS_DIR; }; D37893660C74802700BE9E85 /* AquaSKKInputMethod-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "AquaSKKInputMethod-Info.plist"; sourceTree = ""; }; D37894180C74851300BE9E85 /* AquaSKKServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AquaSKKServer.app; sourceTree = BUILT_PRODUCTS_DIR; }; D378941A0C74851300BE9E85 /* AquaSKKServer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "AquaSKKServer-Info.plist"; sourceTree = ""; }; - D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libAquaSKKLibrary.a; path = build/Debug/libAquaSKKLibrary.a; sourceTree = ""; }; + D37894360C752A3000BE9E85 /* libAquaSKKLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAquaSKKLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; }; D37894440C752CAC00BE9E85 /* CppCFData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppCFData.cpp; path = ../CppCFData.cpp; sourceTree = SOURCE_ROOT; }; D37894450C752CAC00BE9E85 /* CppCFData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppCFData.h; path = ../CppCFData.h; sourceTree = SOURCE_ROOT; }; D37894460C752CAC00BE9E85 /* CppCFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppCFString.cpp; path = ../CppCFString.cpp; sourceTree = SOURCE_ROOT; }; @@ -194,13 +210,7 @@ D37895530C75392F00BE9E85 /* CandidatesWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CandidatesWindowController.mm; path = ../CandidatesWindowController.mm; sourceTree = SOURCE_ROOT; }; D378958B0C753A9000BE9E85 /* AsciiConversionMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AsciiConversionMode.cpp; path = ../AsciiConversionMode.cpp; sourceTree = SOURCE_ROOT; }; D378958C0C753A9000BE9E85 /* AsciiConversionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsciiConversionMode.h; path = ../AsciiConversionMode.h; sourceTree = SOURCE_ROOT; }; - D378958D0C753A9000BE9E85 /* BIM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIM.cpp; path = ../BIM.cpp; sourceTree = SOURCE_ROOT; }; D378958E0C753A9000BE9E85 /* BIM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIM.h; path = ../BIM.h; sourceTree = SOURCE_ROOT; }; - D378958F0C753A9000BE9E85 /* BIM.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = BIM.r; path = ../BIM.r; sourceTree = SOURCE_ROOT; }; - D37895900C753A9000BE9E85 /* BIMComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIMComponent.cpp; path = ../BIMComponent.cpp; sourceTree = SOURCE_ROOT; }; - D37895910C753A9000BE9E85 /* BIMComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIMComponent.h; path = ../BIMComponent.h; sourceTree = SOURCE_ROOT; }; - D37895920C753A9000BE9E85 /* BIMInputEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BIMInputEvents.cpp; path = ../BIMInputEvents.cpp; sourceTree = SOURCE_ROOT; }; - D37895930C753A9000BE9E85 /* BIMInputEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIMInputEvents.h; path = ../BIMInputEvents.h; sourceTree = SOURCE_ROOT; }; D37895940C753A9000BE9E85 /* CharacterTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterTranslator.cpp; path = ../CharacterTranslator.cpp; sourceTree = SOURCE_ROOT; }; D37895950C753A9000BE9E85 /* CharacterTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterTranslator.h; path = ../CharacterTranslator.h; sourceTree = SOURCE_ROOT; }; D37895960C753A9000BE9E85 /* ChildInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChildInputMode.cpp; path = ../ChildInputMode.cpp; sourceTree = SOURCE_ROOT; }; @@ -215,8 +225,6 @@ D378959F0C753A9000BE9E85 /* HanKataInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HanKataInputMode.h; path = ../HanKataInputMode.h; sourceTree = SOURCE_ROOT; }; D37895A00C753A9000BE9E85 /* HiraganaInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HiraganaInputMode.cpp; path = ../HiraganaInputMode.cpp; sourceTree = SOURCE_ROOT; }; D37895A10C753A9000BE9E85 /* HiraganaInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HiraganaInputMode.h; path = ../HiraganaInputMode.h; sourceTree = SOURCE_ROOT; }; - D37895A20C753A9000BE9E85 /* IMSessionInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IMSessionInputMode.cpp; path = ../IMSessionInputMode.cpp; sourceTree = SOURCE_ROOT; }; - D37895A30C753A9000BE9E85 /* IMSessionInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IMSessionInputMode.h; path = ../IMSessionInputMode.h; sourceTree = SOURCE_ROOT; }; D37895A40C753A9000BE9E85 /* InputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputMode.h; path = ../InputMode.h; sourceTree = SOURCE_ROOT; }; D37895A50C753A9000BE9E85 /* KanaTreeController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KanaTreeController.cpp; path = ../KanaTreeController.cpp; sourceTree = SOURCE_ROOT; }; D37895A60C753A9000BE9E85 /* KanaTreeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KanaTreeController.h; path = ../KanaTreeController.h; sourceTree = SOURCE_ROOT; }; @@ -233,8 +241,6 @@ D37895B10C753A9000BE9E85 /* ServerConnectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerConnectionFactory.h; path = ../ServerConnectionFactory.h; sourceTree = SOURCE_ROOT; }; D37895B20C753A9000BE9E85 /* TransparentWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TransparentWindow.h; path = ../TransparentWindow.h; sourceTree = SOURCE_ROOT; }; D37895B30C753A9000BE9E85 /* TransparentWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TransparentWindow.m; path = ../TransparentWindow.m; sourceTree = SOURCE_ROOT; }; - D37895B40C753A9000BE9E85 /* WordRegisterMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordRegisterMode.cpp; path = ../WordRegisterMode.cpp; sourceTree = SOURCE_ROOT; }; - D37895B50C753A9000BE9E85 /* WordRegisterMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordRegisterMode.h; path = ../WordRegisterMode.h; sourceTree = SOURCE_ROOT; }; D37895B60C753A9000BE9E85 /* ZenAscInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZenAscInputMode.cpp; path = ../ZenAscInputMode.cpp; sourceTree = SOURCE_ROOT; }; D37895B70C753A9000BE9E85 /* ZenAscInputMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZenAscInputMode.h; path = ../ZenAscInputMode.h; sourceTree = SOURCE_ROOT; }; D37895B80C753A9000BE9E85 /* ZenKataInputMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZenKataInputMode.cpp; path = ../ZenKataInputMode.cpp; sourceTree = SOURCE_ROOT; }; @@ -290,6 +296,20 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + D34E8DC90C76BA5C001CD839 /* legacy interface */ = { + isa = PBXGroup; + children = ( + D34E8E140C77B890001CD839 /* BIM.cpp */, + D34E8E0D0C77B119001CD839 /* BIMInputEvents.h */, + D34E8E0C0C77B119001CD839 /* BIMInputEvents.cpp */, + D34E8DC20C76BA4D001CD839 /* IMSessionInputMode.h */, + D34E8DC10C76BA4D001CD839 /* IMSessionInputMode.cpp */, + D34E8DC40C76BA4D001CD839 /* WordRegisterMode.h */, + D34E8DC30C76BA4D001CD839 /* WordRegisterMode.cpp */, + ); + name = "legacy interface"; + sourceTree = ""; + }; D37893460C747CAB00BE9E85 = { isa = PBXGroup; children = ( @@ -380,6 +400,14 @@ D37894280C74881700BE9E85 /* component */ = { isa = PBXGroup; children = ( + D34E8DC90C76BA5C001CD839 /* legacy interface */, + D34E8D990C76B23E001CD839 /* SKK.r */, + D34E8DA60C76B3EE001CD839 /* SKK.h */, + D34E8D9C0C76B23E001CD839 /* SKKEntryPoint.cpp */, + D34E8D9B0C76B23E001CD839 /* SKKComponent.h */, + D34E8D9A0C76B23E001CD839 /* SKKComponent.cpp */, + D34E8D9E0C76B23E001CD839 /* SKKSession.h */, + D34E8D9D0C76B23E001CD839 /* SKKSession.cpp */, ); name = component; sourceTree = ""; @@ -429,13 +457,7 @@ D37894300C7496A500BE9E85 /* legacy */ = { isa = PBXGroup; children = ( - D378958F0C753A9000BE9E85 /* BIM.r */, D378958E0C753A9000BE9E85 /* BIM.h */, - D378958D0C753A9000BE9E85 /* BIM.cpp */, - D37895910C753A9000BE9E85 /* BIMComponent.h */, - D37895900C753A9000BE9E85 /* BIMComponent.cpp */, - D37895930C753A9000BE9E85 /* BIMInputEvents.h */, - D37895920C753A9000BE9E85 /* BIMInputEvents.cpp */, D37895AF0C753A9000BE9E85 /* ServerConnection.h */, D37895AE0C753A9000BE9E85 /* ServerConnection.cpp */, D37895B10C753A9000BE9E85 /* ServerConnectionFactory.h */, @@ -603,10 +625,6 @@ children = ( D37895AC0C753A9000BE9E85 /* ParentInputMode.h */, D37895AB0C753A9000BE9E85 /* ParentInputMode.cpp */, - D37895A30C753A9000BE9E85 /* IMSessionInputMode.h */, - D37895A20C753A9000BE9E85 /* IMSessionInputMode.cpp */, - D37895B50C753A9000BE9E85 /* WordRegisterMode.h */, - D37895B40C753A9000BE9E85 /* WordRegisterMode.cpp */, ); name = "parent input mode"; sourceTree = ""; @@ -849,7 +867,7 @@ isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( - D37896DE0C759B0800BE9E85 /* BIM.r in Rez */, + D34E8D9F0C76B23E001CD839 /* SKK.r in Rez */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -861,9 +879,6 @@ buildActionMask = 2147483647; files = ( D37895BA0C753A9000BE9E85 /* AsciiConversionMode.cpp in Sources */, - D37895BB0C753A9000BE9E85 /* BIM.cpp in Sources */, - D37895BC0C753A9000BE9E85 /* BIMComponent.cpp in Sources */, - D37895BD0C753A9000BE9E85 /* BIMInputEvents.cpp in Sources */, D37895BE0C753A9000BE9E85 /* CharacterTranslator.cpp in Sources */, D37895BF0C753A9000BE9E85 /* ChildInputMode.cpp in Sources */, D37895C00C753A9000BE9E85 /* ClientConfiguration.cpp in Sources */, @@ -871,16 +886,21 @@ D37895C20C753A9000BE9E85 /* HanAscInputMode.cpp in Sources */, D37895C30C753A9000BE9E85 /* HanKataInputMode.cpp in Sources */, D37895C40C753A9000BE9E85 /* HiraganaInputMode.cpp in Sources */, - D37895C50C753A9000BE9E85 /* IMSessionInputMode.cpp in Sources */, D37895C60C753A9000BE9E85 /* KanaTreeController.cpp in Sources */, D37895C70C753A9000BE9E85 /* KanaTreeElement.cpp in Sources */, D37895C80C753A9000BE9E85 /* KanjiConversionMode.cpp in Sources */, D37895C90C753A9000BE9E85 /* ParentInputMode.cpp in Sources */, D37895CA0C753A9000BE9E85 /* ServerConnection.cpp in Sources */, D37895CB0C753A9000BE9E85 /* ServerConnectionFactory.cpp in Sources */, - D37895CD0C753A9000BE9E85 /* WordRegisterMode.cpp in Sources */, D37895CE0C753A9000BE9E85 /* ZenAscInputMode.cpp in Sources */, D37895CF0C753A9000BE9E85 /* ZenKataInputMode.cpp in Sources */, + D34E8DA00C76B23E001CD839 /* SKKComponent.cpp in Sources */, + D34E8DA20C76B23E001CD839 /* SKKEntryPoint.cpp in Sources */, + D34E8DA30C76B23E001CD839 /* SKKSession.cpp in Sources */, + D34E8DC50C76BA4D001CD839 /* IMSessionInputMode.cpp in Sources */, + D34E8DC70C76BA4D001CD839 /* WordRegisterMode.cpp in Sources */, + D34E8E0E0C77B119001CD839 /* BIMInputEvents.cpp in Sources */, + D34E8E150C77B890001CD839 /* BIM.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -999,6 +1019,7 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; + GCC_PREFIX_HEADER = ""; }; name = Debug; }; @@ -1010,6 +1031,7 @@ i386, ); COPY_PHASE_STRIP = YES; + GCC_PREFIX_HEADER = ""; MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; MACOSX_DEPLOYMENT_TARGET_ppc = 10.3; SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk; @@ -1027,9 +1049,25 @@ GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + GCC_PREFIX_HEADER = "AquaSKKInputMethod-Prefix.h"; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = NO; + GCC_WARN_PEDANTIC = NO; + GCC_WARN_SHADOW = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "AquaSKKInputMethod-Info.plist"; - INSTALL_PATH = "$(HOME)/Library/Bundles"; + INSTALL_PATH = /Library/Components; MACOSX_DEPLOYMENT_TARGET = 10.3; OTHER_LDFLAGS = ( "-framework", @@ -1056,9 +1094,25 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + GCC_PREFIX_HEADER = "AquaSKKInputMethod-Prefix.h"; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = NO; + GCC_WARN_PEDANTIC = NO; + GCC_WARN_SHADOW = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "AquaSKKInputMethod-Info.plist"; - INSTALL_PATH = "$(HOME)/Library/Bundles"; + INSTALL_PATH = /Library/Components; MACOSX_DEPLOYMENT_TARGET = ""; MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; MACOSX_DEPLOYMENT_TARGET_ppc = 10.3; From t-suwa users.sourceforge.jp Sun Aug 19 19:00:32 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Sun, 19 Aug 2007 19:00:32 +0900 Subject: [aquaskk-changes 342] CVS update: AquaSKK/src/component Message-ID: <20070819100032.5144A2AC09A@users.sourceforge.jp> Index: AquaSKK/src/component/BIM.cpp diff -u /dev/null AquaSKK/src/component/BIM.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/BIM.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,40 @@ +/* + $Id: BIM.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002-2004 phonohawk + Copyright (C) 2005-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include + +#include "SKKComponent.h" + +// ?????????????????????+void BIMSetPencilMenuIcon(int menu_icon_index) { + CFStringRef inputModes[] = { + kTextServiceInputModeJapanese, + kTextServiceInputModeJapaneseKatakana, + kTextServiceInputModeJapaneseHalfWidthKana, + kTextServiceInputModeJapaneseFullWidthRoman, + kTextServiceInputModeRoman, + 0 + }; + + SKKComponent::theInstance().NotifyInputMode(inputModes[menu_icon_index]); +} Index: AquaSKK/src/component/BIMInputEvents.cpp diff -u /dev/null AquaSKK/src/component/BIMInputEvents.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/BIMInputEvents.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,36 @@ +/* + $Id: BIMInputEvents.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002 phonohawk + Copyright (C) 2006-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "BIMClientServer.h" +#include "BIMInputEvents.h" +#include "SKKComponent.h" +#include "SKKSession.h" + +// ??????????????????????+void BIMHandleOffsetToPos(struct OffsetToPosParams* params) { + Point pt = SKKComponent::theInstance().Session().GetInputPosition(); + + params->fReplyPoint.h = pt.h; + params->fReplyPoint.v = pt.v; +} Index: AquaSKK/src/component/BIMInputEvents.h diff -u /dev/null AquaSKK/src/component/BIMInputEvents.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/BIMInputEvents.h Sun Aug 19 19:00:32 2007 @@ -0,0 +1,29 @@ +/* + $Id: BIMInputEvents.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002 phonohawk + Copyright (C) 2005-2006 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__BIMInputEvents__ +#define INC__BIMInputEvents__ + +void BIMHandleOffsetToPos(struct OffsetToPosParams *offsetToPosParams); + +#endif Index: AquaSKK/src/component/IMSessionInputMode.cpp diff -u /dev/null AquaSKK/src/component/IMSessionInputMode.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/IMSessionInputMode.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,62 @@ +/* + $Id: IMSessionInputMode.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002-2004 phonohawk + Copyright (C) 2005-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "SKKComponent.h" +#include "SKKSession.h" +#include "IMSessionInputMode.h" + +void IMSessionInputMode::terminate() { + ParentInputMode::terminate(); + + SKKComponent::theInstance().Session().Terminate(); +} + +void IMSessionInputMode::fix(const CppCFString& str) { + int caretpos = str.indexOf(kCaret); + + if(caretpos != -1 && (unsigned)caretpos < str.length() - 1) { + CppCFString tmp; + + tmp.append(str.substring(0, caretpos)); + tmp.append(str.substring(caretpos + 1)); + + SKKComponent::theInstance().Session().FixString(tmp.getString()); + } else { + SKKComponent::theInstance().Session().FixString(str.getString()); + } +} + +void IMSessionInputMode::display(const CppCFString& str) { + int caretpos = str.indexOf(kCaret); + + if(caretpos != -1 && (unsigned)caretpos < str.length() - 1) { + CppCFString tmp; + + tmp.append(str.substring(0, caretpos)); + tmp.append(str.substring(caretpos + 1)); + + SKKComponent::theInstance().Session().DisplayString(tmp.getString(), 0, caretpos); + } else { + SKKComponent::theInstance().Session().DisplayString(str.getString(), 0, str.length()); + } +} Index: AquaSKK/src/component/IMSessionInputMode.h diff -u /dev/null AquaSKK/src/component/IMSessionInputMode.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/IMSessionInputMode.h Sun Aug 19 19:00:32 2007 @@ -0,0 +1,38 @@ +/* + $Id: IMSessionInputMode.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002 phonohawk + Copyright (C) 2006-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__IMSessionInputMode__ +#define INC__IMSessionInputMode__ + +#include "ParentInputMode.h" + +class CppCFString; + +class IMSessionInputMode: public ParentInputMode { +public: + virtual void terminate(); + virtual void fix(const CppCFString& str); + virtual void display(const CppCFString& str); +}; + +#endif Index: AquaSKK/src/component/SKK.h diff -u /dev/null AquaSKK/src/component/SKK.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKK.h Sun Aug 19 19:00:32 2007 @@ -0,0 +1,36 @@ +/* -*- C++ -*- + $Id: SKK.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKK__ +#define INC__SKK__ + +namespace SKK { + enum InputMode { + Hirakana, + Katakana, + Jisx0201Kana, + Jisx0208Latin, + Ascii + }; +} + +#endif Index: AquaSKK/src/component/SKK.r diff -u /dev/null AquaSKK/src/component/SKK.r:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKK.r Sun Aug 19 19:00:32 2007 @@ -0,0 +1,148 @@ +/* + $Id: SKK.r,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002 phonohawk + Copyright (C) 2006-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#define thng_RezTemplateVersion 1 + +#include + +#ifdef ppc_YES + #define TARGET_REZ_MAC_PPC 1 +#endif + +#ifdef i386_YES + #define TARGET_REZ_MAC_X86 1 +#endif + +#if !defined(TARGET_REZ_MAC_X86) + #define TARGET_REZ_MAC_X86 0 +#endif + +#if !(TARGET_REZ_MAC_PPC || TARGET_REZ_MAC_X86) + #if TARGET_CPU_X86 + #undef TARGET_REZ_MAC_X86 + #define TARGET_REZ_MAC_X86 1 + #elif TARGET_CPU_PPC + #undef TARGET_REZ_MAC_PPC + #define TARGET_REZ_MAC_PPC 1 + #endif +#endif + +#if TARGET_REZ_MAC_PPC && TARGET_REZ_MAC_X86 + #define TARGET_REZ_UNIVERSAL_COMPONENTS + #define Target_PlatformType platformPowerPCNativeEntryPoint + #define Target_SecondPlatformType platformIA32NativeEntryPoint +#elif TARGET_REZ_MAC_X86 + #define Target_PlatformType platformIA32NativeEntryPoint +#else + #define Target_PlatformType platformPowerPCNativeEntryPoint +#endif + +#define kAquaSKKBaseResouceID 16384 +#define kAquaSKKComponentFlags 0x8000 + smJapanese * 0x100 + langJapanese + +// "jp.sourceforge.AquaSKKInputMethod" ? pascal ??? +data 'cbnm' (0) { + $"216a 702e 736f 7572 6365 666f 7267 652e" + $"4171 7561 534b 4b49 6e70 7574 4d65 7468" + $"6f64" +}; + +resource 'thng' (kAquaSKKBaseResouceID) { + 'tsvc', // type + 'inpm', // subtype + 'askk', // manufacturer + 0, // component flags + 0, // component flags mask + 0, // code type + 0, // code ID + 'STR ', // name type + kAquaSKKBaseResouceID, // name ID + 'STR ', // info type + kAquaSKKBaseResouceID + 1, // info ID + 'kcs8', // icon type + kAquaSKKBaseResouceID, // icon ID + 0x00010000, // version + componentHasMultiplePlatforms, // registration flags + 0, // resource ID of icon family + { // component platform information + kAquaSKKComponentFlags, + 'dlle', + kAquaSKKBaseResouceID, + Target_PlatformType, +#ifdef TARGET_REZ_UNIVERSAL_COMPONENTS + kAquaSKKComponentFlags, + 'dlle', + kAquaSKKBaseResouceID, + Target_SecondPlatformType +#endif + }; +}; + +resource 'dlle' (kAquaSKKBaseResouceID) { + "SKKEntryPoint" +}; + +resource 'STR ' (kAquaSKKBaseResouceID) { + "AquaSKK" +}; + +resource 'STR ' (kAquaSKKBaseResouceID + 1) { + "AquaSKK Input Method for Mac OS X" +}; + +data 'kcs#' (kAquaSKKBaseResouceID) { + $"FEFE FE82 7C44 7C44 3828 3828 1010 0000" + $"FEFE 82FE 447C 447C 2838 2838 1010 0000" + $"FEFE FEFE 7C7C 7C7C 3838 3838 1010 0000" + $"FEFE FEFE 7C7C 7C7C 3838 3838 1010 0000" +}; + +data 'kcs4' (kAquaSKKBaseResouceID) { + $"EEEE EEE0 DDDD DDD0 EDDE EFE0 D00C CCD0" + $"0EEE FE00 0DCC CD00 0EEE FE00 0DCC CD00" + $"00EF E000 00DC D000 00EF E000 00DC D000" + $"000E 0000 000D 0000 0000 0000 0000 0000" + $"DDDD DDD0 EEEE EEE0 D00C CCD0 EDDE EFE0" + $"0DCC CD00 0EEE FE00 0DCC CD00 0EEE FE00" + $"00DC D000 00EF E000 00DC D000 00EF E000" + $"000D 0000 000E 0000 0000 0000 0000 0000" +}; + +data 'kcs8' (kAquaSKKBaseResouceID) { + $"FBFB FBFB FBFB FB00 F9F9 F9F9 F9F9 F900" + $"FAF9 FAFB FCFD FA00 F800 F5F6 2BF7 F800" + $"00FB FBFC FDFB 0000 00F9 F62B F7F9 0000" + $"00FA FBFC FDFA 0000 00F8 F62B F7F8 0000" + $"0000 FBFD FB00 0000 0000 F9F7 F900 0000" + $"0000 FAFD FA00 0000 0000 F8F7 F800 0000" + $"0000 00FB 0000 0000 0000 00F9 0000 0000" + $"0000 0000 0000 0000 0000 0000 0000 0000" + $"F9F9 F9F9 F9F9 F900 FBFB FBFB FBFB FB00" + $"F800 F5F6 2BF7 F800 FAF9 FAFB FCFD FA00" + $"00F9 F62B F7F9 0000 00FB FBFC FDFB 0000" + $"00F8 F62B F7F8 0000 00FA FBFC FDFA 0000" + $"0000 F9F7 F900 0000 0000 FBFD FB00 0000" + $"0000 F8F7 F800 0000 0000 FAFD FA00 0000" + $"0000 00F9 0000 0000 0000 00FB 0000 0000" + $"0000 0000 0000 0000 0000 0000 0000 0000" +}; Index: AquaSKK/src/component/SKKComponent.cpp diff -u /dev/null AquaSKK/src/component/SKKComponent.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKComponent.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,347 @@ +/* -*- C++ -*- + $Id: SKKComponent.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include + +#include "CppCFData.h" + +#include "BIMClientServer.h" +#include "ClientConfiguration.h" +#include "ClientMessageReceiver.h" +#include "ServerConnectionFactory.h" +#include "SKKConfig.h" + +#include "SKKComponent.h" +#include "SKKSession.h" + +enum { + kAboutCommand = 'abou', + kPreferencesCommand = 'pref', + kProjectWebCommand = 'sfjp', + kTipsCommand = 'tips', + kUseBrandNewEngine = 'bnew', + kUseLegacyEngine = 'lgcy' +}; + +static CFStringRef project_web_url = CFSTR("http://aquaskk.sourceforge.jp/"); +static CFStringRef tips_url = CFSTR("http://aquaskk.sourceforge.jp/inside_aquaskk/"); + +// ====================================================================== +// ???????????+// ====================================================================== +static void InitializeKeyboardLayout() { + KeyboardLayoutIdentifier id = ClientConfiguration::theInstance().kbdLayoutId(); + KeyboardLayoutRef kbd; + + KLGetKeyboardLayoutWithIdentifier(id, &kbd); + KLSetCurrentKeyboardLayout(kbd); +} + +static void OpenURL(const CFStringRef str) { + CFURLRef url = CFURLCreateWithString(kCFAllocatorDefault, str, 0); + + LSOpenCFURLRef(url, 0); + + CFRelease(url); +} + +// ====================================================================== +// ??????????+// ====================================================================== +struct DeleteSession { + void operator()(const std::pair& obj) const { + delete obj.second; + } +}; + +SKKComponent& SKKComponent::theInstance() { + static SKKComponent obj; + return obj; +} + +SKKComponent::SKKComponent() : active_(0), menu_(0) { + // Nib ???????????????????? + CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(kIMBundleIdentifier)); + if(bundle) { + IBNibRef nib; + + OSStatus err = CreateNibReferenceWithCFBundle(bundle, CFSTR("Menu"), &nib); + if(err == noErr) { + err = CreateMenuFromNib(nib, CFSTR("AquaSKK"), &menu_); + DisposeNibReference(nib); + CFRetain(menu_); + } + + // ????????????????????????????????+ EventTypeSpec spec = { kEventClassCommand, kEventProcessCommand }; + InstallEventHandler(GetMenuEventTarget(menu_), &SKKComponent::menuEventHandler, 1, &spec, 0, 0); + } + + // ?????????????? + ClientMessageReceiver::start(kAquaSKKClientRunLoopMode); + + // AquaSKKServer ????+ ServerConnectionFactory::theInstance().prepareServer(); +} + +SKKComponent::~SKKComponent() { + std::for_each(sessions_.begin(), sessions_.end(), DeleteSession()); + + if(menu_) CFRelease(menu_); +} + +SKKSession& SKKComponent::Session() { + return *active_; +} + +// ====================================================================== +// Carbon ?????????????????? +// ====================================================================== +ComponentResult SKKComponent::ComponentOpen(const ComponentInstance instance) { + // ??????????+ ClientConfiguration::theInstance().reloadConfiguration(); + + sessions_[instance] = new SKKSession(instance); + + InitializeKeyboardLayout(); + + return noErr; +} + +ComponentResult SKKComponent::ComponentClose(const ComponentInstance instance) { + delete sessions_[instance]; + sessions_.erase(instance); + + return noErr; +} + +ComponentResult SKKComponent::ComponentCanDo(SInt16 selector) const { + switch(selector) { + case kComponentOpenSelect: + case kComponentCloseSelect: + case kComponentCanDoSelect: + case kComponentVersionSelect: + case kCMGetScriptLangSupport: + case kCMInitiateTextService: + case kCMTerminateTextService: + case kCMActivateTextService: + case kCMDeactivateTextService: + case kCMTextServiceEvent: + case kCMGetTextServiceMenu: + case kCMFixTextService: + case kCMHidePaletteWindows: + case kCMCopyTextServiceInputModeList: + case kCMSetTextServiceProperty: + return true; + } + + return false; +} + +ComponentResult SKKComponent::ComponentVersion() const { + return 0x00010000; +} + +// ====================================================================== +// TSM ?????????????????? +// ====================================================================== +ComponentResult SKKComponent::GetScriptLangSupport(ScriptLanguageSupportHandle* script) const { + if(!*script) { + *script = (ScriptLanguageSupportHandle)NewHandle(sizeof(SInt16)); + if(!*script) return memFullErr; + } else { + SetHandleSize((Handle)*script, sizeof(SInt16)); + } + + OSStatus result = MemError(); + if(result == noErr) { + (**script)->fScriptLanguageCount = 0; + } + + ScriptLanguageRecord slr = { kTextEncodingUnicodeDefault, langJapanese }; + result = PtrAndHand(&slr, (Handle)*script, sizeof(ScriptLanguageRecord)); + + if(result == noErr) { + (**script)->fScriptLanguageCount ++; + } else { + DisposeHandle((Handle)*script ); + *script = 0; + } + + return result; +} + +ComponentResult SKKComponent::InitiateTextService(const ComponentInstance) { + return noErr; +} + +ComponentResult SKKComponent::TerminateTextService(const ComponentInstance) { + return noErr; +} + +ComponentResult SKKComponent::ActivateTextService(const ComponentInstance instance) { + active_ = sessions_[instance]; + + // ??????????+ ClientConfiguration::theInstance().reloadConfiguration(); + + // ?????????????????????????+ ServerConnectionFactory::theInstance().newConnection().send(kBasicMessageActivated); + + // ??????????????????????? + InitializeKeyboardLayout(); + + return noErr; +} + +ComponentResult SKKComponent::DeactivateTextService(const ComponentInstance) { + return noErr; +} + +ComponentResult SKKComponent::TextServiceEvent(const EventRef event) { + // ???????? + return active_->HandleInput(event); +} + +ComponentResult SKKComponent::GetTextServiceMenu(MenuRef* menu) const { + *menu = menu_; + + return noErr; +} + +ComponentResult SKKComponent::FixTextService() { + active_->FixString(CFSTR("")); + + return noErr; +} + +ComponentResult SKKComponent::HidePaletteWindows() { + ServerConnectionFactory::theInstance().newConnection().send(kBasicMessageHidePalettes); + + return noErr; +} + +ComponentResult SKKComponent::CopyTextServiceInputModeList(CFDictionaryRef* modes) { + CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(kIMBundleIdentifier)); + if(!bundle) { + return noErr; + } + + CFDictionaryRef dict = CFBundleGetInfoDictionary(bundle); + if(!dict) { + return noErr; + } + + CFRetain(dict); + CFDictionaryRef tmp = (CFDictionaryRef)CFDictionaryGetValue(dict, kComponentBundleInputModeDictKey); + if(tmp) { + *modes = CFDictionaryCreateCopy(kCFAllocatorDefault, tmp); + } + CFRelease(dict); + + return noErr; +} + +ComponentResult SKKComponent::SetTextServiceProperty(TextServicePropertyTag tag, TextServicePropertyValue value) { + if(tag != kTextServiceInputModePropertyTag) { + return tsmComponentPropertyUnsupportedErr; + } + + static const struct { + SKK::InputMode skk; + CFStringRef tsm; + } modes[] = { + { SKK::Hirakana, kTextServiceInputModeJapanese }, + { SKK::Katakana, kTextServiceInputModeJapaneseKatakana }, + { SKK::Jisx0201Kana, kTextServiceInputModeJapaneseHalfWidthKana }, + { SKK::Jisx0208Latin, kTextServiceInputModeJapaneseFullWidthRoman }, + { SKK::Ascii, kTextServiceInputModeRoman }, + { SKK::Hirakana, 0 } + }; + + CFStringRef str = (CFStringRef)value; + for(int i = 0; modes[i].tsm != 0; ++ i) { + if(CFStringCompare(str, modes[i].tsm, 0) == 0) { + active_->SelectInputMode(modes[i].skk); + break; + } + } + + return noErr; +} + +// ====================================================================== +// ???????????+// ====================================================================== +void SKKComponent::NotifyInputMode(const CFStringRef mode) const { + ComponentDescription cd; + + cd.componentType = kTextService; + cd.componentSubType = kKeyboardInputMethodClass; + cd.componentManufacturer = 'askk'; + cd.componentFlags = 0; + cd.componentFlagsMask = 0; + + // ??????????????????????????+ TSMSelectInputMode(FindNextComponent(0, &cd), mode); +} + +// ====================================================================== +// ?????????????+// ====================================================================== +OSStatus SKKComponent::menuEventHandler(EventHandlerCallRef, EventRef event, void*) { + HICommand cmd; + + OSStatus result = GetEventParameter(event, kEventParamDirectObject, typeHICommand, 0, sizeof(cmd), 0, &cmd); + if(result == noErr) { + switch(cmd.commandID) { + case kAboutCommand: + ServerConnectionFactory::theInstance().newConnection().send(kSKKShowAboutBox); + break; + + case kPreferencesCommand: + ServerConnectionFactory::theInstance().newConnection().send(kSKKShowPreferencesBox); + break; + + case kProjectWebCommand: + OpenURL(project_web_url); + break; + + case kTipsCommand: + OpenURL(tips_url); + break; + + default: + std::cerr << "unknown menu event[" << cmd.commandID << "], " + << "index[" << cmd.menu.menuItemIndex << "]" << std::endl; + result = eventNotHandledErr; + break; + } + } else { + result = eventNotHandledErr; + } + + return result; +} Index: AquaSKK/src/component/SKKComponent.h diff -u /dev/null AquaSKK/src/component/SKKComponent.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKComponent.h Sun Aug 19 19:00:32 2007 @@ -0,0 +1,71 @@ +/* -*- C++ -*- + $Id: SKKComponent.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKComponent__ +#define INC__SKKComponent__ + +#include +#include +#include "SKK.h" + +class SKKSession; + +// TSM ??????????+class SKKComponent { + std::map sessions_; + SKKSession* active_; + MenuRef menu_; + + SKKComponent(); + static OSStatus menuEventHandler(EventHandlerCallRef chain, EventRef event, void* data); + +public: + static SKKComponent& theInstance(); + ~SKKComponent(); + + // ??????????????+ SKKSession& Session(); + + // Carbon ?????????????????? + ComponentResult ComponentOpen(const ComponentInstance instance); + ComponentResult ComponentClose(const ComponentInstance instance); + ComponentResult ComponentCanDo(SInt16 selector) const; + ComponentResult ComponentVersion() const; + + // TSM ?????????????????? + ComponentResult GetScriptLangSupport(ScriptLanguageSupportHandle* script) const; + ComponentResult InitiateTextService(const ComponentInstance instance); + ComponentResult TerminateTextService(const ComponentInstance instance); + ComponentResult ActivateTextService(const ComponentInstance instance); + ComponentResult DeactivateTextService(const ComponentInstance instance); + ComponentResult TextServiceEvent(const EventRef event); + ComponentResult GetTextServiceMenu(MenuRef* menu) const; + ComponentResult FixTextService(); + ComponentResult HidePaletteWindows(); + ComponentResult CopyTextServiceInputModeList(CFDictionaryRef* modes); + ComponentResult SetTextServiceProperty(TextServicePropertyTag tag, TextServicePropertyValue value); + + // ???????????+ void NotifyInputMode(const CFStringRef mode) const; +}; + +#endif Index: AquaSKK/src/component/SKKEntryPoint.cpp diff -u /dev/null AquaSKK/src/component/SKKEntryPoint.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKEntryPoint.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,215 @@ +/* + $Id: SKKEntryPoint.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "SKKComponent.h" + +// ====================================================================== +// ????????????起?????? +// ====================================================================== +class Invoke { + ComponentFunctionUPP function_; + +public: + Invoke(ProcPtr proc, ProcInfoType info) { + function_ = NewComponentFunctionUPP(proc, info); + } + + ~Invoke() { + DisposeComponentFunctionUPP(function_); + } + + ComponentResult operator()(ComponentParameters* params) { + return CallComponentFunction(params, function_); + } +}; + +// ====================================================================== +// ????????????群 +// ====================================================================== +pascal ComponentResult ComponentOpen_(ComponentInstance instance) { + return SKKComponent::theInstance().ComponentOpen(instance); +} + +pascal ComponentResult ComponentClose_(ComponentInstance instance) { + return SKKComponent::theInstance().ComponentClose(instance); +} + +pascal ComponentResult ComponentCanDo_(SInt16 selector) { + return SKKComponent::theInstance().ComponentCanDo(selector); +} + +pascal ComponentResult ComponentVersion_() { + return SKKComponent::theInstance().ComponentVersion(); +} + +pascal ComponentResult GetScriptLangSupport_(ScriptLanguageSupportHandle* ptr) { + return SKKComponent::theInstance().GetScriptLangSupport(ptr); +} + +pascal ComponentResult InitiateTextService_(const ComponentInstance instance) { + return SKKComponent::theInstance().InitiateTextService(instance); +} + +pascal ComponentResult TerminateTextService_(const ComponentInstance instance) { + return SKKComponent::theInstance().TerminateTextService(instance); +} + +pascal ComponentResult ActivateTextService_(const ComponentInstance instance) { + return SKKComponent::theInstance().ActivateTextService(instance); +} + +pascal ComponentResult DeactivateTextService_(const ComponentInstance instance) { + return SKKComponent::theInstance().DeactivateTextService(instance); +} + +pascal ComponentResult TextServiceEvent_(const EventRef event) { + return SKKComponent::theInstance().TextServiceEvent(event); +} + +pascal ComponentResult GetTextServiceMenu_(MenuRef* menu_ptr) { + return SKKComponent::theInstance().GetTextServiceMenu(menu_ptr); +} + +pascal ComponentResult FixTextService_() { + return SKKComponent::theInstance().FixTextService(); +} + +pascal ComponentResult HidePaletteWindows_() { + return SKKComponent::theInstance().HidePaletteWindows(); +} + +pascal ComponentResult CopyTextServiceInputModeList_(CFDictionaryRef* mode) { + return SKKComponent::theInstance().CopyTextServiceInputModeList(mode); +} + +pascal ComponentResult SetTextServiceProperty_(TextServicePropertyTag tag, TextServicePropertyValue value) { + return SKKComponent::theInstance().SetTextServiceProperty(tag, value); +} + +// ====================================================================== +// ??????????????群?????????;-) +// ====================================================================== +enum { + uppComponentOpen = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance))), + + uppComponentClose = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance))), + + uppComponentCanDo = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SInt16))), + + uppComponentVersion = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))), + + uppGetScriptLangSupport = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ScriptLanguageSupportHandle*))), + + uppInitiateTextService = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance))), + + uppTerminateTextService = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance))), + + uppActivateTextService = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance))), + + uppDeactivateTextService = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance))), + + uppTextServiceEvent = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(EventRef))), + + uppGetTextServiceMenu = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(MenuRef*))), + + uppFixTextService = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))), + + uppHidePaletteWindows = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))), + + uppCopyTextServiceInputModeList = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(CFDictionaryRef*))), + + uppSetTextServiceProperty = kPascalStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult))) + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(TextServicePropertyTag))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(TextServicePropertyValue))) +}; + +// ====================================================================== +// ?????????????? +// ====================================================================== +struct callback { + int selector; + ProcPtr addr; + ProcInfoType info; +}; + +// ====================================================================== +// ?????????????? +// ====================================================================== +static callback table[] = { + { kComponentOpenSelect, (ProcPtr)ComponentOpen_, uppComponentOpen }, + { kComponentCloseSelect, (ProcPtr)ComponentClose_, uppComponentClose }, + { kComponentCanDoSelect, (ProcPtr)ComponentCanDo_, uppComponentCanDo }, + { kComponentVersionSelect, (ProcPtr)ComponentVersion_, uppComponentVersion }, + { kCMGetScriptLangSupport, (ProcPtr)GetScriptLangSupport_, uppGetScriptLangSupport }, + { kCMInitiateTextService, (ProcPtr)InitiateTextService_, uppInitiateTextService }, + { kCMTerminateTextService, (ProcPtr)TerminateTextService_, uppTerminateTextService }, + { kCMActivateTextService, (ProcPtr)ActivateTextService_, uppActivateTextService }, + { kCMDeactivateTextService, (ProcPtr)DeactivateTextService_, uppDeactivateTextService }, + { kCMTextServiceEvent, (ProcPtr)TextServiceEvent_, uppTextServiceEvent }, + { kCMGetTextServiceMenu, (ProcPtr)GetTextServiceMenu_, uppGetTextServiceMenu }, + { kCMFixTextService, (ProcPtr)FixTextService_, uppFixTextService }, + { kCMHidePaletteWindows, (ProcPtr)HidePaletteWindows_, uppHidePaletteWindows }, + { kCMCopyTextServiceInputModeList, (ProcPtr)CopyTextServiceInputModeList_, uppCopyTextServiceInputModeList }, + { kCMSetTextServiceProperty, (ProcPtr)SetTextServiceProperty_, uppSetTextServiceProperty }, + { 0, 0, 0 } +}; + +// ====================================================================== +// ??????????? +// ====================================================================== +extern "C" +pascal ComponentResult SKKEntryPoint(ComponentParameters* params, Handle) { + for(callback* func = table; func->addr != 0; ++ func) { + if(params->what == func->selector) { + return Invoke(func->addr, func->info)(params); + } + } + + return badComponentSelector; +} Index: AquaSKK/src/component/SKKSession.cpp diff -u /dev/null AquaSKK/src/component/SKKSession.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKSession.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,420 @@ +/* -*- C++ -*- + $Id: SKKSession.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "ClientConfiguration.h" + +#include "BIM.h" +#include "SKKComponent.h" +#include "SKKSession.h" +#include "SKKConfig.h" + +SKKSession::SKKSession(const ComponentInstance instance) : instance_(instance) { +} + +// ???? +bool SKKSession::HandleInput(const EventRef event) { + // ?????????? + SKKEvent legacy_event(event); + + // ????????????????????? + if(!legacy_event) { + return false; + } + + // ????????????????? + if(legacy_event.Modifier() & cmdKey) { + return false; + } + + // ????????????????? + if((legacy_event.Modifier() & controlKey) && !SKKConfig::IsMappedKey(legacy_event)) { + return false; + } + + bool handled = legacyInput(legacy_event); + + //??????????????強???????????????????????? + if(bufsize_.curr == 0) { + hideFloatingWindow(); + } + + return handled; +} + +// ?????????+void SKKSession::SelectInputMode(SKK::InputMode mode) { + // ???????????? + switch(mode) { + case SKK::Hirakana: + if(!legacy_.isHiraganaInputMode()) { + legacy_.goHiraganaInputMode(); + } + break; + + case SKK::Katakana: + if(!legacy_.isZenKataInputMode()) { + legacy_.goZenKataInputMode(); + } + break; + + case SKK::Jisx0201Kana: + if(!legacy_.isHanKataInputMode()) { + legacy_.goHanKataInputMode(); + } + break; + + case SKK::Jisx0208Latin: + if(!legacy_.isZenAscInputMode()) { + legacy_.goZenAscInputMode(); + } + break; + + case SKK::Ascii: + if(!legacy_.isHanAscInputMode()) { + legacy_.goHanAscInputMode(); + } + break; + } +} + +Point SKKSession::GetInputPosition(long offset) const { + EventRef event = 0; + + // ????????????+ OSStatus status = CreateEvent(0, kEventClassTextInput, kEventTextInputOffsetToPos, 0, + kEventAttributeUserEvent, &event); + + // ?????????????????+ if(status == noErr) { + status = SetEventParameter(event, kEventParamTextInputSendComponentInstance, typeComponentInstance, + sizeof(ComponentInstance), &instance_); + } + + // ???????????? + if(status == noErr) { + long refcon = 1; + status = SetEventParameter(event, kEventParamTextInputSendRefCon, typeLongInteger, + sizeof(long), &refcon); + } + + // ?????? + if(status == noErr) { + status = SetEventParameter(event, kEventParamTextInputSendTextOffset, typeLongInteger, + sizeof(long), &offset); + } + + // ?? + if(status == noErr) { + status = SendTextInputEvent(event); + } + + // ???QD ??????????? + Point pt; + if(status == noErr) { + status = GetEventParameter(event, kEventParamTextInputReplyPoint, typeQDPoint, 0, + sizeof(Point), 0, &pt); + } + + if(event) { + ReleaseEvent(event); + } + + // 座??????+ CGRect mainscreen = CGDisplayBounds(CGMainDisplayID()); + pt.v = mainscreen.size.height - pt.v; + + return pt; +} + +void SKKSession::DisplayString(const CFStringRef str, int fixlen, int caretpos) { + updateActiveInputArea(str, sizeof(UniChar) * fixlen, sizeof(UniChar) * caretpos); +} + +void SKKSession::FixString(const CFStringRef str) { + long fixlen = CFStringGetLength(str); + + updateActiveInputArea(str, sizeof(UniChar) * fixlen, sizeof(UniChar) * fixlen); + + bufsize_.curr = bufsize_.prev = 0; +} + +void SKKSession::Terminate() { + bufsize_.curr = bufsize_.prev = 0; +} + +IMSessionInputMode& SKKSession::LegacyEngine() { + return legacy_; +} + +// ====================================================================== +// private method +// ====================================================================== + +void SKKSession::updateActiveInputArea(const CFStringRef str, int UniChar_fixlen, int UniChar_caretpos) { + EventRef event = 0; + + bufsize_.curr = CFStringGetLength(str); + + // ?????????+ OSErr error = CreateEvent(0, kEventClassTextInput, kEventTextInputUpdateActiveInputArea, 0, + kEventAttributeUserEvent, &event); + + // ?????????????????+ if(error == noErr) { + error = SetEventParameter(event, kEventParamTextInputSendComponentInstance, typeComponentInstance, + sizeof(ComponentInstance), &instance_); + } + + + // ???????????????+ if(error == noErr) { + long refcon = 1; + error = SetEventParameter(event, kEventParamTextInputSendRefCon, typeLongInteger, + sizeof(long), &refcon); + } + + // ?????????????????+ if(error == noErr) { + ScriptLanguageRecord scriptLanguageRecord; + scriptLanguageRecord.fScript = smJapanese; + scriptLanguageRecord.fLanguage = langJapanese; + + error = SetEventParameter(event, kEventParamTextInputSendSLRec, typeIntlWritingCode, + sizeof(ScriptLanguageRecord), &scriptLanguageRecord); + } + + // 確??????????? + if(error == noErr) { + error = SetEventParameter(event, kEventParamTextInputSendFixLen, typeLongInteger, + sizeof(long), &UniChar_fixlen); + } + + + // ?????????CS-32?????? + if(error == noErr) { + UniChar* buf = new UniChar[bufsize_.curr]; + + CFStringGetCharacters(str, CFRangeMake(0, bufsize_.curr), buf); + + error = SetEventParameter(event, kEventParamTextInputSendText, typeUnicodeText, + sizeof(UniChar) * bufsize_.curr, buf); + + delete[] buf; + } + + // ?????????????????????????????渡??????????????????????????+ if(error == noErr) { + TextRangeArray* update = (TextRangeArrayPtr)NewPtrClear(sizeof(short) + sizeof(TextRange) * 2); + + update->fNumOfRanges = 2; + + // ???????????+ update->fRange[0].fStart = 0; + update->fRange[0].fEnd = bufsize_.prev; + update->fRange[0].fHiliteStyle = 0; + + // ??????????+ update->fRange[1].fStart = 0; + update->fRange[1].fEnd = sizeof(UniChar) * bufsize_.curr - UniChar_fixlen; + update->fRange[1].fHiliteStyle = 0; + + // ??????????????????? + bufsize_.prev = update->fRange[1].fEnd; + + if(error == noErr) { + error = SetEventParameter(event, kEventParamTextInputSendUpdateRng, typeTextRangeArray, + sizeof(short) + sizeof(TextRange) * 2, update); + } + + DisposePtr((Ptr)update); + } + + // ???????????????????? + if(error == noErr) { + TextRangeArray* highlight = 0; + + if(UniChar_fixlen == 0) { + highlight = (TextRangeArrayPtr)NewPtrClear(sizeof(short) + sizeof(TextRange) * 2); + + highlight->fNumOfRanges = 2; + + highlight->fRange[0].fStart = 0; + highlight->fRange[0].fEnd = sizeof(UniChar) * bufsize_.curr - UniChar_fixlen; + highlight->fRange[1].fStart = UniChar_caretpos; + highlight->fRange[1].fEnd = UniChar_caretpos; + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + highlight->fRange[0].fHiliteStyle = kTSMHiliteRawText; + highlight->fRange[1].fHiliteStyle = kTSMHiliteCaretPosition; +#else + highlight->fRange[0].fHiliteStyle = kRawText; + highlight->fRange[1].fHiliteStyle = kCaretPosition; +#endif + + error = SetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray, + sizeof(short) + sizeof(TextRange) * 2, highlight); + } else { + highlight = (TextRangeArrayPtr)NewPtrClear(sizeof(short) + sizeof(TextRange) * 1); + + highlight->fNumOfRanges = 1; + + highlight->fRange[0].fStart = UniChar_caretpos; + highlight->fRange[0].fEnd = UniChar_caretpos; + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + highlight->fRange[0].fHiliteStyle = kTSMHiliteCaretPosition; +#else + highlight->fRange[0].fHiliteStyle = kCaretPosition; +#endif + + error = SetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray, + sizeof(short) + sizeof(TextRange) * 1, highlight); + } + + DisposePtr((Ptr)highlight); + } + + // ?????? + if(error == noErr) { + TextRange range; + + range.fStart = 0; + range.fEnd = sizeof(UniChar) * bufsize_.curr - UniChar_fixlen; + + error = SetEventParameter(event, kEventParamTextInputSendPinRng, typeTextRange, + sizeof(TextRange), &range); + } + + // ?? + if(error == noErr) { + error = SendTextInputEvent(event); + ReleaseEvent(event); + } +} + +// ?????????対?????????+bool SKKSession::legacyInput(const SKKEvent& event) { + switch(event.KeyCode()) { + case 0x41: // . + case 0x43: // * + case 0x45: // + + case 0x4b: // / + case 0x4e: // - + case 0x51: // = + case 0x52: // 0 + case 0x53: // 1 + case 0x54: // 2 + case 0x55: // 3 + case 0x56: // 4 + case 0x57: // 5 + case 0x58: // 6 + case 0x59: // 7 + case 0x5b: // 8 + case 0x5c: // 9 + case 0x5f: // , + if(ClientConfiguration::theInstance().isNumericKeypad_HalfWidth()) { + return legacy_.handleNumKey(event.CharCode()); + } else { + return legacy_.handleInput(event); + } + break; + + case 0x66: // ?? + if(SKKConfig::UseEisuuToSetHenkanPoint()) { + return legacy_.handleInput(SKKConfig::SetHenkanPointKey()); + } else { + return true; + } + break; + + case 0x68: // ??? + if(SKKConfig::UseKanaToSetHenkanPoint()) { + return legacy_.handleInput(SKKConfig::SetHenkanPointKey()); + } else { + return legacy_.handleInput(SKKConfig::KanaModeKey()); + } + } + + switch(event.CharCode()) { + case kNullCharCode: + return true; + + case kBackspaceCharCode: + return legacy_.handleBackSpace(); + + case kTabCharCode: + return legacy_.handleTab(); + + case kEnterCharCode: + case kReturnCharCode: + return legacy_.handleReturn(); + + case kLeftArrowCharCode: + case kRightArrowCharCode: + case kUpArrowCharCode: + case kDownArrowCharCode: + return legacy_.handleArrow(event); + + default: + if(event == SKKConfig::CancelKey()) { + return legacy_.handleCg(); + } + if(event == SKKConfig::PasteKey()) { + return legacy_.handleCy(); + } + if((0x20 <= event && event <= 0x7e) || SKKConfig::IsMappedKey(event)) { + return legacy_.handleInput(event); + } + } + + return false; +} + +void SKKSession::hideFloatingWindow() const { + EventRef event = 0; + + // kEventClassTextInput/kEventTextInputShowHideBottomWindow??arbon?????????+ OSErr error = CreateEvent(0, kEventClassTextInput, kEventTextInputShowHideBottomWindow, 0, + kEventAttributeUserEvent, &event); + + if(error == noErr) { + error = SetEventParameter(event, kEventParamTextInputSendComponentInstance, typeComponentInstance, + sizeof(ComponentInstance), &instance_); + } + + if(error == noErr) { + ScriptLanguageRecord slr = { smJapanese, langJapanese }; + error = SetEventParameter(event, kEventParamTextInputSendSLRec, typeIntlWritingCode, + sizeof(ScriptLanguageRecord), &slr); + } + + if(error == noErr) { + Boolean showBottomWindow = false; + error = SetEventParameter(event, kEventParamTextInputSendShowHide, typeBoolean, + sizeof(Boolean), &showBottomWindow); + } + + if(error == noErr) { + error = SendTextInputEvent(event); + ReleaseEvent(event); + } +} Index: AquaSKK/src/component/SKKSession.h diff -u /dev/null AquaSKK/src/component/SKKSession.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKSession.h Sun Aug 19 19:00:32 2007 @@ -0,0 +1,68 @@ +/* -*- C++ -*- + $Id: SKKSession.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKSession__ +#define INC__SKKSession__ + +#include + +#include "SKK.h" +#include "SKKEvent.h" +#include "IMSessionInputMode.h" + +class SKKSession { + ComponentInstance instance_; + IMSessionInputMode legacy_; + + struct buffer_size { + long prev; + long curr; + buffer_size() : prev(0), curr(0) {} + }; + + buffer_size bufsize_; + + void updateActiveInputArea(const CFStringRef str, int fixlen, int caretpos); + bool legacyInput(const SKKEvent& event); + void hideFloatingWindow() const; + +public: + SKKSession(const ComponentInstance instance); + + // ????????????+ bool HandleInput(const EventRef event); + + // ?????????+ void SelectInputMode(SKK::InputMode mode); + + // ???座???? + Point GetInputPosition(long offset = 0) const; + + // ??? + void DisplayString(const CFStringRef str, int fixlen, int caretpos = -1); + void FixString(const CFStringRef str); + void Terminate(); + + IMSessionInputMode& LegacyEngine(); +}; + +#endif Index: AquaSKK/src/component/WordRegisterMode.cpp diff -u /dev/null AquaSKK/src/component/WordRegisterMode.cpp:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/WordRegisterMode.cpp Sun Aug 19 19:00:32 2007 @@ -0,0 +1,236 @@ +/* + $Id: WordRegisterMode.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002 phonohawk + Copyright (C) 2006-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "BIM.h" +#include "CppCFData.h" +#include "ParentInputMode.h" +#include "IMSessionInputMode.h" +#include "WordRegisterMode.h" + +#include "SKKComponent.h" +#include "SKKSession.h" + +WordRegisterMode::WordRegisterMode(ChildInputMode& src, const CppCFString& word) + : ParentInputMode(), owner(&src), caret(0) { + // [??:word] + title.append('[').append(0x767b).append(0x9332).append(':').append(word).append(']'); + + imsession_input_mode = &SKKComponent::theInstance().Session().LegacyEngine(); +} + +bool WordRegisterMode::handleBackSpace() { + if(getReallyCurrentInputMode().handleBackSpace()) { + // really current input mode?true??????????true???? + redisplay(); + return true; + } + + ChildInputMode& input_mode = getReallyCurrentInputMode(); + + if(!input_mode.handleBackSpace()) { + // ???????????????????????B??????? + if(caret > 0) { + buffer.eraseCharAt(caret-1); + caret--; + } + } + //redisplay(); + display(CppCFString()); + return true; // ??????????????B +} + +bool WordRegisterMode::handleReturn() { + ChildInputMode& input_mode = getReallyCurrentInputMode(); + + if(!input_mode.handleReturn()) { + fix(input_mode.getStringToFix()); + + if(buffer.length() > 0) { + (dynamic_cast(owner))->wordRegistrationFinished(); // ??????B + } else { + (dynamic_cast(owner))->wordRegistrationCanceled(); // ??????? + } + } + return true; +} + +bool WordRegisterMode::handleArrow(SKKChar skkchar) { + if(getReallyCurrentInputMode().handleArrow(skkchar)) { + return true; + } + + switch(skkchar) { + case kLeftArrowCharCode: // ? + if(caret > 0) { + -- caret; + } + break; + case kRightArrowCharCode: // ? + if(caret < buffer.length()) { + ++ caret; + } + break; + case kUpArrowCharCode: // ?? + caret = 0; + break; + case kDownArrowCharCode: // ?? + caret = buffer.length(); + break; + } + + display(CppCFString()); + + return true; +} + +bool WordRegisterMode::handleCg() { + if(getReallyCurrentInputMode().handleCg()) { + // really current input mode?true??????????true???? + redisplay(); + return true; + } + + getReallyCurrentInputMode().terminate(); + + // buffer?????? + buffer.clear(); + caret = 0; + (dynamic_cast(owner))->wordRegistrationCanceled(); // ??????? + return true; +} + +bool WordRegisterMode::handleCy() { + if(getReallyCurrentInputMode().handleCy()) { + // really current input mode?true??????????true???? + return true; + } + + PasteboardRef pasteboard; + + PasteboardCreate(kPasteboardClipboard, &pasteboard); + PasteboardSynchronize(pasteboard); + + ItemCount items; + PasteboardGetItemCount(pasteboard, &items); + for(UInt32 pos = 0; pos < items; ++ pos) { + PasteboardItemID id; + // index ? 1 based + if(PasteboardGetItemIdentifier(pasteboard, pos + 1, &id) < 0) continue; + + CFDataRef data; + CppCFString str; + if(PasteboardCopyItemFlavorData(pasteboard, id, CFSTR("public.utf8-plain-text"), &data) == 0) { + CFStringRef tmp = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(data), CFDataGetLength(data), + kCFStringEncodingUTF8, false); + str = CppCFString(tmp); + CFRelease(tmp); + } else { + if(PasteboardCopyItemFlavorData(pasteboard, id, CFSTR("com.apple.traditional-mac-plain-text"), &data) < 0) { + continue; + } + CFStringRef tmp = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(data), CFDataGetLength(data), + CFStringGetSystemEncoding(), false); + str = CppCFString(tmp); + CFRelease(tmp); + } + CFRelease(data); + + buffer.insert(caret, str); + caret += str.length(); + display(CppCFString()); + + break; + } + CFRelease(pasteboard); + + return true; +} + +bool WordRegisterMode::handleTab() { + ParentInputMode::handleTab(); + return true; // ??H?? +} + +bool WordRegisterMode::handleInput(SKKChar skkchar) { + ChildInputMode* input_mode; + if(is_kanji_mode) { + input_mode = &kanji_conversion_mode; + } else if(is_ascii_conv_mode) { + input_mode = &ascii_conversion_mode; + } else { + if(skkchar >= 'A' && skkchar <= 'Z' && skkchar != 'L' && //XXX + !isHanAscInputMode() && !isZenAscInputMode()) { + is_kanji_mode = true; + input_mode = &kanji_conversion_mode; + } else { + input_mode = current_input_mode; + } + } + + bool do_fix = input_mode->handleInput(skkchar); + if(do_fix) { + fixUnlessIgnore(input_mode->getStringToFix()); + } + displayUnlessIgnore(input_mode->getStringToDisplay()); + + return true; +} + +CppCFString WordRegisterMode::getContent() const { + return buffer; +} + +void WordRegisterMode::redisplay() { + ChildInputMode& input_mode = getReallyCurrentInputMode(); + + CppCFString str_to_display = input_mode.getStringToDisplay(); + if(str_to_display.length() == 0 || + (str_to_display.length() > 0 && str_to_display[0] != kIgnoreThis)) // kIgnoreThis???????? + { + display(str_to_display); + } +} + +void WordRegisterMode::fix(const CppCFString& str_to_fix) { + if(str_to_fix.length() > 0 && str_to_fix[0] == kIgnoreThis) return; + + // ??????????????????? + buffer.insert(caret,str_to_fix); + + // ?????????????????????? + caret += str_to_fix.length(); + + imsession_input_mode->display(CppCFString(title).append('[') + .append(buffer.substring(0, caret)).append(kCaret) + .append(buffer.substring(caret)).append(']')); +} + +void WordRegisterMode::display(const CppCFString& str_to_display) { + if(str_to_display.length() > 0 && str_to_display[0] == kIgnoreThis) return; + + // ??? + // [?*?][? + imsession_input_mode->display(CppCFString(title).append('[') + .append(buffer.substring(0, caret)).append(str_to_display).append(kCaret) + .append(buffer.substring(caret)).append(']')); +} Index: AquaSKK/src/component/WordRegisterMode.h diff -u /dev/null AquaSKK/src/component/WordRegisterMode.h:1.1.2.1 --- /dev/null Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/WordRegisterMode.h Sun Aug 19 19:00:32 2007 @@ -0,0 +1,61 @@ +/* + $Id: WordRegisterMode.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2002 phonohawk + Copyright (C) 2006-2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__WordRegisterMode__ +#define INC__WordRegisterMode__ + +#include "ParentInputMode.h" + +class IMSessionInputMode; +class ChildInputMode; +class CppCFString; + +class WordRegisterMode: public ParentInputMode { +protected: + class ChildInputMode* owner; + CppCFString title; + CppCFString buffer; + unsigned caret; + + IMSessionInputMode* imsession_input_mode; + +public: + // title??????*???????? + // owner?RegistrationStarter??????????????B + WordRegisterMode(class ChildInputMode& owner, const CppCFString& word); + virtual ~WordRegisterMode() {} + + virtual bool handleReturn(); + virtual bool handleBackSpace(); + virtual bool handleArrow(SKKChar skkchar); + virtual bool handleCg(); + virtual bool handleCy(); + virtual bool handleTab(); + virtual bool handleInput(SKKChar skkchar); + virtual void fix(const CppCFString& str_to_fix); + virtual void display(const CppCFString& str_to_display); + virtual void redisplay(); + virtual CppCFString getContent() const; +}; + +#endif // INC__WordRegisterMode__ From t-suwa users.sourceforge.jp Sun Aug 19 23:20:53 2007 From: t-suwa users.sourceforge.jp (Tomotaka SUWA) Date: Sun, 19 Aug 2007 23:20:53 +0900 Subject: [aquaskk-changes 343] CVS update: AquaSKK/src/component Message-ID: <20070819142053.433C52AC00F@users.sourceforge.jp> Index: AquaSKK/src/component/SKK.r diff -u AquaSKK/src/component/SKK.r:1.1.2.1 AquaSKK/src/component/SKK.r:1.1.2.2 --- AquaSKK/src/component/SKK.r:1.1.2.1 Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKK.r Sun Aug 19 23:20:53 2007 @@ -1,5 +1,5 @@ /* - $Id: SKK.r,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + $Id: SKK.r,v 1.1.2.2 2007/08/19 14:20:53 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -60,7 +60,7 @@ #define kAquaSKKBaseResouceID 16384 #define kAquaSKKComponentFlags 0x8000 + smJapanese * 0x100 + langJapanese -// "jp.sourceforge.AquaSKKInputMethod" ? pascal ??? +// "jp.sourceforge.AquaSKKInputMethod" ??pascal ????? data 'cbnm' (0) { $"216a 702e 736f 7572 6365 666f 7267 652e" $"4171 7561 534b 4b49 6e70 7574 4d65 7468" Index: AquaSKK/src/component/SKKComponent.h diff -u AquaSKK/src/component/SKKComponent.h:1.1.2.1 AquaSKK/src/component/SKKComponent.h:1.1.2.2 --- AquaSKK/src/component/SKKComponent.h:1.1.2.1 Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKComponent.h Sun Aug 19 23:20:53 2007 @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: SKKComponent.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + $Id: SKKComponent.h,v 1.1.2.2 2007/08/19 14:20:53 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -25,7 +25,6 @@ #include #include -#include "SKK.h" class SKKSession; Index: AquaSKK/src/component/WordRegisterMode.cpp diff -u AquaSKK/src/component/WordRegisterMode.cpp:1.1.2.1 AquaSKK/src/component/WordRegisterMode.cpp:1.1.2.2 --- AquaSKK/src/component/WordRegisterMode.cpp:1.1.2.1 Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/WordRegisterMode.cpp Sun Aug 19 23:20:53 2007 @@ -1,5 +1,5 @@ /* - $Id: WordRegisterMode.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + $Id: WordRegisterMode.cpp,v 1.1.2.2 2007/08/19 14:20:53 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -32,7 +32,7 @@ WordRegisterMode::WordRegisterMode(ChildInputMode& src, const CppCFString& word) : ParentInputMode(), owner(&src), caret(0) { - // [??:word] + // [??:word] title.append('[').append(0x767b).append(0x9332).append(':').append(word).append(']'); imsession_input_mode = &SKKComponent::theInstance().Session().LegacyEngine(); @@ -40,7 +40,7 @@ bool WordRegisterMode::handleBackSpace() { if(getReallyCurrentInputMode().handleBackSpace()) { - // really current input mode?true??????????true???? + // really current input mode??rue???????????????true?????? redisplay(); return true; } @@ -48,7 +48,7 @@ ChildInputMode& input_mode = getReallyCurrentInputMode(); if(!input_mode.handleBackSpace()) { - // ???????????????????????B??????? + // ???????????????????????????????????????? if(caret > 0) { buffer.eraseCharAt(caret-1); caret--; @@ -56,7 +56,7 @@ } //redisplay(); display(CppCFString()); - return true; // ??????????????B + return true; // ?????????????????????? } bool WordRegisterMode::handleReturn() { @@ -66,9 +66,9 @@ fix(input_mode.getStringToFix()); if(buffer.length() > 0) { - (dynamic_cast(owner))->wordRegistrationFinished(); // ??????B + (dynamic_cast(owner))->wordRegistrationFinished(); // ????????? } else { - (dynamic_cast(owner))->wordRegistrationCanceled(); // ??????? + (dynamic_cast(owner))->wordRegistrationCanceled(); // ????????? } } return true; @@ -80,20 +80,20 @@ } switch(skkchar) { - case kLeftArrowCharCode: // ? + case kLeftArrowCharCode: // ? if(caret > 0) { -- caret; } break; - case kRightArrowCharCode: // ? + case kRightArrowCharCode: // ?? if(caret < buffer.length()) { ++ caret; } break; - case kUpArrowCharCode: // ?? + case kUpArrowCharCode: // ??? caret = 0; break; - case kDownArrowCharCode: // ?? + case kDownArrowCharCode: // ?? caret = buffer.length(); break; } @@ -105,23 +105,23 @@ bool WordRegisterMode::handleCg() { if(getReallyCurrentInputMode().handleCg()) { - // really current input mode?true??????????true???? + // really current input mode??rue???????????????true?????? redisplay(); return true; } getReallyCurrentInputMode().terminate(); - // buffer?????? + // buffer????????? buffer.clear(); caret = 0; - (dynamic_cast(owner))->wordRegistrationCanceled(); // ??????? + (dynamic_cast(owner))->wordRegistrationCanceled(); // ????????? return true; } bool WordRegisterMode::handleCy() { if(getReallyCurrentInputMode().handleCy()) { - // really current input mode?true??????????true???? + // really current input mode??rue???????????????true?????? return true; } @@ -134,7 +134,7 @@ PasteboardGetItemCount(pasteboard, &items); for(UInt32 pos = 0; pos < items; ++ pos) { PasteboardItemID id; - // index ? 1 based + // index ??1 based if(PasteboardGetItemIdentifier(pasteboard, pos + 1, &id) < 0) continue; CFDataRef data; @@ -168,7 +168,7 @@ bool WordRegisterMode::handleTab() { ParentInputMode::handleTab(); - return true; // ??H?? + return true; // 常????? } bool WordRegisterMode::handleInput(SKKChar skkchar) { @@ -205,7 +205,7 @@ CppCFString str_to_display = input_mode.getStringToDisplay(); if(str_to_display.length() == 0 || - (str_to_display.length() > 0 && str_to_display[0] != kIgnoreThis)) // kIgnoreThis???????? + (str_to_display.length() > 0 && str_to_display[0] != kIgnoreThis)) // kIgnoreThis??????????? { display(str_to_display); } @@ -214,10 +214,10 @@ void WordRegisterMode::fix(const CppCFString& str_to_fix) { if(str_to_fix.length() > 0 && str_to_fix[0] == kIgnoreThis) return; - // ??????????????????? + // ?????????????????????????? buffer.insert(caret,str_to_fix); - // ?????????????????????? + // ??????????????????????移?????? caret += str_to_fix.length(); imsession_input_mode->display(CppCFString(title).append('[') @@ -228,8 +228,8 @@ void WordRegisterMode::display(const CppCFString& str_to_display) { if(str_to_display.length() > 0 && str_to_display[0] == kIgnoreThis) return; - // ??? - // [?*?][? + // ??? + // [????[? imsession_input_mode->display(CppCFString(title).append('[') .append(buffer.substring(0, caret)).append(str_to_display).append(kCaret) .append(buffer.substring(caret)).append(']')); Index: AquaSKK/src/component/WordRegisterMode.h diff -u AquaSKK/src/component/WordRegisterMode.h:1.1.2.1 AquaSKK/src/component/WordRegisterMode.h:1.1.2.2 --- AquaSKK/src/component/WordRegisterMode.h:1.1.2.1 Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/WordRegisterMode.h Sun Aug 19 23:20:53 2007 @@ -1,5 +1,5 @@ /* - $Id: WordRegisterMode.h,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + $Id: WordRegisterMode.h,v 1.1.2.2 2007/08/19 14:20:53 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -40,8 +40,8 @@ IMSessionInputMode* imsession_input_mode; public: - // title??????*???????? - // owner?RegistrationStarter??????????????B + // title????????*???????????? + // owner??egistrationStarter?????????????????????? WordRegisterMode(class ChildInputMode& owner, const CppCFString& word); virtual ~WordRegisterMode() {} From t-suwa users.sourceforge.jp Sun Aug 26 01:32:42 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:32:42 +0900 Subject: [aquaskk-changes 344] CVS update: AquaSKK/src/test Message-ID: <1188059562.182122.3165.nullmailer@users.sourceforge.jp> From t-suwa users.sourceforge.jp Sun Aug 26 01:34:44 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:34:44 +0900 Subject: [aquaskk-changes 345] CVS update: AquaSKK/proj Message-ID: <1188059684.810143.4371.nullmailer@users.sourceforge.jp> Index: AquaSKK/proj/AquaSKKInputMethod-Info.plist diff -u AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.2 AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.3 --- AquaSKK/proj/AquaSKKInputMethod-Info.plist:1.1.2.2 Sun Aug 19 19:00:24 2007 +++ AquaSKK/proj/AquaSKKInputMethod-Info.plist Sun Aug 26 01:34:44 2007 @@ -15,11 +15,11 @@ CFBundlePackageType thng CFBundleShortVersionString - brand-new-engine 0.1 + brand-new-engine 0.2 CFBundleSignature askk CFBundleVersion - 2007-08-19 + 2007-08-26 CSResourcesFileMapped yes tsInputMethodIconFileKey Index: AquaSKK/proj/AquaSKKServer-Info.plist diff -u AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.2 AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.3 --- AquaSKK/proj/AquaSKKServer-Info.plist:1.1.2.2 Sun Aug 19 19:00:24 2007 +++ AquaSKK/proj/AquaSKKServer-Info.plist Sun Aug 26 01:34:44 2007 @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - brand-new-engine 0.1 + brand-new-engine 0.2 CFBundleSignature askk CFBundleVersion - 2007-08-19 + 2007-08-26 NSMainNibFile Principal NSPrincipalClass From t-suwa users.sourceforge.jp Sun Aug 26 01:34:45 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:34:45 +0900 Subject: [aquaskk-changes 346] CVS update: AquaSKK/proj/AquaSKK.xcodeproj Message-ID: <1188059685.010274.4379.nullmailer@users.sourceforge.jp> Index: AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj diff -u AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.2 AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.3 --- AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj:1.1.2.2 Sun Aug 19 19:00:27 2007 +++ AquaSKK/proj/AquaSKK.xcodeproj/project.pbxproj Sun Aug 26 01:34:44 2007 @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + D313A5270C808483006DA355 /* SKKKeymapEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D313A5240C808483006DA355 /* SKKKeymapEntry.cpp */; }; + D3416B9F0C7DC65300E845F8 /* SKKPreProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3416B9A0C7DC65300E845F8 /* SKKPreProcessor.cpp */; }; D34E8D9F0C76B23E001CD839 /* SKK.r in Rez */ = {isa = PBXBuildFile; fileRef = D34E8D990C76B23E001CD839 /* SKK.r */; }; D34E8DA00C76B23E001CD839 /* SKKComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8D9A0C76B23E001CD839 /* SKKComponent.cpp */; }; D34E8DA20C76B23E001CD839 /* SKKEntryPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D34E8D9C0C76B23E001CD839 /* SKKEntryPoint.cpp */; }; @@ -95,6 +97,8 @@ D37896C90C759A4800BE9E85 /* AquaSKK-Katakana.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C30C759A4800BE9E85 /* AquaSKK-Katakana.tif */; }; D37896CA0C759A4800BE9E85 /* AquaSKK-Roman.tif in Resources */ = {isa = PBXBuildFile; fileRef = D37896C40C759A4800BE9E85 /* AquaSKK-Roman.tif */; }; D37896E10C759B3B00BE9E85 /* AquaSKKServer.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = D37894180C74851300BE9E85 /* AquaSKKServer.app */; }; + D3A256AC0C7DD6B4007A6A1A /* keymap.conf in Resources */ = {isa = PBXBuildFile; fileRef = D3A256AB0C7DD6B4007A6A1A /* keymap.conf */; }; + D3C4FFC00C7EF88E007AE470 /* SKKKeymap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3C4FFBE0C7EF88E007AE470 /* SKKKeymap.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -135,6 +139,13 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + D313A5240C808483006DA355 /* SKKKeymapEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKKeymapEntry.cpp; path = ../src/keybindings/SKKKeymapEntry.cpp; sourceTree = SOURCE_ROOT; }; + D313A5250C808483006DA355 /* SKKKeymapEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKKeymapEntry.h; path = ../src/keybindings/SKKKeymapEntry.h; sourceTree = SOURCE_ROOT; }; + D313A5260C808483006DA355 /* SKKKeyState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKKeyState.h; path = ../src/keybindings/SKKKeyState.h; sourceTree = SOURCE_ROOT; }; + D3416B970C7DC65300E845F8 /* SKKEventParam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKEventParam.h; path = ../src/keybindings/SKKEventParam.h; sourceTree = SOURCE_ROOT; }; + D3416B9A0C7DC65300E845F8 /* SKKPreProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKPreProcessor.cpp; path = ../src/keybindings/SKKPreProcessor.cpp; sourceTree = SOURCE_ROOT; }; + D3416B9B0C7DC65300E845F8 /* SKKPreProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKPreProcessor.h; path = ../src/keybindings/SKKPreProcessor.h; sourceTree = SOURCE_ROOT; }; + D3416BA10C7DC67600E845F8 /* GenericStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenericStateMachine.h; path = ../src/statemachine/GenericStateMachine.h; sourceTree = SOURCE_ROOT; }; D34E8D990C76B23E001CD839 /* SKK.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = SKK.r; path = ../src/component/SKK.r; sourceTree = SOURCE_ROOT; }; D34E8D9A0C76B23E001CD839 /* SKKComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKComponent.cpp; path = ../src/component/SKKComponent.cpp; sourceTree = SOURCE_ROOT; }; D34E8D9B0C76B23E001CD839 /* SKKComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKComponent.h; path = ../src/component/SKKComponent.h; sourceTree = SOURCE_ROOT; }; @@ -267,6 +278,9 @@ D37896C20C759A4800BE9E85 /* AquaSKK-InputMethod.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-InputMethod.tif"; path = "../Icons/AquaSKK-InputMethod.tif"; sourceTree = SOURCE_ROOT; }; D37896C30C759A4800BE9E85 /* AquaSKK-Katakana.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-Katakana.tif"; path = "../Icons/AquaSKK-Katakana.tif"; sourceTree = SOURCE_ROOT; }; D37896C40C759A4800BE9E85 /* AquaSKK-Roman.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "AquaSKK-Roman.tif"; path = "../Icons/AquaSKK-Roman.tif"; sourceTree = SOURCE_ROOT; }; + D3A256AB0C7DD6B4007A6A1A /* keymap.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = keymap.conf; path = ../src/keybindings/keymap.conf; sourceTree = SOURCE_ROOT; }; + D3C4FFBE0C7EF88E007AE470 /* SKKKeymap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SKKKeymap.cpp; path = ../src/keybindings/SKKKeymap.cpp; sourceTree = SOURCE_ROOT; }; + D3C4FFBF0C7EF88E007AE470 /* SKKKeymap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKKKeymap.h; path = ../src/keybindings/SKKKeymap.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -443,6 +457,15 @@ D378942D0C74886700BE9E85 /* keybindings */ = { isa = PBXGroup; children = ( + D3A256AB0C7DD6B4007A6A1A /* keymap.conf */, + D3416B9B0C7DC65300E845F8 /* SKKPreProcessor.h */, + D3416B9A0C7DC65300E845F8 /* SKKPreProcessor.cpp */, + D3416B970C7DC65300E845F8 /* SKKEventParam.h */, + D3C4FFBF0C7EF88E007AE470 /* SKKKeymap.h */, + D3C4FFBE0C7EF88E007AE470 /* SKKKeymap.cpp */, + D313A5250C808483006DA355 /* SKKKeymapEntry.h */, + D313A5240C808483006DA355 /* SKKKeymapEntry.cpp */, + D313A5260C808483006DA355 /* SKKKeyState.h */, ); name = keybindings; sourceTree = ""; @@ -450,6 +473,7 @@ D378942E0C74887500BE9E85 /* statemachine */ = { isa = PBXGroup; children = ( + D3416BA10C7DC67600E845F8 /* GenericStateMachine.h */, ); name = statemachine; sourceTree = ""; @@ -844,6 +868,7 @@ D37896C80C759A4800BE9E85 /* AquaSKK-InputMethod.tif in Resources */, D37896C90C759A4800BE9E85 /* AquaSKK-Katakana.tif in Resources */, D37896CA0C759A4800BE9E85 /* AquaSKK-Roman.tif in Resources */, + D3A256AC0C7DD6B4007A6A1A /* keymap.conf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -901,6 +926,9 @@ D34E8DC70C76BA4D001CD839 /* WordRegisterMode.cpp in Sources */, D34E8E0E0C77B119001CD839 /* BIMInputEvents.cpp in Sources */, D34E8E150C77B890001CD839 /* BIM.cpp in Sources */, + D3416B9F0C7DC65300E845F8 /* SKKPreProcessor.cpp in Sources */, + D3C4FFC00C7EF88E007AE470 /* SKKKeymap.cpp in Sources */, + D313A5270C808483006DA355 /* SKKKeymapEntry.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From t-suwa users.sourceforge.jp Sun Aug 26 01:34:45 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:34:45 +0900 Subject: [aquaskk-changes 347] CVS update: AquaSKK/src/component Message-ID: <1188059685.211171.4388.nullmailer@users.sourceforge.jp> Index: AquaSKK/src/component/SKKComponent.cpp diff -u AquaSKK/src/component/SKKComponent.cpp:1.1.2.1 AquaSKK/src/component/SKKComponent.cpp:1.1.2.2 --- AquaSKK/src/component/SKKComponent.cpp:1.1.2.1 Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKComponent.cpp Sun Aug 26 01:34:45 2007 @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: SKKComponent.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + $Id: SKKComponent.cpp,v 1.1.2.2 2007/08/25 16:34:45 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -35,6 +35,7 @@ #include "SKKComponent.h" #include "SKKSession.h" +#include "SKKPreProcessor.h" enum { kAboutCommand = 'abou', @@ -99,11 +100,14 @@ InstallEventHandler(GetMenuEventTarget(menu_), &SKKComponent::menuEventHandler, 1, &spec, 0, 0); } - // ?????????????? + // ?????????????? ClientMessageReceiver::start(kAquaSKKClientRunLoopMode); - // AquaSKKServer ????+ // AquaSKKServer ???? ServerConnectionFactory::theInstance().prepareServer(); + + // ??????????????+ SKKPreProcessor::theInstance().Initialize(); } SKKComponent::~SKKComponent() { Index: AquaSKK/src/component/SKKSession.cpp diff -u AquaSKK/src/component/SKKSession.cpp:1.1.2.1 AquaSKK/src/component/SKKSession.cpp:1.1.2.2 --- AquaSKK/src/component/SKKSession.cpp:1.1.2.1 Sun Aug 19 19:00:32 2007 +++ AquaSKK/src/component/SKKSession.cpp Sun Aug 26 01:34:45 2007 @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: SKKSession.cpp,v 1.1.2.1 2007/08/19 10:00:32 t-suwa Exp $ + $Id: SKKSession.cpp,v 1.1.2.2 2007/08/25 16:34:45 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -25,6 +25,7 @@ #include "BIM.h" #include "SKKComponent.h" #include "SKKSession.h" +#include "SKKPreProcessor.h" #include "SKKConfig.h" SKKSession::SKKSession(const ComponentInstance instance) : instance_(instance) { @@ -32,6 +33,9 @@ // ???? bool SKKSession::HandleInput(const EventRef event) { + SKKEventParam param = SKKPreProcessor::theInstance().Execute(event); + std::cerr << param.dump() << std::endl; + // ?????????? SKKEvent legacy_event(event); @@ -139,8 +143,8 @@ } // 座??????- CGRect mainscreen = CGDisplayBounds(CGMainDisplayID()); - pt.v = mainscreen.size.height - pt.v; + //CGRect mainscreen = CGDisplayBounds(CGMainDisplayID()); + //pt.v = mainscreen.size.height - pt.v; return pt; } From t-suwa users.sourceforge.jp Sun Aug 26 01:34:45 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:34:45 +0900 Subject: [aquaskk-changes 348] CVS update: AquaSKK/src/keybindings Message-ID: <1188059685.392117.4411.nullmailer@users.sourceforge.jp> Index: AquaSKK/src/keybindings/SKKEventParam.h diff -u /dev/null AquaSKK/src/keybindings/SKKEventParam.h:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKEventParam.h Sun Aug 26 01:34:45 2007 @@ -0,0 +1,139 @@ +/* -*- C++ -*- + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKEventParam__ +#define INC__SKKEventParam__ + +#include +#include "GenericStateMachine.h" + +// ????????? +enum { + SKK_NULL = statemachinecxx_sourceforge_jp::USER_EVENT, // ??????????+ SKK_JMODE, // Ctrl-J + SKK_ENTER, // Ctrl-M + SKK_BACKSPACE, // Ctrl-H + SKK_DELETE, // Ctrl-D + SKK_TAB, // Ctrl-I + SKK_CANCEL, // Ctrl-G + SKK_PASTE, // Ctrl-Y + SKK_LEFT, // ??+ SKK_UP, // ??+ SKK_RIGHT, // ??+ SKK_DOWN, // ??+ SKK_CHAR, // ????????????? + SKK_YES, // ?????? + SKK_NO, // ?????? + SKK_ON, // ?????? + SKK_OFF, // ?????? + SKK_HIRAKANA, // ??????????????+ SKK_KATAKANA, // ???????????????+ SKK_JISX0201KANA, // ???????????????+ SKK_JISX0208LATIN, // ??????????????+ SKK_ASCII // ???????ASCII??+}; + +// SKK_CHAR ?? +enum { + None, + Direct = 1, + UpperCases = 2, + ToggleKana = 4, + ToggleJisx0201Kana = 8, + SwitchToAscii = 16, + SwitchToJisx0208Latin = 32, + EnterJapanese = 64, + EnterAbbrev = 128, + NextCompletion = 256, + PrevCompletion = 512, + NextCandidate = 1024, + PrevCandidate = 2048, + RemoveTrigger = 4096 +}; + +// ???????????+struct SKKEventParam { + int event; // ????(????????????? + unsigned char code; // ????????? + int attribute; // SKK_CHAR ?? + + SKKEventParam() : event(0), code(0), attribute(0) {} + SKKEventParam(int e, unsigned char c, int a = None) : event(e), code(c), attribute(a) {} + + // SKK_CHAR ?????????+ bool IsDirect() const { return attribute & Direct; } + bool IsUpperCases() const { return attribute & UpperCases; } + bool IsToggleKana() const { return attribute & ToggleKana; } + bool IsToggleJisx0201Kana() const { return attribute & ToggleJisx0201Kana; } + bool IsSwitchToAscii() const { return attribute & SwitchToAscii; } + bool IsSwitchToJisx0208Latin() const { return attribute & SwitchToJisx0208Latin; } + bool IsEnterJapanese() const { return attribute & EnterJapanese; } + bool IsEnterAbbrev() const { return attribute & EnterAbbrev; } + bool IsNextCompletion() const { return attribute & NextCompletion; } + bool IsPrevCompletion() const { return attribute & PrevCompletion; } + bool IsNextCandidate() const { return attribute & NextCandidate; } + bool IsPrevCandidate() const { return attribute & PrevCandidate; } + bool IsRemoveTrigger() const { return attribute & RemoveTrigger; } + + const static SKKEventParam& Null() { + static SKKEventParam nullEvent(SKK_NULL, 0, 0); + return nullEvent; + } + + bool operator==(const SKKEventParam& rhs) const { + return (event == rhs.event && code == rhs.code && attribute == rhs.attribute); + } + + std::string dump() const { + const char* event_name[] = { + "SKK_NULL", + "SKK_JMODE", + "SKK_ENTER", + "SKK_BACKSPACE", + "SKK_DELETE", + "SKK_TAB", + "SKK_CANCEL", + "SKK_PASTE", + "SKK_LEFT", + "SKK_UP", + "SKK_RIGHT", + "SKK_DOWN", + "SKK_CHAR", + "SKK_YES", + "SKK_NO", + "SKK_ON", + "SKK_OFF", + "SKK_HIRAKANA", + "SKK_KATAKANA", + "SKK_JISX0201KANA", + "SKK_JISX0208LATIN", + "SKK_ASCII" + }; + + std::ostringstream buf; + buf << "event=" << event_name[event - SKK_NULL] << ", " + << "code=" << std::hex << (unsigned int)code << ", " + << "attr=" << std::dec << attribute; + + return buf.str(); + } +}; + +#endif Index: AquaSKK/src/keybindings/SKKKeyState.h diff -u /dev/null AquaSKK/src/keybindings/SKKKeyState.h:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKKeyState.h Sun Aug 26 01:34:45 2007 @@ -0,0 +1,50 @@ +/* -*- C++ -*- + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKKeyState__ +#define INC__SKKKeyState__ + +// 以?????????????????????????????????+// +// 31 23 15 7 0 bit +// +--------+--------+--------+--------+ +// + ????| ctrl |key code| ascii | +// +--------+--------+--------+--------+ +class SKKKeyState { + int state_; + + SKKKeyState(); + SKKKeyState(int ascii, int keycode, bool ctrl) { + state_ = (ctrl << 16) | ((0xff & keycode) << 8) | (0xff & ascii); + } + +public: + static SKKKeyState Keycode(int code, bool ctrl) { + return SKKKeyState(0, code, ctrl); + } + static SKKKeyState Ascii(int code, bool ctrl) { + return SKKKeyState(code, 0, ctrl); + } + operator int() const { + return state_; + } +}; + +#endif Index: AquaSKK/src/keybindings/SKKKeymap.cpp diff -u /dev/null AquaSKK/src/keybindings/SKKKeymap.cpp:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKKeymap.cpp Sun Aug 26 01:34:45 2007 @@ -0,0 +1,114 @@ +/* -*- C++ -*- + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "SKKKeyState.h" +#include "SKKKeymap.h" +#include "SKKKeymapEntry.h" + +void SKKKeymap::Initialize(const std::string& path) { + std::ifstream config(path.c_str()); + + if(!config) return; + + // ?????+ events_.clear(); + attributes_.clear(); + + std::string configKey; + std::string configValue; + while(config >> configKey >> configValue) { + // ????????+ if(!configKey.empty() && configKey[0] != '#') { + SKKKeymapEntry entry(configKey, configValue); + + // ???????????? + int key; + while(entry >> key) { + // ?????????以??????SKK_CHAR ????????+ if(entry.IsEvent()) { + events_[key] = entry.Symbol(); + } else { + events_[key] = SKK_CHAR; + attributes_[key] |= entry.Symbol(); + } + } + } + + // ??????????+ config.ignore(0xff, '\n'); + } +} + +SKKEventParam SKKKeymap::Fetch(int ascii, int keycode, bool ctrl) { + SKKEventParam param; + Keymap* map; + Keymap::iterator iter; + + // ???????+ param.code = ascii; + + // ????????+ map = &events_; + do { + // keycode ??????????調????????) + iter = map->find(SKKKeyState::Keycode(keycode, ctrl)); + if(iter != map->end()) { + param.event = iter->second; + break; + } + + // ascii ???? + iter = map->find(SKKKeyState::Ascii(ascii, ctrl)); + if(iter != map->end()) { + param.event = iter->second; + break; + } + + // ????????+ if(!ctrl) { + param.event = SKK_CHAR; + } else { + param.event = SKK_NULL; + } + } while(0); + + // SKK_CHAR ????????????調???+ if(param.event == SKK_CHAR) { + map = &attributes_; + + do { + // keycode ????????調????????) + iter = map->find(SKKKeyState::Keycode(keycode, ctrl)); + if(iter != map->end()) { + param.attribute = iter->second; + break; + } + + // ascii ?? + iter = map->find(SKKKeyState::Ascii(ascii, ctrl)); + if(iter != map->end()) { + param.attribute = iter->second; + } + } while(0); + } + + return param; +} Index: AquaSKK/src/keybindings/SKKKeymap.h diff -u /dev/null AquaSKK/src/keybindings/SKKKeymap.h:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKKeymap.h Sun Aug 26 01:34:45 2007 @@ -0,0 +1,43 @@ +/* -*- C++ -*- + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKKeymap__ +#define INC__SKKKeymap__ + +#include +#include +#include "SKKEventParam.h" + +// ????????+class SKKKeymap { + typedef std::map Keymap; + + Keymap events_; + Keymap attributes_; + +public: + // ?????+ void Initialize(const std::string& path_to_config); + + // ? + SKKEventParam Fetch(int ascii, int keycode, bool ctrl); +}; + +#endif Index: AquaSKK/src/keybindings/SKKKeymapEntry.cpp diff -u /dev/null AquaSKK/src/keybindings/SKKKeymapEntry.cpp:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKKeymapEntry.cpp Sun Aug 26 01:34:45 2007 @@ -0,0 +1,230 @@ +/* -*- C++ -*- + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "SKKEventParam.h" +#include "SKKKeyState.h" +#include "SKKKeymapEntry.h" + +// ????????????+// TYPE_EVENT ??SKK_* ????+// TYPE_ATTRIBUTE ??SKK_CHAR ?????示? +enum KeymapEntryType { TYPE_EVENT, TYPE_ATTRIBUTE }; + +// ====================================================================== +// ??????????????????+// ====================================================================== +static const struct { + const char* name; + int symbol; + int type; +} KeymapTable[] = { + { "SKK_JMODE", SKK_JMODE, TYPE_EVENT }, + { "SKK_ENTER", SKK_ENTER, TYPE_EVENT }, + { "SKK_BACKSPACE", SKK_BACKSPACE, TYPE_EVENT }, + { "SKK_DELETE", SKK_DELETE, TYPE_EVENT }, + { "SKK_TAB", SKK_TAB, TYPE_EVENT }, + { "SKK_CANCEL", SKK_CANCEL, TYPE_EVENT }, + { "SKK_PASTE", SKK_PASTE, TYPE_EVENT }, + { "SKK_LEFT", SKK_LEFT, TYPE_EVENT }, + { "SKK_UP", SKK_UP, TYPE_EVENT }, + { "SKK_RIGHT", SKK_RIGHT, TYPE_EVENT }, + { "SKK_DOWN", SKK_DOWN, TYPE_EVENT }, + { "SKK_CHAR", SKK_CHAR, TYPE_EVENT }, + { "SKK_YES", SKK_YES, TYPE_EVENT }, + { "SKK_NO", SKK_NO, TYPE_EVENT }, + { "Direct", Direct, TYPE_ATTRIBUTE }, + { "UpperCases", UpperCases, TYPE_ATTRIBUTE }, + { "ToggleKana", ToggleKana, TYPE_ATTRIBUTE }, + { "ToggleJisx0201Kana", ToggleJisx0201Kana, TYPE_ATTRIBUTE }, + { "SwitchToAscii", SwitchToAscii, TYPE_ATTRIBUTE }, + { "SwitchToJisx0208Latin", SwitchToJisx0208Latin, TYPE_ATTRIBUTE }, + { "EnterJapanese", EnterJapanese, TYPE_ATTRIBUTE }, + { "EnterAbbrev", EnterAbbrev, TYPE_ATTRIBUTE }, + { "NextCompletion", NextCompletion, TYPE_ATTRIBUTE }, + { "PrevCompletion", PrevCompletion, TYPE_ATTRIBUTE }, + { "NextCandidate", NextCandidate, TYPE_ATTRIBUTE }, + { "PrevCandidate", PrevCandidate, TYPE_ATTRIBUTE }, + { "RemoveTrigger", RemoveTrigger, TYPE_ATTRIBUTE }, + { 0x00, SKK_NULL, -1 } +}; + +// ? +int fetchKeymapIndex(const std::string& key) { + for(int i = 0; KeymapTable[i].name != 0x00; ++ i) { + if(key == KeymapTable[i].name) { + return i; + } + } + + return -1; +} + +// ?????????????????? +void translate(std::string& src, const std::string& from, const std::string& to) { + unsigned pos = 0; + + while((pos = src.find(from, pos)) != std::string::npos) { + src.replace(pos, from.size(), to); + } +} + +// ====================================================================== +// SKKKeymapEntry ????????+// ====================================================================== +SKKKeymapEntry::SKKKeymapEntry() : pos_(0) { + // empty +} + +SKKKeymapEntry::SKKKeymapEntry(const std::string& configKey, const std::string& configValue) : pos_(0) { + int index = fetchKeymapIndex(configKey); + if(index < 0) { + std::cerr << "SKKKeymapEntry::SKKKeymapEntry(): invalid key name[" << configKey << "]" << std::endl; + return; + } + + type_= KeymapTable[index].type; + symbol_ = KeymapTable[index].symbol; + + // ?????"||" ???????+ std::string tmp(configValue); + translate(tmp, "||", " "); + + // ?????????????+ std::istringstream buf(tmp); + while(buf >> tmp) { + tmp = setup(tmp); + + if(label_ & LABEL_GROUP) { + parseGroup(tmp); + } else { + parseEntry(tmp); + } + } +} + +// ??????????+bool SKKKeymapEntry::operator>>(int& state) { + if(!(pos_ < keys_.size())) return false; + + if(keys_[pos_].first <= keys_[pos_].second) { + state = keys_[pos_].first ++; + return true; + } else { + ++ pos_; + return *this >> state; // ?? + } +} + +bool SKKKeymapEntry::IsEvent() const { + return type_ == TYPE_EVENT; +} + +int SKKKeymapEntry::Symbol() const { + return symbol_; +} + +// ====================================================================== +// private method +// ====================================================================== +std::string SKKKeymapEntry::setup(const std::string& str) { + label_ = 0; + + // ?????"::" ???????+ std::string tmp(str); + translate(tmp, "::", " "); + + // ?????????????+ std::istringstream buf(tmp); + while(buf >> tmp) { + if(tmp == "hex") label_ += LABEL_HEX; + if(tmp == "ctrl") label_ += LABEL_CTRL; + if(tmp == "group") label_ += LABEL_GROUP; + if(tmp == "keycode") label_ += LABEL_KEYCODE; + } + + // ???????????????????? + return tmp; +} + +// ??????????????+void SKKKeymapEntry::parseGroup(const std::string& str) { + // ?????',' ???????+ std::string tmp(str); + std::replace(tmp.begin(), tmp.end(), ',', ' '); + + // ????????解? + std::istringstream buf(tmp); + while(buf >> tmp) { + int pos = tmp.find_first_of('-'); + + // ????????+ if(pos != std::string::npos) { + tmp[pos] = ' '; + parseRange(tmp); + } else { + parseEntry(tmp); + } + } +} + +// ???????解? +void SKKKeymapEntry::parseRange(const std::string& str) { + std::string tmp(str); + std::istringstream buf(tmp); + KeyRange range; + + if(buf >> tmp) { + range.first = makeKey(tmp); + + if(buf >> tmp) { + range.second = makeKey(tmp); + keys_.push_back(range); + } + } +} + +// ?????????????+void SKKKeymapEntry::parseEntry(const std::string& str) { + KeyRange range; + + range.first = range.second = makeKey(str); + + keys_.push_back(range); +} + +// ????????+int SKKKeymapEntry::makeKey(const std::string& str) { + int key; + + // 16 ?????+ if(label_ & (LABEL_HEX | LABEL_KEYCODE)) { + std::istringstream buf(str); + buf >> std::hex >> key; + } else { + key = str[0]; + } + + if(label_ & LABEL_KEYCODE) { + return SKKKeyState::Keycode(key, label_ & LABEL_CTRL); + } else { + return SKKKeyState::Ascii(key, label_ & LABEL_CTRL); + } +} Index: AquaSKK/src/keybindings/SKKKeymapEntry.h diff -u /dev/null AquaSKK/src/keybindings/SKKKeymapEntry.h:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKKeymapEntry.h Sun Aug 26 01:34:45 2007 @@ -0,0 +1,59 @@ +/* -*- C++ -*- + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKKeymapEntry__ +#define INC__SKKKeymapEntry__ + +#include +#include + +// ?????????????+class SKKKeymapEntry { + int type_; + int symbol_; + int label_; + + typedef std::pair KeyRange; + std::vector keys_; + int pos_; + + enum { LABEL_GROUP = 1, LABEL_CTRL = 2, LABEL_HEX = 4, LABEL_KEYCODE = 8 }; + + std::string setup(const std::string& str); + void parseGroup(const std::string& str); + void parseRange(const std::string& str); + void parseEntry(const std::string& str); + int makeKey(const std::string& str); + +public: + SKKKeymapEntry(); + SKKKeymapEntry(const std::string& configKey, const std::string& configValue); + + // ??????????+ bool operator>>(int& key); + + // ?????????????????? + bool IsEvent() const; + + // ????????? + int Symbol() const; +}; + +#endif Index: AquaSKK/src/keybindings/SKKPreProcessor.cpp diff -u /dev/null AquaSKK/src/keybindings/SKKPreProcessor.cpp:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKPreProcessor.cpp Sun Aug 26 01:34:45 2007 @@ -0,0 +1,87 @@ +/* -*- C++ -*- + $Id: SKKPreProcessor.cpp,v 1.1.2.1 2007/08/25 16:34:45 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "SKKConfig.h" +#include "SKKPreProcessor.h" + +SKKPreProcessor::SKKPreProcessor() { +} + +SKKPreProcessor& SKKPreProcessor::theInstance() { + static SKKPreProcessor obj; + return obj; +} + +void SKKPreProcessor::Initialize() { + keymap_.Initialize(SKKConfig::ResourceDirectory() + "keymap.conf"); + keymap_.Initialize(SKKConfig::LibraryDirectory() + "keymap.conf"); +} + +SKKEventParam SKKPreProcessor::Execute(const EventRef event) { + // ?????????????????? + if(GetEventClass(event) != kEventClassKeyboard) { + return SKKEventParam::Null(); + } + + // ???????以???? + switch(GetEventKind(event)) { + case kEventRawKeyDown: + case kEventRawKeyRepeat: + break; + default: + return SKKEventParam::Null(); + } + + char charcode; + UInt32 modifier; + UInt32 keycode; + UInt32 kbdtype; + UniChar uc; + + // ????????????????? + GetEventParameter(event, kEventParamKeyMacCharCodes, typeChar, 0, sizeof(charcode), 0, &charcode); + GetEventParameter(event, kEventParamKeyCode, typeUInt32, 0, sizeof(keycode), 0, &keycode); + GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, 0, sizeof(modifier), 0, &modifier); + GetEventParameter(event, kEventParamKeyboardType, typeUInt32, 0, sizeof(kbdtype), 0, &kbdtype); + GetEventParameter(event, kEventParamKeyUnicodes, typeUnicodeText, 0, sizeof(uc), 0, &uc); + + // ???????????????????????? + if(modifier & cmdKey) { + return SKKEventParam::Null(); + } + + // ???????????????????????????bit ???????? + // http://developer.apple.com/qa/qa2005/qa1446.html + if(modifier & controlKey) { + long smv = GetScriptManagerVariable(smKeyScript); + Handle uchrHandle = GetResource('uchr', GetScriptVariable(smv, smScriptKeys)); + UInt32 dummy = 0; + + UCKeyTranslate((UCKeyboardLayout*)*uchrHandle, keycode, kUCKeyActionDisplay, + (modifier & ~controlKey) >> 8, kbdtype, kUCKeyTranslateNoDeadKeysMask, &dummy, 1, &dummy, &uc); + + charcode = uc; + } + + // ????????????SKKEventParam ????????+ return keymap_.Fetch(charcode, keycode, modifier & controlKey); +} Index: AquaSKK/src/keybindings/SKKPreProcessor.h diff -u /dev/null AquaSKK/src/keybindings/SKKPreProcessor.h:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKPreProcessor.h Sun Aug 26 01:34:45 2007 @@ -0,0 +1,46 @@ +/* -*- C++ -*- + $Id: SKKPreProcessor.h,v 1.1.2.1 2007/08/25 16:34:45 t-suwa Exp $ + + MacOS X implementation of the SKK input method. + + Copyright (C) 2007 Tomotaka SUWA + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef INC__SKKPreProcessor__ +#define INC__SKKPreProcessor__ + +#include +#include "SKKKeymap.h" + +// ?????????????? +class SKKPreProcessor { + SKKKeymap keymap_; + + SKKPreProcessor(); + +public: + // ??????? + static SKKPreProcessor& theInstance(); + + // ??????????????+ void Initialize(); + + // ????????? ??SKKEventParam ??+ SKKEventParam Execute(const EventRef event); +}; + +#endif Index: AquaSKK/src/keybindings/keymap.conf diff -u /dev/null AquaSKK/src/keybindings/keymap.conf:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/keymap.conf Sun Aug 26 01:34:45 2007 @@ -0,0 +1,43 @@ +### +### keymap.conf +### + +# ====================================================================== +# event section +# ====================================================================== + +SKK_JMODE ctrl::j +SKK_ENTER group::hex::0x03,0x0a,0x0d||ctrl::m +SKK_TAB hex::0x09||ctrl::i +SKK_BACKSPACE hex::0x08 +SKK_BACKSPACE ctrl::h +SKK_DELETE hex::0x7f||ctrl::d +SKK_CANCEL ctrl::g +SKK_PASTE ctrl::y +SKK_LEFT hex::0x1c||ctrl::b +SKK_RIGHT hex::0x1d||ctrl::f +SKK_UP hex::0x1e||ctrl::p +SKK_DOWN hex::0x1f||ctrl::n + +# ====================================================================== +# attribute section(for SKK_CHAR) +# ====================================================================== + +ToggleKana q +ToggleJisx0201Kana ctrl::q +SwitchToAscii l +SwitchToJisx0208Latin L + +EnterAbbrev / +EnterJapanese Q +#EnterJapanese keycode::0x66 # EISU +#EnterJapanese keycode::0x68 # KANA +NextCompletion . +PrevCompletion , +NextCandidate hex::0x20 +PrevCandidate x +RemoveTrigger X + +UpperCases group::A-K,M-P,R-W,Z + +Direct group::keycode::0x41,0x43,0x45,0x4b,0x4e,0x51-0x59,0x5b,0x5c,0x5f From t-suwa users.sourceforge.jp Sun Aug 26 01:34:45 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:34:45 +0900 Subject: [aquaskk-changes 349] CVS update: AquaSKK/src/statemachine Message-ID: <1188059685.559426.4418.nullmailer@users.sourceforge.jp> Index: AquaSKK/src/statemachine/GenericStateMachine.h diff -u /dev/null AquaSKK/src/statemachine/GenericStateMachine.h:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/statemachine/GenericStateMachine.h Sun Aug 26 01:34:45 2007 @@ -0,0 +1,499 @@ +/* -*- C++ -*- + + Generic State Machine Library for C++. + + Copyright (c) 2006-2007, Tomotaka SUWA + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of the authors nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +#ifndef INC__GenericStateMachine__ +#define INC__GenericStateMachine__ + +#include +#include +#include +#include +#include + +namespace statemachinecxx_sourceforge_jp { + // ====================================================================== + // event types + // ====================================================================== + enum EventTypes { + EXIT_EVENT = -3, + INIT_EVENT = -2, + ENTRY_EVENT = -1, + PROBE = 0, + USER_EVENT = 1 + }; + + // ====================================================================== + // event + // ====================================================================== + template + class GenericEvent { + int signal_; + ParamType param_; + + public: + GenericEvent() {} + GenericEvent(int signal) : signal_(signal) {} + GenericEvent(int signal, const ParamType& param) : signal_(signal), param_(param) {} + + operator int() const { return signal_; } + void SetSignal(int signal) { signal_ = signal;} + + const ParamType& Param() const { return param_; } + void SetParam(const ParamType& arg) { param_ = arg; } + + bool IsSystem() const { return signal_ < USER_EVENT; } + bool IsUser() const { return !IsSystem(); } + + static GenericEvent& Probe() { static GenericEvent evt(PROBE); return evt; } + static GenericEvent& Entry() { static GenericEvent evt(ENTRY_EVENT); return evt; } + static GenericEvent& Exit() { static GenericEvent evt(EXIT_EVENT); return evt; } + static GenericEvent& Init() { static GenericEvent evt(INIT_EVENT); return evt; } + }; + + // ====================================================================== + // state + // ====================================================================== + template + class GenericState { + typedef typename StateContainer::Handler Handler; + + enum StateType { + UNKNOWN, + SUPER, + INITIAL, + TRANSITION, + SAVE_HISTORY, + SHALLOW_HISTORY, + DEEP_HISTORY, + FORWARD, + DEEP_FORWARD, + DEFER_EVENT + }; + + StateType type_; + Handler handler_; + + GenericState(StateType type, Handler handler) : type_(type), handler_(handler) {} + + public: + GenericState() : type_(UNKNOWN), handler_(0) {} + GenericState(Handler handler) : type_(SUPER), handler_(handler) {} + + operator Handler() const { return handler_; } + + bool IsSuper() const { return type_ == SUPER; } + bool IsInitial() const { return type_ == INITIAL; } + bool IsTransition() const { return type_ == TRANSITION; } + bool IsSaveHistory() const { return type_ == SAVE_HISTORY; } + bool IsShallowHistory() const { return type_ == SHALLOW_HISTORY; } + bool IsDeepHistory() const { return type_ == DEEP_HISTORY; } + bool IsForward() const { return type_ == FORWARD; } + bool IsDeepForward() const { return type_ == DEEP_FORWARD; } + bool IsDeferEvent() const { return type_ == DEFER_EVENT; } + + static GenericState Initial(Handler handler) { return GenericState(INITIAL, handler); } + static GenericState Transition(Handler handler) { return GenericState(TRANSITION, handler); } + static GenericState SaveHistory() { return GenericState(SAVE_HISTORY, 0); } + static GenericState ShallowHistory(Handler handler) { return GenericState(SHALLOW_HISTORY, handler); } + static GenericState DeepHistory(Handler handler) { return GenericState(DEEP_HISTORY, handler); } + static GenericState Forward(Handler handler) { return GenericState(FORWARD, handler); } + static GenericState DeepForward(Handler handler) { return GenericState(DEEP_FORWARD, handler); } + static GenericState DeferEvent() { return GenericState(DEFER_EVENT, 0); } + }; + + // ====================================================================== + // state history + // ====================================================================== + template + class GenericStateHistory { + typedef std::pair History; + std::vector keys_; + std::vector values_; + + enum HistoryTypes { SHALLOW, DEEP }; + + int lookup(const Handler key) const { + typename std::vector::const_iterator iter = std::find(keys_.begin(), keys_.end(), key); + + if(iter == keys_.end()) return -1; + + return iter - keys_.begin(); + } + + const Handler get(Handler key, HistoryTypes type) const { + int pos = lookup(key); + + if(pos < 0) return 0; + + return type == SHALLOW ? values_[pos].first : values_[pos].second; + } + + public: + void Save(Handler key, Handler shallow, Handler deep) { + int pos = lookup(key); + + if(pos < 0) { + keys_.push_back(key); + values_.push_back(std::make_pair(shallow, deep)); + } else { + values_[pos] = std::make_pair(shallow, deep); + } + } + + const Handler Shallow(Handler key) const { + return get(key, SHALLOW); + } + + const Handler Deep(Handler key) const { + return get(key, DEEP); + } + }; + + // ====================================================================== + // deferred event + // ====================================================================== + template + class GenericDeferEvent { + typedef std::pair Entry; + std::list queue_; + + struct NotEqual : public std::unary_function { + const Handler key; + NotEqual(Handler arg) : key(arg) {} + bool operator()(const Entry& entry) const { + return key != entry.first; + } + }; + + public: + void Enqueue(const Handler key, const Event& event) { + queue_.push_back(std::make_pair(key, event)); + } + + bool Dequeue(const Handler key, Event& event) { + if(queue_.empty()) return false; + + typename std::list::iterator iter = std::find_if(queue_.begin(), queue_.end(), NotEqual(key)); + + if(iter != queue_.end()) { + event = iter->second; + queue_.erase(iter); + return true; + } + + return false; + } + }; + + // ====================================================================== + // empty inspector + // ====================================================================== + template + struct EmptyInspector { + void operator()(const Handler handler, const Event& event) {} + }; + + // ====================================================================== + // state machine + // ====================================================================== + template class Inspector = EmptyInspector> + class GenericStateMachine { + typedef typename StateContainer::Handler Handler; + typedef typename StateContainer::Event Event; + typedef typename StateContainer::State State; + typedef typename StateContainer::Output Output; + + StateContainer container_; + Inspector inspector_; + + Handler top_; + Handler active_; + Handler prior_; + + GenericStateHistory history_; + GenericDeferEvent queue_; + + Event defer_; + + typedef typename std::vector Path; + typedef typename Path::iterator PathIterator; + + Path path_; + + // ------------------------------------------------------------ + // invoke state function + // ------------------------------------------------------------ + State invoke(const Handler handler, const Event& event) { + inspector_(handler, event); + return (container_.*handler)(event); + } + + // ------------------------------------------------------------ + // system event trigger + // ------------------------------------------------------------ + State getSuperState(const Handler handler) { return invoke(handler, Event::Probe()); } + State entryAction(const Handler handler) { return invoke(handler, Event::Entry()); } + State initialTransition(const Handler handler) { return invoke(handler, Event::Init()); } + State exitAction(const Handler handler) { + State result = invoke(handler, Event::Exit()); + + if(result.IsSaveHistory()) { + assert(prior_ != 0 && "*** Shallow history not found ***"); + history_.Save(handler, prior_, active_); + } + + prior_ = handler; + + return result; + } + + // ------------------------------------------------------------ + // initial transition trigger + // ------------------------------------------------------------ + void initialize(const State& target) { + State state; + + active_ = target; + + for(state = initialTransition(active_); state.IsInitial() || state.IsShallowHistory(); + state = initialTransition(active_)) { + assert(state != active_ && "*** An infinte loop detected. Check INIT_EVENT ***"); + assert((getSuperState(state) == active_ || getSuperState(state) == getSuperState(active_)) + && "*** Initial transition must go to same or one level deep ***"); + + if(state.IsShallowHistory()) { + Handler shallow = history_.Shallow(active_); + if(!shallow) { + history_.Save(active_, state, 0); // first time + active_ = state; + } else { + active_ = shallow; + } + } else { + active_ = state; + } + + entryAction(active_); + } + + assert(state != 0 && state.IsSuper() && + "*** Initial transition must be ended by returning super state ***"); + } + + // ------------------------------------------------------------ + // transition trigger + // ------------------------------------------------------------ + void transition(const Handler source, const Handler target) { + assert(target != top_ && "*** Transition to TopState is not allowed ***"); + + Handler tmp; + + // exit to source + for(tmp = active_, prior_ = 0; tmp != source; tmp = getSuperState(tmp)) { + exitAction(tmp); + } + + // exit to LCA(Least Common Ancestor) and record the path to the target + do { + path_.push_back(target); + + // (a) self transition + if(source == target) { + exitAction(source); + break; + } + + // (b) go into substate(one level) + Handler targetSuper = getSuperState(target); + if(source == targetSuper) { + break; + } + + // (c) balanced transition + Handler sourceSuper = getSuperState(source); + if(sourceSuper == targetSuper) { + exitAction(source); + break; + } + + // (d) leave from substate(one level) + if(sourceSuper == target) { + exitAction(source); + path_.clear(); + break; + } + + // (e) go into substate(multiple level) + path_.push_back(targetSuper); + for(tmp = getSuperState(targetSuper); tmp != 0; tmp = getSuperState(tmp)) { + if(source == tmp) { + break; + } + path_.push_back(tmp); + } + if(tmp != 0) break; + + exitAction(source); + + struct check { + static bool exist(Path& path, const Handler handler) { + PathIterator iter = std::find(path.begin(), path.end(), handler); + if(iter != path.end()) { + path.erase(iter, path.end()); + return true; + } + return false; + } + }; + + // (f) unbalanced transition + if(check::exist(path_, sourceSuper)) { + break; + } + + // (g) leave from substate(multiple level) + for(tmp = sourceSuper; tmp != 0; tmp = getSuperState(tmp)) { + if(check::exist(path_, tmp)) { + break; + } + exitAction(tmp); + } + if(tmp != 0) break; + + assert(0 && "*** Invalid state transition form detected ***"); + } while(0); + + // go into the target + while(!path_.empty()) { + entryAction(path_.back()); + path_.pop_back(); + } + } + + public: + GenericStateMachine() : top_(&StateContainer::TopState), active_(0) {} + GenericStateMachine(const StateContainer& src) : container_(src), top_(&StateContainer::TopState), active_(0) {} + + ~GenericStateMachine() { + for(Handler tmp = active_; tmp != 0; tmp = getSuperState(tmp)) { + exitAction(tmp); + } + } + + void Start() { + assert(active_ == 0 && "*** You can not call Start() twice ***"); + + initialize(State::Initial(top_)); + } + + void Dispatch(const Event& event) { + if(!active_) Start(); + + State next; + + for(Handler source = active_; source != 0; source = next) { + next = invoke(source, event); + + if(next.IsTransition() || next.IsDeepHistory() || next.IsForward() || next.IsDeepForward()) { + if(next.IsDeepHistory() || next.IsDeepForward()) { + next = history_.Deep(next); + assert(next != 0 && "*** Deep history not found ***"); + } + + transition(source, next); + initialize(next); + + if(next.IsForward() || next.IsDeepForward()) { + continue; + } else { + while(queue_.Dequeue(next, defer_)) { + Dispatch(defer_); // recursion + } + } + break; + } + + if(next.IsDeferEvent()) { + queue_.Enqueue(next, event); + break; + } + + assert(!next.IsShallowHistory() && !next.IsSaveHistory() && !next.IsInitial() && + "*** Invalid state detected ***"); + } + } + + const Output& Result() const { + return container_.Result(); + } + }; + + // ====================================================================== + // state container traits + // ====================================================================== + template + struct StateContainerTraits { + typedef typename T::State State; + typedef typename T::Event Event; + typedef typename T::Handler Handler; + typedef typename T::Output Output; + }; +} + +// ====================================================================== +// helper macro +// ====================================================================== + +#define DECLARE_ImportantTypes(container, param, result) \ + typedef GenericState State; \ + typedef GenericEvent Event; \ + typedef State (container::*Handler)(const Event&); \ + typedef result Output; + +#define DECLARE_TopState(container, initial) \ + State TopState(const Event& event) { \ + switch(event) { \ + case INIT_EVENT: \ + return State::Initial(&container::initial); \ + } \ + return 0; \ + } + +#define DECLARE_StateContainer(container, param, result, initial) \ + DECLARE_ImportantTypes(container, param, result) \ + DECLARE_TopState(container, initial) + +#endif // INC__GenericStateMachine__ From t-suwa users.sourceforge.jp Sun Aug 26 01:34:45 2007 From: t-suwa users.sourceforge.jp (t-suwa users.sourceforge.jp) Date: Sun, 26 Aug 2007 01:34:45 +0900 Subject: [aquaskk-changes 350] CVS update: AquaSKK/src/test Message-ID: <1188059685.715944.4429.nullmailer@users.sourceforge.jp> Index: AquaSKK/src/test/Makefile diff -u /dev/null AquaSKK/src/test/Makefile:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/test/Makefile Sun Aug 26 01:34:45 2007 @@ -0,0 +1,35 @@ +### +### unit test +### + +VPATH = $(shell find .. -type d -a ! -name CVS -a ! -name test -a ! -name ..) ../.. +CXXFLAGS= -g $(foreach dir,$(VPATH),-I$(dir)) + +TARGET = SKKKeymapEntry_TEST SKKKeymap_TEST + +define BUILD_template +$(1): $(1).o + $(CXX) -o $(1) $(1).o +endef + +all: build + +$(foreach prog,$(TARGET),$(eval $(call BUILD_template,$(prog)))) + +build: $(TARGET) + +### +### rule +### +clean: + $(RM) $(TARGET) *.o + +test: build + for i in $(TARGET); do ./$$i; done + +### +### dependencies +### + +SKKKeymapEntry_TEST.o: SKKKeymapEntry_TEST.cpp SKKKeymapEntry.cpp SKKKeymapEntry.h +SKKKeymap_TEST.o: SKKKeymap_TEST.cpp SKKKeymapEntry.cpp SKKKeymapEntry.h SKKKeymap.cpp SKKKeymap.h Index: AquaSKK/src/test/SKKKeymapEntry_TEST.cpp diff -u /dev/null AquaSKK/src/test/SKKKeymapEntry_TEST.cpp:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/test/SKKKeymapEntry_TEST.cpp Sun Aug 26 01:34:45 2007 @@ -0,0 +1,43 @@ +#include "SKKKeyState.h" +#include "SKKKeymapEntry.cpp" +#include + +int main() { + SKKKeymapEntry entry; + int key; + + entry = SKKKeymapEntry("Unknown", "a"); + assert(!(entry >> key)); + + entry = SKKKeymapEntry("SKK_JMODE", "a"); + entry >> key; + assert(key == SKKKeyState::Ascii('a', false)); + assert(entry.Symbol() == SKK_JMODE); + assert(!(entry >> key)); + + entry = SKKKeymapEntry("SKK_JMODE", "keycode::0x0a"); + entry >> key; + assert(key == SKKKeyState::Keycode(0x0a, false)); + + entry = SKKKeymapEntry("SKK_ENTER", "hex::0x03"); + entry >> key; + assert(key == SKKKeyState::Ascii(0x03, false)); + + entry = SKKKeymapEntry("SKK_ENTER", "ctrl::m"); + entry >> key; + assert(key == SKKKeyState::Ascii('m', true)); + + entry = SKKKeymapEntry("Direct", "group::a,c,d-f"); + assert(!entry.IsEvent()); + assert(entry.Symbol() == Direct); + entry >> key; + assert(key == SKKKeyState::Ascii('a', false)); + entry >> key; + assert(key == SKKKeyState::Ascii('c', false)); + entry >> key; + assert(key == SKKKeyState::Ascii('d', false)); + entry >> key; + assert(key == SKKKeyState::Ascii('e', false)); + entry >> key; + assert(key == SKKKeyState::Ascii('f', false)); +} Index: AquaSKK/src/test/SKKKeymap_TEST.cpp diff -u /dev/null AquaSKK/src/test/SKKKeymap_TEST.cpp:1.1.2.1 --- /dev/null Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/test/SKKKeymap_TEST.cpp Sun Aug 26 01:34:45 2007 @@ -0,0 +1,37 @@ +#include +#include "SKKKeymap.cpp" +#include "SKKKeymapEntry.cpp" + +int main() { + SKKKeymap keymap; + SKKEventParam param; + + keymap.Initialize("../keybindings/keymap.conf"); + + assert(keymap.Fetch(0, 0, 0) == SKKEventParam(SKK_CHAR, 0, 0)); + assert(keymap.Fetch('j', 0, true) == SKKEventParam(SKK_JMODE, 'j', 0)); + assert(keymap.Fetch(0x03, 0, 0) == SKKEventParam(SKK_ENTER, 0x03, 0)); + assert(keymap.Fetch(0x09, 0, 0) == SKKEventParam(SKK_TAB, 0x09, 0)); + assert(keymap.Fetch('i', 0, true) == SKKEventParam(SKK_TAB, 'i', 0)); + assert(keymap.Fetch('g', 0, true) == SKKEventParam(SKK_CANCEL, 'g', 0)); + assert(keymap.Fetch(0x1c, 0, 0) == SKKEventParam(SKK_LEFT, 0x1c, 0)); + + param = keymap.Fetch('b', 0, 0); + assert(param == SKKEventParam(SKK_CHAR, 'b', None)); + + param = keymap.Fetch('q', 0, 0); + assert(param == SKKEventParam(SKK_CHAR, 'q', ToggleKana)); + + param = keymap.Fetch('q', 0, true); + assert(param == SKKEventParam(SKK_CHAR, 'q', ToggleJisx0201Kana)); + + param = keymap.Fetch('A', 0, 0); + assert(param == SKKEventParam(SKK_CHAR, 'A', UpperCases)); + + param = keymap.Fetch('1', 0x51, 0); + assert(param == SKKEventParam(SKK_CHAR, '1', Direct)); + + param = keymap.Fetch('f', 0, true); + assert(param == SKKEventParam(SKK_RIGHT, 'f', 0)); + std::cerr << param.dump() << std::endl; +}