summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/delphi/deprecated/m_errors.inc (renamed from include/delphi/m_errors.inc)0
-rw-r--r--include/delphi/m_acc.inc6
-rw-r--r--include/delphi/m_addcontact.inc4
-rw-r--r--include/delphi/m_api.pas15
-rw-r--r--include/delphi/m_avatars.inc30
-rw-r--r--include/delphi/m_awaymsg.inc4
-rw-r--r--include/delphi/m_button_int.inc2
-rw-r--r--include/delphi/m_chat.inc15
-rw-r--r--include/delphi/m_clc.inc10
-rw-r--r--include/delphi/m_clist.inc47
-rw-r--r--include/delphi/m_clistint.inc224
-rw-r--r--include/delphi/m_clui.inc16
-rw-r--r--include/delphi/m_cluiframes.inc2
-rw-r--r--include/delphi/m_contacts.inc14
-rw-r--r--include/delphi/m_core.inc246
-rw-r--r--include/delphi/m_crypto.inc84
-rw-r--r--include/delphi/m_database.inc49
-rw-r--r--include/delphi/m_db_int.inc78
-rw-r--r--include/delphi/m_email.inc2
-rw-r--r--include/delphi/m_extraicons.inc4
-rw-r--r--include/delphi/m_file.inc34
-rw-r--r--include/delphi/m_fontservice.inc39
-rw-r--r--include/delphi/m_genmenu.inc20
-rw-r--r--include/delphi/m_helpers.inc145
-rw-r--r--include/delphi/m_history.inc4
-rw-r--r--include/delphi/m_hotkeys.inc5
-rw-r--r--include/delphi/m_icolib.inc2
-rw-r--r--include/delphi/m_iconheader.inc24
-rw-r--r--include/delphi/m_icq.inc10
-rw-r--r--include/delphi/m_ignore.inc10
-rw-r--r--include/delphi/m_imgsrvc.inc156
-rw-r--r--include/delphi/m_json.inc44
-rw-r--r--include/delphi/m_langpack.inc2
-rw-r--r--include/delphi/m_message.inc22
-rw-r--r--include/delphi/m_metacontacts.inc39
-rw-r--r--include/delphi/m_msg_buttonsbar.inc16
-rw-r--r--include/delphi/m_netlib.inc80
-rw-r--r--include/delphi/m_pluginupdater.inc12
-rw-r--r--include/delphi/m_popup.inc45
-rw-r--r--include/delphi/m_protocols.inc24
-rw-r--r--include/delphi/m_protoint.inc54
-rw-r--r--include/delphi/m_protomod.inc4
-rw-r--r--include/delphi/m_protosvc.inc32
-rw-r--r--include/delphi/m_ssl.inc8
-rw-r--r--include/delphi/m_system.inc4
-rw-r--r--include/delphi/m_timezones.inc12
-rw-r--r--include/delphi/m_url.inc2
-rw-r--r--include/delphi/m_utils.inc22
-rw-r--r--include/delphi/m_xml.inc4
-rw-r--r--include/delphi/m_zlib.inc30
50 files changed, 911 insertions, 846 deletions
diff --git a/include/delphi/m_errors.inc b/include/delphi/deprecated/m_errors.inc
index af9579ebe2..af9579ebe2 100644
--- a/include/delphi/m_errors.inc
+++ b/include/delphi/deprecated/m_errors.inc
diff --git a/include/delphi/m_acc.inc b/include/delphi/m_acc.inc
index cb82eec23c..7556af5130 100644
--- a/include/delphi/m_acc.inc
+++ b/include/delphi/m_acc.inc
@@ -97,7 +97,7 @@ const
Sets if the hidden setting must be respected and hidden avatars shouldn't be draw
Default: TRUE
wParam = not used
- lParam = (BOOL) respect?
+ lParam = (bool) respect?
Usage: SendMessage(hwnd, AVATAR_RESPECTHIDDEN, 0, (LPARAM) FALSE);
Only works on AVATAR_CONTROL_CLASS controls
}
@@ -117,7 +117,7 @@ const
Sets if the avatar will be resized when its smaller then the control size
Default: TRUE
wParam = not used
- lParam = (BOOL) TRUE or FALSE
+ lParam = (bool) TRUE or FALSE
Usage: SendMessage(hwnd, AVATAR_SETRESIZEIFSMALLER, 0, (LPARAM) FALSE);
Only works on AVATAR_CONTROL_CLASS controls
}
@@ -126,7 +126,7 @@ const
{
tell acc to paint avatar on aero surface (must draw with alpha channel, not using BitBlt()
wParam = not used
- lParam = (BOOL) TRUE -> enable, FALSE -> disable
+ lParam = (bool) TRUE -> enable, FALSE -> disable
}
AVATAR_SETAEROCOMPATDRAWING = WM_USER+11;
diff --git a/include/delphi/m_addcontact.inc b/include/delphi/m_addcontact.inc
index fc19913b8a..6b4201640f 100644
--- a/include/delphi/m_addcontact.inc
+++ b/include/delphi/m_addcontact.inc
@@ -32,9 +32,9 @@ type
PADDCONTACTSTRUCT = ^TADDCONTACTSTRUCT;
TADDCONTACTSTRUCT = record
handleType: int;
- handle : THandle; // HDBEVENT, MCONTACT, SearchResult
+ handle : THANDLE; // HDBEVENT, TMCONTACT, SearchResult
szProto : PAnsiChar; // used by search result only
- psr : Pointer; // @PROTOSEARCHRESULT
+ psr : pointer; // @PROTOSEARCHRESULT
end;
const
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas
index 94ff48a9c3..dad86df80c 100644
--- a/include/delphi/m_api.pas
+++ b/include/delphi/m_api.pas
@@ -72,7 +72,7 @@ type
plong = ^long;
{$IFDEF VER150}
UnicodeString = WideString;
- ULONG_PTR = LongWord;
+ ULONG_PTR = longword;
{$ENDIF}
DWORD_PTR = ULONG_PTR;
size_t = ULONG_PTR;
@@ -83,13 +83,13 @@ type
int = integer;
// uint = Cardinal;
// pint = ^int;
-// WPARAM = Integer;
-// LPARAM = Integer;
+// WPARAM = integer;
+// LPARAM = integer;
TLPARAM = LPARAM;
TWPARAM = WPARAM;
// My definitions
- TWNDPROC = function (Dialog:HWnd; hMessage:uint; wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+ TWNDPROC = function (Dialog:HWND; hMessage:uint; wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
type
PTChar = ^TChar;
@@ -129,7 +129,7 @@ type
TPLUGININFOEX = record
cbSize :int;
shortName :PAnsiChar;
- version :DWORD;
+ version :dword;
description:PAnsiChar;
author :PAnsiChar;
authorEmail:PAnsiChar;
@@ -149,7 +149,7 @@ type
//lParam=HINSTANCE of the loaded plugin
}
const
- ME_SYSTEM_MODULELOAD:pAnsiChar = 'Miranda/System/LoadModule';
+ ME_SYSTEM_MODULELOAD:PAnsiChar = 'Miranda/System/LoadModule';
{
Miranda/System/UnloadModule event
@@ -157,7 +157,7 @@ const
wParam=PLUGININFOEX*
lParam=HINSTANCE of the loaded plugin
}
- ME_SYSTEM_MODULEUNLOAD:pAnsiChar = 'Miranda/System/UnloadModule';
+ ME_SYSTEM_MODULEUNLOAD:PAnsiChar = 'Miranda/System/UnloadModule';
{
Each service mode plugin must implement MS_SERVICEMODE_LAUNCH
@@ -235,7 +235,6 @@ var
{$include m_descbutton.inc}
{$include m_iconheader.inc}
{$include m_extraicons.inc}
- {$include m_errors.inc}
{$include m_proto_listeningto.inc}
{$include m_toptoolbar.inc}
{$include m_msg_buttonsbar.inc}
diff --git a/include/delphi/m_avatars.inc b/include/delphi/m_avatars.inc
index 49e88725de..02dff04924 100644
--- a/include/delphi/m_avatars.inc
+++ b/include/delphi/m_avatars.inc
@@ -70,13 +70,13 @@ const
type
PavatarCacheEntryW = ^TavatarCacheEntryW;
TavatarCacheEntryW = record
- cbSize : DWORD; // set to sizeof(struct)
- hContact : MCONTACT; // contacts handle, 0, if it is a protocol avatar
+ cbSize : dword; // set to sizeof(struct)
+ hContact : TMCONTACT; // contacts handle, 0, if it is a protocol avatar
hbmPic : HBITMAP; // bitmap handle of the picture itself
- dwFlags : DWORD; // see above for flag values
+ dwFlags : dword; // see above for flag values
bmHeight : long; // bitmap dimensions
bmWidth : long;
- t_lastAccess: DWORD; // last access time (currently unused, but plugins should still
+ t_lastAccess: dword; // last access time (currently unused, but plugins should still
// use it whenever they access the avatar. may be
// used in the future to implement cache expiration
lpDIBSection: pointer;
@@ -85,13 +85,13 @@ type
PavatarCacheEntry = ^TavatarCacheEntry;
TavatarCacheEntry = record
- cbSize : DWORD; // set to sizeof(struct)
- hContact : MCONTACT; // contacts handle, 0, if it is a protocol avatar
+ cbSize : dword; // set to sizeof(struct)
+ hContact : TMCONTACT; // contacts handle, 0, if it is a protocol avatar
hbmPic : HBITMAP; // bitmap handle of the picture itself
- dwFlags : DWORD; // see above for flag values
+ dwFlags : dword; // see above for flag values
bmHeight : long; // bitmap dimensions
bmWidth : long;
- t_lastAccess: DWORD; // last access time (currently unused, but plugins should still
+ t_lastAccess: dword; // last access time (currently unused, but plugins should still
// use it whenever they access the avatar. may be
// used in the future to implement cache expiration
lpDIBSection: pointer;
@@ -118,16 +118,16 @@ const
type
PavatarDrawRequest = ^TavatarDrawRequest;
TavatarDrawRequest = record
- cbSize : DWORD; // set this to sizeof(AVATARDRAWREQUEST) - mandatory,
+ cbSize : dword; // set this to sizeof(AVATARDRAWREQUEST) - mandatory,
// service will return failure code if cbSize is wrong
- hContact : MCONTACT; // the contact for which the avatar should be drawn.
+ hContact : TMCONTACT; // the contact for which the avatar should be drawn.
// set it to 0 to draw a protocol picture
hTargetDC : HDC; // target device context
rcDraw : TRECT; // target rectangle. The avatar will be centered
// within the rectangle and scaled to fit.
- dwFlags : DWORD; // flags (see above for valid bitflags)
- dwReserved: DWORD; // for future use
- dwInternal: DWORD; // don't use it
+ dwFlags : dword; // flags (see above for valid bitflags)
+ dwReserved: dword; // for future use
+ dwInternal: dword; // don't use it
clrBorder : TCOLORREF; // color for the border (used with AVDRQ_DRAWBORDER)
radius : byte; // radius (used with AVDRQ_ROUNDEDCORNER)
alpha : byte; // alpha value for semi-transparent avatars (valid
@@ -243,7 +243,7 @@ const
type
TContactAvatarChangedNotificationW = record
cbSize :int; // sizeof()
- hContact:MCONTACT; // this might have to be set by the caller too
+ hContact:TMCONTACT; // this might have to be set by the caller too
format :int; // PA_FORMAT_*
filename:array [0..MAX_PATH-1] of WideChar; // full path to filename which contains the avatar
hash :array [0..127] of WideChar; // avatar hash (always an empty string by now)
@@ -251,7 +251,7 @@ type
TContactAvatarChangedNotification = record
cbSize :int; // sizeof()
- hContact:MCONTACT; // this might have to be set by the caller too
+ hContact:TMCONTACT; // this might have to be set by the caller too
format :int; // PA_FORMAT_*
filename:array [0..MAX_PATH-1] of AnsiChar; // full path to filename which contains the avatar
hash :array [0..127] of AnsiChar; // avatar hash (always an empty string by now)
diff --git a/include/delphi/m_awaymsg.inc b/include/delphi/m_awaymsg.inc
index 9f1bf262b7..ad79e6c12f 100644
--- a/include/delphi/m_awaymsg.inc
+++ b/include/delphi/m_awaymsg.inc
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Show the away/na/etc message for a contact
Returns: 0 on success, non zero on failure, see notes
@@ -38,7 +38,7 @@ const
returns: (PWideChar) the default status message for a status
wParam=status
lParam=szProto
- notes: returns status msg. Remember to free the return value
+ notes: returns status msg. Remember to free the return value using mir_free
}
MS_AWAYMSG_GETSTATUSMSGW:PAnsiChar = 'SRAway/GetStatusMessageW';
diff --git a/include/delphi/m_button_int.inc b/include/delphi/m_button_int.inc
index 88417cb8f9..cd44eb33d6 100644
--- a/include/delphi/m_button_int.inc
+++ b/include/delphi/m_button_int.inc
@@ -32,7 +32,7 @@ type
pfnPainterFunc = procedure (mb:pMButtonCtrl; dc:HDC); cdecl;
type
- MButtonCtrl = record
+ tMButtonCtrl = record
hwnd:HWND;
stateId:int; // button state
focus:int; // has focus (1 or 0)
diff --git a/include/delphi/m_chat.inc b/include/delphi/m_chat.inc
index 627ff7cf86..5ba790fe65 100644
--- a/include/delphi/m_chat.inc
+++ b/include/delphi/m_chat.inc
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1. Do NOT touch hContacts that has a byte "ChatRoom" set to ANYTHING other than 0! (Could be 1, 2, 3, ...)
This is because chat.dll adds contacts to the clist using the protocol name
supplied by the protocol. But this will naturally not work well if the
- protocol also tampers with the contacts. The value of the BYTE indicates which type of
+ protocol also tampers with the contacts. The value of the byte indicates which type of
window/contact it is (see the GCW_* flags below). There is two exceptions to this rule:
* You should continue to handle the right click menu items of these
@@ -81,7 +81,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
There is not more to it than that! To recapitulate: do NOT touch contacts where the
- BYTE "ChatRoom" is set to anything other than 0,
+ byte "ChatRoom" is set to anything other than 0,
*)
{
OK, enough of the precautions, HOW DO YOU USE CHAT? In short you need to do FOUR things:
@@ -141,7 +141,7 @@ const
type
TGCREGISTER = record
cbSize :int; //Set to sizeof(GCREGISTER);
- dwFlags :DWORD; //Use GC_* flags above to indicate features supported
+ dwFlags :dword; //Use GC_* flags above to indicate features supported
pszModule :PAnsiChar; //This MUST be the protocol name as registered with Miranda IM
pszModuleDispName:TChar; //This is the protocol's real name as it will be displayed to the user
iMaxText :int; //Max message length the protocol supports. Will limit the typing area input. 0 = no limit
@@ -403,7 +403,7 @@ const
// GC_EVENT_SETCONTACTSTATUS - sets status icon for contact
// pszUID - Unique identifier of the one who receives a new status
-// pszStatus - (DWORD)ID_STATUS_* or zero to remove status icon
+// pszStatus - (dword)ID_STATUS_* or zero to remove status icon
GC_EVENT_SETCONTACTSTATUS = $100A;
// GC_EVENT_CONTROL - not shown in the log (Control window associated to a session and the session itself)
@@ -463,6 +463,11 @@ type
const
MS_GC_EVENT:PAnsiChar = 'GChat/NewEvent';
+// This hook is fired when MS_GC_EVENT is called, with the same wParam and lParam as above.
+// It allows external plugins to intercept chat events and display then in other ways
+ ME_GC_HOOK_EVENT:PAnsiChar = 'GChat/HookEvent';
+
+
GCEF_ADDTOLOG = $0001;
GCEF_REMOVECONTACT = $0002;
// Added in Miranda NG 0.94.4+
@@ -516,7 +521,7 @@ type
iCount :int; // count of users in the nicklist
pszUsers :PAnsiChar; // space separated string containing the UID's of the users in the user list.
// NOTE. Use Mirandas mmi_free() on the returned string.
- hContact :MCONTACT; // hContact for the session (can be NULL)
+ hContact :TMCONTACT; // hContact for the session (can be NULL)
end;
const
diff --git a/include/delphi/m_clc.inc b/include/delphi/m_clc.inc
index c86315c9ac..08efd25d66 100644
--- a/include/delphi/m_clc.inc
+++ b/include/delphi/m_clc.inc
@@ -218,18 +218,18 @@ type
TCLCINFOITEM = record
cbSize : int;
pszText : TChar;
- hParentGroup: THandle;
- flags : DWORD;
+ hParentGroup: THANDLE;
+ flags : dword;
hIcon : HICON; // todo
end;
PNMCLISTCONTROL = ^TNMCLISTCONTROL;
TNMCLISTCONTROL = record
hdr : TNMHDR; // depends on Windows.pas
- hItem : THandle;
+ hItem : THANDLE;
action : int;
iColumn: int; // -1 if not on an extra column
- flags : DWORD;
+ flags : dword;
pt : TPoint; // depends on Windows.pas
end;
@@ -303,4 +303,4 @@ const
}
MS_CLC_GETINFOTIPHOVERTIME:PAnsiChar = 'CLC/GetInfoTipHoverTime';
-{$ENDIF} \ No newline at end of file
+{$ENDIF}
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 879e3bb3b3..bf14ee784c 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -54,18 +54,18 @@ type
TCLISTMENUITEM = record
cbSize : int; // size in bytes of this structure
szName : TChar; // [TRANSLATED-BY-CORE] text of the menu item
- flags : DWORD;
+ flags : dword;
position : int; // approx position on the menu, lower numbers go nearer the top
- hIcon : THandle; // icon to put by the item, if this was *not* loaded from
+ hIcon : THANDLE; // icon to put by the item, if this was *not* loaded from
// a resource, you can delete it straight after the call
- //icolibItem:HANDLE; if CMIF_ICONFROMICOLIB used
+ //icolibItem:THANDLE; if CMIF_ICONFROMICOLIB used
pszService : PAnsiChar; // name of the service to call when the service is clicked
szPopupName : TChar; // [TRANSLATED-BY-CORE] name of the popup menu that this item is on, if this
// is NULL the iteem is on the root of the menu
// or hParentMenu:HGENMENU - valid if CMIF_ROOTHANDLE is set. NULL or (HGENMENU)-1 means the root menu
popupPosition : int; // position of the popup menu on the root menu, ignored
// if pszPopupName is NULL(0) or if the popup menu already exists
- hotKey : DWORD; // keyboard accelerator, same as lParam of WM_HOTKEY, 0 for none
+ hotKey : dword; // keyboard accelerator, same as lParam of WM_HOTKEY, 0 for none
pszContactOwner: PAnsiChar; // contact menus only, the protocol module that owns
// the contacts to which this to which this menu item
// applies, NULL(0) if it applies to all contacts.
@@ -147,14 +147,14 @@ const
{
wParam : (HGENMENU)hMenuItem
- lParam : (BOOL) enable = TRUE, disable = FALSE
+ lParam : (bool) enable = TRUE, disable = FALSE
Notes : changes menu item's visibility
Version: v0.94.2+
}
MS_CLIST_SHOWHIDEMENUITEM:PAnsiChar = 'CList/ShowHideMenuItem';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : the context menu for a contact is about to be built, see notes
Notes : modules should use this to change menu items that are specific
@@ -168,7 +168,7 @@ type
TCLISTDOUBLECLICKACTION = record
cbSize : int;
pszContactOwner: PAnsiChar; // name of the protocol owning the contact or NULL(0) for all
- flags : DWORD; // CMIF_NOT flags above
+ flags : dword; // CMIF_NOT flags above
pszService : PAnsiChar; // service to call on double click, is called with wParam=hContact, lParam=0
end;
@@ -189,10 +189,10 @@ const
MS_CLIST_SETDOUBLECLICKACTION:PAnsiChar = 'CList/SetDoubleClickAction';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : <none>
Affect : Register with this event to be notified of a double click on the CList
- against a MCONTACT, you will not be notified if there is a pending CList event
+ against a TMCONTACT, you will not be notified if there is a pending CList event
that the double click clears, (i.e. flashing icon is presented to be clicked)
Version: 0.3.0.0
}
@@ -202,7 +202,7 @@ const
GCDNF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
GCDNF_NOCACHE = 4; // will not use the cache
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : flags
Affect : Gets the string that the contact list will use to represent a contact
Returns: Always a pointer
@@ -227,9 +227,9 @@ type
PCLISTEVENT = ^TCLISTEVENT;
TCLISTEVENT = record
cbSize : int; // size in bytes
- hContact : MCONTACT; // handle to the contact to put the icon by
+ hContact : TMCONTACT; // handle to the contact to put the icon by
hIcon : HICON; // icon to flash!
- flags : DWORD;
+ flags : dword;
hDBEvent : THANDLE; // caller defined, but should be unique for hContact
// or pszProtocol:PAnsiChar
lParam : LPARAM;
@@ -267,7 +267,7 @@ const
MS_CLIST_ADDEVENT:PAnsiChar = 'CList/AddEvent';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : HDBEVENT
Affect : Remove an event from the contact list queue
Returns: 0 on success, [non zero] on failure
@@ -275,15 +275,15 @@ const
MS_CLIST_REMOVEEVENT:PAnsiChar = 'Clist/RemoveEvent';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : iEvent
Affect : Get the details of an event in the queue, see notes
Returns: A CLISTEVENT* or NULL(0) on failure
Notes : Returns the iEvent'1st/2nd/3rd/nth elemented queried,
e.g. iEvent=0 will get the event that will be returned if the
- user double clicks on that MCONTACT
+ user double clicks on that TMCONTACT
-
- Use MCONTACT=NULL, iEvent=0 for example to get the event
+ Use TMCONTACT=NULL, iEvent=0 for example to get the event
the user will get if they double click on the tray.
Version: v0.1.2.1+
}
@@ -312,7 +312,7 @@ const
MS_CLIST_MENUDRAWITEM:PAnsiChar = 'CList/MenuDrawItem';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Built the context menu for a specific contact
Returns: A HMENU handle identifying the menu, this should be DestroyMenu()ed
@@ -332,7 +332,7 @@ const
IMAGE_GROUPSHUT = 12;
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Get the icon that should be associated with a contact
Returns: an index into the contact list imagelist, if the icon
@@ -343,7 +343,7 @@ const
MS_CLIST_GETCONTACTICON:PAnsiChar = 'CList/GetContactIcon';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : ICON_ID
Affect : The icon of a contact in the contact list has changed,
ICON_ID is an index to what image has changed
@@ -390,7 +390,7 @@ const
MPCF_MAINMENU = 2; // test commands from the main menu
{
wParam : MAKEWPARAM(LOWORD(wParam of WM_COMMAND),flags)
- lParam : MCONTACT
+ lParam : TMCONTACT
Affect : Process a menu selection from a menu, see notes
Returns: True if it processed the command, False otherwise
notes : hContact is the currently selected contact, it is not used
@@ -461,6 +461,7 @@ type
pszOldName:TChar; //old group name
pszNewName:TChar; //new group name
end;
+
const
ME_CLIST_GROUPCHANGE:PAnsiChar = 'CList/GroupChange';
@@ -587,7 +588,7 @@ const
MS_CLIST_SETHIDEOFFLINE:PAnsiChar = 'CList/SetHideOffline';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Do the message processing associated with the double clicking a contact
Returns: 0 on success, [non zero] on failure
@@ -596,7 +597,7 @@ const
MS_CLIST_CONTACTDOUBLECLICKED:PAnsiChar = 'CList/ContactDoubleClicked';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : Pointer to an array of PAnsiChar's containing files/dirs
Affect : Do the processing when some files are droppeed on a contact, see notes
Returns: 0 on success, [non zero] on failure
@@ -606,7 +607,7 @@ const
MS_CLIST_CONTACTFILESDROPPED:PAnsiChar = 'CList/ContactFilesDropped';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : HGROUP
Affect : Change the group a contact belongs to, see notes
Returns: 0 on success, [non zero] on failure
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index 48524db3df..71e22c8273 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -46,9 +46,9 @@ const
MAX_TIP_SIZE = 2048;
EXTRA_ICON_COUNT = 10;
-function IsHContactGroup (h:THANDLE):bool;
-function IsHContactInfo (h:THANDLE):bool;
-function IsHContactContact(h:THANDLE):bool;
+function IsHContactGroup (h:TMCONTACT):bool;
+function IsHContactInfo (h:TMCONTACT):bool;
+function IsHContactContact(h:TMCONTACT):bool;
const
INTM_NAMECHANGED = WM_USER+10;
@@ -79,20 +79,20 @@ const
GROUP_ALLOCATE_STEP = 8;
type
- PClcContact = ^ClcContact;
- ClcContact = record
+ PClcContact = ^tClcContact;
+ tClcContact = record
{undefined structure}
- end;
+ end;
- PClcData = ^ClcData;
- ClcData = record
+ PClcData = ^tClcData;
+ tClcData = record
{undefined structure}
- end;
+ end;
{ templates, where are you... }
- PContactList = ^ContactList;
- ContactList = record
+ PContactList = ^tContactList;
+ tContactList = record
items : ^PClcContact;
count : int;
limit : int;
@@ -100,8 +100,8 @@ type
sortFunc : pointer;
end;
- PEventList = ^EventList;
- EventList = record
+ PEventList = ^TEventList;
+ TEventList = record
items : ^PCListEvent;
count : int;
limit : int;
@@ -109,9 +109,9 @@ type
sortFunc : pointer;
end;
- pClcGroup = ^ClcGroup;
- ClcGroup = record
- cl : ContactList;
+ pClcGroup = ^tClcGroup;
+ tClcGroup = record
+ cl : tContactList;
expanded : int;
hideOffline : int;
groupId : int;
@@ -120,8 +120,8 @@ type
totalMembers : int;
end;
- pClcFontInfo = ^ClcFontInfo;
- ClcFontInfo = record
+ pClcFontInfo = ^tClcFontInfo;
+ tClcFontInfo = record
hFont : HFONT;
fontHeight : int;
changed : int;
@@ -133,7 +133,7 @@ type
case boolean of
false: (
iImage:int;
- hContact:MCONTACT);
+ hContact:TMCONTACT);
true : (
groupId:word;
group :pClcGroup;);
@@ -145,17 +145,17 @@ type
data :tCLCCB;
iExtraImage:array [0..EXTRA_ICON_COUNT-1] of word;
szText :array [0..120-EXTRA_ICON_COUNT-1] of WideChar;
- proto :pAnsiChar; // MS_PROTO_GETBASEPROTO
+ proto :PAnsiChar; // MS_PROTO_GETBASEPROTO
end;
type
pClcDataBase = ^tClcDataBase;
tClcDataBase = record
- list :ClcGroup;
+ list :TClcGroup;
rowHeight :int;
yScroll :int;
selection :int;
- fontInfo :array [0..FONTID_MAX] of ClcFontInfo;
+ fontInfo :array [0..FONTID_MAX] of TClcFontInfo;
scrollTime :int;
himlHighlight :THANDLE; // HIMAGELIST in CommCtrl
groupIndent :int;
@@ -209,14 +209,14 @@ type
{This is DLL-based unique name }
- P_menuProto = ^_menuProto;
- _menuProto = record
+ P_menuProto = ^T_menuProto;
+ T_menuProto = record
szProto : PAnsiChar;
pMenu : HGENMENU;
hIcon : HICON;
end;
- MenuProto = _menuProto;
- PMenuProto = ^MenuProto;
+ TMenuProto = T_menuProto;
+ PMenuProto = ^TMenuProto;
{ constants }
const
@@ -283,28 +283,28 @@ const
************************************************************************** }
type
- PClcProtoStatus = ^ClcProtoStatus;
- ClcProtoStatus = record
+ PClcProtoStatus = ^TClcProtoStatus;
+ TClcProtoStatus = record
szProto :PAnsiChar;
dwStatus:dword;
end;
type
- PClcCacheEntryBase = ^ClcCacheEntryBase;
- ClcCacheEntryBase = record
- hContact:MCONTACT;
+ PClcCacheEntryBase = ^TClcCacheEntryBase;
+ TClcCacheEntryBase = record
+ hContact:TMCONTACT;
name :TCHAR;
group :TCHAR;
isHidden:int;
end;
- PClcCacheEntry = ^CLCCacheEntry;
- CLCCacheEntry = record
+ PClcCacheEntry = ^TCLCCacheEntry;
+ TCLCCacheEntry = record
end;
type
- PCLIST_INTERFACE = ^CLIST_INTERFACE;
- CLIST_INTERFACE = record
+ PCLIST_INTERFACE = ^TCLIST_INTERFACE;
+ TCLIST_INTERFACE = record
version : int;
hwndContactList : HWND;
hwndContactTree : HWND;
@@ -326,95 +326,95 @@ type
pfnUnregisterFileDropping : procedure (hwnd:HWND); cdecl;
(* clcidents.c *)
- pfnGetRowsPriorTo : function (var group:ClcGroup; var subgroup:ClcGroup;
+ pfnGetRowsPriorTo : function (var group:TClcGroup; var subgroup:TClcGroup;
contactIndex:int):int; cdecl;
- pfnFindItem : function (hwnd:HWND; var dat:ClcData; dwItem:DWORD;
+ pfnFindItem : function (hwnd:HWND; var dat:TClcData; dwItem:dword;
var contact:PClcContact; var subgroup:PClcGroup; var isVisible:int):int; cdecl;
- pfnGetRowByIndex : function (var dat:ClcData; testindex:int;
+ pfnGetRowByIndex : function (var dat:TClcData; testindex:int;
var contact:PClcContact; var subgroup:PClcGroup):int; cdecl;
- pfnContactToHItem : function (var contact:ClcContact):THANDLE;cdecl;
- pfnContactToItemHandle : function (var contact:ClcContact; var nmFlags:DWORD):THANDLE; cdecl;
+ pfnContactToHItem : function (var contact:TClcContact):THANDLE;cdecl;
+ pfnContactToItemHandle : function (var contact:TClcContact; var nmFlags:dword):THANDLE; cdecl;
(* clcitems.c *)
pfnCreateClcContact : function :PClcContact; cdecl;
- pfnAddGroup : function (hwnd:HWND; var dat:ClcData; szName:TChar;
- flags:DWORD; groupId:int; calcTotalMembers:int):PClcGroup; cdecl;
- pfnRemoveItemFromGroup : function (hwnd:HWND; var group:ClcGroup;
- var contact:ClcContact; updateTotalCount:int):PClcGroup; cdecl;
-
- pfnFreeContact : procedure (var contact:ClcContact); cdecl;
- pfnFreeGroup : procedure (var group:ClcGroup); cdecl;
-
- pfnAddInfoItemToGroup : function (var group:ClcGroup; flags:int; pszText:TChar):int; cdecl;
- pfnAddItemToGroup : function (var group:ClcGroup; iAboveItem:int):int; cdecl;
- pfnAddContactToGroup : function (var dat:ClcData; var group:ClcGroup;
- hContact:MCONTACT):int; cdecl;
- pfnAddContactToTree : procedure (hwnd:HWND; var dat:ClcData; hContact:MCONTACT;
+ pfnAddGroup : function (hwnd:HWND; var dat:TClcData; szName:TChar;
+ flags:dword; groupId:int; calcTotalMembers:int):PClcGroup; cdecl;
+ pfnRemoveItemFromGroup : function (hwnd:HWND; var group:TClcGroup;
+ var contact:TClcContact; updateTotalCount:int):PClcGroup; cdecl;
+
+ pfnFreeContact : procedure (var contact:TClcContact); cdecl;
+ pfnFreeGroup : procedure (var group:TClcGroup); cdecl;
+
+ pfnAddInfoItemToGroup : function (var group:TClcGroup; flags:int; pszText:TChar):int; cdecl;
+ pfnAddItemToGroup : function (var group:TClcGroup; iAboveItem:int):int; cdecl;
+ pfnAddContactToGroup : function (var dat:TClcData; var group:TClcGroup;
+ hContact:TMCONTACT):int; cdecl;
+ pfnAddContactToTree : procedure (hwnd:HWND; var dat:TClcData; hContact:TMCONTACT;
updateTotalCount:int; checkHideOffline:int); cdecl;
- pfnDeleteItemFromTree : procedure (hwnd:HWND; hItem:MCONTACT); cdecl;
- pfnRebuildEntireList : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnGetGroupContentsCount : function (var group:ClcGroup; visibleOnly:int):int; cdecl;
- pfnSortCLC : procedure (hwnd:HWND; var dat:ClcData; useInsertionSort:int); cdecl;
- pfnSaveStateAndRebuildList : procedure (hwnd:HWND; var dat:ClcData); cdecl;
+ pfnDeleteItemFromTree : procedure (hwnd:HWND; hItem:TMCONTACT); cdecl;
+ pfnRebuildEntireList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnGetGroupContentsCount : function (var group:TClcGroup; visibleOnly:int):int; cdecl;
+ pfnSortCLC : procedure (hwnd:HWND; var dat:TClcData; useInsertionSort:int); cdecl;
+ pfnSaveStateAndRebuildList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
(* clcmsgs.c *)
- pfnProcessExternalMessages : function (hwnd:HWND; var dat:ClcData; msg:UINT;
+ pfnProcessExternalMessages : function (hwnd:HWND; var dat:TClcData; msg:uint;
wParam:WPARAM; lParam:LPARAM):LRESULT; cdecl;
(* clcpaint.c *)
- pfnPaintClc : procedure (hwnd:HWND; var dat:ClcData; hdc:HDC; var rcPaint:TRECT); cdecl;
+ pfnPaintClc : procedure (hwnd:HWND; var dat:TClcData; hdc:HDC; var rcPaint:TRECT); cdecl;
(* clcutils.c *)
- pfnGetGroupCountsText : function (var dat:ClcData; var contact:ClcContact):PAnsiChar; cdecl;
- pfnHitTest : function (hwnd:HWND; var dat:ClcData; testx:int;
+ pfnGetGroupCountsText : function (var dat:TClcData; var contact:TClcContact):PAnsiChar; cdecl;
+ pfnHitTest : function (hwnd:HWND; var dat:TClcData; testx:int;
testy:int; var contact:PClcContact;
- var group:PClcGroup; var flags:DWORD):int; cdecl;
- pfnScrollTo : procedure (hwnd:HWND; var dat:ClcData; desty:int; noSmooth:int); cdecl;
- pfnEnsureVisible : procedure (hwnd:HWND; var dat:ClcData; iItem:int; partialOk:int); cdecl;
- pfnRecalcScrollBar : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnSetGroupExpand : procedure (hwnd:HWND; var dat:ClcData; var group:ClcGroup; newState:int); cdecl;
- pfnDoSelectionDefaultAction : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnFindRowByText : function (hwnd:HWND; var dat:ClcData; text:TChar; prefixOk:int):int; cdecl;
- pfnEndRename : procedure (hwnd:HWND; var dat:ClcData; save:int); cdecl;
- pfnDeleteFromContactList : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnBeginRenameSelection : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnCalcEipPosition : procedure (var dat:ClcData; var contact:ClcContact; var group:ClcGroup; var result:TPOINT); cdecl;
- pfnGetDropTargetInformation : function (hwnd:HWND; var dat:ClcData; pt:TPOINT):int; cdecl;
+ var group:PClcGroup; var flags:dword):int; cdecl;
+ pfnScrollTo : procedure (hwnd:HWND; var dat:TClcData; desty:int; noSmooth:int); cdecl;
+ pfnEnsureVisible : procedure (hwnd:HWND; var dat:TClcData; iItem:int; partialOk:int); cdecl;
+ pfnRecalcScrollBar : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnSetGroupExpand : procedure (hwnd:HWND; var dat:TClcData; var group:TClcGroup; newState:int); cdecl;
+ pfnDoSelectionDefaultAction : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnFindRowByText : function (hwnd:HWND; var dat:TClcData; text:TChar; prefixOk:int):int; cdecl;
+ pfnEndRename : procedure (hwnd:HWND; var dat:TClcData; save:int); cdecl;
+ pfnDeleteFromContactList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnBeginRenameSelection : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnCalcEipPosition : procedure (var dat:TClcData; var contact:TClcContact; var group:TClcGroup; var result:TPOINT); cdecl;
+ pfnGetDropTargetInformation : function (hwnd:HWND; var dat:TClcData; pt:TPOINT):int; cdecl;
pfnClcStatusToPf2 : function (status:int):int; cdecl;
- pfnIsHiddenMode : function (var dat:ClcData; status:int):int; cdecl;
- pfnHideInfoTip : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnNotifyNewContact : procedure (hwnd:HWND; hContact:MCONTACT); cdecl;
- pfnGetDefaultExStyle : function :DWORD; cdecl;
+ pfnIsHiddenMode : function (var dat:TClcData; status:int):int; cdecl;
+ pfnHideInfoTip : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnNotifyNewContact : procedure (hwnd:HWND; hContact:TMCONTACT); cdecl;
+ pfnGetDefaultExStyle : function :dword; cdecl;
pfnGetDefaultFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
pfnGetFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
- pfnLoadClcOptions : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnRecalculateGroupCheckboxes : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnSetGroupChildCheckboxes : procedure (var group:ClcGroup; checked:int); cdecl;
- pfnInvalidateItem : procedure (hwnd:HWND; var dat:ClcData; iItem:int); cdecl;
+ pfnLoadClcOptions : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnRecalculateGroupCheckboxes : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnSetGroupChildCheckboxes : procedure (var group:TClcGroup; checked:int); cdecl;
+ pfnInvalidateItem : procedure (hwnd:HWND; var dat:TClcData; iItem:int); cdecl;
- pfnGetRowBottomY : function (var dat:ClcData; item:int):int; cdecl;
- pfnGetRowHeight : function (var dat:ClcData; item:int):int; cdecl;
- pfnGetRowTopY : function (var dat:ClcData; item:int):int; cdecl;
- pfnGetRowTotalHeight : function (var dat:ClcData):int; cdecl;
- pfnRowHitTest : function (var dat:ClcData; y:int):int; cdecl;
+ pfnGetRowBottomY : function (var dat:TClcData; item:int):int; cdecl;
+ pfnGetRowHeight : function (var dat:TClcData; item:int):int; cdecl;
+ pfnGetRowTopY : function (var dat:TClcData; item:int):int; cdecl;
+ pfnGetRowTotalHeight : function (var dat:TClcData):int; cdecl;
+ pfnRowHitTest : function (var dat:TClcData; y:int):int; cdecl;
(* clistevents.c *)
- pfnEventsProcessContactDoubleClick : function (hContact:MCONTACT):int; cdecl;
+ pfnEventsProcessContactDoubleClick : function (hContact:TMCONTACT):int; cdecl;
pfnEventsProcessTrayDoubleClick : function (_para1:int):int; cdecl;
(* clistmod.c *)
- pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:MCONTACT):int; cdecl;
+ pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
pfnShowHide : function (_para1:WPARAM; _para2:LPARAM):int; cdecl;
pfnGetStatusModeDescription : function (mode:int; flags:int):TChar; cdecl;
(* clistsettings.c *)
- pfnGetCacheEntry : function (hContact:MCONTACT):PClcCacheEntry; cdecl;
- pfnCreateCacheItem : function (hContact:MCONTACT):PClcCacheEntry; cdecl;
+ pfnGetCacheEntry : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
+ pfnCreateCacheItem : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
pfnCheckCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
pfnFreeCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
- pfnGetContactDisplayName : function (hContact:MCONTACT; mode:int):TChar; cdecl;
- pfnInvalidateDisplayNameCacheEntry : procedure (hContact:MCONTACT); cdecl;
+ pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):TChar; cdecl;
+ pfnInvalidateDisplayNameCacheEntry : procedure (hContact:TMCONTACT); cdecl;
(* clisttray.c *)
pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar;
@@ -430,16 +430,15 @@ type
pfnContactListWndProc:function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):int; stdcall;
pfnCluiProtocolStatusChanged : procedure (status:int; szProto:PAnsiChar); cdecl;
- pfnDrawMenuItem : procedure (_para1:PDRAWITEMSTRUCT; _para2:HICON;
- _para3:HICON); cdecl;
+ pfnDrawMenuItem : procedure (_para1:PDRAWITEMSTRUCT; _para2:HICON; _para3:HICON); cdecl;
pfnLoadCluiGlobalOpts : procedure ; cdecl;
- pfnInvalidateRect : function (hwnd:HWND; var lpRect:TRECT; bErase:BOOL):BOOL; cdecl;
+ pfnInvalidateRect : function (hwnd:HWND; var lpRect:TRECT; bErase:bool):bool; cdecl;
pfnOnCreateClc : procedure ; cdecl;
(* contact.c *)
- pfnChangeContactIcon : procedure (hContact:MCONTACT; iIcon:int; add:int); cdecl;
+ pfnChangeContactIcon : procedure (hContact:TMCONTACT; iIcon:int; add:int); cdecl;
pfnLoadContactTree : procedure ; cdecl;
- pfnCompareContacts : function (var contact1:ClcContact; var contact2:ClcContact):int; cdecl;
+ pfnCompareContacts : function (var contact1:TClcContact; var contact2:TClcContact):int; cdecl;
pfnSortContacts : procedure ; cdecl;
pfnSetHideOffline : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
@@ -447,7 +446,7 @@ type
pfnDocking_ProcessWindowMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
(* group.c *)
- pfnGetGroupName : function (idx:int; var pdwFlags:DWORD):TChar; cdecl;
+ pfnGetGroupName : function (idx:int; var pdwFlags:dword):TChar; cdecl;
pfnRenameGroup : function (groupID:int; newName:TChar):int; cdecl;
(* keyboard.c *)
@@ -460,15 +459,15 @@ type
* version 2 - events processing
*************************************************************************************)
- events : EventList;
+ events : TEventList;
pfnCreateEvent : function :PCListEvent; cdecl;
pfnFreeEvent : procedure (_para1:PCListEvent); cdecl;
pfnAddEvent : function (_para1:PCLISTEVENT):PCListEvent; cdecl;
- pfnGetEvent : function (hContact:MCONTACT; idx:int):PCLISTEVENT; cdecl;
+ pfnGetEvent : function (hContact:TMCONTACT; idx:int):PCLISTEVENT; cdecl;
- pfnRemoveEvent : function (hContact:MCONTACT; hDbEvent:THANDLE):int; cdecl;
+ pfnRemoveEvent : function (hContact:TMCONTACT; hDbEvent:THANDLE):int; cdecl;
pfnGetImlIconIndex : function (hIcon:HICON):int; cdecl;
(*************************************************************************************
@@ -487,7 +486,7 @@ type
hPreBuildStatusMenuEvent : THANDLE;
currentStatusMenuItem : int;
currentDesiredStatusMode : int;
- bDisplayLocked : BOOL;
+ bDisplayLocked : bool;
pfnGetProtocolMenu : function (_para1:PAnsiChar):HGENMENU; cdecl;
pfnStub2 : function (_para1:int):int; cdecl;
@@ -507,9 +506,9 @@ type
cycleTimerId : uint_ptr;
cycleStep : int;
szTip : TChar;
- bTrayMenuOnScreen : BOOL;
+ bTrayMenuOnScreen : bool;
- pfnGetIconFromStatusMode : function (hContact:MCONTACT; szProto:PAnsiChar;
+ pfnGetIconFromStatusMode : function (hContact:TMCONTACT; szProto:PAnsiChar;
status:int):HICON; cdecl;
pfnInitTray : procedure ; cdecl;
@@ -528,7 +527,7 @@ type
pfnLockTray : procedure ; cdecl;
pfnUnlockTray : procedure ; cdecl;
- pfnTrayCycleTimerProc : procedure(hwnd:HWND;message:uint;idEvent:uint_ptr;dwTime:DWORD); stdcall;
+ pfnTrayCycleTimerProc : procedure(hwnd:HWND;message:uint;idEvent:uint_ptr;dwTime:dword); stdcall;
(*************************************************************************************
* version 6 additions (0.8.0.x) - accounts
@@ -540,14 +539,14 @@ type
* version 7 additions (0.11.0.x) - extra images
*************************************************************************************)
pfnReloadExtraIcons: procedure; cdecl;
- pfnSetAllExtraIcons: procedure(hContact:MCONTACT); cdecl;
+ pfnSetAllExtraIcons: procedure(hContact:TMCONTACT); cdecl;
(*************************************************************************************
* Miranda NG additions
*************************************************************************************)
- pfnGetContactIcon: function(hContact:MCONTACT):int; cdecl;
- pfnTrayCalcChanged:function(szChangedProto:pAnsiChar; averageMode:int; iProtoCount:int):int; cdecl;
+ pfnGetContactIcon: function(hContact:TMCONTACT):int; cdecl;
+ pfnTrayCalcChanged:function(szChangedProto:PAnsiChar; averageMode:int; iProtoCount:int):int; cdecl;
pfnGetAverageMode:function(pNetProtoCount:pint):int; cdecl;
end;
@@ -558,17 +557,17 @@ var
{$ELSE}
-function IsHContactGroup(h:THANDLE):bool;
+function IsHContactGroup(h:TMCONTACT):bool;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=(h xor HCONTACT_ISGROUP)<(HCONTACT_ISGROUP xor HCONTACT_ISINFO);
end;
-function IsHContactInfo(h:THANDLE):bool;
+function IsHContactInfo(h:TMCONTACT):bool;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=(h and HCONTACT_ISINFO)=HCONTACT_ISINFO;
end;
-function IsHContactContact(h:THANDLE):bool;
+function IsHContactContact(h:TMCONTACT):bool;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=(h and HCONTACT_ISGROUP)=0;
@@ -599,4 +598,5 @@ function CLCDEFAULT_HOTTEXTCOLOUR:dword;
begin
result:=RGB(0,0,255);
end;
+
{$ENDIF}
diff --git a/include/delphi/m_clui.inc b/include/delphi/m_clui.inc
index af9e206b88..7d68a382de 100644
--- a/include/delphi/m_clui.inc
+++ b/include/delphi/m_clui.inc
@@ -58,7 +58,7 @@ const
MS_CLUI_GROUPADDED:PAnsiChar = 'CLUI/GroupCreated';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : ICON_ID
Affect : Change the icon for a contact, see notes
Returns: 0 on success, [non zero] on failure
@@ -67,7 +67,7 @@ const
MS_CLUI_CONTACTSETICON:PAnsiChar = 'CLUI/ContactSetIcon';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Remove a contact from the list, see notes
Returns: 0 on success, [non zereo] on failure
@@ -78,7 +78,7 @@ const
MS_CLUI_CONTACTDELETED:PAnsiChar = 'CLUI/ContactDeleted';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : ICON_ID
Affect : Add a contact to the list, see note
returns: 0 on success, [non zero] on failure
@@ -103,7 +103,7 @@ const
MS_CLUI_CONTACTADDED:PAnsiChar = 'CLUI/ContactAdded';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Reename a contact in the lists, see notes
Returns: 0 on success, [non zero] on failure
@@ -177,7 +177,7 @@ const
MS_CLUI_GETCAPS:PAnsiChar = 'CLUI/GetCaps';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : MAKELPARAM(screenX, screenY)
Affect : A contact is being dragged outside the main window
Return : return [non zero] to show the drag cursor as "accepting" the drag
@@ -187,7 +187,7 @@ const
ME_CLUI_CONTACTDRAGGING:PAnsiChar = 'CLUI/ContactDragging';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : MAKELPARAM(screenX, screenY)
Affect : a contact has just been dropped outside the main window, see notes
Notes : return non zero to stop other hooks processing this event.
@@ -196,7 +196,7 @@ const
ME_CLUI_CONTACTDROPPED:PAnsiChar = 'CLUI/ContactDropped';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : A contact that *was* being dragged outside the main window
has gone back to the main window
@@ -211,4 +211,4 @@ const
// return pointer to PLUGININFO structure
// MS_CLIST_GETCLISTCAPS = 'CList/GetCaps';
-{$ENDIF} \ No newline at end of file
+{$ENDIF}
diff --git a/include/delphi/m_cluiframes.inc b/include/delphi/m_cluiframes.inc
index 1507543124..590c131cd9 100644
--- a/include/delphi/m_cluiframes.inc
+++ b/include/delphi/m_cluiframes.inc
@@ -34,7 +34,7 @@ type
PCLISTFrame = ^TCLISTFrame;
TCLISTFrame = record
cbSize:dword;
- hWnd :hwnd;
+ hWnd :HWND;
hIcon :HICON;
align :int; // al flags below
height:int; // or minSize - the actual meaning depends from type of frame
diff --git a/include/delphi/m_contacts.inc b/include/delphi/m_contacts.inc
index 8b39de0230..614492eede 100644
--- a/include/delphi/m_contacts.inc
+++ b/include/delphi/m_contacts.inc
@@ -22,17 +22,17 @@ type
PCONTACTINFO = ^TCONTACTINFO;
TCONTACTINFO = record
cbSize : int;
- dwFlag : Byte;
- hContact: MCONTACT;
+ dwFlag : byte;
+ hContact: TMCONTACT;
szProto : PAnsiChar;
- _type : Byte;
+ _type : byte;
retval: record // in C this is a nameless union
case longint of
- 0: (bVal : Byte);
- 1: (wVal : WORD);
- 2: (dVal : DWORD);
+ 0: (bVal : byte);
+ 1: (wVal : word);
+ 2: (dVal : dword);
3: (szVal : TChar);
- 4: (cchVal: Word);
+ 4: (cchVal: word);
end;
end;
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc
index d6d543405b..84f55d74b5 100644
--- a/include/delphi/m_core.inc
+++ b/include/delphi/m_core.inc
@@ -53,32 +53,34 @@ const
DBVTF_VARIABLELENGTH = $80; // ?
type
- MCONTACT = DWORD;
+ PMCONTACT = ^TMCONTACT;
+ TMCONTACT = dword;
+const
+ INVALID_CONTACT_ID = TMCONTACT(-1);
+
+type
HDBEVENT = THANDLE;
PDBVARIANT = ^TDBVARIANT;
TDBVARIANT = record
- _type: Byte;
+ _type: byte;
case LongInt of
- 0: (bVal: Byte);
+ 0: (bVal: byte);
1: (cVal: AnsiChar);
- 2: (wVal: Word);
+ 2: (wVal: word);
3: (sVal: ShortInt);
4: (dVal: dword);
5: (lVal: long);
6: (
szVal : TChar;
- cchVal: Word;
+ cchVal: word;
);
7: (
- cpbVal: Word;
+ cpbVal: word;
pbVal : PByte;
);
end;
const
- INVALID_CONTACT_ID = MCONTACT(-1);
-
-const
DBEF_FIRST = 1; // internally only, do not use
DBEF_SENT = 2; // if set, the event was sent by the user, otherwise it was received
DBEF_READ = 4; // event has been read by the user -- only needed for history
@@ -99,10 +101,10 @@ type
TDBEVENTINFO = record
cbSize : int; // size of the structure
szModule : PAnsiChar; // module that 'owns' this event and controls the data format
- timestamp: DWORD; // timestamp in UNIX time
- flags : DWORD; // the DBEF_* flags above
- eventType: WORD; // event type, such as message, can be module defined
- cbBlob : DWORD; // size in bytes of pBlob^
+ timestamp: dword; // timestamp in UNIX time
+ flags : dword; // the DBEF_* flags above
+ eventType: word; // event type, such as message, can be module defined
+ cbBlob : dword; // size in bytes of pBlob^
pBlob : PByte; // pointer to buffer containing the module defined event data
end;
@@ -124,7 +126,7 @@ modules are free to define their own, beginning at 2000
DBEVENTINFO.timestamp is in GMT, as returned by time(). There are services
db/time/x below with useful stuff for dealing with it.
}
-function db_event_add(hContact:MCONTACT; dbei:PDBEVENTINFO):THANDLE; stdcall;
+function db_event_add(hContact:TMCONTACT; dbei:PDBEVENTINFO):THANDLE; stdcall;
external CoreDLL name 'db_event_add';
{
@@ -132,7 +134,7 @@ Gets the number of events in the chain belonging to a contact in the database.
Returns the number of events in the chain owned by hContact or -1 if hContact
is invalid. They can be retrieved using the db_event_first/last() services.
}
-function db_event_count(hContact:MCONTACT):int; stdcall;
+function db_event_count(hContact:TMCONTACT):int; stdcall;
external CoreDLL name 'db_event_count';
{
@@ -141,7 +143,7 @@ hDbEvent should have been returned by db_event_add/first/last/next/prev()
Returns 0 on success, or nonzero if hDbEvent was invalid
Triggers a db/event/deleted event just *before* the event is deleted
}
-function db_event_delete(hContact:MCONTACT; hDbEvent:THANDLE):int; stdcall;
+function db_event_delete(hContact:TMCONTACT; hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_delete';
{
@@ -149,7 +151,7 @@ Retrieves a handle to the first event in the chain for hContact
Returns the handle, or NULL if hContact is invalid or has no events
Events in a chain are sorted chronologically automatically
}
-function db_event_first(hContact:MCONTACT):THANDLE; stdcall;
+function db_event_first(hContact:TMCONTACT):THANDLE; stdcall;
external CoreDLL name 'db_event_first';
{
@@ -163,7 +165,7 @@ should be checked individually with db_event_next() and db_event_get()
This service is designed for startup, reloading all the events that remained
unread from last time
}
-function db_event_firstUnread(hContact:MCONTACT):THANDLE; stdcall;
+function db_event_firstUnread(hContact:TMCONTACT):THANDLE; stdcall;
external CoreDLL name 'db_event_firstUnread';
{
@@ -200,7 +202,7 @@ success
This service is exceptionally slow. Use only when you have no other choice at
all.
}
-function db_event_getContact(hDbEvent:THANDLE):MCONTACT; stdcall;
+function db_event_getContact(hDbEvent:THANDLE):TMCONTACT; stdcall;
external CoreDLL name 'db_event_getContact';
{
@@ -208,18 +210,18 @@ Retrieves a handle to the last event in the chain for hContact
Returns the handle, or NULL if hContact is invalid or has no events
Events in a chain are sorted chronologically automatically
}
-function db_event_last(hContact:MCONTACT):THANDLE; stdcall;
+function db_event_last(hContact:TMCONTACT):THANDLE; stdcall;
external CoreDLL name 'db_event_last';
{
Changes the flags for an event to mark it as read.
hDbEvent should have been returned by db_event_add/first/last/next/prev()
-Returns the entire flag DWORD for the event after the change, or -1 if hDbEvent
+Returns the entire flag dword for the event after the change, or -1 if hDbEvent
is invalid.
This is the one database write operation that does not trigger an event.
Modules should not save flags states for any length of time.
}
-function db_event_markRead(hContact:MCONTACT; hDbEvent:THANDLE):int; stdcall;
+function db_event_markRead(hContact:TMCONTACT; hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_markRead';
{
@@ -252,7 +254,7 @@ You can specify szProto to find only its contacts
Returns a handle to the first contact in the db on success, or NULL if there
are no contacts in the db.
}
-function db_find_first(const szModule:pAnsiChar=nil):MCONTACT; stdcall;
+function db_find_first(const szModule:PAnsiChar=nil):TMCONTACT; stdcall;
external CoreDLL name 'db_find_first';
{
@@ -262,91 +264,91 @@ You can specify szProto to find only its contacts
Returns a handle to the contact after hContact in the db on success or NULL if
hContact was the last contact in the db or hContact was invalid.
}
-function db_find_next(hContact:MCONTACT; const szModule:pAnsiChar=nil):MCONTACT; stdcall;
+function db_find_next(hContact:TMCONTACT; const szModule:PAnsiChar=nil):TMCONTACT; stdcall;
external CoreDLL name 'db_find_next';
(******************************************************************************
* DATABASE SETTINGS
*)
-function db_get(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
+function db_get(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_get';
-function db_get_b(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function db_get_b(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_b';
-function db_get_w(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function db_get_w(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_w';
-function db_get_dw(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:dword):dword; stdcall;
+function db_get_dw(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:dword):dword; stdcall;
external CoreDLL name 'db_get_dw';
-function db_get_s(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
+function db_get_s(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
external CoreDLL name 'db_get_s';
-function db_get_sa(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pAnsiChar; stdcall;
+function db_get_sa(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'db_get_sa';
-function db_get_wsa(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pWideChar; stdcall;
+function db_get_wsa(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'db_get_wsa';
-function db_get_static(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; szDest:pAnsiChar; destLen:int):int; stdcall;
+function db_get_static(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; szDest:PAnsiChar; destLen:int):int; stdcall;
external CoreDLL name 'db_get_static';
-function db_get_static_utf(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; szDest:pAnsiChar; destLen:int):int; stdcall;
+function db_get_static_utf(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; szDest:PAnsiChar; destLen:int):int; stdcall;
external CoreDLL name 'db_get_static_utf';
-function db_get_wstatic(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; szDest:pWideChar; destLen:int):int; stdcall;
+function db_get_wstatic(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; szDest:PWideChar; destLen:int):int; stdcall;
external CoreDLL name 'db_get_wstatic';
-function db_set(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
+function db_set(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_set';
-function db_set_b(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:byte):int_ptr; stdcall;
+function db_set_b(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:byte):int_ptr; stdcall;
external CoreDLL name 'db_set_b';
-function db_set_w(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:word):int_ptr; stdcall;
+function db_set_w(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:word):int_ptr; stdcall;
external CoreDLL name 'db_set_w';
-function db_set_dw(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:dword):int_ptr; stdcall;
+function db_set_dw(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:dword):int_ptr; stdcall;
external CoreDLL name 'db_set_dw';
-function db_set_s(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function db_set_s(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_s';
-function db_set_ws(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pWideChar):int_ptr; stdcall;
+function db_set_ws(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PWideChar):int_ptr; stdcall;
external CoreDLL name 'db_set_ws';
-function db_set_utf(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function db_set_utf(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_utf';
-function db_set_blob(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
+function db_set_blob(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
-function db_unset(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
+function db_unset(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_unset';
-function db_set_resident(const szModule:pAnsiChar; const szSetting:pAnsiChar; bEnable:int):int; stdcall;
+function db_set_resident(const szModule:PAnsiChar; const szSetting:PAnsiChar; bEnable:int):int; stdcall;
external CoreDLL name 'db_set_resident';
// deprecated Aliases
function DBFreeVariant(dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_free';
-function DBDeleteContactSetting(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
+function DBDeleteContactSetting(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_unset';
-function DBGetContactSettingByte(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function DBGetContactSettingByte(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_b';
-function DBGetContactSettingWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function DBGetContactSettingWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_w';
-function DBGetContactSettingDWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:dword):dword; stdcall;
+function DBGetContactSettingDWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:dword):dword; stdcall;
external CoreDLL name 'db_get_dw';
-function DBGetContactSetting(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
+function DBGetContactSetting(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_get';
-function DBGetContactSettingStr(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
+function DBGetContactSettingStr(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
external CoreDLL name 'db_get_s';
-function DBGetContactSettingString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pAnsiChar; stdcall;
+function DBGetContactSettingString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'db_get_sa';
-function DBGetContactSettingWString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pWideChar; stdcall;
+function DBGetContactSettingWString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'db_get_wsa';
-function DBWriteContactSettingByte(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:byte):int_ptr; stdcall;
+function DBWriteContactSettingByte(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:byte):int_ptr; stdcall;
external CoreDLL name 'db_set_b';
-function DBWriteContactSettingWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:word):int_ptr; stdcall;
+function DBWriteContactSettingWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:word):int_ptr; stdcall;
external CoreDLL name 'db_set_w';
-function DBWriteContactSettingDWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:dword):int_ptr; stdcall;
+function DBWriteContactSettingDWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:dword):int_ptr; stdcall;
external CoreDLL name 'db_set_dw';
-function DBWriteContactSettingString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function DBWriteContactSettingString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_s';
-function DBWriteContactSettingWString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pWideChar):int_ptr; stdcall;
+function DBWriteContactSettingWString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PWideChar):int_ptr; stdcall;
external CoreDLL name 'db_set_ws';
-function DBWriteContactSettingUTF8String(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function DBWriteContactSettingUTF8String(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_utf';
-function DBWriteContactSettingBlob(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
+function DBWriteContactSettingBlob(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
///////////////////////////////////////////////////////////////////////////////
@@ -363,7 +365,7 @@ type
TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): int_ptr; cdecl;
TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
- TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):int_ptr; cdecl;
+ TMIRANDASERVICEOBJ = function(ptr:pointer;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
const
@@ -428,7 +430,7 @@ procedure KillModuleServices(hInst:HINST); stdcall;
procedure KillObjectServices(var ptr); stdcall;
external CoreDLL name 'KillObjectServices';
-function CallContactService(hContact:MCONTACT;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
+function CallContactService(hContact:TMCONTACT;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallContactService';
function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallProtoService';
@@ -438,7 +440,7 @@ function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wPa
// http
// returned result must be freed using mir_free()
-function mir_urlEncode(url:pAnsiChar): pAnsiChar; stdcall;
+function mir_urlEncode(url:PAnsiChar): PAnsiChar; stdcall;
external CoreDLL name 'mir_urlEncode';
///////////////////////////////////////////////////////////////////////////////
@@ -460,8 +462,8 @@ function SetExceptionFilter(pMirandaExceptFilter:pfnExceptionFilter):pfnExceptio
type
pIconItem = ^tIconItem;
tIconItem = record
- szDescr:pAnsiChar;
- szName :pAnsiChar;
+ szDescr:PAnsiChar;
+ szName :PAnsiChar;
defIconID,
size :int;
hIcolib:THANDLE;
@@ -470,18 +472,18 @@ type
pIconItemW = ^tIconItemW;
tIconItemW = record
- szDescr:pWideChar;
- szName :pAnsiChar;
+ szDescr:PWideChar;
+ szName :PAnsiChar;
defIconID,
size :int;
hIcolib:THANDLE;
end;
tagIconItemW = tIconItemW;
-procedure mir_Icon_Register(hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem;
+procedure mir_Icon_Register(hInst:HINST; const szSection:PAnsiChar; pIcons:pIconItem;
iCount:size_t; prefix:PAnsiChar; hLangpack:int=0); stdcall;
external CoreDLL name 'Icon_Register';
-procedure mir_Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW;
+procedure mir_Icon_RegisterW(hInst:HINST; const szSection:PWideChar; pIcons:pIconItemW;
iCount:size_t; prefix:PAnsiChar; hLangpack:int=0); stdcall;
external CoreDLL name 'Icon_RegisterT';
@@ -497,19 +499,19 @@ function Langpack_GetDefaultCodePage():int; stdcall;
external CoreDLL name 'Langpack_GetDefaultCodePage';
function Langpack_GetDefaultLocale():int; stdcall;
external CoreDLL name 'Langpack_GetDefaultLocale';
-function Langpack_PcharToTchar(const pszStr:pAnsiChar):pWideChar; stdcall;
+function Langpack_PcharToTchar(const pszStr:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'Langpack_PcharToTchar';
function LoadLangPackModule():int; stdcall;
external CoreDLL name 'LoadLangPackModule';
-function LoadLangPack(const szLangPack:pWideChar):int; stdcall;
+function LoadLangPack(const szLangPack:PWideChar):int; stdcall;
external CoreDLL name 'LoadLangPack';
-procedure ReloadLangpack(pszStr:pWideChar); stdcall;
+procedure ReloadLangpack(pszStr:PWideChar); stdcall;
external CoreDLL name 'ReloadLangpack';
-function TranslateA_LP(const str:pAnsiChar; hLang:int):pAnsiChar; stdcall;
+function TranslateA_LP(const str:PAnsiChar; hLang:int):PAnsiChar; stdcall;
external CoreDLL name 'TranslateA_LP';
-function TranslateW_LP(const str:pWideChar; hLang:int):pWideChar; stdcall;
+function TranslateW_LP(const str:PWideChar; hLang:int):PWideChar; stdcall;
external CoreDLL name 'TranslateW_LP';
procedure TranslateMenu_LP(hMenu:HMENU; hLang:int); stdcall;
external CoreDLL name 'TranslateMenu_LP';
@@ -575,12 +577,12 @@ procedure List_ObjCopy(src:PSortedList; dst:PSortedList; size:size_t); stdcall;
///////////////////////////////////////////////////////////////////////////////
// log functions
-function mir_createLog(pszName:PAnsiChar; ptszDescr, ptszFile:PWideChar; options:Cardinal):THandle;stdcall;
+function mir_createLog(pszName:PAnsiChar; ptszDescr, ptszFile:PWideChar; options:Cardinal):THANDLE; stdcall;
external CoreDLL name 'mir_createLog';
-function mir_writeLogA(hLog:THandle; format:PAnsiChar):int;cdecl;
+function mir_writeLogA(hLog:THANDLE; format:PAnsiChar):int; cdecl;
external CoreDLL name 'mir_writeLogA';
-function mir_writeLogW(hLog:THandle; format:PWideChar):int;cdecl;
+function mir_writeLogW(hLog:THANDLE; format:PWideChar):int; cdecl;
external CoreDLL name 'mir_writeLogW';
///////////////////////////////////////////////////////////////////////////////
@@ -643,42 +645,42 @@ function GetInstByAddress(codePtr:pointer):HINST; stdcall;
///////////////////////////////////////////////////////////////////////////////
// path utils
-procedure CreatePathToFile(wszFilePath:pAnsiChar); stdcall;
+procedure CreatePathToFile(wszFilePath:PAnsiChar); stdcall;
external CoreDLL name 'CreatePathToFile';
-function CreateDirectoryTree(const szDir:pAnsiChar):int; stdcall;
+function CreateDirectoryTree(const szDir:PAnsiChar):int; stdcall;
external CoreDLL name 'CreateDirectoryTree';
-function PathToAbsolute(const pSrc:pAnsiChar; pOut:pAnsiChar; base:pAnsiChar=nil):int; stdcall;
+function PathToAbsolute(const pSrc:PAnsiChar; pOut:PAnsiChar; base:PAnsiChar=nil):int; stdcall;
external CoreDLL name 'PathToAbsolute';
-function PathToRelative(const pSrc:pAnsiChar; pOut:pAnsiChar):int; stdcall;
+function PathToRelative(const pSrc:PAnsiChar; pOut:PAnsiChar):int; stdcall;
external CoreDLL name 'PathToRelative';
-procedure CreatePathToFileW(wszFilePath:pWideChar); stdcall;
+procedure CreatePathToFileW(wszFilePath:PWideChar); stdcall;
external CoreDLL name 'CreatePathToFileW';
-function CreateDirectoryTreeW(const szDir:pWideChar):int; stdcall;
+function CreateDirectoryTreeW(const szDir:PWideChar):int; stdcall;
external CoreDLL name 'CreateDirectoryTreeW';
-function PathToAbsoluteW(const pSrc:pWideChar; pOut:pWideChar; base:pWideChar=nil):int; stdcall;
+function PathToAbsoluteW(const pSrc:PWideChar; pOut:PWideChar; base:PWideChar=nil):int; stdcall;
external CoreDLL name 'PathToAbsoluteW';
-function PathToRelativeW(const pSrc:pWideChar; pOut:pWideChar):int; stdcall;
+function PathToRelativeW(const pSrc:PWideChar; pOut:PWideChar):int; stdcall;
external CoreDLL name 'PathToRelativeW';
///////////////////////////////////////////////////////////////////////////////
// print functions
-function mir_snprintf(buffer:pAnsiChar;count:size_t;fmt:pAnsiChar{, ...}):int; stdcall;
+function mir_snprintf(buffer:PAnsiChar;count:size_t;fmt:PAnsiChar{, ...}):int; stdcall;
external CoreDLL name 'mir_snprintf';
-function mir_snwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar{, ...}):int; stdcall;
+function mir_snwprintf(buffer:PWideChar;count:size_t;fmt:PWideChar{, ...}):int; stdcall;
external CoreDLL name 'mir_snwprintf';
-function mir_vsnprintf(buffer:pAnsiChar;count:size_t;fmt:pAnsiChar;va:va_list):int; stdcall;
+function mir_vsnprintf(buffer:PAnsiChar;count:size_t;fmt:PAnsiChar;va:va_list):int; stdcall;
external CoreDLL name 'mir_vsnprintf';
-function mir_vsnwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar;va:va_list):int; stdcall;
+function mir_vsnwprintf(buffer:PWideChar;count:size_t;fmt:PWideChar;va:va_list):int; stdcall;
external CoreDLL name 'mir_vsnwprintf';
///////////////////////////////////////////////////////////////////////////////
// protocol functions
-function ProtoBroadcastAck(const szModule:PAnsiChar; hContact:MCONTACT; type_:int; result_:int; hProcess:THANDLE; lParam:LPARAM): int_ptr; stdcall;
+function ProtoBroadcastAck(const szModule:PAnsiChar; hContact:TMCONTACT; type_:int; result_:int; hProcess:THANDLE; lParam:LPARAM): int_ptr; stdcall;
external CoreDLL name 'ProtoBroadcastAck';
function ProtoServiceExists(const szModule, szName:PAnsiChar):int; stdcall;
@@ -700,7 +702,7 @@ procedure ProtoDestructor(pThis:pointer{PPROTO_INTERFACE}); stdcall;
{!!
typedef void (__cdecl PROTO_INTERFACE::*ProtoThreadFunc)(void*);
procedure ProtoForkThread(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param);
-function ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param, UINT* threadID):THANDLE;
+function ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param, uint* threadID):THANDLE;
typedef int (__cdecl PROTO_INTERFACE::*ProtoEventFunc)(WPARAM, LPARAM);
procedure ProtoHookEvent(PROTO_INTERFACE *pThis, const char* szName, ProtoEventFunc pFunc);
@@ -713,9 +715,9 @@ typedef INT_PTR (__cdecl PROTO_INTERFACE::*ProtoServiceFuncParam)(WPARAM, LPARAM
procedure ProtoCreateServiceParam(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFuncParam, LPARAM);
}
-procedure ProtoLogA(pThis:pointer{PPROTO_INTERFACE}; szFormat :pAnsiChar; args:va_list); stdcall;
+procedure ProtoLogA(pThis:pointer{PPROTO_INTERFACE}; szFormat :PAnsiChar; args:va_list); stdcall;
external CoreDLL name 'ProtoLogA';
-procedure ProtoLogW(pThis:pointer{PPROTO_INTERFACE}; wszFormat:pWideChar; args:va_list); stdcall;
+procedure ProtoLogW(pThis:pointer{PPROTO_INTERFACE}; wszFormat:PWideChar; args:va_list); stdcall;
external CoreDLL name 'ProtoLogW';
// returns image extension by a PA_* constant or empty string for PA_FORMAT_UNKNOWN
@@ -770,62 +772,62 @@ procedure mir_hmac_sha1(hashout:SHA1Hash; const key:pbyte; keyLen:size_t;
///////////////////////////////////////////////////////////////////////////////
// strings
-function mir_base64_decode(str:pAnsiChar; var resultSize:int):pByte; stdcall;
+function mir_base64_decode(str:PAnsiChar; var resultSize:int):pByte; stdcall;
external CoreDLL name 'mir_base64_decode';
-function mir_base64_encode(str:pByte; dataSize:int):pAnsiChar; stdcall;
+function mir_base64_encode(str:pByte; dataSize:int):PAnsiChar; stdcall;
external CoreDLL name 'mir_base64_encode';
-function mir_base64_encodebuf(data:PByte; dataSize:int; output:pAnsiChar; outputLen:int):pAnsiChar; stdcall;
+function mir_base64_encodebuf(data:PByte; dataSize:int; output:PAnsiChar; outputLen:int):PAnsiChar; stdcall;
external CoreDLL name 'mir_base64_encodebuf';
-function rtrim(str:pAnsiChar):pAnsiChar; stdcall;
+function rtrim(str:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'rtrim';
-function rtrimw(str:pWideChar):pWideChar; stdcall;
+function rtrimw(str:PWideChar):PWideChar; stdcall;
external CoreDLL name 'rtrimw';
// returns pointer to the beginning of string
-function ltrim(str:pAnsiChar):pAnsiChar; stdcall;
+function ltrim(str:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'ltrim';
-function ltrimw(str:pWideChar):pWideChar; stdcall;
+function ltrimw(str:PWideChar):PWideChar; stdcall;
external CoreDLL name 'ltrimw';
// returns pointer to the trimmed portion of string
-function ltrimp(str:pAnsiChar):pAnsiChar; stdcall;
+function ltrimp(str:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'ltrimp';
-function ltrimpw(str:pWideChar):pWideChar; stdcall;
+function ltrimpw(str:PWideChar):PWideChar; stdcall;
external CoreDLL name 'ltrimpw';
-function wildcmp(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
+function wildcmp(name:PAnsiChar; mask:PAnsiChar):int; stdcall;
external CoreDLL name 'wildcmp';
-function wildcmpw(name:pWideChar; mask:pWideChar):int; stdcall;
+function wildcmpw(name:PWideChar; mask:PWideChar):int; stdcall;
external CoreDLL name 'wildcmpw';
-function wildcmpi(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
+function wildcmpi(name:PAnsiChar; mask:PAnsiChar):int; stdcall;
external CoreDLL name 'wildcmpi';
-function wildcmpiw(name:pWideChar; mask:pWideChar):int; stdcall;
+function wildcmpiw(name:PWideChar; mask:PWideChar):int; stdcall;
external CoreDLL name 'wildcmpiw';
// mir_free dest, mir_strdup src to dest
-function replaceStr(var dest:pAnsiChar; const src:pAnsiChar):pAnsiChar; stdcall;
+function replaceStr(var dest:PAnsiChar; const src:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'replaceStr';
-function replaceStrW(var dest:pWideChar; const src:pWideChar):pWideChar; stdcall;
+function replaceStrW(var dest:PWideChar; const src:PWideChar):PWideChar; stdcall;
external CoreDLL name 'replaceStrW';
-function bin2hex(data:pointer; dataLen:size_t; pDest:pAnsiChar):pAnsiChar; stdcall;
+function bin2hex(data:pointer; dataLen:size_t; pDest:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'bin2hex';
-function bin2hexW(data:pointer; dataLen:size_t; pDest:pWideChar):pWideChar; stdcall;
+function bin2hexW(data:pointer; dataLen:size_t; pDest:PWideChar):PWideChar; stdcall;
external CoreDLL name 'bin2hexW';
///////////////////////////////////////////////////////////////////////////////
// text conversion functions
-function mir_a2u_cp(src:PAnsiChar;codepage:int):pWideChar; stdcall;
+function mir_a2u_cp(src:PAnsiChar;codepage:int):PWideChar; stdcall;
external CoreDLL name 'mir_a2u_cp';
-function mir_a2u(src:PAnsiChar):pWideChar; stdcall;
+function mir_a2u(src:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'mir_a2u';
-function mir_u2a_cp(src:pWideChar;codepage:int):PAnsiChar; stdcall;
+function mir_u2a_cp(src:PWideChar;codepage:int):PAnsiChar; stdcall;
external CoreDLL name 'mir_u2a_cp';
-function mir_u2a(src:pWideChar):PAnsiChar; stdcall;
+function mir_u2a(src:PWideChar):PAnsiChar; stdcall;
external CoreDLL name 'mir_u2a';
@@ -848,7 +850,7 @@ function forkthread(func:pThreadFunc; stacksize:uint; arg:pointer):uint_ptr; std
function forkthreadex(sec:pointer; stacksize:uint; func:pThreadFuncEx; owner:pointer; arg:pointer; thraddr:puint_ptr):uint_ptr; stdcall;
external CoreDLL name 'forkthreadex';
-procedure Thread_SetName(const szThreadName:pAnsiChar); stdcall;
+procedure Thread_SetName(const szThreadName:PAnsiChar); stdcall;
external CoreDLL name 'Thread_SetName';
procedure KillObjectThreads(pObject:pointer); stdcall;
@@ -858,12 +860,12 @@ procedure KillObjectThreads(pObject:pointer); stdcall;
///////////////////////////////////////////////////////////////////////////////
// utf8 interface
{ commented to avoid newer Delphi version conflicts
-function Utf8Decode(str:PAnsiChar; var ucs2:pWideChar):PAnsiChar;stdcall;
+function Utf8Decode(str:PAnsiChar; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8Decode';
-function Utf8DecodeCP(str:PAnsiChar; codepage:int; var ucs2:pWideChar):PAnsiChar;stdcall;
+function Utf8DecodeCP(str:PAnsiChar; codepage:int; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8DecodeCP';
-function Utf8DecodeW(const str:PAnsiChar):pWideChar;stdcall;
+function Utf8DecodeW(const str:PAnsiChar):PWideChar;stdcall;
external CoreDLL name 'Utf8DecodeW';
function Utf8Encode(const src:PAnsiChar):PAnsiChar;stdcall;
@@ -874,18 +876,18 @@ function Utf8EncodeCP(const src:PAnsiChar;codepage:int):PAnsiChar;stdcall;
function Utf8EncodeW(const src:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8EncodeW';
-function Ucs2toUtf8Len(const src:pWideChar):int; stdcall;
+function Ucs2toUtf8Len(const src:PWideChar):int; stdcall;
external CoreDLL name 'Ucs2toUtf8Len';
function Utf8CheckString(const astr:PAnsiChar):bool;stdcall;
external CoreDLL name 'Utf8CheckString';
}
// aliases
-function mir_utf8decode(str:PAnsiChar; var ucs2:pWideChar):PAnsiChar;stdcall;
+function mir_utf8decode(str:PAnsiChar; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8Decode';
-function mir_utf8decodecp(str:PAnsiChar; codepage:int; var ucs2:pWideChar):PAnsiChar;stdcall;
+function mir_utf8decodecp(str:PAnsiChar; codepage:int; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8DecodeCP';
-function mir_utf8decodew(const str:PAnsiChar):pWideChar;stdcall;
+function mir_utf8decodew(const str:PAnsiChar):PWideChar;stdcall;
external CoreDLL name 'Utf8DecodeW';
function mir_utf8encode(const src:PAnsiChar):PAnsiChar;stdcall;
@@ -896,7 +898,7 @@ function mir_utf8encodecp(const src:PAnsiChar;codepage:int):PAnsiChar;stdcall;
function mir_utf8encodew(const src:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8EncodeW';
-function mir_utf8lenW(const src:pWideChar):int; stdcall;
+function mir_utf8lenW(const src:PWideChar):int; stdcall;
external CoreDLL name 'Ucs2toUtf8Len';
function mir_utf8checkstring(const astr:PAnsiChar):bool;stdcall;
diff --git a/include/delphi/m_crypto.inc b/include/delphi/m_crypto.inc
index 81c35fabe9..3320fde380 100644
--- a/include/delphi/m_crypto.inc
+++ b/include/delphi/m_crypto.inc
@@ -1,7 +1,7 @@
{
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2010 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -23,31 +23,75 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
{$IFNDEF M_CRYPTO}
{$DEFINE M_CRYPTO}
+
type
- PCRYPTO_INTERFACE = ^TCRYPTO_INTERFACE;
- TCRYPTO_INTERFACE = record
- dwVersion:dword;
- pfnSetKey :procedure(const astr:PAnsiChar); cdecl; // sets the master password
- pfnSetKeyT:procedure(const astr:TCHAR); cdecl;
+ PMICryptoEngine = ^TMICryptoEngine;
+ TMICryptoEngine = record
+ dwVersion:dword;
+
+ destroy:procedure(); stdcall;
+
+ // get/set the instance key
+ getKeyLength:function():size_t; stdcall;
+ getKey :function(pKey:pByte; cbKeyLen:size_t):bool; stdcall;
+ setKey :function(const pKey:pByte; cbKeyLen:size_t):bool; stdcall;
- pfnPurgeKey:procedure(); cdecl; // purges a key from memory
+ generateKey:function():bool; stdcall; // creates a new key inside
+ purgeKey :procedure(); stdcall; // purges a key from memory
- pfnEncodeString :procedure(const src:PAnsiChar; buf:PAnsiChar; buf_len:size_t); cdecl;
- pfnEncodeStringT:procedure(const src:TChar ; buf:PAnsiChar; buf_len:size_t); cdecl;
+ // sets the master password (in utf-8)
+ checkPassword:function (const pszPassword:PAnsiChar):bool; stdcall;
+ setPassword :procedure(const pszPassword:PAnsiChar); stdcall;
- pfnDecodeString :procedure(const src:PAnsiChar; buf:PAnsiChar; buf_len:size_t); cdecl;
- pfnDecodeStringT:procedure(const src:PAnsiChar; buf:TChar ; buf_len:size_t); cdecl;
+ // result must be freed using mir_free or assigned to mir_ptr<BYTE>
+ encodeString:function(const src:PAnsiChar; var cbResultLen:size_t):pByte; stdcall;
+ encodeBuffer:function(const src:pointer; cbLen:size_t; var cbResultLen:size_t):pByte; stdcall;
+
+ // result must be freed using mir_free or assigned to ptrA/ptrT
+ decodeString:function(const pBuf:pByte; bufLen:size_t; var cbResultLen:size_t):PAnsiChar; stdcall;
+ decodeBuffer:function(const pBuf:pByte; bufLen:size_t; var cbResultLen:size_t):pointer; stdcall;
end;
- tagCRYPTOAPI = TCRYPTO_INTERFACE;
+/////////////////////////////////////////////////////////////////////////////////////////
+// registers a crypto provider v0.94+
+// wParam = (int)hLangpack
+// lParam = PCRYPTO_PROVIDER
+// returns HANDLE on success or NULL on failure
+
+type
+ pfnCryptoProviderFactory = function():PMICryptoEngine; cdecl;
const
-{
- retrieves the crypto interface v0.10.0.2+
- wParam=0
- lParam=0
- returns CRYPTO_INTERFACE* on success or NULL on failure
-}
- MS_CRYPTO_GETINTERFACE:PAnsiChar = 'SRCrypto/GetInterface';
+ CPF_UNICODE = 1;
+
+type
+ PCRYPTO_PROVIDER = ^TCRYPTO_PROVIDER;
+ TCRYPTO_PROVIDER = record
+ dwSize :dword;
+ dwFlags :dword; // one of CPF_* constants
+ pszName :PAnsiChar; // unique id
+ szDescr :TChar; // description, auto translated by core
+ pFactory:pfnCryptoProviderFactory;
+ end;
+ tagCRYPTOPROVIDER = TCRYPTO_PROVIDER;
+
+const
+ MS_CRYPTO_REGISTER_ENGINE:PAnsiChar = 'Crypto/RegisterEngine';
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+// retrieves list of all available crypto providers
+// wParam = (WPARAM)(int*)piNumProviders
+// lParam = (CRYPTO_PROVIDER***) pointer to an array of PCRYPTO_PROVIDER, like enumaccounts
+// always returns 0
+
+ MS_CRYPTO_ENUM_PROVIDERS:PAnsiChar = 'Crypto/EnumProviders';
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+// retrieves a crypto provider by name
+// wParam = 0 (unused)
+// lParam = (const char*)pszProviderName = CRYPTO_PROVIDER::pszName
+// returns 0 on fail or CRYPTO_PROVIDER* on success
+
+ MS_CRYPTO_GET_PROVIDER:PAnsiChar = 'Crypto/GetProvider';
{$ENDIF}
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc
index 00fdef2098..f89346053a 100644
--- a/include/delphi/m_database.inc
+++ b/include/delphi/m_database.inc
@@ -80,7 +80,7 @@ type
// enum via MS_DB_CONTACT_ENUMSETTINGS
lParam : LPARAM; // passed to the above function
szModule : PAnsiChar; // name of the module to get settings for
- ofsSettings: DWORD; // not used by us
+ ofsSettings: dword; // not used by us
end;
const
@@ -155,7 +155,7 @@ type
textService:PAnsiChar; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
iconService:PAnsiChar; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
eventIcon :THANDLE; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
- flags :DWORD; // flags, combination of the DETF_*
+ flags :dword; // flags, combination of the DETF_*
end;
const
@@ -165,14 +165,6 @@ const
DETF_NONOTIFY = 4; // block event notify (e.g. Popups)
const
- DBEVENTTYPEDESCR_SIZE = sizeof(TDBEVENTTYPEDESCR);
- {$IFNDEF WIN64}
- DBEVENTTYPEDESCR_SIZE_V1 = $10;
- {$ELSE}
- DBEVENTTYPEDESCR_SIZE_V1 = DBEVENTTYPEDESCR_SIZE;
- {$ENDIF}
-
-const
MS_DB_EVENT_REGISTERTYPE:PAnsiChar = 'DB/EventType/Register';
{ DB/EventType/Get service (0.7+)
@@ -203,6 +195,7 @@ type
datatype:int; // DBVT_ASCIIZ, DBVT_WCHAR (DBVT_TCHAR)
codepage:int;
end;
+
const
MS_DB_EVENT_GETTEXT:PAnsiChar = 'DB/Event/GetText';
@@ -233,7 +226,7 @@ const
//**************************** Time ********************************
{
- wParam : timestamp (DWORD)
+ wParam : timestamp (dword)
lParam : 0
Affect : Converts a GMT timestap into local time
Returns: Returns the converted value, see notes
@@ -247,7 +240,7 @@ const
MS_DB_TIME_TIMESTAMPTOLOCAL:PAnsiChar = 'DB/Time/TimestampToLocal';
{
- wParam : timestamp (DWORD)
+ wParam : timestamp (dword)
lParam : pointer to initalised DBTIMETOSTRING structure
Affect : Converts a GMT timestamp to a customisable local time string
see notes
@@ -317,14 +310,14 @@ const
to use before v0.1.2.1 because I don't know if this was done in v0.1.2.1-
}
type
- TDBMODULEENUMPROC = function(const szModule: PAnsiChar; ofsModuleName: DWORD; lParam: LPARAM): int; cdecl;
+ TDBMODULEENUMPROC = function(const szModule: PAnsiChar; ofsModuleName: dword; lParam: LPARAM): int; cdecl;
const
MS_DB_MODULES_ENUM:PAnsiChar = 'DB/Modules/Enum';
{ DB/Module/Delete 0.8.0+
Removes all settings for the specified module.
- wParam=(WPARAM)(MCONTACT)hContact - contact's handle or 0 for global settings
+ wParam=Contact's handle or 0 for global settings
lParam=(LPARAM)(AnsiChar*)szModuleName - the module name to be deleted
}
MS_DB_MODULE_DELETE:PAnsiChar = 'DB/Module/Delete';
@@ -332,20 +325,20 @@ const
//************************** EVENTS ********************************
{
- wParam : MCONTACT
- lParam : HDBCONTACT
+ wParam : TMCONTACT
+ lParam : HDBEVENT
Affect : Called when a new event has been added to the event chain
- for a contact, MCONTACT contains the contact who added the event,
- HDBCONTACT a handle to what was added.
+ for a contact, TMCONTACT contains the contact who added the event,
+ HDBEVENT a handle to what was added.
see notes
notes : since events are sorted chronologically, you can not guarantee
- that HDBEVEnT is in any particular position in the chain.
+ that HDBEVENT is in any particular position in the chain.
}
ME_DB_EVENT_ADDED:PAnsiChar = 'DB/Event/Added';
{
- wParam : HANDLE (hContact)
+ wParam : TMCONTACT
lParam : @DBEVENTINFO
Affects: Hook is fired before any DBEVENTS are created within the database for
a contact (or a user, if hContact is NULL(0)) - It allows a module to
@@ -361,15 +354,15 @@ const
ME_DB_EVENT_FILTER_ADD:PAnsiChar = 'DB/Event/FilterAdd';
{
- wParam : MCONTACT
- lParam : HANDLE
+ wParam : TMCONTACT
+ lParam : HDBEVENT
Affect : Called when an event is marked read
}
ME_DB_EVENT_MARKED_READ:PAnsiChar = 'DB/Event/Marked/Read';
{
- wParam : MCONTACT
- lParam : HANDLE
+ wParam : TMCONTACT
+ lParam : HDBEVENT
Affect : Called when an event is about to be deleted from the event chain
for a contact, see notes
notes : Returning non zero from your hook will NOT stop the deletion,
@@ -378,15 +371,15 @@ const
ME_DB_EVENT_DELETED:PAnsiChar = 'DB/Event/Deleted';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Called when a new contact has been added to the database,
- MCONTACT contains a handle to the new contact.
+ TMCONTACT contains a handle to the new contact.
}
ME_DB_CONTACT_ADDED:PAnsiChar = 'DB/Contact/Added';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affect : Called when a contact is about to be deleted
Returns: Returning nonzero from your hook will not stop the deletion
@@ -395,7 +388,7 @@ const
ME_DB_CONTACT_DELETED:PAnsiChar = 'DB/Contact/Deleted';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : Pointer to a TDBCONTACTWRITESETTING
Affect : Calleed when a contact has one of it's settings changed
hContact is a valid handle to the contact that has changed,
diff --git a/include/delphi/m_db_int.inc b/include/delphi/m_db_int.inc
index 4cebeae11c..211cb7efba 100644
--- a/include/delphi/m_db_int.inc
+++ b/include/delphi/m_db_int.inc
@@ -28,38 +28,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// basic database interface
type
TDBCachedGlobalValue = record
- name : pAnsiChar;
+ name : PAnsiChar;
value:TDBVARIANT;
end;
type
PDBCachedContactValue = ^TDBCachedContactValue;
TDBCachedContactValue = record
- name:pAnsiChar;
+ name:PAnsiChar;
value:TDBVARIANT;
next: PDBCachedContactValue;
end;
PDBCachedContact = ^TDBCachedContact;
TDBCachedContact = record
- contactID:MCONTACT;
- dwDriverData:DWORD;
+ contactID:TMCONTACT;
+ dwDriverData:dword;
szProto:PAnsiChar;
first :PDBCachedContactValue;
last :PDBCachedContactValue;
+ // metacontacts
+ nSubs:int; // == -1 -> not a metacontact
+ pSubs:PMCONTACT;
+ parentID:TMCONTACT; // == 0 -> not a subcontact
+ nDefault:int // default sub number
end;
PMIDatabaseCache = ^MIDatabaseCache;
MIDatabaseCache = interface
- function AddContactToCache(contactID:MCONTACT):PDBCachedContact; stdcall;
- function GetCachedContact(contactID:MCONTACT):PDBCachedContact; stdcall;
+ function AddContactToCache(contactID:TMCONTACT):PDBCachedContact; stdcall;
+ function GetCachedContact(contactID:TMCONTACT):PDBCachedContact; stdcall;
function GetFirstContact():PDBCachedContact; stdcall;
- function GetNextContact(contactID:MCONTACT):PDBCachedContact; stdcall;
- procedure FreeCachedContact(contactID:MCONTACT); stdcall;
+ function GetNextContact(contactID:TMCONTACT):PDBCachedContact; stdcall;
+ procedure FreeCachedContact(contactID:TMCONTACT); stdcall;
- function InsertCachedSetting(szName:pAnsiChar; param:int):pAnsiChar; stdcall;
- function GetCachedSetting(szModuleName:pAnsiChar; szSettingName:pAnsiChar; param1:int; param2:int):pAnsiChar; stdcall;
+ function InsertCachedSetting(szName:PAnsiChar; param:int):PAnsiChar; stdcall;
+ function GetCachedSetting(szModuleName:PAnsiChar; szSettingName:PAnsiChar; param1:int; param2:int):PAnsiChar; stdcall;
procedure SetCachedVariant(s:PDBVARIANT; d:PDBVARIANT); stdcall;
- function GetCachedValuePtr(contactID:MCONTACT; szSetting:pAnsiChar; bAllocate:int):PDBVARIANT; stdcall;
+ function GetCachedValuePtr(contactID:TMCONTACT; szSetting:PAnsiChar; bAllocate:int):PDBVARIANT; stdcall;
end;
type
@@ -70,38 +75,43 @@ type
SetCacheSafetyMode:procedure(val:bool); stdcall;
GetContactCount:function():long; stdcall;
- FindFirstContact:function(const szProto:PAnsiChar = NIL):MCONTACT; stdcall;
- FindNextContact:function(contactID:MCONTACT; const szProto:PAnsiChar = NIL):MCONTACT; stdcall;
+ FindFirstContact:function(const szProto:PAnsiChar = NIL):TMCONTACT; stdcall;
+ FindNextContact:function(contactID:TMCONTACT; const szProto:PAnsiChar = NIL):TMCONTACT; stdcall;
- DeleteContact:function(contactID:MCONTACT):long; stdcall;
- AddContact:function():MCONTACT; stdcall;
- IsDbContact:function(contactID:MCONTACT):bool; stdcall;
+ DeleteContact:function(contactID:TMCONTACT):long; stdcall;
+ AddContact:function():TMCONTACT; stdcall;
+ IsDbContact:function(contactID:TMCONTACT):bool; stdcall;
- GetEventCount:function(contactID:MCONTACT):long; stdcall;
- AddEvent:function(contactID:MCONTACT; dbe:PDBEVENTINFO):THANDLE; stdcall;
- DeleteEvent:function(contactID:MCONTACT; hDbEvent:THANDLE):bool; stdcall;
+ GetEventCount:function(contactID:TMCONTACT):long; stdcall;
+ AddEvent:function(contactID:TMCONTACT; dbe:PDBEVENTINFO):THANDLE; stdcall;
+ DeleteEvent:function(contactID:TMCONTACT; hDbEvent:THANDLE):bool; stdcall;
GetBlobSize:function(hDbEvent:THANDLE):long; stdcall;
GetEvent:function(hDbEvent:THANDLE; dbe:PDBEVENTINFO):bool; stdcall;
- MarkEventRead:function(contactID:MCONTACT; hDbEvent:THANDLE):bool; stdcall;
- GetEventContact:function(hDbEvent:THANDLE):MCONTACT; stdcall;
- FindFirstEvent:function(contactID:MCONTACT):THANDLE; stdcall;
- FindFirstUnreadEvent:function(contactID:MCONTACT):THANDLE; stdcall;
- FindLastEvent:function(contactID:MCONTACT):THANDLE; stdcall;
+ MarkEventRead:function(contactID:TMCONTACT; hDbEvent:THANDLE):bool; stdcall;
+ GetEventContact:function(hDbEvent:THANDLE):TMCONTACT; stdcall;
+ FindFirstEvent:function(contactID:TMCONTACT):THANDLE; stdcall;
+ FindFirstUnreadEvent:function(contactID:TMCONTACT):THANDLE; stdcall;
+ FindLastEvent:function(contactID:TMCONTACT):THANDLE; stdcall;
FindNextEvent:function(hDbEvent:THANDLE):THANDLE; stdcall;
FindPrevEvent:function(hDbEvent:THANDLE):THANDLE; stdcall;
EnumModuleNames:function(pFunc:TDBMODULEENUMPROC; pParam:pointer):bool; stdcall;
- GetContactSetting:function(contactID:MCONTACT; szModule, szSetting:pAnsiChar; dbv:PDBVARIANT):bool; stdcall;
- GetContactSettingStr:function(contactID:MCONTACT; szModule, szSetting:pAnsiChar; dbv:PDBVARIANT):bool; stdcall;
- GetContactSettingStatic:function(contactID:MCONTACT; szModule, szSetting:pAnsiChar; dbv:PDBVARIANT):bool; stdcall;
+ GetContactSetting:function(contactID:TMCONTACT; szModule, szSetting:PAnsiChar; dbv:PDBVARIANT):bool; stdcall;
+ GetContactSettingStr:function(contactID:TMCONTACT; szModule, szSetting:PAnsiChar; dbv:PDBVARIANT):bool; stdcall;
+ GetContactSettingStatic:function(contactID:TMCONTACT; szModule, szSetting:PAnsiChar; dbv:PDBVARIANT):bool; stdcall;
FreeVariant:function(dbv:PDBVARIANT):bool; stdcall;
- WriteContactSetting:function(contactID:MCONTACT; dbcws:PDBCONTACTWRITESETTING):bool; stdcall;
- DeleteContactSetting:function(contactID:MCONTACT; szModule, szSetting:pAnsiChar):bool; stdcall;
- EnumContactSettings:function(contactID:MCONTACT; dbces:PDBCONTACTENUMSETTINGS):bool; stdcall;
+ WriteContactSetting:function(contactID:TMCONTACT; dbcws:PDBCONTACTWRITESETTING):bool; stdcall;
+ DeleteContactSetting:function(contactID:TMCONTACT; szModule, szSetting:PAnsiChar):bool; stdcall;
+ EnumContactSettings:function(contactID:TMCONTACT; dbces:PDBCONTACTENUMSETTINGS):bool; stdcall;
SetSettingResident:function(bIsResident:bool; const pszSettingName:PAnsiChar):bool; stdcall;
EnumResidentSettings:function(pFunc:TDBMODULEENUMPROC; pParam:pointer):bool; stdcall;
- IsSettingEncrypted:function(szModule:PAnsiChar; szSetting:pAnsiChar):bool; stdcall;
+ IsSettingEncrypted:function(szModule:PAnsiChar; szSetting:PAnsiChar):bool; stdcall;
+
+ MetaDetouchSub:function(contact:PDBCachedContact; nSub:int):bool; stdcall;
+ MetaSetDefault:function(contact:PDBCachedContact):bool; stdcall;
+ MetaMergeHistory:function(ccMeta:PDBCachedContact; ccSub:PDBCachedContact):bool; stdcall;
+ MetaSplitHistory:function(ccMeta:PDBCachedContact; ccSub:PDBCachedContact):bool; stdcall;
end;
///////////////////////////////////////////////////////////////////////////////
@@ -185,7 +195,7 @@ type
which is a DATABASELINK structure
Returns: 0 on success, nonzero on failure
}
- Load : function (const profile:TChar):PMIDatabase; cdecl;
+ Load : function (const profile:TChar; bReadOnly:bool):PMIDatabase; cdecl;
{
Affect: The database plugin should shutdown, unloading things from the core and freeing internal structures
Returns: 0 on success, nonzero on failure
@@ -232,7 +242,7 @@ const
lParam : MIDatabase* = pointer to a database instance
returns 0
}
- MS_DB_INIT_INSTANCE:pAnsiChar = 'DB/InitDbInstance';
+ MS_DB_INIT_INSTANCE:PAnsiChar = 'DB/InitDbInstance';
{
@@ -241,6 +251,6 @@ const
lParam : MIDatabase* = pointer to a database instance
returns 0
}
- MS_DB_DESTROY_INSTANCE:pAnsiChar = 'DB/DestroyDbInstance';
+ MS_DB_DESTROY_INSTANCE:PAnsiChar = 'DB/DestroyDbInstance';
{$ENDIF}
diff --git a/include/delphi/m_email.inc b/include/delphi/m_email.inc
index 9e35352259..800c0eadfd 100644
--- a/include/delphi/m_email.inc
+++ b/include/delphi/m_email.inc
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affects: Send an e-mail to the specified contact, see notes
Returns: Returns 0 on success or nonzero on failure
diff --git a/include/delphi/m_extraicons.inc b/include/delphi/m_extraicons.inc
index 369c1e6270..577585f953 100644
--- a/include/delphi/m_extraicons.inc
+++ b/include/delphi/m_extraicons.inc
@@ -91,8 +91,8 @@ const
type
TEXTRAICON = record
cbSize :int;
- hExtraIcon:THANDLE; // Value returned by MS_EXTRAICON_REGISTER
- hContact :MCONTACT; // Contact to set the extra icon
+ 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)
diff --git a/include/delphi/m_file.inc b/include/delphi/m_file.inc
index 27a8e582b9..d1eedc31b1 100644
--- a/include/delphi/m_file.inc
+++ b/include/delphi/m_file.inc
@@ -25,58 +25,58 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affects: Brings up the send file dialog for a contact, see notes
- Returns: file selection dialog's handle or 0 on error
+ Returns: returns file selection dialog's handle or 0 on error
Notes : Returns immediately without waiting for the send
}
MS_FILE_SENDFILE:PAnsiChar = 'SRFile/SendCommand';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : pointer to an array of PAnsiChar's the first nil item
terminates the list -- see notes
Affects: Brings up the send file dialog with specifieed files already chosen
- the user is not prevented from editing the list --
- Returns: file selection dialog's handle or 0 on error
+ the user is not prevented from editing the list
+ Returns: returns file selection dialog's handle or 0 on error
returns immediately without waiting for the send to finish
Notes : both directories and files can be given
Version: v0.1.2.1+
}
MS_FILE_SENDSPECIFICFILES:PAnsiChar = 'SRFile/SendSpecificFiles';
- {
- wParam : MCONTACT
- lParam : pointer to an array of PWideChar's the first nil item
- terminates the list -- see notes
- Returns: file selection dialog's handle or 0 on error
- returns immediately, without waiting for the send
- }
+{
+ v0.9.0+
+ wParam=(WPARAM)(HANDLE)hContact
+ lParam=(LPARAM)(const TCHAR**)ppFiles
+ returns file selection dialog's handle or 0 on error
+ returns immediately, without waiting for the send
+}
MS_FILE_SENDSPECIFICFILEST:PAnsiChar = 'SRFile/SendSpecificFilesT';
-
+
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : Pointer to a buffer
Affects: returns the received files folder for a contact, the buffer
should be at least MAX_PATH long (defined with WinAPI),
the returned path may not exist -- see notes
Returns: Returns 0 on success [non zero] on failure
- Notes : If MCONTACT is NULL(0) the path returned is the path
+ notes : If TMCONTACT is NULL(0) the path returned is the path
without the postfix contact name.
Version: v0.1.2.2+
}
MS_FILE_GETRECEIVEDFILESFOLDER:PAnsiChar = 'SRFile/GetReceivedFilesFolder';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : file selection dialog's window
Notes : notifies a caller about file send start
}
ME_FILEDLG_SUCCEEDED:PAnsiChar = 'SRFile/Dlg/Succeeded';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : file selection dialog's window
Notes : notifies a caller about file send cancellation
}
diff --git a/include/delphi/m_fontservice.inc b/include/delphi/m_fontservice.inc
index bc4d74fe98..b93f7cf653 100644
--- a/include/delphi/m_fontservice.inc
+++ b/include/delphi/m_fontservice.inc
@@ -44,8 +44,8 @@ type
TFontSettings_tag = record
colour : TCOLORREF;
size : ShortInt;
- style : BYTE; // see the DBFONTF_* flags above
- charset : BYTE;
+ style : byte; // see the DBFONTF_* flags above
+ charset : byte;
szFace : array[0..(LF_FACESIZE)-1] of AnsiChar;
end;
TFontSettings = TFontSettings_tag;
@@ -55,8 +55,8 @@ type
TFontSettingsW_tag = record
colour : TCOLORREF;
size : ShortInt;
- style : BYTE; // see the DBFONTF_* flags above
- charset : BYTE;
+ style : byte; // see the DBFONTF_* flags above
+ charset : byte;
szFace : array[0..(LF_FACESIZE)-1] of WideChar;
end;
TFontSettingsW = TFontSettingsW_tag;
@@ -77,7 +77,7 @@ type
// prepended to the settings used to store this font's data in the db
prefix : array[0..31] of AnsiChar;
// bitwise OR of the FIDF_* flags above
- flags : DWORD;
+ flags : dword;
deffontsettings: TFontSettings; // defaults, if flags & FIDF_DEFAULTVALID
// controls the order in the font group in which the fonts are listed in the
// UI (if order fields are equal, they will be ordered alphabetically by name)
@@ -100,7 +100,7 @@ type
// prepended to the settings used to store this font's data in the db
prefix : array[0..31] of AnsiChar;
// bitwise OR of the FIDF_* flags above
- flags : DWORD;
+ flags : dword;
deffontsettings: TFontSettingsW; // defaults, if flags & FIDF_DEFAULTVALID
// controls the order in the font group in which the fonts are listed in the
// UI (if order fields are equal, they will be ordered alphabetically by name)
@@ -112,19 +112,6 @@ type
PFontIDW = ^TFontIDW;
const
- {$IFNDEF WIN64}
- FontID_SIZEOF_V2 = 372;
- FontID_SIZEOF_V2A = 372;
- FontID_SIZEOF_V2U = 660;
- FontIDW_SIZEOF_V2 = 660;
- {$ELSE}
- FontID_SIZEOF_V2 = SizeOf(TFontID);
- FontID_SIZEOF_V2A = SizeOf(TFontID);
- FontID_SIZEOF_V2U = SizeOf(TFontIDW);
- FontIDW_SIZEOF_V2 = SizeOf(TFontIDW);
- {$ENDIF}
-
-const
{ register a font }
{ wparam = pointer to FontID structure}
{ lparam = hLangpack }
@@ -149,7 +136,7 @@ type
name : array[0..63] of AnsiChar;
dbSettingsGroup : array[0..31] of AnsiChar;
setting : array[0..31] of AnsiChar;
- flags : DWORD; // not used
+ flags : dword; // not used
defcolour : TCOLORREF; // default value
order : int;
end;
@@ -163,7 +150,7 @@ type
name : array[0..63] of WideChar;
dbSettingsGroup : array[0..31] of AnsiChar;
setting : array[0..31] of AnsiChar;
- flags : DWORD; // not used
+ flags : dword; // not used
defcolour : TCOLORREF; // default value
order : int;
end;
@@ -241,18 +228,18 @@ const
// register an effect
// wparam = (EffectID *)&effect_id
// lparam = hLangpack
- MS_EFFECT_REGISTERA:pAnsiChar = 'Effect/Register';
- MS_EFFECT_REGISTERW:pAnsiChar = 'Effect/RegisterW';
+ MS_EFFECT_REGISTERA:PAnsiChar = 'Effect/Register';
+ MS_EFFECT_REGISTERW:PAnsiChar = 'Effect/RegisterW';
// get a effect
// wparam = (EffectID *)&effect_id (only name and group matter)
// lparam = (FONTEFFECT *)&effect
// rerturns 0, or -1 if not found
- MS_EFFECT_GET :pAnsiChar = 'Effect/Get';
- MS_EFFECT_GETW:pAnsiChar = 'Effect/GetW';
+ MS_EFFECT_GET :PAnsiChar = 'Effect/Get';
+ MS_EFFECT_GETW:PAnsiChar = 'Effect/GetW';
// fired when a user modifies font settings, so reget your fonts and colours
// wparam = lparam = 0
- ME_EFFECT_RELOAD:pAnsiChar = 'Effect/Reload';
+ ME_EFFECT_RELOAD:PAnsiChar = 'Effect/Reload';
{$ENDIF}
diff --git a/include/delphi/m_genmenu.inc b/include/delphi/m_genmenu.inc
index e72e66abef..685b20d512 100644
--- a/include/delphi/m_genmenu.inc
+++ b/include/delphi/m_genmenu.inc
@@ -122,8 +122,8 @@ const
// Group MENU
type
- lpGroupMenuParam = ^GroupMenuParam;
- GroupMenuParam = record
+ PGroupMenuParam = ^TGroupMenuParam;
+ TGroupMenuParam = record
wParam:WPARAM;
lParam:LPARAM;
end;
@@ -245,7 +245,7 @@ type
root :HGENMENU;
flags :integer;
hIcon :HICON; // or hIcolibItem:THANDLE;
- hotKey :DWORD;
+ hotKey :dword;
ownerdata:^pointer;
hLangpack:int;
end;
@@ -287,18 +287,18 @@ type
//used in MO_BUILDMENU
type
- lpListParam = ^ListParam;
- ListParam = record
+ PListParam = ^TListParam;
+ TListParam = record
rootlevel :int;
MenuObjectHandle:THANDLE;
wParam :WPARAM;
lParam :LPARAM;
end;
- tagListParam = ListParam;
+ tagListParam = TListParam;
type
- lpProcessCommandParam = ^ProcessCommandParam;
- ProcessCommandParam = record
+ PProcessCommandParam = ^TProcessCommandParam;
+ TProcessCommandParam = record
menu :HMENU;
ident :int;
lParam:LPARAM;
@@ -436,8 +436,8 @@ const
OPT_USERDEFINEDITEMS = 1;
type
- lpOptParam = ^OptParam;
- OptParam = record
+ POptParam = ^TOptParam;
+ TOptParam = record
Handle :THANDLE;
Setting:int;
Value :int_ptr;
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index 13537c7c9d..a8a5112737 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -9,32 +9,32 @@ function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline}
function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
-function Netlib_CloseHandle(Handle: THandle): int;
+function Netlib_CloseHandle(Handle: THANDLE): int;
function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
-function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
-function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
-procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
-
-function WindowList_Add (hList:THandle; hWnd:HWND; hContact:MCONTACT): int_ptr;
-function WindowList_Remove (hList:THandle; hWnd:THandle): int_ptr;
-function WindowList_Find (hList:THandle; hContact:MCONTACT): int_ptr;
-function WindowList_Broadcast(hList:THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
-function Utils_SaveWindowPosition (hWnd:THandle; hContact:MCONTACT; const szModule, szNamePrefix: PAnsiChar): int_ptr;
-function Utils_RestoreWindowPosition(hWnd:THandle; hContact:MCONTACT; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
-
-function mir_hashstr (const key:pAnsiChar):uint; {inline;}
-function mir_hashstrW(const key:pWideChar):uint; {inline;}
-function lrtrim (str:pAnsiChar):pAnsiChar; {inline}
-function lrtrimp(str:pAnsiChar):pAnsiChar; {inline}
-function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline}
+function Netlib_Send(hConn: THANDLE; const buf: PAnsiChar; len: int; flags: int): int_ptr;
+function Netlib_Recv(hConn: THANDLE; const buf: PAnsiChar; len: int; flags: int): int_ptr;
+procedure Netlib_Log(hNetLib: THANDLE; const sz: PAnsiChar);
+
+function WindowList_Add (hList:THANDLE; hWnd:HWND; hContact:TMCONTACT): int_ptr;
+function WindowList_Remove (hList:THANDLE; hWnd:HWND): int_ptr;
+function WindowList_Find (hList:THANDLE; hContact:TMCONTACT): int_ptr;
+function WindowList_Broadcast(hList:THANDLE; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
+function Utils_SaveWindowPosition (hWnd:HWND; hContact:TMCONTACT; const szModule, szNamePrefix: PAnsiChar): int_ptr;
+function Utils_RestoreWindowPosition(hWnd:HWND; hContact:TMCONTACT; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
+
+function mir_hashstr (const key:PAnsiChar):uint; {inline;}
+function mir_hashstrW(const key:PWideChar):uint; {inline;}
+function lrtrim (str:PAnsiChar):PAnsiChar; {inline}
+function lrtrimp(str:PAnsiChar):PAnsiChar; {inline}
+function mir_utf8decodeA(const src:PAnsiChar):PAnsiChar; {inline}
function Translate (sz: PAnsiChar): PAnsiChar;
function Translatew(sz: PWideChar): PWideChar;
function TranslateString (const sz:AnsiString):AnsiString;
function TranslateWideString(const sz:WideString):WideString;
function TranslateUnicodeString(sz: UnicodeString): UnicodeString;
-procedure TranslateDialogDefault(hwndDlg: THandle);
+procedure TranslateDialogDefault(hwndDlg: THANDLE);
procedure TranslateMenu(hMenu: HMENU);
function Langpack_Register:int_ptr;
@@ -42,15 +42,15 @@ function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; servic
function Srmm_AddIcon (sid: PStatusIconData):int_ptr;
procedure Srmm_RemoveIcon(sid: PStatusIconData);
-procedure Srmm_ModifyIcon(hContact:MCONTACT; sid:PStatusIconData);
-function Srmm_GetNthIcon(hContact:MCONTACT; index:int):pStatusIconData;
+procedure Srmm_ModifyIcon(hContact:TMCONTACT; sid:PStatusIconData);
+function Srmm_GetNthIcon(hContact:TMCONTACT; index:int):pStatusIconData;
function LoadSkinnedIcon (id: int): HICON;
-function LoadSkinnedIconHandle(id: int): THandle;
+function LoadSkinnedIconHandle(id: int): THANDLE;
function LoadSkinnedIconBig (id: int): HICON;
function LoadSkinnedIconName (id: int): PAnsiChar;
-function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
+function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THANDLE;
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
function SkinPlaySound (const name: PAnsiChar): int_ptr;
@@ -68,8 +68,8 @@ function Options_AddPage (wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
function Hotkey_Register(hk:PHOTKEYDESC):int_ptr;
function Skin_AddIcon(si:PSKINICONDESC):THANDLE;
-procedure Icon_Register (hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem ; iCount:size_t; prefix:PAnsiChar);
-procedure Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar);
+procedure Icon_Register (hInst:HINST; const szSection:PAnsiChar; pIcons:pIconItem ; iCount:size_t; prefix:PAnsiChar);
+procedure Icon_RegisterW(hInst:HINST; const szSection:PWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar);
procedure FontRegister (pFontID:pFontID);
procedure FontRegisterW(pFontID:pFontIDW);
@@ -85,6 +85,13 @@ function TopToolbar_AddButton(pButton:PTTBButton):THANDLE;
function Options_Open (ood:POPENOPTIONSDIALOG):int_ptr;
function Options_OpenPage(ood:POPENOPTIONSDIALOG):HWND;
+procedure MIcoTab_AddItem (hwnd:HWND; lptzName:PAnsiChar; hIcon:HICON; data:LPARAM; bSharedIcon:bool);
+procedure MIcoTab_AddItemW(hwnd:HWND; lptzName:PWideChar; hIcon:HICON; data:LPARAM; bSharedIcon:bool);
+
+function Crypto_RegisterEngine(pProvider:PCRYPTO_PROVIDER):THANDLE;
+procedure Crypto_EnumProviders(var numProvs:int; var pResult:array of PCRYPTO_PROVIDER);
+function Crypto_GetProvider(pszName:PAnsiChar):PCRYPTO_PROVIDER;
+
{$ELSE}
function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
@@ -140,7 +147,7 @@ begin
end;
-function Netlib_CloseHandle(Handle: THandle): int;
+function Netlib_CloseHandle(Handle: THANDLE): int;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_NETLIB_CLOSEHANDLE, Handle, 0);
@@ -158,7 +165,7 @@ begin
Result := (cbDecoded * 4+11) div 12*4+1;
end;
-function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
+function Netlib_Send(hConn: THANDLE; const buf: PAnsiChar; len: int; flags: int): int_ptr;
var
nlb: TNETLIBBUFFER;
begin
@@ -168,7 +175,7 @@ begin
Result := CallService(MS_NETLIB_SEND, wParam(hConn), lParam(@nlb));
end;
-function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
+function Netlib_Recv(hConn: THANDLE; const buf: PAnsiChar; len: int; flags: int): int_ptr;
var
nlb: TNETLIBBUFFER;
begin
@@ -178,14 +185,14 @@ begin
Result := CallService(MS_NETLIB_RECV, wParam(hConn), lParam(@nlb));
end;
-procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
+procedure Netlib_Log(hNetLib: THANDLE; const sz: PAnsiChar);
{$IFDEF AllowInline}inline;{$ENDIF}
begin
CallService(MS_NETLIB_LOG, hNetLib, lParam(sz));
end;
-function WindowList_Add(hList: THandle; hWnd: hWnd; hContact: MCONTACT): int_ptr;
+function WindowList_Add(hList: THANDLE; hWnd: HWND; hContact: TMCONTACT): int_ptr;
var
wle: TWINDOWLISTENTRY;
begin
@@ -195,19 +202,19 @@ begin
Result := CallService(MS_UTILS_ADDTOWINDOWLIST, 0, lParam(@wle));
end;
-function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr;
+function WindowList_Remove(hList: THANDLE; hWnd: HWND): int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_UTILS_REMOVEFROMWINDOWLIST, hList, hWnd);
end;
-function WindowList_Find(hList: THandle; hContact: MCONTACT): int_ptr;
+function WindowList_Find(hList: THANDLE; hContact: TMCONTACT): int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_UTILS_FINDWINDOWINLIST, hList, hContact);
end;
-function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
+function WindowList_Broadcast(hList: THANDLE; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
var
msg: TMSG;
begin
@@ -217,7 +224,7 @@ begin
Result := CallService(MS_UTILS_BROADCASTTOWINDOWLIST, hList, tLparam(@Msg));
end;
-function Utils_SaveWindowPosition(hWnd:THandle; hContact:MCONTACT; const szModule, szNamePrefix: PAnsiChar): int_ptr;
+function Utils_SaveWindowPosition(hWnd:HWND; hContact:TMCONTACT; const szModule, szNamePrefix: PAnsiChar): int_ptr;
var
swp: TSAVEWINDOWPOS;
begin
@@ -228,7 +235,7 @@ begin
Result := CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, lParam(@swp));
end;
-function Utils_RestoreWindowPosition(hWnd:THandle; hContact:MCONTACT; Flags:int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
+function Utils_RestoreWindowPosition(hWnd:HWND; hContact:TMCONTACT; Flags:int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
var
swp: TSAVEWINDOWPOS;
begin
@@ -240,7 +247,7 @@ begin
end;
-function mir_hashstr(const key:pAnsiChar):uint; {inline;}
+function mir_hashstr(const key:PAnsiChar):uint; {inline;}
var
len:int;
begin
@@ -253,7 +260,7 @@ begin
end;
end;
-function mir_hashstrW(const key:pWideChar):uint; {inline;}
+function mir_hashstrW(const key:PWideChar):uint; {inline;}
var
len:int;
begin
@@ -266,22 +273,22 @@ begin
end;
end;
-function lrtrim(str:pAnsiChar):pAnsiChar;
+function lrtrim(str:PAnsiChar):PAnsiChar;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=ltrim(rtrim(str));
end;
-function lrtrimp(str:pAnsiChar):pAnsiChar;
+function lrtrimp(str:PAnsiChar):PAnsiChar;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=ltrimp(rtrim(str));
end;
-function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar;
+function mir_utf8decodeA(const src:PAnsiChar):PAnsiChar;
type
ppWideChar = ^pWidechar;
var
- tmp:pAnsiChar;
+ tmp:PAnsiChar;
begin
tmp:=mir_strdup(src);
mir_utf8decode(tmp,ppWideChar(nil)^);
@@ -314,7 +321,7 @@ begin
Result:=UnicodeString(TranslateW_LP(PWideChar(sz),hLangpack));
end;
-procedure TranslateDialogDefault(hwndDlg: THandle);
+procedure TranslateDialogDefault(hwndDlg: THANDLE);
begin
TranslateDialog_LP(hwndDlg,hLangpack);
end;
@@ -356,13 +363,13 @@ begin
CallService(MS_MSG_REMOVEICON, 0, LPARAM(sid));
end;
-procedure Srmm_ModifyIcon(hContact:MCONTACT; sid:PStatusIconData);
+procedure Srmm_ModifyIcon(hContact:TMCONTACT; sid:PStatusIconData);
{$IFDEF AllowInline}inline;{$ENDIF}
begin
CallService(MS_MSG_GETNTHICON, hContact, LPARAM(sid));
end;
-function Srmm_GetNthIcon(hContact:MCONTACT; index:int):PStatusIconData;
+function Srmm_GetNthIcon(hContact:TMCONTACT; index:int):PStatusIconData;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=PStatusIconData(CallService(MS_MSG_GETNTHICON, hContact, index));
@@ -374,7 +381,7 @@ begin
Result := HICON(CallService(MS_SKIN_LOADICON, id, 0));
end;
-function LoadSkinnedIconHandle(id: int): THandle;
+function LoadSkinnedIconHandle(id: int): THANDLE;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := THANDLE(CallService(MS_SKIN_LOADICON, id, 1));
@@ -392,7 +399,7 @@ begin
Result := PAnsiChar(CallService(MS_SKIN_LOADICON, id, 3));
end;
-function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
+function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THANDLE;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
@@ -488,12 +495,12 @@ begin
result:=CallService(MS_SKIN2_ADDICON, hLangpack, LPARAM(si));
end;
-procedure Icon_Register(hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem; iCount:size_t; prefix:PAnsiChar);
+procedure Icon_Register(hInst:HINST; const szSection:PAnsiChar; pIcons:pIconItem; iCount:size_t; prefix:PAnsiChar);
begin
mir_Icon_Register(hInst, szSection, pIcons, iCount, prefix, hLangpack);
end;
-procedure Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar);
+procedure Icon_RegisterW(hInst:HINST; const szSection:PWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar);
begin
mir_Icon_RegisterW(hInst, szSection, pIcons, iCount, prefix, hLangpack);
end;
@@ -540,4 +547,48 @@ begin
result:=CallService(MS_OPT_OPENOPTIONSPAGE, hLangpack, LPARAM(ood));
end;
+procedure MIcoTab_AddItem(hwnd:HWND; lptzName:PAnsiChar; hIcon:HICON; data:LPARAM; bSharedIcon:bool);
+var
+ mit:tMIcoTab;
+begin
+ if bSharedIcon then
+ mit.flag := MITCF_SHAREDICON
+ else
+ mit.flag := 0;
+ mit.hIcon := hIcon;
+ mit.szName.a := lptzName;
+ mit.data := data;
+ SendMessage(hwnd, ITCM_ADDITEM, WPARAM(@mit), 0);
+end;
+
+procedure MIcoTab_AddItemW(hwnd:HWND; lptzName:PWideChar; hIcon:HICON; data:LPARAM; bSharedIcon:bool);
+var
+ mit:tMIcoTab;
+begin
+ if bSharedIcon then
+ mit.flag := MITCF_SHAREDICON or MITCF_UNICODE
+ else
+ mit.flag := MITCF_UNICODE;
+ mit.hIcon := hIcon;
+ mit.szName.w := lptzName;
+ mit.data := data;
+ SendMessage(hwnd, ITCM_ADDITEM, WPARAM(@mit), 0);
+end;
+
+
+function Crypto_RegisterEngine(pProvider:PCRYPTO_PROVIDER):THANDLE;
+begin
+ result:=THANDLE(CallService(MS_CRYPTO_REGISTER_ENGINE, hLangpack, LPARAM(pProvider)));
+end;
+
+procedure Crypto_EnumProviders(var numProvs:int; var pResult:array of PCRYPTO_PROVIDER);
+begin
+ CallService(MS_CRYPTO_ENUM_PROVIDERS, WPARAM(numProvs), LPARAM(@pResult));
+end;
+
+function Crypto_GetProvider(pszName:PAnsiChar):PCRYPTO_PROVIDER;
+begin
+ result:=PCRYPTO_PROVIDER(CallService(MS_CRYPTO_GET_PROVIDER, 0, LPARAM(pszName)));
+end;
+
{$ENDIF}
diff --git a/include/delphi/m_history.inc b/include/delphi/m_history.inc
index b51d34ffeb..8900c12791 100644
--- a/include/delphi/m_history.inc
+++ b/include/delphi/m_history.inc
@@ -25,10 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affects: Show's the history dialog box for a contact, see notes
- Notes : MCONTACT can be NULL(0) to show system messages
+ Notes : TMCONTACT can be NULL(0) to show system messages
}
MS_HISTORY_SHOWCONTACTHISTORY:PAnsiChar = 'History/ShowContactHistory';
diff --git a/include/delphi/m_hotkeys.inc b/include/delphi/m_hotkeys.inc
index 61582dd4fe..c1042bfabd 100644
--- a/include/delphi/m_hotkeys.inc
+++ b/include/delphi/m_hotkeys.inc
@@ -26,7 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
HKD_UNICODE = $0001;
type
- HOTKEYDESC = record
+ PHOTKEYDESC = ^THOTKEYDESC;
+ THOTKEYDESC = record
cbSize :int;
pszName :PAnsiChar; // name to refer to hotkey when playing and in db
pszDescription:TChar; // description for options dialog
@@ -36,8 +37,6 @@ type
lParam :LPARAM; // lParam to pass to service
dwFlags :dword; // Miranda ver >=9.0
end;
- THOTKEYDESC = HOTKEYDESC;
- PHOTKEYDESC = ^THOTKEYDESC;
const
HKF_MIRANDA_LOCAL = $8000;
diff --git a/include/delphi/m_icolib.inc b/include/delphi/m_icolib.inc
index 91ad20bb55..cb033101d0 100644
--- a/include/delphi/m_icolib.inc
+++ b/include/delphi/m_icolib.inc
@@ -42,7 +42,7 @@ const
{
Remove a icon from options UI
- wParam = (THandle)icon handle
+ wParam = (THANDLE)icon handle
lParam = (PChar)icon name, one of them must be specified
WARNING: This will invalidate all HICONs retrieved for specified pszName
}
diff --git a/include/delphi/m_iconheader.inc b/include/delphi/m_iconheader.inc
index 1d99c41630..fbe75d7b05 100644
--- a/include/delphi/m_iconheader.inc
+++ b/include/delphi/m_iconheader.inc
@@ -44,31 +44,11 @@ const
ITCN_SELCHANGEDKBD = 2;
// structure is used for storing info about single tab
type
- MIcoTab = record
+ TMIcoTab = record
hIcon:HICON;
- szzName:TChar;
+ szName:TChar;
flag:dword;
data:LPARAM;
end;
-(*
-#define MIcoTab_SetBackground(hwnd, hBmp) \
- (SendMessage((hwnd), ITCM_SETBACKGROUND, 0, (LPARAM)(hBmp)))
-#define MIcoTab_SetSel(hwnd, idx) \
- (SendMessage((hwnd), ITCM_SETSEL, (idx), 0))
-#define MIcoTab_GetSel(hwnd) \
- (SendMessage((hwnd), ITCM_GETSEL, 0, 0))
-#define MIcoTab_GetItemData(hwnd, idx) \
- (SendMessage((hwnd), ITCM_GETITEMDATA, (idx), 0))
-
-static __forceinline void MIcoTab_AddItem(HWND hwnd, TCHAR *lptzName, HICON hIcon, LPARAM data, BOOL bSharedIcon)
-{
- MIcoTab mit = {0};
- mit.flag = (bSharedIcon?MITCF_SHAREDICON:0)|MITCF_TCHAR;
- mit.hIcon = hIcon;
- mit.tcsName = lptzName;
- mit.data = data;
- SendMessage(hwnd, ITCM_ADDITEM, (WPARAM)&mit, 0);
-}
-*)
{$ENDIF}
diff --git a/include/delphi/m_icq.inc b/include/delphi/m_icq.inc
index 322a342195..1076f9990a 100644
--- a/include/delphi/m_icq.inc
+++ b/include/delphi/m_icq.inc
@@ -46,8 +46,8 @@ type
PICQSEARCHRESULT = ^TICQSEARCHRESULT;
TICQSEARCHRESULT = record
hdr : TPROTOSEARCHRESULT;
- uin : DWORD;
- auth: BYTE;
+ uin : dword;
+ auth: byte;
{
// not presents in new version
uid :PAnsiChar;
@@ -176,7 +176,7 @@ an XML parser in the protocol module. Here's one I got:
missed message notification
db event added to contact's history
blob format is:
- WORD error code
+ word error code
}
ICQEVENTTYPE_MISSEDMESSAGE = 2004; //database event type
{
@@ -234,8 +234,8 @@ an XML parser in the protocol module. Here's one I got:
{
miranda/icqoscar/statusmsgreq event
called when our status message is requested
- wParam=(BYTE)msgType
- lParam=(DWORD)uin
+ wParam=(byte)msgType
+ lParam=(dword)uin
msgType is one of the ICQ_MSGTYPE_GET###MSG constants in icq_constants.h
uin is the UIN of the contact requesting our status message
}
diff --git a/include/delphi/m_ignore.inc b/include/delphi/m_ignore.inc
index 4c6cb1fc02..196a34a9b1 100644
--- a/include/delphi/m_ignore.inc
+++ b/include/delphi/m_ignore.inc
@@ -37,11 +37,11 @@ const
IGNOREEVENT_TYPINGNOTIFY = 7; // 0.7+
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : IGNOREEVENT_*
Affects: Determines if a message type to a contact should be ignored, see notes
Returns: 0 if the message type MUST be shown [non zero] if it MUST be ignored
- Notes : MCONTACT can be NULL(0) to see what to do with a contact
+ Notes : TMCONTACT can be NULL(0) to see what to do with a contact
that isn't on the list (or is unknown in some way)
don't use the IGNOREEVENT_ALL type!
Version: v0.1.0.1+
@@ -49,7 +49,7 @@ const
MS_IGNORE_ISIGNORED:PAnsiChar = 'Ignore/IsIgnored';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : IGNOREEVENT_* constant
Affects: Ignore future messages from a contact, see notes
Returns: 0 on success, [nonzero] on failure
@@ -61,11 +61,11 @@ const
MS_IGNORE_IGNORE:PAnsiChar = 'Ignore/Ignore';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : IGNOREEVENT_*
Affects: Receive future messages from a contact -- of the given type, see notes
Returns: 0 on success, non zero on failure
- Notes : Use NULL(0) for MCONTACT to retrieve the setting for an unknown contact
+ Notes : Use NULL(0) for TMCONTACT to retrieve the setting for an unknown contact
Version: v0.1.0.1+
}
MS_IGNORE_UNIGNORE:PAnsiChar = 'Ignore/Unignore';
diff --git a/include/delphi/m_imgsrvc.inc b/include/delphi/m_imgsrvc.inc
index 9a73b50359..374e39b869 100644
--- a/include/delphi/m_imgsrvc.inc
+++ b/include/delphi/m_imgsrvc.inc
@@ -65,7 +65,7 @@ type
}
(*
FIBITMAP *FreeImage_LoadFromMem(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags);
-BOOL FreeImage_SaveToMem(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
+bool FreeImage_SaveToMem(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
void SetMemIO(FreeImageIO *io);
unsigned __stdcall fiio_mem_ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
@@ -92,19 +92,19 @@ typedef struct _tagFI_interface {
FIBITMAP *(DLL_CALLCONV *FI_Load)(FREE_IMAGE_FORMAT fif, const AnsiChar *filename, int flags FI_DEFAULT(0));
FIBITMAP *(DLL_CALLCONV *FI_LoadU)(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
FIBITMAP *(DLL_CALLCONV *FI_LoadFromHandle)(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_Save)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const AnsiChar *filename, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveU)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveToHandle)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
+ bool (DLL_CALLCONV *FI_Save)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const AnsiChar *filename, int flags FI_DEFAULT(0));
+ bool (DLL_CALLCONV *FI_SaveU)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
+ bool (DLL_CALLCONV *FI_SaveToHandle)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
// Memory I/O stream routines -----------------------------------------------
- FIMEMORY *(DLL_CALLCONV *FI_OpenMemory)(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
+ FIMEMORY *(DLL_CALLCONV *FI_OpenMemory)(byte *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
void (DLL_CALLCONV *FI_CloseMemory)(FIMEMORY *stream);
FIBITMAP *(DLL_CALLCONV *FI_LoadFromMemory)(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveToMemory)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
+ bool (DLL_CALLCONV *FI_SaveToMemory)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
long (DLL_CALLCONV *FI_TellMemory)(FIMEMORY *stream);
- BOOL (DLL_CALLCONV *FI_SeekMemory)(FIMEMORY *stream, long offset, int origin);
- BOOL (DLL_CALLCONV *FI_AcquireMemory)(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
+ bool (DLL_CALLCONV *FI_SeekMemory)(FIMEMORY *stream, long offset, int origin);
+ bool (DLL_CALLCONV *FI_AcquireMemory)(FIMEMORY *stream, byte **data, DWORD *size_in_bytes);
unsigned (DLL_CALLCONV *FI_ReadMemory)(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
unsigned (DLL_CALLCONV *FI_WriteMemory)(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
FIMULTIBITMAP *(DLL_CALLCONV *FI_LoadMultiBitmapFromMemory)(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
@@ -114,7 +114,7 @@ typedef struct _tagFI_interface {
FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_RegisterLocalPlugin)(FI_InitProc proc_address, const AnsiChar *format FI_DEFAULT(0), const AnsiChar *description FI_DEFAULT(0), const AnsiChar *extension FI_DEFAULT(0), const AnsiChar *regexpr FI_DEFAULT(0));
FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_RegisterExternalPlugin)(const AnsiChar *path, const AnsiChar *format FI_DEFAULT(0), const AnsiChar *description FI_DEFAULT(0), const AnsiChar *extension FI_DEFAULT(0), const AnsiChar *regexpr FI_DEFAULT(0));
int (DLL_CALLCONV *FI_GetFIFCount)(void);
- int (DLL_CALLCONV *FI_SetPluginEnabled)(FREE_IMAGE_FORMAT fif, BOOL enable);
+ int (DLL_CALLCONV *FI_SetPluginEnabled)(FREE_IMAGE_FORMAT fif, bool enable);
int (DLL_CALLCONV *FI_IsPluginEnabled)(FREE_IMAGE_FORMAT fif);
FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFormat)(const AnsiChar *format);
FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromMime)(const AnsiChar *mime);
@@ -125,24 +125,24 @@ typedef struct _tagFI_interface {
const AnsiChar *(DLL_CALLCONV *FI_GetFIFMimeType)(FREE_IMAGE_FORMAT fif);
FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFilename)(const AnsiChar *filename);
FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFilenameU)(const wchar_t *filename);
- BOOL (DLL_CALLCONV *FI_FIFSupportsReading)(FREE_IMAGE_FORMAT fif);
- BOOL (DLL_CALLCONV *FI_FIFSupportsWriting)(FREE_IMAGE_FORMAT fif);
- BOOL (DLL_CALLCONV *FI_FIFSupportsExportBPP)(FREE_IMAGE_FORMAT fif, int bpp);
- BOOL (DLL_CALLCONV *FI_FIFSupportsExportType)(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
- BOOL (DLL_CALLCONV *FI_FIFSupportsICCProfiles)(FREE_IMAGE_FORMAT fif);
+ bool (DLL_CALLCONV *FI_FIFSupportsReading)(FREE_IMAGE_FORMAT fif);
+ bool (DLL_CALLCONV *FI_FIFSupportsWriting)(FREE_IMAGE_FORMAT fif);
+ bool (DLL_CALLCONV *FI_FIFSupportsExportBPP)(FREE_IMAGE_FORMAT fif, int bpp);
+ bool (DLL_CALLCONV *FI_FIFSupportsExportType)(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
+ bool (DLL_CALLCONV *FI_FIFSupportsICCProfiles)(FREE_IMAGE_FORMAT fif);
// Multipaging interface ----------------------------------------------------
- FIMULTIBITMAP *(DLL_CALLCONV *FI_OpenMultiBitmap)(FREE_IMAGE_FORMAT fif, const AnsiChar *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_CloseMultiBitmap)(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
+ FIMULTIBITMAP *(DLL_CALLCONV *FI_OpenMultiBitmap)(FREE_IMAGE_FORMAT fif, const AnsiChar *filename, bool create_new, bool read_only, bool keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
+ bool (DLL_CALLCONV *FI_CloseMultiBitmap)(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
int (DLL_CALLCONV *FI_GetPageCount)(FIMULTIBITMAP *bitmap);
void (DLL_CALLCONV *FI_AppendPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data);
void (DLL_CALLCONV *FI_InsertPage)(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
void (DLL_CALLCONV *FI_DeletePage)(FIMULTIBITMAP *bitmap, int page);
FIBITMAP *(DLL_CALLCONV *FI_LockPage)(FIMULTIBITMAP *bitmap, int page);
- void (DLL_CALLCONV *FI_UnlockPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
- BOOL (DLL_CALLCONV *FI_MovePage)(FIMULTIBITMAP *bitmap, int target, int source);
- BOOL (DLL_CALLCONV *FI_GetLockedPageNumbers)(FIMULTIBITMAP *bitmap, int *pages, int *count);
+ void (DLL_CALLCONV *FI_UnlockPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data, bool changed);
+ bool (DLL_CALLCONV *FI_MovePage)(FIMULTIBITMAP *bitmap, int target, int source);
+ bool (DLL_CALLCONV *FI_GetLockedPageNumbers)(FIMULTIBITMAP *bitmap, int *pages, int *count);
// Filetype request routines ------------------------------------------------
@@ -153,9 +153,9 @@ typedef struct _tagFI_interface {
// FreeImage helper routines ------------------------- MISSING !!!! TODO
- BOOL (DLL_CALLCONV *FI_IsLittleEndian)(void);
- BOOL (DLL_CALLCONV *FI_LookupX11Color)(const AnsiChar *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
- BOOL (DLL_CALLCONV *FI_LookupSVGColor)(const AnsiChar *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
+ bool (DLL_CALLCONV *FI_IsLittleEndian)(void);
+ bool (DLL_CALLCONV *FI_LookupX11Color)(const AnsiChar *szColor, byte *nRed, byte *nGreen, byte *nBlue);
+ bool (DLL_CALLCONV *FI_LookupSVGColor)(const AnsiChar *szColor, byte *nRed, byte *nGreen, byte *nBlue);
// Image type request routine -----------------------------------------------
@@ -163,13 +163,13 @@ typedef struct _tagFI_interface {
// Pixel access routines ----------------------------------------------------
- BYTE *(DLL_CALLCONV *FI_GetBits)(FIBITMAP *dib);
- BYTE *(DLL_CALLCONV *FI_GetScanLine)(FIBITMAP *dib, int scanline);
+ byte *(DLL_CALLCONV *FI_GetBits)(FIBITMAP *dib);
+ byte *(DLL_CALLCONV *FI_GetScanLine)(FIBITMAP *dib, int scanline);
- BOOL (DLL_CALLCONV *FI_GetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
- BOOL (DLL_CALLCONV *FI_GetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
- BOOL (DLL_CALLCONV *FI_SetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
- BOOL (DLL_CALLCONV *FI_SetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
+ bool (DLL_CALLCONV *FI_GetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, byte *value);
+ bool (DLL_CALLCONV *FI_GetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
+ bool (DLL_CALLCONV *FI_SetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, byte *value);
+ bool (DLL_CALLCONV *FI_SetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
// DIB info routines --------------------------------------------------------
@@ -196,14 +196,14 @@ typedef struct _tagFI_interface {
unsigned (DLL_CALLCONV *FI_GetBlueMask)(FIBITMAP *dib);
unsigned (DLL_CALLCONV *FI_GetTransparencyCount)(FIBITMAP *dib);
- BYTE *(DLL_CALLCONV *FI_GetTransparencyTable)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_SetTransparent)(FIBITMAP *dib, BOOL enabled);
- void (DLL_CALLCONV *FI_SetTransparencyTable)(FIBITMAP *dib, BYTE *table, int count);
- BOOL (DLL_CALLCONV *FI_IsTransparent)(FIBITMAP *dib);
+ byte *(DLL_CALLCONV *FI_GetTransparencyTable)(FIBITMAP *dib);
+ void (DLL_CALLCONV *FI_SetTransparent)(FIBITMAP *dib, bool enabled);
+ void (DLL_CALLCONV *FI_SetTransparencyTable)(FIBITMAP *dib, byte *table, int count);
+ bool (DLL_CALLCONV *FI_IsTransparent)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_HasBackgroundColor)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_GetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
- BOOL (DLL_CALLCONV *FI_SetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
+ bool (DLL_CALLCONV *FI_HasBackgroundColor)(FIBITMAP *dib);
+ bool (DLL_CALLCONV *FI_GetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
+ bool (DLL_CALLCONV *FI_SetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
// ICC profile routines ------------------------------- MISSING !!! TODO
@@ -226,14 +226,14 @@ typedef struct _tagFI_interface {
FIBITMAP *(DLL_CALLCONV *FI_ColorQuantizeEx)(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize /*FI_DEFAULT(FIQ_WUQUANT) */, int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
- FIBITMAP *(DLL_CALLCONV *FI_Threshold)(FIBITMAP *dib, BYTE T);
+ FIBITMAP *(DLL_CALLCONV *FI_Threshold)(FIBITMAP *dib, byte T);
FIBITMAP *(DLL_CALLCONV *FI_Dither)(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertFromRawBits)(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
- void (DLL_CALLCONV *FI_ConvertToRawBits)(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
+ FIBITMAP *(DLL_CALLCONV *FI_ConvertFromRawBits)(byte *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, bool topdown FI_DEFAULT(FALSE));
+ void (DLL_CALLCONV *FI_ConvertToRawBits)(byte *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, bool topdown FI_DEFAULT(FALSE));
FIBITMAP *(DLL_CALLCONV *FI_ConvertToRGBF)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToStandardType)(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToType)(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
+ FIBITMAP *(DLL_CALLCONV *FI_ConvertToStandardType)(FIBITMAP *src, bool scale_linear FI_DEFAULT(TRUE));
+ FIBITMAP *(DLL_CALLCONV *FI_ConvertToType)(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, bool scale_linear FI_DEFAULT(TRUE));
// tone mapping operators
FIBITMAP *(DLL_CALLCONV *FI_ToneMapping)(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0));
@@ -242,11 +242,11 @@ typedef struct _tagFI_interface {
// ZLib interface -----------------------------------------------------------
- DWORD (DLL_CALLCONV *FI_ZLibCompress)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibUncompress)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibGZip)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibGUnzip)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibCRC32)(DWORD crc, BYTE *source, DWORD source_size);
+ DWORD (DLL_CALLCONV *FI_ZLibCompress)(byte *target, DWORD target_size, byte *source, DWORD source_size);
+ DWORD (DLL_CALLCONV *FI_ZLibUncompress)(byte *target, DWORD target_size, byte *source, DWORD source_size);
+ DWORD (DLL_CALLCONV *FI_ZLibGZip)(byte *target, DWORD target_size, byte *source, DWORD source_size);
+ DWORD (DLL_CALLCONV *FI_ZLibGUnzip)(byte *target, DWORD target_size, byte *source, DWORD source_size);
+ DWORD (DLL_CALLCONV *FI_ZLibCRC32)(DWORD crc, byte *source, DWORD source_size);
// --------------------------------------------------------------------------
@@ -261,28 +261,28 @@ typedef struct _tagFI_interface {
// tag getters and setters
const AnsiChar *(DLL_CALLCONV *FI_GetTagKey)(FITAG *tag);
const AnsiChar *(DLL_CALLCONV *FI_GetTagDescription)(FITAG *tag);
- WORD (DLL_CALLCONV *FI_GetTagID)(FITAG *tag);
+ word (DLL_CALLCONV *FI_GetTagID)(FITAG *tag);
FREE_IMAGE_MDTYPE (DLL_CALLCONV *FI_GetTagType)(FITAG *tag);
DWORD (DLL_CALLCONV *FI_GetTagCount)(FITAG *tag);
DWORD (DLL_CALLCONV *FI_GetTagLength)(FITAG *tag);
const void *(DLL_CALLCONV *FI_GetTagValue)(FITAG *tag);
- BOOL (DLL_CALLCONV *FI_SetTagKey)(FITAG *tag, const AnsiChar *key);
- BOOL (DLL_CALLCONV *FI_SetTagDescription)(FITAG *tag, const AnsiChar *description);
- BOOL (DLL_CALLCONV *FI_SetTagID)(FITAG *tag, WORD id);
- BOOL (DLL_CALLCONV *FI_SetTagType)(FITAG *tag, FREE_IMAGE_MDTYPE type);
- BOOL (DLL_CALLCONV *FI_SetTagCount)(FITAG *tag, DWORD count);
- BOOL (DLL_CALLCONV *FI_SetTagLength)(FITAG *tag, DWORD length);
- BOOL (DLL_CALLCONV *FI_SetTagValue)(FITAG *tag, const void *value);
+ bool (DLL_CALLCONV *FI_SetTagKey)(FITAG *tag, const AnsiChar *key);
+ bool (DLL_CALLCONV *FI_SetTagDescription)(FITAG *tag, const AnsiChar *description);
+ bool (DLL_CALLCONV *FI_SetTagID)(FITAG *tag, word id);
+ bool (DLL_CALLCONV *FI_SetTagType)(FITAG *tag, FREE_IMAGE_MDTYPE type);
+ bool (DLL_CALLCONV *FI_SetTagCount)(FITAG *tag, DWORD count);
+ bool (DLL_CALLCONV *FI_SetTagLength)(FITAG *tag, DWORD length);
+ bool (DLL_CALLCONV *FI_SetTagValue)(FITAG *tag, const void *value);
// iterator
FIMETADATA *(DLL_CALLCONV *FI_FindFirstMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
- BOOL (DLL_CALLCONV *FI_FindNextMetadata)(FIMETADATA *mdhandle, FITAG **tag);
+ bool (DLL_CALLCONV *FI_FindNextMetadata)(FIMETADATA *mdhandle, FITAG **tag);
void (DLL_CALLCONV *FI_FindCloseMetadata)(FIMETADATA *mdhandle);
// metadata setter and getter
- BOOL (DLL_CALLCONV *FI_SetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const AnsiChar *key, FITAG *tag);
- BOOL (DLL_CALLCONV *FI_GetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const AnsiChar *key, FITAG **tag);
+ bool (DLL_CALLCONV *FI_SetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const AnsiChar *key, FITAG *tag);
+ bool (DLL_CALLCONV *FI_GetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const AnsiChar *key, FITAG **tag);
// helpers
unsigned (DLL_CALLCONV *FI_GetMetadataCount)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
@@ -297,50 +297,50 @@ typedef struct _tagFI_interface {
// rotation and flipping
FIBITMAP *(DLL_CALLCONV *FI_RotateClassic)(FIBITMAP *dib, double angle);
- FIBITMAP *(DLL_CALLCONV *FI_RotateEx)(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask);
- BOOL (DLL_CALLCONV *FI_FlipHorizontal)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_FlipVertical)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_JPEGTransform)(const AnsiChar *src_file, const AnsiChar *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
+ FIBITMAP *(DLL_CALLCONV *FI_RotateEx)(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, bool use_mask);
+ bool (DLL_CALLCONV *FI_FlipHorizontal)(FIBITMAP *dib);
+ bool (DLL_CALLCONV *FI_FlipVertical)(FIBITMAP *dib);
+ bool (DLL_CALLCONV *FI_JPEGTransform)(const AnsiChar *src_file, const AnsiChar *dst_file, FREE_IMAGE_JPEG_OPERATION operation, bool perfect FI_DEFAULT(FALSE));
// upsampling / downsampling
FIBITMAP *(DLL_CALLCONV *FI_Rescale)(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter);
- FIBITMAP *(DLL_CALLCONV *FI_MakeThumbnail)(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
+ FIBITMAP *(DLL_CALLCONV *FI_MakeThumbnail)(FIBITMAP *dib, int max_pixel_size, bool convert FI_DEFAULT(TRUE));
// color manipulation routines (point operations)
- BOOL (DLL_CALLCONV *FI_AdjustCurve)(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_AdjustGamma)(FIBITMAP *dib, double gamma);
- BOOL (DLL_CALLCONV *FI_AdjustBrightness)(FIBITMAP *dib, double percentage);
- BOOL (DLL_CALLCONV *FI_AdjustContrast)(FIBITMAP *dib, double percentage);
- BOOL (DLL_CALLCONV *FI_Invert)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_GetHistogram)(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel);
+ bool (DLL_CALLCONV *FI_AdjustCurve)(FIBITMAP *dib, byte *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
+ bool (DLL_CALLCONV *FI_AdjustGamma)(FIBITMAP *dib, double gamma);
+ bool (DLL_CALLCONV *FI_AdjustBrightness)(FIBITMAP *dib, double percentage);
+ bool (DLL_CALLCONV *FI_AdjustContrast)(FIBITMAP *dib, double percentage);
+ bool (DLL_CALLCONV *FI_Invert)(FIBITMAP *dib);
+ bool (DLL_CALLCONV *FI_GetHistogram)(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel);
// channel processing routines
FIBITMAP *(DLL_CALLCONV *FI_GetChannel)(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_SetChannel)(FIBITMAP *dib, FIBITMAP *dib8, FREE_IMAGE_COLOR_CHANNEL channel);
+ bool (DLL_CALLCONV *FI_SetChannel)(FIBITMAP *dib, FIBITMAP *dib8, FREE_IMAGE_COLOR_CHANNEL channel);
FIBITMAP *(DLL_CALLCONV *FI_GetComplexChannel)(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_SetComplexChannel)(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
+ bool (DLL_CALLCONV *FI_SetComplexChannel)(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
// copy / paste / composite routines
FIBITMAP *(DLL_CALLCONV *FI_Copy)(FIBITMAP *dib, int left, int top, int right, int bottom);
- BOOL (DLL_CALLCONV *FI_Paste)(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
- FIBITMAP *(DLL_CALLCONV *FI_Composite)(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
- BOOL (DLL_CALLCONV *FI_JPEGCrop)(const AnsiChar *src_file, const AnsiChar *dst_file, int left, int top, int right, int bottom);
+ bool (DLL_CALLCONV *FI_Paste)(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
+ FIBITMAP *(DLL_CALLCONV *FI_Composite)(FIBITMAP *fg, bool useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
+ bool (DLL_CALLCONV *FI_JPEGCrop)(const AnsiChar *src_file, const AnsiChar *dst_file, int left, int top, int right, int bottom);
// own functions
// memory I/O
FIBITMAP *(*FI_LoadFromMem)(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags);
- BOOL (*FI_SaveToMem)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
+ bool (*FI_SaveToMem)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
// helpers
FIBITMAP *(*FI_CreateDIBFromHBITMAP)(HBITMAP hBmp);
HBITMAP (*FI_CreateHBITMAPFromDIB)(FIBITMAP *dib);
- BOOL (*FI_Premultiply)(HBITMAP hBmp); // premultiplies alpha channel for usage with AlphaBlend()
+ bool (*FI_Premultiply)(HBITMAP hBmp); // premultiplies alpha channel for usage with AlphaBlend()
// original HBITMAP stays valid and must be 32bit RGBA
int (*FI_BmpFilterResizeBitmap)(WPARAM wParam,LPARAM lParam); // more generic resizer for avatar images
- void (*FI_CorrectBitmap32Alpha)(HBITMAP hBitmap, BOOL force); // corrects broken images (when all alpha values are 0)
+ void (*FI_CorrectBitmap32Alpha)(HBITMAP hBitmap, bool force); // corrects broken images (when all alpha values are 0)
- FIMULTIBITMAP *(DLL_CALLCONV *FI_OpenMultiBitmapU)(FREE_IMAGE_FORMAT fif, const wchar_t *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
+ FIMULTIBITMAP *(DLL_CALLCONV *FI_OpenMultiBitmapU)(FREE_IMAGE_FORMAT fif, const wchar_t *filename, bool create_new, bool read_only, bool keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
void* reserved[49]; // future usage
} FI_INTERFACE;
@@ -404,7 +404,7 @@ const
type
//!!
-// FREE_IMAGE_FORMAT = type Integer;
+// FREE_IMAGE_FORMAT = type integer;
{(
FIF_UNKNOWN = -1,
FIF_BMP = 0,
@@ -471,7 +471,7 @@ type
//!!
{
FIBITMAP = record
- data : Pointer;
+ data : pointer;
end;
PFIBITMAP = ^FIBITMAP;
}
diff --git a/include/delphi/m_json.inc b/include/delphi/m_json.inc
index bdb48bac9f..3c6eb770c6 100644
--- a/include/delphi/m_json.inc
+++ b/include/delphi/m_json.inc
@@ -24,33 +24,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
{$DEFINE MIM_LIBJSON}
type
- PJSONNODE = ^JSONNODE;
- JSONNODE = pointer;
+ PJSONNODE = ^TJSONNODE;
+ TJSONNODE = pointer;
procedure json_free(str:pointer); stdcall;
external CoreDLL name 'json_free';
procedure json_delete(node:PJSONNODE); stdcall;
external CoreDLL name 'json_delete';
-function json_parse(json:pAnsiChar):PJSONNODE; stdcall;
+function json_parse(json:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_parse';
-function json_strip_white_space(json:pAnsiChar):pWideChar; stdcall;
+function json_strip_white_space(json:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'json_strip_white_space';
-function json_validate(json:pAnsiChar):PJSONNODE; stdcall;
+function json_validate(json:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_validate';
{
- stuff that's in class JSONNode
+ stuff that's in class TJSONNode
}
//ctors
-function json_new_a(name:pAnsiChar; value:pAnsiChar):PJSONNODE; stdcall;
+function json_new_a(name:PAnsiChar; value:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_new_a';
-function json_new_i(name:pAnsiChar; value:long):PJSONNODE; stdcall;
+function json_new_i(name:PAnsiChar; value:long):PJSONNODE; stdcall;
external CoreDLL name 'json_new_i';
-function json_new_f(name:pAnsiChar; value:double):PJSONNODE; stdcall;
+function json_new_f(name:PAnsiChar; value:double):PJSONNODE; stdcall;
external CoreDLL name 'json_new_f';
-function json_new_b(name:pAnsiChar; value:int):PJSONNODE; stdcall;
+function json_new_b(name:PAnsiChar; value:int):PJSONNODE; stdcall;
external CoreDLL name 'json_new_b';
function json_new(typ:AnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_new';
@@ -60,7 +60,7 @@ function json_duplicate(const orig:PJSONNODE):PJSONNODE; stdcall;
external CoreDLL name 'json_duplicate';
//assignment
-procedure json_set_a(node:PJSONNODE; value:pAnsiChar); stdcall;
+procedure json_set_a(node:PJSONNODE; value:PAnsiChar); stdcall;
external CoreDLL name 'json_set_a';
procedure json_set_i(node:PJSONNODE; value:long); stdcall;
external CoreDLL name 'json_set_i';
@@ -78,13 +78,13 @@ function json_size(const node:PJSONNODE):size_t; stdcall;
external CoreDLL name 'json_size';
function json_empty(const node:PJSONNODE):int; stdcall;
external CoreDLL name 'json_empty';
-function json_name(const node:PJSONNODE):pAnsiChar; stdcall;
+function json_name(const node:PJSONNODE):PAnsiChar; stdcall;
external CoreDLL name 'json_name';
-function json_get_comment(const node:PJSONNODE):pAnsiChar; stdcall;
+function json_get_comment(const node:PJSONNODE):PAnsiChar; stdcall;
external CoreDLL name 'json_get_comment';
-function json_as_string(const node:PJSONNODE):pWideChar; stdcall;
+function json_as_string(const node:PJSONNODE):PWideChar; stdcall;
external CoreDLL name 'json_as_string';
function json_as_int(const node:PJSONNODE):long; stdcall;
external CoreDLL name 'json_as_int';
@@ -97,16 +97,16 @@ function json_as_node(const node:PJSONNODE):PJSONNODE; stdcall;
function json_as_array(const node:PJSONNODE):PJSONNODE; stdcall;
external CoreDLL name 'json_as_array';
-function json_write(const node:PJSONNODE):pWideChar; stdcall;
+function json_write(const node:PJSONNODE):PWideChar; stdcall;
external CoreDLL name 'json_write';
-function json_write_formatted(const node:PJSONNODE):pWideChar; stdcall;
+function json_write_formatted(const node:PJSONNODE):PWideChar; stdcall;
external CoreDLL name 'json_write_formatted';
//modifiers
-procedure json_set_name(node:PJSONNODE; name:pAnsiChar); stdcall;
+procedure json_set_name(node:PJSONNODE; name:PAnsiChar); stdcall;
external CoreDLL name 'json_set_name';
-procedure json_set_comment(node:PJSONNODE; comment:pAnsiChar); stdcall;
+procedure json_set_comment(node:PJSONNODE; comment:PAnsiChar); stdcall;
external CoreDLL name 'json_set_comment';
procedure json_clear(node:PJSONNODE); stdcall;
@@ -132,19 +132,19 @@ procedure json_reserve(node:PJSONNODE; siz:size_t); stdcall;
external CoreDLL name 'json_reserve';
function json_at(node:PJSONNODE; pos:size_t):PJSONNODE; stdcall;
external CoreDLL name 'json_at';
-function json_get(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+function json_get(node:PJSONNODE; name:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_get';
-function json_get_nocase(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+function json_get_nocase(node:PJSONNODE; name:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_get_nocase';
-function json_pop_back_nocase(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+function json_pop_back_nocase(node:PJSONNODE; name:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_pop_back_nocase';
procedure json_push_back(node:PJSONNODE; node2:PJSONNODE); stdcall;
external CoreDLL name 'json_push_back';
function json_pop_back_at(node:PJSONNODE; pos:size_t):PJSONNODE; stdcall;
external CoreDLL name 'json_pop_back_at';
-function json_pop_back(node:PJSONNODE; name:pAnsiChar):PJSONNODE; stdcall;
+function json_pop_back(node:PJSONNODE; name:PAnsiChar):PJSONNODE; stdcall;
external CoreDLL name 'json_pop_back';
//comparsion
diff --git a/include/delphi/m_langpack.inc b/include/delphi/m_langpack.inc
index 4aacf9ecea..79a828a088 100644
--- a/include/delphi/m_langpack.inc
+++ b/include/delphi/m_langpack.inc
@@ -50,7 +50,7 @@ type
PLANGPACKTRANSLATEDIALOG = ^TLANGPACKTRANSLATEDIALOG;
TLANGPACKTRANSLATEDIALOG = record
cbSize :int;
- flags :DWORD;
+ flags :dword;
hwndDlg :HWND;
ignoreControls:^IntArray; // zero-terminated list of control IDs *not* to translate
end;
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index a4e1bdb66f..95f0959b40 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -57,7 +57,7 @@ type
PMessageWindowEventData = ^TMessageWindowEventData;
TMessageWindowEventData = record
cbSize : int;
- hContact : MCONTACT;
+ hContact : TMCONTACT;
hwndWindow: HWND; // top level window for the contact
szModule : PAnsiChar; // used to get plugin type (which means you could use
// local if needed)
@@ -87,7 +87,7 @@ type
PMessageWindowInputData = ^TMessageWindowInputData;
TMessageWindowInputData = record
cbSize : int;
- hContact: MCONTACT;
+ hContact: TMCONTACT;
uFlags : int; // see uflags above
end;
@@ -102,7 +102,7 @@ type
PMessageWindowOutputData = ^TMessageWindowOutputData;
TMessageWindowOutputData = record
cbSize : int;
- hContact : MCONTACT;
+ hContact : TMCONTACT;
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
@@ -121,17 +121,17 @@ const
MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
{ wparam=(THANDLE)hContact
- lparam=(pWideChar)ptszMessageText
+ lparam=(PWideChar)ptszMessageText
Sets a status line text for the appropriate contact
}
MS_MSG_SETSTATUSTEXT:PAnsiChar = 'MessageAPI/SetStatusText';
type
- pMessageWindowEvent = ^MessageWindowEvent;
- MessageWindowEvent = record
+ pMessageWindowEvent = ^tMessageWindowEvent;
+ tMessageWindowEvent = record
cbSize :int;
seq :int; // number returned by PSS_MESSAGE
- hContact :MCONTACT;
+ hContact :TMCONTACT;
dbei :PDBEVENTINFO; // database event written on the basis of message sent
end;
@@ -157,11 +157,11 @@ const
MSG_WINDOWPOPUP_LOG = 2;
type
- MessageWindowPopupData = record
+ tMessageWindowPopupData = record
cbSize :int;
uType :uint; // see popup types above
uFlags :uint; // used to indicate in which window the popup was requested
- hContact :MCONTACT;
+ hContact :TMCONTACT;
hwnd :HWND; // window where the popup was requested
hMenu :HMENU; // The handle to the menu
pt :TPOINT; // The point, in screen coords
@@ -179,7 +179,7 @@ type
tStatusIconData = record
cbSize :int; // must be equal to sizeof(StatusIconData)
szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
- dwId :DWORD; // uniquely defines a button inside a module
+ 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
@@ -196,7 +196,7 @@ type
cbSize :int;
clickLocation:TPOINT; // click location, in screen coordinates
szModule :PAnsiChar;
- dwId :DWORD;
+ dwId :dword;
flags :int; // one of MBCF_* above
end;
diff --git a/include/delphi/m_metacontacts.inc b/include/delphi/m_metacontacts.inc
index 19d46d518a..4a82b0f129 100644
--- a/include/delphi/m_metacontacts.inc
+++ b/include/delphi/m_metacontacts.inc
@@ -1,19 +1,19 @@
{
- Miranda IM: the free IM client for Microsoft Windows
-
+ 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.
@@ -22,6 +22,10 @@
{$DEFINE M_METACONTACTS}
const
+// standard module for all mc-related information
+ META_PROTO = 'MetaContacts';
+
+const
{ gets the handle for the default contact
wParam=(HANDLE)hMetaContact
lParam=0
@@ -31,7 +35,7 @@ const
{ gets the contact number for the default contact
wParam=(HANDLE)hMetaContact
lParam=0
- returns a DWORD contact number, or -1 on failure }
+ returns a dword contact number, or -1 on failure }
MS_MC_GETDEFAULTCONTACTNUM = 'MetaContacts/GetDefaultNum';
{ gets the handle for the 'most online' contact
@@ -43,18 +47,18 @@ const
{ 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 }
+ returns a dword representing the number of subcontacts for the given metacontact }
MS_MC_GETNUMCONTACTS = 'MetaContacts/GetNumContacts';
{ gets the handle of a subcontact, using the subcontact's number
wParam=(HANDLE)hMetaContact
- lParam=(DWORD)contact number
+ lParam=(dword)contact number
returns a handle to the specified subcontact }
MS_MC_GETSUBCONTACT = 'MetaContacts/GetSubContact';
{ sets the default contact, using the subcontact's contact number
wParam=(HANDLE)hMetaContact
- lParam=(DWORD)contact number
+ lParam=(dword)contact number
returns 0 on success }
MS_MC_SETDEFAULTCONTACTNUM = 'MetaContacts/SetDefault';
@@ -66,7 +70,7 @@ const
{ forces the metacontact to send using a specific subcontact, using the subcontact's contact number
wParam=(HANDLE)hMetaContact
- lParam=(DWORD)contact number
+ lParam=(dword)contact number
returns 0 on success }
MS_MC_FORCESENDCONTACTNUM = 'MetaContacts/ForceSendContact';
@@ -92,9 +96,9 @@ const
{ method to get state of 'force' for a metacontact
wParam=(HANDLE)hMetaContact
- lParam= (DWORD)&contact_number or NULL
+ 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
+ or if none is in force, the value INVALID_CONTACT_ID 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) }
MS_MC_GETFORCESTATE = 'MetaContacts/GetForceState';
@@ -138,22 +142,23 @@ const
}
MS_MC_REMOVEFROMMETA = 'MetaContacts/RemoveFromMetacontact';
-const
- META_PROTO = 'MetaContacts';
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// binary interface to MC
{ returns true if a contact is a metacontact or false otherwise
}
-function db_mc_isMeta(hContact:MCONTACT):Integer; stdcall;
+function db_mc_isMeta(hContact:TMCONTACT):int; stdcall;
external CoreDLL name 'db_mc_isMeta';
{ returns true if a contact is a subcontact or false otherwise
}
-function db_mc_isSub(hContact:MCONTACT):Integer; stdcall;
+function db_mc_isSub(hContact:TMCONTACT):int; stdcall;
external CoreDLL name 'db_mc_isSub';
{ returns a meta contact for a subcontact or 0 otherwise
}
-function db_mc_getMeta(hContact:MCONTACT):MCONTACT; stdcall;
+function db_mc_getMeta(hContact:TMCONTACT):TMCONTACT; stdcall;
external CoreDLL name 'db_mc_getMeta';
{$ENDIF}
diff --git a/include/delphi/m_msg_buttonsbar.inc b/include/delphi/m_msg_buttonsbar.inc
index 45abb43564..ee97f3d3ce 100644
--- a/include/delphi/m_msg_buttonsbar.inc
+++ b/include/delphi/m_msg_buttonsbar.inc
@@ -78,10 +78,10 @@ type
cbSize :int;
pt :TPOINT; // screen coordinates for menus
pszModule :PAnsiChar; // button owners name
- dwButtonId:DWORD; // registered button ID
+ dwButtonId:dword; // registered button ID
hwndFrom :HWND; // button parents HWND
- hContact :MCONTACT;
- flags :DWORD; // BBCF_ flags
+ hContact :TMCONTACT;
+ flags :dword; // BBCF_ flags
end;
const
@@ -102,16 +102,16 @@ const
type
tagBBButton = record
cbSize :int; // size of structure
- dwButtonID :DWORD; // your button ID, will be combined with pszModuleName for storing settings, etc...
+ dwButtonID :dword; // your button ID, will be combined with pszModuleName for storing settings, etc...
pszModuleName:PAnsiChar; // module name without spaces and underline symbols (e.g. "tabsrmm")
szTooltip :TChar; // button's tooltip
- dwDefPos :DWORD; // default order pos of button, counted from window edge (left or right)
+ dwDefPos :dword; // default order pos of button, counted from window edge (left or right)
// use value >100, because internal buttons using 10,20,30... 80, etc
iButtonWidth :int; // must be 0
- bbbFlags :DWORD; // combine of BBBF_ flags above
+ bbbFlags :dword; // combine of BBBF_ flags above
hIcon :HICON; // Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
-end;
- BBButton = tagBBButton;
+ end;
+ tBBButton = tagBBButton;
{$ENDIF}
diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc
index 81f6464a00..757e41558d 100644
--- a/include/delphi/m_netlib.inc
+++ b/include/delphi/m_netlib.inc
@@ -138,8 +138,8 @@ type
TNETLIBOPENCONNECTION = record
cbSize : int;
szHost : PAnsiChar; // can be an IP in string form
- wPort : Word;
- flags : DWORD; // see NLOCF_* flags
+ wPort : word;
+ flags : dword; // see NLOCF_* flags
timeout: uint;
// optional, called in the context of the thread that issued the attempt,
// if it returns 0 the connection attempt is stopped, the remaining
@@ -168,7 +168,7 @@ type
TNETLIBHTTPREQUEST = record
cbSize :int;
requestType :int; // REQUEST_* constant
- flags :DWORD;
+ flags :dword;
szUrl :PAnsiChar;
{ doesn't contain Content-Length, it'll be added automatically }
headers :^ANETLIBHTTPHEADER; // pointer to an array of em?
@@ -191,10 +191,10 @@ const
type
{ This function pointer is to the CRT realloc() used by Miranda -- it allows reallocation of memory passed
to us (not that we could EVER share the same CRT) but to allow DLLs in general to reallocate memory }
- TNetlibRealloc = function(Mem: Pointer; size_t: int): Pointer; cdecl;
- TNetlibHTTPGatewayInitProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl;
- TNetlibHTTPGatewayBeginProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION): int; cdecl;
- TNetlibHTTPGatewayWrapSendProc = function(hConn: THandle; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl;
+ TNetlibRealloc = function(Mem: pointer; size_t: int): pointer; cdecl;
+ TNetlibHTTPGatewayInitProc = function(hConn: THANDLE; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl;
+ TNetlibHTTPGatewayBeginProc = function(hConn: THANDLE; nloc: PNETLIBOPENCONNECTION): int; cdecl;
+ TNetlibHTTPGatewayWrapSendProc = function(hConn: THANDLE; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl;
TNetlibHTTPGatewayUnwrapRecvProc = function(nlhr: PNETLIBHTTPREQUEST; buf: PByte; len: int; outBufLen: pInt; NetlibRealloc: TNetlibRealloc): PByte; cdecl;
PNETLIBUSER = ^TNETLIBUSER;
@@ -202,7 +202,7 @@ type
cbSize: int;
szSettingsModule: PAnsiChar; // used for DB settings and log, 'NL' stuff
szDescriptiveName: TChar; // shows a descriptive name for which different proxy settings can be defined
- flags: DWORD; // see NUF_* constants above
+ flags: dword; // see NUF_* constants above
szHttpGatewayHello :PAnsiChar;
szHttpGatewayUserAgent:PAnsiChar; // can be NULL(0) to send no User-Agent: also used by HTTPS proxies
pfnHttpGatewayInit :TNetlibHTTPGatewayInitProc;
@@ -232,8 +232,8 @@ type
validateSSL :int;
end;
- TNetlibNewConnectionProc = procedure(hNewConnection:THandle; dwRemoveIP:DWORD); cdecl;
- TNetlibNewConnectionProc_V2 = procedure(hNewConnection:THandle; dwRemoveIP:DWORD; pExtra:pointer); cdecl;
+ TNetlibNewConnectionProc = procedure(hNewConnection:THANDLE; dwRemoveIP:dword); cdecl;
+ TNetlibNewConnectionProc_V2 = procedure(hNewConnection:THANDLE; dwRemoveIP:dword; pExtra:pointer); cdecl;
PNETLIBBIND = ^TNETLIBBIND;
TNETLIBBIND = record
@@ -243,27 +243,18 @@ type
// or pfnNewConnectionV2:NETLIBNEWCONNECTIONPROC_V2;
//function to call when there's a new connection. Params are: the
//new connection, IP of remote machine (host byte order)
- dwInternalIP:DWORD; //set on return, host byte order
- wPort :WORD; //set on return, host byte order
+ dwInternalIP:dword; //set on return, host byte order
+ wPort :word; //set on return, host byte order
pExtra :^pointer; //argument is sent to callback, added during 0.3.4+
- dwExternalIP:DWORD; //set on return, host byte order
+ dwExternalIP:dword; //set on return, host byte order
wExPort :word; //set on return, host byte order
end;
-const
- {$IFNDEF WIN64}
- NETLIBBIND_SIZEOF_V1 = 16; // sizeof(NETLIBBIND) prior to 0.3.4+ (2004/08/05)
- NETLIBBIND_SIZEOF_V2 = 20; // sizeof(NETLIBBIND) prior to 0.6+ (2006/07/03)
- {$ELSE}
- NETLIBBIND_SIZEOF_V1 = SizeOF(TNETLIBBIND);
- NETLIBBIND_SIZEOF_V2 = SizeOF(TNETLIBBIND);
- {$ENDIF}
-
type
PNETLIBHTTPPROXYINFO = ^TNETLIBHTTPPROXYINFO;
TNETLIBHTTPPROXYINFO = record
cbSize : int;
- flags : DWORD; // see NLHPIF_* above
+ flags : dword; // see NLHPIF_* above
szHttpPostUrl : PAnsiChar;
szHttpGetUrl : PAnsiChar;
firstGetSequence : int;
@@ -282,29 +273,29 @@ type
PNETLIBSELECT = ^TNETLIBSELECT;
TNETLIBSELECT = record
cbSize : int;
- dwTimeout : DWORD; // in milliseconds, INFINITE is acceptable
- hReadConns : array [0..FD_SETSIZE] of THandle;
- hWriteConns : array [0..FD_SETSIZE] of THandle;
- hExceptConns: array [0..FD_SETSIZE] of THandle;
+ dwTimeout : dword; // in milliseconds, INFINITE is acceptable
+ hReadConns : array [0..FD_SETSIZE] of THANDLE;
+ hWriteConns : array [0..FD_SETSIZE] of THANDLE;
+ hExceptConns: array [0..FD_SETSIZE] of THANDLE;
end;
PNETLIBSELECTEX = ^TNETLIBSELECTEX;
TNETLIBSELECTEX = record
cbSize : int;
- dwTimeout : DWORD; // in milliseconds, INFINITE is acceptable
- hReadConns : array [0..FD_SETSIZE] of THandle;
- hWriteConns : array [0..FD_SETSIZE] of THandle;
- hExceptConns: array [0..FD_SETSIZE] of THandle;
+ dwTimeout : dword; // in milliseconds, INFINITE is acceptable
+ hReadConns : array [0..FD_SETSIZE] of THANDLE;
+ hWriteConns : array [0..FD_SETSIZE] of THANDLE;
+ hExceptConns: array [0..FD_SETSIZE] of THANDLE;
// Added in v0.3.3+
- hReadStatus : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
- hWriteStatus : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
- hExceptStatus: array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
+ hReadStatus : array [0..FD_SETSIZE] of bool; // out, [in, expected to be FALSE]
+ hWriteStatus : array [0..FD_SETSIZE] of bool; // out, [in, expected to be FALSE]
+ hExceptStatus: array [0..FD_SETSIZE] of bool; // out, [in, expected to be FALSE]
end;
PNETLIBPACKETRECVER = ^TNETLIBPACKETRECVER;
TNETLIBPACKETRECVER = record
cbSize : int;
- dwTimeout : DWORD; // infinite is allowed -- initialise before use
+ dwTimeout : dword; // infinite is allowed -- initialise before use
bytesUsed : int; // this many bytes are removed from the start of the
// buffer, set to 0 on return -- initialise before use
bytesAvailable: int; // equal the returnd value by service, unless the
@@ -499,10 +490,10 @@ const
type
TNETLIBCONNINFO = record
- cbSize:int;
+ cbSize :int;
szIpPort:array [0..63] of AnsiChar;
- dwIpv4:uint;
- wPort:word;
+ dwIpv4 :uint;
+ wPort :word;
end;
const
@@ -519,7 +510,7 @@ const
type
TNETLIBIPLIST = record
cbNum:uint;
- szIp:array[0..0,0..63] of AnsiChar;
+ szIp :array[0..0,0..63] of AnsiChar;
end;
const
@@ -767,7 +758,7 @@ const
MS_NETLIB_STARTSSL:PAnsiChar = 'Netlib/StartSsl';
type
- NETLIBSSL = record
+ TNETLIBSSL = record
cbSize:int;
host :PAnsiChar; // Expected host name
flags :int; // Reserved
@@ -784,7 +775,7 @@ type
MS_NETLIB_INITSECURITYPROVIDER:PAnsiChar = 'Netlib/InitSecurityProvider';
type
- NETLIBNTLMINIT2 = record
+ TNETLIBNTLMINIT2 = record
cbSize :size_t;
szProviderName:TChar;
szPrincipal :TChar;
@@ -802,7 +793,7 @@ const
MS_NETLIB_NTLMCREATERESPONSE:PAnsiChar = 'Netlib/NtlmCreateResponse';
type
- NETLIBNTLMREQUEST = record
+ TNETLIBNTLMREQUEST = record
szChallenge:PAnsiChar;
userName :PAnsiChar;
password :PAnsiChar;
@@ -810,7 +801,7 @@ type
end;
type
- NETLIBNTLMREQUEST2 = record
+ TNETLIBNTLMREQUEST2 = record
cbSize :size_t;
szChallenge:PAnsiChar;
szUserName :TChar;
@@ -834,11 +825,10 @@ const
// lParam: NETLIBUSER* - points to the protocol definition
type
- NETLIBNOTIFY = record
+ TNETLIBNOTIFY = record
nlb :PNETLIBBUFFER; // pointer to the request buffer
result:int; // amount of bytes really sent/received
end;
- TNETLIBNOTIFY = NETLIBNOTIFY;
const
ME_NETLIB_FASTRECV :PAnsiChar = 'Netlib/OnRecv'; // being called on every receive
diff --git a/include/delphi/m_pluginupdater.inc b/include/delphi/m_pluginupdater.inc
index c19e1c1ac7..0a979a575f 100644
--- a/include/delphi/m_pluginupdater.inc
+++ b/include/delphi/m_pluginupdater.inc
@@ -25,10 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
{$DEFINE M_PLUGINUPDATER}
type
- pPUHashItem = ^TPUHashItem;
+ PPUHashItem = ^TPUHashItem;
TPUHashItem = record
fileName :PWideChar; // file name
- fileCrc :DWORD; // zip's crc
+ fileCrc :dword; // zip's crc
hash :array [0..32] of char; // file's md5 hash
selected :byte;
end;
@@ -42,14 +42,14 @@ const
wParam = (PWideChar)ptszUrl = url of hashes.zip
lParam = (array [1..260] of PWideChar)ptszBaseUrl = decoded base url
- return = (THandle)array of hash items or NULL on error
+ return = (THANDLE)array of hash items or NULL on error
}
MS_PU_PARSEHASHES = 'PluginUpdater/ParseHashes';
{
Frees the hashes handle
wParam = 0 (unused)
- lParam = (THandle) handle, returned from MS_PU_PARSEHASHES
+ lParam = (THANDLE) handle, returned from MS_PU_PARSEHASHES
return = always returs 0
}
MS_PU_FREEHASHES = 'PluginUpdater/FreeHashes';
@@ -57,7 +57,7 @@ const
{
Gets number of hashes
wParam = 0 (unused)
- lParam = (THandle) handle, returned from MS_PU_PARSEHASHES
+ lParam = (THANDLE) handle, returned from MS_PU_PARSEHASHES
return = (int)number of hashes in an object
}
MS_PU_GETHASHCOUNT = 'PluginUpdater/GetHashCount';
@@ -65,7 +65,7 @@ const
{
Gets concrete hash by index
wParam = (int)zero-based index (0..MS_PU_GETHASHCOUNT-1)
- lParam = (THandle) handle, returned from MS_PU_PARSEHASHES
+ lParam = (THANDLE) handle, returned from MS_PU_PARSEHASHES
return = (PU_HASH_ITEM*)pointer to a hash structure
}
MS_PU_GETNTHHASH = 'PluginUpdater/GetNthCount';
diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc
index 0008878eba..b73c884c1d 100644
--- a/include/delphi/m_popup.inc
+++ b/include/delphi/m_popup.inc
@@ -26,7 +26,8 @@ mi.pszPopupName = Translate("Popups");
mi.position = 0; //You don't need it and it's better if you put it to zero.
}
-const POPUP_VERSION = $02010003;
+const
+ POPUP_VERSION = $02010003;
const
MAX_CONTACTNAME = 2048;
@@ -48,7 +49,7 @@ type
// Action title text. Please use module name as prefix
// (e.g. "Popup Plus/Dismiss Popup") and don't translate
lpzTitle:array [0..MAX_ACTIONTITLE-1] of AnsiChar;
- flags :DWORD; // set of PAF_* flags
+ flags :dword; // set of PAF_* flags
wParam :WPARAM; // wParam for UM_POPUPACTION message
lParam :LPARAM; // lParam for UM_POPUPACTION message
end;
@@ -56,49 +57,49 @@ type
type
PPOPUPDATA = ^TPOPUPDATA;
TPOPUPDATA = record
- lchContact : MCONTACT;
+ lchContact : TMCONTACT;
lchIcon : HICON;
lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
lpszText : array [0..MAX_SECONDLINE -1] of AnsiChar;
colorBack : COLORREF;
colorText : COLORREF;
PluginWindowProc: pointer;
- PluginData : Pointer;
- iSeconds : int; // Custom delay time in seconds.
- // -1 means "forever", 0 means = 'default time".
+ PluginData : pointer;
+ iSeconds : int; // Custom delay time in seconds.
+ // -1 means "forever", 0 means = 'default time".
{ Data prior $02010003 version
lpzClass : PAnsiChar; // Popup class. Used with skinning. See Popup/AddClass for details
skinBack : COLORREF; // Background color for colorizable skins
cZero: array [0..15-SizeOf(PAnsiChar)-SizeOf(COLORREF)] of byte;
}
// you *MUST* pass APT_NEWDATA flag for services to take care of this data
- hReserved : THANDLE; // Reserved. Must be NULL
- actionCount : int; // Amount of passed actions
+ hReserved : THANDLE; // Reserved. Must be NULL
+ actionCount : int; // Amount of passed actions
lpActions : PPOPUPACTION; // Popup Actions
- icbSize : int; // struct size for future
+ icbSize : int; // struct size for future
end;
type
PPOPUPDATAW = ^TPOPUPDATAW;
TPOPUPDATAW = record
- lchContact : MCONTACT;
+ lchContact : TMCONTACT;
lchIcon : HICON;
lpwzContactName : array [0..MAX_CONTACTNAME-1] of WideChar;
lpwzText : array [0..MAX_SECONDLINE -1] of WideChar;
colorBack : COLORREF;
colorText : COLORREF;
- PluginWindowProc: Pointer; // must be a window procedure using stdcall
- PluginData : Pointer;
- iSeconds : int; // Custom delay time in seconds.
- // -1 means = 'forever", 0 means = 'default time".
+ PluginWindowProc: pointer; // must be a window procedure using stdcall
+ PluginData : pointer;
+ iSeconds : int; // Custom delay time in seconds.
+ // -1 means = 'forever", 0 means = 'default time".
{ Data prior $02010003 version
cZero: array [0..15] of AnsiChar; //16 unused bytes which may come useful in the future.
}
// you *MUST* pass APT_NEWDATA flag for services to take care of this data
- hReserved : THANDLE; // Reserved. Must be NULL
- actionCount : int; // Amount of passed actions
+ hReserved : THANDLE; // Reserved. Must be NULL
+ actionCount : int; // Amount of passed actions
lpActions : PPOPUPACTION; // Popup Actions
- icbSize : int; // struct size for future
+ icbSize : int; // struct size for future
end;
{
@@ -284,7 +285,7 @@ type
end;
const
- UM_POPUPMODIFYACTIONICON = WM_USER + $0205;
+ UM_POPUPMODIFYACTIONICON = WM_USER + $0205;
const
SM_WARNING = $01; //Triangle icon.
@@ -329,7 +330,7 @@ type
TPOPUPCLASS = record
cbSize :int;
flags :int;
- pszName :pAnsiChar;
+ pszName :PAnsiChar;
szDescription :TChar;
hIcon :HICON;
colorBack :TCOLORREF;
@@ -337,7 +338,6 @@ type
PluginWindowProc:pointer;
iSeconds :int;
end;
- POPUPCLASS = TPOPUPCLASS;
const
PCF_UNICODE = $0001;
@@ -350,13 +350,12 @@ const
type
TPOPUPDATACLASS = record
cbSize :int;
- pszClassName:pAnsiChar;
+ pszClassName:PAnsiChar;
szTitle :TChar;
szText :TChar;
PluginData :pointer;
- hContact :MCONTACT;
+ hContact :TMCONTACT;
end;
- POPUPDATACLASS = TPOPUPDATACLASS;
const
// wParam = 0
diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc
index fcea7499fd..b247c1ebcf 100644
--- a/include/delphi/m_protocols.inc
+++ b/include/delphi/m_protocols.inc
@@ -32,7 +32,7 @@
type
PCCSDATA = ^TCCSDATA;
TCCSDATA = record
- hContact : MCONTACT;
+ hContact : TMCONTACT;
szProtoService: PAnsiChar; // a PS_* constant
wParam : WPARAM;
lParam : LPARAM;
@@ -52,7 +52,7 @@ type
TACKDATA = record
cbSize : int;
szModule: PAnsiChar; // the name of the protocol module which initiated this ack
- hContact: MCONTACT;
+ hContact: TMCONTACT;
_type : int; // an ACKTYPE_* constant
_result : int; // an ACKRESULT_* constant
hProcess: THANDLE; // caller defined seq, I mean process code
@@ -123,7 +123,7 @@ type
PPROTOFILETRANSFERSTATUS = ^TPROTOFILETRANSFERSTATUS;
TPROTOFILETRANSFERSTATUS = record
cbSize : size_t;
- hContact : MCONTACT;
+ hContact : TMCONTACT;
flags : dword; // one of PFTS_* constants
files : ^TCHAR;
totalFiles : int;
@@ -268,8 +268,8 @@ type
ppro :PPROTO_INTERFACE; // pointer to the underlying object
hwndAccMgrUI :HWND;
- bAccMgrUIChanged:Bool;
- bDynDisabled :Bool; // dynamic disable flag, is never written to db
+ bAccMgrUIChanged:bool;
+ bDynDisabled :bool; // dynamic disable flag, is never written to db
end;
tagACCOUNT = TPROTOACCOUNT;
@@ -338,7 +338,7 @@ __inline PROTOACCOUNT* ProtoGetAccount( const AnsiChar* accName )
gets the account associated with a contact
wParam=(WPARAM)(HANDLE)hContact
lParam=0
- Returns a pAnsiChar pointing to the asciiz name of the protocol or NULL if the
+ Returns a PAnsiChar pointing to the asciiz name of the protocol or NULL if the
contact has no protocol. There is no need to mir_free() it or anything.
This is the name of the module that actually accesses the network for that contact.
}
@@ -388,18 +388,18 @@ const
type
PPROTO_AVATAR_INFORMATIONW = ^TPROTO_AVATAR_INFORMATIONW;
TPROTO_AVATAR_INFORMATIONW = record
- cbSize : int; // sizeof()
- hContact: MCONTACT; // this might have to be set by the caller too
- format : int; // PA_FORMAT_*
+ cbSize : int; // sizeof()
+ hContact: TMCONTACT; // this might have to be set by the caller too
+ format : int; // PA_FORMAT_*
// full path to filename which contains the avatar
filename: array[0..(MAX_PATH)-1] of WideChar;
end;
PPROTO_AVATAR_INFORMATION = ^TPROTO_AVATAR_INFORMATION;
TPROTO_AVATAR_INFORMATION = record
- cbSize : int; // sizeof()
- hContact: MCONTACT; // this might have to be set by the caller too
- format : int; // PA_FORMAT_*
+ cbSize : int; // sizeof()
+ hContact: TMCONTACT; // this might have to be set by the caller too
+ format : int; // PA_FORMAT_*
// full path to filename which contains the avatar
filename: array[0..(MAX_PATH)-1] of AnsiChar;
end;
diff --git a/include/delphi/m_protoint.inc b/include/delphi/m_protoint.inc
index 40325831bd..be6b9e64cd 100644
--- a/include/delphi/m_protoint.inc
+++ b/include/delphi/m_protoint.inc
@@ -49,27 +49,27 @@ type
tszUserName :TChar;
szModuleName :PAnsiChar;
- hProtoIcon :THandle;
- hNetlibUser :THandle;
+ hProtoIcon :THANDLE;
+ hNetlibUser :THANDLE;
+ //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // Virtual functions
- //////////////////////////////////////////////////////////////////////////////////////
- // Virtual functions
-
- AddToList :function(intf:PPROTO_INTERFACE;flags:int; var psr:TPROTOSEARCHRESULT):MCONTACT; cdecl;
- AddToListByEvent:function(intf:PPROTO_INTERFACE;flags:int; iContact:int; hDbEvent:THANDLE):MCONTACT; cdecl;
+ AddToList :function(intf:PPROTO_INTERFACE;flags:int; var psr:TPROTOSEARCHRESULT):TMCONTACT; cdecl;
+ AddToListByEvent:function(intf:PPROTO_INTERFACE;flags:int; iContact:int; hDbEvent:THANDLE):TMCONTACT; cdecl;
Authorize :function(intf:PPROTO_INTERFACE;hDbEvent:THANDLE):int; cdecl;
AuthDeny :function(intf:PPROTO_INTERFACE;hDbEvent:THANDLE;const szReason:TChar):int; cdecl;
- AuthRecv :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
- AuthRequest:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;szMessage:TChar):int; cdecl;
+ AuthRecv :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
+ AuthRequest:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;szMessage:TChar):int; cdecl;
- FileAllow :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;hTransfer:THANDLE; szPath:PROTOCHAR):THANDLE; cdecl;
- FileCancel:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;hTransfer:THANDLE):int; cdecl;
- FileDeny :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;hTransfer:THANDLE; var szReason:PROTOCHAR):int; cdecl;
- FileResume:function(intf:PPROTO_INTERFACE;hTransfer:THANDLE;var action:Integer; var szFilename:PROTOCHAR):int; cdecl;
+ FileAllow :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;hTransfer:THANDLE; szPath:PROTOCHAR):THANDLE; cdecl;
+ FileCancel:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;hTransfer:THANDLE):int; cdecl;
+ FileDeny :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;hTransfer:THANDLE; var szReason:PROTOCHAR):int; cdecl;
+ FileResume:function(intf:PPROTO_INTERFACE;hTransfer:THANDLE;var action:integer; var szFilename:PROTOCHAR):int; cdecl;
- GetCaps:function(intf:PPROTO_INTERFACE;_type:int;hContact:MCONTACT=0):dword_ptr; cdecl;
- GetInfo:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;infoType:int):int; cdecl;
+ GetCaps:function(intf:PPROTO_INTERFACE;_type:int;hContact:TMCONTACT=0):dword_ptr; cdecl;
+ GetInfo:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;infoType:int):int; cdecl;
SearchBasic :function(intf:PPROTO_INTERFACE;id:PAnsiChar):THANDLE; cdecl;
SearchByEmail :function(intf:PPROTO_INTERFACE;email:PAnsiChar):THANDLE; cdecl;
@@ -77,24 +77,24 @@ type
SearchAdvanced :function(intf:PPROTO_INTERFACE;owner:HWND):HWND; cdecl;
CreateExtendedSearchUI:function(intf:PPROTO_INTERFACE;owner:HWND):HWND; cdecl;
- RecvContacts:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
- RecvFile :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
- RecvMessage :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
- RecvUrl :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
+ RecvContacts:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
+ RecvFile :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
+ RecvMessage :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
+ RecvUrl :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;var ptr:TPROTORECVEVENT):int; cdecl;
- SendContacts:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;flags:int; nContacts:int; var hContactsList:THANDLE):int; cdecl;
- SendFile :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;szDescription:PROTOCHAR; var ppszFiles:PROTOCHAR):THANDLE; cdecl;
- SendMessage :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;flags:int; const msg:PAnsiChar):int; cdecl;
- SendUrl :function(intf:PPROTO_INTERFACE;hContact:MCONTACT;flags:int; const url:PAnsiChar):int; cdecl;
+ SendContacts:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;flags:int; nContacts:int; var hContactsList:THANDLE):int; cdecl;
+ SendFile :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;szDescription:PROTOCHAR; var ppszFiles:PROTOCHAR):THANDLE; cdecl;
+ SendMessage :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;flags:int; const msg:PAnsiChar):int; cdecl;
+ SendUrl :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;flags:int; const url:PAnsiChar):int; cdecl;
- SetApparentMode:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;mode:int):int; cdecl;
+ SetApparentMode:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;mode:int):int; cdecl;
SetStatus :function(intf:PPROTO_INTERFACE;iNewStatus:int):int; cdecl;
- GetAwayMsg :function(intf:PPROTO_INTERFACE;hContact:MCONTACT):THANDLE; cdecl;
- RecvAwayMsg:function(intf:PPROTO_INTERFACE;hContact:MCONTACT;mode:int;var evt:TPROTORECVEVENT):int; cdecl;
+ GetAwayMsg :function(intf:PPROTO_INTERFACE;hContact:TMCONTACT):THANDLE; cdecl;
+ RecvAwayMsg:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT;mode:int;var evt:TPROTORECVEVENT):int; cdecl;
SetAwayMsg :function(intf:PPROTO_INTERFACE;iStatus:int; const msg:PAnsiChar):int; cdecl;
- UserIsTyping:function(intf:PPROTO_INTERFACE;hContact:MCONTACT; _type:int):int; cdecl;
+ UserIsTyping:function(intf:PPROTO_INTERFACE;hContact:TMCONTACT; _type:int):int; cdecl;
OnEvent:function(intf:PPROTO_INTERFACE;iEventType:TPROTOEVENTTYPE;wParam:WPARAM;lParam:LPARAM):int; cdecl;
end;
diff --git a/include/delphi/m_protomod.inc b/include/delphi/m_protomod.inc
index 0fe4d463c9..aab9706e37 100644
--- a/include/delphi/m_protomod.inc
+++ b/include/delphi/m_protomod.inc
@@ -44,7 +44,7 @@ const
MS_PROTO_REGISTERMODULE:PAnsiChar = 'Proto/RegisterModule';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : protocol_name_string
Affect : Add the given protocol module to the chain for a contact, see notes
Returns: 0 success, [non zero] on failure
@@ -54,7 +54,7 @@ const
MS_PROTO_ADDTOCONTACT:PAnsiChar = 'Proto/AddToContact';
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : protocol_name_string
Affect : Remove the given protocol name from the chain for the given contact
Returns: 0 on success, [non zero] on failure
diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc
index f08315bc40..36c20984d9 100644
--- a/include/delphi/m_protosvc.inc
+++ b/include/delphi/m_protosvc.inc
@@ -205,7 +205,7 @@ type
email : TFNAMECHAR;
id : TFNAMECHAR;
flags : int;
- reserved : array [0..(8*SizeOf(THANDLE) div SizeOf(dword))-1] of Byte;
+ reserved : array [0..(8*SizeOf(THANDLE) div SizeOf(dword))-1] of byte;
// Protocols may extend this structure with extra members at will and supply
// a larger cbSize to reflect the new information, but they must not change
// any elements above this comment
@@ -224,18 +224,18 @@ type
PPROTORECVEVENT = ^TPROTORECVEVENT;
TPROTORECVEVENT = record
- flags : DWORD;
- timestamp : DWORD;
+ flags : dword;
+ timestamp : dword;
szMessage : TChar;
lParam : LPARAM;
pCustomData : pointer;
- cbCustomDataSize: DWORD;
+ cbCustomDataSize: dword;
end;
PPROTORECVFILE = ^TPROTORECVFILE;
TPROTORECVFILE = record
- flags : DWORD;
- timestamp : DWORD; // unix time
+ flags : dword;
+ timestamp : dword; // unix time
szDescription: PAnsiChar;
pFiles : ^PAnsiChar; // pointer to an array of PAnsiChar's
lParam : LPARAM;
@@ -354,7 +354,7 @@ const
Notes : Auth request come in the form of an event added to the database
for the NULL(0) user, the form is:
-
- protocolSpecific: DWORD;
+ protocolSpecific: dword;
nick, firstname, lastName, e-mail, requestReason: ASCIIZ;
-
HDBEVENT musts be the handle of such an event, one or more
@@ -473,7 +473,7 @@ const
PS_SEARCHBYADVANCED = '/SearchByAdvanced';
type
- CUSTOMSEARCHRESULTS = record
+ TCUSTOMSEARCHRESULTS = record
nSize :size_t;
nFieldCount:int;
szFields :^TCHAR;
@@ -484,12 +484,12 @@ type
wParam : flags
lParam : Pointer to a TPROTOSEARCHRESULT structure
Affect : Adds a search result to the contact list, see notes
- Returns: A handle to the new contact (MCONTACT) or NULL(0) on failure
+ Returns: A handle to the new contact (TMCONTACT) or NULL(0) on failure
Notes : The pointer MUST be a result returned by a search function
since there maybe extra protocol-spec data required by the protocol.
-
the protocol module should not allow duplicate contains to be added,
- but if such a request *is* received it should return a MCONTACT
+ but if such a request *is* received it should return a TMCONTACT
to the original user,
-
If flags is PALF_TEMPORARY set, the contact should be added
@@ -503,7 +503,7 @@ const
wParam : MAKEWPARAM(flags, iContact)
lParam : HDBEVENT
Affects: Add a contact to the contact list given an auth/added/contacts events, see notes
- Returns: A MCONTACT or NULL(0) on failure
+ Returns: A TMCONTACT or NULL(0) on failure
Notes : HDBEVENT must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
flags are the same as PS_ADDTOLIST,
-
@@ -576,7 +576,7 @@ const
{
Asks protocol for the status message for a status
- wParam=(WORD) 0 for current status or a status id
+ wParam=(word) 0 for current status or a status id
lParam=SGMA_xxx
Returns status msg or NULL if there is none. The protocol have to handle only the current
status. Handling messages for other statuses is optional.
@@ -672,7 +672,7 @@ const
flags which may have SGIF_MINIMAL set to only get
"basic" information, such as nickname, email address.
- PCCSDATA(lParam)^.hContact has the MCONTACT handle to get user
+ PCCSDATA(lParam)^.hContact has the TMCONTACT handle to get user
information for.
Will update all the information in the database and then
@@ -757,7 +757,7 @@ const
CCSDATA: Yes
wParam : 0
lParam : 0
- Affect : Send a request to retrieve MCONTACT's mode message, see notes
+ Affect : Send a request to retrieve TMCONTACT's mode message, see notes
Returns: a hProcess which will be ack'd later, NULL(0) on failure
Notes : the reply will come in a form of an ack :
@@ -793,7 +793,7 @@ const
-
File transfers are marked by a EVENTTYPE_FILE added to the database.
The format is :
- hTransfer: DWORD
+ hTransfer: dword
filename(s), description: ASCIIZ
}
PSS_FILEALLOW = '/FileAllow';
@@ -900,7 +900,7 @@ Returns the result of MS_DB_EVENT_ADD
//lParam = (LPARAM)(PROTORECVFILET*)&prf
type
- PROTORECVFILET = record
+ TPROTORECVFILET = record
flags:dword;
timestamp:dword; // unix time
szDescription:TChar;
diff --git a/include/delphi/m_ssl.inc b/include/delphi/m_ssl.inc
index 04bc65651a..0db808b181 100644
--- a/include/delphi/m_ssl.inc
+++ b/include/delphi/m_ssl.inc
@@ -28,12 +28,12 @@ type
TSOCKET = uint_ptr; // from Winsock.pas
type
- SSL_API = record
+ TSSL_API = record
cbSize:int;
connect : function(s:TSOCKET; const host:PAnsiChar; verify:int):HSSL; cdecl;
- pending : function(ssl:HSSL):BOOL; cdecl;
- read : function(ssl:HSSL; buf:pAnsiChar; num:int; peek:int):int; cdecl;
- write : function(ssl:HSSL; const buf:pAnsiChar; num:int):int; cdecl;
+ pending : function(ssl:HSSL):bool; cdecl;
+ read : function(ssl:HSSL; buf:PAnsiChar; num:int; peek:int):int; cdecl;
+ write : function(ssl:HSSL; const buf:PAnsiChar; num:int):int; cdecl;
shutdown : procedure(ssl:HSSL); cdecl;
sfree : procedure(ssl:HSSL); cdecl;
end;
diff --git a/include/delphi/m_system.inc b/include/delphi/m_system.inc
index 5fad959d8a..55bd148a67 100644
--- a/include/delphi/m_system.inc
+++ b/include/delphi/m_system.inc
@@ -71,7 +71,7 @@ const
}
MS_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExit';
- { gets the version number of Miranda encoded as a DWORD v0.1.0.1+
+ { gets the version number of Miranda encoded as a dword v0.1.0.1+
wParam=lParam=0
returns the version number, encoded as one version per byte, therefore
version 1.2.3.10 is 0x0102030a
@@ -81,7 +81,7 @@ const
{
gets the version number of Miranda encoded as four WORDs v0.92.2+
wParam = 0
- lParam = WORD[4]*
+ lParam = word[4]*
returns the version number, encoded as one version per word, therefore
version 1.2.3.3210 is 0x0001, 0x0002, 0x0003, 0x0C8a
}
diff --git a/include/delphi/m_timezones.inc b/include/delphi/m_timezones.inc
index 4e929c9303..9ac1c775d0 100644
--- a/include/delphi/m_timezones.inc
+++ b/include/delphi/m_timezones.inc
@@ -39,21 +39,21 @@ type
mir_time = int_ptr;
type
- TIME_API = record
+ TTIME_API = record
cbSize:size_t;
createByName :function (tszName:TChar; dwFlags:dword):THANDLE; cdecl;
- createByContact:function (hContact:MCONTACT; szModule:pAnsiChar; dwFlags:dword):THANDLE;
- storeByContact :procedure(hContact:MCONTACT; szModule:pAnsiChar; hTZ:THANDLE); cdecl;
+ createByContact:function (hContact:TMCONTACT; szModule:PAnsiChar; dwFlags:dword):THANDLE;
+ storeByContact :procedure(hContact:TMCONTACT; szModule:PAnsiChar; hTZ:THANDLE); cdecl;
printDateTime:function(hTZ:THANDLE; szFormat:TChar; szDest:TChar;
cbDest:int; dwFlags:dword):int; cdecl;
printTimeStamp:function(hTZ:THANDLE; ts:mir_time; szFormat:TChar; szDest:TChar;
cbDest:int; dwFlags:dword):int; cdecl;
- prepareList :function (hContact:MCONTACT; szModule:pAnsiChar; hWnd:HWND; dwFlags:dword):int; cdecl;
- selectListItem :function (hContact:MCONTACT; szModule:pAnsiChar; hWnd:HWND; dwFlags:dword):int; cdecl;
- storeListResults:procedure(hContact:MCONTACT; szModule:pAnsiChar; hWnd:HWND; dwFlags:dword); cdecl;
+ prepareList :function (hContact:TMCONTACT; szModule:PAnsiChar; hWnd:HWND; dwFlags:dword):int; cdecl;
+ selectListItem :function (hContact:TMCONTACT; szModule:PAnsiChar; hWnd:HWND; dwFlags:dword):int; cdecl;
+ storeListResults:procedure(hContact:TMCONTACT; szModule:PAnsiChar; hWnd:HWND; dwFlags:dword); cdecl;
getTimeZoneTime:function(hTZ:THANDLE; var st:SYSTEMTIME):int; cdecl;
timeStampToTimeZoneTimeStamp:function(hTZ:THANDLE; ts:mir_time):time_t; cdecl;
diff --git a/include/delphi/m_url.inc b/include/delphi/m_url.inc
index 47f866f56b..d95063661a 100644
--- a/include/delphi/m_url.inc
+++ b/include/delphi/m_url.inc
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
{
- wParam : MCONTACT
+ wParam : TMCONTACT
lParam : 0
Affects: bring up the send URL dialogbox for a user
Returns: 0 on success, nonzero on failure, see notes
diff --git a/include/delphi/m_utils.inc b/include/delphi/m_utils.inc
index 2712ea4b11..d27e67064a 100644
--- a/include/delphi/m_utils.inc
+++ b/include/delphi/m_utils.inc
@@ -32,14 +32,14 @@ const
// hyperlink messages
{
Use this in a SendMessage to set the color of the url when control is enabled
- wParam=DWORD color
+ wParam=dword color
lParam=not used
}
HLK_SETENABLECOLOUR = WM_USER+101; // added in 0.3.1
{
Use this in a SendMessage to set the color of the url when control is disabled
- wParam=DWORD color
+ wParam=dword color
lParam=not used
}
HLK_SETDISABLECOLOUR = WM_USER+102; // added in 0.3.1
@@ -78,13 +78,13 @@ type
TWINDOWLISTENTRY = record
hList : THANDLE;
hWnd : HWND;
- hContact: MCONTACT;
+ hContact: TMCONTACT;
end;
PSAVEWINDOWPOS = ^TSAVEWINDOWPOS;
TSAVEWINDOWPOS = record
hWnd : HWND;
- hContact : MCONTACT;
+ hContact : TMCONTACT;
szModule : PAnsiChar; // module name eto store the settings in
szNamePrefix: PAnsiChar; // text to prefix on 'x', 'width', etc
end;
@@ -188,7 +188,7 @@ const
{
wParam : Handle to the window list to look in
- lParam : Handle to a MCONTACT to find in the window list
+ lParam : Handle to a TMCONTACT to find in the window list
Affect : Find a window handle given the hContact
Returns: The found window handle or NULL(0) on failure
}
@@ -255,7 +255,7 @@ const
Affect : Moves a RECT inside screen if it is outside.It works with multiple monitors (v0.9.0.4+)
Returns: <0 on error, 0 if not changed the rect, 1 if changed the rect
}
- MS_UTILS_ASSERTINSIDESCREEN:pAnsiChar = 'Utils/AssertInsideScreen';
+ MS_UTILS_ASSERTINSIDESCREEN:PAnsiChar = 'Utils/AssertInsideScreen';
{
wParam : 0
@@ -349,7 +349,7 @@ type
TREPLACEVARSDATA = record
cbSize :int;
dwFlags :dword;
- hContact :MCONTACT;
+ hContact :TMCONTACT;
variables:PREPLACEVARSARRAY;
end;
@@ -404,9 +404,9 @@ type
TENTER_STRING = record
cbSize :int; // structure size
_type :int; // one of ESF_* constants
- szModuleName:pAnsiChar; // module name to save window size and combobox strings
- szDataPrefix:pAnsiChar; // prefix for stored database variables
- caption :pAnsiChar; // window caption
+ szModuleName:PAnsiChar; // module name to save window size and combobox strings
+ szDataPrefix:PAnsiChar; // prefix for stored database variables
+ caption :PAnsiChar; // window caption
// next TChar fields is on same place
// ptszInitVal:TChar; // initial value (note: the core DOES NOT free it)
ptszResult :TChar; // result entered (must be freed via mir_free)
@@ -419,6 +419,6 @@ const
// wParam = 0 (unused)
// lParam = PENTER_STRING (form description)
// returns TRUE on pressing OK or FALSE if Cancel was pressed
- MS_UTILS_ENTERSTRING:pAnsiChar = 'Utils/EnterString';
+ MS_UTILS_ENTERSTRING:PAnsiChar = 'Utils/EnterString';
{$ENDIF}
diff --git a/include/delphi/m_xml.inc b/include/delphi/m_xml.inc
index 92c18faf04..f58efbf78a 100644
--- a/include/delphi/m_xml.inc
+++ b/include/delphi/m_xml.inc
@@ -64,7 +64,7 @@ const
XML_API_SIZEOF_V1 = SizeOf(size_t)+26*sizeof(dword);
type
- XML_API_A = record
+ TXML_API_A = record
cbSize :size_t;
createNode :function(const name, text:PAnsiChar; IsDeclaration:boolean):HXML;cdecl;
@@ -146,7 +146,7 @@ type
toFile :function(node:HXML; filename:PAnsiChar; withformattiing:int):XMLError;
end;
- XML_API_W = record
+ TXML_API_W = record
cbSize :size_t;
createNode :function(const name, text:PWideChar; IsDeclaration:boolean):HXML;cdecl;
diff --git a/include/delphi/m_zlib.inc b/include/delphi/m_zlib.inc
index 527410c1bd..7302b1e7a0 100644
--- a/include/delphi/m_zlib.inc
+++ b/include/delphi/m_zlib.inc
@@ -63,54 +63,54 @@ const
Z_DEFLATED = 8;
type
- alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
+ alloc_func = function(opaque: pointer; items, size: integer): pointer;
cdecl;
- free_func = procedure(opaque, address: Pointer);
+ free_func = procedure(opaque, address: pointer);
cdecl;
- in_func = function(opaque: Pointer; var buf: PByte): Integer;
+ in_func = function(opaque: pointer; var buf: PByte): integer;
cdecl;
- out_func = function(opaque: Pointer; buf: PByte; size: Integer): Integer;
+ out_func = function(opaque: pointer; buf: PByte; size: integer): integer;
cdecl;
z_streamp = ^z_stream;
z_stream = packed record
next_in: PChar; (* next input byte *)
- avail_in: Integer; (* number of bytes available at next_in *)
+ avail_in: integer; (* number of bytes available at next_in *)
total_in: LongInt; (* total nb of input bytes read so far *)
next_out: PChar; (* next output byte should be put there *)
- avail_out: Integer; (* remaining free space at next_out *)
+ avail_out: integer; (* remaining free space at next_out *)
total_out: LongInt; (* total nb of bytes output so far *)
msg: PChar; (* last error message, NULL if no error *)
- state: Pointer; (* not visible by applications *)
+ state: pointer; (* not visible by applications *)
zalloc: alloc_func; (* used to allocate the internal state *)
zfree: free_func; (* used to free the internal state *)
- opaque: Pointer; (* private data object passed to zalloc and zfree *)
+ opaque: pointer; (* private data object passed to zalloc and zfree *)
- data_type: Integer; (* best guess about the data type: ascii or binary *)
+ data_type: integer; (* best guess about the data type: ascii or binary *)
adler: LongInt; (* adler32 value of the uncompressed data *)
reserved: LongInt; (* reserved for future use *)
end;
-function deflateInit(var strm: z_stream; level: Integer): Integer; cdecl;
+function deflateInit(var strm: z_stream; level: integer): integer; cdecl;
external ZlibDLL name 'deflateInit_';
-function deflate(var strm: z_stream; flush: Integer): Integer; cdecl;
+function deflate(var strm: z_stream; flush: integer): integer; cdecl;
external ZlibDLL name 'deflate';
-function deflateEnd(var strm: z_stream): Integer; cdecl;
+function deflateEnd(var strm: z_stream): integer; cdecl;
external ZlibDLL name 'deflateEnd';
-function inflateInit(var strm: z_stream): Integer; cdecl;
+function inflateInit(var strm: z_stream): integer; cdecl;
external ZlibDLL name 'inflateInit_';
-function inflate(var strm: z_stream; flush: Integer): Integer; cdecl;
+function inflate(var strm: z_stream; flush: integer): integer; cdecl;
external ZlibDLL name 'inflate';
-function inflateEnd(var strm: z_stream): Integer; cdecl;
+function inflateEnd(var strm: z_stream): integer; cdecl;
external ZlibDLL name 'inflateEnd';
{$ENDIF}