summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-07 18:48:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-07 22:40:54 +0300
commitfab3905d91890102046dcc4554721991ae8ff413 (patch)
tree7514ac3e6739bf09447e9ff5c0926fee7bfe8155 /include
parent4138d31dd4609d4c29e7bd0dd8dcdedf5f3245b6 (diff)
Skin_GetProtoIcon - new function to retrieve status icon's handle
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_message.inc112
-rw-r--r--include/m_message.h10
-rw-r--r--include/m_skin.h2
3 files changed, 5 insertions, 119 deletions
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index c564f602f6..4cba1c6171 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -36,32 +36,6 @@ const
MS_MSG_SENDMESSAGE :PAnsiChar = 'SRMsg/SendCommand';
MS_MSG_SENDMESSAGEW:PAnsiChar = 'SRMsg/SendCommandW';
- ME_MSG_WINDOWEVENT:PAnsiChar = 'MessageAPI/WindowEvent';
-
- MS_MSG_CONVERS:PAnsiChar = 'SRMsg/LaunchMessageWindow';
-
- {wparam=0 }
- {lparam=(WPARAM)(MessageWindowEventData*)hWindowEvent; }
- {Event types }
- MSG_WINDOW_EVT_OPENING = 1; // window is about to be opened
- MSG_WINDOW_EVT_OPEN = 2; // window has been opened
- MSG_WINDOW_EVT_CLOSING = 3; // window is about to be closed
- MSG_WINDOW_EVT_CLOSE = 4; // window has been closed
-
-const
- { wparam=0
- lparam=0
- Returns a dword with the current message api version
- Current version is 0,0,0,4
- }
- MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
-
- { wparam=(AnsiChar*)szBuf
- lparam=(int)cbSize size of buffer
- Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
- }
- MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
-
const
MSG_WINDOW_STATE_EXISTS = $00000001; // Window exists should always be true if hwndWindow exists
MSG_WINDOW_STATE_VISIBLE = $00000002;
@@ -78,90 +52,4 @@ type
function Srmm_GetWindowData(hContact:TMCONTACT; pResult:PMessageWindowData) : int; stdcall; external AppDll;
-{ wparam=0(unused)
- lparam=(pMessageWindowEvent) event written
- fired before SRMM writes an entered message into the database
-}
-
-type
- pMessageWindowEvent = ^tMessageWindowEvent;
- tMessageWindowEvent = record
- seq :int; // number returned by PSS_MESSAGE
- hContact :TMCONTACT;
- dbei :PDBEVENTINFO; // database event written on the basis of message sent
- end;
-
-const
- ME_MSG_PRECREATEEVENT:PAnsiChar = 'MessageAPI/PreCreateEvent';
-
-{ wParam = 0
- lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
- Fired to allow plugins to add itens to the msg window popup menu
- Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
- This is done to allow cleaning of resources.
-}
- ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
-
- MSG_WINDOWPOPUP_SHOWING = 1;
- MSG_WINDOWPOPUP_SELECTED = 2;
-
- MSG_WINDOWPOPUP_INPUT = 1;
- MSG_WINDOWPOPUP_LOG = 2;
-
-type
- tMessageWindowPopupData = record
- uType :uint; // see popup types above
- uFlags :uint; // used to indicate in which window the popup was requested
- hContact :TMCONTACT;
- hwnd :HWND; // window where the popup was requested
- hMenu :HMENU; // The handle to the menu
- pt :TPOINT; // The point, in screen coords
- selection:int; // The menu control id or 0 if no one was selected
- end;
-
-// status icons
-const
- MBF_DISABLED = 1;
- MBF_HIDDEN = 2;
- MBF_UNICODE = 4;
-
-type
- pStatusIconData = ^tStatusIconData;
- tStatusIconData = record
- szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
- dwId :dword; // uniquely defines a button inside a module
- hIcon,
- hIconDisabled:HICON; // hIconDisabled is optional - if null, will use hIcon in the disabled state
- flags :int; // one of MBF_* above
- szTooltip :TChar; // controlled by MBF_UNICODE
- end;
-
-const
- MBCF_RIGHTBUTTON = 1; // if this flag is specified, the click was a right button -
- // otherwize it was a left click
-
-type
- pStatusIconClickData = ^tStatusIconClickData;
- tStatusIconClickData = record
- clickLocation:TPOINT; // click location, in screen coordinates
- szModule :PAnsiChar;
- dwId :dword;
- flags :int; // one of MBCF_* above
- end;
-
-const
-{
- wParam = (HANDLE)hContact;
- lParam = (StatusIconClickData *)&StatusIconClickData;
- catch to show a popup menu, etc.
-}
- ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
-
-{
- wParam = (HANDLE)hContact;
- lParam = (StatusIconkData*)pIcon
- catch to be notified about the icon list's change.
-}
- ME_MSG_ICONSCHANGED:PAnsiChar = 'MessageAPI/IconsChanged';
-
{$ENDIF}
diff --git a/include/m_message.h b/include/m_message.h
index df1ef4ad2c..b4c2f3ca3d 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -149,15 +149,11 @@ struct MessageWindowPopupData
struct StatusIconData
{
- char *szModule; // used in combo with the dwId below to create a unique identifier
+ const char *szModule; // used in combo with the dwId below to create a unique identifier
DWORD dwId; // uniquely defines a button inside a module
HICON hIcon, hIconDisabled; // hIconDisabled is optional - if null, will use hIcon in the disabled state
int flags; // bitwize OR of MBF_* flags above
- union {
- char *szTooltip; // controlled by MBF_UNICODE
- wchar_t *tszTooltip;
- wchar_t *wszTooltip;
- };
+ MAllCStrings szTooltip; // controlled by MBF_UNICODE
};
#define MBCF_RIGHTBUTTON 0x01 // if this flag is specified, the click was a right button - otherwize it was a left click
@@ -185,7 +181,7 @@ EXTERN_C MIR_APP_DLL(StatusIconData*) Srmm_GetNthIcon(MCONTACT hContact, int ind
struct StatusIconClickData
{
POINT clickLocation; // click location, in screen coordinates
- char *szModule;
+ const char *szModule;
DWORD dwId;
int flags; // bitwize OR of MBCF_* flags above
};
diff --git a/include/m_skin.h b/include/m_skin.h
index 522ead00b9..33ab4e6e49 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -93,6 +93,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda skin
// in all these functions idx = SKINICON_* constant
+
EXTERN_C MIR_APP_DLL(HICON) Skin_LoadIcon(int idx, bool big = false);
EXTERN_C MIR_APP_DLL(HANDLE) Skin_GetIconHandle(int idx);
EXTERN_C MIR_APP_DLL(char*) Skin_GetIconName(int idx);
@@ -117,6 +118,7 @@ EXTERN_C MIR_APP_DLL(char*) Skin_GetIconName(int idx);
// status icon.
EXTERN_C MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big = false);
+EXTERN_C MIR_APP_DLL(HANDLE) Skin_GetProtoIcon(const char *szProto, int status);
/////////////////////////////////////////////////////////////////////////////////////////
// plays a registered sound