summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-07-22 17:53:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-07-22 17:53:20 +0000
commit59b6fb0fe20c274743fbd1b9742be94b1e5134a4 (patch)
tree1fe68cf72ab221fbca0f24b36b35f5c1087a9450 /include
parent36818c9c84cce676b9ec6533807b7a33e03902a0 (diff)
- extra icons services converted into functions;
- more Kill* functions exported; git-svn-id: http://svn.miranda-ng.org/main/trunk@14635 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_extraicons.inc34
-rw-r--r--include/m_extraicons.h123
-rw-r--r--include/m_fontservice.h7
-rw-r--r--include/m_hotkeys.h4
4 files changed, 24 insertions, 144 deletions
diff --git a/include/delphi/m_extraicons.inc b/include/delphi/m_extraicons.inc
index 577585f953..e247599761 100644
--- a/include/delphi/m_extraicons.inc
+++ b/include/delphi/m_extraicons.inc
@@ -81,38 +81,4 @@ type
onClickParam:LPARAM;
end;
-const
-// Register an extra icon
-// wParam = (EXTRAICON_INFO *) Extra icon info
-// lParam = 0
-// Return: (HANDLE) id of extra icon on success, 0 on error
- MS_EXTRAICON_REGISTER:PAnsiChar = 'ExtraIcon/Register';
-
-type
- TEXTRAICON = record
- cbSize :int;
- hExtraIcon:THANDLE; // Value returned by MS_EXTRAICON_REGISTER
- hContact :TMCONTACT; // Contact to set the extra icon
- // The icon to be set. This depends on the type of the extra icon:
- case boolean of
- false:(hImage :THANDLE); // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
- // or the icolib icon handle (if EXTRAICON_TYPE_ICOLIB)
- true :(icoName:PAnsiChar); // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
- end;
-
-const
-{
- Set an extra icon icon
- wParam = (EXTRAICON *) Extra icon
- Return: 0 on success
-}
- MS_EXTRAICON_SET_ICON:PAnsiChar = 'ExtraIcon/SetIcon';
-
-{
- Set an extra icon by icolib icon's name
- wParam = (EXTRAICON *) Extra icon
- Return: 0 on success
-}
- MS_EXTRAICON_SET_ICON_BY_NAME:PAnsiChar = 'ExtraIcon/SetIconByName';
-
{$ENDIF}
diff --git a/include/m_extraicons.h b/include/m_extraicons.h
index 309c88edd8..3a4184a685 100644
--- a/include/m_extraicons.h
+++ b/include/m_extraicons.h
@@ -24,6 +24,8 @@ Boston, MA 02111-1307, USA.
#ifndef __M_EXTRAICONS_H__
#define __M_EXTRAICONS_H__
+#include <m_core.h>
+
#ifndef EXTRA_ICON_COUNT
#define EXTRA_ICON_COUNT 10
#endif
@@ -71,15 +73,12 @@ To register a new extra icon, you have to call MS_EXTRAICON_REGISTER passing the
*/
-#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 {
+struct EXTRAICON_INFO
+{
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
@@ -108,117 +107,21 @@ typedef struct {
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
- MCONTACT 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)
- // or the icolib icon handle (if EXTRAICON_TYPE_ICOLIB)
- 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"
-
-// Set an extra icon by icolib icon's name
-// wParam = (EXTRAICON *) Extra icon
-// Return: 0 on success
-#define MS_EXTRAICON_SET_ICON_BY_NAME "ExtraIcon/SetIconByName"
-
-#ifndef _NO_WRAPPERS
-#ifdef __cplusplus
-
-extern int hLangpack;
+EXTERN_C MIR_APP_DLL(void) KillModuleExtraIcons(int hLangpack);
#pragma warning(disable:4505)
-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 = { 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, hLangpack);
-}
-
-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 = { 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, hLangpack);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, MCONTACT hContact, HANDLE hImage)
-{
- EXTRAICON ei = { 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, MCONTACT hContact, const char *icoName)
-{
- EXTRAICON ei = { sizeof(ei) };
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.icoName = icoName;
-
- return CallService(MS_EXTRAICON_SET_ICON_BY_NAME, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_Clear(HANDLE hExtraIcon, MCONTACT hContact)
-{
- EXTRAICON ei = { sizeof(ei) };
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.icoName = NULL;
+EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallack(const char *name, const char *description, const char *descIcon,
+ MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon, MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = 0, int = hLangpack);
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
+EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const char *description, const char *descIcon = NULL,
+ MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = 0, int = hLangpack);
-#endif
-#endif
+EXTERN_C MIR_APP_DLL(int) ExtraIcon_SetIcon(HANDLE hExtraIcon, MCONTACT hContact, HANDLE hImage);
+EXTERN_C MIR_APP_DLL(int) ExtraIcon_SetIconByName(HANDLE hExtraIcon, MCONTACT hContact, const char *icoName);
+EXTERN_C MIR_APP_DLL(int) ExtraIcon_Clear(HANDLE hExtraIcon, MCONTACT hContact);
#endif // __M_EXTRAICONS_H__
diff --git a/include/m_fontservice.h b/include/m_fontservice.h
index 1d826437ef..d5f060a4fb 100644
--- a/include/m_fontservice.h
+++ b/include/m_fontservice.h
@@ -312,4 +312,11 @@ __forceinline void EffectRegisterW(EffectIDW* pEffectID)
// wparam = lparam = 0
#define ME_EFFECT_RELOAD "Effect/Reload"
+EXTERN_C MIR_APP_DLL(void) KillModuleFonts(int hLangpack);
+EXTERN_C MIR_APP_DLL(void) KillModuleColours(int hLangpack);
+EXTERN_C MIR_APP_DLL(void) KillModuleEffects(int hLangpack);
+
+EXTERN_C MIR_APP_DLL(void) KillModuleHotkeys(int hLangpack);
+EXTERN_C MIR_APP_DLL(void) KillModuleSounds(int hLangpack);
+
#endif // _FONT_SERVICE_API_INC
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h
index c85dad95a8..689c949dba 100644
--- a/include/m_hotkeys.h
+++ b/include/m_hotkeys.h
@@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_HOTKEYS_H__
#define M_HOTKEYS_H__ 1
+#include <m_core.h>
+
#define HKD_UNICODE 0x0001
#if defined(_UNICODE)
@@ -111,4 +113,6 @@ use it for own purposes.
#define ME_HOTKEYS_CHANGED "CoreHotkeys/Changed"
+EXTERN_C MIR_APP_DLL(void) KillModuleHotkeys(int hLangpack);
+
#endif // M_HOTKEYS_H__