diff options
-rw-r--r-- | Plugins/avatarhistory/AvatarDlg.cpp | 22 | ||||
-rw-r--r-- | Plugins/avatarhistory/AvatarHistory.cpp | 80 | ||||
-rw-r--r-- | Plugins/avatarhistory/AvatarHistory.h | 3 | ||||
-rw-r--r-- | Plugins/avatarhistory/AvatarHistory.vcxproj | 505 | ||||
-rw-r--r-- | Plugins/avatarhistory/icolib.cpp | 21 | ||||
-rw-r--r-- | Plugins/avatarhistory/options.cpp | 22 | ||||
-rw-r--r-- | Plugins/avatarhistory/popup.cpp | 99 | ||||
-rw-r--r-- | Plugins/avatarhistory/sdk/m_folders.h | 153 | ||||
-rw-r--r-- | Plugins/avatarhistory/sdk/m_freeimage.h | 965 | ||||
-rw-r--r-- | Plugins/avatarhistory/sdk/m_imgsrvc.h | 502 | ||||
-rw-r--r-- | Plugins/avatarhistory/sdk/m_metacontacts.h | 4 | ||||
-rw-r--r-- | Plugins/avatarhistory/sdk/m_updater.h | 4 |
12 files changed, 696 insertions, 1684 deletions
diff --git a/Plugins/avatarhistory/AvatarDlg.cpp b/Plugins/avatarhistory/AvatarDlg.cpp index 31ad58b..ca56076 100644 --- a/Plugins/avatarhistory/AvatarDlg.cpp +++ b/Plugins/avatarhistory/AvatarDlg.cpp @@ -27,7 +27,7 @@ extern HINSTANCE hInst; HANDLE hMenu = NULL;
int OpenAvatarDialog(HANDLE hContact, char* fn);
DWORD WINAPI AvatarDialogThread(LPVOID param);
-static BOOL CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
+static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
int ShowSaveDialog(HWND hwnd, TCHAR* fn);
BOOL ProtocolEnabled(const char *proto);
@@ -39,7 +39,7 @@ TCHAR* GetCurrentSelFile(HWND list); TCHAR * GetContactFolder(TCHAR *fn, HANDLE hContact);
BOOL ResolveShortcut(TCHAR *shortcut, TCHAR *file);
-static int ShowDialogSvc(WPARAM wParam, LPARAM lParam);
+static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam);
extern HANDLE hServices[];
extern HANDLE hHooks[];
@@ -75,8 +75,7 @@ public: int OpenAvatarDialog(HANDLE hContact, char* fn)
{
DWORD dwId;
- struct AvatarDialogData* avdlg;
- avdlg = (struct AvatarDialogData*)malloc(sizeof(struct AvatarDialogData));
+ struct AvatarDialogData* avdlg = (struct AvatarDialogData*)malloc(sizeof(struct AvatarDialogData));
ZeroMemory(avdlg, sizeof(struct AvatarDialogData));
avdlg->hContact = hContact;
if (fn == NULL)
@@ -125,7 +124,7 @@ void EnableDisableControls(HWND hwnd) EnableWindow(GetDlgItem(hwnd, IDC_DELETE), cursel != LB_ERR);
}
-static BOOL CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
+static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
switch(uMsg)
{
@@ -554,7 +553,8 @@ void InitMenuItem() hServices[2] = CreateServiceFunction("AvatarHistory/ShowDialog", ShowDialogSvc);
mi.cbSize = sizeof(mi);
- mi.pszName = Translate("View Avatar History");
+ mi.ptszName = LPGENT("View Avatar History");
+ mi.flags = CMIF_TCHAR;
mi.position = 1000090010;
mi.hIcon = createDefaultOverlayedIcon(FALSE);
mi.pszService = "AvatarHistory/ShowDialog";
@@ -562,7 +562,7 @@ void InitMenuItem() DestroyIcon(mi.hIcon);
}
-static int ShowDialogSvc(WPARAM wParam, LPARAM lParam)
+static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam)
{
OpenAvatarDialog((HANDLE)wParam, (char*)lParam);
return 0;
@@ -580,7 +580,7 @@ TCHAR* GetCurrentSelFile(HWND list) int ShowSaveDialog(HWND hwnd, TCHAR* fn)
{
TCHAR initdir[MAX_PATH] = _T(".");
- char filter[MAX_PATH];
+ TCHAR filter[MAX_PATH];
TCHAR file[MAX_PATH];
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
@@ -589,10 +589,8 @@ int ShowSaveDialog(HWND hwnd, TCHAR* fn) ofn.hwndOwner = hwnd;
ofn.hInstance = hInst;
- // Miranda dont have the unicode version of this servicce
- CallService(MS_UTILS_GETBITMAPFILTERSTRINGS, MAX_PATH, (LPARAM)filter);
- INPLACE_CHAR_TO_TCHAR(filterT, MAX_PATH, filter);
- ofn.lpstrFilter = filterT;
+ CallService(MS_UTILS_GETBITMAPFILTERSTRINGST, MAX_PATH, (LPARAM)filter);
+ ofn.lpstrFilter = filter;
ofn.nFilterIndex = 1;
lstrcpy(file, _tcsrchr(fn, '\\')+1);
diff --git a/Plugins/avatarhistory/AvatarHistory.cpp b/Plugins/avatarhistory/AvatarHistory.cpp index 2072627..d16cf9f 100644 --- a/Plugins/avatarhistory/AvatarHistory.cpp +++ b/Plugins/avatarhistory/AvatarHistory.cpp @@ -38,6 +38,8 @@ char *metacontacts_proto = NULL; char profilePath[MAX_PATH]; // database profile path (read at startup only)
TCHAR basedir[MAX_PATH];
+MM_INTERFACE mmi;
+int hLangpack = 0;
static int ModulesLoaded(WPARAM wParam, LPARAM lParam);
static int PreShutdown(WPARAM wParam, LPARAM lParam);
@@ -55,8 +57,8 @@ void InitMenuItem(); void * GetHistoryEventText(HANDLE hContact, HANDLE hDbEvent, DBEVENTINFO *dbe, int format);
// Services
-static int IsEnabled(WPARAM wParam, LPARAM lParam);
-static int GetCachedAvatar(WPARAM wParam, LPARAM lParam);
+static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam);
+static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam);
TCHAR * GetCachedAvatar(char *proto, char *hash);
BOOL CreateShortcut(TCHAR *file, TCHAR *shortcut);
@@ -69,10 +71,12 @@ BOOL CreateShortcut(TCHAR *file, TCHAR *shortcut); PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
-#ifdef UNICODE
+#ifdef WIN64
+ "Avatar History (x64)",
+#elif UNICODE
"Avatar History (Unicode)",
#else
- "Avatar History",
+ "Avatar History (Ansi)",
#endif
PLUGIN_MAKE_VERSION(0,0,2,10),
"This plugin keeps backups of all your contacts' avatar changes and/or shows popups",
@@ -82,7 +86,9 @@ PLUGININFOEX pluginInfo={ "http://pescuma.mirandaim.ru/miranda/avatarhist",
UNICODE_AWARE,
0, //doesn't replace anything built-in
-#ifdef UNICODE
+#ifdef WIN64
+ { 0xe04702a2, 0x379, 0x4c69, { 0xbf, 0x8a, 0x84, 0xd5, 0xd0, 0xc9, 0x19, 0xcc } } // {E04702A2-0379-4C69-BF8A-84D5D0C919CC}
+#elif UNICODE
{ 0xdbe8c990, 0x7aa0, 0x458d, { 0xba, 0xb7, 0x33, 0xeb, 0x7, 0x23, 0x8e, 0x71 } } // {DBE8C990-7AA0-458d-BAB7-33EB07238E71}
#else
{ 0x4079923c, 0x8aa1, 0x4a2e, { 0x95, 0x8b, 0x9d, 0xc, 0xd0, 0xe8, 0x2e, 0xb2 } } // {4079923C-8AA1-4a2e-958B-9D0CD0E82EB2}
@@ -95,17 +101,9 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvRese return TRUE;
}
-extern "C" __declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
-{
- mirVer = mirandaVersion;
- pluginInfo.cbSize = sizeof(PLUGININFO);
- return (PLUGININFO*) &pluginInfo;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
mirVer = mirandaVersion;
- pluginInfo.cbSize = sizeof(PLUGININFOEX);
return &pluginInfo;
}
@@ -115,7 +113,7 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) return interfaces;
}
-static BOOL CALLBACK FirstRunDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
+static INT_PTR CALLBACK FirstRunDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
switch(uMsg)
{
@@ -167,7 +165,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) {
pluginLink=link;
- init_mir_malloc();
+ mir_getMMI(&mmi);
+ mir_getLP(&pluginInfo);
// Is first run?
if (DBGetContactSettingByte(NULL, MODULE_NAME, "FirstRun", 1))
@@ -227,8 +226,8 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) mir_sntprintf(basedir, MAX_REGS(basedir), _T("%s\\Avatars History"), profilePath);
#endif
- hFolder = (HANDLE)FoldersRegisterCustomPathT(Translate("Avatars"), Translate("Avatar History"),
- _T(PROFILE_PATH) _T("\\") _T(CURRENT_PROFILE) _T("\\Avatars History"));
+ hFolder = (HANDLE)FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("Avatar History"),
+ PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\Avatars History"));
hHooks[2] = HookEvent(ME_AV_CONTACTAVATARCHANGED, AvatarChanged);
hHooks[3] = HookEvent(ME_OPT_INITIALISE, OptInit);
@@ -260,7 +259,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) upd.szBetaUpdateURL = "http://pescuma.mirandaim.ru/miranda/avatarhist.zip";
#endif
- upd.pbVersion = (BYTE *)CreateVersionStringPlugin((PLUGININFO*) &pluginInfo, szCurrentVersion);
+ upd.pbVersion = (BYTE *)CreateVersionStringPluginEx(&pluginInfo, szCurrentVersion);
upd.cpbVersion = strlen((char *)upd.pbVersion);
CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&upd);
@@ -659,7 +658,7 @@ extern "C" int __declspec(dllexport) Unload(void) }
-static int IsEnabled(WPARAM wParam, LPARAM lParam)
+static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE) wParam;
return ContactEnabled(hContact, "LogToDisk", AVH_DEF_LOGTODISK)
@@ -676,7 +675,7 @@ lParam: (char *) hash return: (TCHAR *) NULL if none is found or the path to the avatar. You need to free this string
with mir_free.
*/
-static int GetCachedAvatar(WPARAM wParam, LPARAM lParam)
+static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam)
{
char hash[128];
lstrcpynA(hash, (char *) lParam, sizeof(hash));
@@ -729,12 +728,9 @@ int GetUIDFromHContact(HANDLE contact, TCHAR* uinout, size_t uinout_len) ZeroMemory(&cinfo,sizeof(CONTACTINFO));
cinfo.cbSize = sizeof(CONTACTINFO);
cinfo.hContact = contact;
- cinfo.dwFlag = CNF_UNIQUEID;
-#ifdef UNICODE
- cinfo.dwFlag |= CNF_UNICODE;
-#endif
+ cinfo.dwFlag = CNF_UNIQUEID | CNF_TCHAR;
- BOOL found = TRUE;
+ bool found = true;
if(CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&cinfo)==0)
{
if(cinfo.type == CNFT_ASCIIZ)
@@ -752,41 +748,13 @@ int GetUIDFromHContact(HANDLE contact, TCHAR* uinout, size_t uinout_len) {
_itot(cinfo.wVal,uinout,10);
}
- else found = FALSE;
+ else found = false;
}
- else found = FALSE;
+ else found = false;
if (!found)
{
-#ifdef UNICODE
- // Try non unicode ver
- cinfo.dwFlag = CNF_UNIQUEID;
-
- found = TRUE;
- if(CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&cinfo)==0)
- {
- if(cinfo.type == CNFT_ASCIIZ)
- {
- MultiByteToWideChar(CP_ACP, 0, (char *) cinfo.pszVal, -1, uinout, uinout_len);
- // It is up to us to free the string
- // The catch? We need to use Miranda's free(), not our CRT's :)
- mir_free(cinfo.pszVal);
- }
- else if(cinfo.type == CNFT_DWORD)
- {
- _itot(cinfo.dVal,uinout,10);
- }
- else if(cinfo.type == CNFT_WORD)
- {
- _itot(cinfo.wVal,uinout,10);
- }
- else found = FALSE;
- }
- else found = FALSE;
-
- if (!found)
-#endif
- lstrcpy(uinout, TranslateT("Unknown UIN"));
+ lstrcpyn(uinout, TranslateT("Unknown UIN"),uinout_len);
}
return 0;
}
diff --git a/Plugins/avatarhistory/AvatarHistory.h b/Plugins/avatarhistory/AvatarHistory.h index bf325d2..224a8a4 100644 --- a/Plugins/avatarhistory/AvatarHistory.h +++ b/Plugins/avatarhistory/AvatarHistory.h @@ -4,8 +4,8 @@ #include <time.h>
+#define MIRANDA_CUSTOM_LP
#include <newpluginapi.h>
-#include <m_folders.h>
#include <m_clist.h>
#include <m_skin.h>
#include <m_avatars.h>
@@ -17,6 +17,7 @@ #include <m_popup.h>
#include <m_options.h>
#include <m_utils.h>
+#include <m_folders.h>
#include <m_langpack.h>
#include <m_metacontacts.h>
#include <m_history.h>
diff --git a/Plugins/avatarhistory/AvatarHistory.vcxproj b/Plugins/avatarhistory/AvatarHistory.vcxproj new file mode 100644 index 0000000..663899d --- /dev/null +++ b/Plugins/avatarhistory/AvatarHistory.vcxproj @@ -0,0 +1,505 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Unicode Debug|Win32">
+ <Configuration>Unicode Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Unicode Debug|x64">
+ <Configuration>Unicode Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Unicode Release|Win32">
+ <Configuration>Unicode Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Unicode Release|x64">
+ <Configuration>Unicode Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <SccProjectName />
+ <SccLocalPath />
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>avatarhistW</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <Optimization>Disabled</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <MinimalRebuild>true</MinimalRebuild>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Debug\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Debug\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImportLibrary>.\Debug\avatarhist.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <Optimization>Disabled</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Debug\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Debug\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImportLibrary>.\Debug\avatarhist.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <Optimization>Disabled</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <MinimalRebuild>true</MinimalRebuild>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;UNICODE;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Unicode_Debug\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Unicode_Debug\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Unicode_Debug\</ProgramDataBaseFileName>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Unicode_Debug\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Unicode_Debug\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImportLibrary>.\Unicode_Debug\avatarhistW.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <Optimization>Disabled</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;UNICODE;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Unicode_Debug\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Unicode_Debug\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Unicode_Debug\</ProgramDataBaseFileName>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Unicode_Debug\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Unicode_Debug\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImportLibrary>.\Unicode_Debug\avatarhistW.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <Optimization>MinSpace</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Release\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Release\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Release\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ImportLibrary>.\Release\avatarhist.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <Optimization>MinSpace</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Release\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Release\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Release\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ImportLibrary>.\Release\avatarhist.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <Optimization>MinSpace</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Unicode_Release\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Unicode_Release\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Unicode_Release\</ProgramDataBaseFileName>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Unicode_Release\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Unicode_Release\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ImportLibrary>.\Unicode_Release\avatarhistW.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Unicode Release|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <Optimization>MinSpace</Optimization>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WarningLevel>Level3</WarningLevel>
+ <AdditionalIncludeDirectories>../../include;sdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;UNICODE;_USRDLL;AvatarHistory_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AssemblerListingLocation>.\Unicode_Release\</AssemblerListingLocation>
+ <BrowseInformation>true</BrowseInformation>
+ <ObjectFileName>.\Unicode_Release\</ObjectFileName>
+ <ProgramDataBaseFileName>.\Unicode_Release\</ProgramDataBaseFileName>
+ </ClCompile>
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <TypeLibraryName>.\Unicode_Release\AvatarHistory.tlb</TypeLibraryName>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ </Midl>
+ <ResourceCompile>
+ <Culture>0x0809</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Unicode_Release\AvatarHistory.bsc</OutputFile>
+ </Bscmake>
+ <Link>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkDLL>true</LinkDLL>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ImportLibrary>.\Unicode_Release\avatarhistW.lib</ImportLibrary>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="AvatarDlg.cpp" />
+ <ClCompile Include="AvatarHistory.cpp" />
+ <ClCompile Include="icolib.cpp" />
+ <ClCompile Include="..\utils\mir_options.cpp" />
+ <ClCompile Include="options.cpp" />
+ <ClCompile Include="popup.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="AvatarHistory.h" />
+ <ClInclude Include="m_avatarhist.h" />
+ <ClInclude Include="..\utils\mir_buffer.h" />
+ <ClInclude Include="..\utils\mir_memory.h" />
+ <ClInclude Include="..\utils\mir_options.h" />
+ <ClInclude Include="popup.h" />
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="AvatarHistory.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="Docs\avatarhist_changelog.txt" />
+ <CustomBuild Include="Docs\avatarhist_readme.txt" />
+ <CustomBuild Include="Docs\avatarhist_version.txt" />
+ <CustomBuild Include="Docs\langpack_avatarhist.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="AvatarHistory.ico" />
+ <None Include="NewAvatar.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/Plugins/avatarhistory/icolib.cpp b/Plugins/avatarhistory/icolib.cpp index 63baa3d..c2de441 100644 --- a/Plugins/avatarhistory/icolib.cpp +++ b/Plugins/avatarhistory/icolib.cpp @@ -9,7 +9,7 @@ enum IconIndex typedef struct
{
- char* szDescr;
+ TCHAR* szDescr;
char* szName;
int defIconID;
BOOL core;
@@ -17,8 +17,8 @@ typedef struct static IconStruct iconList[] =
{
- { "History", "core_main_10", IDI_AVATARHIST, TRUE },
- { "Avatar Overlay", "avh_overlay", IDI_AVATAROVERLAY, FALSE }
+ { LPGENT("History"), "core_main_10", IDI_AVATARHIST, TRUE },
+ { LPGENT("Avatar Overlay"), "avh_overlay", IDI_AVATAROVERLAY, FALSE }
};
extern HANDLE hHooks[];
@@ -69,19 +69,20 @@ void SetupIcoLib() if (hHooks[4])
{
SKINICONDESC sid = {0};
- char path[MAX_PATH];
+ TCHAR path[MAX_PATH];
- GetModuleFileNameA(hInst, path, sizeof(path));
+ GetModuleFileName(hInst, path, sizeof(path));
- sid.cbSize = SKINICONDESC_SIZE_V2;
- sid.pszSection = Translate("Avatar History");
- sid.pszDefaultFile = path;
+ sid.cbSize = SKINICONDESC_SIZE;
+ sid.ptszSection = LPGENT("Avatar History");
+ sid.ptszDefaultFile = path;
+ sid.flags = SIDF_ALL_TCHAR;
for (unsigned i = 0; i < MAX_REGS(iconList); i++)
{
- if (mirVer < PLUGIN_MAKE_VERSION(0, 7, 0, 0) || !iconList[i].core)
+ if (!iconList[i].core)
{
- sid.pszDescription = Translate(iconList[i].szDescr);
+ sid.ptszDescription = iconList[i].szDescr;
sid.pszName = iconList[i].szName;
sid.iDefaultIndex = -iconList[i].defIconID;
CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
diff --git a/Plugins/avatarhistory/options.cpp b/Plugins/avatarhistory/options.cpp index 9ca8766..acb40cd 100644 --- a/Plugins/avatarhistory/options.cpp +++ b/Plugins/avatarhistory/options.cpp @@ -30,8 +30,8 @@ Avatar History Plugin Options opts;
-static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static BOOL CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static INT_PTR CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
static OptPageControl optionsControls[] = {
@@ -76,25 +76,21 @@ int OptInit(WPARAM wParam,LPARAM lParam) odp.cbSize=sizeof(odp);
odp.position=0;
odp.hInstance=hInst;
- odp.ptszGroup = TranslateT("History"); // group to put your item under
- odp.ptszTitle = TranslateT("Avatar"); // name of the item
+ odp.ptszGroup = LPGENT("History"); // group to put your item under
+ odp.ptszTitle = LPGENT("Avatar"); // name of the item
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_EXPERTONLY;
CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
- if(ServiceExists(MS_POPUP_ADDPOPUPEX)
-#ifdef UNICODE
- || ServiceExists(MS_POPUP_ADDPOPUPW)
-#endif
- )
+ if(ServiceExists(MS_POPUP_ADDPOPUPT))
{
ZeroMemory(&odp,sizeof(odp));
odp.cbSize=sizeof(odp);
odp.position=0;
odp.hInstance=hInst;
- odp.ptszGroup = TranslateT("Popups");
- odp.ptszTitle = TranslateT("Avatar Change");
+ odp.ptszGroup = LPGENT("Popups");
+ odp.ptszTitle = LPGENT("Avatar Change");
odp.pfnDlgProc = PopupsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPS);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
@@ -120,7 +116,7 @@ void LoadOptions() }
-static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
return SaveOptsDlgProc(optionsControls, MAX_REGS(optionsControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
}
@@ -168,7 +164,7 @@ static void PopupsEnableDisableCtrls(HWND hwndDlg) }
-static BOOL CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
diff --git a/Plugins/avatarhistory/popup.cpp b/Plugins/avatarhistory/popup.cpp index c24bf8b..d614a23 100644 --- a/Plugins/avatarhistory/popup.cpp +++ b/Plugins/avatarhistory/popup.cpp @@ -47,7 +47,7 @@ void InitPopups() hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MODULE_NAME) _T("_PopupWindow"),
0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP,
NULL, hInst, NULL);
- SetWindowLong(hPopupWindow, GWL_WNDPROC, (LONG)(WNDPROC)PopupWndProc);
+ SetWindowLong(hPopupWindow, GWLP_WNDPROC, (LONG)(WNDPROC)PopupWndProc);
}
@@ -87,11 +87,10 @@ PopupDataType; void ShowPopupEx(HANDLE hContact, const TCHAR *title, const TCHAR *description,
void *plugin_data, int type, const Options *op)
{
-#ifdef UNICODE
- if(ServiceExists(MS_POPUP_ADDPOPUPW))
+ if(ServiceExists(MS_POPUP_ADDPOPUPT))
{
// Make popup
- POPUPDATAW ppd = {0};
+ POPUPDATAT ppd = {0};
ppd.lchContact = hContact;
ppd.lchIcon = createProtoOverlayedIcon(hContact);
@@ -101,13 +100,13 @@ void ShowPopupEx(HANDLE hContact, const TCHAR *title, const TCHAR *description, ((PopupDataType*)ppd.PluginData)->hIcon = ppd.lchIcon;
if (title != NULL)
- lstrcpyn(ppd.lpwzContactName, title, MAX_REGS(ppd.lpwzContactName));
+ lstrcpyn(ppd.lptzContactName, title, MAX_REGS(ppd.lptzContactName));
else if (hContact != NULL)
- lstrcpyn(ppd.lpwzContactName, (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR | GCDNF_NOCACHE),
- MAX_REGS(ppd.lpwzContactName));
+ lstrcpyn(ppd.lptzContactName, (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR | GCDNF_NOCACHE),
+ MAX_REGS(ppd.lptzContactName));
if (description != NULL)
- lstrcpyn(ppd.lpwzText, description, MAX_REGS(ppd.lpwzText));
+ lstrcpyn(ppd.lptzText, description, MAX_REGS(ppd.lptzText));
if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST)
{
@@ -166,89 +165,7 @@ void ShowPopupEx(HANDLE hContact, const TCHAR *title, const TCHAR *description, }
// Now that every field has been filled, we want to see the popup.
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd,0);
- }
- else
-#endif
- if(ServiceExists(MS_POPUP_ADDPOPUPEX))
- {
- // Make popup
- POPUPDATAEX ppd = {0};
-
- ppd.lchContact = hContact;
- ppd.lchIcon = createProtoOverlayedIcon(hContact);
-
- ppd.PluginData = mir_alloc(sizeof(PopupDataType));
- ((PopupDataType*)ppd.PluginData)->plugin_data = plugin_data;
- ((PopupDataType*)ppd.PluginData)->hIcon = ppd.lchIcon;
-
- if (title != NULL)
- TCHAR_TO_CHAR(ppd.lpzContactName, title);
- else
- lstrcpynA(ppd.lpzContactName, (char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_NOCACHE),
- MAX_REGS(ppd.lpzContactName));
-
- if (description != NULL)
- TCHAR_TO_CHAR(ppd.lpzText, description);
-
- if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST)
- {
- if (op->popup_use_default_colors)
- {
- ppd.colorBack = 0;
- ppd.colorText = 0;
- }
- else if (op->popup_use_win_colors)
- {
- ppd.colorBack = GetSysColor(COLOR_BTNFACE);
- ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
- }
- else
- {
- ppd.colorBack = op->popup_bkg_color;
- ppd.colorText = op->popup_text_color;
- }
- }
- else // if (type == POPUP_TYPE_ERROR)
- {
- ppd.colorBack = RGB(200,0,0);
- ppd.colorText = RGB(255,255,255);
- }
-
- if (type == POPUP_TYPE_NORMAL)
- {
- ppd.PluginWindowProc = PopupDlgProc;
- }
- else // if (type == POPUP_TYPE_TEST || type == POPUP_TYPE_ERROR)
- {
- ppd.PluginWindowProc = DumbPopupDlgProc;
- }
-
- if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST)
- {
- switch (op->popup_delay_type)
- {
- case POPUP_DELAY_CUSTOM:
- ppd.iSeconds = opts.popup_timeout;
- break;
-
- case POPUP_DELAY_PERMANENT:
- ppd.iSeconds = -1;
- break;
-
- case POPUP_DELAY_DEFAULT:
- default:
- ppd.iSeconds = 0;
- break;
- }
- }
- else // if (type == POPUP_TYPE_ERROR)
- {
- ppd.iSeconds = 0;
- }
-
- // Now that every field has been filled, we want to see the popup.
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd,0);
+ PUAddPopUpT(&ppd);
}
else
{
diff --git a/Plugins/avatarhistory/sdk/m_folders.h b/Plugins/avatarhistory/sdk/m_folders.h index a112b05..71540aa 100644 --- a/Plugins/avatarhistory/sdk/m_folders.h +++ b/Plugins/avatarhistory/sdk/m_folders.h @@ -27,37 +27,53 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CURRENT_PROFILE "%current_profile%"
#define MIRANDA_PATH "%miranda_path%"
#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
+#define MIRANDA_USERDATA "%miranda_userdata%"
#define PROFILE_PATHW L"%profile_path%"
#define CURRENT_PROFILEW L"%current_profile%"
#define MIRANDA_PATHW L"%miranda_path%"
+#define MIRANDA_USERDATAW L"%miranda_userdata%"
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
+#ifdef _UNICODE
+ #define PROFILE_PATHT PROFILE_PATHW
+ #define CURRENT_PROFILET CURRENT_PROFILEW
+ #define MIRANDA_PATHT MIRANDA_PATHW
+ #define MIRANDA_USERDATAT MIRANDA_USERDATAW
+#else
+ #define PROFILE_PATHT PROFILE_PATH
+ #define CURRENT_PROFILET CURRENT_PROFILE
+ #define MIRANDA_PATHT MIRANDA_PATH
+ #define MIRANDA_USERDATAT MIRANDA_USERDATA
+#endif
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
+#define FOLDER_AVATARS PROFILE_PATHT "\\" CURRENT_PROFILET "\\avatars"
+#define FOLDER_VCARDS PROFILE_PATHT "\\" CURRENT_PROFILET "\\vcards"
+#define FOLDER_LOGS PROFILE_PATHT "\\" CURRENT_PROFILET "\\logs"
+#define FOLDER_RECEIVED_FILES PROFILE_PATHT "\\" CURRENT_PROFILET "\\received files"
+#define FOLDER_DOCS MIRANDA_PATHT "\\" "docs"
+#define FOLDER_CONFIG PLUGINS_PATHT "\\" "config"
+#define FOLDER_SCRIPTS MIRANDA_PATHT "\\" "scripts"
+#define FOLDER_UPDATES MIRANDA_PATHT "\\" "updates"
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
+#define FOLDER_CUSTOMIZE MIRANDA_PATHT "\\" "customize"
#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
+#define TO_WIDE(x) L ## x
#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
#define FF_UNICODE 0x00000001
+#if defined (UNICODE)
+ #define FF_TCHAR FF_UNICODE
+#else
+ #define FF_TCHAR 0
+#endif
+
typedef struct{
int cbSize; //size of struct
char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
@@ -72,16 +88,16 @@ typedef struct{ /*Folders/Register/Path service
wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
+ lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
the necessary information.
- Returns a handle to the registered path or 0 on error.
+ Returns a handle to the registered path or 0 on error.
You need to use this to call the other services.
*/
#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
/*Folders/Get/PathSize service
wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
+ lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
string (not including the null character). Depending on the flags set when creating the path
it will either call strlen() or wcslen() to get the length of the string.
Returns the size of the buffer.
@@ -133,25 +149,29 @@ typedef struct{ #define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
#ifndef FOLDERS_NO_HELPER_FUNCTIONS
+
+#ifndef M_UTILS_H__
+#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
+#endif
//#include "../../../include/newpluginapi.h"
-__inline static int FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
+__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
{
FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 1;
+ if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
fd.cbSize = sizeof(FOLDERSDATA);
strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
fd.szFormat = defaultPath;
- return CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
+ return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
}
-__inline static int FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
+__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
{
FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 1;
+ if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
fd.cbSize = sizeof(FOLDERSDATA);
strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
@@ -159,46 +179,111 @@ __inline static int FoldersRegisterCustomPathW(const char *section, const char * fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
fd.szFormatW = defaultPathW;
fd.flags = FF_UNICODE;
- return CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
+ return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
+}
+
+__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
+{
+ FOLDERSGETDATA fgd = {0};
+ INT_PTR res;
+ fgd.cbSize = sizeof(FOLDERSGETDATA);
+ fgd.nMaxPathSize = size;
+ fgd.szPath = path;
+ res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
+ if (res)
+ {
+ char buffer[MAX_PATH];
+ CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
+ mir_snprintf(path, size, "%s", buffer);
+ }
+
+ return res;
+}
+
+__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
+{
+ FOLDERSGETDATA fgd = {0};
+ INT_PTR res;
+ fgd.cbSize = sizeof(FOLDERSGETDATA);
+ fgd.nMaxPathSize = count;
+ fgd.szPathW = pathW;
+ res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
+ if (res)
+ {
+ wcsncpy(pathW, notFoundW, count);
+ pathW[count - 1] = '\0';
+ }
+
+ return res;
}
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, char *notFound)
+__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
{
FOLDERSGETDATA fgd = {0};
- int res;
+ INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = size;
fgd.szPath = path;
res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res)
- {
- strncpy(path, notFound, size);
- path[size - 1] = '\0'; //make sure it's NULL terminated
- }
+ {
+ char buffer[MAX_PATH];
+ CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
+ mir_snprintf(path, size, "%s", buffer);
+ }
+ if (strlen(path) > 0)
+ {
+ strcat(path, "\\");
+ }
+ else{
+ path[0] = '\0';
+ }
+
+ if (fileName)
+ {
+ strcat(path, fileName);
+ }
+
return res;
}
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW)
+__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
{
FOLDERSGETDATA fgd = {0};
- int res;
+ INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = count;
fgd.szPathW = pathW;
res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
+ {
+ wcsncpy(pathW, notFoundW, count);
+ pathW[count - 1] = '\0';
+ }
+
+ if (wcslen(pathW) > 0)
+ {
+ wcscat(pathW, L"\\");
+ }
+ else{
+ pathW[0] = L'\0';
+ }
+
+ if (fileNameW)
+ {
+ wcscat(pathW, fileNameW);
+ }
+
return res;
}
# ifdef _UNICODE
# define FoldersGetCustomPathT FoldersGetCustomPathW
+# define FoldersGetCustomPathExT FoldersGetCustomPathExW
# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
#else
# define FoldersGetCustomPathT FoldersGetCustomPath
+# define FoldersGetCustomPathExT FoldersGetCustomPath
# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
#endif
diff --git a/Plugins/avatarhistory/sdk/m_freeimage.h b/Plugins/avatarhistory/sdk/m_freeimage.h deleted file mode 100644 index c0cceeb..0000000 --- a/Plugins/avatarhistory/sdk/m_freeimage.h +++ /dev/null @@ -1,965 +0,0 @@ -// ==========================================================
-// FreeImage 3
-//
-// Design and implementation by
-// - Floris van den Berg (flvdberg@wxs.nl)
-// - Hervé Drolon (drolon@infonie.fr)
-//
-// Contributors:
-// - Adam Gates (radad@xoasis.com)
-// - Alex Kwak
-// - Alexander Dymerets (sashad@te.net.ua)
-// - Detlev Vendt (detlev.vendt@brillit.de)
-// - Jan L. Nauta (jln@magentammt.com)
-// - Jani Kajala (janik@remedy.fi)
-// - Juergen Riecker (j.riecker@gmx.de)
-// - Karl-Heinz Bussian (khbussian@moss.de)
-// - Laurent Rocher (rocherl@club-internet.fr)
-// - Luca Piergentili (l.pierge@terra.es)
-// - Machiel ten Brinke (brinkem@uni-one.nl)
-// - Markus Loibl (markus.loibl@epost.de)
-// - Martin Weber (martweb@gmx.net)
-// - Matthias Wandel (mwandel@rim.net)
-// - Michal Novotny (michal@etc.cz)
-// - Petr Pytelka (pyta@lightcomp.com)
-// - Riley McNiff (rmcniff@marexgroup.com)
-// - Ryan Rubley (ryan@lostreality.org)
-// - Volker Gärtner (volkerg@gmx.at)
-//
-// This file is part of FreeImage 3
-//
-// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
-// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
-// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
-// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
-// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
-// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
-// THIS DISCLAIMER.
-//
-// Use at your own risk!
-// ==========================================================
-
-#ifndef FREEIMAGE_H
-#define FREEIMAGE_H
-
-// Version information ------------------------------------------------------
-
-#define FREEIMAGE_MAJOR_VERSION 3
-#define FREEIMAGE_MINOR_VERSION 9
-#define FREEIMAGE_RELEASE_SERIAL 3
-
-// Compiler options ---------------------------------------------------------
-
-#if !defined(_FI_MIMPLUGIN)
-#include <wchar.h> // needed for UNICODE functions
-#endif
-
-#if defined(FREEIMAGE_LIB) || !(defined(_WIN32) || defined(__WIN32__))
-#define DLL_API
-#define DLL_CALLCONV
-#else
-
-#define DLL_CALLCONV __stdcall
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
-#ifdef FREEIMAGE_EXPORTS
-#define DLL_API __declspec(dllexport)
-#else
-#define DLL_API __declspec(dllimport)
-#endif // FREEIMAGE_EXPORTS
-#endif // FREEIMAGE_LIB || !WIN32
-
-// Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined
-// If your big endian system isn't being detected, add an OS specific check
-#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \
- (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \
- defined(__BIG_ENDIAN__)
-#define FREEIMAGE_BIGENDIAN
-#endif // BYTE_ORDER
-
-// Ensure 4-byte enums if we're using Borland C++ compilers
-#if defined(__BORLANDC__)
-#pragma option push -b
-#endif
-
-// For C compatibility --------------------------------------------------------
-
-#ifdef __cplusplus
-#define FI_DEFAULT(x)
-#define FI_ENUM(x) enum x
-#define FI_STRUCT(x) struct x
-#else
-#define FI_DEFAULT(x)
-#define FI_ENUM(x) typedef int x; enum x
-#define FI_STRUCT(x) typedef struct x x; struct x
-#endif
-
-// Bitmap types -------------------------------------------------------------
-
-FI_STRUCT (FIBITMAP) { void *data; };
-FI_STRUCT (FIMULTIBITMAP) { void *data; };
-
-// Types used in the library (directly copied from Windows) -----------------
-
-#ifndef _WINDOWS_
-#define _WINDOWS_
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#ifndef _MSC_VER
-// define portable types for 32-bit / 64-bit OS
-#include <inttypes.h>
-typedef int32_t BOOL;
-typedef uint8_t BYTE;
-typedef uint16_t WORD;
-typedef uint32_t DWORD;
-typedef int32_t LONG;
-#else
-// MS is not C99 ISO compliant
-typedef long BOOL;
-typedef unsigned char BYTE;
-typedef unsigned short WORD;
-typedef unsigned long DWORD;
-typedef long LONG;
-#endif // _MSC_VER
-
-#if (defined(_WIN32) || defined(__WIN32__))
-#pragma pack(push, 1)
-#else
-#pragma pack(1)
-#endif // WIN32
-
-typedef struct tagRGBQUAD {
-#ifdef FREEIMAGE_BIGENDIAN
- BYTE rgbRed;
- BYTE rgbGreen;
- BYTE rgbBlue;
-#else
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
-#endif // FREEIMAGE_BIGENDIAN
- BYTE rgbReserved;
-} RGBQUAD;
-
-typedef struct tagRGBTRIPLE {
-#ifdef FREEIMAGE_BIGENDIAN
- BYTE rgbtRed;
- BYTE rgbtGreen;
- BYTE rgbtBlue;
-#else
- BYTE rgbtBlue;
- BYTE rgbtGreen;
- BYTE rgbtRed;
-#endif // FREEIMAGE_BIGENDIAN
-} RGBTRIPLE;
-
-#if (defined(_WIN32) || defined(__WIN32__))
-#pragma pack(pop)
-#else
-#pragma pack()
-#endif // WIN32
-
-typedef struct tagBITMAPINFOHEADER{
- DWORD biSize;
- LONG biWidth;
- LONG biHeight;
- WORD biPlanes;
- WORD biBitCount;
- DWORD biCompression;
- DWORD biSizeImage;
- LONG biXPelsPerMeter;
- LONG biYPelsPerMeter;
- DWORD biClrUsed;
- DWORD biClrImportant;
-} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
-
-typedef struct tagBITMAPINFO {
- BITMAPINFOHEADER bmiHeader;
- RGBQUAD bmiColors[1];
-} BITMAPINFO, *PBITMAPINFO;
-
-#endif // _WINDOWS_
-
-// Types used in the library (specific to FreeImage) ------------------------
-
-#if (defined(_WIN32) || defined(__WIN32__))
-#pragma pack(push, 1)
-#else
-#pragma pack(1)
-#endif // WIN32
-
-/** 48-bit RGB
-*/
-typedef struct tagFIRGB16 {
- WORD red;
- WORD green;
- WORD blue;
-} FIRGB16;
-
-/** 64-bit RGBA
-*/
-typedef struct tagFIRGBA16 {
- WORD red;
- WORD green;
- WORD blue;
- WORD alpha;
-} FIRGBA16;
-
-/** 96-bit RGB Float
-*/
-typedef struct tagFIRGBF {
- float red;
- float green;
- float blue;
-} FIRGBF;
-
-/** 128-bit RGBA Float
-*/
-typedef struct tagFIRGBAF {
- float red;
- float green;
- float blue;
- float alpha;
-} FIRGBAF;
-
-/** Data structure for COMPLEX type (complex number)
-*/
-typedef struct tagFICOMPLEX {
- /// real part
- double r;
- /// imaginary part
- double i;
-} FICOMPLEX;
-
-#if (defined(_WIN32) || defined(__WIN32__))
-#pragma pack(pop)
-#else
-#pragma pack()
-#endif // WIN32
-
-// Indexes for byte arrays, masks and shifts for treating pixels as words ---
-// These coincide with the order of RGBQUAD and RGBTRIPLE -------------------
-
-#ifndef FREEIMAGE_BIGENDIAN
-// Little Endian (x86 / MS Windows, Linux) : BGR(A) order
-#define FI_RGBA_RED 2
-#define FI_RGBA_GREEN 1
-#define FI_RGBA_BLUE 0
-#define FI_RGBA_ALPHA 3
-#define FI_RGBA_RED_MASK 0x00FF0000
-#define FI_RGBA_GREEN_MASK 0x0000FF00
-#define FI_RGBA_BLUE_MASK 0x000000FF
-#define FI_RGBA_ALPHA_MASK 0xFF000000
-#define FI_RGBA_RED_SHIFT 16
-#define FI_RGBA_GREEN_SHIFT 8
-#define FI_RGBA_BLUE_SHIFT 0
-#define FI_RGBA_ALPHA_SHIFT 24
-#else
-// Big Endian (PPC / Linux, MaxOSX) : RGB(A) order
-#define FI_RGBA_RED 0
-#define FI_RGBA_GREEN 1
-#define FI_RGBA_BLUE 2
-#define FI_RGBA_ALPHA 3
-#define FI_RGBA_RED_MASK 0xFF000000
-#define FI_RGBA_GREEN_MASK 0x00FF0000
-#define FI_RGBA_BLUE_MASK 0x0000FF00
-#define FI_RGBA_ALPHA_MASK 0x000000FF
-#define FI_RGBA_RED_SHIFT 24
-#define FI_RGBA_GREEN_SHIFT 16
-#define FI_RGBA_BLUE_SHIFT 8
-#define FI_RGBA_ALPHA_SHIFT 0
-#endif // FREEIMAGE_BIGENDIAN
-
-#define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)
-
-// The 16bit macros only include masks and shifts, since each color element is not byte aligned
-
-#define FI16_555_RED_MASK 0x7C00
-#define FI16_555_GREEN_MASK 0x03E0
-#define FI16_555_BLUE_MASK 0x001F
-#define FI16_555_RED_SHIFT 10
-#define FI16_555_GREEN_SHIFT 5
-#define FI16_555_BLUE_SHIFT 0
-#define FI16_565_RED_MASK 0xF800
-#define FI16_565_GREEN_MASK 0x07E0
-#define FI16_565_BLUE_MASK 0x001F
-#define FI16_565_RED_SHIFT 11
-#define FI16_565_GREEN_SHIFT 5
-#define FI16_565_BLUE_SHIFT 0
-
-// ICC profile support ------------------------------------------------------
-
-#define FIICC_DEFAULT 0x00
-#define FIICC_COLOR_IS_CMYK 0x01
-
-FI_STRUCT (FIICCPROFILE) {
- WORD flags; // info flag
- DWORD size; // profile's size measured in bytes
- void *data; // points to a block of contiguous memory containing the profile
-};
-
-// Important enums ----------------------------------------------------------
-
-/** I/O image format identifiers.
-*/
-FI_ENUM(FREE_IMAGE_FORMAT) {
- FIF_UNKNOWN = -1,
- FIF_BMP = 0,
- FIF_ICO = 1,
- FIF_JPEG = 2,
- FIF_JNG = 3,
- FIF_KOALA = 4,
- FIF_LBM = 5,
- FIF_IFF = FIF_LBM,
- FIF_MNG = 6,
- FIF_PBM = 7,
- FIF_PBMRAW = 8,
- FIF_PCD = 9,
- FIF_PCX = 10,
- FIF_PGM = 11,
- FIF_PGMRAW = 12,
- FIF_PNG = 13,
- FIF_PPM = 14,
- FIF_PPMRAW = 15,
- FIF_RAS = 16,
- FIF_TARGA = 17,
- FIF_TIFF = 18,
- FIF_WBMP = 19,
- FIF_PSD = 20,
- FIF_CUT = 21,
- FIF_XBM = 22,
- FIF_XPM = 23,
- FIF_DDS = 24,
- FIF_GIF = 25,
- FIF_HDR = 26,
- FIF_FAXG3 = 27,
- FIF_SGI = 28
-};
-
-/** Image type used in FreeImage.
-*/
-FI_ENUM(FREE_IMAGE_TYPE) {
- FIT_UNKNOWN = 0, // unknown type
- FIT_BITMAP = 1, // standard image : 1-, 4-, 8-, 16-, 24-, 32-bit
- FIT_UINT16 = 2, // array of unsigned short : unsigned 16-bit
- FIT_INT16 = 3, // array of short : signed 16-bit
- FIT_UINT32 = 4, // array of unsigned long : unsigned 32-bit
- FIT_INT32 = 5, // array of long : signed 32-bit
- FIT_FLOAT = 6, // array of float : 32-bit IEEE floating point
- FIT_DOUBLE = 7, // array of double : 64-bit IEEE floating point
- FIT_COMPLEX = 8, // array of FICOMPLEX : 2 x 64-bit IEEE floating point
- FIT_RGB16 = 9, // 48-bit RGB image : 3 x 16-bit
- FIT_RGBA16 = 10, // 64-bit RGBA image : 4 x 16-bit
- FIT_RGBF = 11, // 96-bit RGB float image : 3 x 32-bit IEEE floating point
- FIT_RGBAF = 12 // 128-bit RGBA float image : 4 x 32-bit IEEE floating point
-};
-
-/** Image color type used in FreeImage.
-*/
-FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
- FIC_MINISWHITE = 0, // min value is white
- FIC_MINISBLACK = 1, // min value is black
- FIC_RGB = 2, // RGB color model
- FIC_PALETTE = 3, // color map indexed
- FIC_RGBALPHA = 4, // RGB color model with alpha channel
- FIC_CMYK = 5 // CMYK color model
-};
-
-/** Color quantization algorithms.
-Constants used in FreeImage_ColorQuantize.
-*/
-FI_ENUM(FREE_IMAGE_QUANTIZE) {
- FIQ_WUQUANT = 0, // Xiaolin Wu color quantization algorithm
- FIQ_NNQUANT = 1 // NeuQuant neural-net quantization algorithm by Anthony Dekker
-};
-
-/** Dithering algorithms.
-Constants used in FreeImage_Dither.
-*/
-FI_ENUM(FREE_IMAGE_DITHER) {
- FID_FS = 0, // Floyd & Steinberg error diffusion
- FID_BAYER4x4 = 1, // Bayer ordered dispersed dot dithering (order 2 dithering matrix)
- FID_BAYER8x8 = 2, // Bayer ordered dispersed dot dithering (order 3 dithering matrix)
- FID_CLUSTER6x6 = 3, // Ordered clustered dot dithering (order 3 - 6x6 matrix)
- FID_CLUSTER8x8 = 4, // Ordered clustered dot dithering (order 4 - 8x8 matrix)
- FID_CLUSTER16x16= 5, // Ordered clustered dot dithering (order 8 - 16x16 matrix)
- FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix)
-};
-
-/** Lossless JPEG transformations
-Constants used in FreeImage_JPEGTransform
-*/
-FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
- FIJPEG_OP_NONE = 0, // no transformation
- FIJPEG_OP_FLIP_H = 1, // horizontal flip
- FIJPEG_OP_FLIP_V = 2, // vertical flip
- FIJPEG_OP_TRANSPOSE = 3, // transpose across UL-to-LR axis
- FIJPEG_OP_TRANSVERSE = 4, // transpose across UR-to-LL axis
- FIJPEG_OP_ROTATE_90 = 5, // 90-degree clockwise rotation
- FIJPEG_OP_ROTATE_180 = 6, // 180-degree rotation
- FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw)
-};
-
-/** Tone mapping operators.
-Constants used in FreeImage_ToneMapping.
-*/
-FI_ENUM(FREE_IMAGE_TMO) {
- FITMO_DRAGO03 = 0, // Adaptive logarithmic mapping (F. Drago, 2003)
- FITMO_REINHARD05 = 1, // Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005)
-};
-
-/** Upsampling / downsampling filters.
-Constants used in FreeImage_Rescale.
-*/
-FI_ENUM(FREE_IMAGE_FILTER) {
- FILTER_BOX = 0, // Box, pulse, Fourier window, 1st order (constant) b-spline
- FILTER_BICUBIC = 1, // Mitchell & Netravali's two-param cubic filter
- FILTER_BILINEAR = 2, // Bilinear filter
- FILTER_BSPLINE = 3, // 4th order (cubic) b-spline
- FILTER_CATMULLROM = 4, // Catmull-Rom spline, Overhauser spline
- FILTER_LANCZOS3 = 5 // Lanczos3 filter
-};
-
-/** Color channels.
-Constants used in color manipulation routines.
-*/
-FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
- FICC_RGB = 0, // Use red, green and blue channels
- FICC_RED = 1, // Use red channel
- FICC_GREEN = 2, // Use green channel
- FICC_BLUE = 3, // Use blue channel
- FICC_ALPHA = 4, // Use alpha channel
- FICC_BLACK = 5, // Use black channel
- FICC_REAL = 6, // Complex images: use real part
- FICC_IMAG = 7, // Complex images: use imaginary part
- FICC_MAG = 8, // Complex images: use magnitude
- FICC_PHASE = 9 // Complex images: use phase
-};
-
-// Metadata support ---------------------------------------------------------
-
-/**
- Tag data type information (based on TIFF specifications)
-
- Note: RATIONALs are the ratio of two 32-bit integer values.
-*/
-FI_ENUM(FREE_IMAGE_MDTYPE) {
- FIDT_NOTYPE = 0, // placeholder
- FIDT_BYTE = 1, // 8-bit unsigned integer
- FIDT_ASCII = 2, // 8-bit bytes w/ last byte null
- FIDT_SHORT = 3, // 16-bit unsigned integer
- FIDT_LONG = 4, // 32-bit unsigned integer
- FIDT_RATIONAL = 5, // 64-bit unsigned fraction
- FIDT_SBYTE = 6, // 8-bit signed integer
- FIDT_UNDEFINED = 7, // 8-bit untyped data
- FIDT_SSHORT = 8, // 16-bit signed integer
- FIDT_SLONG = 9, // 32-bit signed integer
- FIDT_SRATIONAL = 10, // 64-bit signed fraction
- FIDT_FLOAT = 11, // 32-bit IEEE floating point
- FIDT_DOUBLE = 12, // 64-bit IEEE floating point
- FIDT_IFD = 13, // 32-bit unsigned integer (offset)
- FIDT_PALETTE = 14 // 32-bit RGBQUAD
-};
-
-/**
- Metadata models supported by FreeImage
-*/
-FI_ENUM(FREE_IMAGE_MDMODEL) {
- FIMD_NODATA = -1,
- FIMD_COMMENTS = 0, // single comment or keywords
- FIMD_EXIF_MAIN = 1, // Exif-TIFF metadata
- FIMD_EXIF_EXIF = 2, // Exif-specific metadata
- FIMD_EXIF_GPS = 3, // Exif GPS metadata
- FIMD_EXIF_MAKERNOTE = 4, // Exif maker note metadata
- FIMD_EXIF_INTEROP = 5, // Exif interoperability metadata
- FIMD_IPTC = 6, // IPTC/NAA metadata
- FIMD_XMP = 7, // Abobe XMP metadata
- FIMD_GEOTIFF = 8, // GeoTIFF metadata
- FIMD_ANIMATION = 9, // Animation metadata
- FIMD_CUSTOM = 10 // Used to attach other metadata types to a dib
-};
-
-/**
- Handle to a metadata model
-*/
-FI_STRUCT (FIMETADATA) { void *data; };
-
-/**
- Handle to a FreeImage tag
-*/
-FI_STRUCT (FITAG) { void *data; };
-
-// File IO routines ---------------------------------------------------------
-
-#ifndef FREEIMAGE_IO
-#define FREEIMAGE_IO
-
-typedef void* fi_handle;
-typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
-typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
-typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
-typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
-
-#if (defined(_WIN32) || defined(__WIN32__))
-#pragma pack(push, 1)
-#else
-#pragma pack(1)
-#endif // WIN32
-
-FI_STRUCT(FreeImageIO) {
- FI_ReadProc read_proc; // pointer to the function used to read data
- FI_WriteProc write_proc; // pointer to the function used to write data
- FI_SeekProc seek_proc; // pointer to the function used to seek
- FI_TellProc tell_proc; // pointer to the function used to aquire the current position
-};
-
-#if (defined(_WIN32) || defined(__WIN32__))
-#pragma pack(pop)
-#else
-#pragma pack()
-#endif // WIN32
-
-/**
-Handle to a memory I/O stream
-*/
-FI_STRUCT (FIMEMORY) { void *data; };
-
-#endif // FREEIMAGE_IO
-
-// Plugin routines ----------------------------------------------------------
-
-#ifndef PLUGINS
-#define PLUGINS
-
-typedef const char *(DLL_CALLCONV *FI_FormatProc) ();
-typedef const char *(DLL_CALLCONV *FI_DescriptionProc) ();
-typedef const char *(DLL_CALLCONV *FI_ExtensionListProc) ();
-typedef const char *(DLL_CALLCONV *FI_RegExprProc) ();
-typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
-typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);
-typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);
-typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);
-typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data);
-typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);
-typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
-typedef const char *(DLL_CALLCONV *FI_MimeProc) ();
-typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);
-typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
-typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)();
-
-FI_STRUCT (Plugin) {
- FI_FormatProc format_proc;
- FI_DescriptionProc description_proc;
- FI_ExtensionListProc extension_proc;
- FI_RegExprProc regexpr_proc;
- FI_OpenProc open_proc;
- FI_CloseProc close_proc;
- FI_PageCountProc pagecount_proc;
- FI_PageCapabilityProc pagecapability_proc;
- FI_LoadProc load_proc;
- FI_SaveProc save_proc;
- FI_ValidateProc validate_proc;
- FI_MimeProc mime_proc;
- FI_SupportsExportBPPProc supports_export_bpp_proc;
- FI_SupportsExportTypeProc supports_export_type_proc;
- FI_SupportsICCProfilesProc supports_icc_profiles_proc;
-};
-
-typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);
-
-#endif // PLUGINS
-
-
-// Load / Save flag constants -----------------------------------------------
-
-#define BMP_DEFAULT 0
-#define BMP_SAVE_RLE 1
-#define CUT_DEFAULT 0
-#define DDS_DEFAULT 0
-#define FAXG3_DEFAULT 0
-#define GIF_DEFAULT 0
-#define GIF_LOAD256 1 // Load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color
-#define GIF_PLAYBACK 2 // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading
-#define HDR_DEFAULT 0
-#define ICO_DEFAULT 0
-#define ICO_MAKEALPHA 1 // convert to 32bpp and create an alpha channel from the AND-mask when loading
-#define IFF_DEFAULT 0
-#define JPEG_DEFAULT 0 // loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD)
-#define JPEG_FAST 0x0001 // load the file as fast as possible, sacrificing some quality
-#define JPEG_ACCURATE 0x0002 // load the file with the best quality, sacrificing some speed
-#define JPEG_CMYK 0x0004 // load separated CMYK "as is" (use | to combine with other load flags)
-#define JPEG_QUALITYSUPERB 0x80 // save with superb quality (100:1)
-#define JPEG_QUALITYGOOD 0x0100 // save with good quality (75:1)
-#define JPEG_QUALITYNORMAL 0x0200 // save with normal quality (50:1)
-#define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1)
-#define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1)
-#define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags)
-#define KOALA_DEFAULT 0
-#define LBM_DEFAULT 0
-#define MNG_DEFAULT 0
-#define PCD_DEFAULT 0
-#define PCD_BASE 1 // load the bitmap sized 768 x 512
-#define PCD_BASEDIV4 2 // load the bitmap sized 384 x 256
-#define PCD_BASEDIV16 3 // load the bitmap sized 192 x 128
-#define PCX_DEFAULT 0
-#define PNG_DEFAULT 0
-#define PNG_IGNOREGAMMA 1 // avoid gamma correction
-#define PNM_DEFAULT 0
-#define PNM_SAVE_RAW 0 // If set the writer saves in RAW format (i.e. P4, P5 or P6)
-#define PNM_SAVE_ASCII 1 // If set the writer saves in ASCII format (i.e. P1, P2 or P3)
-#define PSD_DEFAULT 0
-#define RAS_DEFAULT 0
-#define SGI_DEFAULT 0
-#define TARGA_DEFAULT 0
-#define TARGA_LOAD_RGB888 1 // If set the loader converts RGB555 and ARGB8888 -> RGB888.
-#define TIFF_DEFAULT 0
-#define TIFF_CMYK 0x0001 // reads/stores tags for separated CMYK (use | to combine with compression flags)
-#define TIFF_PACKBITS 0x0100 // save using PACKBITS compression
-#define TIFF_DEFLATE 0x0200 // save using DEFLATE compression (a.k.a. ZLIB compression)
-#define TIFF_ADOBE_DEFLATE 0x0400 // save using ADOBE DEFLATE compression
-#define TIFF_NONE 0x0800 // save without any compression
-#define TIFF_CCITTFAX3 0x1000 // save using CCITT Group 3 fax encoding
-#define TIFF_CCITTFAX4 0x2000 // save using CCITT Group 4 fax encoding
-#define TIFF_LZW 0x4000 // save using LZW compression
-#define TIFF_JPEG 0x8000 // save using JPEG compression
-#define WBMP_DEFAULT 0
-#define XBM_DEFAULT 0
-#define XPM_DEFAULT 0
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Init / Error routines ----------------------------------------------------
-
-DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
-DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void);
-
-// Version routines ---------------------------------------------------------
-
-DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);
-DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
-
-// Message output functions -------------------------------------------------
-
-DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...);
-
-typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);
-DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
-
-// Allocate / Clone / Unload routines ---------------------------------------
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Allocate(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateT(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
-DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
-DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
-
-// Load / Save routines -----------------------------------------------------
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
-DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));
-DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
-DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
-
-// Memory I/O stream routines -----------------------------------------------
-
-DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
-DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
-DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
-DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
-DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin);
-DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
-DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
-DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
-DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
-
-// Plugin Interface ---------------------------------------------------------
-
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(const char *path, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
-DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void);
-DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
-DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format);
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime);
-DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
-DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
-DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
-DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
-DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename);
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename);
-DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
-DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
-DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp);
-DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
-DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
-
-// Multipaging interface ----------------------------------------------------
-
-DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
-DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
-DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
-DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
-DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
-DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page);
-DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page);
-DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
-DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source);
-DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count);
-
-// Filetype request routines ------------------------------------------------
-
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0));
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0));
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
-DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0));
-
-// Image type request routine -----------------------------------------------
-
-DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
-
-// FreeImage helper routines ------------------------------------------------
-
-DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);
-DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
-DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
-
-
-// Pixel access routines ----------------------------------------------------
-
-DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
-DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline);
-
-DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
-DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
-
-// DIB info routines --------------------------------------------------------
-
-DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
-DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
-
-DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
-DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res);
-DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res);
-
-DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
-DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
-DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
-
-DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
-DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
-
-DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
-DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
-DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
-DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count);
-DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
-
-DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
-DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
-
-
-// ICC profile routines -----------------------------------------------------
-
-DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
-DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);
-DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
-
-// Line conversion routines -------------------------------------------------
-
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels);
-DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels);
-
-// Smart conversion routines ------------------------------------------------
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize FI_DEFAULT(FIQ_WUQUANT), int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBits(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
-DLL_API void DLL_CALLCONV FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
-
-// tone mapping operators
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0));
-DLL_API FIBITMAP* DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
-DLL_API FIBITMAP* DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
-
-// ZLib interface -----------------------------------------------------------
-
-DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
-DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
-DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
-DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
-DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
-
-// --------------------------------------------------------------------------
-// Metadata routines --------------------------------------------------------
-// --------------------------------------------------------------------------
-
-// tag creation / destruction
-DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag();
-DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
-DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
-
-// tag getters and setters
-DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
-DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
-DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
-DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
-DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
-DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
-DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
-
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value);
-
-// iterator
-DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
-DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
-DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
-
-// metadata setter and getter
-DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);
-DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);
-
-// helpers
-DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
-
-// tag to C string conversion
-DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));
-
-// --------------------------------------------------------------------------
-// Image manipulation toolkit -----------------------------------------------
-// --------------------------------------------------------------------------
-
-// rotation and flipping
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask);
-DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
-DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
-DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
-
-// upsampling / downsampling
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
-
-// color manipulation routines (point operations)
-DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
-DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma);
-DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage);
-DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage);
-DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
-DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
-
-// channel processing routines
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dib, FIBITMAP *dib8, FREE_IMAGE_COLOR_CHANNEL channel);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
-DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
-
-// copy / paste / composite routines
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom);
-DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
-DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
-
-
-// restore the borland-specific enum size option
-#if defined(__BORLANDC__)
-#pragma option pop
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // FREEIMAGE_H
diff --git a/Plugins/avatarhistory/sdk/m_imgsrvc.h b/Plugins/avatarhistory/sdk/m_imgsrvc.h deleted file mode 100644 index 923f88e..0000000 --- a/Plugins/avatarhistory/sdk/m_imgsrvc.h +++ /dev/null @@ -1,502 +0,0 @@ -/*
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2007 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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.
-
------------------------------------------------------------------------
-Miranda Image services plugin / API definitions
-Provides various services for image loading, saving and manipulations.
-
-This module is based on the freeimage library, copyrighted by the FreeImage
-Project members.
-
-Miranda plugin code (c) 2007 by Nightwish, silvercircle@gmail.com, all else (C)
-by the FreeImage project (http://freeimage.sourceforge.net)
-
-*/
-
-#ifndef __M_IMGSRVC_H
-#define __M_IMGSRVC_H
-
-#define _FI_MIMPLUGIN 1
-
-#include "m_freeimage.h"
-
-#define FI_IF_VERSION (PLUGIN_MAKE_VERSION(0, 0, 1, 0)) // interface version - must match
-
-// memory i/o defs
-
-/*
- * this struct defines a memio job.
- * datalen and filename must match and must be populated to the size of the memory buffer (caution)
- * data must point to the buffer.
- * curpos is internal and should be initialized to 0
- */
-
-typedef struct fiio_mem_handle_s {
- long filelen,datalen,curpos;
- void *data;
-} fiio_mem_handle;
-
-/* it is up to the user to create a fiio_mem_handle and init datalen and data
- * filelen will be pre-set to 0 by SaveToMem
- * curpos will be pre-set to 0 by SaveToMem and LoadFromMem
- * IMPORTANT: data should be set to NULL and datalen to 0,
- * unless the user wants to manually malloc a larger buffer
- */
-FIBITMAP *FreeImage_LoadFromMem(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags);
-BOOL FreeImage_SaveToMem(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
-
-void SetMemIO(FreeImageIO *io);
-unsigned __stdcall fiio_mem_ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
-unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
-int __stdcall fiio_mem_SeekProc(fi_handle handle, long offset, int origin);
-long __stdcall fiio_mem_TellProc(fi_handle handle);
-
-/*
- * this interface directly exports most of FreeImage routines
- * you can use them in your plugin after obtaining the interfasce using MS_IMG_GETINTERFACE
- */
-
-typedef struct _tagFI_interface {
-
- DWORD version;
-
- FIBITMAP *(DLL_CALLCONV *FI_Allocate)(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI__AllocateT)(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_Clone)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_Unload)(FIBITMAP *dib);
-
- // Load / Save routines -----------------------------------------------------
-
- FIBITMAP *(DLL_CALLCONV *FI_Load)(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_LoadU)(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_LoadFromHandle)(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_Save)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveU)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveToHandle)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
-
-// Memory I/O stream routines -----------------------------------------------
-
- FIMEMORY *(DLL_CALLCONV *FI_OpenMemory)(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
- void (DLL_CALLCONV *FI_CloseMemory)(FIMEMORY *stream);
- FIBITMAP *(DLL_CALLCONV *FI_LoadFromMemory)(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveToMemory)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
- long (DLL_CALLCONV *FI_TellMemory)(FIMEMORY *stream);
- BOOL (DLL_CALLCONV *FI_SeekMemory)(FIMEMORY *stream, long offset, int origin);
- BOOL (DLL_CALLCONV *FI_AcquireMemory)(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
- unsigned (DLL_CALLCONV *FI_ReadMemory)(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
- unsigned (DLL_CALLCONV *FI_WriteMemory)(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
- FIMULTIBITMAP *(DLL_CALLCONV *FI_LoadMultiBitmapFromMemory)(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
-
-// Plugin Interface ---------------------------------------------------------
-
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_RegisterLocalPlugin)(FI_InitProc proc_address, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_RegisterExternalPlugin)(const char *path, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
- int (DLL_CALLCONV *FI_GetFIFCount)(void);
- int (DLL_CALLCONV *FI_SetPluginEnabled)(FREE_IMAGE_FORMAT fif, BOOL enable);
- int (DLL_CALLCONV *FI_IsPluginEnabled)(FREE_IMAGE_FORMAT fif);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFormat)(const char *format);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromMime)(const char *mime);
- const char *(DLL_CALLCONV *FI_GetFormatFromFIF)(FREE_IMAGE_FORMAT fif);
- const char *(DLL_CALLCONV *FI_GetFIFExtensionList)(FREE_IMAGE_FORMAT fif);
- const char *(DLL_CALLCONV *FI_GetFIFDescription)(FREE_IMAGE_FORMAT fif);
- const char *(DLL_CALLCONV *FI_GetFIFRegExpr)(FREE_IMAGE_FORMAT fif);
- const char *(DLL_CALLCONV *FI_GetFIFMimeType)(FREE_IMAGE_FORMAT fif);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFilename)(const char *filename);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFilenameU)(const wchar_t *filename);
- BOOL (DLL_CALLCONV *FI_FIFSupportsReading)(FREE_IMAGE_FORMAT fif);
- BOOL (DLL_CALLCONV *FI_FIFSupportsWriting)(FREE_IMAGE_FORMAT fif);
- BOOL (DLL_CALLCONV *FI_FIFSupportsExportBPP)(FREE_IMAGE_FORMAT fif, int bpp);
- BOOL (DLL_CALLCONV *FI_FIFSupportsExportType)(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
- BOOL (DLL_CALLCONV *FI_FIFSupportsICCProfiles)(FREE_IMAGE_FORMAT fif);
-
-// Multipaging interface ----------------------------------------------------
-
- FIMULTIBITMAP *(DLL_CALLCONV *FI_OpenMultiBitmap)(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_CloseMultiBitmap)(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
- int (DLL_CALLCONV *FI_GetPageCount)(FIMULTIBITMAP *bitmap);
- void (DLL_CALLCONV *FI_AppendPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data);
- void (DLL_CALLCONV *FI_InsertPage)(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
- void (DLL_CALLCONV *FI_DeletePage)(FIMULTIBITMAP *bitmap, int page);
- FIBITMAP *(DLL_CALLCONV *FI_LockPage)(FIMULTIBITMAP *bitmap, int page);
- void (DLL_CALLCONV *FI_UnlockPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
- BOOL (DLL_CALLCONV *FI_MovePage)(FIMULTIBITMAP *bitmap, int target, int source);
- BOOL (DLL_CALLCONV *FI_GetLockedPageNumbers)(FIMULTIBITMAP *bitmap, int *pages, int *count);
-
-// Filetype request routines ------------------------------------------------
-
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileType)(const char *filename, int size FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileTypeU)(const wchar_t *filename, int size FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileTypeFromHandle)(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileTypeFromMemory)(FIMEMORY *stream, int size FI_DEFAULT(0));
-
-// FreeImage helper routines ------------------------- MISSING !!!! TODO
-
- BOOL (DLL_CALLCONV *FI_IsLittleEndian)(void);
- BOOL (DLL_CALLCONV *FI_LookupX11Color)(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
- BOOL (DLL_CALLCONV *FI_LookupSVGColor)(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
-
-// Image type request routine -----------------------------------------------
-
- FREE_IMAGE_TYPE (DLL_CALLCONV *FI_GetImageType)(FIBITMAP *dib);
-
-// Pixel access routines ----------------------------------------------------
-
- BYTE *(DLL_CALLCONV *FI_GetBits)(FIBITMAP *dib);
- BYTE *(DLL_CALLCONV *FI_GetScanLine)(FIBITMAP *dib, int scanline);
-
- BOOL (DLL_CALLCONV *FI_GetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
- BOOL (DLL_CALLCONV *FI_GetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
- BOOL (DLL_CALLCONV *FI_SetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
- BOOL (DLL_CALLCONV *FI_SetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
-
-// DIB info routines --------------------------------------------------------
-
- unsigned (DLL_CALLCONV *FI_GetColorsUsed)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetBPP)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetWidth)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetHeight)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetLine)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetPitch)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetDIBSize)(FIBITMAP *dib);
- RGBQUAD *(DLL_CALLCONV *FI_GetPalette)(FIBITMAP *dib);
-
- unsigned (DLL_CALLCONV *FI_GetDotsPerMeterX)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetDotsPerMeterY)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_SetDotsPerMeterX)(FIBITMAP *dib, unsigned res);
- void (DLL_CALLCONV *FI_SetDotsPerMeterY)(FIBITMAP *dib, unsigned res);
-
- BITMAPINFOHEADER *(DLL_CALLCONV *FI_GetInfoHeader)(FIBITMAP *dib);
- BITMAPINFO *(DLL_CALLCONV *FI_GetInfo)(FIBITMAP *dib);
- FREE_IMAGE_COLOR_TYPE (DLL_CALLCONV *FI_GetColorType)(FIBITMAP *dib);
-
- unsigned (DLL_CALLCONV *FI_GetRedMask)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetGreenMask)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetBlueMask)(FIBITMAP *dib);
-
- unsigned (DLL_CALLCONV *FI_GetTransparencyCount)(FIBITMAP *dib);
- BYTE *(DLL_CALLCONV *FI_GetTransparencyTable)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_SetTransparent)(FIBITMAP *dib, BOOL enabled);
- void (DLL_CALLCONV *FI_SetTransparencyTable)(FIBITMAP *dib, BYTE *table, int count);
- BOOL (DLL_CALLCONV *FI_IsTransparent)(FIBITMAP *dib);
-
- BOOL (DLL_CALLCONV *FI_HasBackgroundColor)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_GetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
- BOOL (DLL_CALLCONV *FI_SetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
-
- // ICC profile routines ------------------------------- MISSING !!! TODO
-
- FIICCPROFILE *(DLL_CALLCONV *FI_GetICCProfile)(FIBITMAP *dib);
- FIICCPROFILE *(DLL_CALLCONV *FI_CreateICCProfile)(FIBITMAP *dib, void *data, long size);
- void (DLL_CALLCONV *FI_DestroyICCProfile)(FIBITMAP *dib);
-
- // Line conversion routines ----------------------------MISSING !!! TODO
-
-// Smart conversion routines ------------------------------------------------
-
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo4Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo8Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToGreyscale)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo16Bits555)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo16Bits565)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo24Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo32Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ColorQuantize)(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
-
- FIBITMAP *(DLL_CALLCONV *FI_ColorQuantizeEx)(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize /*FI_DEFAULT(FIQ_WUQUANT) */, int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
-
- FIBITMAP *(DLL_CALLCONV *FI_Threshold)(FIBITMAP *dib, BYTE T);
- FIBITMAP *(DLL_CALLCONV *FI_Dither)(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertFromRawBits)(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
- void (DLL_CALLCONV *FI_ConvertToRawBits)(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
-
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToRGBF)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToStandardType)(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToType)(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
-
-// tone mapping operators
- FIBITMAP *(DLL_CALLCONV *FI_ToneMapping)(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_TmoDrago03)(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_TmoReinhard05)(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
-
-// ZLib interface -----------------------------------------------------------
-
- DWORD (DLL_CALLCONV *FI_ZLibCompress)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibUncompress)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibGZip)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibGUnzip)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibCRC32)(DWORD crc, BYTE *source, DWORD source_size);
-
-
-// --------------------------------------------------------------------------
-// Metadata routines --------------------------------------------------------
-// --------------------------------------------------------------------------
-
-// tag creation / destruction
- FITAG *(DLL_CALLCONV *FI_CreateTag)();
- void (DLL_CALLCONV *FI_DeleteTag)(FITAG *tag);
- FITAG *(DLL_CALLCONV *FI_CloneTag)(FITAG *tag);
-
-// tag getters and setters
- const char *(DLL_CALLCONV *FI_GetTagKey)(FITAG *tag);
- const char *(DLL_CALLCONV *FI_GetTagDescription)(FITAG *tag);
- WORD (DLL_CALLCONV *FI_GetTagID)(FITAG *tag);
- FREE_IMAGE_MDTYPE (DLL_CALLCONV *FI_GetTagType)(FITAG *tag);
- DWORD (DLL_CALLCONV *FI_GetTagCount)(FITAG *tag);
- DWORD (DLL_CALLCONV *FI_GetTagLength)(FITAG *tag);
- const void *(DLL_CALLCONV *FI_GetTagValue)(FITAG *tag);
-
- BOOL (DLL_CALLCONV *FI_SetTagKey)(FITAG *tag, const char *key);
- BOOL (DLL_CALLCONV *FI_SetTagDescription)(FITAG *tag, const char *description);
- BOOL (DLL_CALLCONV *FI_SetTagID)(FITAG *tag, WORD id);
- BOOL (DLL_CALLCONV *FI_SetTagType)(FITAG *tag, FREE_IMAGE_MDTYPE type);
- BOOL (DLL_CALLCONV *FI_SetTagCount)(FITAG *tag, DWORD count);
- BOOL (DLL_CALLCONV *FI_SetTagLength)(FITAG *tag, DWORD length);
- BOOL (DLL_CALLCONV *FI_SetTagValue)(FITAG *tag, const void *value);
-
-// iterator
- FIMETADATA *(DLL_CALLCONV *FI_FindFirstMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
- BOOL (DLL_CALLCONV *FI_FindNextMetadata)(FIMETADATA *mdhandle, FITAG **tag);
- void (DLL_CALLCONV *FI_FindCloseMetadata)(FIMETADATA *mdhandle);
-
-// metadata setter and getter
- BOOL (DLL_CALLCONV *FI_SetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);
- BOOL (DLL_CALLCONV *FI_GetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);
-
-// helpers
- unsigned (DLL_CALLCONV *FI_GetMetadataCount)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
-
-// tag to C string conversion
- const char *(DLL_CALLCONV *FI_TagToString)(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));
-
-
-// --------------------------------------------------------------------------
-// Image manipulation toolkit -----------------------------------------------
-// --------------------------------------------------------------------------
-
-// rotation and flipping
- FIBITMAP *(DLL_CALLCONV *FI_RotateClassic)(FIBITMAP *dib, double angle);
- FIBITMAP *(DLL_CALLCONV *FI_RotateEx)(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask);
- BOOL (DLL_CALLCONV *FI_FlipHorizontal)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_FlipVertical)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_JPEGTransform)(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
-
-// upsampling / downsampling
- FIBITMAP *(DLL_CALLCONV *FI_Rescale)(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter);
- FIBITMAP *(DLL_CALLCONV *FI_MakeThumbnail)(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
-
-// color manipulation routines (point operations)
- BOOL (DLL_CALLCONV *FI_AdjustCurve)(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_AdjustGamma)(FIBITMAP *dib, double gamma);
- BOOL (DLL_CALLCONV *FI_AdjustBrightness)(FIBITMAP *dib, double percentage);
- BOOL (DLL_CALLCONV *FI_AdjustContrast)(FIBITMAP *dib, double percentage);
- BOOL (DLL_CALLCONV *FI_Invert)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_GetHistogram)(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel);
-
-// channel processing routines
- FIBITMAP *(DLL_CALLCONV *FI_GetChannel)(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_SetChannel)(FIBITMAP *dib, FIBITMAP *dib8, FREE_IMAGE_COLOR_CHANNEL channel);
- FIBITMAP *(DLL_CALLCONV *FI_GetComplexChannel)(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_SetComplexChannel)(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
-
-// copy / paste / composite routines
- FIBITMAP *(DLL_CALLCONV *FI_Copy)(FIBITMAP *dib, int left, int top, int right, int bottom);
- BOOL (DLL_CALLCONV *FI_Paste)(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
- FIBITMAP *(DLL_CALLCONV *FI_Composite)(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
- BOOL (DLL_CALLCONV *FI_JPEGCrop)(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
-
-// own functions
-
- // memory I/O
- FIBITMAP *(*FI_LoadFromMem)(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags);
- BOOL (*FI_SaveToMem)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
-
- // helpers
- FIBITMAP *(*FI_CreateDIBFromHBITMAP)(HBITMAP hBmp);
- HBITMAP (*FI_CreateHBITMAPFromDIB)(FIBITMAP *dib);
- BOOL (*FI_Premultiply)(HBITMAP hBmp); // premultiplies alpha channel for usage with AlphaBlend()
- // original HBITMAP stays valid and must be 32bit RGBA
- int (*FI_BmpFilterResizeBitmap)(WPARAM wParam,LPARAM lParam); // more generic resizer for avatar images
- void (*FI_CorrectBitmap32Alpha)(HBITMAP hBitmap, BOOL force); // corrects broken images (when all alpha values are 0)
-
- BYTE reserved[200]; // future usage
-} FI_INTERFACE;
-
-/*
- * image services
- *
- * only basic functionality is wrapped around Miranda services, because otherwise we would get a huge
- * load of services with complex parameter marshalling requirements.
- */
-
-// get the interface version number
-// wParam = lParam = 0
-// returns FI_IF_VERSION
-
-#define MS_IMG_GETIFVERSION "IMG/GetVersion"
-
-// obtain the full FreeImage interface from the library. This interface provides full access to freeimage
-// internal functions, thus enabling devs to fully utilize the FreeImage API. Only popular functions will
-// be exported as miranda services.
-// wParam = (DWORD)version Number // the caller MUST provide the desired version number
-// lParam = **FI_INTERFACE
-// returns S_OK on success, any other value indicates a problem.
-// the interface is populated during the _DllMain() handler, so you can assume it is ready when Miranda
-// calls the Load() handler of your plugin and you can return 1 in your Load() to disable your plugin when
-// it depends on the freeimage interface and the freeimage plugin is missing
-//
-// example:
-//
-// FI_INTERFACE *fii = NULL;
-//
-// result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
-//
-// if(result != S_OK)
-// failed, in this case, fei will be NULL and your plugin will crash when using the interface,
-// so ALWAYS check it
-
-#define MS_IMG_GETINTERFACE "IMG/GetInterface"
-
-
-#define IMGL_RETURNDIB 1 // will NOT return a HBITMAP but a FIBITMAP * instead (useful, if you
- // want to do further image manipulations before converting to a Win32 bitmap
- // caller MUST then free the FIBITMAP * using fii->FI_Unload() or MS_IMG_UNLOAD (see below)
-
-#define IMGL_WCHAR 2 // filename is wchar_t
-
-#if defined(UNICODE) || defined(_UNICODE)
- #define IMGL_TCHAR IMGL_WCHAR
-#else
- #define IMGL_TCHAR 0
-#endif
-
-// load an image from disk
-// wParam = full path and filename to the image
-// lParam = IMGL_* flags
-// returns a valid HBITMAP or 0 if image cannot be loaded
-// if IMGL_RETURNDIB is set, it returns a pointer to a freeimage bitmap (FIBITMAP *)
-
-#define MS_IMG_LOAD "IMG/Load"
-
-/*
- * control structure for loading images from memory buffers (e.g. network buffers, memory mapped files).
- */
-
-typedef struct _tagIMGSRVC_MEMIO {
- long iLen; // length of the buffer
- void *pBuf; // the buffer itself (you are responsible for allocating and free'ing it)
- FREE_IMAGE_FORMAT fif; // the FIF_* image format constant. Make sure to provide the right one.
- UINT flags; // flags to pass to FreeImage_LoadFromMem() (see freeimage docs)
-} IMGSRVC_MEMIO;
-
-// load an image from a memory buffer
-// wParam = IMGSRVC_MEMIO *
-// lParam = flags (see IMG/Load), valid are IMGL_RETURNDIB
-// you must popupate iLen (buffer length) and pBuf (pointer to memory buffer)
-// you must also specify the format in IMGSRVC_MEMIO.fif using one of the FIF_* constants defined in m_freeimage.h
-
-#define MS_IMG_LOADFROMMEM "IMG/LoadFromMem"
-
-// flags for IMGSRVC_INFO.dwMask
-
-#define IMGI_FBITMAP 1 // the dib member is valid
-#define IMGI_HBITMAP 2 // the hbm member is valid
-
-/*
- * generic structure for various img functions
- * you must populate the fields as required, set the mask bits to indicate which member is valid
- */
-
-typedef struct _tagIMGSRVC_INFO {
- DWORD cbSize;
- union {
- char *szName;
- wchar_t *wszName;
- };
- HBITMAP hbm;
- FIBITMAP *dib;
- DWORD dwMask;
- FREE_IMAGE_FORMAT fif;
-} IMGSRVC_INFO;
-
-// save image to disk
-// wParam = IMGSRVC_INFO * (szName/wszName, hbm OR dib, cbSize, dwMask mandatory. fif optional, if FIF_UNKNOWN is given
-// it will be determined from the filename).
-// lParam = IMG_* flags (IMGL_WCHAR is the only valid - filename will be assumed to be wchar_t and wszName must be used)
-// set IMGSRVC_INFO.dwMask to indicate whether the HBITMAP of FIBITMAP member is valid
-
-#define MS_IMG_SAVE "IMG/Save"
-
-// unload a FIFBITMAP
-// wParam = FIFBITMAP *
-// lParam = 0;
-// this service is useful when you have loaded a bitmap with IMGL_RETURNDIB in which case you do not get
-// a HBITMAP but instead a FBITMAP * which describes the freeimage-internal representation of a bitmap.
-
-#define MS_IMG_UNLOAD "IMG/Unload"
-
-/*
- * resizer from loadavatars moved to image service plugin
-*/
-
-#define RESIZEBITMAP_STRETCH 0 // Distort bitmap to size in (max_width, max_height)
-#define RESIZEBITMAP_KEEP_PROPORTIONS 1 // Keep bitmap proportions (probabily only one of the
- // max_width/max_height will be respected, and the other will be
- // smaller)
-#define RESIZEBITMAP_CROP 2 // Keep bitmap proportions but crop it to fix exactly in (max_width, max_height)
- // Some image info outside will be lost
-#define RESIZEBITMAP_MAKE_SQUARE 3 // Image will be allways square. Image will be croped and the size
- // returned will be min(max_width, max_height)
-
-#define RESIZEBITMAP_FLAG_DONT_GROW 0x1000 // If set, the image will not grow. Else, it will grow to fit the max width/height
-
-typedef struct {
- size_t size; // sizeof(ResizeBitmap);
-
- HBITMAP hBmp;
-
- int max_width;
- int max_height;
-
- int fit; // One of: RESIZEBITMAP_*
-} ResizeBitmap;
-
-// Returns a copy of the bitmap with the size especified or the original bitmap if nothing has to be changed
-// wParam = ResizeBitmap *
-// lParam = NULL
-// after return, compare the returned HBITMAP with the original. You are responsible for calling DestroyObject()
-// on the original HBITMAP
-
-#define MS_IMG_RESIZE "IMG/ResizeBitmap"
-
-
-/*
- * format conversion helpers
- *
- * these helper macros allow converting HBITMAP to FIBITMAP * format and vice vera. In any case,
- * the caller is responsible for freeing or deleting the original object.
- * These macros wrap around the FI_CreateHBITMAPFromDib() and FI_CreateDIBFromHBITMAP() interface
- * functions.
- */
-
-//#define FI_HBM2DIB(x) (FI_CreateDIBFromHBITMAP((x)))
-//#define FI_DIB2HBM(x) (FI_CreateHBITMAPFromDIB((x)))
-
-#endif // __M_IMGSRVC_H
diff --git a/Plugins/avatarhistory/sdk/m_metacontacts.h b/Plugins/avatarhistory/sdk/m_metacontacts.h index 1da12b9..9f348bd 100644 --- a/Plugins/avatarhistory/sdk/m_metacontacts.h +++ b/Plugins/avatarhistory/sdk/m_metacontacts.h @@ -23,6 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_METACONTACTS_H__
#define M_METACONTACTS_H__ 1
+#ifndef MIID_METACONTACTS
+#define MIID_METACONTACTS {0xc0325019, 0xc1a7, 0x40f5, { 0x83, 0x65, 0x4f, 0x46, 0xbe, 0x21, 0x86, 0x3e}}
+#endif
+
//get the handle for a contact's parent metacontact
//wParam=(HANDLE)hSubContact
//lParam=0
diff --git a/Plugins/avatarhistory/sdk/m_updater.h b/Plugins/avatarhistory/sdk/m_updater.h index 371b743..488d372 100644 --- a/Plugins/avatarhistory/sdk/m_updater.h +++ b/Plugins/avatarhistory/sdk/m_updater.h @@ -63,6 +63,10 @@ __inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *bu return CreateVersionString(pluginInfo->version, buf);
}
+__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
+ return CreateVersionString(pluginInfo->version, buf);
+}
+
// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
|