From b282f654ec149fd7daacd73dc0b8547badf0daaf Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 25 Apr 2015 12:28:25 +0000 Subject: ChangeKeyboardLayout - common project git-svn-id: http://svn.miranda-ng.org/main/trunk@13134 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- bin10/mir_dev.sln | 2 +- bin10/mir_full.sln | 2 +- bin10/mir_full_pro.sln | 2 +- bin12/mir_dev.sln | 2 +- bin12/mir_full.sln | 2 +- .../ChangeKeyboardLayout.vcxproj | 28 +++ .../ChangeKeyboardLayout.vcxproj.filters | 4 + .../ChangeKeyboardLayout_10.vcxproj | 210 -------------------- .../ChangeKeyboardLayout_10.vcxproj.filters | 62 ------ .../ChangeKeyboardLayout_12.vcxproj | 213 --------------------- .../ChangeKeyboardLayout_12.vcxproj.filters | 62 ------ plugins/ChangeKeyboardLayout/src/commonheaders.h | 115 ----------- plugins/ChangeKeyboardLayout/src/hook_events.cpp | 2 +- plugins/ChangeKeyboardLayout/src/hook_events.h | 2 +- plugins/ChangeKeyboardLayout/src/main.cpp | 2 +- plugins/ChangeKeyboardLayout/src/options.cpp | 2 +- plugins/ChangeKeyboardLayout/src/options.h | 2 +- plugins/ChangeKeyboardLayout/src/stdafx.cpp | 18 -- plugins/ChangeKeyboardLayout/src/stdafx.cxx | 18 ++ plugins/ChangeKeyboardLayout/src/stdafx.h | 115 +++++++++++ .../ChangeKeyboardLayout/src/text_operations.cpp | 2 +- plugins/ChangeKeyboardLayout/src/text_operations.h | 2 +- 22 files changed, 177 insertions(+), 692 deletions(-) create mode 100644 plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj create mode 100644 plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj.filters delete mode 100644 plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj delete mode 100644 plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj.filters delete mode 100644 plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj delete mode 100644 plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj.filters delete mode 100644 plugins/ChangeKeyboardLayout/src/commonheaders.h delete mode 100644 plugins/ChangeKeyboardLayout/src/stdafx.cpp create mode 100644 plugins/ChangeKeyboardLayout/src/stdafx.cxx create mode 100644 plugins/ChangeKeyboardLayout/src/stdafx.h diff --git a/bin10/mir_dev.sln b/bin10/mir_dev.sln index 04e640efd2..a90f3c9874 100644 --- a/bin10/mir_dev.sln +++ b/bin10/mir_dev.sln @@ -151,7 +151,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter_10.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout_10.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar_10.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" EndProject diff --git a/bin10/mir_full.sln b/bin10/mir_full.sln index f55d38e170..29a095d169 100644 --- a/bin10/mir_full.sln +++ b/bin10/mir_full.sln @@ -151,7 +151,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter_10.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout_10.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar_10.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" EndProject diff --git a/bin10/mir_full_pro.sln b/bin10/mir_full_pro.sln index 0c03c4310d..f939f01f93 100644 --- a/bin10/mir_full_pro.sln +++ b/bin10/mir_full_pro.sln @@ -151,7 +151,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter_10.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout_10.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar_10.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" EndProject diff --git a/bin12/mir_dev.sln b/bin12/mir_dev.sln index 7fa7dea39d..69a8e32cf9 100644 --- a/bin12/mir_dev.sln +++ b/bin12/mir_dev.sln @@ -153,7 +153,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter_12.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout_12.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar_12.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" EndProject diff --git a/bin12/mir_full.sln b/bin12/mir_full.sln index 34f4aab883..42de6b898d 100644 --- a/bin12/mir_full.sln +++ b/bin12/mir_full.sln @@ -153,7 +153,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter_12.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout_12.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar_12.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" EndProject diff --git a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj new file mode 100644 index 0000000000..d7ce740735 --- /dev/null +++ b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + ChangeKeyboardLayout + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} + + + + + \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj.filters b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj deleted file mode 100644 index a14292d506..0000000000 --- a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - ChangeKeyboardLayout - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - true - EditAndContinue - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Use - commonheaders.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - false - $(ProfileDir)..\..\bin10\lib - - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Use - commonheaders.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - false - $(ProfileDir)..\..\bin10\lib - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - Use - commonheaders.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - true - true - true - false - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - Use - commonheaders.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - true - true - true - false - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - - - - Create - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj.filters b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj.filters deleted file mode 100644 index 9afa94a98c..0000000000 --- a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_10.vcxproj.filters +++ /dev/null @@ -1,62 +0,0 @@ - - - - - {cc54d694-45d5-4087-bbef-3c76adfeb05b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {4ec5c4c7-f01c-4de6-8b8b-0380023afb01} - h;hpp;hxx;hm;inl - - - {768f39e1-b07e-4b84-8973-6504d076d16e} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj deleted file mode 100644 index 5e3ed954b6..0000000000 --- a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - ChangeKeyboardLayout - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} - - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - true - EditAndContinue - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Use - commonheaders.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - false - $(ProfileDir)..\..\bin12\lib - false - - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Use - commonheaders.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - false - $(ProfileDir)..\..\bin12\lib - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - Use - commonheaders.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - true - true - true - false - $(ProfileDir)..\..\bin12\lib - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - Use - commonheaders.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - true - true - true - false - $(ProfileDir)..\..\bin12\lib - - - - - - Create - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj.filters b/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj.filters deleted file mode 100644 index 9afa94a98c..0000000000 --- a/plugins/ChangeKeyboardLayout/ChangeKeyboardLayout_12.vcxproj.filters +++ /dev/null @@ -1,62 +0,0 @@ - - - - - {cc54d694-45d5-4087-bbef-3c76adfeb05b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {4ec5c4c7-f01c-4de6-8b8b-0380023afb01} - h;hpp;hxx;hm;inl - - - {768f39e1-b07e-4b84-8973-6504d076d16e} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/src/commonheaders.h b/plugins/ChangeKeyboardLayout/src/commonheaders.h deleted file mode 100644 index 1160595f75..0000000000 --- a/plugins/ChangeKeyboardLayout/src/commonheaders.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef M_CKL_COMMONHEADERS_H -#define M_CKL_COMMONHEADERS_H -#define _CRT_SECURE_NO_WARNINGS -#define _CRT_NONSTDC_NO_DEPRECATE - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "resource.h" -#include "options.h" -#include "hook_events.h" -#include "text_operations.h" -#include "version.h" - -#define MaxTextSize 64000 -#define ModuleName LPGEN("ChangeKeyboardLayout") - -// History++ API -#define MS_HPP_EG_WINDOW "History++/ExtGrid/NewWindow" -#define MS_HPP_EG_EVENT "History++/ExtGrid/Event" -#define MS_HPP_EG_NAVIGATE "History++/ExtGrid/Navigate" -#define MS_HPP_EG_OPTIONSCHANGED "History++/ExtGrid/OptionsChanged" - -// Òèïû îêîí -#define WTYPE_Unknown 0 -#define WTYPE_HistoryPP 1 -#define WTYPE_IEView 2 -#define WTYPE_RichEdit 3 -#define WTYPE_Edit 4 - -//Òèï îïåðàöèè íàä òåêñòîì -#define TOT_Layout 0 -#define TOT_Case 1 - -// Èìåíà çâóêîâ -#define SND_ChangeLayout "ChangingLayout" -#define SND_ChangeCase "ChangingCase" - -//Öâåòà ïîïàïîâ -#define PPC_POPUP 0 -#define PPC_WINDOWS 1 -#define PPC_CUSTOM 2 - -//Òàéìàóò ïîïàïîâ -#define PPT_POPUP 0 -#define PPT_PERMANENT 1 -#define PPT_CUSTOM 2 - - -typedef struct -{ - DWORD dwHotkey_Layout; - DWORD dwHotkey_Layout2; - DWORD dwHotkey_Case; - BOOL CurrentWordLayout; - BOOL CurrentWordLayout2; - BOOL CurrentWordCase; - BOOL TwoWay; - BOOL ChangeSystemLayout; - BOOL CopyToClipboard; - BOOL ShowPopup; - BYTE bCaseOperations; -} MainOptions; - -typedef struct -{ - BYTE bColourType; - COLORREF crTextColour; - COLORREF crBackColour; - BYTE bTimeoutType; - BYTE bTimeout; - BYTE bLeftClick; - BYTE bRightClick; - POPUPACTION paActions[1]; -} PopupOptions; - -extern HINSTANCE hInst; - -extern HANDLE hChangeLayout, hGetLayoutOfText, hChangeTextLayout; - -extern HICON hPopupIcon, hCopyIcon; - -extern LPCTSTR ptszKeybEng; -extern HKL hklEng; - -extern BYTE bLayNum; -extern HKL hklLayouts[20]; -extern LPTSTR ptszLayStrings[20]; - -extern LPCTSTR ptszSeparators; - -extern HHOOK kbHook_All; - -extern MainOptions moOptions; -extern PopupOptions poOptions, poOptionsTemp; - -LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam); -int OnIconsChanged(WPARAM wParam, LPARAM lParam); - -#endif \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 0affb1e21a..5749270715 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -1,4 +1,4 @@ -#include "commonheaders.h" +#include "stdafx.h" INT_PTR APIChangeLayout(WPARAM wParam, LPARAM lParam) { diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.h b/plugins/ChangeKeyboardLayout/src/hook_events.h index 992c7cd0c3..b7e38dd3f6 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.h +++ b/plugins/ChangeKeyboardLayout/src/hook_events.h @@ -1,7 +1,7 @@ #ifndef M_CKL_HOOK_EVENTS_H #define M_CKL_HOOK_EVENTS_H -#include "commonheaders.h" +#include "stdafx.h" void ReadMainOptions(); void WriteMainOptions(); diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp index 6cb7f6bc6e..d3b73da55f 100644 --- a/plugins/ChangeKeyboardLayout/src/main.cpp +++ b/plugins/ChangeKeyboardLayout/src/main.cpp @@ -1,4 +1,4 @@ -#include "commonheaders.h" +#include "stdafx.h" int hLangpack; LPTSTR ptszLayStrings[20]; diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index 900e679243..a12010eef2 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -1,4 +1,4 @@ -#include "commonheaders.h" +#include "stdafx.h" INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/ChangeKeyboardLayout/src/options.h b/plugins/ChangeKeyboardLayout/src/options.h index bcf46a244b..e63f63e6ca 100644 --- a/plugins/ChangeKeyboardLayout/src/options.h +++ b/plugins/ChangeKeyboardLayout/src/options.h @@ -1,7 +1,7 @@ #ifndef M_CKL_OPTIONS_H #define M_CKL_OPTIONS_H -#include "commonheaders.h" +#include "stdafx.h" INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam); diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.cpp b/plugins/ChangeKeyboardLayout/src/stdafx.cpp deleted file mode 100644 index 048b14e9d2..0000000000 --- a/plugins/ChangeKeyboardLayout/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "commonheaders.h" \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.cxx b/plugins/ChangeKeyboardLayout/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/ChangeKeyboardLayout/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.h b/plugins/ChangeKeyboardLayout/src/stdafx.h new file mode 100644 index 0000000000..1160595f75 --- /dev/null +++ b/plugins/ChangeKeyboardLayout/src/stdafx.h @@ -0,0 +1,115 @@ +#ifndef M_CKL_COMMONHEADERS_H +#define M_CKL_COMMONHEADERS_H +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_DEPRECATE + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "resource.h" +#include "options.h" +#include "hook_events.h" +#include "text_operations.h" +#include "version.h" + +#define MaxTextSize 64000 +#define ModuleName LPGEN("ChangeKeyboardLayout") + +// History++ API +#define MS_HPP_EG_WINDOW "History++/ExtGrid/NewWindow" +#define MS_HPP_EG_EVENT "History++/ExtGrid/Event" +#define MS_HPP_EG_NAVIGATE "History++/ExtGrid/Navigate" +#define MS_HPP_EG_OPTIONSCHANGED "History++/ExtGrid/OptionsChanged" + +// Òèïû îêîí +#define WTYPE_Unknown 0 +#define WTYPE_HistoryPP 1 +#define WTYPE_IEView 2 +#define WTYPE_RichEdit 3 +#define WTYPE_Edit 4 + +//Òèï îïåðàöèè íàä òåêñòîì +#define TOT_Layout 0 +#define TOT_Case 1 + +// Èìåíà çâóêîâ +#define SND_ChangeLayout "ChangingLayout" +#define SND_ChangeCase "ChangingCase" + +//Öâåòà ïîïàïîâ +#define PPC_POPUP 0 +#define PPC_WINDOWS 1 +#define PPC_CUSTOM 2 + +//Òàéìàóò ïîïàïîâ +#define PPT_POPUP 0 +#define PPT_PERMANENT 1 +#define PPT_CUSTOM 2 + + +typedef struct +{ + DWORD dwHotkey_Layout; + DWORD dwHotkey_Layout2; + DWORD dwHotkey_Case; + BOOL CurrentWordLayout; + BOOL CurrentWordLayout2; + BOOL CurrentWordCase; + BOOL TwoWay; + BOOL ChangeSystemLayout; + BOOL CopyToClipboard; + BOOL ShowPopup; + BYTE bCaseOperations; +} MainOptions; + +typedef struct +{ + BYTE bColourType; + COLORREF crTextColour; + COLORREF crBackColour; + BYTE bTimeoutType; + BYTE bTimeout; + BYTE bLeftClick; + BYTE bRightClick; + POPUPACTION paActions[1]; +} PopupOptions; + +extern HINSTANCE hInst; + +extern HANDLE hChangeLayout, hGetLayoutOfText, hChangeTextLayout; + +extern HICON hPopupIcon, hCopyIcon; + +extern LPCTSTR ptszKeybEng; +extern HKL hklEng; + +extern BYTE bLayNum; +extern HKL hklLayouts[20]; +extern LPTSTR ptszLayStrings[20]; + +extern LPCTSTR ptszSeparators; + +extern HHOOK kbHook_All; + +extern MainOptions moOptions; +extern PopupOptions poOptions, poOptionsTemp; + +LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam); +int OnIconsChanged(WPARAM wParam, LPARAM lParam); + +#endif \ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 0500302770..135409e4be 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -1,4 +1,4 @@ -#include "commonheaders.h" +#include "stdafx.h" struct EditStreamData { diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.h b/plugins/ChangeKeyboardLayout/src/text_operations.h index 6671406f3d..6f5fdfed02 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.h +++ b/plugins/ChangeKeyboardLayout/src/text_operations.h @@ -1,7 +1,7 @@ #ifndef M_CKL_TEXT_OPERATIONS_H #define M_CKL_TEXT_OPERATIONS_H -#include "commonheaders.h" +#include "stdafx.h" BOOL CopyTextToClipboard(LPTSTR ptszText); LPSTR GetNameOfLayout(HKL hklLayout); -- cgit v1.2.3