summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_10.vcxproj20
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters12
-rw-r--r--plugins/KeyboardNotify/src/Common.h62
-rw-r--r--plugins/KeyboardNotify/src/EnumProc.cpp9
-rw-r--r--plugins/KeyboardNotify/src/flash.cpp11
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp23
-rw-r--r--plugins/KeyboardNotify/src/keyboard.cpp10
-rw-r--r--plugins/KeyboardNotify/src/keypresses.cpp8
-rw-r--r--plugins/KeyboardNotify/src/main.cpp30
-rw-r--r--plugins/KeyboardNotify/src/options.cpp24
-rw-r--r--plugins/KeyboardNotify/src/trigger.cpp15
-rw-r--r--plugins/KeyboardNotify/src/utils.cpp10
12 files changed, 88 insertions, 146 deletions
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 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -98,6 +100,8 @@
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -117,8 +121,10 @@
<Optimization>Full</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -140,8 +146,10 @@
<Optimization>Full</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -159,9 +167,7 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClInclude Include="src\AggressiveOptimize.h" />
- <ClInclude Include="src\constants.h" />
- <ClInclude Include="src\EnumProc.h" />
+ <ClInclude Include="src\Common.h" />
<ClInclude Include="src\flash.h" />
<ClInclude Include="src\ignore.h" />
<ClInclude Include="src\keyboard.h" />
@@ -177,7 +183,9 @@
<ClCompile Include="src\ignore.cpp" />
<ClCompile Include="src\keyboard.cpp" />
<ClCompile Include="src\keypresses.cpp" />
- <ClCompile Include="src\main.cpp" />
+ <ClCompile Include="src\main.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\trigger.cpp" />
<ClCompile Include="src\utils.cpp" />
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 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="src\AggressiveOptimize.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\constants.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\EnumProc.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\flash.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -45,6 +36,9 @@
<ClInclude Include="src\utils.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="src\Common.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\EnumProc.cpp">
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 <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+#include <tlhelp32.h>
+#include <vdmdbg.h>
+#include <commctrl.h>
+#include <commdlg.h>
+#include <winioctl.h>
+
+#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 <newpluginapi.h>
+#include <m_database.h>
+#include <m_options.h>
+#include <m_clist.h>
+#include <m_system.h>
+#include <m_langpack.h>
+#include <m_protocols.h>
+#include <m_protosvc.h>
+#include <m_contacts.h>
+#include <m_message.h>
+#include <m_utils.h>
+#include <m_icq.h>
+#include <m_clc.h>
+#include <m_skin.h>
+#include <win2k.h>
+
+#include "m_kbdnotify.h"
+#include <m_metacontacts.h>
+#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 <windows.h>
-#include <stdio.h>
-#include <tlhelp32.h>
-#include <vdmdbg.h>
-#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 <windows.h>
-#include "flash.h"
-#include "keyboard.h"
-#include "keypresses.h"
-#include "utils.h"
-#include "constants.h"
-#include <newpluginapi.h>
-#include <m_database.h>
+#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 <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-#include <commctrl.h>
-#include <commdlg.h>
-#include "ignore.h"
-#include "resource.h"
-#include "constants.h"
-#include <newpluginapi.h>
-#include <m_clc.h>
-#include <m_clist.h>
-#include <m_database.h>
-#include <m_langpack.h>
-#include <m_options.h>
-#include <m_protosvc.h>
-#include <m_protocols.h>
-#include <m_skin.h>
-
+#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 <stdio.h>
-#include <windows.h>
-#include <winioctl.h>
-#include "keypresses.h"
-#include <newpluginapi.h>
-#include <m_utils.h>
-
+#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 <windows.h>
-#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 <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-#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 <newpluginapi.h>
-#include <m_database.h>
-#include <m_options.h>
-#include <m_clist.h>
-#include <m_system.h>
-#include <m_langpack.h>
-#include <m_protocols.h>
-#include <m_protosvc.h>
-#include <m_contacts.h>
-#include <m_message.h>
-#include <m_utils.h>
-#include <m_icq.h>
-#include <m_metacontacts.h>
-#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 <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-#include <commctrl.h>
-#include <commdlg.h>
-#include "flash.h"
-#include "ignore.h"
-#include "resource.h"
-#include "constants.h"
-#include "protolist.h"
-#include "EnumProc.h"
-#include "utils.h"
-#include <newpluginapi.h>
-#include <m_clc.h>
-#include <m_clist.h>
-#include <m_database.h>
-#include <m_langpack.h>
-#include <m_options.h>
-#include <m_protosvc.h>
-#include <m_protocols.h>
-#include <m_icq.h>
+#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 <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-#include <commctrl.h>
-#include <commdlg.h>
-#include "constants.h"
-#include "utils.h"
-#include "resource.h"
-#include <newpluginapi.h>
-#include <m_database.h>
-#include <m_langpack.h>
-#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 <stdio.h>
-#include <windows.h>
-#include "utils.h"
-#include <newpluginapi.h>
-#include <m_database.h>
-#include <m_utils.h>
-
+#include "Common.h"
char *fmtDBSettingName(const char *fmt, ...)
{