diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-23 16:49:09 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-23 16:49:09 +0000 |
commit | 2f56dcad8e7dccc129765a24a96861f8ce5ffeea (patch) | |
tree | 8bbdb63f3f31562f5186d134eb2b659c8e8e286d /plugins | |
parent | 4e61d557376ab4ec02e061fb4c128b25b3bd61a1 (diff) |
Clist:
plusified
git-svn-id: http://svn.miranda-ng.org/main/trunk@571 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist/clcpaint.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist/clist_10.vcxproj | 23 | ||||
-rw-r--r-- | plugins/Clist/clist_10.vcxproj.filters | 17 | ||||
-rw-r--r-- | plugins/Clist/commonheaders.cpp | 1 | ||||
-rw-r--r-- | plugins/Clist/commonheaders.h | 5 | ||||
-rw-r--r-- | plugins/Clist/init.cpp | 14 |
6 files changed, 30 insertions, 34 deletions
diff --git a/plugins/Clist/clcpaint.cpp b/plugins/Clist/clcpaint.cpp index 1ddf6bebc1..dfa4147244 100644 --- a/plugins/Clist/clcpaint.cpp +++ b/plugins/Clist/clcpaint.cpp @@ -180,10 +180,10 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) y = -dat->yScroll;
hdcMem = CreateCompatibleDC(hdc);
hBmpOsb = CreateBitmap(clRect.right, clRect.bottom, 1, GetDeviceCaps(hdc, BITSPIXEL), NULL);
- hOldBitmap = SelectObject(hdcMem, hBmpOsb);
+ hOldBitmap = (HBITMAP)SelectObject(hdcMem, hBmpOsb);
{
TEXTMETRIC tm;
- hOldFont = SelectObject(hdcMem, dat->fontInfo[FONTID_GROUPS].hFont);
+ hOldFont = (HFONT)SelectObject(hdcMem, dat->fontInfo[FONTID_GROUPS].hFont);
GetTextMetrics(hdcMem, &tm);
groupCountsFontTopShift = tm.tmAscent;
SelectObject(hdcMem, dat->fontInfo[FONTID_GROUPCOUNTS].hFont);
diff --git a/plugins/Clist/clist_10.vcxproj b/plugins/Clist/clist_10.vcxproj index da5f39ec67..01bc0a0d6a 100644 --- a/plugins/Clist/clist_10.vcxproj +++ b/plugins/Clist/clist_10.vcxproj @@ -73,7 +73,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -106,7 +106,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -140,7 +140,7 @@ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -176,7 +176,7 @@ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -207,16 +207,15 @@ </PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="clcfonts.c" />
- <ClCompile Include="clcopts.c" />
- <ClCompile Include="clcpaint.c" />
- <ClCompile Include="clistmenus.c" />
- <ClCompile Include="clistopts.c" />
- <ClCompile Include="cluiopts.c" />
- <ClCompile Include="commonheaders.c">
+ <ClCompile Include="clcfonts.cpp" />
+ <ClCompile Include="clcopts.cpp" />
+ <ClCompile Include="clcpaint.cpp" />
+ <ClCompile Include="clistmenus.cpp" />
+ <ClCompile Include="clistopts.cpp" />
+ <ClCompile Include="cluiopts.cpp" />
+ <ClCompile Include="init.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="init.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="clc.h" />
diff --git a/plugins/Clist/clist_10.vcxproj.filters b/plugins/Clist/clist_10.vcxproj.filters index cdb7418639..e69d846fc1 100644 --- a/plugins/Clist/clist_10.vcxproj.filters +++ b/plugins/Clist/clist_10.vcxproj.filters @@ -15,28 +15,25 @@ </Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="clcfonts.c">
+ <ClCompile Include="clcfonts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="clcopts.c">
+ <ClCompile Include="clcopts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="clcpaint.c">
+ <ClCompile Include="clcpaint.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="clistmenus.c">
+ <ClCompile Include="clistmenus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="clistopts.c">
+ <ClCompile Include="clistopts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="cluiopts.c">
+ <ClCompile Include="cluiopts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="commonheaders.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="init.c">
+ <ClCompile Include="init.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/plugins/Clist/commonheaders.cpp b/plugins/Clist/commonheaders.cpp deleted file mode 100644 index 14f99f7d71..0000000000 --- a/plugins/Clist/commonheaders.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "commonheaders.h"
diff --git a/plugins/Clist/commonheaders.h b/plugins/Clist/commonheaders.h index c9a676d3c6..7382317420 100644 --- a/plugins/Clist/commonheaders.h +++ b/plugins/Clist/commonheaders.h @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <io.h>
#include <string.h>
#include <direct.h>
-#include "resource.h"
+
#include <win2k.h>
#include <newpluginapi.h>
#include <m_clist.h>
@@ -58,8 +58,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_contacts.h>
#include <m_file.h>
#include <m_addcontact.h>
+#include <m_icolib.h>
+
#include "clc.h"
#include "version.h"
+#include "resource.h"
// shared vars
extern HINSTANCE g_hInst;
diff --git a/plugins/Clist/init.cpp b/plugins/Clist/init.cpp index 319e3a6f1f..06f935f367 100644 --- a/plugins/Clist/init.cpp +++ b/plugins/Clist/init.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "commonheaders.h"
-#include <m_icolib.h>
HINSTANCE g_hInst = 0;
PLUGINLINK *pluginLink;
@@ -53,7 +52,6 @@ int CListModernOptInit(WPARAM wParam, LPARAM lParam); BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved)
{
g_hInst = hInstDLL;
- DisableThreadLibraryCalls(g_hInst);
return TRUE;
}
@@ -74,7 +72,7 @@ PLUGININFOEX pluginInfo = { {0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe3 }} //{240A91DC-9464-457a-9787-FF1EA88E77E3}
};
-__declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
@@ -83,7 +81,7 @@ __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) // returns plugin's interfaces information
static const MUUID interfaces[] = {MIID_CLIST, MIID_LAST};
-__declspec(dllexport) const MUUID * MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID * MirandaPluginInterfaces(void)
{
return interfaces;
}
@@ -139,7 +137,7 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// main clist initialization routine
-int __declspec(dllexport) CListInitialise(PLUGINLINK * link)
+extern "C" __declspec(dllexport) int CListInitialise(PLUGINLINK * link)
{
pluginLink = link;
#ifdef _DEBUG
@@ -177,7 +175,7 @@ LBL_Error: /////////////////////////////////////////////////////////////////////////////////////////
// a plugin loader aware of CList exports will never call this.
-int __declspec(dllexport) Load(PLUGINLINK * link)
+extern "C" __declspec(dllexport) int Load(PLUGINLINK * link)
{
return 1;
}
@@ -185,7 +183,7 @@ int __declspec(dllexport) Load(PLUGINLINK * link) /////////////////////////////////////////////////////////////////////////////////////////
// a plugin unloader
-int __declspec(dllexport) Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
return 0;
-}
+}
\ No newline at end of file |