From d77cfd0576c0818284c9cf10eedb8185339323d1 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 25 Apr 2015 21:55:01 +0000 Subject: CoutryFlags - common project git-svn-id: http://svn.miranda-ng.org/main/trunk@13154 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CountryFlags/flags.vcxproj | 28 ++++ plugins/CountryFlags/flags.vcxproj.filters | 4 + plugins/CountryFlags/flags_10.vcxproj | 217 ------------------------- plugins/CountryFlags/flags_10.vcxproj.filters | 62 -------- plugins/CountryFlags/flags_12.vcxproj | 220 -------------------------- plugins/CountryFlags/flags_12.vcxproj.filters | 62 -------- plugins/CountryFlags/src/extraimg.cpp | 10 +- plugins/CountryFlags/src/flags.h | 83 ---------- plugins/CountryFlags/src/huffman.cpp | 2 +- plugins/CountryFlags/src/icons.cpp | 2 +- plugins/CountryFlags/src/ip2country.cpp | 6 +- plugins/CountryFlags/src/main.cpp | 6 +- plugins/CountryFlags/src/options.cpp | 6 +- plugins/CountryFlags/src/stdafx.cpp | 18 --- plugins/CountryFlags/src/stdafx.cxx | 18 +++ plugins/CountryFlags/src/stdafx.h | 82 ++++++++++ plugins/CountryFlags/src/utils.cpp | 4 +- 17 files changed, 150 insertions(+), 680 deletions(-) create mode 100644 plugins/CountryFlags/flags.vcxproj create mode 100644 plugins/CountryFlags/flags.vcxproj.filters delete mode 100644 plugins/CountryFlags/flags_10.vcxproj delete mode 100644 plugins/CountryFlags/flags_10.vcxproj.filters delete mode 100644 plugins/CountryFlags/flags_12.vcxproj delete mode 100644 plugins/CountryFlags/flags_12.vcxproj.filters delete mode 100644 plugins/CountryFlags/src/flags.h delete mode 100644 plugins/CountryFlags/src/stdafx.cpp create mode 100644 plugins/CountryFlags/src/stdafx.cxx create mode 100644 plugins/CountryFlags/src/stdafx.h (limited to 'plugins') diff --git a/plugins/CountryFlags/flags.vcxproj b/plugins/CountryFlags/flags.vcxproj new file mode 100644 index 0000000000..5af9a9f85e --- /dev/null +++ b/plugins/CountryFlags/flags.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + Flags + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} + + + + + \ No newline at end of file diff --git a/plugins/CountryFlags/flags.vcxproj.filters b/plugins/CountryFlags/flags.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/CountryFlags/flags.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/CountryFlags/flags_10.vcxproj b/plugins/CountryFlags/flags_10.vcxproj deleted file mode 100644 index f0c50fb01b..0000000000 --- a/plugins/CountryFlags/flags_10.vcxproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Flags - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - EditAndContinue - false - Use - flags.h - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - false - $(ProfileDir)..\..\bin10\lib - - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - false - Use - flags.h - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - false - $(ProfileDir)..\..\bin10\lib - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - false - Use - flags.h - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - true - true - false - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - false - Use - flags.h - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - true - true - false - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - - - - - - - - - Create - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/CountryFlags/flags_10.vcxproj.filters b/plugins/CountryFlags/flags_10.vcxproj.filters deleted file mode 100644 index 20fd6acc5c..0000000000 --- a/plugins/CountryFlags/flags_10.vcxproj.filters +++ /dev/null @@ -1,62 +0,0 @@ - - - - - {2e34a165-959f-4051-80ea-a8e9d3ffe09a} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {d5658bf6-af27-43e5-b3f8-4bc19ac22032} - h;hpp;hxx;hm;inl - - - {d26bc05b-c5a5-4dfc-88a9-1c9e7da444ad} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/CountryFlags/flags_12.vcxproj b/plugins/CountryFlags/flags_12.vcxproj deleted file mode 100644 index 5820dfb4c9..0000000000 --- a/plugins/CountryFlags/flags_12.vcxproj +++ /dev/null @@ -1,220 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Flags - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} - - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - EditAndContinue - false - Use - flags.h - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - false - $(ProfileDir)..\..\bin12\lib - false - - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - false - Use - flags.h - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - false - $(ProfileDir)..\..\bin12\lib - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - false - Use - flags.h - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - true - true - false - $(ProfileDir)..\..\bin12\lib - - - - - OnlyExplicitInline - true - true - Full - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Size - false - Use - flags.h - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - true - true - Windows - $(IntDir)$(TargetName).lib - 0x24200000 - comctl32.lib;%(AdditionalDependencies) - true - true - false - $(ProfileDir)..\..\bin12\lib - - - - - - - - - - - Create - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/CountryFlags/flags_12.vcxproj.filters b/plugins/CountryFlags/flags_12.vcxproj.filters deleted file mode 100644 index 20fd6acc5c..0000000000 --- a/plugins/CountryFlags/flags_12.vcxproj.filters +++ /dev/null @@ -1,62 +0,0 @@ - - - - - {2e34a165-959f-4051-80ea-a8e9d3ffe09a} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {d5658bf6-af27-43e5-b3f8-4bc19ac22032} - h;hpp;hxx;hm;inl - - - {d26bc05b-c5a5-4dfc-88a9-1c9e7da444ad} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 9e9d0dd307..b57a382ea4 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -17,14 +17,14 @@ along with this program (Flags-License.txt); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "flags.h" +#include "stdafx.h" /* Services */ static HANDLE hServiceDetectContactOrigin; /************************* Services *******************************/ -static INT_PTR ServiceDetectContactOriginCountry(WPARAM hContact, LPARAM lParam) +static INT_PTR ServiceDetectContactOriginCountry(WPARAM hContact, LPARAM) { int countryNumber = 0xFFFF; char *pszProto = GetContactProto(hContact); @@ -114,7 +114,7 @@ static void __fastcall UnsetStatusIcon(MCONTACT hContact) Srmm_ModifyIcon(hContact, &sid); } -static int MsgWndEvent(WPARAM wParam,LPARAM lParam) +static int MsgWndEvent(WPARAM, LPARAM lParam) { MessageWindowEventData *msgwe=(MessageWindowEventData*)lParam; switch(msgwe->uType) { @@ -153,7 +153,7 @@ void CALLBACK UpdateStatusIcons(LPARAM) } } -static int StatusIconsChanged(WPARAM wParam,LPARAM lParam) +static int StatusIconsChanged(WPARAM, LPARAM) { if (bShowStatusIcon) CallFunctionBuffered(UpdateStatusIcons, 0, FALSE, STATUSICON_REFRESHDELAY); @@ -178,7 +178,7 @@ static int ExtraImgSettingChanged(WPARAM hContact, LPARAM lParam) /************************* Misc ***********************************/ -static int ExtraImgModulesLoaded(WPARAM wParam,LPARAM lParam) +static int ExtraImgModulesLoaded(WPARAM, LPARAM) { /* Status Icon */ StatusIconData sid = { sizeof(sid) }; diff --git a/plugins/CountryFlags/src/flags.h b/plugins/CountryFlags/src/flags.h deleted file mode 100644 index b3707233f2..0000000000 --- a/plugins/CountryFlags/src/flags.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -Miranda IM Country Flags Plugin -Copyright (C) 2006-2007 H. Herkenrath - -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 (Flags-License.txt); if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#define _CRT_SECURE_NO_WARNINGS -#define WIN32_LEAN_AND_MEAN - -#include -#include /* for ImageList functions */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define FLAGS_NOHELPERFUNCTIONS -#include - -#define MODULENAME "Flags" - -#include "resource.h" -#include "version.h" - -extern HINSTANCE hInst; -extern int nCountriesCount; -extern CountryListEntry *countries; - -/* huffman.c */ -#ifdef HUFFMAN_ENCODE - int Huffman_Compress(unsigned char *in,unsigned char *out,unsigned int insize ); -#endif -void Huffman_Uncompress(unsigned char *in,unsigned char *out,unsigned int insize,unsigned int outsize); - -/* icons.c */ -HICON __fastcall LoadFlagIcon(int countryNumber); -int __fastcall CountryNumberToIndex(int countryNumber); -void InitIcons(void); - -/* ip2country.c */ -INT_PTR ServiceIpToCountry(WPARAM wParam,LPARAM lParam); -void InitIpToCountry(void); -void UninitIpToCountry(void); - -/* extraimg.c */ -void InitExtraImg(void); -void UpdateExtraImages(void); -void CALLBACK UpdateStatusIcons(LPARAM); - -/* utils.c */ -typedef void (CALLBACK *BUFFEREDPROC)(LPARAM lParam); -#ifdef _DEBUG - void _CallFunctionBuffered(BUFFEREDPROC pfnBuffProc,const char *pszProcName,LPARAM lParam,BOOL fAccumulateSameParam,UINT uElapse); - #define CallFunctionBuffered(proc,param,acc,elapse) _CallFunctionBuffered(proc,#proc,param,acc,elapse) -#else - void _CallFunctionBuffered(BUFFEREDPROC pfnBuffProc,LPARAM lParam,BOOL fAccumulateSameParam,UINT uElapse); - #define CallFunctionBuffered(proc,param,acc,elapse) _CallFunctionBuffered(proc,param,acc,elapse) -#endif -void PrepareBufferedFunctions(void); -void KillBufferedFunctions(void); - -/* options.c */ -extern bool bUseUnknown, bShowStatusIcon, bShowExtraIcon, bUseIpToCountry; -int OnOptionsInit(WPARAM wParam,LPARAM lParam); diff --git a/plugins/CountryFlags/src/huffman.cpp b/plugins/CountryFlags/src/huffman.cpp index da02e9f97d..c264289735 100644 --- a/plugins/CountryFlags/src/huffman.cpp +++ b/plugins/CountryFlags/src/huffman.cpp @@ -60,7 +60,7 @@ * Types used for Huffman coding *************************************************************************/ -#include "flags.h" +#include "stdafx.h" typedef struct { unsigned char *BytePtr; diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp index 6471ab79db..5b4e8affac 100644 --- a/plugins/CountryFlags/src/icons.cpp +++ b/plugins/CountryFlags/src/icons.cpp @@ -17,7 +17,7 @@ along with this program (Flags-License.txt); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "flags.h" +#include "stdafx.h" /************************* Bitmap Access **************************/ diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp index dad6b0b1d8..e233fbbf17 100644 --- a/plugins/CountryFlags/src/ip2country.cpp +++ b/plugins/CountryFlags/src/ip2country.cpp @@ -17,7 +17,7 @@ along with this program (Flags-License.txt); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "flags.h" +#include "stdafx.h" extern HINSTANCE hInst; extern int nCountriesCount; @@ -58,7 +58,7 @@ static BYTE *dataRecords; /* protected by csRecordCache */ #define UNLOADDELAY 30*1000 /* time after which the data records are being unloaded */ -static void CALLBACK UnloadRecordCache(LPARAM lParam) +static void CALLBACK UnloadRecordCache(LPARAM) { EnterCriticalSection(&csRecordCache); mir_free(dataRecords); @@ -97,7 +97,7 @@ static void LeaveRecordCache(void) /************************* Services *******************************/ -INT_PTR ServiceIpToCountry(WPARAM wParam,LPARAM lParam) +INT_PTR ServiceIpToCountry(WPARAM wParam, LPARAM) { BYTE *data; DWORD dwFrom,dwTo; diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp index 216595c441..674e60f913 100644 --- a/plugins/CountryFlags/src/main.cpp +++ b/plugins/CountryFlags/src/main.cpp @@ -17,7 +17,7 @@ along with this program (Flags-License.txt); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "flags.h" +#include "stdafx.h" int nCountriesCount; CountryListEntry *countries; @@ -39,13 +39,13 @@ static PLUGININFOEX pluginInfo={ {0x68c36842, 0x3d95, 0x4f4a, {0xab, 0x81, 0x1, 0x4d, 0x65, 0x93, 0x86, 0x3b}} }; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) { hInst = hinstDLL; return TRUE; } -extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } diff --git a/plugins/CountryFlags/src/options.cpp b/plugins/CountryFlags/src/options.cpp index f87979b172..ed8c02eb7f 100644 --- a/plugins/CountryFlags/src/options.cpp +++ b/plugins/CountryFlags/src/options.cpp @@ -17,13 +17,13 @@ along with this program (Flags-License.txt); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "flags.h" +#include "stdafx.h" bool bUseUnknown, bShowStatusIcon, bShowExtraIcon, bUseIpToCountry; #define M_ENABLE_SUBCTLS (WM_APP+1) -static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) +static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM,LPARAM lParam) { switch(msg) { case WM_INITDIALOG: @@ -80,7 +80,7 @@ static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L return FALSE; } -int OnOptionsInit(WPARAM wParam, LPARAM lParam) +int OnOptionsInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = hInst; diff --git a/plugins/CountryFlags/src/stdafx.cpp b/plugins/CountryFlags/src/stdafx.cpp deleted file mode 100644 index 0f9092351c..0000000000 --- a/plugins/CountryFlags/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 "flags.h" \ No newline at end of file diff --git a/plugins/CountryFlags/src/stdafx.cxx b/plugins/CountryFlags/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/CountryFlags/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/CountryFlags/src/stdafx.h b/plugins/CountryFlags/src/stdafx.h new file mode 100644 index 0000000000..dc1911ef8b --- /dev/null +++ b/plugins/CountryFlags/src/stdafx.h @@ -0,0 +1,82 @@ +/* +Miranda IM Country Flags Plugin +Copyright (C) 2006-2007 H. Herkenrath + +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 (Flags-License.txt); if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#define WIN32_LEAN_AND_MEAN + +#include +#include /* for ImageList functions */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FLAGS_NOHELPERFUNCTIONS +#include + +#define MODULENAME "Flags" + +#include "resource.h" +#include "version.h" + +extern HINSTANCE hInst; +extern int nCountriesCount; +extern CountryListEntry *countries; + +/* huffman.c */ +#ifdef HUFFMAN_ENCODE + int Huffman_Compress(unsigned char *in,unsigned char *out,unsigned int insize ); +#endif +void Huffman_Uncompress(unsigned char *in,unsigned char *out,unsigned int insize,unsigned int outsize); + +/* icons.c */ +HICON __fastcall LoadFlagIcon(int countryNumber); +int __fastcall CountryNumberToIndex(int countryNumber); +void InitIcons(void); + +/* ip2country.c */ +INT_PTR ServiceIpToCountry(WPARAM wParam,LPARAM lParam); +void InitIpToCountry(void); +void UninitIpToCountry(void); + +/* extraimg.c */ +void InitExtraImg(void); +void UpdateExtraImages(void); +void CALLBACK UpdateStatusIcons(LPARAM); + +/* utils.c */ +typedef void (CALLBACK *BUFFEREDPROC)(LPARAM lParam); +#ifdef _DEBUG + void _CallFunctionBuffered(BUFFEREDPROC pfnBuffProc,const char *pszProcName,LPARAM lParam,BOOL fAccumulateSameParam,UINT uElapse); + #define CallFunctionBuffered(proc,param,acc,elapse) _CallFunctionBuffered(proc,#proc,param,acc,elapse) +#else + void _CallFunctionBuffered(BUFFEREDPROC pfnBuffProc,LPARAM lParam,BOOL fAccumulateSameParam,UINT uElapse); + #define CallFunctionBuffered(proc,param,acc,elapse) _CallFunctionBuffered(proc,param,acc,elapse) +#endif +void PrepareBufferedFunctions(void); +void KillBufferedFunctions(void); + +/* options.c */ +extern bool bUseUnknown, bShowStatusIcon, bShowExtraIcon, bUseIpToCountry; +int OnOptionsInit(WPARAM wParam,LPARAM lParam); diff --git a/plugins/CountryFlags/src/utils.cpp b/plugins/CountryFlags/src/utils.cpp index 26bb000014..9c0d0c6596 100644 --- a/plugins/CountryFlags/src/utils.cpp +++ b/plugins/CountryFlags/src/utils.cpp @@ -17,7 +17,7 @@ along with this program (Flags-License.txt); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "flags.h" +#include "stdafx.h" /************************* Buffered Functions *********************/ @@ -36,7 +36,7 @@ static struct BufferedCallData *callList; static int nCallListCount; // always gets called in main message loop -static void CALLBACK BufferedProcTimer(HWND hwnd,UINT msg,UINT_PTR idTimer,DWORD currentTick) +static void CALLBACK BufferedProcTimer(HWND hwnd,UINT,UINT_PTR idTimer,DWORD currentTick) { struct BufferedCallData *buf; UINT uElapsed,uElapseNext=USER_TIMER_MAXIMUM; -- cgit v1.2.3