diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-18 10:50:20 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-18 10:50:20 +0000 |
commit | a85e238092f480e9de278ae507af710633fa2824 (patch) | |
tree | 6736cf3074c5e4e7da309e932074de041bc1ba96 /plugins | |
parent | c58de69f2936e24d2fa13eb415de963a4d7ca71f (diff) |
moving API to ExternalAPI folder
git-svn-id: http://svn.miranda-ng.org/main/trunk@34 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
55 files changed, 46 insertions, 8762 deletions
diff --git a/plugins/Scriver/chat/m_uninstaller.h b/plugins/Scriver/chat/m_uninstaller.h deleted file mode 100644 index 15cd268452..0000000000 --- a/plugins/Scriver/chat/m_uninstaller.h +++ /dev/null @@ -1,700 +0,0 @@ -/*
-
- PluginUninstaller 1.1.2.1 for Miranda IM 0.3.3a and +
- ------------------------------------------------------------------------
- Developers - C/C++ Header File
-
- Plugin Info: ----------------------------
- | Version: 1.1.2.1
- | Filename: uninstaller.dll
- | Author: H. Herkenrath (hrathh@users.sourceforge.net)
- | Description: Extends the plugin options and offers the possibility
- | to directly remove plugins and delete all associated
- | settings and files.
-
- Contents: -------------------------------
- | > General Info:
- | - Uninstall Example/Template
- | - Changing displayed icon
- | - Changing displayed docs
- | - Message boxes on uninstall
- | - Service Accesibility
- | - Including this file
- |
- | > Structs:
- | - Uninstall Params (PLUGINUNINSTALLPARAMS)
- |
- | > Helpers:
- | - Macro: Run service while uninstalling (PUICallService)
- | - Function: Remove some files in directory (PUIRemoveFilesInDirectory)
- |
- | > Events:
- | - Allow to uninstall a plugin (ME_PLUGINUNINSTALLER_OKTOUNINSTALL)
- | - Plugin gets uninstalled (ME_PLUGINUNINSTALLER_UNINSTALL)
- |
- | > Services:
- | - Remove database module (MS_PLUGINUNINSTALLER_REMOVEDBMODULE)
- | - Remove a setting globally (MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY)
- | - Remove skinned sound (MS_PLUGINUNINSTALLER_REMOVESKINSOUND)
- | - Uninstall a plugin (MS_PLUGINUNISTALLER_UNISTALLPLUGIN)
- | - Getting handles (MS_PLUGINUNINSTALLER_GETHANDLE)
- |
-
-
- This file is only thought for plugin developers.
- If you only want to use "PluginUninstaller" and don't want to develop a plugin
- or something with it you don't need this file.
-
- If there are any problems or bugs with or in this file or something else
- please mail me. My e-mail address is: hrathh@users.sourceforge.net
- For more documentation you can use this address, too. :-)
-
- If you have any whishes on some plugin uninstalling for your
- plugin you can mail me, too. :-)
-
-*/
-#ifndef M_UNINSTALLER_H
-#define M_UNINSTALLER_H
-
-#ifndef CallService
- #pragma message("Mistake Alert!: "m_uninstaller.h" needs to be included after "newpluginapi.h"!\n The following errors are resulting of this mistake.\n")
-#endif
-
-
-// | General Info
-// -----------------------------
-
-// Uninstall Example/Template
-// ---------------------------
-// Making your plugin uninstallable is very easy.
-// Just add the following "Uninstall" function near the "Unload" function
-// in your plugin.
-// A template plugin is available in the source code package.
-
-// Old:
-// int __declspec(dllexport) Uninstall(BOOL bIsMirandaRunning, BOOL bDoDeleteSettings, char* pszPluginPath);
-
-// New:
-//int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
-//{
- // Available Variables:
- // -----------------------------
- // ppup->bIsMirandaRunning:
- // Contains if Miranda is running
- // (Currently this is always TRUE).
-
- // ppup->bDoDeleteSettings:
- // Contains if the users selected
- // that he wants all settings be deleted.
-
- // ppup->pszPluginsPath:
- // Contains the plugins directory name.
-
-
- // Notes:
- // -----------------------------
-
- // Run before "Unload" function:
- // -> IMPORTANT: Be careful not to write to the database or to files in "Unload" again!!!
- // -> Perhaps create a global BOOL variable which is set to TRUE when your plugin gets uninstalled
- // or check of a database setting "IsInstalled" in Unload() or sth. like that
-
- // All Miranda is still loaded
-
- // Here you can do:
- // - Delete settings group in database
- // - Delete registry items
- // - Delete ini-files and other settings files
- // - Delete other files
-
- // Your plugin dll gets automatically deleted
-
- // Services to remove are offered:
- // MS_PLUGINUNINSTALLER_REMOVEDBMODULE
- // MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
- // MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-
- // Getting other useful paths:
- // -----------------------------
-
- // System directory:
-
- //char szSysPath[MAX_PATH];
- //GetSystemDirectory(szSysPath, MAX_PATH);
-
-
- // Windows directory:
-
- //char szWinPath[MAX_PATH];
- //GetWindowsDirectory(szWinPath, MAX_PATH);
-
-
- // Other directories:
-
- // char szPath[MAX_PATH];
- // SHGetSpecialFolderPath(NULL, szPath, CSIDL_* , FALSE);
-
- // Some available dirs:
- // CSIDL_APPDATA CSIDL_SENDTO CSIDL_FAVORITES
- // CSIDL_STARTUP CSIDL_PROFILE CSIDL_DESKTOPDIRECTORY
-
-
- // Delete Files
- //const char* apszFiles[] = {"MyPlugin_Readme.txt", "MyPlugin_License.txt", "MyPlugin_Developer.txt", "MyPlugin_Translation.txt"};
- //PUIRemoveFilesInPath(ppup->pszPluginsPath, apszFiles);
-
- // Delete Settings
- //if(ppup->bDoDeleteSettings == TRUE)
- //{
- //if (ppup->bIsMirandaRunning == TRUE) // Check if it is possible to access services
- //{
- // Remove plugin's module
- //PUIRemoveDbModule("MyPlugin");
-
- // Remove plugin's sounds
- //PUIRemoveSkinSound("MySoundSetting1");
- //PUIRemoveSkinSound("MySoundSetting2");
- //}
- //}
-
- // Remember:
- // Do not forget to remove your (eventually) created registry items here, too.
-
-
- // The plugin's dll file gets deleted after returning.
-
- // Remember:
- // If your DLL file is additionally in use by another application (eg. Windows)
- // you need to free the DLL *here* completely. Otherwise it can't be deleted.
-
-// return 0;
-//}
-
-
-
-// Changing displayed icon
-// ---------------------------
-// The icon that gets displayed on the options page is always the "first"
-// icon in your DLL file.
-// An icon in your DLL file is the first icon when it has the lowest recource ID.
-// If you would like to have an other icon shown in the options please change your
-// icon resource IDs so that the icon you would like to have has the lowest one.
-// For example if you use MS Visual C++, open "resource.h" and change the resource define
-// of your prefered icon to the lowest icon number.
-
-
-// Changing displayed docs
-// ---------------------------
-// The items "License" and "More Information" on the plugin details page
-// are created when the a license and/or a readme file for the plugin exists.
-// The files get detected automatically and need a special name
-// so that they get detected.
-// The text files need to be either placed in the "Plugins" directory or
-// in the "Docs" directory. Whereof the last one is the better one :-)
-//
-// For the license file the following file name formatings are possible:
-// PluginName-License.txt (I personally think that this is the best naming solution... :-) )
-// PluginName_License.txt,
-//
-// For the readme file the following ones are possible:
-// PluginName-Readme.txt (Again...I like this one :-D ),
-// PluginName_Readme.txt,
-
-// Message boxes on uninstall
-// ---------------------------
-// If you would like to ask the user for something to remove/uninstall
-// please hook the event ME_PLUGINUNINSTALLER_UNINSTALL and show your
-// message box there. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-
-// Service Accessibility
-// ---------------------------
-// Remember that you only can use these functions after the event ME_SYSTEM_MODULESLOADED
-// or later because "PluginUninstaller" needs to be loaded first.
-// Normally you only use them in your "UninstallEx" function.
-//
-// IMPORTANT!:
-// Please make sure that you always use the macro PUICallService
-// in the "UninstallEx" function instead of the CallService function.
-
-
-// Including this file
-// ---------------------------
-// To use some of the uninstalling functionality you have to include this file
-// into your project.
-//
-// IMPORTANT!:
-// Please make sure that you include the file "newpluginapi.h" before this one.
-// If this isn't the case there may some compile errors come up.
-
- // -> Example:
- // If your plugin is in the directory "Plugins/MyPlugin/" and
- // this include file is in the directory "Plugins/PluginUninstaller"
- // you can use the following:
-
- //#include "../PluginUninstaller/m_uninstaller.h"
-
- // If your plugin is in an directory that is different to that one just
- // change the include path to the one you want.
-
-
-
-
-
-// | Structs
-// -----------------------------
-
-// ---------------------------------------------
-// -- Struct: Uninstall Params -----------------
-// ---------------------------------------------
-
-// Struct: PLUGINUNINSTALLPARAMS
-// (Gets passed to "UninstallEx" function)
-
-typedef int (*HELPERPROC)(const char*, WPARAM, LPARAM); // Used internally (for pHelperProcAddress)
-
-typedef struct {
- BOOL bIsMirandaRunning; // Is TRUE when Miranda is loaded and services are available (Please use PUICallService instead of CallService)
- BOOL bDoDeleteSettings; // Is TRUE when user wants to delete settings (If this is FALSE, please only delete your files)
- char* pszPluginsPath; // Contains the plugin directory path
- char* pszDocsPath; // Contains the document directory for plugins documentation (Added in version 1.1.1.0)
- char* pszIconsPath; // Contains the icon directory for icon dlls (Added in version 1.1.2.0)
- HELPERPROC pHelperProcAddress; // Used internally (Contains proc address for PUICallService)
-} PLUGINUNINSTALLPARAMS;
-
-
-
-
-
-// | Helper
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Macro: Run service while uninstalling ----
-// ---------------------------------------------
-
-// Macro: PUICallService
-
-#define PUICallService(service, wParam, lParam) (ppup->pHelperProcAddress) (service, wParam, lParam);
-
-// Description:
-// -------------
-// This service provides the possibility to call a Miranda
-// service in the "UninstallEx" function.
-// Important!: Use this macro always instead of "CallService",
-// because else a crash occurs when the plugin was decativated
-// and gets uninstalled
-
-// Parameters:
-// -------------
-// Same parameters as CallService of Miranda Core.
-
-// Return Values:
-// --------------
-// Return values are the same as the CallService function of Miranda Core.
-// Additionaly returns CALLSERVICE_NOTFOUND if Miranda is not loaded
-// which means the services are not accessable.
-
-
- // Example:
- // ----------------------------------
-
- //if ( (bIsMirandaRunning == TRUE) && (bDoDeleteSettings == TRUE) )
- //{
- // Remove plugin's module
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)"MyPlugin", 0);
- //}
-
-
-
-
-// ---------------------------------------------
-// -- Function: Remove some files in directory -
-// ---------------------------------------------
-
-// Function: PUIRemoveFilesInDirectory
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[]);
-
-// Description:
-// -------------
-// This helper provides the possibility to easily
-// remove specified files in a specified directory.
-
-// Note: The last version of this helper (PUIRemoveFilesInPath)
-// did not work correctly.
-// Please do now always append a NULL slot to the end of your array.
-
-// Parameters:
-// -------------
-// char* pszPath = Path to the files in array
-// const LPCSTR apszFiles[] = NULL-terminated array of files to be deleted.
-
-// Return Values:
-// --------------
-// Returns TRUE if the files could be deleted.
-// FALSE if the files could not be deleted or did not exist.
-
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[])
-{
- char szFile[MAX_PATH];
- BOOL bReturn = FALSE;
- int iFile = 0;
-
- while (apszFiles[iFile] != NULL)
- {
- strncpy(szFile, pszPath, SIZEOF(szFile));
- strncat(szFile, apszFiles[iFile], SIZEOF(szFile)-strlen(szFile));
-
- if ((BOOL)DeleteFile(szFile) == TRUE) bReturn = TRUE;
- iFile++;
- }
-
- return bReturn;
-}
-
- // Example:
- // ----------------------------------
-
- //const char* apszFiles[] = {"File1.txt", "File2.txt", "File3.txt", NULL};
- //PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
-
-
-
-
-// | Events
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Event: Allow to uninstall a plugin -------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_OKTOUNINSTALL
-
-#define ME_PLUGINUNINSTALLER_OKTOUNINSTALL "PluginUninstaller/OkToUninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the "Remove Plugin" button to be disabled.
-
-
-
-// ---------------------------------------------
-// -- Event: Plugin gets uninstalled -----------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_UNINSTALL
-
-#define ME_PLUGINUNINSTALLER_UNINSTALL "PluginUninstaller/Uninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the uninstall process to be canceled.
-
-// Notice:
-// Hook this event if you would like to ask the user for something to remove/uninstall
-// and show your message box on this event. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-// Other plugins can use this event to be noticed that another plugin isn't installed anylonger.
-
-
-
-
-// | Services
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Service: Remove database module ----------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBMODULE
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBMODULE "PluginUninstaller/RemoveDbModule"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all database modules
-// associated to your plugin.
-// The specified database module will be removed in all contacts
-// including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule // Pointer to a string containd module name. Can't be NULL
-// lParam = (const char*)apszIgnoreSettings // NULL terminated array of strings. Can be 0 if no settings should be ignored.
- // See example 3 for more details
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the module was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbModule(pszModule) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)pszModule, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbModule("MyPlugin");
-
-
- // Example 2:
- // ----------------------------------
-
- //char szModule[] = "MyModule";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, 0);
-
-
- // Example 3:
- // ----------------------------------
-
- // This deletes all settings in the specified module exept
- // the specified settings: "Setting1",..."Setting4"
-
- // char szModule[] = "MyModule";
- // const char* apszIgnoreSettings[] = {"Setting1", "Setting2", "Setting3", "Setting4", NULL};
- // PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, (LPARAM)&apszIgnoreSettings);
-
-
-
-// ---------------------------------------------
-// -- Service: Remove a setting globally -------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY "PluginUninstaller/RemoveDbSettingGlobally"
-
-// Description:
-// -------------
-// This service provides the possibility to delete a specific
-// setting in database in all contacts including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule
-// lParam = (char*)pszSetting
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the setting was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbSettingGlobally(pszModule, pszSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)pszModule, (LPARAM)pszSetting);
-
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbSettingGlobally("MyPlugin", "MySetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szModule[] = "MyPlugin";
- //szSetting[] = "MySetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)szModule, (LPARAM)szSetting);
-
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Remove skinned sound ------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-#define MS_PLUGINUNINSTALLER_REMOVESKINSOUND "PluginUninstaller/RemoveSkinSound"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all your sound settings
-// associated to your plugin.
-// The specified sound will be be removed.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszSoundSetting
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the sound was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveSkinSound(pszSoundSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVESKINSOUND, (WPARAM)pszSoundSetting, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveSkinSound("MySoundSetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szSoundModule[] = "MySoundSetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szSoundSetting, 0);
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Uninstall a plugin --------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN
-
-#define MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN "PluginUninstaller/UninstallPlugin"
-
-// Description:
-// -------------
-// This service marks a plugin to be uninstalled at next restart of Miranda IM.
-// It uses the default value for "Delete all settings".
-// You can use this service for example when you want that your sub-plugin gets
-// also removed when your main-plugin is uninstalled.
-// Note: This service is not needed for the normal uninstalling functionality.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszPluginName // do not translate this!
-// lParam = (char*)pszPluginFile // without path, only file name!
-
-// Return Values:
-// --------------
-// Returns always 0.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-int __inline PUIUninstallPlugin(char* pszPluginName, char* pszPluginFile)
-{
- return CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)pszPluginName, (LPARAM)pszPluginFile);
-}
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIUninstallPlugin("PluginName", "plugin.dll");
-
-
- // Example 2:
- // ----------------------------------
-
- // hInst => Handle of a specific (your?) plugin
- // char szPluginName[] = "YourPluginName";
-
- //char* pFileName;
- //char szPath[MAX_PATH];
-
- //GetModuleFileName(hInst, szPath, sizeof(szPath));
- //pFileName = strrchr(szPath, '\\');
- //pFileName = pFileName+1; // Pointer arithmetic
-
- //CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)szPluginName, (LPARAM)pFileName);
-
-
-
-
-// ---------------------------------------------
-// -- Service: Getting handles -----------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_GETHANDLE
-
-#define MS_PLUGINUNINSTALLER_GETHANDLE "PluginUninstaller/GetHandle"
-
-// Description:
-// -------------
-// This service gets a specified window/instance handle.
-
-// Note: This service must not be used in "UninstallEx" function.
-// It is mainly thought for being used in ME_PLUGINUNINSTALLER_UNINSTALL event
-// to give out a MessageBox or something like that.
-
-// Parameters:
-// -------------
-// wParam = UINT uHandleType;
-// lParam = 0
-
-// Possible values for wParam:
-#define PUIHT_HINST_PLUGIN_INSTANCE 0 // HINSTANCE of the PluginUninstaller plugin
-#define PUIHT_HWND_PLUGIN_OPTIONS 1 // HWND of the plugin options dialog (if it is loaded; else NULL)
-
-// Return Values:
-// --------------
-// Returns the specified handle value.
-// If no handle type is specified it returns NULL.
-// The handle doesn't need to be destroyed.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-HANDLE __inline PUIGetHandle(UINT uHandleType)
-{
- return (HANDLE)CallService(MS_PLUGINUNINSTALLER_GETHANDLE, uHandleType, 0);
-}
-
-#endif
-
-
- // Example
- // ----------------------------------
-
- //HWND hwndDlg;
- //hwndDlg = (HWND)PUIGetHandle(PUIHT_HWND_PLUGIN_OPTIONS);
-
-
-
-
-
-#endif // M_UNINSTALLER_H
diff --git a/plugins/Scriver/m_ieview.h b/plugins/Scriver/m_ieview.h deleted file mode 100644 index e8fa237900..0000000000 --- a/plugins/Scriver/m_ieview.h +++ /dev/null @@ -1,194 +0,0 @@ -/*
-
-IEView Plugin for Miranda IM
-Copyright (C) 2005 Piotr Piastucki
-
-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.
-
-*/
-
-#ifndef M_IEVIEW_INCLUDED
-#define M_IEVIEW_INCLUDED
-
-#define MS_IEVIEW_WINDOW "IEVIEW/NewWindow"
-#define MS_IEVIEW_EVENT "IEVIEW/Event"
-#define MS_IEVIEW_NAVIGATE "IEVIEW/Navigate"
-
-#define ME_IEVIEW_OPTIONSCHANGED "IEVIEW/OptionsChanged"
-
-/* IEView window commands */
-#define IEW_CREATE 1 // create new window (control)
-#define IEW_DESTROY 2 // destroy control
-#define IEW_SETPOS 3 // set window position and size
-#define IEW_SCROLLBOTTOM 4 // scroll text to bottom
-
-/* IEView window type/mode */
-#define IEWM_TABSRMM 1 // TabSRMM-compatible HTML builder
-#define IEWM_SCRIVER 3 // Scriver-compatible HTML builder
-#define IEWM_MUCC 4 // MUCC group chats GUI
-#define IEWM_CHAT 5 // chat.dll group chats GUI
-#define IEWM_HISTORY 6 // history viewer
-#define IEWM_BROWSER 256 // empty browser window
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEW_* values
- DWORD dwMode; // compatibility mode - one of IEWM_* values
- DWORD dwFlags; // flags, one of IEWF_* values
- HWND parent; // parent window HWND
- HWND hwnd; // IEW_CREATE returns WebBrowser control's HWND here
- int x; // IE control horizontal position
- int y; // IE control vertical position
- int cx; // IE control horizontal size
- int cy; // IE control vertical size
-
-} IEVIEWWINDOW;
-
-#define IEEDF_UNICODE 0x00000001 // if set pszText is a pointer to wchar_t string instead of char string
-#define IEEDF_UNICODE_TEXT 0x00000001 // if set pszText is a pointer to wchar_t string instead of char string
-#define IEEDF_UNICODE_NICK 0x00000002 // if set pszNick is a pointer to wchar_t string instead of char string
-#define IEEDF_UNICODE_TEXT2 0x00000004 // if set pszText2 is a pointer to wchar_t string instead of char string
-
-/* The following flags are valid only for message events (IEED_EVENT_MESSAGE) */
-#define IEEDF_FORMAT_FONT 0x00000100 // if set pszFont (font name) is valid and should be used
-#define IEEDF_FORMAT_SIZE 0x00000200 // if set fontSize is valid and should be used
-#define IEEDF_FORMAT_COLOR 0x00000400 // if set color is valid and should be used
-#define IEEDF_FORMAT_STYLE 0x00000800 // if set fontSize is valid and should be used
-
-#define IEEDF_READ 0x00001000 // if set
-#define IEEDF_SENT 0x00002000 // if set
-#define IEEDF_RTL 0x00004000 // if set
-
-#define IEED_EVENT_MESSAGE 0x0001 // message
-#define IEED_EVENT_STATUSCHANGE 0x0002 // status change
-#define IEED_EVENT_FILE 0x0003 // file
-#define IEED_EVENT_URL 0x0004 // url
-#define IEED_EVENT_ERRMSG 0x0005 // error message
-#define IEED_EVENT_SYSTEM 0x0006 // system event
-
-#define IEED_MUCC_EVENT_MESSAGE 0x0001 // message
-#define IEED_MUCC_EVENT_TOPIC 0x0002 // topic change
-#define IEED_MUCC_EVENT_JOINED 0x0003 // user joined
-#define IEED_MUCC_EVENT_LEFT 0x0004 // user left
-#define IEED_MUCC_EVENT_ERROR 0x0005 // error
-
-/* MUCC-related dwData bit flags */
-#define IEEDD_MUCC_SHOW_NICK 0x00000001
-#define IEEDD_MUCC_MSG_ON_NEW_LINE 0x00000002
-#define IEEDD_MUCC_SHOW_DATE 0x00000010
-#define IEEDD_MUCC_SHOW_TIME 0x00000020
-#define IEEDD_MUCC_SECONDS 0x00000040
-#define IEEDD_MUCC_LONG_DATE 0x00000080
-
-#define IEED_GC_EVENT_HIGHLIGHT 0x8000
-#define IEED_GC_EVENT_MESSAGE 0x0001
-#define IEED_GC_EVENT_TOPIC 0x0002
-#define IEED_GC_EVENT_JOIN 0x0003
-#define IEED_GC_EVENT_PART 0x0004
-#define IEED_GC_EVENT_QUIT 0x0006
-#define IEED_GC_EVENT_NICK 0x0007
-#define IEED_GC_EVENT_ACTION 0x0008
-#define IEED_GC_EVENT_KICK 0x0009
-#define IEED_GC_EVENT_NOTICE 0x000A
-#define IEED_GC_EVENT_INFORMATION 0x000B
-#define IEED_GC_EVENT_ADDSTATUS 0x000C
-#define IEED_GC_EVENT_REMOVESTATUS 0x000D
-
-/* GC-related dwData bit flags */
-#define IEEDD_GC_SHOW_NICK 0x00000001
-#define IEEDD_GC_SHOW_TIME 0x00000002
-#define IEEDD_GC_SHOW_ICON 0x00000004
-#define IEEDD_GC_MSG_ON_NEW_LINE 0x00001000
-
-#define IE_FONT_BOLD 0x000100 // Bold font flag
-#define IE_FONT_ITALIC 0x000200 // Italic font flag
-#define IE_FONT_UNDERLINE 0x000400 // Underlined font flags
-
-typedef struct tagIEVIEWEVENTDATA {
- int cbSize;
- int iType; // Event type, one of MUCC_EVENT_* values
- DWORD dwFlags; // Event flags - IEEF_*
- const char *fontName; // Text font name
- int fontSize; // Text font size (in pixels)
- int fontStyle; // Text font style (combination of IE_FONT_* flags)
- COLORREF color; // Text color
- union {
- const TCHAR *ptszNick; // Nick, usage depends on type of event
- const char *pszNick; // Nick - ANSII
- const wchar_t *pszNickW; // Nick - Unicode
- };
- union {
- const TCHAR *ptszText; // Text, usage depends on type of event
- const char *pszText; // Text - ANSII
- const wchar_t *pszTextW; // Text - Unicode
- };
- DWORD dwData; // DWORD data e.g. status see IEEDD_* values
- BOOL bIsMe; // TRUE if the event is related to the user
- DWORD time; // Time of the event
- struct tagIEVIEWEVENTDATA *next;
- union {
- const TCHAR *ptszText2; // Text2, usage depends on type of event
- const char *pszText2; // Text2 - ANSII
- const wchar_t *pszText2W; // Text2 - Unicode
- };
-} IEVIEWEVENTDATA;
-
-/* IEView events */
-#define IEE_LOG_DB_EVENTS 1 // log specified number of DB events
-#define IEE_CLEAR_LOG 2 // clear log
-#define IEE_GET_SELECTION 3 // get selected text
-#define IEE_SAVE_DOCUMENT 4 // save current document
-#define IEE_LOG_MEM_EVENTS 5 // log specified number of IEView events
-
-/* IEView event flags */
-#define IEEF_RTL 1 // turn on RTL support
-#define IEEF_NO_UNICODE 2 // disable Unicode support - valid for IEE_LOG_DB_EVENTS and IEE_GET_SELECTION events
-
-#define IEVIEWEVENT_SIZE_V1 28
-#define IEVIEWEVENT_SIZE_V2 32
-#define IEVIEWEVENT_SIZE_V3 36
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEE_* values
- DWORD dwFlags; // one of IEEF_* values
- HWND hwnd; // HWND returned by IEW_CREATE
- HANDLE hContact; // contact
- union {
- HANDLE hDbEventFirst; // first event to log, when IEE_LOG_EVENTS returns it will contain
- // the last event actually logged or NULL if no event was logged (IEE_LOG_EVENTS)
- IEVIEWEVENTDATA *eventData; // the pointer to an array of IEVIEWEVENTDATA objects (IEE_LOG_IEV_EVENTS)
- };
- int count; // number of events to log
- int codepage; // ANSI codepage
- const char *pszProto; // Name of the protocol
-} IEVIEWEVENT;
-
-#define IEN_NAVIGATE 1 // navigate to the given destination
-#define IENF_UNICODE 1 // if set urlW is used instead of urlW
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEN_* values
- DWORD dwFlags; // one of IEEF_* values
- HWND hwnd; // HWND returned by IEW_CREATE
- union {
- const char *url; // Text, usage depends on type of event
- const wchar_t *urlW; // Text - Unicode
- };
-} IEVIEWNAVIGATE;
-
-#endif
-
diff --git a/plugins/Scriver/m_metacontacts.h b/plugins/Scriver/m_metacontacts.h deleted file mode 100644 index b529e35df8..0000000000 --- a/plugins/Scriver/m_metacontacts.h +++ /dev/null @@ -1,128 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-#endif
diff --git a/plugins/Scriver/m_smileyadd.h b/plugins/Scriver/m_smileyadd.h deleted file mode 100644 index bae3890c7b..0000000000 --- a/plugins/Scriver/m_smileyadd.h +++ /dev/null @@ -1,252 +0,0 @@ -/*
-Miranda SmileyAdd Plugin
-Copyright (C) 2005 - 2009 Boris Krasnovskiy
-Copyright (C) 2003 - 2004 Rein-Peter de Boer
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include <richedit.h>
-
-#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
- // this flag allows "true" transparency
-#define SAFLRE_OUTGOING 4 // Parsing outgoing message
-#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- HWND hwndRichEditControl; //handle to the rich edit control
- CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. SmileyAdd will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL, "Standard" will be used
- unsigned flags; //Flags (SAFLRE_*) that define the behaivior
- BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HANDLE hContact; //Contact handle
-} SMADD_RICHEDIT3;
-
-//Replace smileys in a rich edit control...
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; //protocol to use... if you have defined a protocol, you can
- //use your own protocol name. Smiley add will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
-
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
- HWND hwndParent; //Parent window for smiley dialog
- HANDLE hContact; //Contact handle
-} SMADD_SHOWSEL3;
-
-//Show smiley selection window
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; // " "
- HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
- //of the smiley that can be used on the button
- //if used with GETINFO2 handle must be destroyed by user!
- //NULL if the buttonicon is not defined...
- int NumberOfVisibleSmileys; //Number of visible smileys defined.
- int NumberOfSmileys; //Number of total smileys defined
- HANDLE hContact; //Contact handle
-} SMADD_INFO2;
-
-//get button smiley icon
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
-
-// Event notifies that SmileyAdd options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
-//wParam = Contact handle which options have changed, NULL if global options changed
-//lParam = (LPARAM) 0; not used
-#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
-
-#define SAFL_PATH 1 // provide smiley file path, icon otherwise
-#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
-#define SAFL_OUTGOING 4 // Parsing outgoing message
-#define SAFL_NOCUSTOM 8 // Do not use custom smileys
-
-#if defined _UNICODE || defined UNICODE
- #define SAFL_TCHAR SAFL_UNICODE
-#else
- #define SAFL_TCHAR 0
-#endif
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- union {
- TCHAR* str; //String to parse
- char* astr;
- wchar_t* wstr;
- };
- unsigned flag; //One of the SAFL_ flags specifies parsing requirements
- //This parameter should be filled by the user
-
- unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
- unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
- //this parameter filled by SmileyAdd
- HANDLE hContact; //Contact handle
-} SMADD_BATCHPARSE2;
-
-typedef struct
-{
- unsigned startChar; //Starting smiley character
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- unsigned size; //Number of characters in smiley (0 if not found)
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- union {
- const TCHAR* filepath;
- const char* afilepath;
- const wchar_t* wfilepath;
- HICON hIcon; //User responsible for destroying icon handle
- };
-} SMADD_BATCHPARSERES;
-
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
-#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
-#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* name; //smiley category name for reference
- char* dispname; //smiley category name for display
-} SMADD_REGCAT;
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; pointer to SMADD_REGCAT
-#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) Pointer to protocol name or NULL for all;
-#define MS_SMILEYADD_RELOAD "SmileyAdd/Reload"
-
-#ifndef MIID_SMILEY
-// {E03C71B2-6DEE-467e-A4F0-DD516745876A}
-#define MIID_SMILEY { 0xe03c71b2, 0x6dee, 0x467e, { 0xa4, 0xf0, 0xdd, 0x51, 0x67, 0x45, 0x87, 0x6a } }
-#endif
-
-/**
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-
-*/
-
-// Type of Event one of
-#define FVCN_PREFIRE 1
-#define FVCN_POSTFIRE 2
-
-// Action of event are going to be done
-#define FVCA_NONE 0
-#define FVCA_DRAW 1 // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
-#define FVCA_CUSTOMDRAW 2
-//#define FVCA_INVALIDATE 3 (not supported)
-//#define FVCA_SENDVIEWCHANGE 4 (not supported)
-#define FVCA_SKIPDRAW 5
-
-// Extended NMHDR structure for WM_NOTIFY
-typedef struct
-{
- //NMHDR structure
- HWND hwndFrom; // Window of smiley host
- UINT idFrom; // ignored
- UINT code; // NM_FIREVIEWCHANGE
-
- size_t cbSize;
- BYTE bEvent; // FVCN_ value - pre- or post- painting
- BYTE bAction; // FVCA_ keys
- HDC hDC; // Canvas to draw on
- RECT rcRect; // Valid/should be in case of FVCA_DRAW
- COLORREF clrBackground; // color to fill background if fTransparent is not set
- BOOL fTransparent; // if need to fill back color (not supported)
- LPARAM lParam; // used by host window PreFire and PostFire event
-} FVCNDATA_NMHDR;
-
-// Code of WM_NOTIFY message (code)
-#define NM_FIREVIEWCHANGE NM_FIRST+1;
-
-typedef struct
-{
- unsigned cbSize; // size of the structure
- HANDLE hContact;
- int type; // 0 - directory, 1 - file;
- TCHAR* path; // smiley category name for reference
-} SMADD_CONT;
-
-//Loads all smileys for the contact
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
-#define MS_SMILEYADD_LOADCONTACTSMILEYS "SmileyAdd/LoadContactSmileys"
diff --git a/plugins/Scriver/m_spellchecker.h b/plugins/Scriver/m_spellchecker.h deleted file mode 100644 index b09f146b0d..0000000000 --- a/plugins/Scriver/m_spellchecker.h +++ /dev/null @@ -1,72 +0,0 @@ -/*
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef __M_SPELLCHECKER_H__
-# define __M_SPELLCHECKER_H__
-
-
-typedef struct {
- int cbSize;
- HANDLE hContact; // The contact to get the settings from, or NULL
- HWND hwnd; // The hwnd of the richedit
- char *window_name; // A name for this richedit
-} SPELLCHECKER_ITEM;
-
-typedef struct {
- int cbSize;
- HWND hwnd; // The hwnd of the richedit
- HMENU hMenu; // The handle to the menu
- POINT pt; // The point, in screen coords
-} SPELLCHECKER_POPUPMENU;
-
-
-/*
-Adds a richedit control for the spell checker to check
-
-wParam: SPELLCHECKER_ITEM *
-lParam: ignored
-return: 0 on success
-*/
-#define MS_SPELLCHECKER_ADD_RICHEDIT "SpellChecker/AddRichedit"
-
-
-/*
-Removes a richedit control for the spell checker to check
-
-wParam: HWND
-lParam: ignored
-return: 0 on success
-*/
-#define MS_SPELLCHECKER_REMOVE_RICHEDIT "SpellChecker/RemoveRichedit"
-
-
-/*
-Show context menu
-
-wParam: SPELLCHECKER_POPUPMENU
-lParam: ignored
-return: the control id selected by the user, 0 if no one was selected, < 0 on error
-*/
-#define MS_SPELLCHECKER_SHOW_POPUP_MENU "SpellChecker/ShowPopupMenu"
-
-
-
-
-#endif // __M_SPELLCHECKER_H__
diff --git a/plugins/Scriver/m_updater.h b/plugins/Scriver/m_updater.h deleted file mode 100644 index eef45dfcc9..0000000000 --- a/plugins/Scriver/m_updater.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// if you set Update::szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (not that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pionted to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pionted to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pionted to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with the updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *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 'short name' in pluginInfo must match the name of the plugin on the file listing, exactly (not including case)
-// AND the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/plugins/Scriver/scriver_10.vcxproj b/plugins/Scriver/scriver_10.vcxproj index 2605011914..2d951563f7 100644 --- a/plugins/Scriver/scriver_10.vcxproj +++ b/plugins/Scriver/scriver_10.vcxproj @@ -105,7 +105,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;NDEBUG;_WINDOWS;_USRDLL;SRMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
@@ -155,7 +155,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;NDEBUG;_WINDOWS;_USRDLL;SRMM_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
@@ -201,7 +201,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;_DEBUG;_WINDOWS;_USRDLL;SRMM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
@@ -243,7 +243,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;_DEBUG;_WINDOWS;_USRDLL;SRMM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
diff --git a/plugins/TipperYM/docs/m_tipper.h b/plugins/TipperYM/docs/m_tipper.h deleted file mode 100644 index 21b6df7cef..0000000000 --- a/plugins/TipperYM/docs/m_tipper.h +++ /dev/null @@ -1,45 +0,0 @@ -/*
-Copyright (C) 2006-07 Scott Ellis
-Copyright (C) 2007-09 Jan Holub
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-*/
-
-
-// Tipper API
-// note: Tipper is internally unicode and requires unicows.dll to function correctly on 95/98/ME
-// so you'll find a lot of wchar_t stuff in here
-
-// translation function type
-// use hContact, module and setting to read your db value(s) and put the resulting string into buff
-// return buff if the translation was successful, or return 0 for failure
-typedef TCHAR *(TranslateFunc)(HANDLE hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);
-
-typedef struct {
- TranslateFunc *transFunc; // address of your translation function (see typedef above)
- const TCHAR *swzName; // make sure this is unique, and DO NOT translate it
- DWORD id; // will be overwritten by Tipper - do not use
-} DBVTranslation;
-
-// add a translation to tipper
-// wParam not used
-// lParam = (DBVTranslation *)translation
-#define MS_TIPPER_ADDTRANSLATION "Tipper/AddTranslation"
-
-// unicode extension to the basic functionality
-// wParam - optional (wchar_t *)text for text-only tips
-// lParam - (CLCINFOTIP *)infoTip
-#define MS_TIPPER_SHOWTIPW "mToolTip/ShowTipW"
\ No newline at end of file diff --git a/plugins/VersionInfo/m_versioninfo.h b/plugins/VersionInfo/m_versioninfo.h deleted file mode 100644 index 3c5ffddcc0..0000000000 --- a/plugins/VersionInfo/m_versioninfo.h +++ /dev/null @@ -1,48 +0,0 @@ -/*
-Version information plugin for Miranda IM
-
-Copyright © 2002-2006 Luca Santarelli, Cristian Libotean
-
-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.
-*/
-
-#ifndef M_VERSIONINFO_H
-#define M_VERSIONINFO_H
-
-/*Brings up the versioninfo post as configured in the options
-wParam - not used
-lParam - not used
-*/
-#define MS_VERSIONINFO_MENU_COMMAND "VersionInfo/MenuCommand"
-
-/*Returns a string containing the versioninfo post
-wParam - (BOOL) suppress forum style formatting. If true the post won't have forum style formatting even if the option is checked in miranda's options.
-lParam - (char **) Pointer to a string that receives the info. Memory is allocated using miranda's version of malloc() and you need to use miranda's version of free() on it.
-Returns 0 on success.
-
-how to use:
-{
-//...
- char *data;
- if (GetInfoService(TRUE, (LPARAM) &data) == 0)
- {//success
- }
- return 0;
-}
-
-*/
-#define MS_VERSIONINFO_GETINFO "Versioninfo/GetInfo"
-
-#endif //M_VERSIONINFO_H
diff --git a/plugins/avs/avs_10.vcxproj b/plugins/avs/avs_10.vcxproj index 87b4db87c6..3d42ee73d8 100644 --- a/plugins/avs/avs_10.vcxproj +++ b/plugins/avs/avs_10.vcxproj @@ -101,7 +101,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;UNICODE;_USRDLL;LOADAVATARS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -141,7 +141,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;UNICODE;_USRDLL;LOADAVATARS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -186,7 +186,7 @@ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;LOADAVATARS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -234,7 +234,7 @@ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;LOADAVATARS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/plugins/avs/m_avatarhistory.h b/plugins/avs/m_avatarhistory.h deleted file mode 100644 index 2613dee3b4..0000000000 --- a/plugins/avs/m_avatarhistory.h +++ /dev/null @@ -1,51 +0,0 @@ -/*
-Copyright (C) 2006 MattJ, Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef __M_AVATARHISTORY_H__
-# define __M_AVATARHISTORY_H__
-
-
-#define EVENTTYPE_AVATAR_CHANGE 9003
-
-
-/*
-Return TRUE is Avatar History is enabled for this contact
-
-wParam: hContact
-lParam: ignored
-*/
-#define MS_AVATARHISTORY_ENABLED "AvatarHistory/IsEnabled"
-
-
-/*
-Get cached avatar
-
-wParam: (char *) protocol name
-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.
-*/
-#define MS_AVATARHISTORY_GET_CACHED_AVATAR "AvatarHistory/GetCachedAvatar"
-
-
-
-
-
-#endif // __M_AVATARHISTORY_H__
diff --git a/plugins/avs/m_flash.h b/plugins/avs/m_flash.h deleted file mode 100644 index 35184a3530..0000000000 --- a/plugins/avs/m_flash.h +++ /dev/null @@ -1,92 +0,0 @@ -/*
-Miranda FlashAvatars Plugin
-Plugin support header file
-Copyright (C) 2006 Big Muscle
-
-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.
-*/
-
-// Service functions
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
- */
-#define MS_FAVATAR_DESTROY "FlashAvatar/Destroy"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
- */
-#define MS_FAVATAR_MAKE "FlashAvatar/Make"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM LPRECT
- */
-#define MS_FAVATAR_RESIZE "FlashAvatar/Resize"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM LPRECT
- */
-#define MS_FAVATAR_SETPOS "FlashAvatar/SetPos"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
- */
-#define MS_FAVATAR_GETINFO "FlashAvatar/GetInfo"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM BSTR
- */
-#define MS_FAVATAR_SETEMOFACE "FlashAvatar/SetEmoFace"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM COLORREF
- */
-#define MS_FAVATAR_SETBKCOLOR "FlashAvatar/SetBkColor"
-
-// tZers macros
-/**
- WPARAM not used
- LPARAM not used
-*/
-#define MS_TZERS_SUPPORT "FlashAvatar/tZers"
-#define EVENTTYPE_TZERS 4
-
-// Avatar emotion faces
-#define AV_SMILE "smile"
-#define AV_SAD "sad"
-#define AV_LAUGH "laugh"
-#define AV_MAD "mad"
-#define AV_CRY "cry"
-#define AV_OFFLINE "offline"
-#define AV_BUSY "busy"
-#define AV_LOVE "love"
-#define AV_NORMAL "stam"
-
-// FLASHAVATAR structure
-typedef struct {
- HANDLE hContact; // contact who flash avatar belongs to
- HWND hWindow; // handle of flash avatar object
- HWND hParentWindow; // handle of flash avatar's parent object
- char* cUrl; // url of .swf file
- int id; // unique number of plugin which wants to use avatar service
- char* cProto; // contact's protocol
-} FLASHAVATAR;
diff --git a/plugins/avs/m_folders.h b/plugins/avs/m_folders.h deleted file mode 100644 index 6b6c090b7d..0000000000 --- a/plugins/avs/m_folders.h +++ /dev/null @@ -1,292 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-#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%"
-
-#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_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_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
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- 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
- 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.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#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 HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- 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 (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- 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
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- 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_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- 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);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- 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';
- }
-
- 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
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/plugins/avs/m_metacontacts.h b/plugins/avs/m_metacontacts.h deleted file mode 100644 index fe19c32d6a..0000000000 --- a/plugins/avs/m_metacontacts.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright © 2004 Universite Louis PASTEUR, STRASBOURG. -Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au) - -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. -*/ - -#ifndef M_METACONTACTS_H__ -#define M_METACONTACTS_H__ 1 - -//gets the handle for the default contact -//wParam=(HANDLE)hMetaContact -//lParam=0 -//returns a handle to the default contact, or null on failure -#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault" - -//gets the contact number for the default contact -//wParam=(HANDLE)hMetaContact -//lParam=0 -//returns a DWORD contact number, or -1 on failure -#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum" - -//gets the handle for the 'most online' contact -//wParam=(HANDLE)hMetaContact -//lParam=0 -//returns a handle to the 'most online' contact -#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline" - -//gets the number of subcontacts for a metacontact -//wParam=(HANDLE)hMetaContact -//lParam=0 -//returns a DWORD representing the number of subcontacts for the given metacontact -#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts" - -//gets the handle of a subcontact, using the subcontact's number -//wParam=(HANDLE)hMetaContact -//lParam=(DWORD)contact number -//returns a handle to the specified subcontact -#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact" - -//sets the default contact, using the subcontact's contact number -//wParam=(HANDLE)hMetaContact -//lParam=(DWORD)contact number -//returns 0 on success -#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault" - -//sets the default contact, using the subcontact's handle -//wParam=(HANDLE)hMetaContact -//lParam=(HANDLE)hSubcontact -//returns 0 on success -#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle" - -//forces the metacontact to send using a specific subcontact, using the subcontact's contact number -//wParam=(HANDLE)hMetaContact -//lParam=(DWORD)contact number -//returns 0 on success -#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact" - -//forces the metacontact to send using a specific subcontact, using the subcontact's handle -//wParam=(HANDLE)hMetaContact -//lParam=(HANDLE)hSubcontact -//returns 0 on success (will fail if 'force default' is in effect) -#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle" - -//'unforces' the metacontact to send using a specific subcontact -//wParam=(HANDLE)hMetaContact -//lParam=0 -//returns 0 on success (will fail if 'force default' is in effect) -#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact" - -//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact -// overrides (and clears) 'force send' above, and will even force use of offline contacts -// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event -//wParam=(HANDLE)hMetaContact -//lParam=0 -//returns 1(true) or 0(false) representing new state of 'force default' -#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault" - -// method to get state of 'force' for a metacontact -// wParam=(HANDLE)hMetaContact -// lParam= (DWORD)&contact_number or NULL -// -// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to, -// or if none is in force, the value (DWORD)-1 will be copied -// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above) -#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState" - -// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set) -// wParam=(HANDLE)hMetaContact -// lParam=(HANDLE)hDefaultContact -#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged" - -// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when -// contacts are reordered) - a signal to re-read metacontact data -// wParam=(HANDLE)hMetaContact -// lParam=0 -#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged" - -// fired when a metacontact is forced to send using a specific subcontact -// wParam=(HANDLE)hMetaContact -// lParam=(HANDLE)hForceContact -#define ME_MC_FORCESEND "MetaContacts/ForceSend" - -// fired when a metacontact is 'unforced' to send using a specific subcontact -// wParam=(HANDLE)hMetaContact -// lParam=0 -#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend" - -// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :) -// wParam=lParam=0 -#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName" - -#endif diff --git a/plugins/avs/m_png.h b/plugins/avs/m_png.h deleted file mode 100644 index 46ff96ec2c..0000000000 --- a/plugins/avs/m_png.h +++ /dev/null @@ -1,64 +0,0 @@ -/*
-Plugin of Miranda IM for reading/writing PNG images.
-Copyright (c) 2004-6 George Hazan (ghazan@postman.ru)
-
-Portions of this code are gotten from the libpng codebase.
-Copyright 2000, Willem van Schaik. For conditions of distribution and
-use, see the copyright/license/disclaimer notice in png.h
-
-Miranda IM: the free icq client for MS Windows
-Copyright (C) 2000-2002 Richard Hughes, Roland Rabien & Tristan Van de Vreede
-
-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.
-
-File name : $Source: /cvsroot/miranda/miranda/plugins/png2dib/m_png.h,v $
-Revision : $Revision: 3502 $
-Last change on : $Date: 2006-08-15 23:21:49 +0200 (Di, 15 Aug 2006) $
-Last change by : $Author: ghazan $
-
-*/
-
-/* Image/Dib2Png
-Converts a Device Independent Bitmap to a png stored in memory
- wParam=0
- lParam=(WPARAM)(DIB2PNG*)descr
-*/
-
-typedef struct
-{
- BITMAPINFO* pbmi;
- BYTE* pDiData;
- BYTE* pResult;
- long* pResultLen;
-}
- DIB2PNG;
-
-#define MS_DIB2PNG "Image/Dib2Png"
-
-/* Image/Png2Dib
-Converts a png stored in memory to a Device Independent Bitmap
- wParam=0
- lParam=(WPARAM)(PNG2DIB*)descr
-*/
-
-typedef struct
-{
- BYTE* pSource;
- DWORD cbSourceSize;
- BITMAPINFOHEADER** pResult;
-}
- PNG2DIB;
-
-#define MS_PNG2DIB "Image/Png2Dib"
diff --git a/plugins/avs/m_updater.h b/plugins/avs/m_updater.h deleted file mode 100644 index 588d1360ee..0000000000 --- a/plugins/avs/m_updater.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-#include <newpluginapi.h>
-#include <stdio.h>
-#include <m_utils.h>
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (not that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pionted to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pionted to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pionted to by pbVersion
-
-} Update;
-
-// register a comonent with the updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-static char *CreateVersionStringPlugin(PLUGININFO *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 'short name' in pluginInfo must match the name of the plugin on the file listing, exactly (including case)
-// AND the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/plugins/chat/chat_10.vcxproj b/plugins/chat/chat_10.vcxproj index 12433dd836..135cc7185f 100644 --- a/plugins/chat/chat_10.vcxproj +++ b/plugins/chat/chat_10.vcxproj @@ -99,7 +99,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CHAT_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -146,7 +146,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CHAT_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -196,7 +196,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CHAT_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -249,7 +249,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CHAT_EXPORTS;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/plugins/chat/m_ieview.h b/plugins/chat/m_ieview.h deleted file mode 100644 index 73874fa88e..0000000000 --- a/plugins/chat/m_ieview.h +++ /dev/null @@ -1,147 +0,0 @@ -/*
-
-IEView Plugin for Miranda IM
-Copyright (C) 2005 Piotr Piastucki
-
-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.
-
-*/
-
-#ifndef M_IEVIEW_INCLUDED
-#define M_IEVIEW_INCLUDED
-
-#define MS_IEVIEW_WINDOW "IEVIEW/NewWindow"
-#define MS_IEVIEW_EVENT "IEVIEW/Event"
-#define MS_IEVIEW_UTILS "IEVIEW/Utils"
-#define MS_IEVIEW_SHOWSMILEYSELECTION "IEVIEW/ShowSmileySelection"
-
-#define ME_IEVIEW_NOTIFICATION "IEVIEW/Notification"
-
-#define IEW_CREATE 1 // create new window (control)
-#define IEW_DESTROY 2 // destroy control
-#define IEW_SETPOS 3 // set window position and size
-
-#define IEWM_SRMM 0 // regular SRMM
-#define IEWM_TABSRMM 1 // TabSRMM-compatible HTML builder
-#define IEWM_HTML 2 // HTML
-#define IEWM_SCRIVER 3 // HTML
-#define IEWM_MUCC 4 // MUCC group chats GUI
-#define IEWM_CHAT 5 // chat.dll group chats GUI
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEW_* values
- DWORD dwMode; // compatibility mode - one of IEWM_* values
- DWORD dwFlags; // flags, one of IEWF_* values
- HWND parent; // parent window HWND
- HWND hwnd; // IEW_CREATE returns WebBrowser control's HWND here
- int x; // IE control horizontal position
- int y; // IE control vertical position
- int cx; // IE control horizontal size
- int cy; // IE control vertical size
-} IEVIEWWINDOW;
-
-#define IEE_LOG_EVENTS 1 // log specified number of DB events
-#define IEE_CLEAR_LOG 2 // clear log
-#define IEE_GET_SELECTION 3 // get selected text
-#define IEE_SAVE_DOCUMENT 4 // save current document
-
-#define IEEF_RTL 1 // turn on RTL support
-#define IEEF_NO_UNICODE 2 // disable Unicode support
-#define IEEF_NO_SCROLLING 4 // do not scroll logs to bottom
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEE_* values
- DWORD dwFlags; // one of IEEF_* values
- HWND hwnd; // HWND returned by IEW_CREATE
- HANDLE hContact; // contact
- HANDLE hDbEventFirst; // first event to log, when IEE_LOG_EVENTS returns it will contain
- // the last event actually logged or NULL if no event was logged
- int count; // number of events to log
- int codepage; // ANSI codepage
-} IEVIEWEVENT;
-
-typedef struct {
- int cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
-} IEVIEWSHOWSMILEYSEL;
-
-#define IEEDF_UNICODE 1 // if set pszText is a pointer to wchar_t string instead of char string
-/* The following flags are valid only for message events (IEED_EVENT_MESSAGE) */
-#define IEEDF_FORMAT_FONT 0x00000100 // if set pszFont (font name) is valid and should be used
-#define IEEDF_FORMAT_SIZE 0x00000200 // if set fontSize is valid and should be used
-#define IEEDF_FORMAT_COLOR 0x00000400 // if set color is valid and should be used
-#define IEEDF_FORMAT_STYLE 0x00000800 // if set fontSize is valid and should be used
-
-
-#define IEED_EVENT_MESSAGE 0x0001 // message
-#define IEED_EVENT_TOPIC 0x0002 // topic change
-#define IEED_EVENT_JOINED 0x0003 // user joined
-#define IEED_EVENT_LEFT 0x0004 // user left
-#define IEED_EVENT_ERROR 0x0005 // error
-
-#define IEED_GC_EVENT_HIGHLIGHT 0x8000
-#define IEED_GC_EVENT_MESSAGE 0x0001
-#define IEED_GC_EVENT_TOPIC 0x0002
-#define IEED_GC_EVENT_JOIN 0x0003
-#define IEED_GC_EVENT_PART 0x0004
-#define IEED_GC_EVENT_QUIT 0x0006
-#define IEED_GC_EVENT_NICK 0x0007
-#define IEED_GC_EVENT_ACTION 0x0008
-#define IEED_GC_EVENT_KICK 0x0009
-#define IEED_GC_EVENT_NOTICE 0x000A
-#define IEED_GC_EVENT_INFORMATION 0x000B
-#define IEED_GC_EVENT_ADDSTATUS 0x000C
-#define IEED_GC_EVENT_REMOVESTATUS 0x000D
-
-#define IE_FONT_BOLD 0x000100 // Bold font flag
-#define IE_FONT_ITALIC 0x000200 // Italic font flag
-#define IE_FONT_UNDERLINE 0x000400 // Underlined font flags
-
-typedef struct tagIEVIEWEVENTDATA {
- int cbSize;
- int iType; // Event type, one of MUCC_EVENT_* values
- DWORD dwFlags; // Event flags - IEEF_*
- const char *fontName; // Text font name
- int fontSize; // Text font size (in pixels)
- int fontStyle; // Text font style (combination of IE_FONT_* flags)
- COLORREF color; // Text color
- const char *pszProto; // Name of the protocol
-// const char *pszID; // Unique identifier of the chat room corresponding to the event,
-// const char *pszName; // Name of the chat room visible to the user
-// const char *pszUID; // User identifier, usage depends on type of event
- const char *pszNick; // Nick, usage depends on type of event
- const char *pszText; // Text, usage depends on type of event
- DWORD dwData; // DWORD data e.g. status
- BOOL bIsMe; // TRUE if the event is related to the user
- time_t time; // Time of the event
- struct tagIEVIEWEVENTDATA *next;
-} IEVIEWEVENTDATA;
-
-#endif
-
diff --git a/plugins/chat/m_smileyadd.h b/plugins/chat/m_smileyadd.h deleted file mode 100644 index bae3890c7b..0000000000 --- a/plugins/chat/m_smileyadd.h +++ /dev/null @@ -1,252 +0,0 @@ -/*
-Miranda SmileyAdd Plugin
-Copyright (C) 2005 - 2009 Boris Krasnovskiy
-Copyright (C) 2003 - 2004 Rein-Peter de Boer
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include <richedit.h>
-
-#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
- // this flag allows "true" transparency
-#define SAFLRE_OUTGOING 4 // Parsing outgoing message
-#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- HWND hwndRichEditControl; //handle to the rich edit control
- CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. SmileyAdd will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL, "Standard" will be used
- unsigned flags; //Flags (SAFLRE_*) that define the behaivior
- BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HANDLE hContact; //Contact handle
-} SMADD_RICHEDIT3;
-
-//Replace smileys in a rich edit control...
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; //protocol to use... if you have defined a protocol, you can
- //use your own protocol name. Smiley add will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
-
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
- HWND hwndParent; //Parent window for smiley dialog
- HANDLE hContact; //Contact handle
-} SMADD_SHOWSEL3;
-
-//Show smiley selection window
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; // " "
- HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
- //of the smiley that can be used on the button
- //if used with GETINFO2 handle must be destroyed by user!
- //NULL if the buttonicon is not defined...
- int NumberOfVisibleSmileys; //Number of visible smileys defined.
- int NumberOfSmileys; //Number of total smileys defined
- HANDLE hContact; //Contact handle
-} SMADD_INFO2;
-
-//get button smiley icon
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
-
-// Event notifies that SmileyAdd options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
-//wParam = Contact handle which options have changed, NULL if global options changed
-//lParam = (LPARAM) 0; not used
-#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
-
-#define SAFL_PATH 1 // provide smiley file path, icon otherwise
-#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
-#define SAFL_OUTGOING 4 // Parsing outgoing message
-#define SAFL_NOCUSTOM 8 // Do not use custom smileys
-
-#if defined _UNICODE || defined UNICODE
- #define SAFL_TCHAR SAFL_UNICODE
-#else
- #define SAFL_TCHAR 0
-#endif
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- union {
- TCHAR* str; //String to parse
- char* astr;
- wchar_t* wstr;
- };
- unsigned flag; //One of the SAFL_ flags specifies parsing requirements
- //This parameter should be filled by the user
-
- unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
- unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
- //this parameter filled by SmileyAdd
- HANDLE hContact; //Contact handle
-} SMADD_BATCHPARSE2;
-
-typedef struct
-{
- unsigned startChar; //Starting smiley character
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- unsigned size; //Number of characters in smiley (0 if not found)
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- union {
- const TCHAR* filepath;
- const char* afilepath;
- const wchar_t* wfilepath;
- HICON hIcon; //User responsible for destroying icon handle
- };
-} SMADD_BATCHPARSERES;
-
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
-#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
-#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* name; //smiley category name for reference
- char* dispname; //smiley category name for display
-} SMADD_REGCAT;
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; pointer to SMADD_REGCAT
-#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) Pointer to protocol name or NULL for all;
-#define MS_SMILEYADD_RELOAD "SmileyAdd/Reload"
-
-#ifndef MIID_SMILEY
-// {E03C71B2-6DEE-467e-A4F0-DD516745876A}
-#define MIID_SMILEY { 0xe03c71b2, 0x6dee, 0x467e, { 0xa4, 0xf0, 0xdd, 0x51, 0x67, 0x45, 0x87, 0x6a } }
-#endif
-
-/**
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-
-*/
-
-// Type of Event one of
-#define FVCN_PREFIRE 1
-#define FVCN_POSTFIRE 2
-
-// Action of event are going to be done
-#define FVCA_NONE 0
-#define FVCA_DRAW 1 // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
-#define FVCA_CUSTOMDRAW 2
-//#define FVCA_INVALIDATE 3 (not supported)
-//#define FVCA_SENDVIEWCHANGE 4 (not supported)
-#define FVCA_SKIPDRAW 5
-
-// Extended NMHDR structure for WM_NOTIFY
-typedef struct
-{
- //NMHDR structure
- HWND hwndFrom; // Window of smiley host
- UINT idFrom; // ignored
- UINT code; // NM_FIREVIEWCHANGE
-
- size_t cbSize;
- BYTE bEvent; // FVCN_ value - pre- or post- painting
- BYTE bAction; // FVCA_ keys
- HDC hDC; // Canvas to draw on
- RECT rcRect; // Valid/should be in case of FVCA_DRAW
- COLORREF clrBackground; // color to fill background if fTransparent is not set
- BOOL fTransparent; // if need to fill back color (not supported)
- LPARAM lParam; // used by host window PreFire and PostFire event
-} FVCNDATA_NMHDR;
-
-// Code of WM_NOTIFY message (code)
-#define NM_FIREVIEWCHANGE NM_FIRST+1;
-
-typedef struct
-{
- unsigned cbSize; // size of the structure
- HANDLE hContact;
- int type; // 0 - directory, 1 - file;
- TCHAR* path; // smiley category name for reference
-} SMADD_CONT;
-
-//Loads all smileys for the contact
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
-#define MS_SMILEYADD_LOADCONTACTSMILEYS "SmileyAdd/LoadContactSmileys"
diff --git a/plugins/chat/m_uninstaller.h b/plugins/chat/m_uninstaller.h deleted file mode 100644 index dc41747c3c..0000000000 --- a/plugins/chat/m_uninstaller.h +++ /dev/null @@ -1,700 +0,0 @@ -/*
-
- PluginUninstaller 1.1.2.1 for Miranda IM 0.3.3a and +
- ------------------------------------------------------------------------
- Developers - C/C++ Header File
-
- Plugin Info: ----------------------------
- | Version: 1.1.2.1
- | Filename: uninstaller.dll
- | Author: H. Herkenrath (hrathh@users.sourceforge.net)
- | Description: Extends the plugin options and offers the possibility
- | to directly remove plugins and delete all associated
- | settings and files.
-
- Contents: -------------------------------
- | > General Info:
- | - Uninstall Example/Template
- | - Changing displayed icon
- | - Changing displayed docs
- | - Message boxes on uninstall
- | - Service Accesibility
- | - Including this file
- |
- | > Structs:
- | - Uninstall Params (PLUGINUNINSTALLPARAMS)
- |
- | > Helpers:
- | - Macro: Run service while uninstalling (PUICallService)
- | - Function: Remove some files in directory (PUIRemoveFilesInDirectory)
- |
- | > Events:
- | - Allow to uninstall a plugin (ME_PLUGINUNINSTALLER_OKTOUNINSTALL)
- | - Plugin gets uninstalled (ME_PLUGINUNINSTALLER_UNINSTALL)
- |
- | > Services:
- | - Remove database module (MS_PLUGINUNINSTALLER_REMOVEDBMODULE)
- | - Remove a setting globally (MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY)
- | - Remove skinned sound (MS_PLUGINUNINSTALLER_REMOVESKINSOUND)
- | - Uninstall a plugin (MS_PLUGINUNISTALLER_UNISTALLPLUGIN)
- | - Getting handles (MS_PLUGINUNINSTALLER_GETHANDLE)
- |
-
-
- This file is only thought for plugin developers.
- If you only want to use "PluginUninstaller" and don't want to develop a plugin
- or something with it you don't need this file.
-
- If there are any problems or bugs with or in this file or something else
- please mail me. My e-mail address is: hrathh@users.sourceforge.net
- For more documentation you can use this address, too. :-)
-
- If you have any whishes on some plugin uninstalling for your
- plugin you can mail me, too. :-)
-
-*/
-#ifndef M_UNINSTALLER_H
-#define M_UNINSTALLER_H
-
-#ifndef CallService
- #pragma message("Mistake Alert!: "m_uninstaller.h" needs to be included after "newpluginapi.h"!\n The following errors are resulting of this mistake.\n")
-#endif
-
-
-// | General Info
-// -----------------------------
-
-// Uninstall Example/Template
-// ---------------------------
-// Making your plugin uninstallable is very easy.
-// Just add the following "Uninstall" function near the "Unload" function
-// in your plugin.
-// A template plugin is available in the source code package.
-
-// Old:
-// int __declspec(dllexport) Uninstall(BOOL bIsMirandaRunning, BOOL bDoDeleteSettings, char* pszPluginPath);
-
-// New:
-//int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
-//{
- // Available Variables:
- // -----------------------------
- // ppup->bIsMirandaRunning:
- // Contains if Miranda is running
- // (Currently this is always TRUE).
-
- // ppup->bDoDeleteSettings:
- // Contains if the users selected
- // that he wants all settings be deleted.
-
- // ppup->pszPluginsPath:
- // Contains the plugins directory name.
-
-
- // Notes:
- // -----------------------------
-
- // Run before "Unload" function:
- // -> IMPORTANT: Be careful not to write to the database or to files in "Unload" again!!!
- // -> Perhaps create a global BOOL variable which is set to TRUE when your plugin gets uninstalled
- // or check of a database setting "IsInstalled" in Unload() or sth. like that
-
- // All Miranda is still loaded
-
- // Here you can do:
- // - Delete settings group in database
- // - Delete registry items
- // - Delete ini-files and other settings files
- // - Delete other files
-
- // Your plugin dll gets automatically deleted
-
- // Services to remove are offered:
- // MS_PLUGINUNINSTALLER_REMOVEDBMODULE
- // MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
- // MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-
- // Getting other useful paths:
- // -----------------------------
-
- // System directory:
-
- //char szSysPath[MAX_PATH];
- //GetSystemDirectory(szSysPath, MAX_PATH);
-
-
- // Windows directory:
-
- //char szWinPath[MAX_PATH];
- //GetWindowsDirectory(szWinPath, MAX_PATH);
-
-
- // Other directories:
-
- // char szPath[MAX_PATH];
- // SHGetSpecialFolderPath(NULL, szPath, CSIDL_* , FALSE);
-
- // Some available dirs:
- // CSIDL_APPDATA CSIDL_SENDTO CSIDL_FAVORITES
- // CSIDL_STARTUP CSIDL_PROFILE CSIDL_DESKTOPDIRECTORY
-
-
- // Delete Files
- //const char* apszFiles[] = {"MyPlugin_Readme.txt", "MyPlugin_License.txt", "MyPlugin_Developer.txt", "MyPlugin_Translation.txt"};
- //PUIRemoveFilesInPath(ppup->pszPluginsPath, apszFiles);
-
- // Delete Settings
- //if (ppup->bDoDeleteSettings == TRUE)
- //{
- //if (ppup->bIsMirandaRunning == TRUE) // Check if it is possible to access services
- //{
- // Remove plugin's module
- //PUIRemoveDbModule("MyPlugin");
-
- // Remove plugin's sounds
- //PUIRemoveSkinSound("MySoundSetting1");
- //PUIRemoveSkinSound("MySoundSetting2");
- //}
- //}
-
- // Remember:
- // Do not forget to remove your (eventually) created registry items here, too.
-
-
- // The plugin's dll file gets deleted after returning.
-
- // Remember:
- // If your DLL file is additionally in use by another application (eg. Windows)
- // you need to free the DLL *here* completely. Otherwise it can't be deleted.
-
-// return 0;
-//}
-
-
-
-// Changing displayed icon
-// ---------------------------
-// The icon that gets displayed on the options page is always the "first"
-// icon in your DLL file.
-// An icon in your DLL file is the first icon when it has the lowest recource ID.
-// If you would like to have an other icon shown in the options please change your
-// icon resource IDs so that the icon you would like to have has the lowest one.
-// For example if you use MS Visual C++, open "resource.h" and change the resource define
-// of your prefered icon to the lowest icon number.
-
-
-// Changing displayed docs
-// ---------------------------
-// The items "License" and "More Information" on the plugin details page
-// are created when the a license and/or a readme file for the plugin exists.
-// The files get detected automatically and need a special name
-// so that they get detected.
-// The text files need to be either placed in the "Plugins" directory or
-// in the "Docs" directory. Whereof the last one is the better one :-)
-//
-// For the license file the following file name formatings are possible:
-// PluginName-License.txt (I personally think that this is the best naming solution... :-) )
-// PluginName_License.txt,
-//
-// For the readme file the following ones are possible:
-// PluginName-Readme.txt (Again...I like this one :-D ),
-// PluginName_Readme.txt,
-
-// Message boxes on uninstall
-// ---------------------------
-// If you would like to ask the user for something to remove/uninstall
-// please hook the event ME_PLUGINUNINSTALLER_UNINSTALL and show your
-// message box there. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-
-// Service Accessibility
-// ---------------------------
-// Remember that you only can use these functions after the event ME_SYSTEM_MODULESLOADED
-// or later because "PluginUninstaller" needs to be loaded first.
-// Normally you only use them in your "UninstallEx" function.
-//
-// IMPORTANT!:
-// Please make sure that you always use the macro PUICallService
-// in the "UninstallEx" function instead of the CallService function.
-
-
-// Including this file
-// ---------------------------
-// To use some of the uninstalling functionality you have to include this file
-// into your project.
-//
-// IMPORTANT!:
-// Please make sure that you include the file "newpluginapi.h" before this one.
-// If this isn't the case there may some compile errors come up.
-
- // -> Example:
- // If your plugin is in the directory "Plugins/MyPlugin/" and
- // this include file is in the directory "Plugins/PluginUninstaller"
- // you can use the following:
-
- //#include "../PluginUninstaller/m_uninstaller.h"
-
- // If your plugin is in an directory that is different to that one just
- // change the include path to the one you want.
-
-
-
-
-
-// | Structs
-// -----------------------------
-
-// ---------------------------------------------
-// -- Struct: Uninstall Params -----------------
-// ---------------------------------------------
-
-// Struct: PLUGINUNINSTALLPARAMS
-// (Gets passed to "UninstallEx" function)
-
-typedef int (*HELPERPROC)(const char*, WPARAM, LPARAM); // Used internally (for pHelperProcAddress)
-
-typedef struct {
- BOOL bIsMirandaRunning; // Is TRUE when Miranda is loaded and services are available (Please use PUICallService instead of CallService)
- BOOL bDoDeleteSettings; // Is TRUE when user wants to delete settings (If this is FALSE, please only delete your files)
- char* pszPluginsPath; // Contains the plugin directory path
- char* pszDocsPath; // Contains the document directory for plugins documentation (Added in version 1.1.1.0)
- char* pszIconsPath; // Contains the icon directory for icon dlls (Added in version 1.1.2.0)
- HELPERPROC pHelperProcAddress; // Used internally (Contains proc address for PUICallService)
-} PLUGINUNINSTALLPARAMS;
-
-
-
-
-
-// | Helper
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Macro: Run service while uninstalling ----
-// ---------------------------------------------
-
-// Macro: PUICallService
-
-#define PUICallService(service, wParam, lParam) (ppup->pHelperProcAddress) (service, wParam, lParam);
-
-// Description:
-// -------------
-// This service provides the possibility to call a Miranda
-// service in the "UninstallEx" function.
-// Important!: Use this macro always instead of "CallService",
-// because else a crash occurs when the plugin was decativated
-// and gets uninstalled
-
-// Parameters:
-// -------------
-// Same parameters as CallService of Miranda Core.
-
-// Return Values:
-// --------------
-// Return values are the same as the CallService function of Miranda Core.
-// Additionaly returns CALLSERVICE_NOTFOUND if Miranda is not loaded
-// which means the services are not accessable.
-
-
- // Example:
- // ----------------------------------
-
- //if ( (bIsMirandaRunning == TRUE) && (bDoDeleteSettings == TRUE) )
- //{
- // Remove plugin's module
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)"MyPlugin", 0);
- //}
-
-
-
-
-// ---------------------------------------------
-// -- Function: Remove some files in directory -
-// ---------------------------------------------
-
-// Function: PUIRemoveFilesInDirectory
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[]);
-
-// Description:
-// -------------
-// This helper provides the possibility to easily
-// remove specified files in a specified directory.
-
-// Note: The last version of this helper (PUIRemoveFilesInPath)
-// did not work correctly.
-// Please do now always append a NULL slot to the end of your array.
-
-// Parameters:
-// -------------
-// char* pszPath = Path to the files in array
-// const LPCSTR apszFiles[] = NULL-terminated array of files to be deleted.
-
-// Return Values:
-// --------------
-// Returns TRUE if the files could be deleted.
-// FALSE if the files could not be deleted or did not exist.
-
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[])
-{
- char szFile[MAX_PATH];
- BOOL bReturn = FALSE;
- int iFile = 0;
-
- while (apszFiles[iFile] != NULL)
- {
- strncpy(szFile, pszPath, SIZEOF(szFile));
- strncat(szFile, apszFiles[iFile], SIZEOF(szFile)-strlen(szFile));
-
- if ((BOOL)DeleteFile(szFile) == TRUE) bReturn = TRUE;
- iFile++;
- }
-
- return bReturn;
-}
-
- // Example:
- // ----------------------------------
-
- //const char* apszFiles[] = {"File1.txt", "File2.txt", "File3.txt", NULL};
- //PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
-
-
-
-
-// | Events
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Event: Allow to uninstall a plugin -------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_OKTOUNINSTALL
-
-#define ME_PLUGINUNINSTALLER_OKTOUNINSTALL "PluginUninstaller/OkToUninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the "Remove Plugin" button to be disabled.
-
-
-
-// ---------------------------------------------
-// -- Event: Plugin gets uninstalled -----------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_UNINSTALL
-
-#define ME_PLUGINUNINSTALLER_UNINSTALL "PluginUninstaller/Uninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the uninstall process to be canceled.
-
-// Notice:
-// Hook this event if you would like to ask the user for something to remove/uninstall
-// and show your message box on this event. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-// Other plugins can use this event to be noticed that another plugin isn't installed anylonger.
-
-
-
-
-// | Services
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Service: Remove database module ----------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBMODULE
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBMODULE "PluginUninstaller/RemoveDbModule"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all database modules
-// associated to your plugin.
-// The specified database module will be removed in all contacts
-// including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule // Pointer to a string containd module name. Can't be NULL
-// lParam = (const char*)apszIgnoreSettings // NULL terminated array of strings. Can be 0 if no settings should be ignored.
- // See example 3 for more details
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the module was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbModule(pszModule) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)pszModule, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbModule("MyPlugin");
-
-
- // Example 2:
- // ----------------------------------
-
- //char szModule[] = "MyModule";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, 0);
-
-
- // Example 3:
- // ----------------------------------
-
- // This deletes all settings in the specified module exept
- // the specified settings: "Setting1",..."Setting4"
-
- // char szModule[] = "MyModule";
- // const char* apszIgnoreSettings[] = {"Setting1", "Setting2", "Setting3", "Setting4", NULL};
- // PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, (LPARAM)&apszIgnoreSettings);
-
-
-
-// ---------------------------------------------
-// -- Service: Remove a setting globally -------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY "PluginUninstaller/RemoveDbSettingGlobally"
-
-// Description:
-// -------------
-// This service provides the possibility to delete a specific
-// setting in database in all contacts including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule
-// lParam = (char*)pszSetting
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the setting was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbSettingGlobally(pszModule, pszSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)pszModule, (LPARAM)pszSetting);
-
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbSettingGlobally("MyPlugin", "MySetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szModule[] = "MyPlugin";
- //szSetting[] = "MySetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)szModule, (LPARAM)szSetting);
-
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Remove skinned sound ------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-#define MS_PLUGINUNINSTALLER_REMOVESKINSOUND "PluginUninstaller/RemoveSkinSound"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all your sound settings
-// associated to your plugin.
-// The specified sound will be be removed.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszSoundSetting
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the sound was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveSkinSound(pszSoundSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVESKINSOUND, (WPARAM)pszSoundSetting, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveSkinSound("MySoundSetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szSoundModule[] = "MySoundSetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szSoundSetting, 0);
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Uninstall a plugin --------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN
-
-#define MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN "PluginUninstaller/UninstallPlugin"
-
-// Description:
-// -------------
-// This service marks a plugin to be uninstalled at next restart of Miranda IM.
-// It uses the default value for "Delete all settings".
-// You can use this service for example when you want that your sub-plugin gets
-// also removed when your main-plugin is uninstalled.
-// Note: This service is not needed for the normal uninstalling functionality.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszPluginName // do not translate this!
-// lParam = (char*)pszPluginFile // without path, only file name!
-
-// Return Values:
-// --------------
-// Returns always 0.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-int __inline PUIUninstallPlugin(char* pszPluginName, char* pszPluginFile)
-{
- return CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)pszPluginName, (LPARAM)pszPluginFile);
-}
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIUninstallPlugin("PluginName", "plugin.dll");
-
-
- // Example 2:
- // ----------------------------------
-
- // hInst => Handle of a specific (your?) plugin
- // char szPluginName[] = "YourPluginName";
-
- //char* pFileName;
- //char szPath[MAX_PATH];
-
- //GetModuleFileName(hInst, szPath, sizeof(szPath));
- //pFileName = strrchr(szPath, '\\');
- //pFileName = pFileName+1; // Pointer arithmetic
-
- //CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)szPluginName, (LPARAM)pFileName);
-
-
-
-
-// ---------------------------------------------
-// -- Service: Getting handles -----------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_GETHANDLE
-
-#define MS_PLUGINUNINSTALLER_GETHANDLE "PluginUninstaller/GetHandle"
-
-// Description:
-// -------------
-// This service gets a specified window/instance handle.
-
-// Note: This service must not be used in "UninstallEx" function.
-// It is mainly thought for being used in ME_PLUGINUNINSTALLER_UNINSTALL event
-// to give out a MessageBox or something like that.
-
-// Parameters:
-// -------------
-// wParam = UINT uHandleType;
-// lParam = 0
-
-// Possible values for wParam:
-#define PUIHT_HINST_PLUGIN_INSTANCE 0 // HINSTANCE of the PluginUninstaller plugin
-#define PUIHT_HWND_PLUGIN_OPTIONS 1 // HWND of the plugin options dialog (if it is loaded; else NULL)
-
-// Return Values:
-// --------------
-// Returns the specified handle value.
-// If no handle type is specified it returns NULL.
-// The handle doesn't need to be destroyed.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-HANDLE __inline PUIGetHandle(UINT uHandleType)
-{
- return (HANDLE)CallService(MS_PLUGINUNINSTALLER_GETHANDLE, uHandleType, 0);
-}
-
-#endif
-
-
- // Example
- // ----------------------------------
-
- //HWND hwndDlg;
- //hwndDlg = (HWND)PUIGetHandle(PUIHT_HWND_PLUGIN_OPTIONS);
-
-
-
-
-
-#endif // M_UNINSTALLER_H
diff --git a/plugins/clist_nicer/INCLUDE/m_metacontacts.h b/plugins/clist_nicer/INCLUDE/m_metacontacts.h deleted file mode 100644 index 9f348bd2c6..0000000000 --- a/plugins/clist_nicer/INCLUDE/m_metacontacts.h +++ /dev/null @@ -1,166 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#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
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/plugins/clist_nicer/INCLUDE/m_updater.h b/plugins/clist_nicer/INCLUDE/m_updater.h deleted file mode 100644 index 488d3722ce..0000000000 --- a/plugins/clist_nicer/INCLUDE/m_updater.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- 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,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/plugins/clist_nicer/INCLUDE/m_variables.h b/plugins/clist_nicer/INCLUDE/m_variables.h deleted file mode 100644 index 0e2bca7670..0000000000 --- a/plugins/clist_nicer/INCLUDE/m_variables.h +++ /dev/null @@ -1,719 +0,0 @@ -/*
- Variables Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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
-*/
-
-#ifndef __M_VARS
-#define __M_VARS
-
-#if !defined(_TCHAR_DEFINED)
-#include <tchar.h>
-#endif
-
-#ifndef VARIABLES_NOHELPER
-#include <m_button.h>
-#endif
-
-#ifndef SIZEOF
-#include <win2k.h>
-#endif
-
-// --------------------------------------------------------------------------
-// Memory management
-// --------------------------------------------------------------------------
-
-// Release memory that was allocated by the Variables plugin, e.g. returned
-// strings.
-
-#define MS_VARS_FREEMEMORY "Vars/FreeMemory"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(void *)pntr
-// Pointer to memory that was allocated by the Variables plugin (e.g. a
-// returned string) (can be NULL).
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Does return 0 on success, nozero otherwise.
-
-// Note: Do only use this service to free memory that was *explicitliy*
-// stated that it should be free with this service.
-
-
-
-#define MS_VARS_GET_MMI "Vars/GetMMI"
-
-// Get Variable's RTL/CRT function poiners to malloc(), free() and
-// realloc().
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM) &MM_INTERFACE
-// Pointer to a memory manager interface struct (see m_system.h).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise
-
-// Note: Works exactly the same as the MS_SYSTEM_GET_MMI service
-// service of m_system.h.
-
-// Helper function for easy using:
-#ifndef VARIABLES_NOHELPER
-__inline static void variables_free(void *pntr) {
-
- CallService(MS_VARS_FREEMEMORY, (WPARAM)pntr, 0);
-}
-#endif
-
-
-
-// --------------------------------------------------------------------------
-// String formatting
-// --------------------------------------------------------------------------
-
-#define MS_VARS_FORMATSTRING "Vars/FormatString"
-
-// This service can be used to parse tokens in a text. The tokens will be
-// replaced by their resolved values. A token can either be a field or a
-// function. A field takes no arguments and is represented between
-// %-characters, e.g. "%winampsong%". A function can take any number of
-// arguments and is represented by a ? or !-character followed by the name
-// of the function and a list of arguments, e.g. "?add(1,2)".
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(FORMATINFO *)&fi
-// See below.
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Returns a pointer to the resolved string or NULL in case of an error.
-
-// Note: The returned pointer needs to be freed using MS_VARS_FREEMEMORY.
-
-typedef struct {
- int cbSize; // Set this to sizeof(FORMATINFO).
- int flags; // Flags to use (see FIF_* below).
- union {
- char *szFormat; // Text in which the tokens will be replaced (can't be
- // NULL).
- WCHAR *wszFormat;
- TCHAR *tszFormat;
- };
- union {
- char *szExtraText; // Extra, context-specific string (can be NULL) ->
- // The field "extratext" will be replaced by this
- // string. (Previously szSource).
- WCHAR *wszExtraText;
- TCHAR *tszExtraText;
- };
- HANDLE hContact; // Handle to contact (can be NULL) -> The field "subject"
- // represents this contact.
- int pCount; // (output) Number of succesful parsed tokens, needs to be set
- // to 0 before the call
- int eCount; // (output) Number of failed tokens, needs to be set to 0
- // before the call
- union {
- char **szaTemporaryVars; // Temporary variables valid only in the duration of the format call
- TCHAR **tszaTemporaryVars; // By pos: [i] is var name, [i + 1] is var value
- WCHAR **wszaTemporaryVars;
- };
- int cbTemporaryVarsSize; // Number of elements in szaTemporaryVars array
-
-} FORMATINFO;
-
-#define FORMATINFOV2_SIZE 28
-
-// Possible flags:
-#define FIF_UNICODE 0x01 // Expects and returns unicode text (WCHAR*).
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define FIF_TCHAR FIF_UNICODE // Strings in structure are TCHAR*.
-#else
-#define FIF_TCHAR 0
-#endif
-
-// Helper functions for easy using:
-
-// Helper #1: variables_parse
-// ------------------------
-// The returned string needs to be freed using MS_VARS_FREEMEMORY.
-
-#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
-
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
-
- return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
-}
-#endif
-
-__inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
- TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize) {
-
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
- fi.tszaTemporaryVars = tszaTemporaryVars;
- fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
-
- return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
-}
-// Helper #2: variables_parsedup
-// ------------------------
-// Returns a _strdup()'ed copy of the unparsed string when Variables is not
-// installed, returns a strdup()'ed copy of the parsed result otherwise.
-
-// Note: The returned pointer needs to be released using your own free().
-
-#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
-
- if (ServiceExists(MS_VARS_FORMATSTRING)) {
- FORMATINFO fi;
- TCHAR *tszParsed, *tszResult;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags |= FIF_TCHAR;
- tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- if (tszParsed) {
- tszResult = _tcsdup(tszParsed);
- CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
- return tszResult;
- }
- }
- return tszFormat?_tcsdup(tszFormat):tszFormat;
-}
-
-__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
- TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize) {
-
- if (ServiceExists(MS_VARS_FORMATSTRING)) {
- FORMATINFO fi;
- TCHAR *tszParsed, *tszResult;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags |= FIF_TCHAR;
- fi.tszaTemporaryVars = tszaTemporaryVars;
- fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
- tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- if (tszParsed) {
- tszResult = _tcsdup(tszParsed);
- CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
- return tszResult;
- }
- }
- return tszFormat?_tcsdup(tszFormat):tszFormat;
-}
-#endif
-
-
-
-// --------------------------------------------------------------------------
-// Register tokens
-// --------------------------------------------------------------------------
-
-// Plugins can define tokens which will be parsed by the Variables plugin.
-
-#define MS_VARS_REGISTERTOKEN "Vars/RegisterToken"
-
-// With this service you can define your own token. The newly added tokens
-// using this service are taken into account on every call to
-// MS_VARS_FORMATSTRING.
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM)(TOKENREGISTER*)&tr
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nonzero otherwise. Existing tokens will be
-// 'overwritten' if registered twice.
-
-// Needed for szService and parseFunction:
-typedef struct {
- int cbSize; // You need to check if this is >=sizeof(ARGUMENTSINFO)
- // (already filled in).
- FORMATINFO *fi; // Arguments passed to MS_VARS_FORMATSTRING.
- unsigned int argc; // Number of elements in the argv array.
- union {
- char **argv; // Argv[0] will be the token name, the following elements
- // are the additional arguments.
- WCHAR **wargv; // If the registered token was registered as a unicode
- // token, wargv should be accessed.
- TCHAR **targv;
- };
- int flags; // (output) You can set flags here (initially 0), use the
- // AIF_* flags (see below).
-} ARGUMENTSINFO;
-
-// Available flags for ARGUMENTSINFO:
-// Set the flags of the ARGUMENTSINFO struct to any of these to influence
-// further parsing.
-#define AIF_DONTPARSE 0x01 // Don't parse the result of this function,
- // usually the result of a token is parsed
- // again, if the `?` is used as a function
- // character.
-#define AIF_FALSE 0x02 // The function returned logical false.
-
-// Definition of parse/cleanup functions:
-typedef char* (*VARPARSEFUNCA)(ARGUMENTSINFO *ai);
-typedef WCHAR* (*VARPARSEFUNCW)(ARGUMENTSINFO *ai);
-typedef void (*VARCLEANUPFUNCA)(char *szReturn);
-typedef void (*VARCLEANUPFUNCW)(WCHAR *wszReturn);
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define VARPARSEFUNC VARPARSEFUNCW
-#define VARCLEANUPFUNC VARCLEANUPFUNCW
-#else
-#define VARPARSEFUNC VARPARSEFUNCA
-#define VARCLEANUPFUNC VARCLEANUPFUNCA
-#endif
-
-typedef struct {
- int cbSize; // Set this to sizeof(TOKENREGISTER).
- union {
- char *szTokenString; // Name of the new token to be created, without %,
- // ?, ! etc. signs (can't be NULL).
- WCHAR *wszTokenString;
- TCHAR *tszTokenString;
- };
- union {
- char *szService; // Name of a service that is used to request the
- // token's value, if no service is used, a function
- // and TRF_PARSEFUNC must be used.
- VARPARSEFUNCA parseFunction; // See above, use with TRF_PARSEFUNC.
- VARPARSEFUNCW parseFunctionW;
- VARPARSEFUNC parseFunctionT;
- };
- union {
- char *szCleanupService; // Name of a service to be called when the
- // memory allocated in szService can be freed
- // (only used when flag VRF_CLEANUP is set,
- // else set this to NULL).
- VARCLEANUPFUNCA cleanupFunction; // See above, use with TRF_CLEANUPFUNC.
- VARCLEANUPFUNCW cleanupFunctionW;
- VARCLEANUPFUNC cleanupFunctionT;
- };
- char *szHelpText; // Help info shown in help dialog (can be NULL). Has to
- // be in the following format:
- // "subject\targuments\tdescription"
- // (Example: "math\t(x, y ,...)\tx + y + ..."), or:
- // "subject\tdescription"
- // (Example: "miranda\tPath to the Miranda-IM
- // executable").
- // Note: subject and description are translated by
- // Variables.
- int memType; // Describes which method Varibale's plugin needs to use to
- // free the returned buffer, use one of the VR_MEM_* values
- // (see below). Only valid if the flag VRF_FREEMEM is set,
- // use TR_MEM_OWNER otherwise).
- int flags; // Flags to use (see below), one of TRF_* (see below).
-} TOKENREGISTER;
-
-// Available Memory Storage Types:
-// These values describe which method Variables Plugin will use to free the
-// buffer returned by the parse function or service
-#define TR_MEM_VARIABLES 1 // Memory is allocated using the functions
- // retrieved by MS_VARS_GET_MMI.
-#define TR_MEM_MIRANDA 2 // Memory is allocated using Miranda's Memory
- // Manager Interface (using the functions
- // returned by MS_SYSTEM_GET_MMI), if
- // VRF_FREEMEM is set, the memory will be
- // freed by Variables.
-#define TR_MEM_OWNER 3 // Memory is owned by the calling plugin
- // (can't be freed by Variables Plugin
- // automatically). This should be used if
- // VRF_FREEMEM is not specified in the flags.
-
-// Available Flags for TOKENREGISTER:
-#define TRF_FREEMEM 0x01 // Variables Plugin will automatically free the
- // pointer returned by the parse function or
- // service (which method it will us is
- // specified in memType -> see above).
-#define TRF_CLEANUP 0x02 // Call cleanup service or function, notifying
- // that the returned buffer can be freed.
- // Normally you should use either TRF_FREEMEM
- // or TRF_CLEANUP.
-#define TRF_PARSEFUNC 0x40 // parseFunction will be used instead of a
- // service.
-#define TRF_CLEANUPFUNC 0x80 // cleanupFunction will be used instead of a
- // service.
-#define TRF_USEFUNCS TRF_PARSEFUNC|TRF_CLEANUPFUNC
-#define TRF_UNPARSEDARGS 0x04 // Provide the arguments for the parse
- // function in their raw (unparsed) form.
- // By default, arguments are parsed before
- // presenting them to the parse function.
-#define TRF_FIELD 0x08 // The token can be used as a %field%.
-#define TRF_FUNCTION 0x10 // The token can be used as a ?function().
- // Normally you should use either TRF_FIELD or
- // TRF_FUNCTION.
-#define TRF_UNICODE 0x20 // Strings in structure are unicode (WCHAR*).
- // In this case, the strings pointing to the
- // arguments in the ARGUMENTS struct are
- // unicode also. The returned buffer is
- // expected to be unicode also, and the
- // unicode parse and cleanup functions are
- // called.
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define TRF_TCHAR TRF_UNICODE // Strings in structure are TCHAR*.
-#else
-#define TRF_TCHAR 0
-#endif
-
-// Deprecated:
-#define TRF_CALLSVC TRF_CLEANUP
-
-// Callback Service (szService) / parseFunction:
-// ------------------------
-// Service that is called automatically by the Variable's Plugin to resolve a
-// registered variable.
-
-// Parameters:
-// wParam = 0
-// lParam = (LPARAM)(ARGUMENTSINFO *)&ai
-// see above
-
-// Return Value:
-// Needs to return the pointer to a dynamically allocacated string or NULL.
-// A return value of NULL is regarded as an error (eCount will be increaded).
-// Flags in the ARGUMENTSINFO struct can be set (see above).
-
-// Callback Service (szCallbackService) / cleanupFunction:
-// ------------------------
-// This service is called when the memory that was allocated by the parse
-// function or service can be freed. Note: It will only be called when the
-// flag VRF_CLEANUP of TOKENREGISTER is set.
-
-// Parameters:
-// wParam = 0
-// lParam = (LPARAM)(char *)&res
-// Result from parse function or service (pointer to a string).
-
-// Return Value:
-// Should return 0 on success.
-
-
-
-// --------------------------------------------------------------------------
-// Show the help dialog
-// --------------------------------------------------------------------------
-
-// Plugins can invoke Variables' help dialog which can be used for easy input
-// by users.
-
-#define MS_VARS_SHOWHELPEX "Vars/ShowHelpEx"
-
-// This service can be used to open the help dialog of Variables. This dialog
-// provides easy input for the user and/or information about the available
-// tokens.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(HWND)hwndParent
-// lParam = (LPARAM)(VARHELPINFO)&vhi
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns 0 on succes, any other value on error.
-
-typedef struct {
- int cbSize; // Set to sizeof(VARHELPINFO).
- FORMATINFO *fi; // Used for both input and output. If this pointer is not
- // NULL, the information is used as the initial values for
- // the dialog.
- HWND hwndCtrl; // Used for both input and output. The window text of this
- // window will be read and used as the initial input of the
- // input dialog. If the user presses the OK button the window
- // text of this window will be set to the text of the input
- // field and a EN_CHANGE message via WM_COMMAND is send to
- // this window. (Can be NULL).
- char *szSubjectDesc; // The description of the %subject% token will be set
- // to this text, if not NULL. This is translated
- // automatically.
- char *szExtraTextDesc; // The description of the %extratext% token will be
- // set to this text, if not NULL. This is translated
- // automatically.
- int flags; // Flags, see below.
-} VARHELPINFO;
-
-
-// Flags for VARHELPINFO
-#define VHF_TOKENS 0x00000001 // Create a dialog with the list of
- // tokens
-#define VHF_INPUT 0x00000002 // Create a dialog with an input
- // field (this contains the list of
- // tokens as well).
-#define VHF_SUBJECT 0x00000004 // Create a dialog to select a
- // contact for the %subject% token.
-#define VHF_EXTRATEXT 0x00000008 // Create a dialog to enter a text
- // for the %extratext% token.
-#define VHF_HELP 0x00000010 // Create a dialog with help info.
-#define VHF_HIDESUBJECTTOKEN 0x00000020 // Hide the %subject% token in the
- // list of tokens.
-#define VHF_HIDEEXTRATEXTTOKEN 0x00000040 // Hide the %extratext% token in
- // the list of tokens.
-#define VHF_DONTFILLSTRUCT 0x00000080 // Don't fill the struct with the
- // new information if OK is pressed
-#define VHF_FULLFILLSTRUCT 0x00000100 // Fill all members of the struct
- // when OK is pressed. By default
- // only szFormat is set. With this
- // flag on, hContact and
- // szExtraText are also set.
-#define VHF_SETLASTSUBJECT 0x00000200 // Set the last contact that was
- // used in the %subject% dialog in
- // case fi.hContact is NULL.
-
-// Predefined flags
-#define VHF_FULLDLG VHF_INPUT|VHF_SUBJECT|VHF_EXTRATEXT|VHF_HELP
-#define VHF_SIMPLEDLG VHF_INPUT|VHF_HELP
-#define VHF_NOINPUTDLG VHF_TOKENS|VHF_HELP
-
-// If the service fills information in the struct for szFormat or szExtraText,
-// these members must be free'd using the free function of Variables.
-// If wParam==NULL, the dialog is created modeless. Only one dialog can be
-// shown at the time.
-// If both hwndCtrl and fi are NULL, the user input will not be retrievable.
-// In this case, the dialog is created with only a "Close" button, instead of
-// the "OK" and "Cancel" buttons.
-// In case of modeless dialog and fi != NULL, please make sure this pointer
-// stays valid while the dialog is open.
-
-// Helper function for easy use in standard case:
-#ifndef VARIABLES_NOHELPER
-__inline static int variables_showhelp(HWND hwndDlg, UINT uIDEdit, int flags, char *szSubjectDesc, char *szExtraDesc) {
-
- VARHELPINFO vhi;
-
- ZeroMemory(&vhi, sizeof(VARHELPINFO));
- vhi.cbSize = sizeof(VARHELPINFO);
- if (flags == 0) {
- flags = VHF_SIMPLEDLG;
- }
- vhi.flags = flags;
- vhi.hwndCtrl = GetDlgItem(hwndDlg, uIDEdit);
- vhi.szSubjectDesc = szSubjectDesc;
- vhi.szExtraTextDesc = szExtraDesc;
-
- return CallService(MS_VARS_SHOWHELPEX, (WPARAM)hwndDlg, (LPARAM)&vhi);
-}
-#endif
-
-
-#define MS_VARS_GETSKINITEM "Vars/GetSkinItem"
-
-// This service can be used to get the icon you can use for example on the
-// Variables help button in your options screen. You can also get the tooltip
-// text to use with such a button. If icon library is available the icon will
-// be retrieved from icon library manager, otherwise the default is returned.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)VSI_* (see below)
-
-// Return Value:
-// ------------------------
-// Depends on the information to retrieve (see below).
-
-// VSI_ constants
-#define VSI_HELPICON 1 // Can be used on the button accessing the
- // Variables help dialog. Returns (HICON)hIcon on
- // success or NULL on failure;
-#define VSI_HELPTIPTEXT 2 // Returns the tooltip text you can use for the
- // help button. Returns (char *)szTipText, a
- // static, translated buffer containing the help
- // text or NULL on error.
-
-// Helper to set the icon on a button accessing the help dialog.
-// Preferably a 16x14 MButtonClass control, but it works on a standard
-// button control as well. If no icon is availble (because of old version of
-// Variables) the string "V" is shown on the button. If Variables is not
-// available, the button will be hidden.
-#ifndef VARIABLES_NOHELPER
-__inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) {
-
- int res;
- HICON hIcon;
- TCHAR tszClass[32];
-
- hIcon = NULL;
- res = 0;
- if (ServiceExists(MS_VARS_GETSKINITEM))
- hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
-
- GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, SIZEOF(tszClass));
- if (!_tcscmp(tszClass, _T("Button"))) {
- if (hIcon != NULL) {
- SetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON);
- SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
- }
- else {
- SetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)&~BS_ICON);
- SetDlgItemText(hwndDlg, uIDButton, _T("V"));
- }
- }
- else if (!_tcscmp(tszClass, MIRANDABUTTONCLASS)) {
- if (hIcon != NULL) {
- char *szTipInfo = NULL;
-
- SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
- if (ServiceExists(MS_VARS_GETSKINITEM))
- szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPTIPTEXT);
-
- if (szTipInfo == NULL)
- szTipInfo = Translate("Open String Formatting Help");
-
- SendMessage(GetDlgItem(hwndDlg, uIDButton), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
- SendDlgItemMessage(hwndDlg, uIDButton, BUTTONSETASFLATBTN, 0, 0);
- }
- else SetDlgItemText(hwndDlg, uIDButton, _T("V"));
- }
- else res = -1;
-
- ShowWindow(GetDlgItem(hwndDlg, uIDButton), ServiceExists(MS_VARS_FORMATSTRING));
-
- return res;
-}
-#endif
-
-
-#define MS_VARS_SHOWHELP "Vars/ShowHelp"
-
-// WARNING: This service is obsolete, please use MS_VARS_SHOWHELPEX
-
-// Shows a help dialog where all possible tokens are displayed. The tokens
-// are explained on the dialog, too. The user can edit the initial string and
-// insert as many tokens as he likes.
-
-// Parameters:
-// ------------------------
-// wParam = (HWND)hwndEdit
-// Handle to an edit control in which the modified string
-// should be inserted (When the user clicks OK in the dialog the edited
-// string will be set to hwndEdit) (can be NULL).
-// lParam = (char *)pszInitialString
-// String that the user is provided with initially when
-// the dialog gets opened (If this is NULL then the current text in the
-// hwndEdit edit control will be used) (can be NULL).
-
-// Return Value:
-// ------------------------
-// Returns the handle to the help dialog (HWND).
-
-// Note: Only one help dialog can be opened at a time. When the dialog gets
-// closed an EN_CHANGE of the edit controll will be triggered because the
-// contents were updated. (Only when user selected OK).
-
-// Example:
-// CallService(MS_VARS_SHOWHELP, (WPARAM)hwndEdit, (LPARAM)"some initial text");
-
-// --------------------------------------------------------------------------
-// Retrieve a contact's HANDLE given a string
-// --------------------------------------------------------------------------
-
-#define MS_VARS_GETCONTACTFROMSTRING "Vars/GetContactFromString"
-
-// Searching for contacts in the database. You can find contacts in db by
-// searching for their name, e.g first name.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(CONTACTSINFO *)&ci
-// See below.
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Returns number of contacts found matching the given string representation.
-// The hContacts array of CONTACTSINFO struct contains these hContacts after
-// the call.
-
-// Note: The hContacts array needs to be freed after use using
-// MS_VARS_FREEMEMORY.
-
-typedef struct {
- int cbSize; // Set this to sizeof(CONTACTSINFO).
- union {
- char *szContact; // String to search for, e.g. last name (can't be NULL).
- WCHAR *wszContact;
- TCHAR *tszContact;
- };
- HANDLE *hContacts; // (output) Array of contacts found.
- DWORD flags; // Contact details that will be matched with the search
- // string (flags can be combined).
-} CONTACTSINFO;
-
-// Possible flags:
-#define CI_PROTOID 0x00000001 // The contact in the string is encoded
- // in the format <PROTOID:UNIQUEID>, e.g.
- // <ICQ:12345678>.
-#define CI_NICK 0x00000002 // Search nick names.
-#define CI_LISTNAME 0x00000004 // Search custom names shown in contact
- // list.
-#define CI_FIRSTNAME 0x00000008 // Search contact's first names (contact
- // details).
-#define CI_LASTNAME 0x00000010 // Search contact's last names (contact
- // details).
-#define CI_EMAIL 0x00000020 // Search contact's email adresses
- // (contact details).
-#define CI_UNIQUEID 0x00000040 // Search unique ids of the contac, e.g.
- // UIN.
-#define CI_CNFINFO 0x40000000 // Searches one of the CNF_* flags (set
- // flags to CI_CNFINFO|CNF_X), only one
- // CNF_ type possible
-#define CI_UNICODE 0x80000000 // tszContact is a unicode string
- // (WCHAR*).
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define CI_TCHAR CI_UNICODE // Strings in structure are TCHAR*.
-#else
-#define CI_TCHAR 0
-#endif
-
-
-
-#endif //__M_VARS
diff --git a/plugins/clist_nicer/clist_nicer_10.vcxproj b/plugins/clist_nicer/clist_nicer_10.vcxproj index d71b48b32c..ad11d0d1c0 100644 --- a/plugins/clist_nicer/clist_nicer_10.vcxproj +++ b/plugins/clist_nicer/clist_nicer_10.vcxproj @@ -83,7 +83,7 @@ </HeaderFileName>
</Midl>
<ClCompile>
- <AdditionalIncludeDirectories>../../include;./include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;./include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<CompileAs>Default</CompileAs>
@@ -129,7 +129,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;./include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -166,7 +166,7 @@ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>../../include;./include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;./include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
<Optimization>Disabled</Optimization>
@@ -183,7 +183,7 @@ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>../../include;./include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;./include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<WholeProgramOptimization>true</WholeProgramOptimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
diff --git a/plugins/extraicons/m_extraicons.h b/plugins/extraicons/m_extraicons.h deleted file mode 100644 index 1e86cb168e..0000000000 --- a/plugins/extraicons/m_extraicons.h +++ /dev/null @@ -1,182 +0,0 @@ -/*
- Copyright (C) 2009 Ricardo Pescuma Domenecci
-
- This is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this file; see the file license.txt. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- */
-
-#ifndef __M_EXTRAICONS_H__
-#define __M_EXTRAICONS_H__
-
-
-/*
-
-There is 2 ways of registering with Extra Icons service:
-
-1. Using callbacks
- This works similar to clist API. When you register you provide 2 callbacks, one to rebuild the icons
-and one to apply the icons for a contact.
- In the RebuildIcons callback, all icons that will be used have to be registered calling
-MS_CLIST_EXTRA_ADD_ICON service. The value returned by this service has to be stored and used in the
-apply icons.
- The ApplyIcons callback will be called for all the needed contacts. Inside it, you must call
-MS_EXTRAICON_SET_ICON to set the icon for the contact, sending the value returned by MS_CLIST_EXTRA_ADD_ICON
-as the hImage.
-
-2. Using icolib
- In this case no callback is needed and the plugin just need to call MS_EXTRAICON_SET_ICON passing the
-icolib name in icoName when needed. If your plugin can have extra icons on startup, remember to do a loop
-over all contacts to set the initial icon.
-
-
-To register a new extra icon, you have to call MS_EXTRAICON_REGISTER passing the needed atributes.
-
-*/
-
-#define MIID_EXTRAICONSSERVICE { 0x62d80749, 0xf169, 0x4592, { 0xb4, 0x4d, 0x3d, 0xd6, 0xde, 0x9d, 0x50, 0xc5 } }
-
-
-#define EXTRAICON_TYPE_CALLBACK 0 // Similar to old clist callbacks, it fires 2 notifications
-#define EXTRAICON_TYPE_ICOLIB 1 // This extra icon will use only icons registered with icolib. No callbacks
- // needed. Just call MS_EXTRAICON_SET_ICON passing the name of the extraicon to set one.
-
-
-typedef struct {
- int cbSize;
- int type; // One of EXTRAICON_TYPE_*
- const char *name; // Internal name. More than one plugin can register extra icons with the same name
- // if both have the same type. In this case, both will be handled as one.
- // If the types are different the second one will be denied.
- const char *description; // [Translated by plugin] Description to be used in GUI
- const char *descIcon; // [Optional] Name of an icon registered with icolib to be used in GUI.
-
- // If type == EXTRAICON_TYPE_CALLBACK this two must be set
-
- // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
- // wParam=lParam=0
- MIRANDAHOOK RebuildIcons;
-
- // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
- // wParam = HANDLE hContact
- // lParam = 0
- MIRANDAHOOK ApplyIcon;
-
- // Other optional callbacks
-
- // [Optional] Callback called when extra icon was clicked
- // wParam = HANDLE hContact
- // lParam = int slot
- // param = onClickParam
- MIRANDAHOOKPARAM OnClick;
-
- LPARAM onClickParam;
-
-} EXTRAICON_INFO;
-
-
-// Register an extra icon
-// wParam = (EXTRAICON_INFO *) Extra icon info
-// lParam = 0
-// Return: (HANDLE) id of extra icon on success, 0 on error
-#define MS_EXTRAICON_REGISTER "ExtraIcon/Register"
-
-
-typedef struct {
- int cbSize;
- HANDLE hExtraIcon; // Value returned by MS_EXTRAICON_REGISTER
- HANDLE hContact; // Contact to set the extra icon
- union { // The icon to be set. This depends on the type of the extra icon:
- HANDLE hImage; // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
- const char *icoName; // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
- };
-} EXTRAICON;
-
-// Set an extra icon icon
-// wParam = (EXTRAICON *) Extra icon
-// Return: 0 on success
-#define MS_EXTRAICON_SET_ICON "ExtraIcon/SetIcon"
-
-
-
-#ifndef _NO_WRAPPERS
-#ifdef __cplusplus
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon,
- MIRANDAHOOK RebuildIcons,
- MIRANDAHOOK ApplyIcon,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = 0)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_CALLBACK;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.RebuildIcons = RebuildIcons;
- ei.ApplyIcon = ApplyIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon = NULL,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = 0)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_ICOLIB;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.hImage = hImage;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, const char *icoName)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.icoName = icoName;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-#endif
-#endif
-
-
-#endif // __M_EXTRAICONS_H__
diff --git a/plugins/folders/docs/m_folders.h b/plugins/folders/docs/m_folders.h deleted file mode 100644 index 02d4d3564e..0000000000 --- a/plugins/folders/docs/m_folders.h +++ /dev/null @@ -1,292 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-#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%"
-
-#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_AVATARS PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\avatars")
-#define FOLDER_VCARDS PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\vcards")
-#define FOLDER_LOGS PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\logs")
-#define FOLDER_RECEIVED_FILES PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\received files")
-#define FOLDER_DOCS MIRANDA_PATHT _T("\\") _T("docs")
-#define FOLDER_CONFIG PLUGINS_PATHT _T("\\") _T("config")
-#define FOLDER_SCRIPTS MIRANDA_PATHT _T("\\") _T("scripts")
-#define FOLDER_UPDATES MIRANDA_PATHT _T("\\") _T("updates")
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATHT _T("\\") _T("customize")
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE _T("\\sounds")
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE _T("\\icons")
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE _T("\\smileys")
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE _T("\\skins")
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE _T("\\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
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- 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
- 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.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#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 HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- 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 (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- 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
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- 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_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- 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);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- 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';
- }
-
- 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
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/plugins/metacontacts/m_metacontacts.h b/plugins/metacontacts/m_metacontacts.h deleted file mode 100644 index 9f348bd2c6..0000000000 --- a/plugins/metacontacts/m_metacontacts.h +++ /dev/null @@ -1,166 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#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
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/plugins/modernb/clist_modern_10.vcxproj b/plugins/modernb/clist_modern_10.vcxproj index 6d39f024cc..54886dcda8 100644 --- a/plugins/modernb/clist_modern_10.vcxproj +++ b/plugins/modernb/clist_modern_10.vcxproj @@ -97,7 +97,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG_LOG;WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
@@ -143,7 +143,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG_LOG;WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
@@ -193,7 +193,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -248,7 +248,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/plugins/modernb/hdr/modern_commonheaders.h b/plugins/modernb/hdr/modern_commonheaders.h index 91628f809c..9dda706e1a 100644 --- a/plugins/modernb/hdr/modern_commonheaders.h +++ b/plugins/modernb/hdr/modern_commonheaders.h @@ -118,7 +118,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "modern_clist.h"
#include "modern_cluiframes.h"
#include "m_cluiframes.h"
-#include "../m_api/m_metacontacts.h"
+#include "m_metacontacts.h"
#include "../m_api/m_skin_eng.h"
#include "modern_rowheight_funcs.h"
@@ -126,12 +126,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "modern_log.h"
#include "richedit.h"
-#include "../m_api/m_variables.h"
+#include "m_variables.h"
-#include "../m_api/m_smileyadd.h"
+#include "m_smileyadd.h"
#include "../m_api/m_xpTheme.h"
-#include "../m_api/m_toolbar.h"
+#include "m_toolbar.h"
#include "../resource.h"
diff --git a/plugins/modernb/m_api/m_metacontacts.h b/plugins/modernb/m_api/m_metacontacts.h deleted file mode 100644 index 1da12b97fa..0000000000 --- a/plugins/modernb/m_api/m_metacontacts.h +++ /dev/null @@ -1,162 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-//get the handle for a contact's parent metacontact
-//wParam=(HANDLE)hSubContact
-//lParam=0
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/plugins/modernb/m_api/m_smileyadd.h b/plugins/modernb/m_api/m_smileyadd.h deleted file mode 100644 index bae3890c7b..0000000000 --- a/plugins/modernb/m_api/m_smileyadd.h +++ /dev/null @@ -1,252 +0,0 @@ -/*
-Miranda SmileyAdd Plugin
-Copyright (C) 2005 - 2009 Boris Krasnovskiy
-Copyright (C) 2003 - 2004 Rein-Peter de Boer
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include <richedit.h>
-
-#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
- // this flag allows "true" transparency
-#define SAFLRE_OUTGOING 4 // Parsing outgoing message
-#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- HWND hwndRichEditControl; //handle to the rich edit control
- CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. SmileyAdd will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL, "Standard" will be used
- unsigned flags; //Flags (SAFLRE_*) that define the behaivior
- BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HANDLE hContact; //Contact handle
-} SMADD_RICHEDIT3;
-
-//Replace smileys in a rich edit control...
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; //protocol to use... if you have defined a protocol, you can
- //use your own protocol name. Smiley add will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
-
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
- HWND hwndParent; //Parent window for smiley dialog
- HANDLE hContact; //Contact handle
-} SMADD_SHOWSEL3;
-
-//Show smiley selection window
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; // " "
- HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
- //of the smiley that can be used on the button
- //if used with GETINFO2 handle must be destroyed by user!
- //NULL if the buttonicon is not defined...
- int NumberOfVisibleSmileys; //Number of visible smileys defined.
- int NumberOfSmileys; //Number of total smileys defined
- HANDLE hContact; //Contact handle
-} SMADD_INFO2;
-
-//get button smiley icon
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
-
-// Event notifies that SmileyAdd options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
-//wParam = Contact handle which options have changed, NULL if global options changed
-//lParam = (LPARAM) 0; not used
-#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
-
-#define SAFL_PATH 1 // provide smiley file path, icon otherwise
-#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
-#define SAFL_OUTGOING 4 // Parsing outgoing message
-#define SAFL_NOCUSTOM 8 // Do not use custom smileys
-
-#if defined _UNICODE || defined UNICODE
- #define SAFL_TCHAR SAFL_UNICODE
-#else
- #define SAFL_TCHAR 0
-#endif
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- union {
- TCHAR* str; //String to parse
- char* astr;
- wchar_t* wstr;
- };
- unsigned flag; //One of the SAFL_ flags specifies parsing requirements
- //This parameter should be filled by the user
-
- unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
- unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
- //this parameter filled by SmileyAdd
- HANDLE hContact; //Contact handle
-} SMADD_BATCHPARSE2;
-
-typedef struct
-{
- unsigned startChar; //Starting smiley character
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- unsigned size; //Number of characters in smiley (0 if not found)
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- union {
- const TCHAR* filepath;
- const char* afilepath;
- const wchar_t* wfilepath;
- HICON hIcon; //User responsible for destroying icon handle
- };
-} SMADD_BATCHPARSERES;
-
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
-#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
-#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* name; //smiley category name for reference
- char* dispname; //smiley category name for display
-} SMADD_REGCAT;
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; pointer to SMADD_REGCAT
-#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) Pointer to protocol name or NULL for all;
-#define MS_SMILEYADD_RELOAD "SmileyAdd/Reload"
-
-#ifndef MIID_SMILEY
-// {E03C71B2-6DEE-467e-A4F0-DD516745876A}
-#define MIID_SMILEY { 0xe03c71b2, 0x6dee, 0x467e, { 0xa4, 0xf0, 0xdd, 0x51, 0x67, 0x45, 0x87, 0x6a } }
-#endif
-
-/**
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-
-*/
-
-// Type of Event one of
-#define FVCN_PREFIRE 1
-#define FVCN_POSTFIRE 2
-
-// Action of event are going to be done
-#define FVCA_NONE 0
-#define FVCA_DRAW 1 // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
-#define FVCA_CUSTOMDRAW 2
-//#define FVCA_INVALIDATE 3 (not supported)
-//#define FVCA_SENDVIEWCHANGE 4 (not supported)
-#define FVCA_SKIPDRAW 5
-
-// Extended NMHDR structure for WM_NOTIFY
-typedef struct
-{
- //NMHDR structure
- HWND hwndFrom; // Window of smiley host
- UINT idFrom; // ignored
- UINT code; // NM_FIREVIEWCHANGE
-
- size_t cbSize;
- BYTE bEvent; // FVCN_ value - pre- or post- painting
- BYTE bAction; // FVCA_ keys
- HDC hDC; // Canvas to draw on
- RECT rcRect; // Valid/should be in case of FVCA_DRAW
- COLORREF clrBackground; // color to fill background if fTransparent is not set
- BOOL fTransparent; // if need to fill back color (not supported)
- LPARAM lParam; // used by host window PreFire and PostFire event
-} FVCNDATA_NMHDR;
-
-// Code of WM_NOTIFY message (code)
-#define NM_FIREVIEWCHANGE NM_FIRST+1;
-
-typedef struct
-{
- unsigned cbSize; // size of the structure
- HANDLE hContact;
- int type; // 0 - directory, 1 - file;
- TCHAR* path; // smiley category name for reference
-} SMADD_CONT;
-
-//Loads all smileys for the contact
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
-#define MS_SMILEYADD_LOADCONTACTSMILEYS "SmileyAdd/LoadContactSmileys"
diff --git a/plugins/modernb/m_api/m_toolbar.h b/plugins/modernb/m_api/m_toolbar.h deleted file mode 100644 index fc417cf873..0000000000 --- a/plugins/modernb/m_api/m_toolbar.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef M_TOOLBAR_H
-#define M_TOOLBAR_H
-
-#define TOOLBARBUTTON_ICONIDPREFIX "MTB_"
-#define TOOLBARBUTTON_ICONIDPRIMARYSUFFIX "_Primary"
-#define TOOLBARBUTTON_ICONIDSECONDARYSUFFIX "_Secondary"
-#define TOOLBARBUTTON_ICONNAMEPRESSEDSUFFIX "Pressed"
-
-//button flags
-#define TBBF_DISABLED (1<<0)
-#define TBBF_VISIBLE (1<<1)
-#define TBBF_PUSHED (1<<2)
-#define TBBF_SHOWTOOLTIP (1<<3)
-#define TBBF_ISSEPARATOR (1<<5)
-#define TBBF_ISLBUTTON (1<<6)
-#define TBBF_FLEXSIZESEPARATOR (TBBF_ISSEPARATOR|TBBF_PUSHED)
-typedef struct _tagTBButton
-{
- int cbSize; // size of structure
- char * pszButtonID; // char id of button used to store button info in DB and know about icon
- char * pszButtonName; // name of button (not translated)
- char * pszServiceName; // service name to be executed
- LPARAM lParam; // param of service to be called
- char * pszTooltipUp, *pszTooltipDn;
- DWORD defPos; // default order pos of button (less values are nearer to edge).. please use values greater that 100. the default buttons has pos: 10,20..90
- DWORD tbbFlags; // combine of TBBF_ flags above
- void (*ParamDestructor)(void *); //will be called on parameters deletion
- HANDLE hPrimaryIconHandle;
- HANDLE hSecondaryIconHandle;
-}TBButton;
-
-//////////////////////////////////////////////////////////////////////////
-// Events
-// Only after this event module subscribers should register their buttons
-// wparam=lparam=0
-// don't forget to return 0 to continue processing
-#define ME_TB_MODULELOADED "ToolBar/ModuleLoaded"
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-// WPARAM = 0
-// LPARAM = (TBButton *) &description
-// LRESULT = (HANDLE) hButton
-// in order to correctly process default icons via iconlib it should be
-// registered icolib icon with id named:
-// 'TBButton_'+pszButtonID+ 'Up' or +'Down' for Push (2-state) buttons
-#define MS_TB_ADDBUTTON "ToolBar/AddButton"
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-// WPARAM = (HANDLE) hButton;
-// LPARAM = 0;
-#define MS_TB_REMOVEBUTTON "ToolBar/RemoveButton"
-
-//////////////////////////////////////////////////////////////////////////
-// SetState
-// WPARAM = (HANDLE) hButton;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
-#define TBST_PUSHED 1
-#define TBST_RELEASED 0
-#define MS_TB_SETBUTTONSTATE "ToolBar/SetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// SetStatebyId
-// WPARAM = (char *) szButtonID;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
-#define MS_TB_SETBUTTONSTATEBYID "ToolBar/SetButtonStateId"
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (HANLDE) hButton;
-// LPARAM = 0
-// LRESULT= current state
-#define MS_TB_GETBUTTONSTATE "ToolBar/GetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (char *) szButtonID;;
-// LPARAM = 0
-// LRESULT= current state
-#define MS_TB_GETBUTTONSTATEBYID "ToolBar/GetButtonStateId"
-
-
-#endif
\ No newline at end of file diff --git a/plugins/modernb/m_api/m_variables.h b/plugins/modernb/m_api/m_variables.h deleted file mode 100644 index 73ab9a4f17..0000000000 --- a/plugins/modernb/m_api/m_variables.h +++ /dev/null @@ -1,256 +0,0 @@ -/*
- Variables Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2005 P. Boon
-
- 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
-*/
-#ifndef __M_VARS
-#define __M_VARS
-
-#define FIF_TCHAR 0x01 // expects and returns TCHAR*
-
-typedef struct {
- int cbSize;
- int flags;
- union {
- char *szFormat;
- TCHAR *tszFormat;
- };
- union {
- char *szSource;
- TCHAR *tszSource;
- };
- HANDLE hContact;
- int pCount; // number of succesful parses
- int eCount; // number of failures
-} FORMATINFO;
-#define MS_VARS_FORMATSTRING "Vars/FormatString"
-
-#define CI_PROTOID 0x00000001
-#define CI_NICK 0x00000002
-#define CI_LISTNAME 0x00000004
-#define CI_FIRSTNAME 0x00000008
-#define CI_LASTNAME 0x00000010
-#define CI_EMAIL 0x00000020
-#define CI_UNIQUEID 0x00000040
-#define CI_TCHAR 0x80000000 // tszContact is of type TCHAR
-typedef struct {
- int cbSize;
- union {
- char *szContact;
- TCHAR *tszContact;
- };
- HANDLE *hContacts;
- DWORD flags;
-} CONTACTSINFO;
-
-// wparam = (CONTACTSINFO *)
-// lparam = 0
-// returns number of contacts found, hContacts array contains these hContacts
-#define MS_VARS_GETCONTACTFROMSTRING "Vars/GetContactFromString"
-
-#define AIF_DONTPARSE 0x01 // don't parse the result of this function
-#define AIF_FALSE 0x02 // (logical) false
-//#define AIF_ERR_ARGS 0x04 // invalid arguments
-
-typedef struct {
- int cbSize; // in
- FORMATINFO *fi; // in
- unsigned int argc; // in
- union {
- char **argv; // in (argv[0] will be the tokenstring)
- TCHAR **targv;
- };
- int flags; // out (AIF_*)
-} ARGUMENTSINFO;
-
-#define TR_MEM_VARIABLES 1 // the memory will be allocated in Variable's memory space (not implemented)
-#define TR_MEM_MIRANDA 2 // the memory will be allocated in Miranda's memory space,
- // if TRF_FREEMEM is set, the memory will be freed by Variables.
-#define TR_MEM_OWNER 3 // the memory is in the caller's memory space, Variables won't touch it,
- // even if TRF_FREEMEM is set
-
-#define TRF_FREEMEM 0x01 // free the memory if possible
-#define TRF_CALLSVC 0x02 // cal szCleanupService when Variables doesn't need the result anymore
-#define TRF_UNPARSEDARGS 0x04 // give the arguments unparsed (if available)
-#define TRF_FIELD 0x08 // the token can be used as a %field%
-#define TRF_FUNCTION 0x10 // the token can be used as a ?function()
-#define TRF_TCHAR 0x20 // the token is given as TCHAR* and the service returns TCHAR*
-
-typedef struct {
- int cbSize;
- union {
- char *szTokenString; // non-built-in variable WITHOUT '%' or '?' or '!'
- TCHAR *tszTokenString;
- };
- char *szService; // service to call, must return a 0 terminating string or NULL on error, will be called
- // with wparam = 0 and lparam = ARGUMENTSINFO *ai
- char *szCleanupService; // only if flag VRF_CALLSVC is set, will be called when variable copied the result
- // in it's own memory. wParam = 0, lParam = result from szService call.
- char *szHelpText; // shown in help dialog, maybe NULL or in format
- // "subject\targuments\tdescription" ("math\t(x, y ,...)\tx + y + ...") or
- // "subject\tdescription" ("miranda\tpath to the Miranda-IM executable")
- // subject and description are translated automatically
- int memType; // set to TR_MEM_* if you use the flag VRF_FREEMEM
- int flags; // one of TRF_*
-} TOKENREGISTER;
-
-// wparam = 0
-// lparam = (LPARAM)&TOKENREGISTER
-// returns 0 on success
-#define MS_VARS_REGISTERTOKEN "Vars/RegisterToken"
-
-// wparam = (void *)pnt
-// lparam = 0
-// free the memory from variables' memory space pointed by pnt
-#define MS_VARS_FREEMEMORY "Vars/FreeMemory"
-
-// Returns Variable's RTL/CRT function poiners to malloc() free() realloc()
-// wParam=0, lParam = (LPARAM) &MM_INTERFACE (see m_system.h)
-// copied from Miranda's core (miranda.c)
-#define MS_VARS_GET_MMI "Vars/GetMMI"
-
-__inline static void variables_free(void *ptr) {
-
- if (ptr) {
- struct MM_INTERFACE mm;
- mm.cbSize=sizeof(struct MM_INTERFACE);
- CallService(MS_VARS_GET_MMI,0,(LPARAM)&mm);
- mm.mmi_free(ptr);
- }
-}
-
-// wparam = (HWND)hwnd (may be NULL)
-// lparam = (char *)string (may be NULL)
-// when [ok] is pressed in the help box, hwnd's text will be set to the text in the help box.
-// the text of hwnd is set as initial text if string is NULL
-// string is set as initial value of the text box and EN_CHANGE will be send
-// returns the handle to the help dialog. Only one can be opened at a time.
-// WARNING: This service has not yet been converted to UNICODE, it will certainly change in the near future
-#define MS_VARS_SHOWHELP "Vars/ShowHelp"
-
-
-// don't use these yet, WIP
-#define VARM_PARSE WM_USER+1
-#define VARM_SETSUBJECT WM_USER+2
-#define VARM_GETSUBJECT WM_USER+3
-#define VARM_SETEXTRATEXT WM_USER+4
-#define VARM_GETEXTRATEXT WM_USER+5
-
-/*** HELPERS ***/
-
-__inline static char *variables_parseA(char *src, char *extra, HANDLE hContact) {
-
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.szFormat = src;
- fi.szSource = extra;
- fi.hContact = hContact;
- return (char *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
-}
-
-__inline static char *variables_parseT(TCHAR *src, TCHAR *extra, HANDLE hContact) {
-
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = src;
- fi.tszSource = extra;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
- return (char *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
-}
-
-#ifdef UNICODE
-#define variables_parse(x,y,z) variables_parseT(x,y,z)
-#else
-#define variables_parse(x,y,z) variables_parseA(x,y,z)
-#endif
-
-/*
-Returns copy of src if Variables is not installed, or a copy of the parsed string if it is installed.
-If the returned value is not NULL, it must be free using your own free().
-*/
-__inline static char *variables_parsedupA(char *src, char *extra, HANDLE hContact) {
-
- FORMATINFO fi;
- char *parsed, *res;
-
- if (src == NULL) {
- return NULL;
- }
- if (!ServiceExists(MS_VARS_FORMATSTRING)) {
- return _strdup(src);
- }
- res = NULL;
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.szFormat = src;
- fi.szSource = extra;
- fi.hContact = hContact;
- parsed = (char *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- if (parsed != NULL) {
- res = _strdup(parsed);
- CallService(MS_VARS_FREEMEMORY, (WPARAM)parsed, 0);
- }
- else {
- return _strdup(src);
- }
- return res;
-}
-
-/*
-Returns copy of src if Variables is not installed, or a copy of the parsed string if it is installed.
-If the returned value is not NULL, it must be free using your own free().
-*/
-__inline static TCHAR *variables_parsedupT(TCHAR *src, TCHAR *extra, HANDLE hContact) {
-
- FORMATINFO fi;
- TCHAR *parsed, *res;
-
- if (src == NULL) {
- return NULL;
- }
- if (!ServiceExists(MS_VARS_FORMATSTRING)) {
- return _tcsdup(src);
- }
- res = NULL;
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = src;
- fi.tszSource = extra;
- fi.hContact = hContact;
- fi.flags |= FIF_TCHAR;
- parsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- if (parsed != NULL) {
- res = _tcsdup(parsed);
- CallService(MS_VARS_FREEMEMORY, (WPARAM)parsed, 0);
- }
- else {
- return _tcsdup(src);
- }
- return res;
-}
-
-#ifdef UNICODE
-#define variables_parsedup(x,y,z) variables_parsedupT(x,y,z)
-#else
-#define variables_parsedup(x,y,z) variables_parsedupA(x,y,z)
-#endif
-
-#endif
diff --git a/plugins/modernb/modern_clcitems.cpp b/plugins/modernb/modern_clcitems.cpp index fa7a272b77..36ab3bca7a 100644 --- a/plugins/modernb/modern_clcitems.cpp +++ b/plugins/modernb/modern_clcitems.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_clc.h"
#include "hdr/modern_clc.h"
#include "hdr/modern_clist.h"
-#include "m_api/m_metacontacts.h"
+#include "m_metacontacts.h"
#include "hdr/modern_commonprototypes.h"
void AddSubcontacts(struct ClcData *dat, struct ClcContact * cont, BOOL showOfflineHereGroup)
diff --git a/plugins/modernb/modern_toolbar.cpp b/plugins/modernb/modern_toolbar.cpp index c63dbbfec6..44cf94da05 100644 --- a/plugins/modernb/modern_toolbar.cpp +++ b/plugins/modernb/modern_toolbar.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "hdr/modern_commonheaders.h"
#include "hdr/modern_commonprototypes.h"
#include "./m_api/m_skinbutton.h"
-#include "./m_api/m_toolbar.h"
+#include "m_toolbar.h"
#include "hdr/modern_sync.h"
//external definition
diff --git a/plugins/modernb/modern_viewmodebar.cpp b/plugins/modernb/modern_viewmodebar.cpp index 778959413d..4cb22d8c28 100644 --- a/plugins/modernb/modern_viewmodebar.cpp +++ b/plugins/modernb/modern_viewmodebar.cpp @@ -26,7 +26,7 @@ $Id: viewmodes.c 2998 2006-06-01 07:11:52Z nightwish2004 $ */
#include "hdr/modern_commonheaders.h"
-#include "m_api/m_variables.h"
+#include "m_variables.h"
#include "hdr/modern_cluiframes.h"
#include "m_api/m_skinbutton.h"
diff --git a/plugins/mwclist/m_metacontacts.h b/plugins/mwclist/m_metacontacts.h deleted file mode 100644 index a7e73a2e25..0000000000 --- a/plugins/mwclist/m_metacontacts.h +++ /dev/null @@ -1,118 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-#endif
\ No newline at end of file diff --git a/plugins/tabsrmm/API/m_buttonbar.h b/plugins/tabsrmm/API/m_buttonbar.h deleted file mode 100644 index 9be67e965b..0000000000 --- a/plugins/tabsrmm/API/m_buttonbar.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _BUTTONSBAR_H
-#define _BUTTONSBAR_H
-
-#define MIN_CBUTTONID 4000
-#define MAX_CBUTTONID 5000
-
-#define BBSF_IMBUTTON (1<<0)
-#define BBSF_CHATBUTTON (1<<1)
-#define BBSF_CANBEHIDDEN (1<<2)
-#define BBSF_NTBSWAPED (1<<3)
-#define BBSF_NTBDESTRUCT (1<<4)
-
-typedef struct _tagCustomButtonData
- {
- DWORD dwButtonOrigID; // id of button used while button creation and to store button info in DB
- char * pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
-
- DWORD dwButtonCID;
- DWORD dwArrowCID; //only use with BBBF_ISARROWBUTTON flag
-
- TCHAR * ptszTooltip; //button's tooltip
-
- DWORD dwPosition; // default order pos of button, counted from window edge (left or right)
- int iButtonWidth; //must be 22 for regular button and 33 for button with arrow
- HANDLE hIcon; //Handle to icolib registred icon
- BOOL bIMButton,bChatButton;
- BOOL bCanBeHidden,bHidden,bAutoHidden,bDummy,bDisabled,bPushButton;
- BOOL bLSided,bRSided;
- BYTE opFlags;
- }CustomButtonData;
-
-static INT_PTR CB_ModifyButton(WPARAM wParam, LPARAM lParam);
-static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam);
-static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam);
-static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam);
-static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam);
-static void CB_GetButtonSettings(HANDLE hContact,CustomButtonData *cbd);
-
-void CB_WriteButtonSettings(HANDLE hContact,CustomButtonData *cbd);
-int sstSortButtons(const void * vmtbi1, const void * vmtbi2);
-
-void CB_DeInitCustomButtons();
-void CB_InitCustomButtons();
-void CB_InitDefaultButtons();
-void CB_ReInitCustomButtons();
-
-/* MinGW doesn't like this struct declatations below */
-void BB_UpdateIcons(HWND hdlg,struct TWindowData *dat);
-void BB_RefreshTheme(const TWindowData *dat);
-void CB_DestroyAllButtons(HWND hwndDlg,struct TWindowData *dat);
-void CB_DestroyButton(HWND hwndDlg,struct TWindowData *dat,DWORD dwButtonCID,DWORD dwFlags);
-void CB_ChangeButton(HWND hwndDlg,struct TWindowData *dat,CustomButtonData* cbd);
-
-#endif
diff --git a/plugins/tabsrmm/API/m_cln_skinedit.h b/plugins/tabsrmm/API/m_cln_skinedit.h deleted file mode 100644 index 5ee66829c5..0000000000 --- a/plugins/tabsrmm/API/m_cln_skinedit.h +++ /dev/null @@ -1,147 +0,0 @@ -
-/*
- * services
- */
-
-#define MS_CLNSE_INVOKE "CLN_Skinedit/Invoke"
-#define MS_CLNSE_FILLBYCURRENTSEL "CLN_Skinedit/FillByCurrentSel"
-
-/*
- * data structs
- */
-
-struct TWindowData;
-class CImageItem;
-
-struct ButtonItem {
- TCHAR szName[40];
- HWND hWnd;
- LONG xOff, yOff;
- LONG width, height;
- CImageItem *imgNormal, *imgPressed, *imgHover;
- LONG_PTR normalGlyphMetrics[4];
- LONG_PTR hoverGlyphMetrics[4];
- LONG_PTR pressedGlyphMetrics[4];
- DWORD dwFlags, dwStockFlags;
- DWORD uId;
- TCHAR szTip[256];
- char szService[256];
- char szModule[256], szSetting[256];
- BYTE bValuePush[256], bValueRelease[256];
- DWORD type;
- void (*pfnAction)(ButtonItem *item, HWND hwndDlg, TWindowData *dat, HWND hwndItem);
- void (*pfnCallback)(ButtonItem *item, HWND hwndDlg, TWindowData *dat, HWND hwndItem);
- TCHAR tszLabel[40];
- ButtonItem* nextItem;
- HANDLE hContact;
- TWindowData *dat;
-};
-
-typedef struct _tagButtonSet {
- ButtonItem *items;
- LONG left, top, right, bottom; // client area offsets, calculated from button layout
-} ButtonSet;
-
-struct CSkinItem {
- TCHAR szName[40];
- char szDBname[40];
- int statusID;
-
- BYTE GRADIENT;
- BYTE CORNER;
-
- DWORD COLOR;
- DWORD COLOR2;
-
- BYTE COLOR2_TRANSPARENT;
-
- DWORD TEXTCOLOR;
-
- int ALPHA;
-
- int MARGIN_LEFT;
- int MARGIN_TOP;
- int MARGIN_RIGHT;
- int MARGIN_BOTTOM;
- BYTE IGNORED;
- DWORD BORDERSTYLE;
- CImageItem *imageItem;
-};
-
-typedef struct _tagSkinDescription {
- DWORD cbSize;
- CSkinItem *StatusItems;
- int lastItem;
- int firstItem;
- char szModule[100];
- HWND hWndParent, hWndTab;
- HWND hwndCLUI;
- HWND hwndSkinEdit; /* out param */
- HWND hwndImageEdit; /* out param */
- HMENU hMenuItems;
- void (*pfnSaveCompleteStruct)(void);
- void (*pfnClcOptionsChanged )(void);
- void* (*pfnMalloc)(unsigned int);
- void (*pfnFree)(void);
- void* (*pfnRealloc)(void *, unsigned int);
- void* reserved[20];
-} SKINDESCRIPTION;
-
-// defines
-
-// FLAGS
-#define CORNER_NONE 0
-#define CORNER_ACTIVE 1
-#define CORNER_TL 2
-#define CORNER_TR 4
-#define CORNER_BR 8
-#define CORNER_BL 16
-#define CORNER_ALL (CORNER_TL | CORNER_TR | CORNER_BR | CORNER_BL | CORNER_ACTIVE)
-
-#define GRADIENT_NONE 0
-#define GRADIENT_ACTIVE 1
-#define GRADIENT_LR 2
-#define GRADIENT_RL 4
-#define GRADIENT_TB 8
-#define GRADIENT_BT 16
-
-#define IMAGE_PERPIXEL_ALPHA 1
-#define IMAGE_FLAG_DIVIDED 2
-#define IMAGE_FILLSOLID 4
-#define IMAGE_GLYPH 8
-
-#define IMAGE_STRETCH_V 1
-#define IMAGE_STRETCH_H 2
-#define IMAGE_STRETCH_B 4
-
-#define BUTTON_ISINTERNAL 1
-#define BUTTON_ISTOGGLE 2
-#define BUTTON_ISSERVICE 4
-#define BUTTON_ISPROTOSERVICE 8
-#define BUTTON_PASSHCONTACTW 16
-#define BUTTON_PASSHCONTACTL 32
-#define BUTTON_ISDBACTION 64
-#define BUTTON_ISCONTACTDBACTION 128
-#define BUTTON_DBACTIONONCONTACT 256
-#define BUTTON_ISSIDEBAR 512
-#define BUTTON_NORMALGLYPHISICON 1024
-#define BUTTON_PRESSEDGLYPHISICON 2048
-#define BUTTON_HOVERGLYPHISICON 4096
-#define BUTTON_HASLABEL 8192
-
-#define CLCDEFAULT_GRADIENT 0
-#define CLCDEFAULT_CORNER 0
-
-#define CLCDEFAULT_COLOR 0xd0d0d0
-#define CLCDEFAULT_COLOR2 0xd0d0d0
-
-#define CLCDEFAULT_TEXTCOLOR 0x000000
-
-#define CLCDEFAULT_COLOR2_TRANSPARENT 1
-
-#define CLCDEFAULT_ALPHA 100
-#define CLCDEFAULT_MRGN_LEFT 0
-#define CLCDEFAULT_MRGN_TOP 0
-#define CLCDEFAULT_MRGN_RIGHT 0
-#define CLCDEFAULT_MRGN_BOTTOM 0
-#define CLCDEFAULT_IGNORE 1
diff --git a/plugins/tabsrmm/API/m_fingerprint.h b/plugins/tabsrmm/API/m_fingerprint.h deleted file mode 100644 index 0101166e57..0000000000 --- a/plugins/tabsrmm/API/m_fingerprint.h +++ /dev/null @@ -1,50 +0,0 @@ -/*
-Based on Miranda plugin template, originally by Richard Hughes
-http://miranda-icq.sourceforge.net/
-
-Miranda IM: the free IM client for Microsoft Windows
-
-Copyright 2000-2006 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.
-*/
-
-/************************************************************************/
-/* Author: Artem Shpynov aka FYR mailto:shpynov@nm.ru */
-/* icons by Angeli-Ka */
-/* January 12, 2006 */
-/************************************************************************/
-
-
-/*
- * FINGERPRINT PLUGIN SERVICES HEADER
- */
-
-/*
- * Service SameClients MS_FP_SAMECLIENTS
- * wParam - char * first MirVer value
- * lParam - char * second MirVer value
- * return pointer to char string - client desription (DO NOT DESTROY) if clients are same otherwise NULL
- */
-#define MS_FP_SAMECLIENTS "Fingerprint/SameClients"
-
-/*
- * ServiceGetClientIcon MS_FP_GETCLIENTICON
- * wParam - char * MirVer value to get client for.
- * lParam - int noCopy - if wParam is equal to "1" will return icon handler without copiing icon.
- */
-#define MS_FP_GETCLIENTICON "Fingerprint/GetClientIcon"
diff --git a/plugins/tabsrmm/API/m_flash.h b/plugins/tabsrmm/API/m_flash.h deleted file mode 100644 index bfc9e9f0a2..0000000000 --- a/plugins/tabsrmm/API/m_flash.h +++ /dev/null @@ -1,93 +0,0 @@ -/*
-Miranda FlashAvatars Plugin
-Plugin support header file
-Copyright (C) 2006 Big Muscle
-
-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.
-*/
-
-// Service functions
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
- */
-#define MS_FAVATAR_DESTROY "FlashAvatar/Destroy"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
- */
-#define MS_FAVATAR_MAKE "FlashAvatar/Make"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM LPRECT
- */
-#define MS_FAVATAR_RESIZE "FlashAvatar/Resize"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
- */
-#define MS_FAVATAR_GETINFO "FlashAvatar/GetInfo"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM BSTR
- */
-#define MS_FAVATAR_SETEMOFACE "FlashAvatar/SetEmoFace"
-
-#define MS_FAVATAR_SETPOS "FlashAvatar/SetPos"
-
-/**
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM COLORREF
- */
-
-#define MS_FAVATAR_SETBKCOLOR "FlashAvatar/SetBkColor"
-
-// tZers macros
-/**
- WPARAM not used
- LPARAM not used
-*/
-#define MS_TZERS_SUPPORT "FlashAvatar/tZers"
-#define EVENTTYPE_TZERS 4
-
-// Avatar emotion faces
-#define AV_SMILE "smile"
-#define AV_SAD "sad"
-#define AV_LAUGH "laugh"
-#define AV_MAD "mad"
-#define AV_CRY "cry"
-#define AV_OFFLINE "offline"
-#define AV_BUSY "busy"
-#define AV_LOVE "love"
-#define AV_NORMAL "stam"
-
-#define FAVATAR_WIDTH 52
-#define FAVATAR_HEIGHT 64
-
-// FLASHAVATAR structure
-typedef struct {
- HANDLE hContact; // contact who flash avatar belongs to
- HWND hWindow; // handle of flash avatar object
- HWND hParentWindow; // handle of flash avatar's parent object
- char* cUrl; // url of .swf file
- int id; // unique number of plugin which wants to use avatar service
- char* cProto; // contacts protocol
- char reserved[16]; // future usage
-} FLASHAVATAR;
diff --git a/plugins/tabsrmm/API/m_folders.h b/plugins/tabsrmm/API/m_folders.h deleted file mode 100644 index c6820abcda..0000000000 --- a/plugins/tabsrmm/API/m_folders.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#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"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "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 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
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- 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
- 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.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#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 HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- 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 (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- 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
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- int 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 FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- int 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 FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- int 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);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- int 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';
- }
-
- 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
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/plugins/tabsrmm/API/m_historyevents.h b/plugins/tabsrmm/API/m_historyevents.h deleted file mode 100644 index f73bf95b0f..0000000000 --- a/plugins/tabsrmm/API/m_historyevents.h +++ /dev/null @@ -1,424 +0,0 @@ -/*
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef __M_HISTORYEVENTS_H__
-# define __M_HISTORYEVENTS_H__
-
-
-#define MIID_HISTORYEVENTS { 0xc8be8543, 0x6618, 0x4030, { 0x85, 0xcf, 0x90, 0x82, 0xc7, 0xde, 0x7f, 0xf7 } }
-
-
-#define HISTORYEVENTS_FORMAT_CHAR 1
-#define HISTORYEVENTS_FORMAT_WCHAR 2
-#define HISTORYEVENTS_FORMAT_RICH_TEXT 4
-#define HISTORYEVENTS_FORMAT_HTML 8
-
-#define HISTORYEVENTS_FLAG_DEFAULT (1 << 0) // Is a miranda core event type
-#define HISTORYEVENTS_FLAG_SHOW_IM_SRMM (1 << 1) // If this event has to be shown in srmm dialog
-#define HISTORYEVENTS_FLAG_USE_SENT_FLAG (1 << 2) // Means that it can be a sent or received and uses DBEF_SENT to mark that
-#define HISTORYEVENTS_FLAG_EXPECT_CONTACT_NAME_BEFORE (1 << 3) // Means that who is drawing this should draw the contact name before the text
-#define HISTORYEVENTS_FLAG_ONLY_LOG_IF_SRMM_OPEN (1 << 4) // If this event will be logged only if the message window is open
-#define HISTORYEVENTS_FLAG_FLASH_MSG_WINDOW (1 << 5) // If this event will trigger the openning/flashing of the message window
-#define HISTORYEVENTS_REGISTERED_IN_ICOLIB (9 << 16) // If the icon is a name already registered in icolib
-#define HISTORYEVENTS_FLAG_KEEP_ONE_YEAR (1 << 8) // By default store in db for 1 year
-#define HISTORYEVENTS_FLAG_KEEP_SIX_MONTHS (2 << 8) // By default store in db for 6 months
-#define HISTORYEVENTS_FLAG_KEEP_ONE_MONTH (3 << 8) // By default store in db for 1 month
-#define HISTORYEVENTS_FLAG_KEEP_ONE_WEEK (4 << 8) // By default store in db for 1 week
-#define HISTORYEVENTS_FLAG_KEEP_ONE_DAY (5 << 8) // By default store in db for 1 day
-#define HISTORYEVENTS_FLAG_KEEP_FOR_SRMM (6 << 8) // By default store in db only enought for message log
-#define HISTORYEVENTS_FLAG_KEEP_MAX_TEN (7 << 8) // By default store in db max 10 entries
-#define HISTORYEVENTS_FLAG_KEEP_MAX_HUNDRED (8 << 8) // By default store in db for 100 entries
-#define HISTORYEVENTS_FLAG_KEEP_DONT (9 << 8) // By default don't store in db (aka ignore it)
-
-
-// This function must be implemented by subscribers. It must return a pointer or NULL
-// to say it can't handle the text
-typedef void * (*fGetHistoryEventText)(HANDLE hContact, HANDLE hDbEvent, DBEVENTINFO *dbe, int format);
-
-typedef struct {
- int cbSize;
- char *module;
- char *name; // Internal event name
- char *description; // Will be translated. When retrieving it is already translated
- WORD eventType; // The event type it can handle
- union {
- HICON defaultIcon;
- char * defaultIconName; // if HISTORYEVENTS_REGISTERED_IN_ICOLIB is set. Always use this one when retrieving
- };
- int supports; // What kind of return is supported - or of HISTORYEVENTS_FORMAT_*
- int flags; // or of HISTORYEVENTS_FLAG_*
- fGetHistoryEventText pfGetHistoryEventText; // NULL to use default get text (similar to message, without extra format)
-
- // Aditional data if wants to use add to history services
- char **templates; // Each entry is: "Name\nDefault\n%var%\tDescription\n%var%\tDescription\n%var%\tDescription"
- int numTemplates;
-
-} HISTORY_EVENT_HANDLER;
-
-
-/*
-Get the number of registered events
-
-wParam: ignored
-lParam: ignored
-Return: The number of events registered with the plugin
-*/
-#define MS_HISTORYEVENTS_GET_COUNT "HistoryEvents/GetCount"
-
-
-/*
-Get an event by number or by type.
-To retrieve by number, pass -1 as type. To retrieve by type, pass -1 as number.
-
-wParam: (int) event number
-lParam: (int) event type
-Return: (const HISTORY_EVENT_HANDLER *) if the event exists, NULL otherwise. Don't change the
- returned strunc: it is a pointer to the internall struct.
-*/
-#define MS_HISTORYEVENTS_GET_EVENT "HistoryEvents/GetEvent"
-
-
-/*
-Register a plugin that can handle an event type. This must be called during the call to the
-Load function of the plugin. In ModulesLoaded callback all plugins have to be already registered,
-so srmm and history modules can query then.
-
-wParam: HISTORY_EVENT_HANDLER *
-lParam: ignored
-Return: 0 for success
-*/
-#define MS_HISTORYEVENTS_REGISTER "HistoryEvents/Register"
-
-
-typedef struct {
- int cbSize;
- HANDLE hDbEvent;
- DBEVENTINFO *dbe; // Optional
- int format; // one of HISTORYEVENTS_FORMAT_*
-
-} HISTORY_EVENT_PARAM;
-
-/*
-Check if an event can be handled by any subscribers
-
-wParam: WORD - event type
-lParam: ignored
-Return: BOOL
-*/
-#define MS_HISTORYEVENTS_CAN_HANDLE "HistoryEvents/CanHandle"
-
-/*
-Get the icon for a history event type
-
-wParam: WORD - event type
-lParam: ignored
-Return: HICON - after use free with MS_HISTORYEVENTS_RELEASE_ICON
-*/
-#define MS_HISTORYEVENTS_GET_ICON "HistoryEvents/GetIcon"
-
-/*
-Get the flags for a history event type
-
-wParam: WORD - event type
-lParam: ignored
-Return: int - or of HISTORYEVENTS_FLAG_* or -1 if error
-*/
-#define MS_HISTORYEVENTS_GET_FLAGS "HistoryEvents/GetFlags"
-
-/*
-Release the icon for a history event type. This is really just a forward to icolib
-
-wParam: HICON
-lParam: ignored
-*/
-#define MS_HISTORYEVENTS_RELEASE_ICON "Skin2/Icons/ReleaseIcon"
-
-/*
-Get the text for a history event type
-
-wParam: HISTORY_EVENT_PARAM *
-lParam: ignored
-Return: char * or wchar * depending on sent flags. Free with mir_free or MS_HISTORYEVENTS_RELEASE_TEXT
-*/
-#define MS_HISTORYEVENTS_GET_TEXT "HistoryEvents/GetText"
-
-/*
-Release the text for a history event type. Internally is just a call to mir_free
-
-wParam: char * or wchar *
-lParam: ignored
-*/
-#define MS_HISTORYEVENTS_RELEASE_TEXT "HistoryEvents/ReleaseText"
-
-
-
-typedef struct {
- int cbSize;
- HANDLE hContact;
- WORD eventType;
- int templateNum;
- TCHAR **variables;
- int numVariables;
- PBYTE additionalData;
- int additionalDataSize;
- int flags; // Flags for the event type
-} HISTORY_EVENT_ADD;
-
-/*
-Add an registered event to the history. This is a helper service
-
-wParam: HISTORY_EVENT_ADD
-lParam: ignored
-Return: HANDLE to the db event
-*/
-#define MS_HISTORYEVENTS_ADD_TO_HISTORY "HistoryEvents/AddToHistory"
-
-/*
-Check if a template is enabled
-
-wParam: event type
-lParam: template num
-Return: TRUE or FALSE
-*/
-#define MS_HISTORYEVENTS_IS_ENABLED_TEMPLATE "HistoryEvents/IsEnabledTemplate"
-
-
-
-// Helper functions //////////////////////////////////////////////////////////////////////////////
-
-
-
-
-static int HistoryEvents_Register(char *module, char *name, char *description, int eventType, HICON defaultIcon,
- int supports, int flags, fGetHistoryEventText pfGetHistoryEventText)
-{
- HISTORY_EVENT_HANDLER heh = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_REGISTER))
- return 1;
-
- heh.cbSize = sizeof(heh);
- heh.module = module;
- heh.name = name;
- heh.description = description;
- heh.eventType = eventType;
- heh.defaultIcon = defaultIcon;
- heh.supports = supports;
- heh.flags = flags;
- heh.pfGetHistoryEventText = pfGetHistoryEventText;
- return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0);
-}
-
-static int HistoryEvents_RegisterWithTemplates(char *module, char *name, char *description, int eventType, HICON defaultIcon,
- int supports, int flags, fGetHistoryEventText pfGetHistoryEventText,
- char **templates, int numTemplates)
-{
- HISTORY_EVENT_HANDLER heh = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_REGISTER))
- return 1;
-
- heh.cbSize = sizeof(heh);
- heh.module = module;
- heh.name = name;
- heh.description = description;
- heh.eventType = eventType;
- heh.defaultIcon = defaultIcon;
- heh.supports = supports;
- heh.flags = flags;
- heh.pfGetHistoryEventText = pfGetHistoryEventText;
- heh.templates = templates;
- heh.numTemplates = numTemplates;
- return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0);
-}
-
-static int HistoryEvents_RegisterMessageStyle(char *module, char *name, char *description, int eventType, HICON defaultIcon,
- int flags, char **templates, int numTemplates)
-{
- HISTORY_EVENT_HANDLER heh = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_REGISTER))
- return 1;
-
- heh.cbSize = sizeof(heh);
- heh.module = module;
- heh.name = name;
- heh.description = description;
- heh.eventType = eventType;
- heh.defaultIcon = defaultIcon;
- heh.flags = flags;
- heh.templates = templates;
- heh.numTemplates = numTemplates;
- return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0);
-}
-
-static BOOL HistoryEvents_CanHandle(WORD eventType)
-{
- if (!ServiceExists(MS_HISTORYEVENTS_CAN_HANDLE))
- return FALSE;
-
- return (BOOL) CallService(MS_HISTORYEVENTS_CAN_HANDLE, (WPARAM) eventType, 0);
-}
-
-static HICON HistoryEvents_GetIcon(WORD eventType)
-{
- if (!ServiceExists(MS_HISTORYEVENTS_GET_ICON))
- return NULL;
-
- return (HICON) CallService(MS_HISTORYEVENTS_GET_ICON, (WPARAM) eventType, 0);
-}
-
-static int HistoryEvents_GetFlags(WORD eventType)
-{
- if (!ServiceExists(MS_HISTORYEVENTS_GET_FLAGS))
- return -1;
-
- return (int) CallService(MS_HISTORYEVENTS_GET_FLAGS, (WPARAM) eventType, 0);
-}
-
-static void HistoryEvents_ReleaseIcon(HICON icon)
-{
- CallService(MS_HISTORYEVENTS_RELEASE_ICON, (WPARAM) icon, 0);
-}
-
-static char * HistoryEvents_GetTextA(HANDLE hDbEvent, DBEVENTINFO *dbe)
-{
- HISTORY_EVENT_PARAM hep = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_GET_TEXT))
- return NULL;
-
- hep.cbSize = sizeof(hep);
- hep.hDbEvent = hDbEvent;
- hep.dbe = dbe;
- hep.format = HISTORYEVENTS_FORMAT_CHAR;
- return (char *) CallService(MS_HISTORYEVENTS_GET_TEXT, (WPARAM) &hep, 0);
-}
-
-static wchar_t * HistoryEvents_GetTextW(HANDLE hDbEvent, DBEVENTINFO *dbe)
-{
- HISTORY_EVENT_PARAM hep = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_GET_TEXT))
- return NULL;
-
- hep.cbSize = sizeof(hep);
- hep.hDbEvent = hDbEvent;
- hep.dbe = dbe;
- hep.format = HISTORYEVENTS_FORMAT_WCHAR;
- return (wchar_t *) CallService(MS_HISTORYEVENTS_GET_TEXT, (WPARAM) &hep, 0);
-}
-
-static char * HistoryEvents_GetRichText(HANDLE hDbEvent, DBEVENTINFO *dbe)
-{
- HISTORY_EVENT_PARAM hep = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_GET_TEXT))
- return NULL;
-
- hep.cbSize = sizeof(hep);
- hep.hDbEvent = hDbEvent;
- hep.dbe = dbe;
- hep.format = HISTORYEVENTS_FORMAT_RICH_TEXT;
- return (char *) CallService(MS_HISTORYEVENTS_GET_TEXT, (WPARAM) &hep, 0);
-}
-
-#define HistoryEvents_ReleaseText mir_free
-//static void HistoryEvents_ReleaseText(void *str)
-//{
-// if (!ServiceExists(MS_HISTORYEVENTS_RELEASE_TEXT))
-// return;
-//
-// CallService(MS_HISTORYEVENTS_RELEASE_TEXT, (WPARAM) str, 0);
-//}
-
-static HANDLE HistoryEvents_AddToHistoryEx(HANDLE hContact, WORD eventType, int templateNum,
- TCHAR **variables, int numVariables,
- PBYTE additionalData, int additionalDataSize,
- int flags)
-{
- HISTORY_EVENT_ADD hea = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_ADD_TO_HISTORY))
- return NULL;
-
- hea.cbSize = sizeof(hea);
- hea.hContact = hContact;
- hea.eventType = eventType;
- hea.templateNum = templateNum;
- hea.numVariables = numVariables;
- hea.variables = variables;
- hea.additionalData = additionalData;
- hea.additionalDataSize = additionalDataSize;
- hea.flags = flags;
-
- return (HANDLE) CallService(MS_HISTORYEVENTS_ADD_TO_HISTORY, (WPARAM) &hea, 0);
-}
-
-static HANDLE HistoryEvents_AddToHistoryVars(HANDLE hContact, WORD eventType, int templateNum,
- TCHAR **variables, int numVariables,
- int flags)
-{
- HISTORY_EVENT_ADD hea = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_ADD_TO_HISTORY))
- return NULL;
-
- hea.cbSize = sizeof(hea);
- hea.hContact = hContact;
- hea.eventType = eventType;
- hea.templateNum = templateNum;
- hea.numVariables = numVariables;
- hea.variables = variables;
- hea.flags = flags;
-
- return (HANDLE) CallService(MS_HISTORYEVENTS_ADD_TO_HISTORY, (WPARAM) &hea, 0);
-}
-
-static HANDLE HistoryEvents_AddToHistorySimple(HANDLE hContact, WORD eventType, int templateNum, int flags)
-{
- HISTORY_EVENT_ADD hea = {0};
-
- if (!ServiceExists(MS_HISTORYEVENTS_ADD_TO_HISTORY))
- return NULL;
-
- hea.cbSize = sizeof(hea);
- hea.hContact = hContact;
- hea.eventType = eventType;
- hea.templateNum = templateNum;
- hea.flags = flags;
-
- return (HANDLE) CallService(MS_HISTORYEVENTS_ADD_TO_HISTORY, (WPARAM) &hea, 0);
-}
-
-static BOOL HistoryEvents_IsEnabledTemplate(WORD eventType, int templateNum)
-{
- return (BOOL) CallService(MS_HISTORYEVENTS_IS_ENABLED_TEMPLATE, eventType, templateNum);
-}
-
-#ifdef UNICODE
-# define HistoryEvents_GetTextT HistoryEvents_GetTextW
-#else
-# define HistoryEvents_GetTextT HistoryEvents_GetTextA
-#endif
-
-
-
-#endif // __M_HISTORYEVENTS_H__
diff --git a/plugins/tabsrmm/API/m_ieview.h b/plugins/tabsrmm/API/m_ieview.h deleted file mode 100644 index e8fa237900..0000000000 --- a/plugins/tabsrmm/API/m_ieview.h +++ /dev/null @@ -1,194 +0,0 @@ -/*
-
-IEView Plugin for Miranda IM
-Copyright (C) 2005 Piotr Piastucki
-
-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.
-
-*/
-
-#ifndef M_IEVIEW_INCLUDED
-#define M_IEVIEW_INCLUDED
-
-#define MS_IEVIEW_WINDOW "IEVIEW/NewWindow"
-#define MS_IEVIEW_EVENT "IEVIEW/Event"
-#define MS_IEVIEW_NAVIGATE "IEVIEW/Navigate"
-
-#define ME_IEVIEW_OPTIONSCHANGED "IEVIEW/OptionsChanged"
-
-/* IEView window commands */
-#define IEW_CREATE 1 // create new window (control)
-#define IEW_DESTROY 2 // destroy control
-#define IEW_SETPOS 3 // set window position and size
-#define IEW_SCROLLBOTTOM 4 // scroll text to bottom
-
-/* IEView window type/mode */
-#define IEWM_TABSRMM 1 // TabSRMM-compatible HTML builder
-#define IEWM_SCRIVER 3 // Scriver-compatible HTML builder
-#define IEWM_MUCC 4 // MUCC group chats GUI
-#define IEWM_CHAT 5 // chat.dll group chats GUI
-#define IEWM_HISTORY 6 // history viewer
-#define IEWM_BROWSER 256 // empty browser window
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEW_* values
- DWORD dwMode; // compatibility mode - one of IEWM_* values
- DWORD dwFlags; // flags, one of IEWF_* values
- HWND parent; // parent window HWND
- HWND hwnd; // IEW_CREATE returns WebBrowser control's HWND here
- int x; // IE control horizontal position
- int y; // IE control vertical position
- int cx; // IE control horizontal size
- int cy; // IE control vertical size
-
-} IEVIEWWINDOW;
-
-#define IEEDF_UNICODE 0x00000001 // if set pszText is a pointer to wchar_t string instead of char string
-#define IEEDF_UNICODE_TEXT 0x00000001 // if set pszText is a pointer to wchar_t string instead of char string
-#define IEEDF_UNICODE_NICK 0x00000002 // if set pszNick is a pointer to wchar_t string instead of char string
-#define IEEDF_UNICODE_TEXT2 0x00000004 // if set pszText2 is a pointer to wchar_t string instead of char string
-
-/* The following flags are valid only for message events (IEED_EVENT_MESSAGE) */
-#define IEEDF_FORMAT_FONT 0x00000100 // if set pszFont (font name) is valid and should be used
-#define IEEDF_FORMAT_SIZE 0x00000200 // if set fontSize is valid and should be used
-#define IEEDF_FORMAT_COLOR 0x00000400 // if set color is valid and should be used
-#define IEEDF_FORMAT_STYLE 0x00000800 // if set fontSize is valid and should be used
-
-#define IEEDF_READ 0x00001000 // if set
-#define IEEDF_SENT 0x00002000 // if set
-#define IEEDF_RTL 0x00004000 // if set
-
-#define IEED_EVENT_MESSAGE 0x0001 // message
-#define IEED_EVENT_STATUSCHANGE 0x0002 // status change
-#define IEED_EVENT_FILE 0x0003 // file
-#define IEED_EVENT_URL 0x0004 // url
-#define IEED_EVENT_ERRMSG 0x0005 // error message
-#define IEED_EVENT_SYSTEM 0x0006 // system event
-
-#define IEED_MUCC_EVENT_MESSAGE 0x0001 // message
-#define IEED_MUCC_EVENT_TOPIC 0x0002 // topic change
-#define IEED_MUCC_EVENT_JOINED 0x0003 // user joined
-#define IEED_MUCC_EVENT_LEFT 0x0004 // user left
-#define IEED_MUCC_EVENT_ERROR 0x0005 // error
-
-/* MUCC-related dwData bit flags */
-#define IEEDD_MUCC_SHOW_NICK 0x00000001
-#define IEEDD_MUCC_MSG_ON_NEW_LINE 0x00000002
-#define IEEDD_MUCC_SHOW_DATE 0x00000010
-#define IEEDD_MUCC_SHOW_TIME 0x00000020
-#define IEEDD_MUCC_SECONDS 0x00000040
-#define IEEDD_MUCC_LONG_DATE 0x00000080
-
-#define IEED_GC_EVENT_HIGHLIGHT 0x8000
-#define IEED_GC_EVENT_MESSAGE 0x0001
-#define IEED_GC_EVENT_TOPIC 0x0002
-#define IEED_GC_EVENT_JOIN 0x0003
-#define IEED_GC_EVENT_PART 0x0004
-#define IEED_GC_EVENT_QUIT 0x0006
-#define IEED_GC_EVENT_NICK 0x0007
-#define IEED_GC_EVENT_ACTION 0x0008
-#define IEED_GC_EVENT_KICK 0x0009
-#define IEED_GC_EVENT_NOTICE 0x000A
-#define IEED_GC_EVENT_INFORMATION 0x000B
-#define IEED_GC_EVENT_ADDSTATUS 0x000C
-#define IEED_GC_EVENT_REMOVESTATUS 0x000D
-
-/* GC-related dwData bit flags */
-#define IEEDD_GC_SHOW_NICK 0x00000001
-#define IEEDD_GC_SHOW_TIME 0x00000002
-#define IEEDD_GC_SHOW_ICON 0x00000004
-#define IEEDD_GC_MSG_ON_NEW_LINE 0x00001000
-
-#define IE_FONT_BOLD 0x000100 // Bold font flag
-#define IE_FONT_ITALIC 0x000200 // Italic font flag
-#define IE_FONT_UNDERLINE 0x000400 // Underlined font flags
-
-typedef struct tagIEVIEWEVENTDATA {
- int cbSize;
- int iType; // Event type, one of MUCC_EVENT_* values
- DWORD dwFlags; // Event flags - IEEF_*
- const char *fontName; // Text font name
- int fontSize; // Text font size (in pixels)
- int fontStyle; // Text font style (combination of IE_FONT_* flags)
- COLORREF color; // Text color
- union {
- const TCHAR *ptszNick; // Nick, usage depends on type of event
- const char *pszNick; // Nick - ANSII
- const wchar_t *pszNickW; // Nick - Unicode
- };
- union {
- const TCHAR *ptszText; // Text, usage depends on type of event
- const char *pszText; // Text - ANSII
- const wchar_t *pszTextW; // Text - Unicode
- };
- DWORD dwData; // DWORD data e.g. status see IEEDD_* values
- BOOL bIsMe; // TRUE if the event is related to the user
- DWORD time; // Time of the event
- struct tagIEVIEWEVENTDATA *next;
- union {
- const TCHAR *ptszText2; // Text2, usage depends on type of event
- const char *pszText2; // Text2 - ANSII
- const wchar_t *pszText2W; // Text2 - Unicode
- };
-} IEVIEWEVENTDATA;
-
-/* IEView events */
-#define IEE_LOG_DB_EVENTS 1 // log specified number of DB events
-#define IEE_CLEAR_LOG 2 // clear log
-#define IEE_GET_SELECTION 3 // get selected text
-#define IEE_SAVE_DOCUMENT 4 // save current document
-#define IEE_LOG_MEM_EVENTS 5 // log specified number of IEView events
-
-/* IEView event flags */
-#define IEEF_RTL 1 // turn on RTL support
-#define IEEF_NO_UNICODE 2 // disable Unicode support - valid for IEE_LOG_DB_EVENTS and IEE_GET_SELECTION events
-
-#define IEVIEWEVENT_SIZE_V1 28
-#define IEVIEWEVENT_SIZE_V2 32
-#define IEVIEWEVENT_SIZE_V3 36
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEE_* values
- DWORD dwFlags; // one of IEEF_* values
- HWND hwnd; // HWND returned by IEW_CREATE
- HANDLE hContact; // contact
- union {
- HANDLE hDbEventFirst; // first event to log, when IEE_LOG_EVENTS returns it will contain
- // the last event actually logged or NULL if no event was logged (IEE_LOG_EVENTS)
- IEVIEWEVENTDATA *eventData; // the pointer to an array of IEVIEWEVENTDATA objects (IEE_LOG_IEV_EVENTS)
- };
- int count; // number of events to log
- int codepage; // ANSI codepage
- const char *pszProto; // Name of the protocol
-} IEVIEWEVENT;
-
-#define IEN_NAVIGATE 1 // navigate to the given destination
-#define IENF_UNICODE 1 // if set urlW is used instead of urlW
-
-typedef struct {
- int cbSize; // size of the strusture
- int iType; // one of IEN_* values
- DWORD dwFlags; // one of IEEF_* values
- HWND hwnd; // HWND returned by IEW_CREATE
- union {
- const char *url; // Text, usage depends on type of event
- const wchar_t *urlW; // Text - Unicode
- };
-} IEVIEWNAVIGATE;
-
-#endif
-
diff --git a/plugins/tabsrmm/API/m_mathmodule.h b/plugins/tabsrmm/API/m_mathmodule.h deleted file mode 100644 index 6328406bc3..0000000000 --- a/plugins/tabsrmm/API/m_mathmodule.h +++ /dev/null @@ -1,200 +0,0 @@ -#ifndef M_MATHMODULE_H_
-#define M_MATHMODULE_H_
-//---------------------------------------------------
-
-
-/*
- **************************
- * 2 *
- ** * x + 2 Pi
- ** ************* + R
- * Sin(wt)
- *
-
- Math-Module
- **************
-
- Miranda Plugin by Stephan Kassemeyer
-
-
- MathModule API - (c) Stephan Kassemeyer
- 8 May, 2004
-
-*/
-
-
-// ---------
-
-/*
- Miranda Service-functions defined by MathModule
- call with the
- int (*CallService)(const char * servicename,WPARAM,LPARAM)
- that you get from miranda when Miranda calls the
- Load(PLUGINLINK * link)
- of your PlugIn-dll
- the CallService function then is:
- link->CallServiceSync(Servicename,wparam,lparam)
-*/
-
-// ---------
-
-#define MATH_RTF_REPLACE_FORMULAE "Math/RtfReplaceFormulae"
-// replace all formulas in a RichEdit with bitmaps.
-// wParam = 0
-// lParam = *TMathRichedit Info
-// return: TRUE if replacement succeeded, FALSE if not (disable by user?).
-typedef struct
-{
- HWND hwndRichEditControl; // handle of richedit.
- CHARRANGE* sel; // NULL: replace all.
- int disableredraw;
-}TMathRicheditInfo;
-// WARNING: !!!
-// Strange things happen if you use this function twice on the same CHARRANGE:
-// if Math-startDelimiter == Math-endDelimiter, there is the following problem:
-// it might be that someone forgot an endDelimiter, this results in a lonesome startdelimiter.
-// if you try to MATH_REPLACE_FORMULAE the second time, startDelimiters and endDelimiters are mixed up.
-// The same problem occours if we have empty formulae, because two succeding delimiters are
-// replaced with a single delimiter.
-
-
-#define MATH_GET_STARTDELIMITER "Math/GetStartDelimiter"
-// returns the delimiter that marks the beginning of a formula
-// wparam=0
-// lparam=0
-// result=*char Delimiter
-// !!! the result-buffer must be deleted with MTH_FREE_MATH_BUFFER
-
-#define MATH_GETENDDELIMITER "Math/GetEndDelimiter"
-// returns the delimiter that marks the end of a formula
-// wparam=0
-// lparam=0
-// result=*char Delimiter
-// !!! the result-buffer must be deleted with MTH_FREE_MATH_BUFFER
-
-#define MTH_FREE_MATH_BUFFER "Math/FreeRTFBitmapText"
-// deletes any buffer that MathModule has created.
-// wparam=0
-// lparam=(*char) buffer
-// result=0
-
-#define MATH_SETBKGCOLOR "Math/SetBackGroundColor"
-// changes the background color of the next formula to be rendered.
-// wparam=0
-// lparam=(COLORREF) color
-// result=0
-
-#define MATH_SET_PARAMS "Math/SetParams"
-// sets a parameter (only integer values) encoded in wparam
-// wparam=paramcode
-// lparam=parametervalue
-// paramcodes:
-#define MATH_PARAM_BKGCOLOR 0 // (COLORREF) std-rgb-color or TRANSPARENT_Color
-#define MATH_PARAM_FONTCOLOR 1 // (COLORREF) std-rgb-color
-#define RESIZE_HWND 2 // (HWND) preview window resizes RESIZE_HWND when it is being resized.
-#define ToolboxEdit_HWND 3 // (HWND) If this hwnd (of an edit-box) is set, MathModule can insert Formula-elements from the Math-Toolbox.
-// you can make the BKGCOLOR Transparent (default) by using this color:
-#define TRANSPARENT_Color 0xffffffff -1 // this is default
-
-#define MTH_GETBITMAP "Math/GetBitmap"
-//returns Bitmap that represents the formula given in lparam (string-pointer)
-//this formula has NO Delimiters.
-//wparam=0
-//lparam=(*char)Formula
-//result=(HBITMAP) bitmap
-//!!! the bitmap must be deleted with DeleteObject(hobject)
-
-//example:
-//HBITMAP Bmp=(HBITMAP)CallService(MTH_GETBITMAP,0, (LPARAM)formula);
-
-#define MTH_GET_RTF_BITMAPTEXT "Math/GetRTFBitmapText"
-// returns rich-text stream that includes bitmaps from text given in lparam
-// text included between MATH_GET_STARTDELIMITER and MATH_GETENDDELIMITER
-// hereby is replaced with a rtf-bitmap-stream that represents the corresponding formula
-// wparam=0
-// lparam=*char text
-// result=*char rtfstream
-// !!! the result-buffer must be deleted with MTH_FREE_RTF_BITMAPTEXT
-
-#define MTH_FREE_RTF_BITMAPTEXT "Math/FreeRTFBitmapText"
-// deletes the buffer that MTH_GET_RTF_BITMAPTEXT has created.
-// wparam=0
-// lparam=(*char) buffer
-// result=0
-
-
-// **************************************************************
-// The following is still SRMM - specific.
-// I plan to modify it, so that other PlugIns can take advantage of e.g. preview-window....
-
-#define MTH_SHOW "Math/Show"
-// shows the preview-window
-// wparam=0
-// lparam=0
-// result=0
-
-#define MTH_HIDE "Math/Hide"
-// hides the preview-window
-// wparam=0
-// lparam=0
-// result=0
-
-#define MTH_RESIZE "Math/Resize"
-// sets the size of the preview-window
-// wparam=0
-// lparam=(*TMathWindowInfo)
-// result=0
-typedef struct
-{
- int top;
- int left;
- int right;
- int bottom;
-} TMathWindowInfo;
-
-#define MTH_SETFORMULA "Math/SetFormula"
-// sets the text that the preview-window should parse to display formulas found inside
-// wparam=0
-// lparam=(*char) text
-// result=0
-
-#define MTH_Set_ToolboxEditHwnd "Math/SetTBhwnd"
-// If this hwnd (of an edit-box) is set, MathModule can insert Formula-elements from the Math-Toolbox.
-// wparam=0
-// lparam=handle
-
-#define MTH_Set_Srmm_HWND "Math/SetSrmmHWND" //übergibt fenster-Handle des aktuellen Message-Dialogs
-// If MathModule knows the handle of a SRMM-based window, following features exist:
-// - preview window resizes Math-Srmm when it is being resized.
-// wparam=0
-// lparam=handle
-// result=0
-
-#define MTH_GET_PREVIEW_HEIGHT "Math/getPreviewHeight"
-// returns the height of the whole preview-window (including system-menu-bar)
-// consider this when maximizing a window to that preview-window is hooked on top or bottom
-// it returns the height no matter whether preview-window is visible or not
-// wparam=0
-// lparam=0
-// result=(int) height
-
-#define MTH_GET_PREVIEW_SHOWN "Math/getPreviewShown"
-// returns 1 if preview window is visible
-// returns 0 if preview window is invisible
-// result=(int) shown
-
-#define MTH_SUBSTITUTE_DELIMITER "Math/SubstituteDelimiter"
-// replaces Substitute given lparam-structure with internal Math-Delimiter
-// wparam=0
-// lparam=(TMathSubstInfo) substInfo
-// result=0
-typedef struct
-{
- HWND EditHandle;
- char* Substitute;
-} TMathSubstInfo;
-
-//---------------------------------------------------
-#endif
-//#ifndef M_MATHMODULE_H_
-
diff --git a/plugins/tabsrmm/API/m_metacontacts.h b/plugins/tabsrmm/API/m_metacontacts.h deleted file mode 100644 index fd85638237..0000000000 --- a/plugins/tabsrmm/API/m_metacontacts.h +++ /dev/null @@ -1,128 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-#endif
diff --git a/plugins/tabsrmm/API/m_msg_buttonsbar.h b/plugins/tabsrmm/API/m_msg_buttonsbar.h deleted file mode 100644 index 31735f8bd4..0000000000 --- a/plugins/tabsrmm/API/m_msg_buttonsbar.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef M_MSG_BUTTONSBAR_H__
-#define M_MSG_BUTTONSBAR_H__
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-#define MS_BB_ADDBUTTON "TabSRMM/ButtonsBar/AddButton"
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-//
-// wParam = 0
-// lParam = (BBButton *) &description, only button ID and ModuleName used
-#define MS_BB_REMOVEBUTTON "TabSRMM/ButtonsBar/RemoveButton"
-
-//////////////////////////////////////////////////////////////////////////
-// ModifyButton(global)
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-#define MS_BB_MODIFYBUTTON "TabSRMM/ButtonsBar/ModifyButton"
-
-
-#define BBSF_HIDDEN (1<<0)
-#define BBSF_DISABLED (1<<1)
-#define BBSF_PUSHED (1<<2)
-#define BBSF_RELEASED (1<<3)
-
-//////////////////////////////////////////////////////////////////////////
-// GetButtonState(local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , only ModuleName and ID used
-// Returns BBButton struct with BBSF_ bbbFlags:
-#define MS_BB_GETBUTTONSTATE "TabSRMM/ButtonsBar/GetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// SetButtonState (local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
-#define MS_BB_SETBUTTONSTATE "TabSRMM/ButtonsBar/SetButtonState"
-
-
-////////////////////////////////////////////////////////////////
-//Events
-//
-///////////////////////////////////////////////////
-// ToolBar loaded event
-// wParam = 0;
-// lParam = 0;
-// This event will be send after module loaded and after each toolbar reset
-// You should add your buttons on this event
-#define ME_MSG_TOOLBARLOADED "TabSRMM/ButtonsBar/ModuleLoaded"
-
-///////////////////////////////////////////////////
-// ButtonClicked event
-// wParam = (HANDLE)hContact;
-// lParam = (CustomButtonClickData *)&CustomButtonClickData;
-// catch to show a popup menu, etc.
-#define ME_MSG_BUTTONPRESSED "TabSRMM/ButtonsBar/ButtonPressed"
-
-
-//event flags
-#define BBCF_RIGHTBUTTON (1<<0)
-#define BBCF_SHIFTPRESSED (1<<1)
-#define BBCF_CONTROLPRESSED (1<<2)
-#define BBCF_ARROWCLICKED (1<<3)
-
-typedef struct {
- int cbSize;
- POINT pt; // screen coordinates for menus
- char* pszModule; // button owners name
- DWORD dwButtonId; // registered button ID
- HWND hwndFrom; // button parents HWND
- HANDLE hContact; //
- DWORD flags; // BBCF_ flags
- } CustomButtonClickData;
-
-
-//button flags
-#define BBBF_DISABLED (1<<0)
-#define BBBF_HIDDEN (1<<1)
-#define BBBF_ISPUSHBUTTON (1<<2)
-#define BBBF_ISARROWBUTTON (1<<3)
-#define BBBF_ISCHATBUTTON (1<<4)
-#define BBBF_ISIMBUTTON (1<<5)
-#define BBBF_ISLSIDEBUTTON (1<<6)
-#define BBBF_ISRSIDEBUTTON (1<<7)
-#define BBBF_CANBEHIDDEN (1<<8)
-#define BBBF_ISDUMMYBUTTON (1<<9)
-#define BBBF_ANSITOOLTIP (1<<10)
-
-#define BBBF_CREATEBYID (1<<11) //only for tabsrmm internal use
-
-typedef struct _tagBBButton
- {
- int cbSize; // size of structure
-
- DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
-
- char* pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
- union{
- char* pszTooltip; //button's tooltip
- TCHAR* ptszTooltip;
- };
- DWORD dwDefPos; // default order pos of button, counted from window edge (left or right)
- // use value >100, because internal buttons using 10,20,30... 80, etc
- int iButtonWidth; // must be 0
- DWORD bbbFlags; // combine of BBBF_ flags above
- HANDLE hIcon; //Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
- }BBButton;
-
-
-#endif //M_MSG_BUTTONSBAR_H__
diff --git a/plugins/tabsrmm/API/m_nudge.h b/plugins/tabsrmm/API/m_nudge.h deleted file mode 100644 index e87e410508..0000000000 --- a/plugins/tabsrmm/API/m_nudge.h +++ /dev/null @@ -1,5 +0,0 @@ -#define MS_SHAKE_CLIST "SHAKE/Service/ShakeClist"
-#define MS_SHAKE_CHAT "SHAKE/Service/ShakeChat"
-#define MS_SHAKE_CLIST_TRIGGER "SHAKE/Service/TriggerShakeClist"
-#define MS_SHAKE_CHAT_TRIGGER "SHAKE/Service/TirggerShakeChat"
-#define MS_NUDGE_SEND "NUDGE/Send"
diff --git a/plugins/tabsrmm/API/m_popup2.h b/plugins/tabsrmm/API/m_popup2.h deleted file mode 100644 index cec5abb395..0000000000 --- a/plugins/tabsrmm/API/m_popup2.h +++ /dev/null @@ -1,457 +0,0 @@ -/*
-===============================================================================
- PopUp plugin
-Plugin Name: PopUp
-Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
- Victor Pavlychko (nullbie@gmail.com)
-===============================================================================
-The purpose of this plugin is to give developers a common "platform/interface"
-to show PopUps. It is born from the source code of NewStatusNotify, another
-plugin I've made.
-
-Remember that users *must* have this plugin enabled, or they won't get any
-popup. Write this in the requirements, do whatever you wish ;-)... but tell
-them!
-===============================================================================
-*/
-
-#ifndef __m_popup2_h__
-#define __m_popup2_h__
-
-#ifndef POPUP_VERSION
-#define POPUP_VERSION 0x02010003
-#endif
-
-#define MAX_ACTIONTITLE 64
-
-// Popup Action flags
-#define PAF_ENABLED 0x01 // Actions is enabled. You may store one global
- // action set and toggle some items depending on
- // popup you are requesting
-
-// ANSI Popup Action
-typedef struct
-{
- int cbSize; // sizeof(POPUPACTION)
- HICON lchIcon; // Action Icon
- // Action title text. Please use module name as prefix
- // (e.g. "Popup Plus/Dismiss Popup") and don't translate
- // This is translates by popup. So no unicode.
- char lpzTitle[MAX_ACTIONTITLE];
- DWORD flags; // set of PAF_* flags
- WPARAM wParam; // wParam for UM_POPUPACTION message
- LPARAM lParam; // lParam for UM_POPUPACTION message
-} POPUPACTION, *LPPOPUPACTION;
-
-///////////////////////////////////////////////////////////////
-// Few notes about new popup api
-// ------------------------------
-// When you call any ADD service, Popup Plus creates local
-// copy of POPUPDATA2 to store the data. Each time you call
-// CHANGE service this data is updated. You can use the
-// MS_POPUP_GETDATA2 service to retrieve Popups's copy of
-// this data, however you MUST NOT chahge that.
-
-// unicode or ansi mode
-#define PU2_ANSI 0x00
-#define PU2_UNICODE 0x01
-#if defined(UNICODE) || defined(_UNICODE)
- #define PU2_TCHAR PU2_UNICODE
-#else
- #define PU2_TCHAR PU2_ANSI
-#endif
-
-#define PU2_CUSTOM_POPUP 0x02
-
-typedef struct
-{
- // general
- int cbSize;
- DWORD flags;
-
- // miranda bindings
- HANDLE lchContact;
- HANDLE lchEvent;
-
- // style
- COLORREF colorBack;
- COLORREF colorText;
- HICON lchIcon;
- HBITMAP hbmAvatar;
- union
- {
- char *lpzTitle;
- WCHAR *lpwzTitle;
- TCHAR *lptzTitle;
- };
- union
- {
- char *lpzText;
- WCHAR *lpwzText;
- TCHAR *lptzText;
- };
- char *lpzSkin;
-
- // time and timeout
- int iSeconds;
- DWORD dwTimestamp;
-
- // plugin bindings
- WNDPROC PluginWindowProc;
- void *PluginData;
-
- // popup actions
- int actionCount;
- POPUPACTION *lpActions;
-
- HANDLE lchNotification;
-} POPUPDATA2, *LPPOPUPDATA2;
-
-// Creates new popup
-// wParam = (WPARAM)(LPPOPUPDATA2)&ppd2
-// lParam = (LPARAM)(combination of APF_* flags)
-// returns: window handle (if requested) of NULL on success, -1 on failure.
-#define MS_POPUP_ADDPOPUP2 "Popup/AddPopup2"
-
-// Update an popup
-// wParam = (WPARAM)(HWND)hwndPopup
-// lParam = (LPARAM)(LPPOPUPDATA2)&ppd2
-// returns: zero on success, -1 on failure.
-#define MS_POPUP_CHANGEPOPUP2 "Popup/ChangePopup2"
-
-// deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup
-// Extended popup data V2 (ansi version)
-typedef struct
-{
- HANDLE lchContact;
- HICON lchIcon;
- union
- {
- char lptzContactName[MAX_CONTACTNAME];
- char lpzContactName[MAX_CONTACTNAME];
- };
- union
- {
- char lptzText[MAX_SECONDLINE];
- char lpzText[MAX_SECONDLINE];
- };
- COLORREF colorBack;
- COLORREF colorText;
- WNDPROC PluginWindowProc;
- void * PluginData;
- int iSeconds; // Custom delay time in seconds. -1 means "forever", 0 means "default time".
- // +2.1.0.3
- // you *MUST* pass APF_NEWDATA flag for services to take care of this data
- HANDLE hNotification; // Reserved. Must be NULL
- int actionCount; // Amount of passed actions
- LPPOPUPACTION lpActions; // Popup Actions
- int cbSize; // struct size for future
-} POPUPDATAEX_V2, *LPPOPUPDATAEX_V2;
-
-// deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup
-// Unicode version of POPUPDATAEX_V2
-typedef struct
-{
- HANDLE lchContact;
- HICON lchIcon;
- union
- {
- WCHAR lptzContactName[MAX_CONTACTNAME];
- WCHAR lpwzContactName[MAX_CONTACTNAME];
- };
- union
- {
- WCHAR lptzText[MAX_SECONDLINE];
- WCHAR lpwzText[MAX_SECONDLINE];
- };
- COLORREF colorBack;
- COLORREF colorText;
- WNDPROC PluginWindowProc;
- void * PluginData;
- int iSeconds;
- // +2.1.0.3
- // you *MUST* pass APF_NEWDATA flag for services to take care of this data
- HANDLE hNotification;
- int actionCount;
- LPPOPUPACTION lpActions;
- int cbSize;
-} POPUPDATAW_V2, *LPPOPUPDATAW_V2;
-
-// deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup
-#if defined(_UNICODE) || defined(UNICODE)
- typedef POPUPDATAW_V2 POPUPDATAT_V2;
- typedef LPPOPUPDATAW_V2 LPPOPUPDATAT_V2;
-#else
- typedef POPUPDATAEX_V2 POPUPDATAT_V2;
- typedef LPPOPUPDATAEX_V2 LPPOPUPDATAT_V2;
-#endif
-
-/* PopUp/AddPopup
-Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
-
-wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
-lParam = 0
-
-Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
-NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
-Otherwise, it can return anything else...
-
-Popup Plus 2.0.4.0+
-You may pass additional creation flags via lParam:
-/* core define see miranda\include\m_popup.h
- APF_RETURN_HWND ....... function returns handle to newly created popup window (however this calls are a bit slower)
- APF_CUSTOM_POPUP ...... new popup is created in hidden state and doesn't obey to popup queue rules.
- you may control it via UM_* messages and custom window procedure (not yet implemented)
-additional APF_ flags */
-#define APF_NO_HISTORY 0x04 //do not log this popup in popup history (useful for previews)
-#define APF_NO_POPUP 0x08 //do not show popup. this is useful if you want popup yo be stored in history only
-#define APF_NEWDATA 0x10 //deprecatet!! only for use with old POPUPDATAEX_V2/POPUPDATAW_V2 structs
-
-//overload function for POPUPDATAEX_V2/POPUPDATAW_V2
-static INT_PTR __inline PUAddPopUpEx(POPUPDATAEX_V2* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)ppdp,0);
-}
-
-static INT_PTR __inline PUAddPopUpW(POPUPDATAW_V2* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp,0);
-}
-
-static int __inline PUChange(HWND hWndPopUp, POPUPDATAEX_V2 *newData) {
- return (int)CallService(MS_POPUP_CHANGE, (WPARAM)hWndPopUp, (LPARAM)newData);
-}
-
-#define MS_POPUP_CHANGEW "PopUp/ChangeW"
-static int __inline PUChangeW(HWND hWndPopUp, POPUPDATAW_V2 *newData) {
- return (int)CallService(MS_POPUP_CHANGEW, (WPARAM)hWndPopUp, (LPARAM)newData);
-}
-
-/* UM_CHANGEPOPUP
-This message is triggered by Change/ChangeText services. You also may post it directly, but make
-sure you allocate memory via miranda mmi, because popup will mir_free() them!
-
-wParam = Modification type
-lParam = value of type defined by wParam
-
-/* core define see miranda\include\m_popup.h
-#define CPT_TEXT 1 // lParam = (char *)text
-#define CPT_TEXTW 2 // lParam = (WCHAR *)text
-#define CPT_TITLE 3 // lParam = (char *)title
-#define CPT_TITLEW 4 // lParam = (WCHAR *)title
-#define CPT_DATA 5 // lParam = (POPUPDATA *)data
-#define CPT_DATAEX 6 // lParam = (POPUPDATAEX *) or (POPUPDATAEX_V2 *)data see CPT_DATA2
-#define CPT_DATAW 7 // lParam = (POPUPDATAW *) or (POPUPDATAW_V2 *)data see CPT_DATA2
-additional CPT_ flag*/
-#define CPT_DATA2 8 // lParam = (POPUPDATA2 *)data -- see m_popup2.h for details
-
-/* UM_POPUPACTION
-Popup Action notification
-
-wParam and lParam are specified bu plugin.
-wParam = 0 is used buy popup plus internally!
-*/
-
-#define UM_POPUPACTION (WM_USER + 0x0204)
-
-/* UM_POPUPMODIFYACTIONICON
-Modify Popup Action Icon
-
-wParam = (WPARAM)(LPPOPUPACTIONID)&actionId
-lParam = (LPARAM)(HICON)hIcon
-*/
-
-typedef struct
-{
- WPARAM wParam;
- LPARAM lParam;
-} POPUPACTIONID, *LPPOPUPACTIONID;
-
-#define UM_POPUPMODIFYACTIONICON (WM_USER + 0x0205)
-static int __inline PUModifyActionIcon(HWND hWndPopUp, WPARAM wParam, LPARAM lParam, HICON hIcon) {
- POPUPACTIONID actionId = { wParam, lParam };
- return (int)SendMessage(hWndPopUp, UM_POPUPMODIFYACTIONICON, (WPARAM)&actionId, (LPARAM)hIcon);
-}
-
-/* UM_POPUPSHOW
-Show popup at position
-
-wParam = x
-lParam = y
-*/
-#define UM_POPUPSHOW (WM_USER + 0x0206)
-
-/* PopUp/RegisterActions
-Registers your action in popup action list
-
-wParam = (WPARAM)(LPPOPUPACTION)actions
-lParam = (LPARAM)actionCount
-
-Returns: 0 if the popup was shown, -1 in case of failure.
-*/
-#define MS_POPUP_REGISTERACTIONS "PopUp/RegisterActions"
-
-static int __inline PURegisterActions(LPPOPUPACTION actions, int count) {
- return (int)CallService(MS_POPUP_REGISTERACTIONS, (WPARAM)actions,(LPARAM)count);
-}
-
-/* PopUp/RegisterNotification
-Registers your action in popup action list
-
-wParam = (WPARAM)(LPPOPUPNOTIFICATION)info
-lParam = 0
-
-Returns: handle of registered notification or sero on failure
-*/
-#define MS_POPUP_REGISTERNOTIFICATION "PopUp/RegisterNotification"
-
-#define PNAF_CALLBACK 0x01
-
-#define POPUP_ACTION_NOTHING "Do nothing"
-#define POPUP_ACTION_DISMISS "Dismiss popup"
-
-typedef struct
-{
- char lpzTitle[64];
- DWORD dwFlags;
- union
- {
- struct
- {
- char lpzLModule[MAXMODULELABELLENGTH];
- char lpzLSetting[MAXMODULELABELLENGTH];
- DBVARIANT dbvLData;
- char lpzRModule[MAXMODULELABELLENGTH];
- char lpzRSetting[MAXMODULELABELLENGTH];
- DBVARIANT dbvRData;
- };
- struct
- {
- DWORD dwCookie;
- void (*pfnCallback)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, DWORD cookie);
- };
- };
-} POPUPNOTIFYACTION, *LPPOPUPNOTIFYACTION;
-
-#define PNF_CONTACT 0x01
-
-typedef struct
-{
- int cbSize;
- DWORD dwFlags; // set of PNF_* flags
- char lpzGroup[MAXMODULELABELLENGTH];
- char lpzName[MAXMODULELABELLENGTH];
- HICON lchIcon; // this will be registered in icolib
- COLORREF colorBack; // this will be registered in fontservice
- COLORREF colorText; // this will be registered in fontservice
- int iSeconds; // default timeout
- int actionCount; // for unified action comboboxes
- LPPOPUPNOTIFYACTION lpActions;
- char *lpzLAction;
- char *lpzRAction;
- char *pszReserved1; // reserved for future use
- DLGPROC pfnReserved2; // reserved for future use
-} POPUPNOTIFICATION, *LPPOPUPNOTIFICATION;
-
-static HANDLE __inline PURegisterNotification(LPPOPUPNOTIFICATION notification) {
- return (HANDLE)CallService(MS_POPUP_REGISTERNOTIFICATION, (WPARAM)notification, (LPARAM)0);
-}
-
-/* PopUp/UnhookEventAsync
-Using of "UnhookEvent" inside PluginWindowProc in conjunction with HookEventMessage
-may cause deadlocks. Use this service instead. It will queue event unhook into main
-thread and notify you when everything has finished.
-
-Deadlock scenario:
- 1. Event is fired with NotifyEventHooks in the main thread
- 2. Miranda core calls EnterCriticalSection(csHooks) and starts notifications
- 3. You decide to unhook event, therefore call UnhookEvent
- 4. Miranda core *INSIDE YOUR THREAD* calls EnterCriticalSection(csHooks) and
- waits for main thread to finish processing
- 5. Main thread calls SendMessage(hwnd, ...) to notify your window
- 6. Your window's thread is busy waiting for main thread to leave critical section
- 7. deadlock....
-
-wParam = (WPARAM)(HWND)hwndPopup
-lParam = (LPARAM)(HANDLE)hEvent
-
-Returns: 0 if everything gone ok. -1 if service was not found (and unsafe unhook was performed)
-*/
-
-#define MS_POPUP_UNHOOKEVENTASYNC "PopUp/UnhookEventAsync"
-
-/* UM_POPUPUNHOOKCOMPLETE
-Modify Popup Action Icon
-
-wParam = 0
-lParam = (LPARAM)(HANDLE)hEventUnhooked
-*/
-#define UM_POPUPUNHOOKCOMPLETE (WM_USER + 0x0206)
-
-static int __inline PUUnhookEventAsync(HWND hwndPopup, HANDLE hEvent) {
- if (ServiceExists(MS_POPUP_UNHOOKEVENTASYNC))
- return (int)CallService(MS_POPUP_UNHOOKEVENTASYNC, (WPARAM)hwndPopup,(LPARAM)hEvent);
-
- // old popup plugins: unhook service not found
- UnhookEvent(hEvent);
- PostMessage(hwndPopup, UM_POPUPUNHOOKCOMPLETE, 0, (LPARAM)hEvent);
- return 0;
-}
-
-/* PopUp/GetStatus
-Returns 1 when popups are showen and 0 when not
-wParam = 0
-lParam = 0
-*/
-#define MS_POPUP_GETSTATUS "PopUp/GetStatus"
-
-#ifdef __cplusplus
-/* PopUp/RegisterVfx
-Register new animation (fade in/out) effect
-wParam = 0
-lParam = (LPARAM)(char *)vfx_name
-*/
-
-#define MS_POPUP_REGISTERVFX "PopUp/RegisterVfx"
-
-/* PopUp/Vfx/<vfx_name>
-Define this service to create vfx instance
-wParam = 0
-lParam = 0
-return = (int)(IPopupPlusEffect *)vfx
-*/
-
-#define MS_POPUP_CREATEVFX "PopUp/Vfx/"
-
-class IPopupPlusEffect
-{
-public:
- virtual void beginEffect(int w, int h, int alpha0, int alpha1, int frameCount) = 0;
- virtual void beginFrame(int frame) = 0;
- virtual int getPixelAlpha(int x, int y) = 0;
- virtual void endFrame() = 0;
- virtual void endEffect() = 0;
- virtual void destroy() = 0;
-};
-#endif // __cplusplus
-
-
-/* PopUp/ShowMessage
-This is mainly for developers.
-Shows a warning message in a PopUp. It's useful if you need a "MessageBox" like function, but you don't want a modal
-window (which will interfere with a DialogProcedure. MessageBox steals focus and control, this one not.
-
-wParam = (char *)lpzMessage
-lParam = 0;
-
-Returns: 0 if the popup was shown, -1 in case of failure.
-
-/* core define see miranda\include\m_popup.h
-#define SM_WARNING 0x01 //Triangle icon.
-#define SM_NOTIFY 0x02 //Exclamation mark icon.
-additional SM_ flags */
-#define SM_ERROR 0x03 //Cross icon.
-#ifndef MS_POPUP_SHOWMESSAGE
-#define MS_POPUP_SHOWMESSAGE "PopUp/ShowMessage"
-#define MS_POPUP_SHOWMESSAGEW "PopUp/ShowMessageW"
-#endif
-
-#endif // __m_popup2_h__
diff --git a/plugins/tabsrmm/API/m_smileyadd.h b/plugins/tabsrmm/API/m_smileyadd.h deleted file mode 100644 index 72c6b52077..0000000000 --- a/plugins/tabsrmm/API/m_smileyadd.h +++ /dev/null @@ -1,252 +0,0 @@ -/*
-Miranda SmileyAdd Plugin
-Copyright (C) 2005-2008 Boris Krasnovskiy
-Copyright (C) 2003-2004 Rein-Peter de Boer
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include <richedit.h>
-
-#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
- // this flag allows "true" transparency
-#define SAFLRE_OUTGOING 4 // Parsing outgoing message
-#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- HWND hwndRichEditControl; //handle to the rich edit control
- CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. SmileyAdd will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL, "Standard" will be used
- unsigned flags; //Flags (SAFLRE_*) that define the behaivior
- BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HANDLE hContact; //Contact handle
-} SMADD_RICHEDIT3;
-
-//Replace smileys in a rich edit control...
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; //protocol to use... if you have defined a protocol, you can
- //use your own protocol name. Smiley add will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
-
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
- HWND hwndParent; //Parent window for smiley dialog
- HANDLE hContact; //Contact handle
-} SMADD_SHOWSEL3;
-
-//Show smiley selection window
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; // " "
- HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
- //of the smiley that can be used on the button
- //if used with GETINFO2 handle must be destroyed by user!
- //NULL if the buttonicon is not defined...
- int NumberOfVisibleSmileys; //Number of visible smileys defined.
- int NumberOfSmileys; //Number of total smileys defined
- HANDLE hContact; //Contact handle
-} SMADD_INFO2;
-
-//get button smiley icon
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
-
-// Event notifies that SmileyAdd options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
-//wParam = Contact handle which options have changed, NULL if global options changed
-//lParam = (LPARAM) 0; not used
-#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
-
-#define SAFL_PATH 1 // provide smiley file path, icon otherwise
-#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
-#define SAFL_OUTGOING 4 // Parsing outgoing message
-#define SAFL_NOCUSTOM 8 // Do not use custom smileys
-
-#if defined _UNICODE || defined UNICODE
- #define SAFL_TCHAR SAFL_UNICODE
-#else
- #define SAFL_TCHAR 0
-#endif
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- union {
- TCHAR* str; //String to parse
- char* astr;
- wchar_t* wstr;
- };
- unsigned flag; //One of the SAFL_ flags specifies parsing requirements
- //This parameter should be filled by the user
-
- unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
- unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
- //this parameter filled by SmileyAdd
- HANDLE hContact; //Contact handle
-} SMADD_BATCHPARSE2;
-
-typedef struct
-{
- unsigned startChar; //Starting smiley character
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- unsigned size; //Number of characters in smiley (0 if not found)
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- union {
- const TCHAR* filepath;
- const char* afilepath;
- const wchar_t* wfilepath;
- HICON hIcon; //User responsible for destroying icon handle
- };
-} SMADD_BATCHPARSERES;
-
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
-#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
-#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* name; //smiley category name for reference
- char* dispname; //smiley category name for display
-} SMADD_REGCAT;
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; pointer to SMADD_REGCAT
-#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) Pointer to protocol name or NULL for all;
-#define MS_SMILEYADD_RELOAD "SmileyAdd/Reload"
-
-#ifndef MIID_SMILEY
-// {E03C71B2-6DEE-467e-A4F0-DD516745876A}
-#define MIID_SMILEY { 0xe03c71b2, 0x6dee, 0x467e, { 0xa4, 0xf0, 0xdd, 0x51, 0x67, 0x45, 0x87, 0x6a } }
-#endif
-
-/**
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-
-*/
-
-// Type of Event one of
-#define FVCN_PREFIRE 1
-#define FVCN_POSTFIRE 2
-
-// Action of event are going to be done
-#define FVCA_NONE 0
-#define FVCA_DRAW 1 // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
-#define FVCA_CUSTOMDRAW 2
-//#define FVCA_INVALIDATE 3 (not supported)
-//#define FVCA_SENDVIEWCHANGE 4 (not supported)
-#define FVCA_SKIPDRAW 5
-
-// Extended NMHDR structure for WM_NOTIFY
-typedef struct
-{
- //NMHDR structure
- HWND hwndFrom; // Window of smiley host
- UINT idFrom; // ignored
- UINT code; // NM_FIREVIEWCHANGE
-
- size_t cbSize;
- BYTE bEvent; // FVCN_ value - pre- or post- painting
- BYTE bAction; // FVCA_ keys
- HDC hDC; // Canvas to draw on
- RECT rcRect; // Valid/should be in case of FVCA_DRAW
- COLORREF clrBackground; // color to fill background if fTransparent is not set
- BOOL fTransparent; // if need to fill back color (not supported)
- LPARAM lParam; // used by host window PreFire and PostFire event
-} FVCNDATA_NMHDR;
-
-// Code of WM_NOTIFY message (code)
-#define NM_FIREVIEWCHANGE NM_FIRST+1;
-
-typedef struct
-{
- unsigned cbSize; // size of the structure
- HANDLE hContact;
- int type; // 0 - directory, 1 - file;
- TCHAR* path; // smiley category name for reference
-} SMADD_CONT;
-
-//Loads all smileys for the contact
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
-#define MS_SMILEYADD_LOADCONTACTSMILEYS "SmileyAdd/LoadContactSmileys"
diff --git a/plugins/tabsrmm/API/m_spellchecker.h b/plugins/tabsrmm/API/m_spellchecker.h deleted file mode 100644 index b09f146b0d..0000000000 --- a/plugins/tabsrmm/API/m_spellchecker.h +++ /dev/null @@ -1,72 +0,0 @@ -/*
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef __M_SPELLCHECKER_H__
-# define __M_SPELLCHECKER_H__
-
-
-typedef struct {
- int cbSize;
- HANDLE hContact; // The contact to get the settings from, or NULL
- HWND hwnd; // The hwnd of the richedit
- char *window_name; // A name for this richedit
-} SPELLCHECKER_ITEM;
-
-typedef struct {
- int cbSize;
- HWND hwnd; // The hwnd of the richedit
- HMENU hMenu; // The handle to the menu
- POINT pt; // The point, in screen coords
-} SPELLCHECKER_POPUPMENU;
-
-
-/*
-Adds a richedit control for the spell checker to check
-
-wParam: SPELLCHECKER_ITEM *
-lParam: ignored
-return: 0 on success
-*/
-#define MS_SPELLCHECKER_ADD_RICHEDIT "SpellChecker/AddRichedit"
-
-
-/*
-Removes a richedit control for the spell checker to check
-
-wParam: HWND
-lParam: ignored
-return: 0 on success
-*/
-#define MS_SPELLCHECKER_REMOVE_RICHEDIT "SpellChecker/RemoveRichedit"
-
-
-/*
-Show context menu
-
-wParam: SPELLCHECKER_POPUPMENU
-lParam: ignored
-return: the control id selected by the user, 0 if no one was selected, < 0 on error
-*/
-#define MS_SPELLCHECKER_SHOW_POPUP_MENU "SpellChecker/ShowPopupMenu"
-
-
-
-
-#endif // __M_SPELLCHECKER_H__
diff --git a/plugins/tabsrmm/API/m_updater.h b/plugins/tabsrmm/API/m_updater.h deleted file mode 100644 index 488d3722ce..0000000000 --- a/plugins/tabsrmm/API/m_updater.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- 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,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/plugins/tabsrmm/src/commonheaders.h b/plugins/tabsrmm/src/commonheaders.h index cad99b61b8..f1be6661b2 100644 --- a/plugins/tabsrmm/src/commonheaders.h +++ b/plugins/tabsrmm/src/commonheaders.h @@ -213,21 +213,21 @@ extern struct LIST_INTERFACE li; #define safe_sizeof(a) (unsigned int)((sizeof((a)) / sizeof((a)[0])))
#include "../include/version.h"
-#include "../API/m_ieview.h"
-#include "../API/m_popup2.h"
-#include "../API/m_metacontacts.h"
-#include "../API/m_fingerprint.h"
-#include "../API/m_nudge.h"
-#include "../API/m_folders.h"
-#include "../API/m_msg_buttonsbar.h"
-#include "../API/m_cln_skinedit.h"
-#include "../API/m_flash.h"
-#include "../API/m_spellchecker.h"
-#include "../API/m_mathmodule.h"
-#include "../API/m_historyevents.h"
-#include "../API/m_buttonbar.h"
-#include "../API/m_updater.h"
-#include "../API/m_smileyadd.h"
+#include "m_ieview.h"
+#include "m_popup2.h"
+#include "m_metacontacts.h"
+#include "m_fingerprint.h"
+#include "m_nudge.h"
+#include "m_folders.h"
+#include "m_msg_buttonsbar.h"
+#include "m_cln_skinedit.h"
+#include "m_flash.h"
+#include "m_spellchecker.h"
+#include "m_mathmodule.h"
+#include "m_historyevents.h"
+#include "m_buttonbar.h"
+#include "m_updater.h"
+#include "m_smileyadd.h"
#include "../include/msgs.h"
#include "../include/msgdlgutils.h"
diff --git a/plugins/tabsrmm/tabsrmm_10.vcxproj b/plugins/tabsrmm/tabsrmm_10.vcxproj index df6b2ca512..f8d67c6b19 100644 --- a/plugins/tabsrmm/tabsrmm_10.vcxproj +++ b/plugins/tabsrmm/tabsrmm_10.vcxproj @@ -107,7 +107,7 @@ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>false</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include; ../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
@@ -170,7 +170,7 @@ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include; ../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
@@ -231,7 +231,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include; ../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -282,7 +282,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include; ../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
diff --git a/plugins/updater/Docs/m_updater.h b/plugins/updater/Docs/m_updater.h deleted file mode 100644 index 488d3722ce..0000000000 --- a/plugins/updater/Docs/m_updater.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- 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,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
|