From e5cc66467b9b2ee4f1d3b8c25afa36e3c04e1428 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 23 Jul 2012 20:14:50 +0000 Subject: KeyboardNotify: now use precompiled header git-svn-id: http://svn.miranda-ng.org/main/trunk@1139 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/KeyboardNotify_10.vcxproj | 20 ++++--- .../KeyboardNotify_10.vcxproj.filters | 12 ++--- plugins/KeyboardNotify/src/Common.h | 62 ++++++++++++++++++++++ plugins/KeyboardNotify/src/EnumProc.cpp | 9 +--- plugins/KeyboardNotify/src/flash.cpp | 11 +--- plugins/KeyboardNotify/src/ignore.cpp | 23 +------- plugins/KeyboardNotify/src/keyboard.cpp | 10 +--- plugins/KeyboardNotify/src/keypresses.cpp | 8 +-- plugins/KeyboardNotify/src/main.cpp | 30 +---------- plugins/KeyboardNotify/src/options.cpp | 24 +-------- plugins/KeyboardNotify/src/trigger.cpp | 15 +----- plugins/KeyboardNotify/src/utils.cpp | 10 +--- 12 files changed, 88 insertions(+), 146 deletions(-) create mode 100644 plugins/KeyboardNotify/src/Common.h (limited to 'plugins') diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj index 3d4611676d..279ac13409 100644 --- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj +++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj @@ -77,6 +77,8 @@ MultiThreadedDebugDLL Level3 EditAndContinue + Use + Common.h true @@ -98,6 +100,8 @@ WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDebugDLL Level3 + Use + Common.h comctl32.lib;%(AdditionalDependencies) @@ -117,8 +121,10 @@ Full Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Level3 + Use + Common.h comctl32.lib;%(AdditionalDependencies) @@ -140,8 +146,10 @@ Full Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Level3 + Use + Common.h comctl32.lib;%(AdditionalDependencies) @@ -159,9 +167,7 @@ - - - + @@ -177,7 +183,9 @@ - + + Create + diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters index 8fe859e1ea..0f6f581618 100644 --- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters +++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters @@ -12,15 +12,6 @@ - - Header Files - - - Header Files - - - Header Files - Header Files @@ -45,6 +36,9 @@ Header Files + + Header Files + diff --git a/plugins/KeyboardNotify/src/Common.h b/plugins/KeyboardNotify/src/Common.h new file mode 100644 index 0000000000..de4e3a89eb --- /dev/null +++ b/plugins/KeyboardNotify/src/Common.h @@ -0,0 +1,62 @@ +/* + +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 (at your option) 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 WIN32_LEAN_AND_MEAN +#define _WIN32_WINNT 0x0500 +#define _CRT_SECURE_NO_WARNINGS + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "flash.h" +#include "ignore.h" +#include "keyboard.h" +#include "trigger.h" +#include "constants.h" +#include "protolist.h" +#include "EnumProc.h" +#include "utils.h" +#include "keypresses.h" +#include "resource.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "m_kbdnotify.h" +#include +#include "m_trigger.h" + diff --git a/plugins/KeyboardNotify/src/EnumProc.cpp b/plugins/KeyboardNotify/src/EnumProc.cpp index 7a5a23f0e3..3802569101 100644 --- a/plugins/KeyboardNotify/src/EnumProc.cpp +++ b/plugins/KeyboardNotify/src/EnumProc.cpp @@ -16,14 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include "EnumProc.h" - +#include "Common.h" BOOL findFilename(TCHAR *); TCHAR *filename(TCHAR *); diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp index aa0014a329..8e2809f31f 100644 --- a/plugins/KeyboardNotify/src/flash.cpp +++ b/plugins/KeyboardNotify/src/flash.cpp @@ -16,16 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include "flash.h" -#include "keyboard.h" -#include "keypresses.h" -#include "utils.h" -#include "constants.h" -#include -#include +#include "Common.h" typedef struct { unsigned int size; diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index 57fcceb8a6..4ad9e593f2 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -16,34 +16,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include -#include "ignore.h" -#include "resource.h" -#include "constants.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include "Common.h" #define IGNOREEVENT_MAX 4 #define IDI_SMALLDOT 211 #define IDI_FILLEDBLOB 212 #define IDI_EMPTYBLOB 213 -#define SIZEOF(a) (sizeof(a) / sizeof(a[0])) - static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, PF1_URLRECV, PF1_FILERECV, 0xFFFFFFFF}; extern double dWinVer; diff --git a/plugins/KeyboardNotify/src/keyboard.cpp b/plugins/KeyboardNotify/src/keyboard.cpp index df1033fce7..7379181fd9 100644 --- a/plugins/KeyboardNotify/src/keyboard.cpp +++ b/plugins/KeyboardNotify/src/keyboard.cpp @@ -16,15 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include "keypresses.h" -#include -#include - +#include "Common.h" // Globals extern BOOL bWindowsNT; diff --git a/plugins/KeyboardNotify/src/keypresses.cpp b/plugins/KeyboardNotify/src/keypresses.cpp index 6d1cef58e6..f13af1de77 100644 --- a/plugins/KeyboardNotify/src/keypresses.cpp +++ b/plugins/KeyboardNotify/src/keypresses.cpp @@ -16,13 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0500 - -#include -#include "flash.h" -#include "keypresses.h" - +#include "Common.h" // Prototypes void SetLock(WORD, BYTE, unsigned int *, INPUT *); diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 9bddd1b331..5ea26f3a2b 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -179,35 +179,7 @@ */ -#define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0500 - -#include -#include -#include -#include "flash.h" -#include "ignore.h" -#include "keyboard.h" -#include "trigger.h" -#include "constants.h" -#include "protolist.h" -#include "EnumProc.h" -#include "utils.h" -#include "m_kbdnotify.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#pragma comment(lib, "advapi32.lib") +#include "Common.h" #define NCONVERS_BLINKID ((HANDLE)123456) //nconvers' random identifier used to flash an icon for "incoming message" on contact list diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index d74902aec8..9069f5758e 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -16,29 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include -#include "flash.h" -#include "ignore.h" -#include "resource.h" -#include "constants.h" -#include "protolist.h" -#include "EnumProc.h" -#include "utils.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "Common.h" #define IDI_BLANK 200 diff --git a/plugins/KeyboardNotify/src/trigger.cpp b/plugins/KeyboardNotify/src/trigger.cpp index df3d7daaf3..e441a8cf60 100644 --- a/plugins/KeyboardNotify/src/trigger.cpp +++ b/plugins/KeyboardNotify/src/trigger.cpp @@ -16,20 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include -#include "constants.h" -#include "utils.h" -#include "resource.h" -#include -#include -#include -#include "m_trigger.h" +#include "Common.h" extern HINSTANCE hInst; diff --git a/plugins/KeyboardNotify/src/utils.cpp b/plugins/KeyboardNotify/src/utils.cpp index 9c710ba217..12bd5e0722 100644 --- a/plugins/KeyboardNotify/src/utils.cpp +++ b/plugins/KeyboardNotify/src/utils.cpp @@ -16,15 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include "utils.h" -#include -#include -#include - +#include "Common.h" char *fmtDBSettingName(const char *fmt, ...) { -- cgit v1.2.3