diff --git a/.clangd b/.clangd index fb839067..b20a4f30 100644 --- a/.clangd +++ b/.clangd @@ -1,7 +1,23 @@ CompileFlags: Add: [ "-std=c++17", # needed when using MSVC - "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Candidate", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Compartment", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Composition", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\DictEngine", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\DisplayAttribute", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Edit", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\File", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Global", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Header", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\IME", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Key", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\LanguageBar", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Register", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Tf", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Thread", + "-IC:\\Users\\SonnyCalcr\\EDisk\\CppCodes\\IMECodes\\DeerWritingBrush\\src\\Window", -DUNICODE, -D_UNICODE, -Wno-microsoft-goto, diff --git a/CMakeDraft.txt b/CMakeDraft.txt deleted file mode 100644 index a2c6d423..00000000 --- a/CMakeDraft.txt +++ /dev/null @@ -1,85 +0,0 @@ -"./ActiveLanguageProfileNotifySink.cpp" -"./BaseDictionaryEngine.cpp" -"./BaseDictionaryEngine.h" -"./BaseWindow.cpp" -"./BaseWindow.h" -"./ButtonWindow.cpp" -"./ButtonWindow.h" -"./CandidateListUIPresenter.cpp" -"./CandidateListUIPresenter.h" -"./CandidateWindow.cpp" -"./CandidateWindow.h" -"./Compartment.cpp" -"./Compartment.h" -"./Composition.cpp" -"./CompositionProcessorEngine.cpp" -"./CompositionProcessorEngine.h" -"./Define.h" -"./DictionaryParser.cpp" -"./DictionaryParser.h" -"./DictionarySearch.cpp" -"./DictionarySearch.h" -"./DisplayAttribute.cpp" -"./DisplayAttributeInfo.cpp" -"./DisplayAttributeInfo.h" -"./DisplayAttributeProvider.cpp" -"./DisplayString.h" -"./DllMain.cpp" -"./EditSession.cpp" -"./EditSession.h" -"./EndComposition.cpp" -"./EnumDisplayAttributeInfo.cpp" -"./EnumDisplayAttributeInfo.h" -"./EnumTfCandidates.cpp" -"./EnumTfCandidates.h" -"./File.cpp" -"./File.h" -"./FileMapping.cpp" -"./FileMapping.h" -"./FunctionProviderSink.cpp" -"./GetTextExtentEditSession.cpp" -"./GetTextExtentEditSession.h" -"./Globals.cpp" -"./Globals.h" -"./KeyEventSink.cpp" -"./KeyHandler.cpp" -"./KeyHandlerEditSession.cpp" -"./KeyHandlerEditSession.h" -"./KeyStateCategory.cpp" -"./KeyStateCategory.h" -"./LanguageBar.cpp" -"./LanguageBar.h" -"./Private.h" -"./Register.cpp" -"./RegKey.cpp" -"./RegKey.h" -"./resource.h" -"./SampleIME.cpp" -"./SampleIME.def" -"./SampleIME.h" -"./SampleIME.rc" -"./SampleIMEBaseStructure.cpp" -"./SampleIMEBaseStructure.h" -"./SampleIMEStructureArray.h" -"./ScrollBarWindow.cpp" -"./ScrollBarWindow.h" -"./SearchCandidateProvider.cpp" -"./SearchCandidateProvider.h" -"./Server.cpp" -"./ShadowWindow.cpp" -"./ShadowWindow.h" -"./StartComposition.cpp" -"./stdafx.h" -"./TableDictionaryEngine.cpp" -"./TableDictionaryEngine.h" -"./TextEditSink.cpp" -"./TfInputProcessorProfile.cpp" -"./TfInputProcessorProfile.h" -"./TfTextLayoutSink.cpp" -"./TfTextLayoutSink.h" -"./ThreadFocusSink.cpp" -"./ThreadMgrEventSink.cpp" -"./TipCandidateList.cpp" -"./TipCandidateList.h" -"./TipCandidateString.cpp" -"./TipCandidateString.h" diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c7e7150..a4cfdd25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,91 +8,127 @@ add_definitions( /DUNICODE=1 ) +include_directories("./src") +include_directories("./src/Candidate") +include_directories("./src/Compartment") +include_directories("./src/Composition") +include_directories("./src/DictEngine") +include_directories("./src/DisplayAttribute") +include_directories("./src/Edit") +include_directories("./src/File") +include_directories("./src/Global") +include_directories("./src/Header") +include_directories("./src/IME") +include_directories("./src/Key") +include_directories("./src/LanguageBar") +include_directories("./src/Register") +include_directories("./src/Tf") +include_directories("./src/Thread") +include_directories("./src/Window") + add_library(DeerWritingBrush SHARED - "./ActiveLanguageProfileNotifySink.cpp" - "./BaseDictionaryEngine.cpp" - "./BaseDictionaryEngine.h" - "./BaseWindow.cpp" - "./BaseWindow.h" - "./ButtonWindow.cpp" - "./ButtonWindow.h" - "./CandidateListUIPresenter.cpp" - "./CandidateListUIPresenter.h" - "./CandidateWindow.cpp" - "./CandidateWindow.h" - "./Compartment.cpp" - "./Compartment.h" - "./Composition.cpp" - "./CompositionProcessorEngine.cpp" - "./CompositionProcessorEngine.h" - "./Define.h" - "./DictionaryParser.cpp" - "./DictionaryParser.h" - "./DictionarySearch.cpp" - "./DictionarySearch.h" - "./DisplayAttribute.cpp" - "./DisplayAttributeInfo.cpp" - "./DisplayAttributeInfo.h" - "./DisplayAttributeProvider.cpp" - "./DisplayString.h" - "./DllMain.cpp" - "./EditSession.cpp" - "./EditSession.h" - "./EndComposition.cpp" - "./EnumDisplayAttributeInfo.cpp" - "./EnumDisplayAttributeInfo.h" - "./EnumTfCandidates.cpp" - "./EnumTfCandidates.h" - "./File.cpp" - "./File.h" - "./FileMapping.cpp" - "./FileMapping.h" - "./FunctionProviderSink.cpp" - "./GetTextExtentEditSession.cpp" - "./GetTextExtentEditSession.h" - "./Globals.cpp" - "./Globals.h" - "./KeyEventSink.cpp" - "./KeyHandler.cpp" - "./KeyHandlerEditSession.cpp" - "./KeyHandlerEditSession.h" - "./KeyStateCategory.cpp" - "./KeyStateCategory.h" - "./LanguageBar.cpp" - "./LanguageBar.h" - "./Private.h" - "./Register.cpp" - "./RegKey.cpp" - "./RegKey.h" - "./resource.h" - "./SampleIME.cpp" - "./SampleIME.def" - "./SampleIME.h" - "./SampleIME.rc" - "./SampleIMEBaseStructure.cpp" - "./SampleIMEBaseStructure.h" - "./SampleIMEStructureArray.h" - "./ScrollBarWindow.cpp" - "./ScrollBarWindow.h" - "./SearchCandidateProvider.cpp" - "./SearchCandidateProvider.h" - "./Server.cpp" - "./ShadowWindow.cpp" - "./ShadowWindow.h" - "./StartComposition.cpp" - "./stdafx.h" - "./TableDictionaryEngine.cpp" - "./TableDictionaryEngine.h" - "./TextEditSink.cpp" - "./TfInputProcessorProfile.cpp" - "./TfInputProcessorProfile.h" - "./TfTextLayoutSink.cpp" - "./TfTextLayoutSink.h" - "./ThreadFocusSink.cpp" - "./ThreadMgrEventSink.cpp" - "./TipCandidateList.cpp" - "./TipCandidateList.h" - "./TipCandidateString.cpp" - "./TipCandidateString.h" + # Candidate + "./src/Candidate/CandidateListUIPresenter.cpp" + "./src/Candidate/CandidateListUIPresenter.h" + "./src/Candidate/EnumTfCandidates.cpp" + "./src/Candidate/EnumTfCandidates.h" + "./src/Candidate/SearchCandidateProvider.cpp" + "./src/Candidate/SearchCandidateProvider.h" + "./src/Candidate/TipCandidateList.cpp" + "./src/Candidate/TipCandidateList.h" + "./src/Candidate/TipCandidateString.cpp" + "./src/Candidate/TipCandidateString.h" + # Compartment + "./src/Compartment/Compartment.cpp" + "./src/Compartment/Compartment.h" + # Composition + "./src/Composition/Composition.cpp" + "./src/Composition/CompositionProcessorEngine.cpp" + "./src/Composition/CompositionProcessorEngine.cpp" + "./src/Composition/CompositionProcessorEngine.h" + "./src/Composition/EndComposition.cpp" + "./src/Composition/StartComposition.cpp" + # DictEngine + "./src/DictEngine/BaseDictionaryEngine.cpp" + "./src/DictEngine/BaseDictionaryEngine.h" + "./src/DictEngine/DictionaryParser.cpp" + "./src/DictEngine/DictionaryParser.h" + "./src/DictEngine/DictionarySearch.cpp" + "./src/DictEngine/DictionarySearch.h" + "./src/DictEngine/TableDictionaryEngine.cpp" + "./src/DictEngine/TableDictionaryEngine.h" + # DisplayAttribute + "./src/DisplayAttribute/DisplayAttribute.cpp" + "./src/DisplayAttribute/DisplayAttributeInfo.cpp" + "./src/DisplayAttribute/DisplayAttributeInfo.h" + "./src/DisplayAttribute/DisplayAttributeProvider.cpp" + "./src/DisplayAttribute/DisplayString.h" + "./src/DisplayAttribute/EnumDisplayAttributeInfo.cpp" + "./src/DisplayAttribute/EnumDisplayAttributeInfo.h" + # Edit + "./src/Edit/EditSession.cpp" + "./src/Edit/EditSession.h" + "./src/Edit/GetTextExtentEditSession.cpp" + "./src/Edit/GetTextExtentEditSession.h" + "./src/Edit/TextEditSink.cpp" + # File + "./src/File/File.cpp" + "./src/File/File.h" + "./src/File/FileMapping.cpp" + "./src/File/FileMapping.h" + # Global + "./src/Global/Globals.cpp" + "./src/Global/Globals.h" + # Header + "./src/Header/Define.h" + "./src/Header/Private.h" + "./src/Header/resource.h" + "./src/Header/stdafx.h" + # IME + "./src/IME/ActiveLanguageProfileNotifySink.cpp" + "./src/IME/FunctionProviderSink.cpp" + "./src/IME/SampleIME.cpp" + "./src/IME/SampleIME.def" + "./src/IME/SampleIME.h" + "./src/IME/SampleIME.rc" + "./src/IME/SampleIMEBaseStructure.cpp" + "./src/IME/SampleIMEBaseStructure.h" + "./src/IME/SampleIMEStructureArray.h" + # Key + "./src/Key/KeyEventSink.cpp" + "./src/Key/KeyHandler.cpp" + "./src/Key/KeyHandlerEditSession.cpp" + "./src/Key/KeyHandlerEditSession.h" + "./src/Key/KeyStateCategory.cpp" + "./src/Key/KeyStateCategory.h" + # LanguageBar + "./src/LanguageBar/LanguageBar.cpp" + "./src/LanguageBar/LanguageBar.h" + # Register + "./src/Register/Register.cpp" + "./src/Register/RegKey.cpp" + "./src/Register/RegKey.h" + # Tf + "./src/Tf/TfInputProcessorProfile.cpp" + "./src/Tf/TfInputProcessorProfile.h" + "./src/Tf/TfTextLayoutSink.cpp" + "./src/Tf/TfTextLayoutSink.h" + # Thread + "./src/Thread/ThreadFocusSink.cpp" + "./src/Thread/ThreadMgrEventSink.cpp" + # Window + "./src/Window/BaseWindow.cpp" + "./src/Window/BaseWindow.h" + "./src/Window/ButtonWindow.cpp" + "./src/Window/ButtonWindow.h" + "./src/Window/CandidateWindow.cpp" + "./src/Window/CandidateWindow.h" + "./src/Window/ScrollBarWindow.cpp" + "./src/Window/ScrollBarWindow.h" + "./src/Window/ShadowWindow.cpp" + "./src/Window/ShadowWindow.h" + # Main + "./src/DllMain.cpp" + "./src/Server.cpp" ) diff --git a/CandidateListUIPresenter.cpp b/src/Candidate/CandidateListUIPresenter.cpp similarity index 100% rename from CandidateListUIPresenter.cpp rename to src/Candidate/CandidateListUIPresenter.cpp diff --git a/CandidateListUIPresenter.h b/src/Candidate/CandidateListUIPresenter.h similarity index 100% rename from CandidateListUIPresenter.h rename to src/Candidate/CandidateListUIPresenter.h diff --git a/EnumTfCandidates.cpp b/src/Candidate/EnumTfCandidates.cpp similarity index 100% rename from EnumTfCandidates.cpp rename to src/Candidate/EnumTfCandidates.cpp diff --git a/EnumTfCandidates.h b/src/Candidate/EnumTfCandidates.h similarity index 100% rename from EnumTfCandidates.h rename to src/Candidate/EnumTfCandidates.h diff --git a/SearchCandidateProvider.cpp b/src/Candidate/SearchCandidateProvider.cpp similarity index 100% rename from SearchCandidateProvider.cpp rename to src/Candidate/SearchCandidateProvider.cpp diff --git a/SearchCandidateProvider.h b/src/Candidate/SearchCandidateProvider.h similarity index 100% rename from SearchCandidateProvider.h rename to src/Candidate/SearchCandidateProvider.h diff --git a/TipCandidateList.cpp b/src/Candidate/TipCandidateList.cpp similarity index 100% rename from TipCandidateList.cpp rename to src/Candidate/TipCandidateList.cpp diff --git a/TipCandidateList.h b/src/Candidate/TipCandidateList.h similarity index 100% rename from TipCandidateList.h rename to src/Candidate/TipCandidateList.h diff --git a/TipCandidateString.cpp b/src/Candidate/TipCandidateString.cpp similarity index 100% rename from TipCandidateString.cpp rename to src/Candidate/TipCandidateString.cpp diff --git a/TipCandidateString.h b/src/Candidate/TipCandidateString.h similarity index 100% rename from TipCandidateString.h rename to src/Candidate/TipCandidateString.h diff --git a/Compartment.cpp b/src/Compartment/Compartment.cpp similarity index 100% rename from Compartment.cpp rename to src/Compartment/Compartment.cpp diff --git a/Compartment.h b/src/Compartment/Compartment.h similarity index 100% rename from Compartment.h rename to src/Compartment/Compartment.h diff --git a/Composition.cpp b/src/Composition/Composition.cpp similarity index 100% rename from Composition.cpp rename to src/Composition/Composition.cpp diff --git a/CompositionProcessorEngine.cpp b/src/Composition/CompositionProcessorEngine.cpp similarity index 100% rename from CompositionProcessorEngine.cpp rename to src/Composition/CompositionProcessorEngine.cpp diff --git a/CompositionProcessorEngine.h b/src/Composition/CompositionProcessorEngine.h similarity index 100% rename from CompositionProcessorEngine.h rename to src/Composition/CompositionProcessorEngine.h diff --git a/EndComposition.cpp b/src/Composition/EndComposition.cpp similarity index 100% rename from EndComposition.cpp rename to src/Composition/EndComposition.cpp diff --git a/StartComposition.cpp b/src/Composition/StartComposition.cpp similarity index 100% rename from StartComposition.cpp rename to src/Composition/StartComposition.cpp diff --git a/BaseDictionaryEngine.cpp b/src/DictEngine/BaseDictionaryEngine.cpp similarity index 100% rename from BaseDictionaryEngine.cpp rename to src/DictEngine/BaseDictionaryEngine.cpp diff --git a/BaseDictionaryEngine.h b/src/DictEngine/BaseDictionaryEngine.h similarity index 100% rename from BaseDictionaryEngine.h rename to src/DictEngine/BaseDictionaryEngine.h diff --git a/DictionaryParser.cpp b/src/DictEngine/DictionaryParser.cpp similarity index 100% rename from DictionaryParser.cpp rename to src/DictEngine/DictionaryParser.cpp diff --git a/DictionaryParser.h b/src/DictEngine/DictionaryParser.h similarity index 100% rename from DictionaryParser.h rename to src/DictEngine/DictionaryParser.h diff --git a/DictionarySearch.cpp b/src/DictEngine/DictionarySearch.cpp similarity index 100% rename from DictionarySearch.cpp rename to src/DictEngine/DictionarySearch.cpp diff --git a/DictionarySearch.h b/src/DictEngine/DictionarySearch.h similarity index 100% rename from DictionarySearch.h rename to src/DictEngine/DictionarySearch.h diff --git a/TableDictionaryEngine.cpp b/src/DictEngine/TableDictionaryEngine.cpp similarity index 100% rename from TableDictionaryEngine.cpp rename to src/DictEngine/TableDictionaryEngine.cpp diff --git a/TableDictionaryEngine.h b/src/DictEngine/TableDictionaryEngine.h similarity index 100% rename from TableDictionaryEngine.h rename to src/DictEngine/TableDictionaryEngine.h diff --git a/DisplayAttribute.cpp b/src/DisplayAttribute/DisplayAttribute.cpp similarity index 100% rename from DisplayAttribute.cpp rename to src/DisplayAttribute/DisplayAttribute.cpp diff --git a/DisplayAttributeInfo.cpp b/src/DisplayAttribute/DisplayAttributeInfo.cpp similarity index 100% rename from DisplayAttributeInfo.cpp rename to src/DisplayAttribute/DisplayAttributeInfo.cpp diff --git a/DisplayAttributeInfo.h b/src/DisplayAttribute/DisplayAttributeInfo.h similarity index 100% rename from DisplayAttributeInfo.h rename to src/DisplayAttribute/DisplayAttributeInfo.h diff --git a/DisplayAttributeProvider.cpp b/src/DisplayAttribute/DisplayAttributeProvider.cpp similarity index 100% rename from DisplayAttributeProvider.cpp rename to src/DisplayAttribute/DisplayAttributeProvider.cpp diff --git a/DisplayString.h b/src/DisplayAttribute/DisplayString.h similarity index 100% rename from DisplayString.h rename to src/DisplayAttribute/DisplayString.h diff --git a/EnumDisplayAttributeInfo.cpp b/src/DisplayAttribute/EnumDisplayAttributeInfo.cpp similarity index 100% rename from EnumDisplayAttributeInfo.cpp rename to src/DisplayAttribute/EnumDisplayAttributeInfo.cpp diff --git a/EnumDisplayAttributeInfo.h b/src/DisplayAttribute/EnumDisplayAttributeInfo.h similarity index 100% rename from EnumDisplayAttributeInfo.h rename to src/DisplayAttribute/EnumDisplayAttributeInfo.h diff --git a/DllMain.cpp b/src/DllMain.cpp similarity index 100% rename from DllMain.cpp rename to src/DllMain.cpp diff --git a/EditSession.cpp b/src/Edit/EditSession.cpp similarity index 100% rename from EditSession.cpp rename to src/Edit/EditSession.cpp diff --git a/EditSession.h b/src/Edit/EditSession.h similarity index 100% rename from EditSession.h rename to src/Edit/EditSession.h diff --git a/GetTextExtentEditSession.cpp b/src/Edit/GetTextExtentEditSession.cpp similarity index 100% rename from GetTextExtentEditSession.cpp rename to src/Edit/GetTextExtentEditSession.cpp diff --git a/GetTextExtentEditSession.h b/src/Edit/GetTextExtentEditSession.h similarity index 100% rename from GetTextExtentEditSession.h rename to src/Edit/GetTextExtentEditSession.h diff --git a/TextEditSink.cpp b/src/Edit/TextEditSink.cpp similarity index 100% rename from TextEditSink.cpp rename to src/Edit/TextEditSink.cpp diff --git a/File.cpp b/src/File/File.cpp similarity index 100% rename from File.cpp rename to src/File/File.cpp diff --git a/File.h b/src/File/File.h similarity index 100% rename from File.h rename to src/File/File.h diff --git a/FileMapping.cpp b/src/File/FileMapping.cpp similarity index 100% rename from FileMapping.cpp rename to src/File/FileMapping.cpp diff --git a/FileMapping.h b/src/File/FileMapping.h similarity index 100% rename from FileMapping.h rename to src/File/FileMapping.h diff --git a/Globals.cpp b/src/Global/Globals.cpp similarity index 87% rename from Globals.cpp rename to src/Global/Globals.cpp index 84b5c3d8..d3f2cbc9 100644 --- a/Globals.cpp +++ b/src/Global/Globals.cpp @@ -200,20 +200,20 @@ extern const struct _PUNCTUATION PunctuationTable[14] = { #define TF_MOD_RLCONTROL (TF_MOD_RCONTROL | TF_MOD_LCONTROL) #define TF_MOD_RLSHIFT (TF_MOD_RSHIFT | TF_MOD_LSHIFT) -#define CheckMod(m0, m1, mod) \ - if (m1 & TF_MOD_##mod##) \ - { \ - if (!(m0 & TF_MOD_##mod##)) \ - { \ - return FALSE; \ - } \ - } \ - else \ - { \ - if ((m1 ^ m0) & TF_MOD_RL##mod##) \ - { \ - return FALSE; \ - } \ +#define CheckMod(m0, m1, mod) \ + if (m1 & TF_MOD_##mod##) \ + { \ + if (!(m0 & TF_MOD_##mod##)) \ + { \ + return FALSE; \ + } \ + } \ + else \ + { \ + if ((m1 ^ m0) & TF_MOD_RL##mod##) \ + { \ + return FALSE; \ + } \ } BOOL CheckModifiers(UINT modCurrent, UINT mod) diff --git a/Globals.h b/src/Global/Globals.h similarity index 100% rename from Globals.h rename to src/Global/Globals.h diff --git a/Define.h b/src/Header/Define.h similarity index 100% rename from Define.h rename to src/Header/Define.h diff --git a/Private.h b/src/Header/Private.h similarity index 100% rename from Private.h rename to src/Header/Private.h diff --git a/resource.h b/src/Header/resource.h similarity index 100% rename from resource.h rename to src/Header/resource.h diff --git a/stdafx.h b/src/Header/stdafx.h similarity index 100% rename from stdafx.h rename to src/Header/stdafx.h diff --git a/ActiveLanguageProfileNotifySink.cpp b/src/IME/ActiveLanguageProfileNotifySink.cpp similarity index 100% rename from ActiveLanguageProfileNotifySink.cpp rename to src/IME/ActiveLanguageProfileNotifySink.cpp diff --git a/FunctionProviderSink.cpp b/src/IME/FunctionProviderSink.cpp similarity index 100% rename from FunctionProviderSink.cpp rename to src/IME/FunctionProviderSink.cpp diff --git a/SampleIME.cpp b/src/IME/SampleIME.cpp similarity index 100% rename from SampleIME.cpp rename to src/IME/SampleIME.cpp diff --git a/SampleIME.def b/src/IME/SampleIME.def similarity index 100% rename from SampleIME.def rename to src/IME/SampleIME.def diff --git a/SampleIME.h b/src/IME/SampleIME.h similarity index 100% rename from SampleIME.h rename to src/IME/SampleIME.h diff --git a/SampleIME.rc b/src/IME/SampleIME.rc similarity index 78% rename from SampleIME.rc rename to src/IME/SampleIME.rc index 04b15abe..95cfab00 100644 --- a/SampleIME.rc +++ b/src/IME/SampleIME.rc @@ -15,13 +15,13 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDIS_SAMPLEIME ICON "image\\SampleIme.ico" -IDI_IME_MODE_ON ICON "image\\ImeModeOn.ico" -IDI_IME_MODE_OFF ICON "image\\ImeModeOff.ico" -IDI_DOUBLE_SINGLE_BYTE_ON ICON "image\\DoubleSingleByteOn.ico" -IDI_DOUBLE_SINGLE_BYTE_OFF ICON "image\\DoubleSingleByteOff.ico" -IDI_PUNCTUATION_ON ICON "image\\PunctuationOn.ico" -IDI_PUNCTUATION_OFF ICON "image\\PunctuationOff.ico" +IDIS_SAMPLEIME ICON "..\\..\\image\\SampleIme.ico" +IDI_IME_MODE_ON ICON "..\\..\\image\\ImeModeOn.ico" +IDI_IME_MODE_OFF ICON "..\\..\\image\\ImeModeOff.ico" +IDI_DOUBLE_SINGLE_BYTE_ON ICON "..\\..\\image\\DoubleSingleByteOn.ico" +IDI_DOUBLE_SINGLE_BYTE_OFF ICON "..\\..\\image\\DoubleSingleByteOff.ico" +IDI_PUNCTUATION_ON ICON "..\\..\\image\\PunctuationOn.ico" +IDI_PUNCTUATION_OFF ICON "..\\..\\image\\PunctuationOff.ico" ///////////////////////////////////////////////////////////////////////////// // diff --git a/SampleIMEBaseStructure.cpp b/src/IME/SampleIMEBaseStructure.cpp similarity index 100% rename from SampleIMEBaseStructure.cpp rename to src/IME/SampleIMEBaseStructure.cpp diff --git a/SampleIMEBaseStructure.h b/src/IME/SampleIMEBaseStructure.h similarity index 100% rename from SampleIMEBaseStructure.h rename to src/IME/SampleIMEBaseStructure.h diff --git a/SampleIMEStructureArray.h b/src/IME/SampleIMEStructureArray.h similarity index 100% rename from SampleIMEStructureArray.h rename to src/IME/SampleIMEStructureArray.h diff --git a/KeyEventSink.cpp b/src/Key/KeyEventSink.cpp similarity index 95% rename from KeyEventSink.cpp rename to src/Key/KeyEventSink.cpp index 61f61d3b..cee177a3 100644 --- a/KeyEventSink.cpp +++ b/src/Key/KeyEventSink.cpp @@ -12,6 +12,7 @@ #include "CompositionProcessorEngine.h" #include "KeyHandlerEditSession.h" #include "Compartment.h" +#include // 0xF003, 0xF004 are the keys that the touch keyboard sends for next/previous #define THIRDPARTY_NEXTPAGE static_cast(0xF003) @@ -21,6 +22,7 @@ // vkeys that the IME handles specially __inline UINT VKeyFromVKPacketAndWchar(UINT vk, WCHAR wch) { + Global::LogMessageW(L"fany VKeyFromVKPacketAndWchar begin..."); UINT vkRet = vk; if (LOWORD(vk) == VK_PACKET) { @@ -49,6 +51,8 @@ __inline UINT VKeyFromVKPacketAndWchar(UINT vk, WCHAR wch) vkRet = VK_PRIOR; } } + std::wstring msg_to = std::wstring(1, wch) + L"fany VKeyFromVKPacketAndWchar end..."; + Global::LogMessageW(msg_to.c_str()); return vkRet; } diff --git a/KeyHandler.cpp b/src/Key/KeyHandler.cpp similarity index 100% rename from KeyHandler.cpp rename to src/Key/KeyHandler.cpp diff --git a/KeyHandlerEditSession.cpp b/src/Key/KeyHandlerEditSession.cpp similarity index 100% rename from KeyHandlerEditSession.cpp rename to src/Key/KeyHandlerEditSession.cpp diff --git a/KeyHandlerEditSession.h b/src/Key/KeyHandlerEditSession.h similarity index 100% rename from KeyHandlerEditSession.h rename to src/Key/KeyHandlerEditSession.h diff --git a/KeyStateCategory.cpp b/src/Key/KeyStateCategory.cpp similarity index 100% rename from KeyStateCategory.cpp rename to src/Key/KeyStateCategory.cpp diff --git a/KeyStateCategory.h b/src/Key/KeyStateCategory.h similarity index 100% rename from KeyStateCategory.h rename to src/Key/KeyStateCategory.h diff --git a/LanguageBar.cpp b/src/LanguageBar/LanguageBar.cpp similarity index 100% rename from LanguageBar.cpp rename to src/LanguageBar/LanguageBar.cpp diff --git a/LanguageBar.h b/src/LanguageBar/LanguageBar.h similarity index 100% rename from LanguageBar.h rename to src/LanguageBar/LanguageBar.h diff --git a/RegKey.cpp b/src/Register/RegKey.cpp similarity index 100% rename from RegKey.cpp rename to src/Register/RegKey.cpp diff --git a/RegKey.h b/src/Register/RegKey.h similarity index 100% rename from RegKey.h rename to src/Register/RegKey.h diff --git a/Register.cpp b/src/Register/Register.cpp similarity index 100% rename from Register.cpp rename to src/Register/Register.cpp diff --git a/Server.cpp b/src/Server.cpp similarity index 100% rename from Server.cpp rename to src/Server.cpp diff --git a/TfInputProcessorProfile.cpp b/src/Tf/TfInputProcessorProfile.cpp similarity index 100% rename from TfInputProcessorProfile.cpp rename to src/Tf/TfInputProcessorProfile.cpp diff --git a/TfInputProcessorProfile.h b/src/Tf/TfInputProcessorProfile.h similarity index 100% rename from TfInputProcessorProfile.h rename to src/Tf/TfInputProcessorProfile.h diff --git a/TfTextLayoutSink.cpp b/src/Tf/TfTextLayoutSink.cpp similarity index 100% rename from TfTextLayoutSink.cpp rename to src/Tf/TfTextLayoutSink.cpp diff --git a/TfTextLayoutSink.h b/src/Tf/TfTextLayoutSink.h similarity index 100% rename from TfTextLayoutSink.h rename to src/Tf/TfTextLayoutSink.h diff --git a/ThreadFocusSink.cpp b/src/Thread/ThreadFocusSink.cpp similarity index 100% rename from ThreadFocusSink.cpp rename to src/Thread/ThreadFocusSink.cpp diff --git a/ThreadMgrEventSink.cpp b/src/Thread/ThreadMgrEventSink.cpp similarity index 100% rename from ThreadMgrEventSink.cpp rename to src/Thread/ThreadMgrEventSink.cpp diff --git a/BaseWindow.cpp b/src/Window/BaseWindow.cpp similarity index 100% rename from BaseWindow.cpp rename to src/Window/BaseWindow.cpp diff --git a/BaseWindow.h b/src/Window/BaseWindow.h similarity index 100% rename from BaseWindow.h rename to src/Window/BaseWindow.h diff --git a/ButtonWindow.cpp b/src/Window/ButtonWindow.cpp similarity index 100% rename from ButtonWindow.cpp rename to src/Window/ButtonWindow.cpp diff --git a/ButtonWindow.h b/src/Window/ButtonWindow.h similarity index 100% rename from ButtonWindow.h rename to src/Window/ButtonWindow.h diff --git a/CandidateWindow.cpp b/src/Window/CandidateWindow.cpp similarity index 100% rename from CandidateWindow.cpp rename to src/Window/CandidateWindow.cpp diff --git a/CandidateWindow.h b/src/Window/CandidateWindow.h similarity index 100% rename from CandidateWindow.h rename to src/Window/CandidateWindow.h diff --git a/ScrollBarWindow.cpp b/src/Window/ScrollBarWindow.cpp similarity index 100% rename from ScrollBarWindow.cpp rename to src/Window/ScrollBarWindow.cpp diff --git a/ScrollBarWindow.h b/src/Window/ScrollBarWindow.h similarity index 100% rename from ScrollBarWindow.h rename to src/Window/ScrollBarWindow.h diff --git a/ShadowWindow.cpp b/src/Window/ShadowWindow.cpp similarity index 100% rename from ShadowWindow.cpp rename to src/Window/ShadowWindow.cpp diff --git a/ShadowWindow.h b/src/Window/ShadowWindow.h similarity index 100% rename from ShadowWindow.h rename to src/Window/ShadowWindow.h