summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_helpers.inc29
-rw-r--r--include/delphi/m_message.inc30
-rw-r--r--include/m_message.h48
3 files changed, 18 insertions, 89 deletions
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index 0e51727d89..62bdd92c10 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -40,11 +40,6 @@ function Langpack_Register:int_ptr;
function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
-function Srmm_AddIcon (sid: PStatusIconData):int_ptr;
-procedure Srmm_RemoveIcon(sid: PStatusIconData);
-procedure Srmm_ModifyIcon(hContact:TMCONTACT; sid:PStatusIconData);
-function Srmm_GetNthIcon(hContact:TMCONTACT; index:int):pStatusIconData;
-
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
function SkinPlaySound (const name: PAnsiChar): int_ptr;
@@ -336,30 +331,6 @@ begin
Result := CreateServiceFunction(szStr, @serviceProc);
end;
-// Hidden variable hLangpack - do not use Inline style
-function Srmm_AddIcon(sid: PStatusIconData):int_ptr;
-begin
- result:=CallService(MS_MSG_ADDICON, hLangpack, LPARAM(sid));
-end;
-
-procedure Srmm_RemoveIcon(sid: PStatusIconData);
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- CallService(MS_MSG_REMOVEICON, 0, LPARAM(sid));
-end;
-
-procedure Srmm_ModifyIcon(hContact:TMCONTACT; sid:PStatusIconData);
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- CallService(MS_MSG_GETNTHICON, hContact, LPARAM(sid));
-end;
-
-function Srmm_GetNthIcon(hContact:TMCONTACT; index:int):PStatusIconData;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- result:=PStatusIconData(CallService(MS_MSG_GETNTHICON, hContact, index));
-end;
-
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
var
ssd: TSKINSOUNDDESCEX;
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index a6cddc4cdc..1a50da7c6f 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -211,36 +211,6 @@ type
const
{
- wParam = hLangpack
- lParam = (StatusIconData *)&StatusIconData
-}
- MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
-
-{
- wParam = 0
- lParam = (StatusIconData *)&StatusIconData
- only szModule and szId are used
-}
- MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
-
-{
- wParam = (HANDLE)hContact
- lParam = (int)zero-based index of a visible icon
- returns (StatusIconData*)icon description filled for the required contact
- don't free this memory.
-}
- MS_MSG_GETNTHICON:PAnsiChar = 'MessageAPI/GetNthIcon';
-
-{
- wParam = (HANDLE)hContact
- lParam = (StatusIconData *)&StatusIconData
- if hContact is null, icon is modified for all contacts
- otherwise, only the flags field is valid
- if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
-}
- MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
-
-{
wParam = (HANDLE)hContact;
lParam = (StatusIconClickData *)&StatusIconClickData;
catch to show a popup menu, etc.
diff --git a/include/m_message.h b/include/m_message.h
index 8d4678daca..fe80b9c8e8 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -175,50 +175,38 @@ typedef struct {
#define MBCF_RIGHTBUTTON 0x01 // if this flag is specified, the click was a right button - otherwize it was a left click
-typedef struct {
- int cbSize;
- POINT clickLocation; // click location, in screen coordinates
- char *szModule;
- DWORD dwId;
- int flags; // bitwize OR of MBCF_* flags above
-} StatusIconClickData;
+// adds an icon
-// wParam = (int)hLangpack
-// lParam = (StatusIconData *)&StatusIconData
-// #define MS_MSG_ADDICON "MessageAPI/AddIcon"
+EXTERN_C MIR_APP_DLL(int) Srmm_AddIcon(StatusIconData *sid, int _hLang = hLangpack);
-__forceinline INT_PTR Srmm_AddIcon(StatusIconData *sid)
-{ return CallService("MessageAPI/AddIcon", hLangpack, (LPARAM)sid);
-}
+// removes an icon
-// wParam = 0 (unused)
-// lParam = (StatusIconData *)&StatusIconData
-// only szModule and szId are used
-#define MS_MSG_REMOVEICON "MessageAPI/RemoveIcon"
+EXTERN_C MIR_APP_DLL(void) Srmm_RemoveIcon(const char *szProto, DWORD iconId);
-__forceinline void Srmm_RemoveIcon(StatusIconData *sid)
-{ CallService(MS_MSG_REMOVEICON, 0, (LPARAM)sid);
-}
-
-// wParam = (HANDLE)hContact
-// lParam = (StatusIconData *)&StatusIconData
// if hContact is null, icon is modified for all contacts
// otherwise, only the flags field is valid
// if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
-#define MS_MSG_MODIFYICON "MessageAPI/ModifyIcon"
-__forceinline void Srmm_ModifyIcon(MCONTACT hContact, StatusIconData *sid)
-{ CallService(MS_MSG_MODIFYICON, hContact, (LPARAM)sid);
-}
+EXTERN_C MIR_APP_DLL(int) Srmm_ModifyIcon(MCONTACT hContact, StatusIconData *sid);
// wParam = (HANDLE)hContact
// lParam = (int)zero-based index of a visible icon
// returns (StatusIconData*)icon description filled for the required contact
// don't free this memory.
-__forceinline StatusIconData* Srmm_GetNthIcon(MCONTACT hContact, int index)
-{ return (StatusIconData*)CallService("MessageAPI/GetNthIcon", hContact, index);
-}
+EXTERN_C MIR_APP_DLL(StatusIconData*) Srmm_GetNthIcon(MCONTACT hContact, int index);
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// status icons click notification
+
+struct StatusIconClickData
+{
+ int cbSize;
+ POINT clickLocation; // click location, in screen coordinates
+ char *szModule;
+ DWORD dwId;
+ int flags; // bitwize OR of MBCF_* flags above
+};
// wParam = (HANDLE)hContact;
// lParam = (StatusIconClickData *)&StatusIconClickData;