diff options
author | Alexey Kulakov <panda75@bk.ru> | 2012-07-04 20:10:29 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2012-07-04 20:10:29 +0000 |
commit | 65e002b63efdb00571d0ba4ec1a73b14e1d7d3a0 (patch) | |
tree | d96b2f52ca3c89172f269cdb172c89cf6141d69c /include/delphi/m_message.inc | |
parent | d7f143dba9e53347a1d7897bcd3989751c7f45f8 (diff) |
Pascal headers moved to include\delphi directory (with small updates)
removed deprecated m_mwclc.h file and link on it in AutoShutdown plugin
git-svn-id: http://svn.miranda-ng.org/main/trunk@763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/delphi/m_message.inc')
-rw-r--r-- | include/delphi/m_message.inc | 235 |
1 files changed, 190 insertions, 45 deletions
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc index dec113bb53..5e25657de8 100644 --- a/include/delphi/m_message.inc +++ b/include/delphi/m_message.inc @@ -1,57 +1,202 @@ -(*
+{
+ Miranda IM: the free IM client for Microsoft Windows
+
+ Copyright 2000-2003 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.
+}
+{$IFNDEF M_MESSAGE}
+{$DEFINE M_MESSAGE}
+const
+ {brings up the send message dialog for a contact
+ wParam=(WPARAM)(HANDLE)hContact
+ lParam=(LPARAM)(AnsiChar*)szText
+ returns 0 on success or nonzero on failure
+ returns immediately, just after the dialog is shown
+ szText is the text to put in the edit box of the window (but not send)
+ szText=NULL will not use any text
+ szText!=NULL is only supported on v0.1.2.0+
+ NB: Current versions of the convers plugin use the name
+ "SRMsg/LaunchMessageWindow" instead. For compatibility you should call
+ both names and the correct one will work. }
+ MS_MSG_SENDMESSAGE :PAnsiChar = 'SRMsg/SendCommand';
+ MS_MSG_SENDMESSAGEW:PAnsiChar = 'SRMsg/SendCommandW';
-Miranda IM: the free IM client for Microsoft* Windows*
+ ME_MSG_WINDOWEVENT:PAnsiChar = 'MessageAPI/WindowEvent';
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
+ MS_MSG_CONVERS:PAnsiChar = 'SRMsg/LaunchMessageWindow';
-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.
+ {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
+ MSG_WINDOW_EVT_CUSTOM = 5; // custom event for message plugins to use
+ // (custom uFlags may be used)
+ MSG_WINDOW_UFLAG_MSG_FROM = $00000001;
+ MSG_WINDOW_UFLAG_MSG_TO = $00000002;
+ MSG_WINDOW_UFLAG_MSG_BOTH = $00000004;
-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.
+type
+ PMessageWindowEventData = ^TMessageWindowEventData;
+ TMessageWindowEventData = record
+ cbSize : int;
+ hContact : THANDLE;
+ hwndWindow: HWND; // top level window for the contact
+ szModule : PAnsiChar; // used to get plugin type (which means you could use
+ // local if needed)
+ uType : uint; // see event types above
+ uFlags : uint; // used to indicate message direction for all event
+ // types except custom
+ local : pointer; // used to store pointer to custom data
+ hwndInput : HWND; // input area window for the contact (or NULL if there is none)
+ hwndLog : HWND; // log area window for the contact (or NULL if there is none)
+ end;
-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.
+const
+ MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
+ { wparam=0
+ lparam=0
+ Returns a dword with the current message api version
+ Current version is 0,0,0,4
+ }
-*)
+ MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
+ { wparam=(AnsiChar*)szBuf
+ lparam=(int)cbSize size of buffer
+ Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
+ }
-{$IFNDEF M_MESSAGE}
-{$DEFINE M_MESSAGE}
+type
+ PMessageWindowInputData = ^TMessageWindowInputData;
+ TMessageWindowInputData = record
+ cbSize : int;
+ hContact: THANDLE;
+ uFlags : int; // see uflags above
+ end;
const
+ MSG_WINDOW_STATE_EXISTS = $00000001; // Window exists should always be true
+ // if hwndWindow exists
+ MSG_WINDOW_STATE_VISIBLE = $00000002;
+ MSG_WINDOW_STATE_FOCUS = $00000004;
+ MSG_WINDOW_STATE_ICONIC = $00000008;
+
+type
+ PMessageWindowOutputData = ^TMessageWindowOutputData;
+ TMessageWindowOutputData = record
+ cbSize : int;
+ hContact : THANDLE;
+ uFlags : int; // should be same as input data unless 0, then it
+ // will be the actual type
+ hwndWindow: HWND; // top level window for the contact or NULL if no window exists
+ uState : int; // see window states
+ local : pointer; // used to store pointer to custom data
+ end;
+ PMessageWindowData = PMessageWindowOutputData;
+ TMessageWindowData = TMessageWindowOutputData;
+
+const
+ MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
+{ wparam=(MessageWindowInputData*)
+ lparam=(MessageWindowOutputData*)
+ returns 0 on success and returns non-zero (1) on error or if no window data
+ exists for that hcontact
+}
+
+ ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
+{ 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.
+}
+ MSG_WINDOWPOPUP_SHOWING = 1;
+ MSG_WINDOWPOPUP_SELECTED = 2;
+
+ MSG_WINDOWPOPUP_INPUT = 1;
+ MSG_WINDOWPOPUP_LOG = 2;
+
+type
+ MessageWindowPopupData = record
+ cbSize :int;
+ uType :uint; // see popup types above
+ uFlags :uint; // used to indicate in which window the popup was requested
+ hContact :THANDLE;
+ 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 - HICONs will be automatically destroyed when removed or when miranda exits
+const
+ MBF_DISABLED = 1;
+ MBF_HIDDEN = 2;
+
+type
+ StatusIconData = record
+ cbSize :int;
+ szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
+ dwId :DWORD;
+ hIcon,
+ hIconDisabled:HICON; // hIconDisabled is optional - if null, will use hIcon in the disabled state
+ flags :int; // one of MBF_* above
+ szTooltip :PAnsiChar;
+ end;
+
+const
+ MBCF_RIGHTBUTTON = 1; // if this flag is specified, the click was a right button -
+ // otherwize it was a left click
+
+type
+ StatusIconClickData = record
+ cbSize :int;
+ clickLocation:TPOINT; // click location, in screen coordinates
+ szModule :PAnsiChar;
+ dwId :DWORD;
+ flags :int; // one of MBCF_* above
+ end;
+
+const
+ MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
+// lParam = (StatusIconData *)&StatusIconData
+
+ MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
+{
+ lParam = (StatusIconData *)&StatusIconData
+ only szModule and szId are used
+}
- {
- wParam : HCONTACT
- lParam : Pointer to a null terminated string
- Affects: brings up the send message dialog for a contact, see notes
- Returns: 0 on success, non zero on failure
- Notes : returns immediately, just after the send dialog is shown,
- the lParam is entered into the editbox of the window,
- but it's not sent.
- Version: v0.1.2.0+ only supports a string, prior NULL(0) is expected
- this service was defined as 'SRMsg/LaunchMessageWindow'
- use both if compatibility use both, the correct one will work,
- but don't rely on the message to be displayed
-
- }
- MS_MSG_SENDMESSAGE = 'SRMsg/SendCommand';
- MS_MSG_SENDMESSAGE_OLD = 'SRMsg/LaunchMessageWindow';
-
- {
- wParam : 0
- lParam : Pointer to a null termed string
- Affects: displays the send message dialog with the 'multiple' option open
- and no contacts selected
- Returns: Returns 0 on success, nonzero on failure
- Version: only present after v0.1.2.1+
- }
- MS_MSG_FORWARDMESSAGE = 'SRMsg/ForwardMessage';
+ MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
+{
+ 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
+}
+ ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
+{
+ wParam = (HANDLE)hContact;
+ lParam = (StatusIconClickData *)&StatusIconClickData;
+ catch to show a popup menu, etc.
+}
{$ENDIF}
|