summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--plugins/Actman30/actman30.dpr2
-rw-r--r--plugins/Actman30/hooks/i_hook.inc2
-rw-r--r--plugins/Actman30/hooks/i_opt_dlg.inc4
-rw-r--r--plugins/Actman30/i_opt_dlg2.inc12
-rw-r--r--plugins/Actman30/iac_.pas2
-rw-r--r--plugins/Actman30/iac_call.pas6
-rw-r--r--plugins/Actman30/iac_chain.pas4
-rw-r--r--plugins/Actman30/iac_contact.pas4
-rw-r--r--plugins/Actman30/iac_dbrw.pas6
-rw-r--r--plugins/Actman30/iac_global.pas10
-rw-r--r--plugins/Actman30/iac_ini.pas2
-rw-r--r--plugins/Actman30/iac_inout.pas4
-rw-r--r--plugins/Actman30/iac_jump.pas2
-rw-r--r--plugins/Actman30/iac_messagebox.pas2
-rw-r--r--plugins/Actman30/iac_program.pas2
-rw-r--r--plugins/Actman30/iac_service.pas11
-rw-r--r--plugins/Actman30/iac_settings.pas2
-rw-r--r--plugins/Actman30/iac_storage.pas2
-rw-r--r--plugins/Actman30/iac_text.pas2
-rw-r--r--plugins/Actman30/inoutxml.pas2
-rw-r--r--plugins/Actman30/question.pas2
-rw-r--r--plugins/Actman30/tasks/i_opt_dlg.inc4
-rw-r--r--plugins/Actman30/tasks/i_options.inc1
-rw-r--r--plugins/Actman30/ua/i_inoutjson.inc6
-rw-r--r--plugins/Actman30/ua/i_inoutxm.inc12
-rw-r--r--plugins/Actman30/ua/i_opt_dlg.inc456
-rw-r--r--plugins/Actman30/ua/i_uaplaces.inc24
-rw-r--r--plugins/Actman30/ua/i_uavars.inc8
-rw-r--r--plugins/Actman30/ua/i_uconst.inc40
-rw-r--r--plugins/Actman30/ua/ua.pas15
-rw-r--r--plugins/Actman30/ua/ua.rc47
-rw-r--r--plugins/ExternalAPI/delphi/m_actman.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_anismiley.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_assocmgr.inc12
-rw-r--r--plugins/ExternalAPI/delphi/m_ersatz.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_flags.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_flash.inc14
-rw-r--r--plugins/ExternalAPI/delphi/m_folders.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_historypp.inc24
-rw-r--r--plugins/ExternalAPI/delphi/m_ieview.inc24
-rw-r--r--plugins/ExternalAPI/delphi/m_listeningto.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_music.inc52
-rw-r--r--plugins/ExternalAPI/delphi/m_newawaysys.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_notify.inc6
-rw-r--r--plugins/ExternalAPI/delphi/m_png.inc7
-rw-r--r--plugins/ExternalAPI/delphi/m_proto_listeningto.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_sessions.inc26
-rw-r--r--plugins/ExternalAPI/delphi/m_shutdown.inc28
-rw-r--r--plugins/ExternalAPI/delphi/m_smileyadd.inc30
-rw-r--r--plugins/ExternalAPI/delphi/m_spamfilter.inc46
-rw-r--r--plugins/ExternalAPI/delphi/m_speak.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_spellchecker.inc6
-rw-r--r--plugins/ExternalAPI/delphi/m_statusplugins.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_tabsrmm.inc35
-rw-r--r--plugins/ExternalAPI/delphi/m_tipper.inc8
-rw-r--r--plugins/ExternalAPI/delphi/m_toptoolbar.inc6
-rw-r--r--plugins/ExternalAPI/delphi/m_userinfoex.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_variables.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_versioninfo.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_voice.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_voiceservice.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_weather.inc32
-rw-r--r--plugins/ExternalAPI/delphi/m_yamn.inc6
-rw-r--r--plugins/QuickSearch/i_ok.inc6
-rw-r--r--plugins/QuickSearch/quicksearch.dpr6
-rw-r--r--plugins/QuickSearch/sr_global.pas2
-rw-r--r--plugins/QuickSearch/sr_optdialog.pas36
-rw-r--r--plugins/QuickSearch/sr_window.pas38
-rw-r--r--plugins/Utils.pas/common.pas35
-rw-r--r--plugins/Utils.pas/contact.pas12
-rw-r--r--plugins/Utils.pas/dbsettings.pas88
-rw-r--r--plugins/Utils.pas/editwrapper.pas6
-rw-r--r--plugins/Utils.pas/io.pas8
-rw-r--r--plugins/Utils.pas/kolsizer.pas24
-rw-r--r--plugins/Utils.pas/mApiCardM.pas8
-rw-r--r--plugins/Utils.pas/mirutils.pas98
-rw-r--r--plugins/Utils.pas/msninfo.pas2
-rw-r--r--plugins/Utils.pas/playlist.pas2
-rw-r--r--plugins/Utils.pas/protocols.pas16
-rw-r--r--plugins/Utils.pas/sedit.pas8
-rw-r--r--plugins/Utils.pas/sparam.pas14
-rw-r--r--plugins/Utils.pas/srvblock.pas7
-rw-r--r--plugins/Utils.pas/syswin.pas40
-rw-r--r--plugins/Utils.pas/uRect.pas68
-rw-r--r--plugins/Utils.pas/wrapdlgs.pas42
-rw-r--r--plugins/Utils.pas/wrapper.pas70
-rw-r--r--plugins/Utils.pas/zwrapper.pas6
-rw-r--r--plugins/Watrack/HlpDlg.pas2
-rw-r--r--plugins/Watrack/formats/fmt_m4a.pas12
-rw-r--r--plugins/Watrack/formats/tag_id3v2.inc2
-rw-r--r--plugins/Watrack/i_opt_0.inc2
-rw-r--r--plugins/Watrack/i_opt_1.inc4
-rw-r--r--plugins/Watrack/kolframe/frm_dlg1.inc5
-rw-r--r--plugins/Watrack/kolframe/frm_dlg2.inc2
-rw-r--r--plugins/Watrack/kolframe/frm_frame.inc2
-rw-r--r--plugins/Watrack/kolframe/frm_trackbar.inc4
-rw-r--r--plugins/Watrack/kolframe/i_bitmap.inc2
-rw-r--r--plugins/Watrack/kolframe/kolframe.pas4
-rw-r--r--plugins/Watrack/lastfm/i_last_api.inc8
-rw-r--r--plugins/Watrack/lastfm/i_last_dlg.inc2
-rw-r--r--plugins/Watrack/lastfm/lastfm.pas4
-rw-r--r--plugins/Watrack/myrtf.pas8
-rw-r--r--plugins/Watrack/myshows/i_myshows_dlg.inc2
-rw-r--r--plugins/Watrack/myshows/myshows.pas2
-rw-r--r--plugins/Watrack/player.ini4
-rw-r--r--plugins/Watrack/players/pl_apollo.pas6
-rw-r--r--plugins/Watrack/players/pl_behold.pas8
-rw-r--r--plugins/Watrack/players/pl_bs.pas2
-rw-r--r--plugins/Watrack/players/pl_cowon.pas4
-rw-r--r--plugins/Watrack/players/pl_mpc.pas2
-rw-r--r--plugins/Watrack/players/pl_mradio.pas2
-rw-r--r--plugins/Watrack/players/pl_winamp.pas2
-rw-r--r--plugins/Watrack/popup/pop_dlg.inc2
-rw-r--r--plugins/Watrack/popup/pop_vars.inc2
-rw-r--r--plugins/Watrack/popup/popups.pas4
-rw-r--r--plugins/Watrack/proto/i_proto_dlg.inc8
-rw-r--r--plugins/Watrack/proto/proto.pas8
-rw-r--r--plugins/Watrack/srv_format.pas8
-rw-r--r--plugins/Watrack/srv_player.pas8
-rw-r--r--plugins/Watrack/stat/stat_dlg.inc9
-rw-r--r--plugins/Watrack/status/i_opt_11.inc14
-rw-r--r--plugins/Watrack/status/i_opt_12.inc8
-rw-r--r--plugins/Watrack/status/i_opt_3.inc2
-rw-r--r--plugins/Watrack/status/status.pas7
-rw-r--r--plugins/Watrack/templates/i_expkey.inc2
-rw-r--r--plugins/Watrack/templates/i_macro.inc4
-rw-r--r--plugins/Watrack/templates/i_tmpl_dlg.inc2
-rw-r--r--plugins/Watrack/watrack.dpr4
-rw-r--r--plugins/mRadio/i_hotkey.inc2
-rw-r--r--plugins/mRadio/i_myservice.inc8
-rw-r--r--plugins/mRadio/i_optdlg.inc4
-rw-r--r--plugins/mRadio/i_search.inc117
-rw-r--r--plugins/mRadio/i_service.inc4
-rw-r--r--plugins/mRadio/mradio.dpr2
-rw-r--r--plugins/mRadio/rbass.pas6
-rw-r--r--plugins/mRadio/rframeapi.pas6
-rw-r--r--plugins/mRadio/rglobal.pas6
187 files changed, 2109 insertions, 1736 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}
diff --git a/plugins/Actman30/actman30.dpr b/plugins/Actman30/actman30.dpr
index 2f7a24e573..55f510418a 100644
--- a/plugins/Actman30/actman30.dpr
+++ b/plugins/Actman30/actman30.dpr
@@ -75,7 +75,7 @@ var
{$include m_actman.inc}
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
+function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
begin
result:=@PluginInfo;
PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
diff --git a/plugins/Actman30/hooks/i_hook.inc b/plugins/Actman30/hooks/i_hook.inc
index 8b7b487d98..7bdf64fd47 100644
--- a/plugins/Actman30/hooks/i_hook.inc
+++ b/plugins/Actman30/hooks/i_hook.inc
@@ -108,7 +108,7 @@ begin
end;
end;
-function HookWndProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function HookWndProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
p:pHookRec;
ap:tAct_Param;
diff --git a/plugins/Actman30/hooks/i_opt_dlg.inc b/plugins/Actman30/hooks/i_opt_dlg.inc
index 8fac1007a1..23adcf0848 100644
--- a/plugins/Actman30/hooks/i_opt_dlg.inc
+++ b/plugins/Actman30/hooks/i_opt_dlg.inc
@@ -207,7 +207,7 @@ begin
CheckButtons(Dialog);
end;
-function NewHKTableProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewHKTableProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
@@ -301,7 +301,7 @@ begin
OldTableProc:=pointer(SetWindowLongPtrW(wnd,GWL_WNDPROC,LONG_PTR(@NewHKTableProc)));
end;
-function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOpt(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
tmp:pAnsiChar;
diff --git a/plugins/Actman30/i_opt_dlg2.inc b/plugins/Actman30/i_opt_dlg2.inc
index 3a816a481a..24fdb59ab5 100644
--- a/plugins/Actman30/i_opt_dlg2.inc
+++ b/plugins/Actman30/i_opt_dlg2.inc
@@ -201,7 +201,7 @@ begin
end;
// Fill action type combobox
-function FillActTypeList(list:hwnd):HWND;
+function FillActTypeList(list:HWND):HWND;
var
cbei:TCOMBOBOXEXITEMW;
il:HIMAGELIST;
@@ -305,7 +305,7 @@ end;
procedure FillAction(Dialog:HWND;act:tBaseAction);
var
p:pActModule;
- i:lresult;
+ i:LRESULT;
wnd:HWND;
begin
if act<>nil then
@@ -529,7 +529,7 @@ begin
end;
// action (chain) table procedure (key hook)
-function NewActTableProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewActTableProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
@@ -577,7 +577,7 @@ end;
//----- Macro list stuff -----
// action group table procedure (key hook)
-function NewGroupTableProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewGroupTableProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
@@ -722,7 +722,7 @@ begin
end;
// Fill action group list and disable chain controls
-function FillMacroList(Dialog:hwnd):integer;
+function FillMacroList(Dialog:HWND):integer;
var
CurMacro:pMacroRecord;
i:integer;
@@ -854,7 +854,7 @@ begin
SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
end;
-function DlgProcOpt2(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOpt2(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd:HWND;
p:pActModule;
diff --git a/plugins/Actman30/iac_.pas b/plugins/Actman30/iac_.pas
index f99e4f7366..5a47ba96a1 100644
--- a/plugins/Actman30/iac_.pas
+++ b/plugins/Actman30/iac_.pas
@@ -85,7 +85,7 @@ procedure ClearFields(Dialog:HWND);
begin
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=0;
diff --git a/plugins/Actman30/iac_call.pas b/plugins/Actman30/iac_call.pas
index 33208fb16a..074646f149 100644
--- a/plugins/Actman30/iac_call.pas
+++ b/plugins/Actman30/iac_call.pas
@@ -422,7 +422,7 @@ begin
end;
end;
-procedure SearchDllByFName(flist,dlist:HWND;idx:Integer=-1);
+procedure SearchDllByFName(flist,dlist:HWND;idx:integer=-1);
var
pc,p,pp,pz:pAnsiChar;
lptr:pointer;
@@ -612,7 +612,7 @@ begin
ShowHideBlock(Dialog,true);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd,wnd1:HWND;
buf:array [0..63] of AnsiChar;
@@ -831,6 +831,7 @@ begin
CheckDlgButton(Dialog,IDC_CLOSE_ARG,BST_UNCHECKED);
ShowHideBlock(Dialog,false);
+ exit;
end;
IDC_CLOSE_ARG: begin
@@ -840,6 +841,7 @@ begin
CheckDlgButton(Dialog,IDC_CLOSE_RES,BST_UNCHECKED);
ShowHideBlock(Dialog,true);
+ exit;
end;
end;
SendMessage(GetParent(GetParent(Dialog)),PSM_CHANGED,0,0);
diff --git a/plugins/Actman30/iac_chain.pas b/plugins/Actman30/iac_chain.pas
index a4736ab1ca..39e03e13b8 100644
--- a/plugins/Actman30/iac_chain.pas
+++ b/plugins/Actman30/iac_chain.pas
@@ -210,7 +210,7 @@ end;
//----- Dialog realization -----
-procedure FillChainList(Dialog:hwnd);
+procedure FillChainList(Dialog:HWND);
var
wnd,list:HWND;
i:integer;
@@ -245,7 +245,7 @@ begin
CheckDlgButton(Dialog,IDC_MACRO_KEEPOLD ,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
tmp:dword;
wnd:HWND;
diff --git a/plugins/Actman30/iac_contact.pas b/plugins/Actman30/iac_contact.pas
index cb5350bd26..318dc8601e 100644
--- a/plugins/Actman30/iac_contact.pas
+++ b/plugins/Actman30/iac_contact.pas
@@ -24,7 +24,7 @@ const
type
tContactAction = class(tBaseAction)
private
- contact:MCONTACT;
+ contact:TMCONTACT;
public
constructor Create(uid:dword);
// function Clone:tBaseAction; override;
@@ -131,7 +131,7 @@ begin
CheckDlgButton(Dialog,IDC_CNT_GET ,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd:HWND;
bb:boolean;
diff --git a/plugins/Actman30/iac_dbrw.pas b/plugins/Actman30/iac_dbrw.pas
index eaf4daf02d..c4224f91b2 100644
--- a/plugins/Actman30/iac_dbrw.pas
+++ b/plugins/Actman30/iac_dbrw.pas
@@ -68,7 +68,7 @@ const
type
tDataBaseAction = class(tBaseAction)
private
- dbcontact:MCONTACT;
+ dbcontact:TMCONTACT;
dbmodule :PWideChar;
dbsetting:PWideChar;
dbvalue :PWideChar; // keep all in unicode (str to int translation fast)
@@ -129,7 +129,7 @@ var
ambuf,asbuf:array [0..127] of AnsiChar;
ls,tmp:pWideChar;
tmpa,tmpa1:pAnsiChar;
- hContact:MCONTACT;
+ hContact:TMCONTACT;
proto:pAnsiChar;
avalue:uint_ptr;
begin
@@ -451,7 +451,7 @@ begin
CheckDlgButton(Dialog,IDC_RW_DELETE,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
var
diff --git a/plugins/Actman30/iac_global.pas b/plugins/Actman30/iac_global.pas
index c6e96cd130..5e7ff9bec1 100644
--- a/plugins/Actman30/iac_global.pas
+++ b/plugins/Actman30/iac_global.pas
@@ -7,7 +7,7 @@ uses
m_api;
var
- xmlparser:XML_API_W;
+ xmlparser:TXML_API_W;
const
IcoLibPrefix = 'action_type_';
@@ -89,8 +89,8 @@ procedure InsertString(wnd:HWND;num:dword;str:PAnsiChar);
function GetLink(hash:dword):pActModule;
function GetLinkByName(name:pAnsiChar):pActModule;
-function ImportContact (node:HXML ):MCONTACT;
-function ImportContactINI(node:pointer):MCONTACT;
+function ImportContact (node:HXML ):TMCONTACT;
+function ImportContactINI(node:pointer):TMCONTACT;
implementation
@@ -301,7 +301,7 @@ const
ioCUID = 'cuid';
ioCUIDType = 'cuidtype';
-function ImportContact(node:HXML):MCONTACT;
+function ImportContact(node:HXML):TMCONTACT;
var
proto:pAnsiChar;
tmpbuf:array [0..63] of AnsiChar;
@@ -352,7 +352,7 @@ begin
end;
end;
-function ImportContactINI(node:pointer):MCONTACT;
+function ImportContactINI(node:pointer):TMCONTACT;
{
var
proto:pAnsiChar;
diff --git a/plugins/Actman30/iac_ini.pas b/plugins/Actman30/iac_ini.pas
index 12a1074563..7061d65936 100644
--- a/plugins/Actman30/iac_ini.pas
+++ b/plugins/Actman30/iac_ini.pas
@@ -248,7 +248,7 @@ begin
EnableEditField(Dialog,IDC_INI_VALUE,true);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
begin
diff --git a/plugins/Actman30/iac_inout.pas b/plugins/Actman30/iac_inout.pas
index 0ae2f0d7fc..c8b63aa1dc 100644
--- a/plugins/Actman30/iac_inout.pas
+++ b/plugins/Actman30/iac_inout.pas
@@ -85,7 +85,7 @@ var
tmp:PWideChar;
blob,p:PAnsiChar;
w:PWideChar;
- hContact:MCONTACT;
+ hContact:TMCONTACT;
wnd:HWND;
fexist:bool;
dbei:TDBEVENTINFO;
@@ -479,7 +479,7 @@ begin
CheckDlgButton(Dialog,IDC_TEXT_SEND,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
var
diff --git a/plugins/Actman30/iac_jump.pas b/plugins/Actman30/iac_jump.pas
index 7d3d405f2a..c06c1037dd 100644
--- a/plugins/Actman30/iac_jump.pas
+++ b/plugins/Actman30/iac_jump.pas
@@ -480,7 +480,7 @@ begin
CheckDlgButton(Dialog,IDC_FLAG_JUMP ,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
var
diff --git a/plugins/Actman30/iac_messagebox.pas b/plugins/Actman30/iac_messagebox.pas
index f782e54e94..7d99c5ffb3 100644
--- a/plugins/Actman30/iac_messagebox.pas
+++ b/plugins/Actman30/iac_messagebox.pas
@@ -231,7 +231,7 @@ begin
CheckDlgButton(Dialog,IDC_MSGI_INFO ,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
begin
diff --git a/plugins/Actman30/iac_program.pas b/plugins/Actman30/iac_program.pas
index 83cc60a5f9..bf44fdffa6 100644
--- a/plugins/Actman30/iac_program.pas
+++ b/plugins/Actman30/iac_program.pas
@@ -336,7 +336,7 @@ begin
mFreeMem(pw);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
begin
diff --git a/plugins/Actman30/iac_service.pas b/plugins/Actman30/iac_service.pas
index b31ab403b1..88ca4f7f07 100644
--- a/plugins/Actman30/iac_service.pas
+++ b/plugins/Actman30/iac_service.pas
@@ -467,7 +467,7 @@ end;
//----- Dialog realization -----
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
ServiceBlock:HWND;
rc:TRECT;
@@ -533,10 +533,15 @@ begin
end;
}
end;
-{
+
WM_COMMAND: begin
+ case wParam shr 16 of
+ CBN_EDITCHANGE,
+ BN_CLICKED:
+ SendMessage(GetParent(GetParent(Dialog)),PSM_CHANGED,0,0);
+ end;
end;
-}
+
WM_HELP: begin
ServiceBlock:=GetWindowLongPtrW(Dialog,GWLP_USERDATA);
SendMessage(ServiceBlock,WM_HELP,0,0);
diff --git a/plugins/Actman30/iac_settings.pas b/plugins/Actman30/iac_settings.pas
index bb2c8efe5a..0cd7d82507 100644
--- a/plugins/Actman30/iac_settings.pas
+++ b/plugins/Actman30/iac_settings.pas
@@ -36,7 +36,7 @@ begin
CheckDlgButton(Dialog,IDC_FR_FLAG,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
fCLformat:pWideChar;
lp:TLPARAM;
diff --git a/plugins/Actman30/iac_storage.pas b/plugins/Actman30/iac_storage.pas
index aaa7351452..53be7dd153 100644
--- a/plugins/Actman30/iac_storage.pas
+++ b/plugins/Actman30/iac_storage.pas
@@ -208,7 +208,7 @@ begin
CheckDlgButton(Dialog,IDC_FLAG_FROM,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=0;
diff --git a/plugins/Actman30/iac_text.pas b/plugins/Actman30/iac_text.pas
index e6a05d8fc0..ddebb3f3c8 100644
--- a/plugins/Actman30/iac_text.pas
+++ b/plugins/Actman30/iac_text.pas
@@ -387,7 +387,7 @@ begin
CheckDlgButton (Dialog,IDC_TXT_POST,BST_UNCHECKED);
end;
-function DlgProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
NoProcess:boolean=true;
begin
diff --git a/plugins/Actman30/inoutxml.pas b/plugins/Actman30/inoutxml.pas
index 3a7aea25d4..cd11c1a963 100644
--- a/plugins/Actman30/inoutxml.pas
+++ b/plugins/Actman30/inoutxml.pas
@@ -77,7 +77,7 @@ begin
CloseHandle(f);
//MessageBoxW(0,res,'SRC',0);
- xmlparser.cbSize:=SizeOf(XML_API_W);
+ xmlparser.cbSize:=SizeOf(TXML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
begin
diff --git a/plugins/Actman30/question.pas b/plugins/Actman30/question.pas
index 9e5f0d1b59..d936b65794 100644
--- a/plugins/Actman30/question.pas
+++ b/plugins/Actman30/question.pas
@@ -19,7 +19,7 @@ const
imp_noall = 4;
imp_append = 5;
-function QuestionDlg(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
+function QuestionDlg(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
diff --git a/plugins/Actman30/tasks/i_opt_dlg.inc b/plugins/Actman30/tasks/i_opt_dlg.inc
index e6797e3a9a..bf8d45f63c 100644
--- a/plugins/Actman30/tasks/i_opt_dlg.inc
+++ b/plugins/Actman30/tasks/i_opt_dlg.inc
@@ -300,7 +300,7 @@ begin
CheckTaskList(Dialog,false);
end;
-function NewHKTableProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewHKTableProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
@@ -404,7 +404,7 @@ begin
SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,LPARAM(@ti));
end;
-function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOpt(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd:HWND;
lv:LV_COLUMNW;
diff --git a/plugins/Actman30/tasks/i_options.inc b/plugins/Actman30/tasks/i_options.inc
index 527e8d0c88..da5cce0c40 100644
--- a/plugins/Actman30/tasks/i_options.inc
+++ b/plugins/Actman30/tasks/i_options.inc
@@ -83,6 +83,7 @@ begin
StrCopy(p,opt_name ); name :=DBReadUnicode(0,DBBranch,section);
StrCopy(p,opt_action); action :=DBReadDWord (0,DBBranch,section);
StrCopy(p,opt_days ); dayoffset:=DBReadByte (0,DBBranch,section);
+ //!! smallint?
StrCopy(p,opt_repeat); count :=Shortint(DBReadWord(0,DBBranch,section));
StrCopy(p,opt_time_lo ); starttime.dwLowDateTime :=DBReadDWord(0,DBBranch,section);
diff --git a/plugins/Actman30/ua/i_inoutjson.inc b/plugins/Actman30/ua/i_inoutjson.inc
index 61879200a1..b560e99fb1 100644
--- a/plugins/Actman30/ua/i_inoutjson.inc
+++ b/plugins/Actman30/ua/i_inoutjson.inc
@@ -25,6 +25,7 @@ const
ioMenuShow :PWideChar = 'Show';
ioMenuUsed :PWideChar = 'Used';
ioMenuSeparated :PWideChar = 'Separated';
+ ioNoTRanslate :PWideChar = 'NoTranslate';
function ImportMenuItems(node:JSONNODE;var MenuItem:tUAMenuItem):integer;
@@ -48,6 +49,9 @@ begin
// separated
if StrToInt(getAttrValue(node,ioMenuSeparated))<>0 then
menu_opt:=menu_opt or UAF_MENUSEP;
+ // no translate
+ if StrToInt(getAttrValue(node,ioMenuNotranslate))<>0 then
+ menu_opt:=menu_opt or UAF_NOTRANAS;
end;
end;
end;
@@ -210,6 +214,8 @@ begin
AddAttrInt(result,ioMenuUsed,ord((menu_opt AND UAF_MENUUSE)<>0));
// separated
AddAttrInt(result,ioMenuSeparated,ord((menu_opt AND UAF_MENUSEP)<>0));
+ // no translate
+ AddAttrInt(result,ioNoTranslate,ord((menu_opt AND UAF_NOTRANS)<>0));
end;
end;
end;
diff --git a/plugins/Actman30/ua/i_inoutxm.inc b/plugins/Actman30/ua/i_inoutxm.inc
index a052a5a0e0..bf53ff954a 100644
--- a/plugins/Actman30/ua/i_inoutxm.inc
+++ b/plugins/Actman30/ua/i_inoutxm.inc
@@ -1,6 +1,6 @@
{}
var
- xmlparser:XML_API_W;
+ xmlparser:TXML_API_W;
const
ioAction :PWideChar = 'Action';
@@ -25,6 +25,7 @@ const
ioMenuShow :PWideChar = 'Show';
ioMenuUsed :PWideChar = 'Used';
ioMenuSeparated :PWideChar = 'Separated';
+ ioNoTranslate :PWideChar = 'NoTranslate';
function ImportMenuItems(node:HXML;var MenuItem:tUAMenuItem):integer;
@@ -48,6 +49,9 @@ begin
// separated
if StrToInt(getAttrValue(node,ioMenuSeparated))<>0 then
menu_opt:=menu_opt or UAF_MENUSEP;
+ // no translate
+ if StrToInt(getAttrValue(node,ioNoTranslate))<>0 then
+ menu_opt:=menu_opt or UAF_NOTRANS;
end;
end;
end;
@@ -135,7 +139,7 @@ begin
BlockRead(f,res^,i);
CloseHandle(f);
- xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(XML_API_W);
+ xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(TXML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
begin
@@ -211,6 +215,8 @@ begin
AddAttrInt(result,ioMenuUsed,ord((menu_opt AND UAF_MENUUSE)<>0));
// separated
AddAttrInt(result,ioMenuSeparated,ord((menu_opt AND UAF_MENUSEP)<>0));
+ // no translate
+ AddAttrInt(result,ioNoTranslate,ord((menu_opt AND UAF_NOTRANS)<>0));
end;
end;
end;
@@ -300,7 +306,7 @@ var
ptr,ptr1:pChain;
begin
result:=0;
- xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(XML_API_W);
+ xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(TXML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
begin
diff --git a/plugins/Actman30/ua/i_opt_dlg.inc b/plugins/Actman30/ua/i_opt_dlg.inc
index 643aa253b7..5a85bf2a52 100644
--- a/plugins/Actman30/ua/i_opt_dlg.inc
+++ b/plugins/Actman30/ua/i_opt_dlg.inc
@@ -1,122 +1,133 @@
{}
const
settings:HWND = 0;
-const
- NumControls = 17;
-
- IDsArray:array [0..NumControls-1] of integer =(
- // Menu settings controls
- IDC_UA_SEPARATE ,IDC_UA_POPUPT ,IDC_UA_POPUPV,
- IDC_UA_VARNAMEST,IDC_UA_VARNAMESV,IDC_UA_VARNAMESH,
- IDC_UA_SHOWVART ,IDC_UA_SHOWVARV ,IDC_UA_SHOWVARH,
- IDC_UA_TWOSTATE ,IDC_UA_SAVSTATE ,IDC_UA_COMMON,
- // toolbar settings controls
- IDC_UA_TTNORMALT,IDC_UA_TTNORMALV,IDC_UA_TTPRESSEDT,IDC_UA_TTPRESSEDV,
- IDC_UA_GLOBAL
- );
-
- // Show-hide controls by place type
- SHArray:array [0..NumTypes-1, 0..NumControls-1] of integer = (
- // CList Modern toolbar
- (SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE,SW_HIDE,SW_HIDE, SW_SHOW,SW_SHOW,SW_SHOW,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,SW_SHOW, SW_HIDE),
- // TabSRMM toolbar
- (SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE,SW_HIDE,SW_HIDE,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW),
- // Core Hotkey
- (SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE,SW_HIDE,SW_HIDE,
- SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE,SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE),
- // Main menu
- (SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_HIDE,SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE),
- // Contact menu
- (SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_HIDE,SW_HIDE,SW_HIDE,SW_HIDE, SW_SHOW),
- // Tray menu
- (SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_HIDE,SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE),
- // Protocol menu
- (SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_HIDE,SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE),
- // Status menu
- (SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW, SW_SHOW,SW_SHOW,SW_SHOW,
- SW_SHOW,SW_SHOW,SW_SHOW, SW_HIDE,SW_HIDE,SW_HIDE,SW_HIDE, SW_HIDE)
- );
- // additional show/hide controls check by Variables installings (1 - need to check)
- SHVarArray:array [0..NumControls-1] of byte = (
- 0,0,0, 0,0,1, 1,1,1,
- 0,0,0,0,0,0,0, 0);
- // additional enable/disable controls check (1 - always enable)
- EnDisArray:array [0..NumControls-1] of byte = (
- 0,0,0, 0,0,0, 0,0,0,
- 1,1,1,0,0,0,0, 1);
var
hIC:THANDLE;
-procedure CheckPlacesAbility;
-var
- i:integer;
+//----- Static (no option-depended) control view -----
+
+procedure HideAllControls(Dialog:HWND);
begin
- for i:=0 to NumTypes-1 do
- begin
- with NamesArray[i] do
- begin
- enable:=(service=nil) or (ServiceExists(service)<>0);
- end;
- end;
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_GLOBAL ),SW_HIDE);
+
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_BLOCK ),SW_HIDE);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_MENU ),SW_HIDE);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_NOTRANSLATE),SW_HIDE);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_SEPARATE ),SW_HIDE);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_POPUPT ),SW_HIDE);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_VARNAMEST ),SW_HIDE);
+// ShowWindow(GetDlgItem(Dialog,IDC_UA_NOTRANSLATE),SW_HIDE);
+
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TTNORMALT ),SW_HIDE);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TTPRESSEDT ),SW_HIDE);
+
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_SHOWVART ),SW_HIDE);
+
+
+ ShowEditField(Dialog,IDC_UA_SHOWVARV ,SW_HIDE);
+ ShowEditField(Dialog,IDC_UA_VARNAMESV ,SW_HIDE);
+ ShowEditField(Dialog,IDC_UA_POPUPV ,SW_HIDE);
+ ShowEditField(Dialog,IDC_UA_TTNORMALV ,SW_HIDE);
+ ShowEditField(Dialog,IDC_UA_TTPRESSEDV,SW_HIDE);
end;
-// Show or hide option items
-procedure SetupControls(Dialog:HWND;atype:integer;item:integer=-1);
+// Show or hide option items ("static options")
+procedure ShowHideControls(Dialog:HWND;atype:integer;item:integer=-1);
var
- i: cardinal;
- typ:integer;
- wnd,wnd1:HWND;
- enable:boolean;
+ show:integer;
begin
- if atype<0 then
+ HideAllControls(Dialog);
+ if atype>=0 then
begin
- for i:=0 to NumControls-1 do
- begin
- ShowWindow(GetDlgItem(Dialog,IDsArray[i]),SW_HIDE);
- end;
- end
- else
- begin
- wnd1:=GetDlgItem(Dialog,IDC_UA_PLACELIST);
- if item<0 then
- item:=SendMessage(wnd1,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
- enable:=ListView_GetCheckState(wnd1,item)<>0;
+ if LoByte(atype)<>uaHotkey then
+ show:=SW_SHOW
+ else
+ show:=SW_HIDE;
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TWOSTATE),show);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_SAVSTATE),show);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_COMMON ),show);
- for i:=0 to NumControls-1 do
- begin
- typ:=SHArray[LoByte(atype)+HiByte(atype)][i];
- if typ=SW_SHOW then
- if (SHVarArray[i]<>0) and (not IsVarsInstalled) then
- typ:=SW_HIDE;
- wnd:=GetDlgItem(Dialog,IDsArray[i]);
- ShowWindow(wnd,typ);
- EnableWindow(wnd,enable or (EnDisArray[i]<>0));
- end;
+ case LoByte(atype) of
+ uaTTB: begin
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_SHOWVART ),SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_SHOWVARV ,SW_SHOW);
+
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TTNORMALT ),SW_SHOW);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TTPRESSEDT),SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_TTNORMALV ,SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_TTPRESSEDV,SW_SHOW);
+ end;
+ uaTAB: begin
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_GLOBAL ),SW_SHOW);
- // common settings
- EnableWindow(GetDlgItem(Dialog,IDC_UA_SAVSTATE),
- IsDlgButtonChecked(Dialog,IDC_UA_TWOSTATE)<>BST_UNCHECKED);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TTNORMALT ),SW_SHOW);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_TTPRESSEDT),SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_TTNORMALV ,SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_TTPRESSEDV,SW_SHOW);
+ end;
+ uaHotkey: begin
+ end;
+ uaMenu: begin
+ if tMenuType(HiByte(atype))=contact_menu then
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_GLOBAL),SW_SHOW);
- // personal settings
- case LoByte(atype) of
- uaTTB, uaTAB: begin
- enable:=false;
- if IsDlgButtonChecked(Dialog,IDC_UA_TWOSTATE)<>BST_UNCHECKED then
- if IsWindowEnabled(GetDlgItem(Dialog,IDC_UA_TTNORMALV)) then
- enable:=true;
- EnableWindow(GetDlgItem(Dialog,IDC_UA_TTPRESSEDV),enable);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_BLOCK ),SW_SHOW);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_MENU ),SW_SHOW);
+
+//!! ShowWindow(GetDlgItem(Dialog,IDC_UA_SEPARATE ),SW_SHOW);
+//!! ShowWindow(GetDlgItem(Dialog,IDC_UA_SEPARATE ),SW_SHOW);
+
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_SHOWVART ),SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_SHOWVARV ,SW_SHOW);
+
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_POPUPT ),SW_SHOW);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_VARNAMEST ),SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_VARNAMESV ,SW_SHOW);
+ ShowEditField(Dialog,IDC_UA_POPUPV ,SW_SHOW);
+
+// ShowWindow(GetDlgItem(Dialog,IDC_UA_NOTRANSLATE),SW_SHOW);
end;
end;
end;
end;
+procedure EnableDisableCheck(Dialog:HWND);
+var
+ wnd:HWND;
+ item:integer;
+ two,enable:boolean;
+begin
+ wnd:=GetDlgItem(Dialog,IDC_UA_PLACELIST);
+ item:=SendMessage(wnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
+ enable:=ListView_GetCheckState(wnd,item)<>0;
+
+ // common settings
+ two:=IsDlgButtonChecked(Dialog,IDC_UA_TWOSTATE)<>BST_UNCHECKED;
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_SAVSTATE),two);
+
+ // all others
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_BLOCK ),enable);
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_MENU ),enable);
+
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_NOTRANSLATE),enable);
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_SEPARATE ),enable);
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_POPUPT ),enable);
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_VARNAMEST ),enable);
+
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_TTNORMALT ),enable);
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_TTPRESSEDT ),enable);
+
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_SHOWVART ),enable);
+
+ EnableEditField(Dialog,IDC_UA_SHOWVARV ,enable);
+ EnableEditField(Dialog,IDC_UA_VARNAMESV ,enable);
+ EnableEditField(Dialog,IDC_UA_POPUPV ,enable);
+ EnableEditField(Dialog,IDC_UA_TTNORMALV ,enable);
+
+ EnableEditField(Dialog,IDC_UA_TTPRESSEDV,enable and two);
+end;
+
// Clear all screen buttons/text fields (reset)
procedure ClearControls(Dialog:HWND);
var
@@ -124,16 +135,108 @@ var
begin
s:=settings;
settings:=0;
- CheckDlgButton (Dialog,IDC_UA_TWOSTATE ,BST_UNCHECKED);
- CheckDlgButton (Dialog,IDC_UA_SAVSTATE ,BST_UNCHECKED);
+ // common
+ CheckDlgButton (Dialog,IDC_UA_TWOSTATE,BST_UNCHECKED);
+ CheckDlgButton (Dialog,IDC_UA_SAVSTATE,BST_UNCHECKED);
+
+ // menu items
+ SetDlgItemTextW(Dialog,IDC_UA_BLOCK ,'>');
+ CheckDlgButton (Dialog,IDC_UA_SEPARATE ,BST_UNCHECKED);
+ CheckDlgButton (Dialog,IDC_UA_NOTRANSLATE,BST_UNCHECKED);
+ SetDlgItemTextW(Dialog,IDC_UA_POPUPV ,nil);
+ SetDlgItemTextW(Dialog,IDC_UA_VARNAMESV ,nil);
+
+ SetDlgItemTextW(Dialog,IDC_UA_SHOWVARV ,nil);
+ // buttons
+ SetDlgItemTextW(Dialog,IDC_UA_TTNORMALV ,nil);
+ SetDlgItemTextW(Dialog,IDC_UA_TTPRESSEDV,nil);
+
+ // contact related
+ CheckDlgButton (Dialog,IDC_UA_GLOBAL,BST_UNCHECKED);
- CheckDlgButton (Dialog,IDC_UA_SEPARATE ,BST_UNCHECKED);
- SetDlgItemTextW(Dialog,IDC_UA_POPUPV ,nil);
- SetDlgItemTextW(Dialog,IDC_UA_VARNAMESV,nil);
- SetDlgItemTextW(Dialog,IDC_UA_SHOWVARV ,nil);
settings:=s;
end;
+procedure InitActionSettings(Dialog:HWND);
+begin
+ MakeEditField(Dialog,IDC_UA_TTNORMALV);
+ SetEditFlags(GetDlgItem(Dialog,IDC_UA_TTNORMALV),EF_FORCE,EF_FORCET);
+ MakeEditField(Dialog,IDC_UA_TTPRESSEDV);
+ SetEditFlags(GetDlgItem(Dialog,IDC_UA_TTPRESSEDV),EF_FORCE,EF_FORCET);
+
+ MakeEditField(Dialog,IDC_UA_POPUPV);
+ MakeEditField(Dialog,IDC_UA_VARNAMESV);
+
+ MakeEditField(Dialog,IDC_UA_SHOWVARV);
+ SetEditFlags(GetDlgItem(Dialog,IDC_UA_SHOWVARV),EF_FORCE,EF_FORCES);
+end;
+
+function CompareItem(lParam1,lParam2:LPARAM;SortType:LPARAM):int; stdcall;
+begin
+ result:=UActionList[lParam1].wSortIndex-UActionList[lParam2].wSortIndex;
+end;
+
+procedure FillActionList(wnd:HWND);
+var
+ i:integer;
+ li:LV_ITEMW;
+ il:HIMAGELIST;
+ lmenu:tMenuType;
+begin
+ wnd:=GetDlgItem(wnd,IDC_UA_ACTIONLIST);
+ SendMessage(wnd,LVM_DELETEALLITEMS,0,0);
+
+ il:=ImageList_Create(16,16,ILC_COLOR32 or ILC_MASK,0,1);
+ for i:=0 to HIGH(UActionList) do
+ begin
+ li.mask :=LVIF_TEXT+LVIF_PARAM+LVIF_IMAGE;
+ li.iSubItem:=0;
+ li.iItem :=i;
+ li.lParam :=i;
+ li.pszText :=UActionList[i].szActDescr;
+ li.iImage:=ImageList_ReplaceIcon(il, -1,
+ HICON(CallService(MS_SKIN2_GETICONBYHANDLE,0,LPARAM(UActionList[i].hIcolibIcon))));
+ li.iItem :=SendMessageW(wnd,LVM_INSERTITEMW,0,LPARAM(@li));
+
+ for lmenu:=main_menu to HIGH(tMenuType) do
+ UActionList[i].UAMenuItem[lmenu].changed:=false;
+ end;
+ ImageList_Destroy(SendMessage(wnd,LVM_SETIMAGELIST,LVSIL_SMALL,il));
+
+ SendMessage(wnd,LVM_SORTITEMS,0,LPARAM(@CompareItem));
+
+ ListView_SetItemState(wnd,0,
+ LVIS_FOCUSED or LVIS_SELECTED,
+ LVIS_FOCUSED or LVIS_SELECTED);
+end;
+
+// refresh icons in UA list (at least)
+function IconChanged(wParam:WPARAM;lParam:LPARAM):int;cdecl;
+var
+ i:integer;
+ li:LV_ITEMW;
+ il:HIMAGELIST;
+ wnd:HWND;
+begin
+ result:=0;
+ wnd:=GetDlgItem(settings,IDC_UA_ACTIONLIST);
+
+ il:=ImageList_Create(16,16,ILC_COLOR32 or ILC_MASK,0,1);
+ for i:=0 to HIGH(UActionList) do
+ begin
+ li.mask :=LVIF_IMAGE;
+ li.iSubItem:=0;
+ li.iItem :=i;
+ li.iImage:=ImageList_ReplaceIcon(il, -1,
+ HICON(CallService(MS_SKIN2_GETICONBYHANDLE,0,TLPARAM(UActionList[i].hIcolibIcon))));
+ SendMessageW(wnd,LVM_SETITEM,0,TLPARAM(@li));
+ end;
+ ImageList_Destroy(SendMessage(wnd,LVM_SETIMAGELIST,LVSIL_SMALL,il));
+//!!refresh?
+end;
+
+//----- Dynamic (option-depended) view -----
+
procedure ShowSubAction(Dialog:HWND;aType:integer;item:integer=-1);
var
UA:pMyActionItem;
@@ -176,6 +279,8 @@ begin
begin
if (menu_opt and UAF_MENUSEP)<>0 then
CheckDlgButton(Dialog,IDC_UA_SEPARATE,BST_CHECKED);
+ if (menu_opt and UAF_NOTRANS)<>0 then
+ CheckDlgButton(Dialog,IDC_UA_NOTRANSLATE,BST_CHECKED);
SetDlgItemTextW(Dialog,IDC_UA_POPUPV ,szMenuPopup);
SetDlgItemTextW(Dialog,IDC_UA_VARNAMESV,szMenuNameVars);
SetDlgItemTextW(Dialog,IDC_UA_SHOWVARV ,szMenuShowWhenVars);
@@ -186,7 +291,8 @@ begin
// Settings in Customize/Hotkeys
end;
end;
- SetupControls(Dialog,aType,-1);
+ ShowHideControls(Dialog,aType,-1);
+ EnableDisableCheck(Dialog);
settings:=s;
end;
@@ -250,10 +356,12 @@ begin
else
begin
ClearControls(Dialog);
- SetupControls(Dialog,-1,-1);
+ ShowHideControls(Dialog,-1,-1);
end;
end;
+//----- Saving -----
+
procedure SetChangedFlag(Dialog:HWND);
var
num,atype:integer;
@@ -271,6 +379,8 @@ begin
mFreeMem(szMenuNameVars ); szMenuNameVars :=GetDlgText(Dialog,IDC_UA_VARNAMESV);
mFreeMem(szMenuShowWhenVars); szMenuShowWhenVars:=GetDlgText(Dialog,IDC_UA_SHOWVARV);
menu_opt:=0;
+ if IsDlgButtonchecked(Dialog,IDC_UA_NOTRANSLATE)<>BST_UNCHECKED then
+ menu_opt:=menu_opt or UAF_NOTRANS;
if IsDlgButtonchecked(Dialog,IDC_UA_SEPARATE)<>BST_UNCHECKED then
menu_opt:=menu_opt or UAF_MENUSEP;
end;
@@ -349,75 +459,46 @@ begin
end;
end;
-function CompareItem(lParam1,lParam2:LPARAM;SortType:LPARAM):int; stdcall;
-begin
- result:=UActionList[lParam1].wSortIndex-UActionList[lParam2].wSortIndex;
-end;
-
-procedure FillActionList(wnd:HWND);
+procedure ChangeBlock(Dialog:HWND);
var
- i:integer;
- li:LV_ITEMW;
- il:HIMAGELIST;
- lmenu:tMenuType;
+ pc:pWideChar;
+ sh_main,sh_add:integer;
begin
- wnd:=GetDlgItem(wnd,IDC_UA_ACTIONLIST);
- SendMessage(wnd,LVM_DELETEALLITEMS,0,0);
-
- il:=ImageList_Create(16,16,ILC_COLOR32 or ILC_MASK,0,1);
- for i:=0 to HIGH(UActionList) do
- begin
- li.mask :=LVIF_TEXT+LVIF_PARAM+LVIF_IMAGE;
- li.iSubItem:=0;
- li.iItem :=i;
- li.lParam :=i;
- li.pszText :=UActionList[i].szActDescr;
- li.iImage:=ImageList_ReplaceIcon(il, -1,
- HICON(CallService(MS_SKIN2_GETICONBYHANDLE,0,LPARAM(UActionList[i].hIcolibIcon))));
- li.iItem :=SendMessageW(wnd,LVM_INSERTITEMW,0,LPARAM(@li));
-
- for lmenu:=main_menu to HIGH(tMenuType) do
- UActionList[i].UAMenuItem[lmenu].changed:=false;
- end;
- ImageList_Destroy(SendMessage(wnd,LVM_SETIMAGELIST,LVSIL_SMALL,il));
-
- SendMessage(wnd,LVM_SORTITEMS,0,LPARAM(@CompareItem));
-
- ListView_SetItemState(wnd,0,
- LVIS_FOCUSED or LVIS_SELECTED,
- LVIS_FOCUSED or LVIS_SELECTED);
-end;
-
-// refresh icons in UA list (at least)
-function IconChanged(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- i:integer;
- li:LV_ITEMW;
- il:HIMAGELIST;
- wnd:HWND;
-begin
- result:=0;
- wnd:=GetDlgItem(settings,IDC_UA_ACTIONLIST);
-
- il:=ImageList_Create(16,16,ILC_COLOR32 or ILC_MASK,0,1);
- for i:=0 to HIGH(UActionList) do
+ if IsWindowVisible(GetDlgItem(Dialog,IDC_UA_POPUPV)) then
begin
- li.mask :=LVIF_IMAGE;
- li.iSubItem:=0;
- li.iItem :=i;
- li.iImage:=ImageList_ReplaceIcon(il, -1,
- HICON(CallService(MS_SKIN2_GETICONBYHANDLE,0,TLPARAM(UActionList[i].hIcolibIcon))));
- SendMessageW(wnd,LVM_SETITEM,0,TLPARAM(@li));
+ pc:='<';
+ sh_main:=SW_HIDE;
+ sh_add :=SW_SHOW;
+ end
+ else
+ begin
+ pc:='>';
+ sh_main:=SW_SHOW;
+ sh_add :=SW_HIDE;
end;
- ImageList_Destroy(SendMessage(wnd,LVM_SETIMAGELIST,LVSIL_SMALL,il));
-//!!refresh?
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_NOTRANSLATE),sh_add);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_SEPARATE ),sh_add);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_POPUPT ),sh_main);
+ ShowWindow(GetDlgItem(Dialog,IDC_UA_VARNAMEST ),sh_main);
+ ShowEditField(Dialog,IDC_UA_VARNAMESV,sh_main);
+ ShowEditField(Dialog,IDC_UA_POPUPV ,sh_main);
+
+ SetDlgItemTextW(Dialog,IDC_UA_BLOCK,pc);
+ if sh_main=SW_SHOW then
+ pc:='Main settings'
+ else
+ pc:='Custom settings';
+ SetDlgItemTextW(Dialog,IDC_UA_MENU,TranslateW(pc));
end;
-function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+//----- Main Dialog -----
+
+function DlgProcOpt(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd:HWND;
lv:LV_COLUMNW;
i:integer;
+ twostate:bool;
begin
result:=0;
case hMessage of
@@ -430,6 +511,8 @@ begin
settings:=0;
TranslateDialogDefault(Dialog);
+ InitActionSettings(Dialog);
+
wnd:=GetDlgItem(Dialog,IDC_UA_PLACELIST);
SendMessage(wnd,LVM_SETEXTENDEDLISTVIEWSTYLE,LVS_EX_CHECKBOXES,LVS_EX_CHECKBOXES);
SendMessage(wnd,LVM_SETUNICODEFORMAT,1,0);
@@ -450,16 +533,6 @@ begin
FillActionList(Dialog);
ShowAction(Dialog,-1);
-// if isVarsInstalled then
- begin
- SendDlgItemMessage(Dialog,IDC_UA_VARNAMESH,BM_SETIMAGE,IMAGE_ICON,
- CallService(MS_VARS_GETSKINITEM,0,VSI_HELPICON));
- SendDlgItemMessage(Dialog,IDC_UA_SHOWVARH,BM_SETIMAGE,IMAGE_ICON,
- CallService(MS_VARS_GETSKINITEM,0,VSI_HELPICON));
-// SendDlgItemMessage(Dialog,IDC_UA_VARNAMESH,BUTTONSETASFLATBTN,0,0);
-// SendDlgItemMessage(Dialog,IDC_UA_SHOWVARH ,BUTTONSETASFLATBTN,0,0);
- end;
-
settings:=Dialog;
hIC:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
end;
@@ -480,29 +553,36 @@ begin
begin
case loword(wParam) of
IDC_UA_TWOSTATE: begin
- SetupControls(Dialog,
+ twostate:=IsDlgButtonChecked(Dialog,IDC_UA_TWOSTATE)<>BST_UNCHECKED;
+ EnableWindow(GetDlgItem(Dialog,IDC_UA_SAVSTATE),twostate);
+
+ if LoByte(LV_GetLParam(GetDlgItem(Dialog,IDC_UA_PLACELIST))) in [uaTTB,uaTAB] then
+ EnableEditField(Dialog,IDC_UA_TTPRESSEDV,
+ twostate and IsWindowEnabled(GetDlgItem(Dialog,IDC_UA_TTNORMALV))
+ );
+
+ ShowHideControls(Dialog,
LV_GetLParam(GetDlgItem(Dialog,IDC_UA_PLACELIST)),-1);
- {
- EnableWindow(GetDlgItem(Dialog,IDC_UA_TTPRESSEDV),
- IsDlgButtonChecked(Dialog,IDC_UA_TWOSTATE)<>BST_UNCHECKED);
- }
- if IsDlgButtonChecked(Dialog,IDC_UA_TWOSTATE)=BST_UNCHECKED then
- DeleteIcolibIconP(
+
+ if twostate then
+ AddIcolibIconP(
UActionList[LV_GetLParam(GetDlgItem(Dialog,IDC_UA_ACTIONLIST),-1)])
else
- AddIcolibIconP(
+ DeleteIcolibIconP(
UActionList[LV_GetLParam(GetDlgItem(Dialog,IDC_UA_ACTIONLIST),-1)]);
SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
end;
- IDC_UA_VARNAMESH: ShowVarHelp(Dialog,IDC_UA_VARNAMESV);
- IDC_UA_SHOWVARH : ShowVarHelp(Dialog,IDC_UA_SHOWVARV);
-
//was commented. why?
IDC_UA_SAVSTATE,
IDC_UA_GLOBAL: SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
+ IDC_UA_BLOCK: begin
+ ChangeBlock(Dialog);
+ end;
+
+ IDC_UA_NOTRANSLATE,
IDC_UA_SEPARATE: begin
SetChangedFlag(Dialog);
SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
@@ -548,6 +628,7 @@ begin
LV_GetLParam(GetDlgItem(Dialog,IDC_UA_PLACELIST),
PNMLISTVIEW(lParam)^.iItem));
end
+ // checkboxes
else if (settings<>0) and
((PNMLISTVIEW(lParam)^.uOldState or PNMLISTVIEW(lParam)^.uNewState)=$3000) then
begin
@@ -559,8 +640,7 @@ begin
LVIS_FOCUSED or LVIS_SELECTED,
LVIS_FOCUSED or LVIS_SELECTED)
else
- SetupControls(Dialog,LV_GetLParam(wnd,PNMLISTVIEW(lParam)^.iItem),
- PNMLISTVIEW(lParam)^.iItem);
+ EnableDisableCheck(Dialog);
SendMessage(GetParent(Dialog),PSM_CHANGED,0,0);
end;
diff --git a/plugins/Actman30/ua/i_uaplaces.inc b/plugins/Actman30/ua/i_uaplaces.inc
index b38d16290e..e250b3d8f1 100644
--- a/plugins/Actman30/ua/i_uaplaces.inc
+++ b/plugins/Actman30/ua/i_uaplaces.inc
@@ -50,7 +50,7 @@ end;
procedure SetTABState(hContact:THANDLE;const ActionItem:tMyActionItem;pressed:integer);
var
- tabb:BBButton;
+ tabb:TBBButton;
pc:pWideChar;
begin
FillChar(tabb,SizeOf(tabb),0);
@@ -225,8 +225,8 @@ begin
if (ActionItem.flags and UAF_HKREGGED)=0 then
begin
FillChar(hkd,SizeOf(hkd),0);
- hkd.cbSize := SizeOf(hkd);
- hkd.dwFlags := HKD_UNICODE;
+ hkd.cbSize := SizeOf(hkd); // HOTKEYDESC_SIZE_V1 for pre-0.9
+ hkd.dwFlags := HKD_UNICODE; // since 0.9 only
hkd.pszName := ActionItem.szNameID;
hkd.pszDescription.w:= ActionItem.szActDescr;
hkd.pszSection .w:= MODULE_NAME;
@@ -381,7 +381,10 @@ begin
begin
FillChar(clmi,SizeOf(clmi),0);
clmi.cbSize:=SizeOf(clmi);
- clmi.flags :=CMIF_UNICODE{ or CMIF_ICONFROMICOLIB};
+ if (UAMenuItem.menu_opt and UAF_NOTRANS)<>0 then
+ clmi.flags :=CMIF_UNICODE or CMIF_KEEPUNTRANSLATED
+ else
+ clmi.flags :=CMIF_UNICODE{ or CMIF_ICONFROMICOLIB};
if (UAMenuItem.szMenuPopup<>nil) and (UAMenuItem.szMenuPopup^<>#0) then
clmi.szName.w:=ParseVarString(UAMenuItem.szMenuPopup)
@@ -418,7 +421,10 @@ begin
{}{}
FillChar(clmi,SizeOf(clmi),0);
clmi.cbSize:=SizeOf(clmi);
- clmi.flags:=CMIF_UNICODE{ or CMIF_ICONFROMICOLIB};
+ if (UAMenuItem.menu_opt and UAF_NOTRANS)<>0 then
+ clmi.flags :=CMIF_UNICODE or CMIF_KEEPUNTRANSLATED
+ else
+ clmi.flags :=CMIF_UNICODE{ or CMIF_ICONFROMICOLIB};
if (ActionItem.flags and (UAF_2STATE+UAF_PRESSED))<>(UAF_2STATE+UAF_PRESSED) then
begin
clmi.hIcon:=ActionItem.hIcolibIcon;
@@ -427,7 +433,7 @@ begin
else
begin
clmi.hIcon:=ActionItem.hIcolibIconPressed;
- clmi.flags:=CMIF_UNICODE {or CMIF_ICONFROMICOLIB }or CMIF_CHECKED;
+ clmi.flags:=clmi.flags or CMIF_CHECKED;
extra:='1';
end;
@@ -463,7 +469,7 @@ begin
end;
-function PreBuildMenu(mtype:tMenuType;hContact:MCONTACT=0):int;
+function PreBuildMenu(mtype:tMenuType;hContact:TMCONTACT=0):int;
var
i:integer;
mi:TCListMenuItem;
@@ -703,7 +709,7 @@ const
procedure AddTabBBButton(var ActionItem:tMyActionItem);
var
- tabb:BBButton;
+ tabb:TBBButton;
begin
if not NamesArray[uaTAB].enable then exit;
@@ -736,7 +742,7 @@ end;
procedure DeleteTabBBButton(var ActionItem:tMyActionItem);
var
- tabb:BBButton;
+ tabb:TBBButton;
begin
if (ActionItem.flags and UAF_TBREGGED)<>0 then
begin
diff --git a/plugins/Actman30/ua/i_uavars.inc b/plugins/Actman30/ua/i_uavars.inc
index 5b53cde26a..dc11d5b76d 100644
--- a/plugins/Actman30/ua/i_uavars.inc
+++ b/plugins/Actman30/ua/i_uavars.inc
@@ -29,9 +29,6 @@ type
type
pMyActionItem = ^tMyActionItem;
tMyActionItem = record
- flags :dword;
- dwActID :dword; // action ID
- wSortIndex :word; // list/menu/toolbar order
// UseActions/Action_ID
szNameID :pAnsiChar; // uaction ID
szActDescr :pWideChar; // action name
@@ -50,6 +47,10 @@ type
lastContact :THANDLE; // for contact menu
hMenuService :THANDLE; // common menu service
UAMenuItem :array [tMenuType] of tUAMenuItem;
+ // moved to the end for better align
+ flags :dword;
+ dwActID :dword; // action ID
+ wSortIndex :word; // list/menu/toolbar order
end;
const
@@ -77,6 +78,7 @@ const
// menu options
UAF_MENUSEP = 1 shl 1; // menu item separated
UAF_MENUUSE = 1 shl 8; // use this menu
+ UAF_NOTRANS = 1 shl 9; // do not translate menus
type
tNameRec = record
diff --git a/plugins/Actman30/ua/i_uconst.inc b/plugins/Actman30/ua/i_uconst.inc
index 34dde3ee9e..cffbfdcc76 100644
--- a/plugins/Actman30/ua/i_uconst.inc
+++ b/plugins/Actman30/ua/i_uconst.inc
@@ -2,33 +2,35 @@
const
IDD_UA = 1031;
- IDC_UA_ACTIONLIST = 1025;
- IDC_UA_PLACELIST = 1026;
+ IDC_UA_ACTIONLIST = 1025;
+ IDC_UA_PLACELIST = 1026;
// menu settings
- IDC_UA_SEPARATE = 1027;
- IDC_UA_POPUPT = 1028;
- IDC_UA_POPUPV = 1029;
+ IDC_UA_POPUPT = 1030;
+ IDC_UA_POPUPV = 1031;
- IDC_UA_VARNAMEST = 1030;
- IDC_UA_VARNAMESV = 1031;
- IDC_UA_VARNAMESH = 1032;
+ IDC_UA_VARNAMEST = 1032;
+ IDC_UA_VARNAMESV = 1033;
- IDC_UA_SHOWVART = 1033;
- IDC_UA_SHOWVARV = 1034;
- IDC_UA_SHOWVARH = 1035;
+ IDC_UA_SHOWVART = 1034;
+ IDC_UA_SHOWVARV = 1035;
+
+ IDC_UA_BLOCK = 1040;
+ IDC_UA_SEPARATE = 1041;
+ IDC_UA_NOTRANSLATE = 1042;
+ IDC_UA_MENU = 1043;
// toolbar settings
- IDC_UA_TTNORMALT = 2028;
- IDC_UA_TTNORMALV = 2029;
- IDC_UA_TTPRESSEDT = 2030;
- IDC_UA_TTPRESSEDV = 2031;
+ IDC_UA_TTNORMALT = 2028;
+ IDC_UA_TTNORMALV = 2029;
+ IDC_UA_TTPRESSEDT = 2030;
+ IDC_UA_TTPRESSEDV = 2031;
// common
- IDC_UA_COMMON = 2000;
- IDC_UA_TWOSTATE = 2001;
- IDC_UA_SAVSTATE = 2002;
+ IDC_UA_COMMON = 2000;
+ IDC_UA_TWOSTATE = 2001;
+ IDC_UA_SAVSTATE = 2002;
- IDC_UA_GLOBAL = 2003;
+ IDC_UA_GLOBAL = 2003;
IDI_ACTION = 101;
diff --git a/plugins/Actman30/ua/ua.pas b/plugins/Actman30/ua/ua.pas
index 4aad8e1793..9c9554e1c0 100644
--- a/plugins/Actman30/ua/ua.pas
+++ b/plugins/Actman30/ua/ua.pas
@@ -6,7 +6,7 @@ implementation
uses
windows, commctrl, messages,
- mirutils, common, dbsettings, io, m_api, wrapper,
+ mirutils, common, dbsettings, io, m_api, wrapper, editwrapper,
global;
{$R ua.res}
@@ -49,6 +49,19 @@ var
// ------------ base interface functions -------------
+procedure CheckPlacesAbility;
+var
+ i:integer;
+begin
+ for i:=0 to NumTypes-1 do
+ begin
+ with NamesArray[i] do
+ begin
+ enable:=(service=nil) or (ServiceExists(service)<>0);
+ end;
+ end;
+end;
+
procedure Init;
begin
GetModuleFileNameW(hInstance,szMyPath,MAX_PATH);
diff --git a/plugins/Actman30/ua/ua.rc b/plugins/Actman30/ua/ua.rc
index 76d8c0ad77..6e0fdde413 100644
--- a/plugins/Actman30/ua/ua.rc
+++ b/plugins/Actman30/ua/ua.rc
@@ -7,44 +7,47 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0
{
- CTEXT "Action list",-1, 2,2,132,10, SS_CENTERIMAGE
+ CTEXT "Action list",-1, 0,2,134,11, SS_CENTERIMAGE
CONTROL "", IDC_UA_ACTIONLIST, "SysListView32",
WS_BORDER | WS_TABSTOP |
LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_REPORT | LVS_SINGLESEL,
- 2, 12, 132, 212, WS_EX_CONTROLPARENT
+ 0, 13, 134, 212, WS_EX_CONTROLPARENT
- CTEXT "Where to use",-1, 138,2,160,10, SS_CENTERIMAGE
+ CTEXT "Where to use",-1, 138,2,160,11, SS_CENTERIMAGE
CONTROL "", IDC_UA_PLACELIST, "SysListView32",
WS_BORDER | WS_TABSTOP |
LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_REPORT | LVS_SINGLESEL,
- 138, 12, 160, 74, WS_EX_CONTROLPARENT
+ 138, 13, 160, 74, WS_EX_CONTROLPARENT
- GROUPBOX "Common" , IDC_UA_COMMON , 138, 88,160,38
- AUTOCHECKBOX "2 state button/item" , IDC_UA_TWOSTATE, 140, 96,156,14, BS_LEFTTEXT | BS_RIGHT
- AUTOCHECKBOX "Save button/item state", IDC_UA_SAVSTATE, 140,110,156,14, BS_LEFTTEXT | BS_RIGHT
+ GROUPBOX "Common" , IDC_UA_COMMON , 138, 88,164,38
+ AUTOCHECKBOX "2 state button/item" , IDC_UA_TWOSTATE, 140, 96,160,14, BS_LEFTTEXT | BS_RIGHT
+ AUTOCHECKBOX "Save button/item state", IDC_UA_SAVSTATE, 140,110,160,14, BS_LEFTTEXT | BS_RIGHT
- AUTOCHECKBOX "Contact related", IDC_UA_GLOBAL, 138,128,160,14, BS_LEFTTEXT | BS_RIGHT
+ AUTOCHECKBOX "Contact related", IDC_UA_GLOBAL, 138,128,164,14, BS_LEFTTEXT | BS_RIGHT
// Buttons settings block
- RTEXT "Normal button tooltip",IDC_UA_TTNORMALT, 138,148,160,8
- EDITTEXT IDC_UA_TTNORMALV, 138,158,160,12, ES_AUTOHSCROLL
+ RTEXT "Normal button tooltip",IDC_UA_TTNORMALT, 138,144,164,12, SS_CENTERIMAGE
+ EDITTEXT IDC_UA_TTNORMALV, 138,157,164,12, ES_AUTOHSCROLL
- RTEXT "Pressed button tooltip",IDC_UA_TTPRESSEDT, 138,172,160,8
- EDITTEXT IDC_UA_TTPRESSEDV, 138,182,160,12, ES_AUTOHSCROLL
+ RTEXT "Pressed button tooltip",IDC_UA_TTPRESSEDT, 138,172,164,12, SS_CENTERIMAGE
+ EDITTEXT IDC_UA_TTPRESSEDV, 138,185,164,12, ES_AUTOHSCROLL
- // Menu settings block
- AUTOCHECKBOX "Separated",IDC_UA_SEPARATE, 138,142,160,14, BS_LEFTTEXT | BS_RIGHT
+ PUSHBUTTON ">" , IDC_UA_BLOCK, 292,146, 10,52
+ GROUPBOX "Main settings", IDC_UA_MENU , 138,142,152,58
- RTEXT "Root popup:",IDC_UA_POPUPT,138,158,80,12, SS_CENTERIMAGE
- EDITTEXT IDC_UA_POPUPV, 218,158,80,12, ES_AUTOHSCROLL
+ // Block #1 (Menu data block)
+ RTEXT "Root popup:",IDC_UA_POPUPT, 140,150,146,12, SS_CENTERIMAGE
+ EDITTEXT IDC_UA_POPUPV, 141,162,146,12, ES_AUTOHSCROLL
- RTEXT "Menu item name:",IDC_UA_VARNAMEST, 138,172,140,8
- EDITTEXT IDC_UA_VARNAMESV, 138,182,140,12, ES_AUTOHSCROLL
- CONTROL "V",IDC_UA_VARNAMESH,"MButtonClass",WS_TABSTOP, 282,180,16,16, $18000000
+ RTEXT "Menu item name:",IDC_UA_VARNAMEST, 140,174,146,12, SS_CENTERIMAGE
+ EDITTEXT IDC_UA_VARNAMESV, 141,186,146,12, ES_AUTOHSCROLL
- RTEXT "Show only if variables return 1",IDC_UA_SHOWVART, 138,200,140,8
- EDITTEXT IDC_UA_SHOWVARV,138,210,140,12,ES_AUTOHSCROLL
- CONTROL "V",IDC_UA_SHOWVARH,"MButtonClass",WS_TABSTOP, 282,208,16,16, $18000000
+ // Block #2 (Menu settings block)
+ AUTOCHECKBOX "Separated" ,IDC_UA_SEPARATE , 140,150,148,14, BS_LEFTTEXT | BS_RIGHT
+ AUTOCHECKBOX "Do not translate",IDC_UA_NOTRANSLATE, 140,166,148,14, BS_LEFTTEXT | BS_RIGHT
+
+ RTEXT "Show only if variables return 1",IDC_UA_SHOWVART, 138,200,164,12, SS_CENTERIMAGE
+ EDITTEXT IDC_UA_SHOWVARV, 138,213,164,12, ES_AUTOHSCROLL
}
diff --git a/plugins/ExternalAPI/delphi/m_actman.inc b/plugins/ExternalAPI/delphi/m_actman.inc
index 53344e2990..635b576758 100644
--- a/plugins/ExternalAPI/delphi/m_actman.inc
+++ b/plugins/ExternalAPI/delphi/m_actman.inc
@@ -21,7 +21,7 @@ const
type
pChain = ^tChain;
tChain = record
- descr:pWideChar;
+ descr:PWideChar;
id :dword;
flags:dword; // ACCF_* flags
order:dword;
diff --git a/plugins/ExternalAPI/delphi/m_anismiley.inc b/plugins/ExternalAPI/delphi/m_anismiley.inc
index 4fcf598208..f16005fe51 100644
--- a/plugins/ExternalAPI/delphi/m_anismiley.inc
+++ b/plugins/ExternalAPI/delphi/m_anismiley.inc
@@ -40,7 +40,7 @@ const
end;
end;
- BOOL InsertAnimatedSmiley(HWND _hwnd, TCHAR * _szFilename, COLORREF _dwBack, int _nHeight)
+ bool InsertAnimatedSmiley(HWND _hwnd, TCHAR * _szFilename, COLORREF _dwBack, int _nHeight)
{
static int bServiceExists=-1;
ias={0};
@@ -53,7 +53,7 @@ const
ias.dwFlags=IASF_TCHAR;
ias.nHeight=_nHeight;
ias.dwBackColor=_dwBack;
- return (BOOL) CallService(MS_INSERTANISMILEY,(WPARAM)&ias, 0);
+ return (bool) CallService(MS_INSERTANISMILEY,(WPARAM)&ias, 0);
};
*)
diff --git a/plugins/ExternalAPI/delphi/m_assocmgr.inc b/plugins/ExternalAPI/delphi/m_assocmgr.inc
index 83b835a17a..22321a00b4 100644
--- a/plugins/ExternalAPI/delphi/m_assocmgr.inc
+++ b/plugins/ExternalAPI/delphi/m_assocmgr.inc
@@ -45,14 +45,14 @@ Returns 0 on success, nonzero otherwise.
type
PFILETYPEDESC = ^TFILETYPEDESC;
TFILETYPEDESC = record
- cbSize: Integer; // size of this structure, in bytes
+ cbSize: integer; // size of this structure, in bytes
szDescription: TChar; // description for options dialog and in registry.
// please Translate().
hInstance: HINST; // instance where the icon resource is located
- nIconResID: UINT; // resource id of an icon to use for the file type.
+ nIconResID: uint; // resource id of an icon to use for the file type.
// this icon should contain icons of all sizes and color depths
// needed by Windows.
// set this to 0 to use the generic 'miranda file' icon
@@ -67,7 +67,7 @@ type
// Note: set this to nil to pass the file name as
// commandline argument to miranda32.exe (db file).
- flags: DWORD; // see FTDF_* flags below
+ flags: dword; // see FTDF_* flags below
pszFileExt: PAnsiChar; // file extension, e.g. ".ext"
// first character must be a dot, assumed to be all lower case.
@@ -130,14 +130,14 @@ Returns 0 on success, nonzero otherwise.
type
PURLTYPEDESC = ^TURLTYPEDESC;
TURLTYPEDESC = record
- cbSize: Integer; // size of this structure, in bytes
+ cbSize: integer; // size of this structure, in bytes
pszDescription: TChar; // description for options dialog and in registry.
// please Translate().
hInstance: HINST; // instance where the icon resource is located
- nIconResID: UINT; // resource id of an icon to use for the url type.
+ nIconResID: uint; // resource id of an icon to use for the url type.
// only a small one (16x16) is needed by Windows,
// e.g. proto icon as used in Miranda.
// set this to 0 to use the default miranda icon.
@@ -148,7 +148,7 @@ type
// the provided string has already been urldecoded.
// return zero on suceess, nonzero on error.
- flags: DWORD; // see UTDF_* flags below
+ flags: dword; // see UTDF_* flags below
pszProtoPrefix: PAnsiChar; // protocol prefix, e.g. "http:"
// last character must be a colon, assumed to be all lower case.
diff --git a/plugins/ExternalAPI/delphi/m_ersatz.inc b/plugins/ExternalAPI/delphi/m_ersatz.inc
index 49f5b3170f..553194eee2 100644
--- a/plugins/ExternalAPI/delphi/m_ersatz.inc
+++ b/plugins/ExternalAPI/delphi/m_ersatz.inc
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
// Returns the status message for a status
-// wParam=(WORD) 0 for current status or a status
+// wParam=(word) 0 for current status or a status
// lParam=0
// 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.
diff --git a/plugins/ExternalAPI/delphi/m_flags.inc b/plugins/ExternalAPI/delphi/m_flags.inc
index f9f97ec1ff..f060b10608 100644
--- a/plugins/ExternalAPI/delphi/m_flags.inc
+++ b/plugins/ExternalAPI/delphi/m_flags.inc
@@ -36,7 +36,7 @@ Another way to get the country numbers are the CTRY_* constants in winnls.h of W
To retrieve the country number from a locale, call GetLocaleInfo().
with LOCALE_ICOUNTRY.
wParam : countryNumber
- lParam : (BOOL)fReturnHandle (nonzero to to retrieve the icolib handle instead of the icon)
+ lParam : (bool)fReturnHandle (nonzero to to retrieve the icolib handle instead of the icon)
Returns a icon handle (HICON) on success, NULL on error.
}
MS_FLAGS_LOADCOUNTRYFLAGICON = 'Flags/LoadCountryFlagIcon';
diff --git a/plugins/ExternalAPI/delphi/m_flash.inc b/plugins/ExternalAPI/delphi/m_flash.inc
index 8d99547e6a..c6c7cc1816 100644
--- a/plugins/ExternalAPI/delphi/m_flash.inc
+++ b/plugins/ExternalAPI/delphi/m_flash.inc
@@ -81,12 +81,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
type
TFLASHAVATAR = record
- hContact :THANDLE; // contact who flash avatar belongs to
- hWindow :HWND; // handle of flash avatar object
- hParentWindow:HWND; // handle of flash avatar's parent object
- cUrl :TChar; // url of .swf file
- id :int; // unique number of plugin which wants to use avatar service
- cProto :PAnsiChar; // contacts protocol
+ hContact :TMCONTACT; // contact who flash avatar belongs to
+ hWindow :HWND; // handle of flash avatar object
+ hParentWindow:HWND; // handle of flash avatar's parent object
+ cUrl :TChar; // url of .swf file
+ id :int; // unique number of plugin which wants to use avatar service
+ cProto :PAnsiChar; // contacts protocol
end;
-{$ENDIF} \ No newline at end of file
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_folders.inc b/plugins/ExternalAPI/delphi/m_folders.inc
index 282eaaca7e..7bafe3248e 100644
--- a/plugins/ExternalAPI/delphi/m_folders.inc
+++ b/plugins/ExternalAPI/delphi/m_folders.inc
@@ -67,7 +67,7 @@ type
// there's no entry in the database for this
// folder. This should be the initial value for
// the path, users will be able to change it later.
- flags :DWORD; // FF_* flags
+ flags :dword; // FF_* flags
// V2.0
szUserName:TChar; // for display purposes. if NULL, plugins gets it as the
// translated szName String is dup()'d so you can free it
diff --git a/plugins/ExternalAPI/delphi/m_historypp.inc b/plugins/ExternalAPI/delphi/m_historypp.inc
index 19fed89f4e..f651c0a09f 100644
--- a/plugins/ExternalAPI/delphi/m_historypp.inc
+++ b/plugins/ExternalAPI/delphi/m_historypp.inc
@@ -90,14 +90,14 @@ const
type
TItemRenderDetails = record
- cbSize :DWord; // size of the structure in bytes
- hContact :THandle; // handle to the contact for which the event is processed
- hDBEvent :THandle; // handle to the event which is processed
- dwEventTime :DWord; // timestamp of the event
- wEventType :Word; // Event's flags (see m_database, EVENTTYPE_*; m_icq, ICQEVENTTYPE_*)
+ cbSize :dword; // size of the structure in bytes
+ hContact :THANDLE; // handle to the contact for which the event is processed
+ hDBEvent :THANDLE; // handle to the event which is processed
+ dwEventTime :dword; // timestamp of the event
+ wEventType :word; // Event's flags (see m_database, EVENTTYPE_*; m_icq, ICQEVENTTYPE_*)
IsEventSent :ByteBool; // Outgoing event. True if DBEF_SENT event flag is present (see m_database)
- dwFlags :DWord; // Any reasonable combination of IRDF_* flags.
- bHistoryWindow:Byte; // What kind of window history. See IRDHW_* values
+ dwFlags :dword; // Any reasonable combination of IRDF_* flags.
+ bHistoryWindow:byte; // What kind of window history. See IRDHW_* values
pProto :PAnsiChar; // Proto of the event, if available
pModule :PAnsiChar; // Module of the event, if available
pText :PWideChar; // Text of the event, not used now
@@ -146,10 +146,10 @@ const
type
TOpenEventParams = record
- cbSize : DWord;
- hContact : THandle;
- hDBEvent : THandle;
- junkie: PAnsiChar;
+ cbSize : dword;
+ hContact : THANDLE;
+ hDBEvent : THANDLE;
+ pPassword: PAnsiChar;
end;
POpenEventParams = ^TOpenEventParams;
@@ -164,7 +164,7 @@ const
// provided event
// wParam - pointer to TOpenEventParams structure
// lParam - zero
- // Return - BOOL, True if contact opened, False if password
+ // Return - bool, True if contact opened, False if password
// field opened
// Note: if you just want to show contact's history,
// use system service MS_HISTORY_SHOWCONTACTHISTORY
diff --git a/plugins/ExternalAPI/delphi/m_ieview.inc b/plugins/ExternalAPI/delphi/m_ieview.inc
index 2881ef5c8c..bcb41f8049 100644
--- a/plugins/ExternalAPI/delphi/m_ieview.inc
+++ b/plugins/ExternalAPI/delphi/m_ieview.inc
@@ -50,8 +50,8 @@ type
TIEVIEWWINDOW = record
cbSize : int; // size of the strusture
iType : int; // one of IEW_* values
- dwMode : DWORD; // compatibility mode - one of IEWM_* values
- dwFlags: DWORD; // flags, one of IEWF_* values
+ dwMode : dword; // compatibility mode - one of IEWM_* values
+ dwFlags: dword; // flags, one of IEWF_* values
parent : HWND; // parent window HWND
hwnd : HWND; // IEW_CREATE returns WebBrowser control's HWND here
x : int; // IE control horizontal position
@@ -132,8 +132,8 @@ type
color :TCOLORREF; // Text color
Nick :TChar; // Nick, usage depends on type of event
Text :TChar; // Text, usage depends on type of event
- dwData :dword; // DWORD data e.g. status
- bIsMe :BOOL; // TRUE if the event is related to the user
+ dwData :dword; // dword data e.g. status
+ bIsMe :bool; // TRUE if the event is related to the user
time :dword; // Time of the event
next :PtagIEVIEWEVENTDATA;
Text2 :TChar; // Text, usage depends on type of event
@@ -166,16 +166,16 @@ type
PIEVIEWEVENT = ^TIEVIEWEVENT;
TIEVIEWEVENT = record
- cbSize :int; // size of the strusture
- iType :int; // one of IEE_* values
- dwFlags :DWORD; // one of IEEF_* values
- hwnd :HWND; // HWND returned by IEW_CREATE
- hContact :THANDLE; // contact
+ cbSize :int; // size of the strusture
+ iType :int; // one of IEE_* values
+ dwFlags :dword; // one of IEEF_* values
+ hwnd :HWND; // HWND returned by IEW_CREATE
+ hContact :TMCONTACT; // contact
Event :tagIEVIEWEVENT; // first event to log, when IEE_LOG_EVENTS
// returns it will contain the last event
// actually logged or NULL if no event was logged
- count :int; // number of events to log
- codepage :int; // ANSI codepage
+ count :int; // number of events to log
+ codepage :int; // ANSI codepage
pszProto :PAnsiChar;
end;
(*
@@ -196,7 +196,7 @@ type
// the window 0, 1, 2, 3
hwndTarget : HWND; // Window, where to send the message when smiley is
// selected.
- targetMessage: DWORD; // Target message, to be sent.
+ targetMessage: dword; // Target message, to be sent.
targetWParam : LPARAM; // Target WParam to be sent (LParam will be AnsiChar*
// to select smiley) see the example file.
end;
diff --git a/plugins/ExternalAPI/delphi/m_listeningto.inc b/plugins/ExternalAPI/delphi/m_listeningto.inc
index 4bb60c4a45..141a2b229c 100644
--- a/plugins/ExternalAPI/delphi/m_listeningto.inc
+++ b/plugins/ExternalAPI/delphi/m_listeningto.inc
@@ -40,7 +40,7 @@ lParam: ignored
Enable/disable sending listening to this protocol
wParam: AnsiChar * - protocol name or NULL for all protocols
-lParam: BOOL - TRUE to enable, FALSE to disable
+lParam: bool - TRUE to enable, FALSE to disable
}
MS_LISTENINGTO_ENABLE:PAnsiChar = 'ListeningTo/Enable';
@@ -48,7 +48,7 @@ lParam: BOOL - TRUE to enable, FALSE to disable
Notification fired when enable state changed
wParam: AnsiChar * - protocol name or NULL for all protocols
-lParam: BOOL - enabled
+lParam: bool - enabled
}
ME_LISTENINGTO_ENABLE_STATE_CHANGED:PAnsiChar = 'ListeningTo/EnableStateChanged';
diff --git a/plugins/ExternalAPI/delphi/m_music.inc b/plugins/ExternalAPI/delphi/m_music.inc
index aba0bd27f6..b17a25879d 100644
--- a/plugins/ExternalAPI/delphi/m_music.inc
+++ b/plugins/ExternalAPI/delphi/m_music.inc
@@ -44,21 +44,21 @@ type
type
pSongInfo=^tSongInfo;
tSongInfo = record
- artist :pWideChar;
- title :pWideChar;
- album :pWideChar;
- genre :pWideChar;
- comment :pWideChar;
- year :pWideChar;
- mfile :pWideChar; // media file
+ artist :PWideChar;
+ title :PWideChar;
+ album :PWideChar;
+ genre :PWideChar;
+ comment :PWideChar;
+ year :PWideChar;
+ mfile :PWideChar; // media file
kbps :dword;
khz :dword;
channels :dword;
track :dword;
total :dword; // music length
time :dword; // elapsed time
- wndtext :pWideChar; // window title
- player :pWideChar; // player name
+ wndtext :PWideChar; // window title
+ player :PWideChar; // player name
plyver :dword; // player version
icon :THANDLE; // player icon
fsize :dword; // media file size
@@ -71,9 +71,9 @@ type
height :dword;
fps :dword;
date :int64;
- txtver :pWideChar;
- lyric :pWideChar;
- cover :pWideChar; // cover path
+ txtver :PWideChar;
+ lyric :PWideChar;
+ cover :PWideChar; // cover path
volume :dword;
url :PWideChar; // player homepage
winampwnd:HWND;
@@ -309,7 +309,7 @@ type
tInitProc = function():integer;cdecl;
tDeInitProc = function():integer;cdecl;
tStatusProc = function(wnd:HWND):integer;cdecl;
- tNameProc = function(wnd:HWND;flags:integer):pWideChar;cdecl;
+ tNameProc = function(wnd:HWND;flags:integer):PWideChar;cdecl;
tCheckProc = function(wnd:HWND;flags:integer):HWND;cdecl;
tInfoProc = function(var SongInfo:tSongInfo;flags:integer):integer;cdecl;
tCommandProc = function(wnd:HWND;command:integer;value:integer):integer;cdecl;
@@ -349,11 +349,11 @@ const
Returns: previous state
}
const
- MS_WAT_MYSHOWS:pAnsiChar = 'WATrack/MyShows';
+ MS_WAT_MYSHOWS:PAnsiChar = 'WATrack/MyShows';
const
- MS_WAT_MYSHOWSINFO:pAnsiChar = 'WATrack/MyShowsInfo';
+ MS_WAT_MYSHOWSINFO:PAnsiChar = 'WATrack/MyShowsInfo';
// --------- Last FM ---------
@@ -363,7 +363,7 @@ const
Returns: previous state
}
const
- MS_WAT_LASTFM:pAnsiChar = 'WATrack/LastFM';
+ MS_WAT_LASTFM:PAnsiChar = 'WATrack/LastFM';
{
Get Info based on currently played song
@@ -374,18 +374,18 @@ type
pLastFMInfo = ^tLastFMInfo;
tLastFMInfo = record
request:cardinal; // 0 - artist, 1 - album, 2 - track
- artist :pWideChar; // artist
- album :pWideChar; // album or similar artists for Artist info request
- title :pWideChar; // track title
- tags :pWideChar; // tags
- info :pWideChar; // artist bio or wiki article
- image :pAnsiChar; // photo/cover link
- similar:pWideChar;
- release:pWideChar;
+ artist :PWideChar; // artist
+ album :PWideChar; // album or similar artists for Artist info request
+ title :PWideChar; // track title
+ tags :PWideChar; // tags
+ info :PWideChar; // artist bio or wiki article
+ image :PAnsiChar; // photo/cover link
+ similar:PWideChar;
+ release:PWideChar;
trknum :cardinal;
end;
const
- MS_WAT_LASTFMINFO:pAnsiChar = 'WATrack/LastFMInfo';
+ MS_WAT_LASTFMINFO:PAnsiChar = 'WATrack/LastFMInfo';
// --------- Templates ----------
@@ -414,6 +414,6 @@ const
lParam: 0
note: Shows Macro help window with edit aliases ability
}
- MS_WAT_MACROHELP:pAnsiChar = 'WATrack/MacroHelp';
+ MS_WAT_MACROHELP:PAnsiChar = 'WATrack/MacroHelp';
{$ENDIF M_MUSIC}
diff --git a/plugins/ExternalAPI/delphi/m_newawaysys.inc b/plugins/ExternalAPI/delphi/m_newawaysys.inc
index 1a12135d0b..9ba9f23d07 100644
--- a/plugins/ExternalAPI/delphi/m_newawaysys.inc
+++ b/plugins/ExternalAPI/delphi/m_newawaysys.inc
@@ -38,7 +38,7 @@ type
memory management interface (MS_SYSTEM_GET_MMI). And MS_NAS_SETSTATE expects
szMsg to be allocated through the same service. MS_NAS_SETSTATE deallocates szMsg.
}
- status : WORD; // status mode. 0 means current (NAS will overwrite 0 with
+ status : word; // status mode. 0 means current (NAS will overwrite 0 with
// the current status mode)
{
for MS_NAS_GETSTATE if the specified status is not 0, MS_NAS_GETSTATE will
diff --git a/plugins/ExternalAPI/delphi/m_notify.inc b/plugins/ExternalAPI/delphi/m_notify.inc
index 572adc029e..e8c614d282 100644
--- a/plugins/ExternalAPI/delphi/m_notify.inc
+++ b/plugins/ExternalAPI/delphi/m_notify.inc
@@ -16,7 +16,7 @@ type
icon :HICON;
name :array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
service:array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
- cookie :DWORD;
+ cookie :dword;
end;
MNOTIFYACTIONINFO = tagMNOTIFYACTIONINFO;
@@ -38,7 +38,7 @@ type
function Get(notifyORtype:THANDLE;name:PAnsiChar;val:PDBVARIANT):integer;cdecl;
// Set/get actions
- function AddAction (notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar;cookie:DWORD):integer;cdecl;
+ function AddAction (notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar;cookie:dword):integer;cdecl;
function GetActions(notifyORtype:THANDLE;actions:PMNOTIFYACTIONINFO):integer;cdecl;
// Increment/decrement refer count of notification object. Unreferred objects are destroyed
@@ -101,7 +101,7 @@ begin
else
result:=0;
end;
-function MNotifyAddAction(notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar=nil;cookie:DWORD=0):int;
+function MNotifyAddAction(notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar=nil;cookie:dword=0):int;
begin
if notifyLink<>nil then
result:=notifyLink^.AddAction(notifyORtype,icon,name)
diff --git a/plugins/ExternalAPI/delphi/m_png.inc b/plugins/ExternalAPI/delphi/m_png.inc
index 09e14eac2f..03fe8e5e9f 100644
--- a/plugins/ExternalAPI/delphi/m_png.inc
+++ b/plugins/ExternalAPI/delphi/m_png.inc
@@ -22,6 +22,11 @@
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.
+
+ File name : $Source: /cvsroot/miranda/miranda/include/m_png.h,v $
+ Revision : $Revision: 1.1 $
+ Last change on : $Date: 2005/10/29 17:10:51 $
+ Last change by : $Author: ghazan $
}
{$IFNDEF M_PNG}
@@ -52,7 +57,7 @@ type
PPNG2DIB = ^TPNG2DIB;
TPNG2DIB = record
pSource : PBYTE;
- cbSourceSize : DWORD;
+ cbSourceSize : dword;
pResult : ^PBITMAPINFOHEADER;
end;
diff --git a/plugins/ExternalAPI/delphi/m_proto_listeningto.inc b/plugins/ExternalAPI/delphi/m_proto_listeningto.inc
index 6a48aed325..2c4607c167 100644
--- a/plugins/ExternalAPI/delphi/m_proto_listeningto.inc
+++ b/plugins/ExternalAPI/delphi/m_proto_listeningto.inc
@@ -42,7 +42,7 @@ type
szGenre :TCHAR; // Song genre
szLength:TCHAR; // Song length
szPlayer:TCHAR; // Player name
- dwFlags :DWORD;
+ dwFlags :dword;
end;
const
@@ -102,7 +102,7 @@ const
not.
wParam = NULL
lParam = hContact
- Returns a BOOL
+ Returns a bool
}
MS_LISTENINGTO_OVERRIDECONTACTOPTION:PAnsiChar = 'ListeningTo/OverrideContactOption';
diff --git a/plugins/ExternalAPI/delphi/m_sessions.inc b/plugins/ExternalAPI/delphi/m_sessions.inc
index 21794e88ee..b6e6c19bfd 100644
--- a/plugins/ExternalAPI/delphi/m_sessions.inc
+++ b/plugins/ExternalAPI/delphi/m_sessions.inc
@@ -61,12 +61,12 @@ type
cbSize :int;
szEntity:PAnsiChar; // can be NULL
hSession:THANDLE; // ""
- dwMsg :DWORD;
- dwTo :DWORD
- dwFrom :DWORD; // SDR_*, SDR_ALL is not a good thing
+ dwMsg :dword;
+ dwTo :dword;
+ dwFrom :dword; // SDR_*, SDR_ALL is not a good thing
wParam :WPARAM;
lParam :LPARAM;
- reserved[0..1] of DWORD; // is actually apart of the structure and is used internally
+ reserved[0..1] of dword; // is actually apart of the structure and is used internally
end;
{
@@ -181,7 +181,7 @@ to match the type of cookie.
(*
// -- Helper functions --
-__inline int Sion_PipeRegister(DWORD dwSdr,AnsiChar *szEntity,MIRANDASERVICE pfnService)
+__inline int Sion_PipeRegister(dword dwSdr,AnsiChar *szEntity,MIRANDASERVICE pfnService)
{
struct PIPE_DATA pd;
pd.cbSize=sizeof(struct PIPE_DATA);
@@ -214,7 +214,7 @@ __inline int Sion_EntityClone(HANDLE seh)
return CallService(MS_SION_ENTITY_CLONE,0,(LPARAM)seh);
}
-__inline void* Sion_EntityCookieGet(HANDLE seh, DWORD dwSdr)
+__inline void* Sion_EntityCookieGet(HANDLE seh, dword dwSdr)
{
struct SION_ENTITY_COOKIE sec;
sec.cbSize=sizeof(sec);
@@ -226,7 +226,7 @@ __inline void* Sion_EntityCookieGet(HANDLE seh, DWORD dwSdr)
return sec.data;
}
-__inline int Sion_EntityCookieSet(HANDLE seh, DWORD dwSdr, void* cookie)
+__inline int Sion_EntityCookieSet(HANDLE seh, dword dwSdr, void* cookie)
{
struct SION_ENTITY_COOKIE sec;
sec.cbSize=sizeof(sec);
@@ -237,7 +237,7 @@ __inline int Sion_EntityCookieSet(HANDLE seh, DWORD dwSdr, void* cookie)
return CallService(MS_SION_ENTITY_SETCOOKIE,0,(LPARAM)&sec);
}
-__inline HANDLE Sion_EntityCookieFind(DWORD dwSdr, void* cookie)
+__inline HANDLE Sion_EntityCookieFind(dword dwSdr, void* cookie)
{
struct SION_ENTITY_COOKIE sec;
sec.cbSize=sizeof(sec);
@@ -248,8 +248,8 @@ __inline HANDLE Sion_EntityCookieFind(DWORD dwSdr, void* cookie)
return sec.hSession;
}
-__inline int Sion_PipeBroadcast(AnsiChar* szEntity, HANDLE hSession, DWORD dwMsg,
- WPARAM wParam, LPARAM lParam, DWORD dwFrom, DWORD dwTo) {
+__inline int Sion_PipeBroadcast(AnsiChar* szEntity, HANDLE hSession, dword dwMsg,
+ WPARAM wParam, LPARAM lParam, dword dwFrom, dword dwTo) {
struct PIPE_DATA pd;
pd.cbSize=sizeof(struct PIPE_DATA);
pd.szEntity=szEntity;
@@ -325,7 +325,7 @@ UI : displays the modes that the channel is in, the modes still have to be abs
PROTO: sends a CHANNEL_DONE
UI : the UI is now sure that no more messages are expected.
-UI : sends a UI_TEXT message, with optional source MCONTACT and of course the message.
+UI : sends a UI_TEXT message, with optional source TMCONTACT and of course the message.
PROTO: picks up on this message and transmits it, it must return
a HPROCESS code that is later acknowledged.
@@ -339,8 +339,8 @@ UI : sends UI_IAMTYPING
PROTO: the protocol may or may not send this message to the other parties
but it must process it, this message is also optional.
-PROTO: sends UI_CONTACT_ISTYPING (source MCONTACT)
-UI : an MCONTACT within the session is typing, the UI may elect to show this
+PROTO: sends UI_CONTACT_ISTYPING (source TMCONTACT)
+UI : an TMCONTACT within the session is typing, the UI may elect to show this
message in a status bar, or with a visual effect.
}
diff --git a/plugins/ExternalAPI/delphi/m_shutdown.inc b/plugins/ExternalAPI/delphi/m_shutdown.inc
index 2f99ec3def..9dfa5e7d28 100644
--- a/plugins/ExternalAPI/delphi/m_shutdown.inc
+++ b/plugins/ExternalAPI/delphi/m_shutdown.inc
@@ -36,17 +36,17 @@ If the dialog is already opened this brings it to foreground.
wParam=lParam=0
Returns 0 on success, nonzero otherwise.
}
- MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG:pAnsiChar = 'AutoShutdown/ShowSettingsDialog';
+ MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG:PAnsiChar = 'AutoShutdown/ShowSettingsDialog';
{ Initiate shutdown process v1.3.0.0+
Initiates the shutdown process for a given shutdown type.
If another shutdown process is already pending it will return error.
Associated events: ME_AUTOSHUTDOWN_OKTOSHUTDOWN, ME_AUTOSHUTDOWN_SHUTDOWN
wParam=shutdownType
- lParam=(LPARAM)(BOOL)fShowConfirmDlg (whether to show the warning dialog or not)
+ lParam=(LPARAM)(bool)fShowConfirmDlg (whether to show the warning dialog or not)
Returns 0 on success, nonzero otherwise.
}
- MS_AUTOSHUTDOWN_SHUTDOWN:pAnsiChar = 'AutoShutdown/Shutdown';
+ MS_AUTOSHUTDOWN_SHUTDOWN:PAnsiChar = 'AutoShutdown/Shutdown';
//* shutdown types */
SDSDT_CLOSEMIRANDA = 1; // close miranda process
@@ -69,7 +69,7 @@ It does not need to be freed in any way.
The returned text is already translated.
Returns a pointer to a string on success, NULL on error.
}
- MS_AUTOSHUTDOWN_GETTYPEDESCRIPTION:pAnsiChar = 'AutoShutdown/GetTypeDescription';
+ MS_AUTOSHUTDOWN_GETTYPEDESCRIPTION:PAnsiChar = 'AutoShutdown/GetTypeDescription';
GSTDF_LONGDESC = $0001; // returns a long description
GSTDF_UNICODE = $0002; // returns a Unicode string
@@ -87,7 +87,7 @@ MS_AUTOSHUTDOWN_SHUTDOWN will fail if the given shutdown type is not enabled.
lParam=0
Returns TRUE if the given shutdown type is enabled, FALSE otherwise.
}
- MS_AUTOSHUTDOWN_ISTYPEENABLED:pAnsiChar = 'AutoShutdown/IsTypeEnabled';
+ MS_AUTOSHUTDOWN_ISTYPEENABLED:PAnsiChar = 'AutoShutdown/IsTypeEnabled';
{ Start shutdown watcher v1.4.0.0+
Starts the watcher using the last settings specified on the dialog
@@ -98,7 +98,7 @@ Associated event: ME_AUTOSHUTDOWN_WATCHERCHANGED
wParam=lParam=0
Returns 0 on success, nonzero otherwise.
}
- MS_AUTOSHUTDOWN_STARTWATCHER:pAnsiChar = 'AutoShutdown/StartWatcher';
+ MS_AUTOSHUTDOWN_STARTWATCHER:PAnsiChar = 'AutoShutdown/StartWatcher';
{ Stop shutdown watcher v1.4.0.0+
Stops the currently running watcher.
@@ -107,14 +107,14 @@ Associated event: ME_AUTOSHUTDOWN_WATCHERCHANGED
wParam=lParam=0
Returns 0 on success, nonzero otherwise.
}
- MS_AUTOSHUTDOWN_STOPWATCHER:pAnsiChar = 'AutoShutdown/StopWatcher';
+ MS_AUTOSHUTDOWN_STOPWATCHER:PAnsiChar = 'AutoShutdown/StopWatcher';
{ Check if watcher is running v1.4.0.0+
Checks if the watcher is currently active or not.
wParam=lParam=0
Returns TRUE if the watcher is enabled, FALSE otherwise.
}/
- MS_AUTOSHUTDOWN_ISWATCHERENABLED:pAnsiChar = 'AutoShutdown/IsWatcherEnabled';
+ MS_AUTOSHUTDOWN_ISWATCHERENABLED:PAnsiChar = 'AutoShutdown/IsWatcherEnabled';
//******************************************************************/
//************************** EVENTS ********************************/
@@ -124,29 +124,29 @@ Returns TRUE if the watcher is enabled, FALSE otherwise.
Gets fired when MS_AUTOSHUTDOWN_SHUTDOWN is called.
Parmeters are the same as specified at the call to MS_AUTOSHUTDOWN_SHUTDOWN.
wParam=shutdownType
- lParam=(LPARAM)(BOOL)fShowConfirmDlg
+ lParam=(LPARAM)(bool)fShowConfirmDlg
Return 0 to allow shutdown, 1 to disallow.
}
- ME_AUTOSHUTDOWN_OKTOSHUTDOWN:pAnsiChar = 'AutoShutdown/OkToShutdown';
+ ME_AUTOSHUTDOWN_OKTOSHUTDOWN:PAnsiChar = 'AutoShutdown/OkToShutdown';
{ Shutdown process started (event) v1.3.0.1+
Gets fired when ME_AUTOSHUTDOWN_OKTOSHUTDOWN was confirmed.
Parmeters are the same as specified at the call
to MS_AUTOSHUTDOWN_SHUTDOWN.
wParam=shutdownType
- lParam=(LPARAM)(BOOL)fShowConfirmDlg
+ lParam=(LPARAM)(bool)fShowConfirmDlg
Unused, return always 0 here.
}
- ME_AUTOSHUTDOWN_SHUTDOWN:pAnsiChar = 'AutoShutdown/ShutdownEvent';
+ ME_AUTOSHUTDOWN_SHUTDOWN:PAnsiChar = 'AutoShutdown/ShutdownEvent';
{ Watcher changed (event) v1.3.0.0+
Fired when MS_AUTOSHUTDOWN_STARTWATCHER or MS_AUTOSHUTDOWN_STOPWATCHER
is called.
- wParam=(WPARAM)(BOOL)fIsStarted (whether whe watcher is running now)
+ wParam=(WPARAM)(bool)fIsStarted (whether whe watcher is running now)
lParam=0
Unused, return always 0 here.
}
- ME_AUTOSHUTDOWN_WATCHERCHANGED:pAnsiChar = 'AutoShutdown/Watcher/Changed';
+ ME_AUTOSHUTDOWN_WATCHERCHANGED:PAnsiChar = 'AutoShutdown/Watcher/Changed';
SETTING_REMEMBERONRESTART_DEFAULT = 0; // SDROR_RUNNING
diff --git a/plugins/ExternalAPI/delphi/m_smileyadd.inc b/plugins/ExternalAPI/delphi/m_smileyadd.inc
index a620b1219a..0cc064ea8f 100644
--- a/plugins/ExternalAPI/delphi/m_smileyadd.inc
+++ b/plugins/ExternalAPI/delphi/m_smileyadd.inc
@@ -40,8 +40,8 @@ type
// if you prefer those icons.
// If not found or NULL, "Standard" will be used
flags :uint; // Flags (SAFLRE_*) that define the behaivior
- disableRedraw :BOOL; // Parameter have been depricated, have no effect on operation
- hContact :MCONTACT; // Contact handle
+ disableRedraw :bool; // Parameter have been depricated, have no effect on operation
+ hContact :TMCONTACT; // Contact handle
end;
{
@@ -71,7 +71,7 @@ type
targetWParam : LPARAM; // Target WParam to be sent (LParam will be PAnsiChar to
// select smiley) see the example file.
hwndParent : HWND; // Parent window for smiley dialog
- hContact : MCONTACT; // Contact handle
+ hContact : TMCONTACT; // Contact handle
end;
{
@@ -98,7 +98,7 @@ type
// do not destroy! NULL if the buttonicon is not defined...
NumberOfVisibleSmileys: int; // Number of visible smileys defined.
NumberOfSmileys : int; // Number of total smileys defined
- hContact : MCONTACT; //Contact handle
+ hContact : TMCONTACT; //Contact handle
end;
const
@@ -129,7 +129,7 @@ type
numSmileys :uint; // Number of Smileys found, this parameter filled by SmileyAdd
oflag :uint; // One of the SAFL_ flags specifies content of the parse results
// this parameter filled by SmileyAdd
- hContact :MCONTACT; // Contact handle
+ hContact :TMCONTACT; // Contact handle
end;
type
@@ -217,16 +217,16 @@ type
TFVCNDATA_NMHDR = record
//NMHDR structure
hwndFrom :HWND; // Window of smiley host
- idFrom :UINT_PTR; // ignored
- code :UINT; // NM_FIREVIEWCHANGE
+ idFrom :uint_ptr; // ignored
+ code :uint; // NM_FIREVIEWCHANGE
cbSize :size_t;
- bEvent :Byte; // FVCN_ value - pre- or post- painting
- bAction :Byte; // FVCA_ keys
+ bEvent :byte; // FVCN_ value - pre- or post- painting
+ bAction :byte; // FVCA_ keys
hDC :HDC; // Canvas to draw on
rcRect :TRECT; // Valid/should be in case of FVCA_DRAW
clrBackground:COLORREF; // color to fill background if fTransparent is not set
- fTransparent :BOOL; // if need to fill back color (not supported)
+ fTransparent :bool; // if need to fill back color (not supported)
lParam :LPARAM; // used by host window PreFire and PostFire event
end;
@@ -235,11 +235,11 @@ const
NM_FIREVIEWCHANGE = NM_FIRST+1;
type
- SMADD_CONT = record
+ TSMADD_CONT = record
cbSize :uint;
- hContact:MCONTACT;
- _type :int; // 0 - directory, 1 - file;
- path :TChar; // smiley category name for reference
+ hContact:TMCONTACT;
+ _type :int; // 0 - directory, 1 - file;
+ path :TChar; // smiley category name for reference
end;
const
//Loads all smileys for the contact
@@ -247,4 +247,4 @@ const
//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
MS_SMILEYADD_LOADCONTACTSMILEYS:PAnsiChar = 'SmileyAdd/LoadContactSmileys';
-{$ENDIF} \ No newline at end of file
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_spamfilter.inc b/plugins/ExternalAPI/delphi/m_spamfilter.inc
index b0245f6650..54c4729a81 100644
--- a/plugins/ExternalAPI/delphi/m_spamfilter.inc
+++ b/plugins/ExternalAPI/delphi/m_spamfilter.inc
@@ -50,7 +50,7 @@ const
// Parameters:
// -------------
-// wParam = (UINT)uHandleType (see below);
+// wParam = (uint)uHandleType (see below);
// lParam = 0
// Possible values for wParam:
@@ -98,8 +98,8 @@ const
// Parameters:
// -------------
-// wParam = (UINT)uFilterType (For possible values see below)
-// lParam = (BOOL)bNewState (new activation state of filter)
+// wParam = (uint)uFilterType (For possible values see below)
+// lParam = (bool)bNewState (new activation state of filter)
// Possible filter type values (uFilterType):
SFT_ADVERTISMENT_FILTER = 1;
@@ -124,7 +124,7 @@ const
// Parameters:
// -------------
// wParam = (HWND)hwndParent (Can be NULL)
-// lParam = (UINT)uFilterType (For possible values see above)
+// lParam = (uint)uFilterType (For possible values see above)
// -> since 2.0.2.0: If this is zero then the options dialog will be opened pointing to the Spam Filter options.
// Note:
// If hwndParent is not NULL the function will not return
@@ -197,7 +197,7 @@ const
type
PMESSAGETYPEDESC = ^TMESSAGETYPEDESC;
TMESSAGETYPEDESC = record
- cbSize :Integer; // Set to sizeof(MESSAGETYPEDESC)
+ cbSize :integer; // Set to sizeof(MESSAGETYPEDESC)
pszSection :PAnsiChar; // Section of message name for database
// e.g. protocol name (Can not be NULL)
SectionDescription:TChar; // Readable name of section e.g. protocol name (can be NULL)
@@ -212,15 +212,15 @@ type
// a negative sign, e.g (HICON)-SKINICON_EVENT_MESSAGE,
// same as for LoadSkinnedIcon() -> can be 0
// and can also be a normal icon handle (HICON)
- bDefaultStatus :BOOL; // Whether checking for this type should be
+ bDefaultStatus :bool; // Whether checking for this type should be
// activated or not by default
- dwFlags :DWORD; // Flags for the message type (for possible flags see below)
- iSectionPosition :Integer; // Approx position number for the section in the
+ dwFlags :dword; // Flags for the message type (for possible flags see below)
+ iSectionPosition :integer; // Approx position number for the section in the
// options list, lower numbers are nearer to the
// top (Can be 0 to be sorted alphabetically)
// Ignored if section existed previously (or
// if pszSection is NULL) Added in v2.1.1.0
- iPosition :Integer; // Approx position number for the item in the
+ iPosition :integer; // Approx position number for the item in the
// options list, lower numbers are nearer to the
// top (Can be 0 to be sorted alphabetically)
// Added in v2.1.1.0
@@ -321,7 +321,7 @@ const
// Parameters:
// -------------
-// wParam = (BOOL)bOnlyCount (if TRUE the service will only return the user count without doing reset)
+// wParam = (bool)bOnlyCount (if TRUE the service will only return the user count without doing reset)
// lParam = 0
// Return Values:
@@ -353,16 +353,16 @@ const
type
PSPAMCHECKDATA = ^TSPAMCHECKDATA;
TSPAMCHECKDATA = record
- cbSize :Integer; // sizeof(SPAMCHECKDATA)
+ cbSize :integer; // sizeof(SPAMCHECKDATA)
pszMsgTypeSection:PAnsiChar; // The section of the message type string: You need
// to use MS_SPAMFILTER_REGISTERMESSAGETYPE before
pszMsgTypeName :PAnsiChar; // Description of the message: You need to use
// MS_SPAMFILTER_REGISTERMESSAGETYPE before
MsgText :TChar; // Pointer to the text of a message which is
// checked for spam. Can be NULL.
- dwFlags :DWORD; // Flags for the spam checking. (For more details see below.)
+ dwFlags :dword; // Flags for the spam checking. (For more details see below.)
case LongInt of
- 0: (hContact: MCONTACT); // Handle to the sending contact (use pszUserName
+ 0: (hContact: TMCONTACT); // Handle to the sending contact (use pszUserName
// instead if no hContact is available)
1: (UserName: TChar); // Name of the user, e.g. nick (set SCDF_NO_CONTACT
// in the flags to use this parameter) -> should
@@ -406,7 +406,7 @@ const
// Parameters:
// -------------
-// wParam = (DWORD)dwDataType (For possible values see below)
+// wParam = (dword)dwDataType (For possible values see below)
// lParam = depends on wParam (see below)
// Possible values for lParam:
@@ -435,8 +435,8 @@ const
// Return Values:
// --------------
-// SFSCI_ACTIVATION_FILTER -> (BOOL)TRUE/FALSE
-// SFSCI_DELAY_TIME_REPLY -> (BOOL)TRUE/FALSE
+// SFSCI_ACTIVATION_FILTER -> (bool)TRUE/FALSE
+// SFSCI_DELAY_TIME_REPLY -> (bool)TRUE/FALSE
// SFSCI_MSGTEXT_NOTIFYA -> (AnsiChar*) free with miranda_sys_free() of "m_system.h", (all %vars% in the text are already resolved)
// SFSCI_MSGTEXT_INSTRUCTIONA -> see SFSCI_MSGTEXT_NOTIFYA
@@ -446,7 +446,7 @@ const
// SFSCI_MSGTEXT_INSTRUCTIONW -> see SFSCI_MSGTEXT_NOTIFYW
// SFSCI_MSGTEXT_CONFIRMATIONW -> see SFSCI_MSGTEXT_NOTIFYW
-// SFSCI_ADD_TO_HISTORY -> (BOOL)TRUE/FALSE
+// SFSCI_ADD_TO_HISTORY -> (bool)TRUE/FALSE
// returns NULL on error
@@ -464,7 +464,7 @@ const
// Parameters:
// -----------------
// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
-// lParam = (UINT)uFilterType (For possible values see above)
+// lParam = (uint)uFilterType (For possible values see above)
// Return Values:
// -----------------
@@ -485,7 +485,7 @@ const
// Parameters:
// -----------------
// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
-// lParam = (UINT)uFilterType (For possible values see above)
+// lParam = (uint)uFilterType (For possible values see above)
// Return Values:
// -----------------
@@ -509,7 +509,7 @@ const
// Parameters:
// -----------------
// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
-// lParam = (UINT)uFilterType (For possible values see above)
+// lParam = (uint)uFilterType (For possible values see above)
// Return Values:
// -----------------
@@ -603,7 +603,7 @@ const
// Parameters:
// -------------
-// wParam = (UINT)uErrorType (For possible values see below)
+// wParam = (uint)uErrorType (For possible values see below)
// lParam = 0
// Possible values for wParam:
@@ -638,7 +638,7 @@ const
// Parameters:
// -------------
// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
-// lParam = (DWORD)dwFlags (flags about what should be done, see below)
+// lParam = (dword)dwFlags (flags about what should be done, see below)
// Available Flags:
SCASF_NO_NOTIFY = $00000001; // Prevents logging and playing of sounds
@@ -742,7 +742,7 @@ const
// Parameters:
// -----------------
// wParam = (HANDLE)hContact
-// lParam = (BOOL)bIsSpammer (new state)
+// lParam = (bool)bIsSpammer (new state)
// Return Values:
// -----------------
diff --git a/plugins/ExternalAPI/delphi/m_speak.inc b/plugins/ExternalAPI/delphi/m_speak.inc
index d8a9a4bfbe..7badc4e0a4 100644
--- a/plugins/ExternalAPI/delphi/m_speak.inc
+++ b/plugins/ExternalAPI/delphi/m_speak.inc
@@ -106,13 +106,13 @@ type
TSPEAK_ITEM = record
cbSize: integer;
_type: PAnsiChar; // Internal type name
- hContact: THandle;
+ hContact: TMCONTACT;
flags: integer; // SPEAK_*
templateNum: integer; // -1 to use text
case boolean of
true: (text: PAnsiChar);
false: (
- variables: Pointer;
+ variables: pointer;
numVariables: integer;
);
end;
diff --git a/plugins/ExternalAPI/delphi/m_spellchecker.inc b/plugins/ExternalAPI/delphi/m_spellchecker.inc
index cd636e1754..e2f8c5e0a7 100644
--- a/plugins/ExternalAPI/delphi/m_spellchecker.inc
+++ b/plugins/ExternalAPI/delphi/m_spellchecker.inc
@@ -23,9 +23,9 @@ Boston, MA 02111-1307, USA.
type
SPELLCHECKER_ITEM = record
cbSize :int;
- hContact :THANDLE; // The contact to get the settings from, or NULL
- hwnd :HWND; // The hwnd of the richedit
- window_name:PAnsiChar; // A name for this richedit
+ hContact :TMCONTACT; // The contact to get the settings from, or NULL
+ hwnd :HWND; // The hwnd of the richedit
+ window_name:PAnsiChar; // A name for this richedit
end;
type
diff --git a/plugins/ExternalAPI/delphi/m_statusplugins.inc b/plugins/ExternalAPI/delphi/m_statusplugins.inc
index 5925be2d6a..dea88463fb 100644
--- a/plugins/ExternalAPI/delphi/m_statusplugins.inc
+++ b/plugins/ExternalAPI/delphi/m_statusplugins.inc
@@ -49,7 +49,7 @@ const
MS_CS_GETPROTOCOUNT:PAnsiChar = 'CommonStatus/GetProtocolCount'; // added dec '04
// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = 0
+// lParam = (int) settings count
ME_CS_STATUSCHANGEEX:PAnsiChar = 'CommonStatus/StatusChangeEx';
{
// wParam = protoCount
diff --git a/plugins/ExternalAPI/delphi/m_tabsrmm.inc b/plugins/ExternalAPI/delphi/m_tabsrmm.inc
new file mode 100644
index 0000000000..cdf42942e2
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_tabsrmm.inc
@@ -0,0 +1,35 @@
+{$IFNDEF M_TABSRMM}
+{$DEFINE M_TABSRMM}
+
+const
+{
+ show one of the tray menus
+ wParam = 0 -> session list
+ wParam = 1 -> tray menu
+ lParam must be 0
+}
+ MS_TABMSG_TRAYSUPPORT:PAnsiChar = 'SRMsg_MOD/Show_TrayMenu';
+
+{
+ the service which processes globally registered hotkeys
+}
+ MS_TABMSG_HOTKEYPROCESS:PAnsiChar = 'SRMsg_MOD/ProcessHotkey';
+
+{
+ Checks if there is a message window opened
+ wParam=(LPARAM)(HANDLE)hContact - handle of the contact for which the window is searched.
+ ignored if lParam is not zero.
+ lParam=(LPARAM)(HWND)hwnd - a window handle - SET THIS TO 0 if you want to obtain the window
+ handle from the hContact.
+}
+ MS_MSG_MOD_MESSAGEDIALOGOPENED:PAnsiChar = 'SRMsg_MOD/MessageDialogOpened';
+
+{
+ obtain the message window flags
+ wParam = hContact - ignored if lParam is given.
+ lParam = hwnd
+ returns struct MessageWindowData *dat, 0 if no window is found
+}
+ MS_MSG_MOD_GETWINDOWFLAGS:PAnsiChar = 'SRMsg_MOD/GetWindowFlags';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_tipper.inc b/plugins/ExternalAPI/delphi/m_tipper.inc
index 737ae5cad1..2265c6141e 100644
--- a/plugins/ExternalAPI/delphi/m_tipper.inc
+++ b/plugins/ExternalAPI/delphi/m_tipper.inc
@@ -10,14 +10,14 @@
{$IFNDEF M_TIPPER}
{$DEFINE M_TIPPER}
type
- TranslateFunc = function (hContact:MCONTACT;module:PAnsiChar;setting_or_prefix:PAnsiChar;
- buff:pWideChar;bufflen:int):pWideChar; cdecl;
+ TranslateFunc = function (hContact:TMCONTACT;module:PAnsiChar;setting_or_prefix:PAnsiChar;
+ buff:PWideChar;bufflen:int):PWideChar; cdecl;
type
PDBVTranslation = ^TDBVTranslation;
TDBVTranslation = record
tfunc:TranslateFunc; // address of your translation function (see typedef above)
- name :pWideChar; // make sure this is unique, and DO NOT translate it
+ name :PWideChar; // make sure this is unique, and DO NOT translate it
id :dword; // will be overwritten by Tipper - do not use
end;
@@ -38,7 +38,7 @@ const
{
unicode extension to the basic functionality
- wParam - optional (pWideChar) text for text-only tips
+ wParam - optional (PWideChar) text for text-only tips
lParam - (PCLCINFOTIP) infoTip
}
MS_TIPPER_SHOWTIPW:PAnsiChar = 'mToolTip/ShowTipW';
diff --git a/plugins/ExternalAPI/delphi/m_toptoolbar.inc b/plugins/ExternalAPI/delphi/m_toptoolbar.inc
index 69a3bee044..5956b10ea7 100644
--- a/plugins/ExternalAPI/delphi/m_toptoolbar.inc
+++ b/plugins/ExternalAPI/delphi/m_toptoolbar.inc
@@ -20,14 +20,14 @@ type
TTBButton = record
cbSize :int;
pszService :PAnsiChar; // or program for lButtons
- dwFlags :DWORD;
+ dwFlags :dword;
lParamUp :LPARAM;
wParamUp :WPARAM;
lParamDown :LPARAM;
wParamDown :WPARAM;
name :PAnsiChar;
- hIconUp :HICON; // or hIconHandleUp:HANDLE
- hIconDn :HICON; // or hIconHandleDn:HANDLE
+ hIconUp :HICON; // or hIconHandleUp:THANDLE
+ hIconDn :HICON; // or hIconHandleDn:THANDLE
pszTooltipUp :PansiChar;
pszTooltipDn :PansiChar;
end;
diff --git a/plugins/ExternalAPI/delphi/m_userinfoex.inc b/plugins/ExternalAPI/delphi/m_userinfoex.inc
index 05f2c54849..d22f8cd559 100644
--- a/plugins/ExternalAPI/delphi/m_userinfoex.inc
+++ b/plugins/ExternalAPI/delphi/m_userinfoex.inc
@@ -304,7 +304,7 @@ There will be no difference for the user but the possible source of information.
This service can be used to retrieve all kinds of settings!
Some versions of the default MS_DB_CONTACT_GETSETTING_STR service return
-an error for BYTE, WORD and DWORD values if cgs.pValue->type is not 0.
+an error for byte, word and dword values if cgs.pValue->type is not 0.
wParam = (WPARAM)(HANDLE)hContact
lParam = (LPARAM)(DBCONTACTGETSETTING*)&cgs
diff --git a/plugins/ExternalAPI/delphi/m_variables.inc b/plugins/ExternalAPI/delphi/m_variables.inc
index 233853d149..9b02efcc29 100644
--- a/plugins/ExternalAPI/delphi/m_variables.inc
+++ b/plugins/ExternalAPI/delphi/m_variables.inc
@@ -56,7 +56,7 @@ type
szExtraText:TCHAR; // Extra, context-specific string (can be NULL) ->
// The field "extratext" will be replaced by this
// string. (Previously szSource).
- hContact :MCONTACT; // Handle to contact (can be NULL) -> The field "subject"
+ hContact :TMCONTACT; // Handle to contact (can be NULL) -> The field "subject"
// represents this contact.
pCount :int; // (output) Number of succesful parsed tokens, needs to
// be set to 0 before the call
diff --git a/plugins/ExternalAPI/delphi/m_versioninfo.inc b/plugins/ExternalAPI/delphi/m_versioninfo.inc
index 2257845432..b56b4138fa 100644
--- a/plugins/ExternalAPI/delphi/m_versioninfo.inc
+++ b/plugins/ExternalAPI/delphi/m_versioninfo.inc
@@ -31,7 +31,7 @@ const
{
Returns a string containing the versioninfo post
- wParam - (BOOL) suppress forum style formatting. If true the post won't have forum
+ wParam - (bool) suppress forum style formatting. If true the post won't have forum
style formatting even if the option is checked in miranda's options.
lParam - (^PAnsiChar) Pointer to a string that receives the info. Memory is allocated
using miranda's version of malloc() and you need to use miranda's version
diff --git a/plugins/ExternalAPI/delphi/m_voice.inc b/plugins/ExternalAPI/delphi/m_voice.inc
index 41213d5f10..5e97094e34 100644
--- a/plugins/ExternalAPI/delphi/m_voice.inc
+++ b/plugins/ExternalAPI/delphi/m_voice.inc
@@ -52,7 +52,7 @@ type
id :PAnsiChar; // Protocol especific ID for this call
flags :int; // VOICE_UNICODE to say the string is unicode or 0.
// VOICE_SECURE to say this is a encrypted call
- hContact :THANDLE; // Contact associated with the call (can be NULL)
+ hContact :TMCONTACT; // Contact associated with the call (can be NULL)
szNumber :TChar; // Number to call (can be NULL)
// Or the contact or the number must be != NULL
// If both are != NULL the call will be made to the number
@@ -148,7 +148,7 @@ called. If this service does not exist all contacts can be called (or, if it is
all contacts from the protocol can be called).
wParam: (HANDLE) hContact
-lParam: (BOOL) TRUE if it is a test for 'can call now?', FALSE if is a test for 'will be possible to call someday?'
+lParam: (bool) TRUE if it is a test for 'can call now?', FALSE if is a test for 'will be possible to call someday?'
return: 0 if can't be called, 1 if can
}
PS_VOICE_CALL_CONTACT_VALID = '/Voice/CallContactValid';
diff --git a/plugins/ExternalAPI/delphi/m_voiceservice.inc b/plugins/ExternalAPI/delphi/m_voiceservice.inc
index 331212397b..ab5872d8d3 100644
--- a/plugins/ExternalAPI/delphi/m_voiceservice.inc
+++ b/plugins/ExternalAPI/delphi/m_voiceservice.inc
@@ -29,8 +29,8 @@ with the difference that that ones are to be used by protocols, and this ones
are to be used by plugins that can make calls to contacts in multiple protocols.
To get the devices for input/output and some options, query the db directly:
- VoiceService/EchoCancelation BYTE default: TRUE
- VoiceService/MicBoost BYTE default: TRUE
+ VoiceService/EchoCancelation byte default: TRUE
+ VoiceService/MicBoost byte default: TRUE
VoiceService/Input TString default: windows default
VoiceService/Output TString default: windows default
}
diff --git a/plugins/ExternalAPI/delphi/m_weather.inc b/plugins/ExternalAPI/delphi/m_weather.inc
index d8fd41ae31..a3049a5d82 100644
--- a/plugins/ExternalAPI/delphi/m_weather.inc
+++ b/plugins/ExternalAPI/delphi/m_weather.inc
@@ -52,7 +52,7 @@ const
type
PWEATHERINFO = ^TWEATHERINFO;
TWEATHERINFO = record
- hContact:THANDLE;
+ hContact:TMCONTACT;
id :array [0..127] of WideChar;
city :array [0..127] of WideChar;
update :array [0.. 63] of WideChar;
@@ -80,15 +80,15 @@ const
// Enable or disable weather protocol.
// WPARAM = FALSE to toggle, TRUE to use the LPARAM
// LPARAM = TRUE to enable, FALSE to disable
- MS_WEATHER_ENABLED:pAnsiChar = 'Weather/EnableDisable';
+ MS_WEATHER_ENABLED:PAnsiChar = 'Weather/EnableDisable';
// Update all weather info
// WPARAM = LPARAM = NULL
- MS_WEATHER_UPDATEALL:pAnsiChar = 'Weather/UpdateAll';
+ MS_WEATHER_UPDATEALL:PAnsiChar = 'Weather/UpdateAll';
// Update all weather info + erase the old ones
// WPARAM = LPARAM = NULL
- MS_WEATHER_REFRESHALL:pAnsiChar = 'Weather/RefreshAll';
+ MS_WEATHER_REFRESHALL:PAnsiChar = 'Weather/RefreshAll';
// Below are the service functions for weather contacts
// The plugin does NOT verify that they are used in weather contact,
@@ -97,58 +97,58 @@ const
// Update a single station
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_UPDATE:pAnsiChar = 'Weather/Update';
+ MS_WEATHER_UPDATE:PAnsiChar = 'Weather/Update';
// Update a single station + delete old settings
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_REFRESH:pAnsiChar = 'Weather/Refresh';
+ MS_WEATHER_REFRESH:PAnsiChar = 'Weather/Refresh';
// View the brief info of a contact
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_BRIEF:pAnsiChar = 'Weather/Brief';
+ MS_WEATHER_BRIEF:PAnsiChar = 'Weather/Brief';
// Use default browser to open the complete forecast on web
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_COMPLETE:pAnsiChar = 'Weather/CompleteForecast';
+ MS_WEATHER_COMPLETE:PAnsiChar = 'Weather/CompleteForecast';
// Use default browser to open the weather map defined for the contact
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_MAP:pAnsiChar = 'Weather/Map';
+ MS_WEATHER_MAP:PAnsiChar = 'Weather/Map';
// Open the external log of the weather contact
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_LOG:pAnsiChar = 'Weather/Log';
+ MS_WEATHER_LOG:PAnsiChar = 'Weather/Log';
// Edit weather contact setting
// WPARAM = (HANDLE)hContact
// LPARAM = NULL
- MS_WEATHER_EDIT:pAnsiChar = 'Weather/Edit';
+ MS_WEATHER_EDIT:PAnsiChar = 'Weather/Edit';
// parse the string to turn it to weather display
// WPARAM = (WEATHERINFO*)hContact
// LPARAM = (char*)display_str
- MS_WEATHER_GETDISPLAY:pAnsiChar = 'Weather/GetDisplay';
+ MS_WEATHER_GETDISPLAY:PAnsiChar = 'Weather/GetDisplay';
// =============== WEATHER EVENTS ================
{
HANDLE hContact = (HANDLE)wParam;
-BOOL Condition_Changed = (BOOL)lParam;
+bool Condition_Changed = (bool)lParam;
hContact is the handle of updated contact
If the weather condition is differ from the last update (either temperature/condition,
or the last update time, depend what the user choose in the options), then
Condition_Changed is true; otherwise is false.
}
- ME_WEATHER_UPDATED:pAnsiChar = 'Miranda/Weather/Updated';
+ ME_WEATHER_UPDATED:PAnsiChar = 'Miranda/Weather/Updated';
{
-Shows a warning message for Weather Popup.
+Shows a warning message for Weather PopUp.
wParam = (char*) lpzMessage
lParam = Type
Type can either be SM_WARNING, SM_NOTIFY, or SM_WEATHERALERT
@@ -157,7 +157,7 @@ This event is used to avoid the error popup to occurs within a thread, so the "U
multiply thread" fuction don't have to be enabled for weather popups to work.
}
SM_WEATHERALERT = 16;
- ME_WEATHER_ERROR:pAnsiChar = 'Miranda/Weather/Error';
+ ME_WEATHER_ERROR:PAnsiChar = 'Miranda/Weather/Error';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_yamn.inc b/plugins/ExternalAPI/delphi/m_yamn.inc
index 300f5a3dac..f18edb8d19 100644
--- a/plugins/ExternalAPI/delphi/m_yamn.inc
+++ b/plugins/ExternalAPI/delphi/m_yamn.inc
@@ -101,7 +101,7 @@ const
//
//Event is fired when there is a double click on a CList contact,
//it is upto the caller to check for the protocol & status
-//of the MCONTACT, it's not done for you anymore since it didn't make
+//of the TMCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
MS_YAMN_CLISTCONTEXT = 'YAMN/Service/ClistContactContextMenu';
@@ -111,7 +111,7 @@ const
//
//Event is fired when there is a double click on a CList contact,
//it is upto the caller to check for the protocol & status
-//of the MCONTACT, it's not done for you anymore since it didn't make
+//of the TMCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
MS_YAMN_CLISTCONTEXTAPP = 'YAMN/Service/ClistContactContextMenuApp';
@@ -121,7 +121,7 @@ const
//
//Event is fired when there is a double click on a CList contact,
//it is upto the caller to check for the protocol & status
-//of the MCONTACT, it's not done for you anymore since it didn't make
+//of the TMCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
MS_YAMN_CLISTDBLCLICK = 'YAMN/Service/ClistContactDoubleclicked';
diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc
index da9f138b81..be7f046233 100644
--- a/plugins/QuickSearch/i_ok.inc
+++ b/plugins/QuickSearch/i_ok.inc
@@ -209,7 +209,7 @@ begin
end;
-function DoMeta(hContact:MCONTACT):pointer;
+function DoMeta(hContact:TMCONTACT):pointer;
var
pw:pWideChar;
i:integer;
@@ -433,7 +433,7 @@ end;
//----- Initial table filling -----
-procedure AddContact(num:integer;hContact:MCONTACT);
+procedure AddContact(num:integer;hContact:TMCONTACT);
var
col:pcolumnitem;
tmpstr:array [0..63] of AnsiChar;
@@ -476,7 +476,7 @@ end;
function PrepareToFill:boolean;
var
cnt,cnt1:integer;
- hContact:MCONTACT;
+ hContact:TMCONTACT;
i:integer;
begin
result:=false;
diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr
index 4629676407..9494665bc2 100644
--- a/plugins/QuickSearch/quicksearch.dpr
+++ b/plugins/QuickSearch/quicksearch.dpr
@@ -19,7 +19,7 @@ uses
mirutils,
common;
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
+function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
begin
result:=@PluginInfo;
PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
@@ -174,7 +174,7 @@ begin
Result:=0;
end;
-function Load():Integer;cdecl;
+function Load():integer;cdecl;
begin
Result:=0;
Langpack_register;
@@ -183,7 +183,7 @@ begin
qsopt.numcolumns:=loadopt_db(qsopt.columns);
end;
-function Unload:Integer;cdecl;
+function Unload:integer;cdecl;
begin
result:=0;
removetoolbar; //??
diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas
index 050fa3a3ee..41d8eaa368 100644
--- a/plugins/QuickSearch/sr_global.pas
+++ b/plugins/QuickSearch/sr_global.pas
@@ -193,7 +193,7 @@ const
procedure reghotkeys;
var
- hkrec:HOTKEYDESC;
+ hkrec:THOTKEYDESC;
begin
FillChar(hkrec,SizeOf(hkrec),0);
with hkrec do
diff --git a/plugins/QuickSearch/sr_optdialog.pas b/plugins/QuickSearch/sr_optdialog.pas
index 68ad05a322..ce85d12cfc 100644
--- a/plugins/QuickSearch/sr_optdialog.pas
+++ b/plugins/QuickSearch/sr_optdialog.pas
@@ -3,7 +3,7 @@ unit sr_optdialog;
interface
uses windows;
-function DlgProcOptions(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
implementation
@@ -138,7 +138,7 @@ begin
param);
end;
-procedure addsetcnftypes(list:hwnd);
+procedure addsetcnftypes(list:HWND);
begin
AddCnf(list,CNF_FIRSTNAME);
AddCnf(list,CNF_LASTNAME);
@@ -183,7 +183,7 @@ begin
end;
-function GetSelectedItem(list:hwnd):integer;
+function GetSelectedItem(list:HWND):integer;
begin
result:=SendMessage(list,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
end;
@@ -322,7 +322,7 @@ begin
end;
end;
-function savecuritem(Dialog:hwnd):integer;
+function savecuritem(Dialog:HWND):integer;
var
list:HWND;
srvalue:tServiceValue;
@@ -434,7 +434,7 @@ begin
SendMessage(list,LVM_INSERTITEM,0,lparam(@li));
end;
-procedure update_list(list:hwnd);
+procedure update_list(list:HWND);
var
i,cnt:integer;
begin
@@ -459,7 +459,7 @@ end;
// fill comboboxes lists
-procedure adddbsettypes(list:hwnd);
+procedure adddbsettypes(list:HWND);
begin
CB_AddStrDataW(list,TranslateW(stByte) ,QSTS_BYTE);
CB_AddStrDataW(list,TranslateW(stWord) ,QSTS_WORD);
@@ -473,7 +473,7 @@ begin
SendMessage(list,CB_SETCURSEL,0,0);
end;
-procedure addothertypes(list:hwnd);
+procedure addothertypes(list:HWND);
begin
CB_AddStrDataW(list,TranslateW(stLastSeen) ,QSTO_LASTSEEN);
CB_AddStrDataW(list,TranslateW(stLastEvent) ,QSTO_LASTEVENT);
@@ -483,7 +483,7 @@ begin
SendMessage(list,CB_SETCURSEL,0,0);
end;
-procedure addsettypes(list:hwnd);
+procedure addsettypes(list:HWND);
begin
CB_AddStrDataW(list,TranslateW(stSetting),QST_SETTING);
@@ -496,7 +496,7 @@ begin
SendMessage(list,CB_SETCURSEL,0,0);
end;
-procedure addcolumn(handle:hwnd;width:word;title:PWideChar);
+procedure addcolumn(handle:HWND;width:word;title:PWideChar);
var
lvcol:LV_COLUMNW;
begin
@@ -506,7 +506,7 @@ begin
SendMessageW(handle,LVM_INSERTCOLUMNW,0,lparam(@lvcol));
end;
-function NewListProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;
+function NewListProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=0;
if hMessage=WM_KEYDOWN then
@@ -617,12 +617,12 @@ procedure SetButtons(Dialog:HWND);
var
// ti:TTOOLINFOW;
// hwndTooltip:HWND;
- hNew :hwnd;
- hUp :hwnd;
- hDown :hwnd;
- hDelete :hwnd;
- hDefault:hwnd;
- hReload :hwnd;
+ hNew :HWND;
+ hUp :HWND;
+ hDown :HWND;
+ hDelete :HWND;
+ hDefault:HWND;
+ hReload :HWND;
begin
{
hwndTooltip:=CreateWindowW(TOOLTIPS_CLASS,nil,TTS_ALWAYSTIP,
@@ -709,7 +709,7 @@ begin
// Other
end;
-function DlgProcOptions(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
InitDlg:bool = true;
hook:THANDLE = 0;
@@ -717,7 +717,7 @@ var
pc:pWideChar;
i,idx:integer;
itemsel:integer;
- listhwnd:hwnd;
+ listhwnd:HWND;
tmpbool:bool;
begin
result:=0;
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas
index 0b4383fcc2..fcc23e7020 100644
--- a/plugins/QuickSearch/sr_window.pas
+++ b/plugins/QuickSearch/sr_window.pas
@@ -51,12 +51,12 @@ type
end;
pQSFRec = ^tQSFRec;
tQSFRec = record // row (contact)
- contact:MCONTACT;
+ contact:TMCONTACT;
proto :uint_ptr;
flags :dword;
status :dword;
//--- Metacontacts only ---
- wparam :WPARAM;
+ wparam :WPARAM;
lparam :LPARAM;
end;
var
@@ -115,7 +115,7 @@ begin
end;
end;
-procedure AddContactToList(hContact:MCONTACT;num:integer);
+procedure AddContactToList(hContact:TMCONTACT;num:integer);
var
li:LV_ITEMW;
i:integer;
@@ -337,7 +337,7 @@ end;
//----- contacts actions -----
-function GetFocusedhContact:MCONTACT;
+function GetFocusedhContact:TMCONTACT;
var
i:integer;
begin
@@ -348,7 +348,7 @@ begin
result:=FlagBuf[i].contact;
end;
-procedure ShowContactMsgDlg(hContact:MCONTACT);
+procedure ShowContactMsgDlg(hContact:TMCONTACT);
begin
if hContact<>0 then
begin
@@ -357,7 +357,7 @@ begin
end;
end;
-procedure DeleteOneContact(hContact:MCONTACT);
+procedure DeleteOneContact(hContact:TMCONTACT);
begin
if ServiceExists(strCListDel)>0 then
CallService(strCListDel,hContact,0)
@@ -388,8 +388,8 @@ end;
procedure ConvertToMeta;
var
- hMeta:MCONTACT;
- tmp:MCONTACT;
+ hMeta:TMCONTACT;
+ tmp:TMCONTACT;
i,j:integer;
begin
j:=ListView_GetItemCount(grid)-1;
@@ -438,7 +438,7 @@ end;
procedure UpdateLVCell(item,column:integer;text:pWideChar=pWideChar(-1));
var
li:LV_ITEMW;
- contact:MCONTACT;
+ contact:TMCONTACT;
row:integer;
begin
contact:=FlagBuf[LV_GetLParam(grid,item)].contact;
@@ -469,7 +469,7 @@ end;
procedure MoveToGroup(group:PWideChar);
var
- contact:MCONTACT;
+ contact:TMCONTACT;
i,j,grcol,row:integer;
begin
j:=ListView_GetItemCount(grid)-1;
@@ -512,7 +512,7 @@ end;
procedure MoveToContainer(container:PWideChar);
var
- contact:MCONTACT;
+ contact:TMCONTACT;
i,j,grcol,row:integer;
begin
j:=ListView_GetItemCount(grid)-1;
@@ -784,7 +784,7 @@ begin
UpdateLVCell(SendMessage(grid,LVM_GETNEXTITEM,-1,LVNI_FOCUSED),cmcolumn,qsr.text);
end;
-function ShowContactMenu(wnd:HWND;hContact:MCONTACT;col:integer=-1):HMENU;
+function ShowContactMenu(wnd:HWND;hContact:TMCONTACT;col:integer=-1):HMENU;
var
mi:TCListMenuItem;
pt:tpoint;
@@ -798,7 +798,7 @@ begin
col:=ListViewToColumn(col);
if (qsopt.columns[col].setting_type=QST_SETTING) and
// right now, not time or IP
- (qsopt.columns[col].datatype<>QSTS_IP) and
+ (qsopt.columns[col].datatype<>QSTS_IP) and
(qsopt.columns[col].datatype<>QSTS_TIMESTAMP) then
begin
doit:=true;
@@ -1096,7 +1096,7 @@ begin
end;
end;
-function NewLVHProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewLVHProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
case hMessage of
WM_RBUTTONUP: begin
@@ -1114,7 +1114,7 @@ end;
var
HintWnd:HWND;
-function NewLVProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewLVProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
OldHItem :integer=0;
OldHSubItem:integer=0;
@@ -1388,7 +1388,7 @@ procedure SetCellColor(lplvcd:PNMLVCUSTOMDRAW;idx:integer);
begin
if (qsopt.flags and QSO_COLORIZE)<>0 then
begin
- with FlagBuf[idx] do
+ with FlagBuf[idx] do
begin
if (flags and QSF_ACCDEL)<>0 then
begin
@@ -1526,13 +1526,13 @@ begin
end;
-function NewEditProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewEditProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
li:LV_ITEM;
count,current,next,perpage:integer;
begin
result:=0;
- case hMessage of
+ case hMessage of
WM_CHAR: if wParam=27 then
begin
PostMessage(GetParent(Dialog),WM_COMMAND,(BN_CLICKED shl 16)+IDCANCEL,0);
@@ -1881,7 +1881,7 @@ begin
end;
end;
-function QSMainWndProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function QSMainWndProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
smenu:HMENU;
header:HWND;
diff --git a/plugins/Utils.pas/common.pas b/plugins/Utils.pas/common.pas
index 056ac7af6a..37d9400cbf 100644
--- a/plugins/Utils.pas/common.pas
+++ b/plugins/Utils.pas/common.pas
@@ -13,7 +13,6 @@ windows
{$ENDIF}
;
-
Const {- Character sets -}
sBinNum = ['0'..'1'];
sOctNum = ['0'..'7'];
@@ -65,10 +64,10 @@ function mGetMem (var dst;size:integer):pointer;
procedure mFreeMem(var ptr);
function mReallocMem(var dst; size:integer):pointer;
procedure FillWord(var buf;count:cardinal;value:word); register;
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean;
+function CompareMem(P1, P2: pointer; Length: integer): Boolean;
procedure ShowDump(ptr:pbyte;len:integer);
function BSwap(value:dword):dword;
-function Hash(s:pointer; len:integer{const Seed: LongWord=$9747b28c}): LongWord;
+function Hash(s:pointer; len:integer{const Seed: longword=$9747b28c}): LongWord;
type
tSortProc = function (First,Second:integer):integer;
@@ -76,6 +75,7 @@ type
procedure ShellSort(size:integer;Compare,Swap:tSortProc);
//----- String processing -----
+
function FormatStrW(fmt:pWideChar; arr:array of pWideChar):pWideChar;
function FormatSimpleW(fmt:pWideChar; arr:array of const):pWideChar;
@@ -183,7 +183,7 @@ const
// Days between Unix time_t basis (1/1/1970) and Windows timestamp (1/1/1601)
WinDateDelta = 134774; //
-function IsLeapYear(Year:Word):Boolean;
+function IsLeapYear(Year:word):Boolean;
function EncodeTime(Hour, Minute, Sec: cardinal):TDateTime;
function EncodeDate(Year, Month , Day: cardinal):TDateTime;
@@ -505,7 +505,7 @@ end;
function PasteFromClipboard(Ansi:boolean;cp:dword=CP_ACP):pointer;
var
p:pWideChar;
- fh:tHandle;
+ fh:THANDLE;
begin
result:=nil;
if OpenClipboard(0) then
@@ -881,7 +881,7 @@ end;
{$ENDIF}
// from SysUtils
{ Delphi 7.0
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
+function CompareMem(P1, P2: pointer; Length: integer): Boolean; assembler;
asm
PUSH ESI
PUSH EDI
@@ -905,7 +905,7 @@ end;
{$IFNDEF WIN64}
// Delphi 2009 realization
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
+function CompareMem(P1, P2: pointer; Length: integer): Boolean; assembler;
asm
add eax, ecx
add edx, ecx
@@ -969,7 +969,7 @@ asm
pop ebx
end;
{$ELSE}
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean;
+function CompareMem(P1, P2: pointer; Length: integer): Boolean;
var
i:integer;
begin
@@ -1006,7 +1006,7 @@ begin
{$ELSE}
FreeMem(pointer(ptr));
{$ENDIF}
- Pointer(ptr):=nil;
+ pointer(ptr):=nil;
end;
end;
@@ -1050,10 +1050,10 @@ begin
end;
// Murmur 2.0
-function Hash(s:pointer; len:integer{const Seed: LongWord=$9747b28c}): LongWord;
+function Hash(s:pointer; len:integer{const Seed: longword=$9747b28c}): longword;
var
- lhash: LongWord;
- k: LongWord;
+ lhash: longword;
+ k: longword;
tmp,data: pByte;
const
// 'm' and 'r' are mixing constants generated offline.
@@ -1089,17 +1089,17 @@ begin
begin
tmp:=data;
inc(tmp,2);
- lhash := lhash xor (LongWord(tmp^) shl 16);
+ lhash := lhash xor (longword(tmp^) shl 16);
end;
if len >= 2 then
begin
tmp:=data;
inc(tmp);
- lhash := lhash xor (LongWord(tmp^) shl 8);
+ lhash := lhash xor (longword(tmp^) shl 8);
end;
if len >= 1 then
begin
- lhash := lhash xor (LongWord(data^));
+ lhash := lhash xor (longword(data^));
lhash := lhash * m;
end;
@@ -1394,6 +1394,7 @@ begin
end;
// ----- base string functions -----
+
function StrDup(var dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
var
l:cardinal;
@@ -2126,7 +2127,7 @@ const
((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31),
(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));
-function IsLeapYear(Year:Word):Boolean;
+function IsLeapYear(Year:word):Boolean;
begin
Result:=(Year mod 4=0) and ((Year mod 100<>0) or (Year mod 400=0));
end;
@@ -2177,7 +2178,7 @@ var
ll:uint64;
begin
ll := (int64(WinDateDelta)*SecondsPerDay + ts) * 10000000;
- pft.dwLowDateTime := DWORD(ll);
+ pft.dwLowDateTime := dword(ll);
pft.dwHighDateTime := ll shr 32;
end;
diff --git a/plugins/Utils.pas/contact.pas b/plugins/Utils.pas/contact.pas
index 3d0289cb34..128d4fa6a7 100644
--- a/plugins/Utils.pas/contact.pas
+++ b/plugins/Utils.pas/contact.pas
@@ -5,8 +5,8 @@ interface
uses windows, m_api;
-procedure FillContactList(list:hwnd; filter:boolean=true;format:pWideChar=nil);
-function FindContact(list:hwnd;contact:MCONTACT):integer;
+procedure FillContactList(list:HWND; filter:boolean=true;format:pWideChar=nil);
+function FindContact(list:HWND;contact:TMCONTACT):integer;
implementation
@@ -15,9 +15,9 @@ uses messages, common, dbsettings, mirutils;
const
defformat = '%name% - %uid% (%account%:%group%)';
-procedure FillContactList(list:hwnd; filter:boolean=true;format:pWideChar=nil);
+procedure FillContactList(list:HWND; filter:boolean=true;format:pWideChar=nil);
var
- hContact:MCONTACT;
+ hContact:TMCONTACT;
buf:array [0..511] of WideChar;
buf1:array [0..63] of WideChar;
p:PWideChar;
@@ -109,7 +109,7 @@ begin
end;
end;
-function FindContact(list:hwnd;contact:MCONTACT):integer;
+function FindContact(list:HWND;contact:TMCONTACT):integer;
var
j:integer;
begin
@@ -118,7 +118,7 @@ begin
while j>0 do
begin
dec(j);
- if THANDLE(SendMessage(list,CB_GETITEMDATA,j,0))=contact then
+ if TMCONTACT(SendMessage(list,CB_GETITEMDATA,j,0))=contact then
begin
result:=j;
break;
diff --git a/plugins/Utils.pas/dbsettings.pas b/plugins/Utils.pas/dbsettings.pas
index d8c2566c5d..1963248587 100644
--- a/plugins/Utils.pas/dbsettings.pas
+++ b/plugins/Utils.pas/dbsettings.pas
@@ -4,78 +4,78 @@ interface
uses windows,m_api;
-function DBReadByte (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:byte =0):byte;
-function DBReadWord (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:word =0):word;
-function DBReadDWord(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:dword=0):dword;
+function DBReadByte (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:byte =0):byte;
+function DBReadWord (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:word =0):word;
+function DBReadDWord(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:dword=0):dword;
-function DBReadSetting (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
-function DBReadSettingStr(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
+function DBReadSetting (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
+function DBReadSettingStr(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
-function DBReadStringLength(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
-function DBReadString (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+function DBReadStringLength(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
+function DBReadString (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
default:PAnsiChar=nil;enc:integer=DBVT_ASCIIZ):PAnsiChar;
-function DBReadUTF8 (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
-function DBReadUnicode(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PWideChar=nil):PWideChar;
+function DBReadUTF8 (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
+function DBReadUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PWideChar=nil):PWideChar;
-function DBReadStruct (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+function DBReadStruct (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
ptr:pointer;size:dword):uint_ptr;
-function DBWriteStruct(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
- ptr:pointer;size:dword):Integer;
+function DBWriteStruct(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+ ptr:pointer;size:dword):integer;
-function DBWriteSetting(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
-function DBWriteByte (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:Byte ):int_ptr;
-function DBWriteWord (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:Word ):int_ptr;
-function DBWriteDWord(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:dword):int_ptr;
+function DBWriteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
+function DBWriteByte (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:byte ):int_ptr;
+function DBWriteWord (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:word ):int_ptr;
+function DBWriteDWord(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:dword):int_ptr;
-function DBWriteString (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+function DBWriteString (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
val:PAnsiChar;enc:integer=DBVT_ASCIIZ):int_ptr;
-function DBWriteUTF8 (hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):int_ptr;
-function DBWriteUnicode(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):int_ptr;
+function DBWriteUTF8 (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):int_ptr;
+function DBWriteUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):int_ptr;
//function DBFreeVariant(dbv:PDBVARIANT):int_ptr;
-function DBDeleteSetting(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
+function DBDeleteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
-function DBDeleteGroup(hContact:MCONTACT;szModule:PAnsiChar;prefix:pAnsiChar=nil):int_ptr;
+function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:pAnsiChar=nil):int_ptr;
function DBDeleteModule(szModule:PAnsiChar):integer; // 0.8.0+
-function DBGetSettingType(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
+function DBGetSettingType(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
implementation
uses common;
-function DBReadByte(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:byte=0):byte;
+function DBReadByte(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:byte=0):byte;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_get_b(hContact, szModule, szSetting, default);
end;
-function DBReadWord(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:word=0):word;
+function DBReadWord(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:word=0):word;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_get_w(hContact, szModule, szSetting, default);
end;
-function DBReadDWord(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:dword=0):dword;
+function DBReadDWord(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:dword=0):dword;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_get_dw(hContact, szModule, szSetting, default);
end;
-function DBReadSetting(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
+function DBReadSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_get(hContact, szModule, szSetting, dbv);
end;
-function DBReadSettingStr(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
+function DBReadSettingStr(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_get_s(hContact, szModule, szSetting, dbv, DBVT_ASCIIZ);
end;
-function DBReadStringLength(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
+function DBReadStringLength(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
var
dbv:TDBVARIANT;
i:int_ptr;
@@ -90,7 +90,7 @@ begin
DBFreeVariant(@dbv);
end;
-function DBReadString(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+function DBReadString(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
default:PAnsiChar=nil;enc:integer=DBVT_ASCIIZ):PAnsiChar;
var
dbv:TDBVARIANT;
@@ -109,13 +109,13 @@ begin
DBFreeVariant(@dbv);
end;
-function DBReadUTF8(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
+function DBReadUTF8(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=DBReadString(hContact,szModule,szSetting,default,DBVT_UTF8);
end;
-function DBReadUnicode(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PWideChar=nil):PWideChar;
+function DBReadUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;default:PWideChar=nil):PWideChar;
var
dbv:TDBVARIANT;
i:int_ptr;
@@ -133,7 +133,7 @@ begin
DBFreeVariant(@dbv);
end;
-function DBReadStruct(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+function DBReadStruct(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
ptr:pointer;size:dword):uint_ptr;
var
dbv:TDBVariant;
@@ -154,57 +154,57 @@ begin
result:=0;
end;
-function DBWriteStruct(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
- ptr:pointer;size:dword):Integer;
+function DBWriteStruct(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+ ptr:pointer;size:dword):integer;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_blob(hContact, szModule, szSetting, ptr, size);
end;
-function DBWriteSetting(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
+function DBWriteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
Result:=db_set(hContact, szModule, szSetting, dbv);
end;
-function DBWriteByte(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:Byte):int_ptr;
+function DBWriteByte(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:byte):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_b(hContact, szModule, szSetting, val);
end;
-function DBWriteWord(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:Word):int_ptr;
+function DBWriteWord(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:word):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_w(hContact, szModule, szSetting, val);
end;
-function DBWriteDWord(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:dword):int_ptr;
+function DBWriteDWord(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:dword):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_dw(hContact, szModule, szSetting, val);
end;
-function DBWriteString(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
+function DBWriteString(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;
val:PAnsiChar;enc:integer=DBVT_ASCIIZ):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_s(hContact, szModule, szSetting, val);
end;
-function DBWriteUTF8(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):int_ptr;
+function DBWriteUTF8(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_utf(hContact, szModule, szSetting, val);
end;
-function DBWriteUnicode(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):int_ptr;
+function DBWriteUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_set_ws(hContact, szModule, szSetting, val);
end;
-function DBDeleteSetting(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
+function DBDeleteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=db_unset(hContact, szModule, szSetting);
@@ -226,7 +226,7 @@ begin
result:=0;
end;
-function DBDeleteGroup(hContact:MCONTACT;szModule:PAnsiChar;prefix:pAnsiChar=nil):int_ptr;
+function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:pAnsiChar=nil):int_ptr;
var
ces:TDBCONTACTENUMSETTINGS;
p:PAnsiChar;
@@ -314,7 +314,7 @@ begin
CallService(MS_DB_MODULE_DELETE,0,lParam(szModule));
end;
-function DBGetSettingType(hContact:MCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
+function DBGetSettingType(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
var
ldbv:TDBVARIANT;
begin
diff --git a/plugins/Utils.pas/editwrapper.pas b/plugins/Utils.pas/editwrapper.pas
index ff3c77a423..0a6d13d1d5 100644
--- a/plugins/Utils.pas/editwrapper.pas
+++ b/plugins/Utils.pas/editwrapper.pas
@@ -80,7 +80,7 @@ begin
end;
// if need to change button text, will pass button (not edit field) handle as parameter
-function EditWndProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function EditWndProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
pc:pWideChar;
btnwnd:HWND;
@@ -253,7 +253,7 @@ end;
//----- Edit button processing -----
-function EditControlProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function EditControlProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
oldproc:pointer;
ptr:pUserData;
@@ -395,7 +395,7 @@ type
text :pWideChar;
end;
-function EditWndProcSep(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function EditWndProcSep(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
pc:pWideChar;
wnd,wnd1:HWND;
diff --git a/plugins/Utils.pas/io.pas b/plugins/Utils.pas/io.pas
index 9a587c660f..d772781144 100644
--- a/plugins/Utils.pas/io.pas
+++ b/plugins/Utils.pas/io.pas
@@ -216,7 +216,7 @@ end;
function DirectoryExists(Directory:PAnsiChar):Boolean;
var
- Code: Integer;
+ Code: integer;
begin
Code := GetFileAttributesA(Directory);
Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)<>0);
@@ -224,7 +224,7 @@ end;
function DirectoryExists(Directory:PWideChar):Boolean;
var
- Code: Integer;
+ Code: integer;
begin
Code := GetFileAttributesW(Directory);
Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)<>0);
@@ -232,7 +232,7 @@ end;
function FileExists(fname:PAnsiChar):Boolean;
var
- Code: Integer;
+ Code: integer;
begin
Code := GetFileAttributesA(fname);
Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)=0);
@@ -240,7 +240,7 @@ end;
function FileExists(fname:PWideChar):Boolean;
var
- Code: Integer;
+ Code: integer;
begin
Code := GetFileAttributesW(fname);
Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)=0);
diff --git a/plugins/Utils.pas/kolsizer.pas b/plugins/Utils.pas/kolsizer.pas
index 28361a4585..1004e1de57 100644
--- a/plugins/Utils.pas/kolsizer.pas
+++ b/plugins/Utils.pas/kolsizer.pas
@@ -37,8 +37,8 @@ type
function GetFlags(aControl:pControl):cardinal;
protected
procedure init;virtual;
- procedure DoKeyUp( Sender: PControl; var Key: Longint; Shift: DWORD);
- procedure DoChar( Sender: PControl; var Key: KOLChar; Shift: DWORD);
+ procedure DoKeyUp( Sender: PControl; var Key: Longint; Shift: dword);
+ procedure DoChar( Sender: PControl; var Key: KOLChar; Shift: dword);
public
destructor destroy;virtual;
procedure Connect(aName: KOLString; aControl: pControl; flags:cardinal=0);
@@ -98,7 +98,7 @@ type
var
LocalDesigner:PDesigner=nil;
-function DesignHandlerProc(Sender: PControl; var Msg: TMsg; var Rslt: Integer): Boolean;
+function DesignHandlerProc(Sender: PControl; var Msg: TMsg; var Rslt: integer): Boolean;
//var MouseData:TMouseEventData;
begin
Result:=false;
@@ -136,10 +136,10 @@ begin
end;
// TSizerControl methods
-function WndProcSizer( Sender: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean;
+function WndProcSizer( Sender: PControl; var Msg: TMsg; var Rslt: integer ): Boolean;
var
Pt: TPoint;
- i: Integer;
+ i: integer;
R:Trect;
Data:PSizerData;
begin
@@ -247,7 +247,7 @@ end;
procedure TSizerData.DoPaint(sender:pControl;DC:HDC);
var
- i: Integer;
+ i: integer;
begin
// I simply use the current pen and brush
for i := 0 to 7 do
@@ -284,7 +284,7 @@ end;
procedure TDesigner.PaintGrid(Sender: pControl; DC: HDC);
var
- i, j: Integer;
+ i, j: integer;
begin
i := 0;
j := 0;
@@ -367,7 +367,7 @@ end;
procedure TDesigner.DisConnect(aControl: pControl);
var
- index: Integer;
+ index: integer;
begin
index := IndexOfObj(aControl);
if index = -1 then
@@ -417,16 +417,16 @@ begin
FOnControlChange(sender);
end;
-procedure TDesigner.DoChar( Sender: PControl; var Key: KOLChar; Shift: DWORD);
+procedure TDesigner.DoChar( Sender: PControl; var Key: KOLChar; Shift: dword);
begin
// messagebox(0,'444','',0);
end;
-procedure TDesigner.DoKeyUp(Sender: PControl; var Key: Integer; Shift: DWORD);
+procedure TDesigner.DoKeyUp(Sender: PControl; var Key: integer; Shift: dword);
procedure DeleteControl(Index:integer);
var
- i: Integer;
+ i: integer;
C:PControl;
begin
C:=PControl(Objects[index]);
@@ -472,7 +472,7 @@ end;
function TDesigner.UniqueName(aName: KOLString; flags:cardinal): KOLString;
var
- I, J: Integer;
+ I, J: integer;
T: KOLString;
begin
// Strip obj_ prefix and all other prefix+underscores from
diff --git a/plugins/Utils.pas/mApiCardM.pas b/plugins/Utils.pas/mApiCardM.pas
index 9d96fbdbb7..febdf4f783 100644
--- a/plugins/Utils.pas/mApiCardM.pas
+++ b/plugins/Utils.pas/mApiCardM.pas
@@ -44,6 +44,10 @@ function CreateEventCard (parent:HWND=0):tmApiCard;
implementation
+{
+ mirutils unit is for ConvertFileName function only
+ m_api is for TranslateW and TrandlateDialogDefault
+}
uses common,io,m_api,mirutils,memini,wrapper;
{$r mApiCard.res}
@@ -222,7 +226,7 @@ begin
result:=pc;
end;
-procedure tmApiCard.FillList(combo:hwnd; mode:integer=0);
+procedure tmApiCard.FillList(combo:HWND; mode:integer=0);
var
tmpbuf:array [0..127] of AnsiChar;
p,pp,pc:PAnsiChar;
@@ -272,7 +276,7 @@ begin
end;
end;
-function ServiceHelpDlg(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
+function ServiceHelpDlg(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
buf:PAnsiChar;
tmp:PWideChar;
diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas
index 7011b6ed9d..e035b6f8cd 100644
--- a/plugins/Utils.pas/mirutils.pas
+++ b/plugins/Utils.pas/mirutils.pas
@@ -20,10 +20,10 @@ function RegisterSingleIcon(resname,ilname,descr,group:PAnsiChar):int;
// others
-function ConvertFileName(src:pAnsiChar;hContact:MCONTACT=0):pAnsiChar; overload;
-function ConvertFileName(src:pWideChar;hContact:MCONTACT=0):pWideChar; overload;
-function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:MCONTACT=0):pAnsiChar; overload;
-function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:MCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
+function ConvertFileName(src:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
+function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
procedure ShowPopupW(text:pWideChar;title:pWideChar=nil);
function GetAddonFileName(prefix,altname,path:PAnsiChar;ext:PAnsiChar):PAnsiChar;
@@ -31,31 +31,31 @@ function TranslateA2W(sz:PAnsiChar):PWideChar;
function MirandaCP:integer;
function isVarsInstalled:bool;
-function ParseVarString(astr:pAnsiChar;aContact:MCONTACT=0;extra:pAnsiChar=nil):pAnsiChar; overload;
-function ParseVarString(astr:pWideChar;aContact:MCONTACT=0;extra:pWideChar=nil):pWideChar; overload;
+function ParseVarString(astr:pAnsiChar;aContact:TMCONTACT=0;extra:pAnsiChar=nil):pAnsiChar; overload;
+function ParseVarString(astr:pWideChar;aContact:TMCONTACT=0;extra:pWideChar=nil):pWideChar; overload;
function ShowVarHelp(dlg:HWND;id:integer=0):integer;
-function IsChat(hContact:MCONTACT):bool;
-procedure SendToChat(hContact:MCONTACT;pszText:PWideChar);
-
-function LoadContact(group,setting:PAnsiChar):MCONTACT;
-function SaveContact(hContact:MCONTACT;group,setting:PAnsiChar):integer;
-
-function SetCListSelContact(hContact:MCONTACT):MCONTACT;
-function GetCListSelContact:MCONTACT; {$IFDEF DELPHI_10_UP}inline;{$ENDIF}
-function GetContactProtoAcc(hContact:MCONTACT):PAnsiChar;
-function IsMirandaUser(hContact:MCONTACT):integer; // >0=Miranda; 0=Not miranda; -1=unknown
-procedure ShowContactDialog(hContact:MCONTACT;DblClk:boolean=true;anystatus:boolean=true);
-function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):MCONTACT;
-function WndToContact(wnd:hwnd):MCONTACT; overload;
-function WndToContact:MCONTACT; overload;
-function GetContactStatus(hContact:MCONTACT):integer;
+function IsChat(hContact:TMCONTACT):bool;
+procedure SendToChat(hContact:TMCONTACT;pszText:PWideChar);
+
+function LoadContact(group,setting:PAnsiChar):TMCONTACT;
+function SaveContact(hContact:TMCONTACT;group,setting:PAnsiChar):integer;
+
+function SetCListSelContact(hContact:TMCONTACT):TMCONTACT;
+function GetCListSelContact:TMCONTACT; {$IFDEF DELPHI_10_UP}inline;{$ENDIF}
+function GetContactProtoAcc(hContact:TMCONTACT):PAnsiChar;
+function IsMirandaUser(hContact:TMCONTACT):integer; // >0=Miranda; 0=Not miranda; -1=unknown
+procedure ShowContactDialog(hContact:TMCONTACT;DblClk:boolean=true;anystatus:boolean=true);
+function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):TMCONTACT;
+function WndToContact(wnd:HWND):TMCONTACT; overload;
+function WndToContact:TMCONTACT; overload;
+function GetContactStatus(hContact:TMCONTACT):integer;
// -2 - deleted account, -1 - disabled account, 0 - hidden
// 1 - metacontact, 2 - submetacontact, positive - active
// proto - ASSIGNED buffer
-function IsContactActive(hContact:MCONTACT;proto:pAnsiChar=nil):integer;
+function IsContactActive(hContact:TMCONTACT;proto:pAnsiChar=nil):integer;
-function CreateGroupW(name:pWideChar;hContact:MCONTACT):integer;
+function CreateGroupW(name:pWideChar;hContact:TMCONTACT):integer;
function MakeGroupMenu(idxfrom:integer=100):HMENU;
function GetNewGroupName(parent:HWND):pWideChar;
@@ -95,7 +95,7 @@ begin
SendMessage(btn,BM_SETIMAGE,IMAGE_ICON,result);
end;
-function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:MCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
var
pc:pWideChar;
begin
@@ -115,7 +115,7 @@ begin
end;
end;
-function ConvertFileName(src:pWideChar;hContact:MCONTACT=0):pWideChar; overload;
+function ConvertFileName(src:pWideChar;hContact:TMCONTACT=0):pWideChar; overload;
var
buf1:array [0..511] of WideChar;
begin
@@ -125,7 +125,7 @@ begin
result:=nil;
end;
-function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:MCONTACT=0):pAnsiChar; overload;
+function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
var
pc:pAnsiChar;
begin
@@ -145,7 +145,7 @@ begin
end;
end;
-function ConvertFileName(src:pAnsiChar;hContact:MCONTACT=0):pAnsiChar; overload;
+function ConvertFileName(src:pAnsiChar;hContact:TMCONTACT=0):pAnsiChar; overload;
var
buf1:array [0..511] of AnsiChar;
begin
@@ -165,7 +165,7 @@ begin
result:=MirCP;
end;
-function IsChat(hContact:MCONTACT):bool;
+function IsChat(hContact:TMCONTACT):bool;
begin
result:=DBReadByte(hContact,
PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
@@ -178,7 +178,7 @@ begin
result:=ServiceExists(MS_VARS_FORMATSTRING)<>0;
end;
-function ParseVarString(astr:pAnsiChar;aContact:MCONTACT=0;extra:pAnsiChar=nil):pAnsiChar;
+function ParseVarString(astr:pAnsiChar;aContact:TMCONTACT=0;extra:pAnsiChar=nil):pAnsiChar;
var
tfi:TFORMATINFO;
tmp,pc:pAnsiChar;
@@ -217,7 +217,7 @@ begin
mir_free(pc);
end;
-function ParseVarString(astr:pWideChar;aContact:MCONTACT=0;extra:pWideChar=nil):pWideChar;
+function ParseVarString(astr:pWideChar;aContact:TMCONTACT=0;extra:pWideChar=nil):pWideChar;
var
tfi:TFORMATINFO;
tmp,pc:pWideChar;
@@ -314,7 +314,7 @@ begin
end;
end;
-function GetContactProtoAcc(hContact:MCONTACT):PAnsiChar;
+function GetContactProtoAcc(hContact:TMCONTACT):PAnsiChar;
begin
if ServiceExists(MS_PROTO_GETCONTACTBASEACCOUNT)<>0 then
result:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEACCOUNT,hContact,0))
@@ -322,7 +322,7 @@ begin
result:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
end;
-function IsMirandaUser(hContact:MCONTACT):integer; // >0=Miranda; 0=Not miranda; -1=unknown
+function IsMirandaUser(hContact:TMCONTACT):integer; // >0=Miranda; 0=Not miranda; -1=unknown
var
sz:PAnsiChar;
begin
@@ -337,7 +337,7 @@ begin
result:=-1;
end;
-function SetCListSelContact(hContact:MCONTACT):MCONTACT;
+function SetCListSelContact(hContact:TMCONTACT):TMCONTACT;
var
wnd:HWND;
begin
@@ -348,12 +348,12 @@ begin
// SendMessage(wnd,CLM_ENSUREVISIBLE,hContact,0);
end;
-function GetCListSelContact:MCONTACT;
+function GetCListSelContact:TMCONTACT;
begin
result:=SendMessageW(CallService(MS_CLUI_GETHWNDTREE,0,0),CLM_GETSELECTION,0,0);
end;
-function LoadContact(group,setting:PAnsiChar):MCONTACT;
+function LoadContact(group,setting:PAnsiChar):TMCONTACT;
var
p,proto:pAnsiChar;
section:array [0..63] of AnsiChar;
@@ -378,7 +378,7 @@ begin
mFreeMem(dbv.szVal.W);
end;
-function SaveContact(hContact:MCONTACT;group,setting:PAnsiChar):integer;
+function SaveContact(hContact:TMCONTACT;group,setting:PAnsiChar):integer;
var
p,proto,uid:pAnsiChar;
cws:TDBVARIANT;
@@ -420,9 +420,9 @@ begin
end;
end;
-function WndToContact(wnd:hwnd):MCONTACT; overload;
+function WndToContact(wnd:HWND):TMCONTACT; overload;
var
- hContact:MCONTACT;
+ hContact:TMCONTACT;
mwid:TMessageWindowInputData;
mwod:TMessageWindowOutputData;
begin
@@ -450,7 +450,7 @@ begin
result:=0;
end;
-function WndToContact:MCONTACT; overload;
+function WndToContact:TMCONTACT; overload;
var
wnd:HWND;
begin
@@ -465,7 +465,7 @@ begin
result:=GetCListSelContact;
end;
-function GetContactStatus(hContact:MCONTACT):integer;
+function GetContactStatus(hContact:TMCONTACT):integer;
var
szProto:PAnsiChar;
begin
@@ -555,7 +555,7 @@ begin
end;
end;
-procedure ShowContactDialog(hContact:MCONTACT;DblClk:boolean=true;anystatus:boolean=true);
+procedure ShowContactDialog(hContact:TMCONTACT;DblClk:boolean=true;anystatus:boolean=true);
var
pc:array [0..127] of AnsiChar;
begin
@@ -609,7 +609,7 @@ begin
CallServiceSync(MS_GC_EVENT,0,lparam(@gce));
end;
-procedure SendToChat(hContact:MCONTACT;pszText:PWideChar);
+procedure SendToChat(hContact:TMCONTACT;pszText:PWideChar);
var
gci:TGC_INFO;
pszModule:PAnsiChar;
@@ -633,11 +633,11 @@ begin
end;
end;
-function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):MCONTACT;
+function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):TMCONTACT;
var
uid:pAnsiChar;
ldbv:TDBVARIANT;
- hContact:MCONTACT;
+ hContact:TMCONTACT;
pw:pWideChar;
begin
result:=0;
@@ -692,7 +692,7 @@ begin
end;
end;
-function IsContactActive(hContact:MCONTACT;proto:pAnsiChar=nil):integer;
+function IsContactActive(hContact:TMCONTACT;proto:pAnsiChar=nil):integer;
var
p:PPROTOACCOUNT;
name: array [0..31] of AnsiChar;
@@ -721,8 +721,10 @@ begin
result:=255;
if db_mc_getMeta(hContact)<>0 then
result:=2;
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)), META_PROTO)=0 then
- result:=1;
+ if StrCmp(
+ PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
+ META_PROTO)=0 then
+ result:=1;
end;
if proto<>nil then
StrCopy(proto,@name);
@@ -736,7 +738,7 @@ begin
end;
// Import plugin function adaptation
-function CreateGroupW(name:pWideChar;hContact:MCONTACT):integer;
+function CreateGroupW(name:pWideChar;hContact:TMCONTACT):integer;
var
groupId:integer;
groupIdStr:array [0..10] of AnsiChar;
diff --git a/plugins/Utils.pas/msninfo.pas b/plugins/Utils.pas/msninfo.pas
index 05fef4959b..12629b3305 100644
--- a/plugins/Utils.pas/msninfo.pas
+++ b/plugins/Utils.pas/msninfo.pas
@@ -126,7 +126,7 @@ begin
// WMContentID - not needs
end;
-function dlgMSNHook(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function dlgMSNHook(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
pMyCDS:PCOPYDATASTRUCT;
begin
diff --git a/plugins/Utils.pas/playlist.pas b/plugins/Utils.pas/playlist.pas
index fc3199dcfc..12c7cbcf05 100644
--- a/plugins/Utils.pas/playlist.pas
+++ b/plugins/Utils.pas/playlist.pas
@@ -353,7 +353,7 @@ procedure tPlaylist.SetTrackNumber(value:integer);
begin
if value<0 then
value:=0
- else if value>=Integer(plSize) then
+ else if value>=integer(plSize) then
value:=plSize-1;
if fShuffle then
diff --git a/plugins/Utils.pas/protocols.pas b/plugins/Utils.pas/protocols.pas
index 5b4c611e47..c311cb8936 100644
--- a/plugins/Utils.pas/protocols.pas
+++ b/plugins/Utils.pas/protocols.pas
@@ -21,10 +21,10 @@ function GetProtoStatusNum(ProtoNum:uint_ptr):integer;
function GetProtoName (ProtoNum:uint_ptr):PAnsiChar;
function GetProtoAccName (ProtoNum:uint_ptr):PWideChar;
-procedure FillProtoList (list:hwnd;withIcons:bool=false);
-procedure CheckProtoList (list:hwnd);
-procedure FillStatusList (proto:uint_ptr;list:hwnd;withIcons:bool=false);
-procedure CheckStatusList(list:hwnd;ProtoNum:uint_ptr);
+procedure FillProtoList (list:HWND;withIcons:bool=false);
+procedure CheckProtoList (list:HWND);
+procedure FillStatusList (proto:uint_ptr;list:HWND;withIcons:bool=false);
+procedure CheckStatusList(list:HWND;ProtoNum:uint_ptr);
function CreateProtoList(deepscan:boolean=false):integer;
procedure FreeProtoList;
@@ -214,7 +214,7 @@ begin
result:=nil;
end;
-procedure FillProtoList(list:hwnd;withIcons:bool=false);
+procedure FillProtoList(list:HWND;withIcons:bool=false);
var
item:TLVITEMW;
lvc:TLVCOLUMN;
@@ -261,7 +261,7 @@ begin
ListView_SetColumnWidth(list,0,LVSCW_AUTOSIZE);
end;
-procedure CheckProtoList(list:hwnd);
+procedure CheckProtoList(list:HWND);
var
i:integer;
begin
@@ -275,7 +275,7 @@ begin
end;
end;
-procedure FillStatusList(proto:uint_ptr;list:hwnd;withIcons:bool=false);
+procedure FillStatusList(proto:uint_ptr;list:HWND;withIcons:bool=false);
procedure AddString(num:integer;enabled:boolean;cli:PCLIST_INTERFACE);
var
@@ -345,7 +345,7 @@ begin
ListView_SetColumnWidth(list,0,LVSCW_AUTOSIZE);
end;
-procedure CheckStatusList(list:hwnd;ProtoNum:uint_ptr);
+procedure CheckStatusList(list:HWND;ProtoNum:uint_ptr);
procedure SetStatusMask(stat:integer;state:bool);
var
diff --git a/plugins/Utils.pas/sedit.pas b/plugins/Utils.pas/sedit.pas
index 896f880b80..8fef4dcebb 100644
--- a/plugins/Utils.pas/sedit.pas
+++ b/plugins/Utils.pas/sedit.pas
@@ -157,7 +157,7 @@ begin
SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
end;
-function NewLVProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewLVProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=0;
case hMessage of
@@ -804,7 +804,7 @@ begin
end;
// Fill table row by data from edit fields
-procedure FillLVRow(Dialog:hwnd;list:HWND;item:integer);
+procedure FillLVRow(Dialog:HWND;list:HWND;item:integer);
var
ltype,j,idc:integer;
idx:integer;
@@ -945,7 +945,7 @@ begin
FreeMem(buf);
end;
-function StructHelp(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function StructHelp(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
tmp:pWideChar;
pc:pAnsiChar;
@@ -995,7 +995,7 @@ begin
end;
end;
-function StructEdit(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function StructEdit(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd:HWND;
i:integer;
diff --git a/plugins/Utils.pas/sparam.pas b/plugins/Utils.pas/sparam.pas
index 43007b2c86..00e49ac1ab 100644
--- a/plugins/Utils.pas/sparam.pas
+++ b/plugins/Utils.pas/sparam.pas
@@ -1,3 +1,7 @@
+{
+ Parameter: CBN_EDITCHANGE on fields changing, BN_CLICKED on Struct changes
+ Result : CBN_EDITCHANGE on type changing, BN_CLICKED on option changes
+}
unit sparam;
interface
@@ -50,7 +54,7 @@ function SetParamLabel (Dialog:HWND; lbl:pWideChar):HWND;
procedure ClearParam (flags:dword; var param);
function DuplicateParam(flags:dword; var sparam,dparam):dword;
-function TranslateParam(param:uint_ptr;flags:dword;hContact:MCONTACT):uint_ptr;
+function TranslateParam(param:uint_ptr;flags:dword;hContact:TMCONTACT):uint_ptr;
function CreateResultBlock(parent:HWND;x,y,width:integer;flags:dword=0):THANDLE;
function ClearResultFields(Dialog:HWND):HWND;
@@ -254,7 +258,7 @@ begin
result:=Dialog;
end;
-function DlgParamProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgParamProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd,wnd1:HWND;
proc:pointer;
@@ -651,7 +655,7 @@ begin
result:=flags;
end;
-function TranslateParam(param:uint_ptr;flags:dword;hContact:MCONTACT):uint_ptr;
+function TranslateParam(param:uint_ptr;flags:dword;hContact:TMCONTACT):uint_ptr;
var
tmp1:pWideChar;
begin
@@ -707,7 +711,7 @@ begin
SendMessage(wnd,CB_SETCURSEL,0,0);
end;
-function DlgResultProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgResultProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
proc:pointer;
wnd:HWND;
@@ -720,6 +724,7 @@ begin
WM_COMMAND: begin
case wParam shr 16 of
BN_CLICKED: begin
+ SendMessage(GetParent(Dialog),WM_COMMAND,BN_CLICKED shl 16,Dialog);
case loword(wParam) of
IDC_RES_SIGNED: begin
if IsDlgButtonChecked(Dialog,IDC_RES_SIGNED)=BST_UNCHECKED then
@@ -747,6 +752,7 @@ begin
end;
CBN_SELCHANGE: begin
+ SendMessage(GetParent(Dialog),WM_COMMAND,CBN_EDITCHANGE shl 16,Dialog);
case loword(wParam) of
IDC_RES_TYPE: begin
case CB_GetData(lParam) of
diff --git a/plugins/Utils.pas/srvblock.pas b/plugins/Utils.pas/srvblock.pas
index debd99cddf..d8e4465f0b 100644
--- a/plugins/Utils.pas/srvblock.pas
+++ b/plugins/Utils.pas/srvblock.pas
@@ -1,3 +1,6 @@
+{
+ in dialog: sends CBN_EDITCHANGE for changes
+}
unit srvblock;
interface
@@ -227,7 +230,7 @@ begin
ReloadService(Dialog,@buf,true);
end;
-function DlgServiceProc(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgServiceProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
proc:pointer;
pc:pAnsiChar;
@@ -264,6 +267,8 @@ begin
IDC_CLOSE_WPAR,
IDC_CLOSE_LPAR,
IDC_CLOSE_RES: ShowBlock(Dialog,loword(wParam));
+ else // from parameter and result
+ SendMessage(GetParent(Dialog),WM_COMMAND,BN_CLICKED shl 16,Dialog);
end;
end;
diff --git a/plugins/Utils.pas/syswin.pas b/plugins/Utils.pas/syswin.pas
index 7cc646184a..9b75f711fa 100644
--- a/plugins/Utils.pas/syswin.pas
+++ b/plugins/Utils.pas/syswin.pas
@@ -24,12 +24,12 @@ function GetAssoc(key:PAnsiChar):PAnsiChar;
function GetFileFromWnd(wnd:HWND;Filter:tFFWFilterProc;
flags:dword=gffdMultiThread+gffdOld;timeout:cardinal=ThreadTimeout):pWideChar;
-function WaitFocusedWndChild(Wnd:HWnd):HWnd;
+function WaitFocusedWndChild(Wnd:HWND):HWND;
function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
+ Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
function ExecuteWait(AppPath:PAnsiChar; CmdLine:PAnsiChar=nil; DfltDirectory:PAnsiChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
+ Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
function GetEXEbyWnd(w:HWND; var dst:pWideChar):pWideChar; overload;
function GetEXEbyWnd(w:HWND; var dst:PAnsiChar):PAnsiChar; overload;
@@ -46,14 +46,20 @@ uses
{$ENDIF}
common,messages;
+{ shellapi import
+function FindExecutableA(FileName, Directory: PAnsiChar; Result: PAnsiChar): HINST; stdcall;
+ external 'shell32.dll' name 'FindExecutableA';
+function FindExecutableW(FileName, Directory: PWideChar; Result: PWideChar): HINST; stdcall;
+ external 'shell32.dll' name 'FindExecutableW';
+}
{$IFDEF COMPILER_16_UP}
type pqword = ^int64;
{$ENDIF}
function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
+ Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
var
- Flags: DWORD;
+ Flags: dword;
{$IFDEF FPC}
Startup: StartupInfo;
{$ELSE}
@@ -114,9 +120,9 @@ begin
end;
function ExecuteWait(AppPath:PAnsiChar; CmdLine:PAnsiChar=nil; DfltDirectory:PAnsiChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
+ Show:dword=SW_SHOWNORMAL; TimeOut:dword=0; ProcID:PDWORD=nil):dword;
var
- Flags: DWORD;
+ Flags: dword;
{$IFDEF FPC}
Startup: StartupInfo;
{$ELSE}
@@ -220,8 +226,8 @@ end;
function GetFocusedChild(wnd:HWND):HWND;
var
- dwTargetOwner:DWORD;
- dwThreadID:DWORD;
+ dwTargetOwner:dword;
+ dwThreadID:dword;
res:boolean;
begin
dwTargetOwner:=GetWindowThreadProcessId(wnd,nil);
@@ -234,10 +240,10 @@ begin
AttachThreadInput(dwThreadID,dwTargetOwner,FALSE);
end;
-function WaitFocusedWndChild(Wnd:HWnd):HWnd;
+function WaitFocusedWndChild(Wnd:HWND):HWND;
var
- T1,T2:Integer;
- W:HWnd;
+ T1,T2:integer;
+ W:HWND;
begin
Sleep(50);
T1:=GetTickCount;
@@ -347,7 +353,7 @@ end;
function GetEXEbyWnd(w:HWND; var dst:pWideChar):pWideChar;
var
hProcess:THANDLE;
- ProcID:DWORD;
+ ProcID:dword;
ModuleName: array [0..300] of WideChar;
begin
dst:=nil;
@@ -369,7 +375,7 @@ end;
function GetEXEbyWnd(w:HWND; var dst:PAnsiChar):PAnsiChar;
var
hProcess:THANDLE;
- ProcID:DWORD;
+ ProcID:dword;
ModuleName: array [0..300] of AnsiChar;
begin
dst:=nil;
@@ -399,7 +405,7 @@ var
i:integer;
begin
result:=false;
- EnumProcesses(pointer(@Processes),nCount*SizeOf(DWORD),nProcess);
+ EnumProcesses(pointer(@Processes),nCount*SizeOf(dword),nProcess);
nProcess:=(nProcess div 4)-1;
for i:=2 to nProcess do //skip Idle & System
begin
@@ -566,7 +572,7 @@ const
type
ptrec = ^trec;
trec = record
- handle:thandle;
+ handle:THANDLE;
fname:pWideChar;
end;
@@ -577,7 +583,7 @@ function GetName(param:pointer):integer; //stdcall;
const
BufSize = $800;
// depends of record align
- offset=SizeOf(Pointer) div 2; // 4 for win64, 2 for win32
+ offset=SizeOf(pointer) div 2; // 4 for win64, 2 for win32
var
TmpBuf:array [0..BufSize-1] of WideChar;
var
diff --git a/plugins/Utils.pas/uRect.pas b/plugins/Utils.pas/uRect.pas
index 6d383ef518..11cb51c8c6 100644
--- a/plugins/Utils.pas/uRect.pas
+++ b/plugins/Utils.pas/uRect.pas
@@ -20,50 +20,50 @@ type
PRect = ^TRect;
TRect = packed record
- case Integer of
+ case integer of
0: (Left, Top, Right, Bottom: Longint);
1: (TopLeft, BottomRight: TPoint);
end;
}
{
--function SetRect(var lprc: TRect; xLeft, yTop, xRight, yBottom: Integer): BOOL; stdcall;
--function CopyRect(var lprcDst: TRect; const lprcSrc: TRect): BOOL; stdcall;
--function InflateRect(var lprc: TRect; dx, dy: Integer): BOOL; stdcall;
-function SubtractRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; stdcall;
--function SetRectEmpty(var lprc: TRect): BOOL; stdcall;
--function IntersectRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; stdcall;
--function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; stdcall;
--function OffsetRect(var lprc: TRect; dx, dy: Integer): BOOL; stdcall;
--function IsRectEmpty(const lprc: TRect): BOOL; stdcall;
--function EqualRect(const lprc1, lprc2: TRect): BOOL; stdcall;
--function PtInRect(const lprc: TRect; pt: TPoint): BOOL; stdcall;
+-function SetRect(var lprc: TRect; xLeft, yTop, xRight, yBottom: integer): bool; stdcall;
+-function CopyRect(var lprcDst: TRect; const lprcSrc: TRect): bool; stdcall;
+-function InflateRect(var lprc: TRect; dx, dy: integer): bool; stdcall;
+function SubtractRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): bool; stdcall;
+-function SetRectEmpty(var lprc: TRect): bool; stdcall;
+-function IntersectRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): bool; stdcall;
+-function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): bool; stdcall;
+-function OffsetRect(var lprc: TRect; dx, dy: integer): bool; stdcall;
+-function IsRectEmpty(const lprc: TRect): bool; stdcall;
+-function EqualRect(const lprc1, lprc2: TRect): bool; stdcall;
+-function PtInRect(const lprc: TRect; pt: TPoint): bool; stdcall;
}
-function Point(X, Y: Integer): TPoint; overload;
-procedure Point(var pt:TPoint; X, Y: Integer); overload;
+function Point(X, Y: integer): TPoint; overload;
+procedure Point(var pt:TPoint; X, Y: integer); overload;
-function SmallPoint(X, Y: Integer): TSmallPoint; overload;
-function SmallPoint(XY: LongWord): TSmallPoint; overload;
+function SmallPoint(X, Y: integer): TSmallPoint; overload;
+function SmallPoint(XY: longword): TSmallPoint; overload;
function CenterPoint(const Rect: TRect): TPoint; overload;
procedure CenterPoint(const Rect: TRect; var pt:TPoint); overload;
function PointInRect(const P: TPoint; const Rect: TRect): Boolean;
function PtInRect (const Rect: TRect; const P: TPoint): Boolean;
-function Rect (Left, Top, Right, Bottom: Integer): TRect; overload;
-procedure Rect (var Rect:TRect; Left, Top, Right, Bottom: Integer); overload;
-procedure SetRect(var Rect:TRect; Left, Top, Right, Bottom: Integer);
+function Rect (Left, Top, Right, Bottom: integer): TRect; overload;
+procedure Rect (var Rect:TRect; Left, Top, Right, Bottom: integer); overload;
+procedure SetRect(var Rect:TRect; Left, Top, Right, Bottom: integer);
function CopyRect(var Rect: TRect; const R1: TRect):Boolean;
function SetRectEmpty(var Rect: TRect): Boolean;
-function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect; overload;
-procedure Bounds(var Rect:TRect; ALeft, ATop, AWidth, AHeight: Integer); overload;
+function Bounds(ALeft, ATop, AWidth, AHeight: integer): TRect; overload;
+procedure Bounds(var Rect:TRect; ALeft, ATop, AWidth, AHeight: integer); overload;
function EqualRect(const R1, R2: TRect): Boolean;
function IsRectInside(const R1, R2: TRect): Boolean;
function IsRectEmpty(const Rect: TRect): Boolean;
-function InflateRect(var Rect: TRect; dx, dy: Integer): Boolean;
-function OffsetRect(var Rect: TRect; DX: Integer; DY: Integer): Boolean;
+function InflateRect(var Rect: TRect; dx, dy: integer): Boolean;
+function OffsetRect(var Rect: TRect; DX: integer; DY: integer): Boolean;
function IntersectRect(var Rect: TRect; const R1, R2: TRect): Boolean; overload;
function IntersectRect(const R1, R2: TRect): Boolean; overload;
function UnionRect(var Rect: TRect; const R1, R2: TRect): Boolean;
@@ -71,25 +71,25 @@ function UnionRect(var Rect: TRect; const R1, R2: TRect): Boolean;
implementation
-function Point(X, Y: Integer): TPoint;
+function Point(X, Y: integer): TPoint;
begin
Result.X := X;
Result.Y := Y;
end;
-procedure Point(var pt:TPoint; X, Y: Integer);
+procedure Point(var pt:TPoint; X, Y: integer);
begin
pt.X := X;
pt.Y := Y;
end;
-function SmallPoint(X, Y: Integer): TSmallPoint;
+function SmallPoint(X, Y: integer): TSmallPoint;
begin
Result.X := X;
Result.Y := Y;
end;
-function SmallPoint(XY: LongWord): TSmallPoint;
+function SmallPoint(XY: longword): TSmallPoint;
begin
Result.X := SmallInt(XY and $0000FFFF);
Result.Y := SmallInt(XY shr 16);
@@ -133,7 +133,7 @@ end;
//----- TRect -----
-function Rect(Left, Top, Right, Bottom: Integer): TRect;
+function Rect(Left, Top, Right, Bottom: integer): TRect;
begin
Result.Left := Left;
Result.Top := Top;
@@ -141,7 +141,7 @@ begin
Result.Right := Right;
end;
-procedure Rect(var Rect:TRect; Left, Top, Right, Bottom: Integer);
+procedure Rect(var Rect:TRect; Left, Top, Right, Bottom: integer);
begin
Rect.Left := Left;
Rect.Top := Top;
@@ -149,7 +149,7 @@ begin
Rect.Right := Right;
end;
-procedure SetRect(var Rect:TRect; Left, Top, Right, Bottom: Integer);
+procedure SetRect(var Rect:TRect; Left, Top, Right, Bottom: integer);
begin
Rect.Left := Left;
Rect.Top := Top;
@@ -232,7 +232,7 @@ begin
if not Result then FillChar(Rect, SizeOf(Rect), 0);
end;
-function InflateRect(var Rect: TRect; dx, dy: Integer): Boolean;
+function InflateRect(var Rect: TRect; dx, dy: integer): Boolean;
begin
with Rect do
begin
@@ -244,7 +244,7 @@ begin
Result := not IsRectEmpty(Rect);
end;
-function OffsetRect(var Rect: TRect; DX: Integer; DY: Integer): Boolean;
+function OffsetRect(var Rect: TRect; DX: integer; DY: integer): Boolean;
begin
if @Rect <> nil then // Test to increase compatiblity with Windows
begin
@@ -258,7 +258,7 @@ begin
Result := False;
end;
-function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;
+function Bounds(ALeft, ATop, AWidth, AHeight: integer): TRect;
begin
with Result do
begin
@@ -269,7 +269,7 @@ begin
end;
end;
-procedure Bounds(var Rect:TRect; ALeft, ATop, AWidth, AHeight: Integer);
+procedure Bounds(var Rect:TRect; ALeft, ATop, AWidth, AHeight: integer);
begin
with Rect do
begin
diff --git a/plugins/Utils.pas/wrapdlgs.pas b/plugins/Utils.pas/wrapdlgs.pas
index fed2490f85..21dcffd9e5 100644
--- a/plugins/Utils.pas/wrapdlgs.pas
+++ b/plugins/Utils.pas/wrapdlgs.pas
@@ -17,8 +17,8 @@ uses common, messages;
type
PSHItemID = ^TSHItemID;
TSHItemID = packed record
- cb: Word; { Size of the ID (including cb itself) }
- abID: array[0..0] of Byte; { The item ID (variable length) }
+ cb: word; { Size of the ID (including cb itself) }
+ abID: array[0..0] of byte; { The item ID (variable length) }
end;
PItemIDList = ^TItemIDList;
@@ -27,35 +27,35 @@ type
end;
TBrowseInfoA = record
- hwndOwner: HWND;
- pidlRoot: PItemIDList;
- pszDisplayName: PAnsiChar; { Return display name of item selected. }
- lpszTitle: PAnsiChar; { text to go in the banner over the tree. }
- ulFlags: UINT; { Flags that control the return stuff }
- lpfn: Pointer; //TFNBFFCallBack;
- lParam: LPARAM; { extra info that's passed back in callbacks }
- iImage: Integer; { output var: where to return the Image index. }
+ hwndOwner : HWND;
+ pidlRoot : PItemIDList;
+ pszDisplayName: PAnsiChar; { Return display name of item selected. }
+ lpszTitle : PAnsiChar; { text to go in the banner over the tree. }
+ ulFlags : uint; { Flags that control the return stuff }
+ lpfn : pointer; //TFNBFFCallBack;
+ lParam : LPARAM; { extra info that's passed back in callbacks }
+ iImage : integer; { output var: where to return the Image index. }
end;
TBrowseInfoW = record
- hwndOwner: HWND;
- pidlRoot: PItemIDList;
- pszDisplayName: PWideChar; { Return display name of item selected. }
- lpszTitle: PWideChar; { text to go in the banner over the tree. }
- ulFlags: UINT; { Flags that control the return stuff }
- lpfn: Pointer; //TFNBFFCallBack;
- lParam: LPARAM; { extra info that's passed back in callbacks }
- iImage: Integer; { output var: where to return the Image index. }
+ hwndOwner : HWND;
+ pidlRoot : PItemIDList;
+ pszDisplayName: PWideChar; { Return display name of item selected. }
+ lpszTitle : PWideChar; { text to go in the banner over the tree. }
+ ulFlags : uint; { Flags that control the return stuff }
+ lpfn : pointer; //TFNBFFCallBack;
+ lParam : LPARAM; { extra info that's passed back in callbacks }
+ iImage : integer; { output var: where to return the Image index. }
end;
function SHBrowseForFolderA(var lpbi: TBrowseInfoA): PItemIDList; stdcall;
external 'shell32.dll' name 'SHBrowseForFolderA';
function SHBrowseForFolderW(var lpbi: TBrowseInfoW): PItemIDList; stdcall;
external 'shell32.dll' name 'SHBrowseForFolderW';
-function SHGetPathFromIDListA(pidl: PItemIDList; pszPath: PAnsiChar): BOOL; stdcall;
+function SHGetPathFromIDListA(pidl: PItemIDList; pszPath: PAnsiChar): bool; stdcall;
external 'shell32.dll' name 'SHGetPathFromIDListA';
-function SHGetPathFromIDListW(pidl: PItemIDList; pszPath: PWideChar): BOOL; stdcall;
+function SHGetPathFromIDListW(pidl: PItemIDList; pszPath: PWideChar): bool; stdcall;
external 'shell32.dll' name 'SHGetPathFromIDListW';
-procedure CoTaskMemFree(pv: Pointer); stdcall; external 'ole32.dll'
+procedure CoTaskMemFree(pv: pointer); stdcall; external 'ole32.dll'
name 'CoTaskMemFree';
const
diff --git a/plugins/Utils.pas/wrapper.pas b/plugins/Utils.pas/wrapper.pas
index a663f5fa9c..5976df78fa 100644
--- a/plugins/Utils.pas/wrapper.pas
+++ b/plugins/Utils.pas/wrapper.pas
@@ -7,7 +7,7 @@ uses windows;
function CreateHiddenWindow(proc:pointer=nil):HWND;
-function DoInitCommonControls(dwICC:DWORD):boolean;
+function DoInitCommonControls(dwICC:dword):boolean;
function GetScreenRect:TRect;
procedure SnapToScreen(var rc:TRect;dx:integer=0;dy:integer=0{;
@@ -20,25 +20,25 @@ function StringToGUID(const astr:PAnsiChar):TGUID; overload;
function StringToGUID(const astr:PWideChar):TGUID; overload;
// Comboboxes
-function CB_SelectData(cb:HWND;data:lparam):lresult; overload;
-function CB_SelectData(Dialog:HWND;id:cardinal;data:lparam):lresult; overload;
-function CB_GetData (cb:HWND;idx:integer=-1):lresult; overload;
+function CB_SelectData(cb:HWND;data:lparam):LRESULT; overload;
+function CB_SelectData(Dialog:HWND;id:cardinal;data:lparam):LRESULT; overload;
+function CB_GetData (cb:HWND;idx:integer=-1):LRESULT; overload;
function CB_AddStrData (cb:HWND;astr:pAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload;
function CB_AddStrData (Dialog:HWND;id:cardinal;astr:pAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload;
function CB_AddStrDataW(cb:HWND;astr:pWideChar;data:lparam=0;idx:integer=-1):HWND; overload;
function CB_AddStrDataW(Dialog:HWND;id:cardinal;astr:pWideChar;data:lparam=0;idx:integer=-1):HWND; overload;
// CommCtrl - ListView
-Procedure ListView_GetItemTextA(hwndLV:hwnd;i:WPARAM;iSubItem:integer;pszText:Pointer;cchTextMax:integer);
-Procedure ListView_GetItemTextW(hwndLV:hwnd;i:WPARAM;iSubItem:integer;pszText:Pointer;cchTextMax:integer);
-function LV_GetLParam (list:HWND;item:integer=-1):lresult;
-function LV_SetLParam (list:HWND;lParam:LPARAM;item:integer=-1):lresult;
-function LV_ItemAtPos(wnd:HWND;pt:TPOINT;var SubItem:dword):Integer; overload;
-function LV_ItemAtPos(wnd:HWND;x,y:integer;var SubItem:dword):Integer; overload;
-procedure LV_SetItem (handle:hwnd;str:PAnsiChar;item:integer;subitem:integer=0);
-procedure LV_SetItemW(handle:hwnd;str:PWideChar;item:integer;subitem:integer=0);
-function LV_MoveItem(list:hwnd;direction:integer;item:integer=-1):integer;
-function LV_GetColumnCount(list:HWND):lresult;
+Procedure ListView_GetItemTextA(list:HWND;i:WPARAM;iSubItem:integer;pszText:pointer;cchTextMax:integer);
+Procedure ListView_GetItemTextW(list:HWND;i:WPARAM;iSubItem:integer;pszText:pointer;cchTextMax:integer);
+function LV_GetLParam (list:HWND;item:integer=-1):LRESULT;
+function LV_SetLParam (list:HWND;lParam:LPARAM;item:integer=-1):LRESULT;
+function LV_ItemAtPos(list:HWND;pt:TPOINT;var SubItem:dword):integer; overload;
+function LV_ItemAtPos(list:HWND;x,y:integer;var SubItem:dword):integer; overload;
+procedure LV_SetItem (list:HWND;str:PAnsiChar;item:integer;subitem:integer=0);
+procedure LV_SetItemW(list:HWND;str:PWideChar;item:integer;subitem:integer=0);
+function LV_MoveItem(list:HWND;direction:integer;item:integer=-1):integer;
+function LV_GetColumnCount(list:HWND):LRESULT;
function LV_CheckDirection(list:HWND):integer; // bit 0 - can move up, bit 1 - down
// CommDLG - Dialogs
@@ -74,7 +74,7 @@ const
hiddenwindow:HWND = 0;
hwndcount:integer=0;
-function HiddenWindProc(wnd:HWnd; msg:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function HiddenWindProc(wnd:HWND; msg:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
if msg=WM_CLOSE then
begin
@@ -120,7 +120,7 @@ begin
end;
//----- End of hidden window functions -----
-function DoInitCommonControls(dwICC:DWORD):boolean;
+function DoInitCommonControls(dwICC:dword):boolean;
var
ICC: TInitCommonControlsEx;
begin
@@ -183,7 +183,7 @@ end;
//----- Combobox functions -----
-function CB_SelectData(cb:HWND;data:lparam):lresult; overload;
+function CB_SelectData(cb:HWND;data:lparam):LRESULT; overload;
var
i:integer;
begin
@@ -199,12 +199,12 @@ begin
result:=SendMessage(cb,CB_SETCURSEL,result,0);
end;
-function CB_SelectData(Dialog:HWND;id:cardinal;data:lparam):lresult; overload;
+function CB_SelectData(Dialog:HWND;id:cardinal;data:lparam):LRESULT; overload;
begin
result:=CB_SelectData(GetDlgItem(Dialog,id),data);
end;
-function CB_GetData(cb:HWND;idx:integer=-1):lresult;
+function CB_GetData(cb:HWND;idx:integer=-1):LRESULT;
begin
if idx<0 then
idx:=SendMessage(cb,CB_GETCURSEL,0,0);
@@ -282,27 +282,27 @@ end;
//----- ListView functions -----
-Procedure ListView_GetItemTextA(hwndLV:hwnd;i:WPARAM;iSubItem:integer;pszText:Pointer;cchTextMax:integer);
+Procedure ListView_GetItemTextA(list:HWND;i:WPARAM;iSubItem:integer;pszText:pointer;cchTextMax:integer);
Var
lvi:LV_ITEMA;
Begin
lvi.iSubItem :=iSubItem;
lvi.cchTextMax:=cchTextMax;
lvi.pszText :=pszText;
- SendMessageA(hwndLV,LVM_GETITEMTEXT,i,LPARAM(@lvi));
+ SendMessageA(list,LVM_GETITEMTEXT,i,LPARAM(@lvi));
end;
-Procedure ListView_GetItemTextW(hwndLV:hwnd;i:WPARAM;iSubItem:integer;pszText:Pointer;cchTextMax:integer);
+Procedure ListView_GetItemTextW(list:HWND;i:WPARAM;iSubItem:integer;pszText:pointer;cchTextMax:integer);
Var
lvi:LV_ITEMW;
Begin
lvi.iSubItem :=iSubItem;
lvi.cchTextMax:=cchTextMax;
lvi.pszText :=pszText;
- SendMessageW(hwndLV,LVM_GETITEMTEXT,i,LPARAM(@lvi));
+ SendMessageW(list,LVM_GETITEMTEXT,i,LPARAM(@lvi));
end;
-procedure LV_SetItem(handle:hwnd;str:PAnsiChar;item:integer;subitem:integer=0);
+procedure LV_SetItem(list:HWND;str:PAnsiChar;item:integer;subitem:integer=0);
var
li:LV_ITEMA;
begin
@@ -311,10 +311,10 @@ begin
li.pszText :=str;
li.iItem :=item;
li.iSubItem:=subitem;
- SendMessageA(handle,LVM_SETITEMA,0,lparam(@li));
+ SendMessageA(list,LVM_SETITEMA,0,lparam(@li));
end;
-procedure LV_SetItemW(handle:hwnd;str:PWideChar;item:integer;subitem:integer=0);
+procedure LV_SetItemW(list:HWND;str:PWideChar;item:integer;subitem:integer=0);
var
li:LV_ITEMW;
begin
@@ -323,10 +323,10 @@ begin
li.pszText :=str;
li.iItem :=item;
li.iSubItem:=subitem;
- SendMessageW(handle,LVM_SETITEMW,0,lparam(@li));
+ SendMessageW(list,LVM_SETITEMW,0,lparam(@li));
end;
-function LV_GetLParam(list:HWND;item:integer=-1):lresult;
+function LV_GetLParam(list:HWND;item:integer=-1):LRESULT;
var
li:LV_ITEMW;
begin
@@ -346,7 +346,7 @@ begin
result:=li.lParam;
end;
-function LV_SetLParam(list:HWND;lParam:LPARAM;item:integer=-1):lresult;
+function LV_SetLParam(list:HWND;lParam:LPARAM;item:integer=-1):LRESULT;
var
li:LV_ITEMW;
begin
@@ -367,25 +367,25 @@ begin
result:=lParam;
end;
-function LV_ItemAtPos(wnd:HWND;Pt:TPOINT;var SubItem:dword):Integer;
+function LV_ItemAtPos(list:HWND;Pt:TPOINT;var SubItem:dword):integer;
var
HTI:LV_HITTESTINFO;
begin
HTI.pt.x := pt.X;
HTI.pt.y := pt.Y;
- SendMessage(wnd,LVM_SUBITEMHITTEST,0,lparam(@HTI));
+ SendMessage(list,LVM_SUBITEMHITTEST,0,lparam(@HTI));
Result :=HTI.iItem;
if @SubItem<>nil then
SubItem:=HTI.iSubItem;
end;
-function LV_ItemAtPos(wnd:HWND;x,y:integer;var SubItem:dword):Integer; overload;
+function LV_ItemAtPos(list:HWND;x,y:integer;var SubItem:dword):integer; overload;
var
HTI:LV_HITTESTINFO;
begin
HTI.pt.x := x;
HTI.pt.y := y;
- SendMessage(wnd,LVM_SUBITEMHITTEST,0,lparam(@HTI));
+ SendMessage(list,LVM_SUBITEMHITTEST,0,lparam(@HTI));
Result :=HTI.iItem;
if @SubItem<>nil then
SubItem:=HTI.iSubItem;
@@ -410,7 +410,7 @@ begin
end;
end;
-function LV_MoveItem(list:hwnd;direction:integer;item:integer=-1):integer;
+function LV_MoveItem(list:HWND;direction:integer;item:integer=-1):integer;
begin
if ((direction>0) and (item=(SendMessage(list,LVM_GETITEMCOUNT,0,0)-1))) or
((direction<0) and (item=0)) then
@@ -425,7 +425,7 @@ begin
result:=item+direction;
end;
-function LV_GetColumnCount(list:HWND):lresult;
+function LV_GetColumnCount(list:HWND):LRESULT;
begin
result:=SendMessage(SendMessage(list,LVM_GETHEADER,0,0),HDM_GETITEMCOUNT,0,0);
end;
diff --git a/plugins/Utils.pas/zwrapper.pas b/plugins/Utils.pas/zwrapper.pas
index 7ccffafb14..3d7cfa5f41 100644
--- a/plugins/Utils.pas/zwrapper.pas
+++ b/plugins/Utils.pas/zwrapper.pas
@@ -2,16 +2,16 @@ unit zwrapper;
interface
-function ZDecompressBuf(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer): Integer;
+function ZDecompressBuf(const inBuffer: pointer; inSize: integer; out outBuffer: pointer; out outSize: integer; outEstimate: integer): integer;
implementation
uses zlib;
-function ZDecompressBuf(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer): Integer;
+function ZDecompressBuf(const inBuffer: pointer; inSize: integer; out outBuffer: pointer; out outSize: integer; outEstimate: integer): integer;
var
zstream : TZStreamRec;
- delta : Integer;
+ delta : integer;
begin
FillChar(zstream, SizeOf(TZStreamRec), 0);
diff --git a/plugins/Watrack/HlpDlg.pas b/plugins/Watrack/HlpDlg.pas
index c420345bd4..a27a93c85c 100644
--- a/plugins/Watrack/HlpDlg.pas
+++ b/plugins/Watrack/HlpDlg.pas
@@ -32,7 +32,7 @@ const
const
COLORDLG = 'COLOR';
-function ColorHelpDlg(Dialog:HWnd;hMessage,wParam,lParam:DWord):integer; stdcall;
+function ColorHelpDlg(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
ps:tPaintStruct;
br:hBrush;
diff --git a/plugins/Watrack/formats/fmt_m4a.pas b/plugins/Watrack/formats/fmt_m4a.pas
index 1bfcf2309a..23c819c57b 100644
--- a/plugins/Watrack/formats/fmt_m4a.pas
+++ b/plugins/Watrack/formats/fmt_m4a.pas
@@ -81,13 +81,13 @@ type
NumEntires :dword;
DescSize :dword;
CodingName :array[0..3] of AnsiChar;
- Reserved :array[0..5] of Byte;
- RefIndex :Word;
+ Reserved :array[0..5] of byte;
+ RefIndex :word;
Reserved_ :array[0..1] of dword;
- ChannelCount:Word;
- SampleSize :Word;
- Pre_defined :Word;
- Reserved___ :Word;
+ ChannelCount:word;
+ SampleSize :word;
+ Pre_defined :word;
+ Reserved___ :word;
Samplerate :dword;
end;
pmvhd = ^mvhd;
diff --git a/plugins/Watrack/formats/tag_id3v2.inc b/plugins/Watrack/formats/tag_id3v2.inc
index b1f833ea2a..78660fdb6d 100644
--- a/plugins/Watrack/formats/tag_id3v2.inc
+++ b/plugins/Watrack/formats/tag_id3v2.inc
@@ -65,7 +65,7 @@ type
pID3v2FrameHdr = ^tID3v2FrameHdr;
tID3v2FrameHdrOld = packed record
ID : array [0..2] of byte; { Frame ID }
- Size: array [0..2] of Byte; { Size excluding header }
+ Size: array [0..2] of byte; { Size excluding header }
end;
pID3v2FrameHdrOld = ^tID3v2FrameHdrOld;
diff --git a/plugins/Watrack/i_opt_0.inc b/plugins/Watrack/i_opt_0.inc
index ab17d6ec0d..7f6723cad7 100644
--- a/plugins/Watrack/i_opt_0.inc
+++ b/plugins/Watrack/i_opt_0.inc
@@ -1,6 +1,6 @@
{special tab: parts settings}
-function DlgProcOptions0(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
+function DlgProcOptions0(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
hasApply:boolean=false;
var
diff --git a/plugins/Watrack/i_opt_1.inc b/plugins/Watrack/i_opt_1.inc
index a3ecef9cfc..fe9c4c45aa 100644
--- a/plugins/Watrack/i_opt_1.inc
+++ b/plugins/Watrack/i_opt_1.inc
@@ -27,7 +27,7 @@ const
(cpId:1361;cpName:'Korean (Johab)'));
var
- hCpCombo:hwnd;
+ hCpCombo:HWND;
function FillCpCombo(astr:PAnsiChar):boolean; stdcall;
var
@@ -52,7 +52,7 @@ begin
end;
end;
-function DlgProcOptions1(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions1(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
btnChkPlayer:bool=false;
btnChkFormat:integer=0;
diff --git a/plugins/Watrack/kolframe/frm_dlg1.inc b/plugins/Watrack/kolframe/frm_dlg1.inc
index 401e04536d..8759ac059c 100644
--- a/plugins/Watrack/kolframe/frm_dlg1.inc
+++ b/plugins/Watrack/kolframe/frm_dlg1.inc
@@ -19,7 +19,7 @@ begin
move(buf,result^,size);
end;
-procedure SwitchBk(Dialog:hwnd);
+procedure SwitchBk(Dialog:HWND);
var
en:boolean;
begin
@@ -38,7 +38,7 @@ begin
EnableWindow(GetDlgItem(Dialog,IDC_USECOVER ),en);
end;
-function FrameViewDlg(Dialog:HWnd; hMessage,wParam,lParam:DWord):integer; stdcall;
+function FrameViewDlg(Dialog:HWND; hMessage:uint; wParam:WPARAM; lParam:LPARAM):LRESULT; stdcall;
const
DlgInited:boolean=false;
var
@@ -201,6 +201,7 @@ begin
buf1^:=#0;
buf:=GetDlgText(Dialog,IDC_FRMBKPIC,true);
PathToRelative(buf,buf1);
+// CallService(MS_UTILS_PATHTORELATIVE,twparam(buf),tlparam(buf1));
if StrCmp(buf1,D.BkDefFile)<>0 then
begin
mFreeMem(D.BkDefFile);
diff --git a/plugins/Watrack/kolframe/frm_dlg2.inc b/plugins/Watrack/kolframe/frm_dlg2.inc
index 6325e05fcd..8f539c9dcb 100644
--- a/plugins/Watrack/kolframe/frm_dlg2.inc
+++ b/plugins/Watrack/kolframe/frm_dlg2.inc
@@ -2,7 +2,7 @@
const
MaxTxtScrollSpeed = 20;
-function FrameTextDlg(Dialog:HWnd; hMessage,wParam,lParam:DWord):integer; stdcall;
+function FrameTextDlg(Dialog:HWND; hMessage:uint; wParam:WPARAM; lParam:LPARAM):LRESULT; stdcall;
const
DlgInited :boolean=false;
TemplateChanged:Boolean=false;
diff --git a/plugins/Watrack/kolframe/frm_frame.inc b/plugins/Watrack/kolframe/frm_frame.inc
index 8911f868c4..b1e6d9e262 100644
--- a/plugins/Watrack/kolframe/frm_frame.inc
+++ b/plugins/Watrack/kolframe/frm_frame.inc
@@ -3,7 +3,7 @@
const
WS_EX_LAYERED = $00080000;
-function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; stdcall;
+function SetLayeredWindowAttributes(Hwnd: THANDLE; crKey: COLORREF; bAlpha: byte; dwFlags: dword): Boolean; stdcall;
external user32 name 'SetLayeredWindowAttributes';
const
diff --git a/plugins/Watrack/kolframe/frm_trackbar.inc b/plugins/Watrack/kolframe/frm_trackbar.inc
index eb9ad5c285..0f24c83c54 100644
--- a/plugins/Watrack/kolframe/frm_trackbar.inc
+++ b/plugins/Watrack/kolframe/frm_trackbar.inc
@@ -10,7 +10,7 @@ type
procedure CtrlResize(Sender: PObj);
procedure Erase(Sender: PControl; DC: HDC);
procedure Paint(Sender: PControl; DC: HDC);
- procedure Scroll(Sender:PTrackbar; Code:Integer);
+ procedure Scroll(Sender:PTrackbar; Code:integer);
procedure PressButton (Sender: PControl;var Mouse: TMouseEventData);
procedure UnPressButton(Sender: PControl;var Mouse: TMouseEventData);
procedure DragButton (Sender: PControl;var Mouse: TMouseEventData);
@@ -129,7 +129,7 @@ begin
end;
end;
-procedure tAWKTrackbar.Scroll(Sender:PTrackbar; Code:Integer);
+procedure tAWKTrackbar.Scroll(Sender:PTrackbar; Code:integer);
begin
if code=TB_ENDTRACK then
begin
diff --git a/plugins/Watrack/kolframe/i_bitmap.inc b/plugins/Watrack/kolframe/i_bitmap.inc
index bee15fdda7..a34d897fbd 100644
--- a/plugins/Watrack/kolframe/i_bitmap.inc
+++ b/plugins/Watrack/kolframe/i_bitmap.inc
@@ -121,7 +121,7 @@ end;
procedure PreMultiplyChanells(hbmp:HBITMAP);
type
- tPixel=array [0..3] of Byte;
+ tPixel=array [0..3] of byte;
var
bmp:windows.TBITMAP;
flag:bool;
diff --git a/plugins/Watrack/kolframe/kolframe.pas b/plugins/Watrack/kolframe/kolframe.pas
index 27fe7dde26..8120e34f0e 100644
--- a/plugins/Watrack/kolframe/kolframe.pas
+++ b/plugins/Watrack/kolframe/kolframe.pas
@@ -105,7 +105,7 @@ begin
case wParam of
WAT_EVENT_PLAYERSTATUS: begin
- case Integer(loword(lParam)) of
+ case integer(loword(lParam)) of
WAT_PLS_NORMAL : exit;
WAT_PLS_NOMUSIC : begin
if D.HideNoMusic then
@@ -231,7 +231,7 @@ end;
procedure DestroyFrame;
var
- id:Integer;
+ id:integer;
begin
if (FrameCtrl<>nil) and (PWATFrameData(FrameCtrl.CustomData).FrameId>=0) then
begin
diff --git a/plugins/Watrack/lastfm/i_last_api.inc b/plugins/Watrack/lastfm/i_last_api.inc
index 1f934646a3..ec42acfeeb 100644
--- a/plugins/Watrack/lastfm/i_last_api.inc
+++ b/plugins/Watrack/lastfm/i_last_api.inc
@@ -223,7 +223,7 @@ begin
end;
var
- xmlparser:XML_API_W;
+ xmlparser:TXML_API_W;
function FixInfo(info:pWideChar):pWideChar;
var
@@ -300,7 +300,7 @@ begin
begin
UTF8ToWide(res,pcw);
mFreeMem(res);
- xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(XML_API_W);
+ xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(TXML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
begin
@@ -424,7 +424,7 @@ begin
begin
UTF8ToWide(res,pcw);
mFreeMem(res);
- xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(XML_API_W);
+ xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(TXML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
begin
@@ -533,7 +533,7 @@ begin
begin
UTF8ToWide(res,pcw);
mFreeMem(res);
- xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(XML_API_W);
+ xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(TXML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
begin
diff --git a/plugins/Watrack/lastfm/i_last_dlg.inc b/plugins/Watrack/lastfm/i_last_dlg.inc
index b72545843e..ee1f96092f 100644
--- a/plugins/Watrack/lastfm/i_last_dlg.inc
+++ b/plugins/Watrack/lastfm/i_last_dlg.inc
@@ -37,7 +37,7 @@ begin
mFreeMem(data.image);
end;
-function DlgProcOptions(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
tmp:longbool;
bmp,wnd:HWND;
diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas
index d2a5cbc8a7..46098c558b 100644
--- a/plugins/Watrack/lastfm/lastfm.pas
+++ b/plugins/Watrack/lastfm/lastfm.pas
@@ -73,7 +73,7 @@ begin
if (lfm_login <>nil) and (lfm_login^ <>#0) and
(lfm_password<>nil) and (lfm_password^<>#0) then
- mir_forkthread(@ThScrobble,nil);
+ {CloseHandle}(mir_forkthread(@ThScrobble,nil));
end;
function NewPlStatus(wParam:WPARAM;lParam:LPARAM):int;cdecl;
@@ -118,7 +118,7 @@ begin
end;
WAT_EVENT_PLAYERSTATUS: begin
- case Integer(loword(lParam)) of
+ case integer(loword(lParam)) of
WAT_PLS_NOMUSIC,WAT_PLS_NOTFOUND: begin
if hTimer<>0 then
begin
diff --git a/plugins/Watrack/myrtf.pas b/plugins/Watrack/myrtf.pas
index a789b95d6a..0e1751017a 100644
--- a/plugins/Watrack/myrtf.pas
+++ b/plugins/Watrack/myrtf.pas
@@ -5,7 +5,7 @@ unit MyRTF;
interface
uses windows;
-procedure SendRTF(wnd:hwnd;txt:PWideChar;isUnicode:Boolean;CP:integer=CP_ACP);
+procedure SendRTF(wnd:HWND;txt:PWideChar;isUnicode:Boolean;CP:integer=CP_ACP);
implementation
uses richedit,common,messages{,m_api};
@@ -60,7 +60,7 @@ begin
result:=0;
end;
-procedure WriteRTF(wnd:hwnd;const pszText:PAnsiChar);
+procedure WriteRTF(wnd:HWND;const pszText:PAnsiChar);
var
stream:TEDITSTREAM;
begin
@@ -80,7 +80,7 @@ begin
result:=0;
end;
-procedure ReadRTF(wnd:hwnd;var dst:PAnsiChar);
+procedure ReadRTF(wnd:HWND;var dst:PAnsiChar);
var
stream:TEDITSTREAM;
begin
@@ -191,7 +191,7 @@ begin
end;
end;
-procedure SendRTF(wnd:hwnd;txt:PWideChar;isUnicode:Boolean;CP:integer=CP_ACP);
+procedure SendRTF(wnd:HWND;txt:PWideChar;isUnicode:Boolean;CP:integer=CP_ACP);
var
tmp:PAnsiChar;
sstart:integer;
diff --git a/plugins/Watrack/myshows/i_myshows_dlg.inc b/plugins/Watrack/myshows/i_myshows_dlg.inc
index 13740d5a34..1f51ed7d11 100644
--- a/plugins/Watrack/myshows/i_myshows_dlg.inc
+++ b/plugins/Watrack/myshows/i_myshows_dlg.inc
@@ -12,7 +12,7 @@ begin
SetDlgItemTextW(dlg,IDC_DATA_INFO ,'');
end;
-function DlgProcOptions(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
inited:bool=false;
var
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas
index a26c7dd4ae..f09cc3cf08 100644
--- a/plugins/Watrack/myshows/myshows.pas
+++ b/plugins/Watrack/myshows/myshows.pas
@@ -144,7 +144,7 @@ begin
end;
WAT_EVENT_PLAYERSTATUS: begin
- case Integer(loword(lParam)) of
+ case integer(loword(lParam)) of
WAT_PLS_NOMUSIC,WAT_PLS_NOTFOUND: begin
if hTimer<>0 then
begin
diff --git a/plugins/Watrack/player.ini b/plugins/Watrack/player.ini
index 2b0ede81a3..3006b4e83c 100644
--- a/plugins/Watrack/player.ini
+++ b/plugins/Watrack/player.ini
@@ -28,7 +28,7 @@ file='AREZMEDIA.EXE'
url='http://www.arezsoft.co.uk/'
[Ashampoo Media Player]
-test='Ashampoo Media Player+'
+text='Ashampoo Media Player+'
class='AMPMainWindow class'
class1='AMP MainOwnerWindow Class'
url='http://www2.ashampoo.com/webcache/html/1/product_2_0014___USD.htm'
@@ -130,7 +130,6 @@ Notes='Winamp API used to get more info'
class='MPlayer - The Movie Player'
url='http://www.mplayerhq.hu/'
-
[Media Commander Express]
class='TApplication'
file='MCX.EXE'
@@ -146,6 +145,7 @@ url='http://www.grafmstudio.narod.ru/mlmaster.htm'
class='wxWindowClassNR'
file='MOREAMP.EXE'
url='http://sourceforge.net/projects/moreamp/'
+
[MPC-BE]
class='MPC-BE'
url='http://sourceforge.net/projects/mpcbe/'
diff --git a/plugins/Watrack/players/pl_apollo.pas b/plugins/Watrack/players/pl_apollo.pas
index 360b23ab89..1658f48b1d 100644
--- a/plugins/Watrack/players/pl_apollo.pas
+++ b/plugins/Watrack/players/pl_apollo.pas
@@ -63,7 +63,7 @@ end;
function GetFileName(wnd:HWND;flags:integer):pWideChar;cdecl;
var
- tmpwnd:hwnd;
+ tmpwnd:HWND;
ps:array [0..255] of AnsiChar;
begin
if GetStatus(wnd)<>WAT_MES_STOPPED then
@@ -83,7 +83,7 @@ end;
function GetWndText(wnd:HWND):pWideChar;
var
- tmpwnd:hwnd;
+ tmpwnd:HWND;
ps:array [0..255] of AnsiChar;
begin
tmpwnd:=SendMessage(wnd,WM_APOLLO_COMMAND,APOLLO_GETCURRENTLYPLAYEDTITLE,0);
@@ -167,7 +167,7 @@ end;
function GetRemoteTitle(wnd:HWND):pWideChar;
var
- tmpwnd:hwnd;
+ tmpwnd:HWND;
ps:array [0..255] of AnsiChar;
num:integer;
begin
diff --git a/plugins/Watrack/players/pl_behold.pas b/plugins/Watrack/players/pl_behold.pas
index 977a021034..ddac43cfa1 100644
--- a/plugins/Watrack/players/pl_behold.pas
+++ b/plugins/Watrack/players/pl_behold.pas
@@ -55,7 +55,7 @@ end;
function GetVersion(wnd:HWND):integer;
begin
- result:=DWORD(SendMessage(wnd,WM_BHCMD,WMBH_GETVERSION,0));
+ result:=dword(SendMessage(wnd,WM_BHCMD,WMBH_GETVERSION,0));
result:=((result shr 16) shl 8)+LoWord(result);
end;
@@ -92,7 +92,7 @@ end;
function GetVolume(wnd:HWND):cardinal;
begin
- result:=WORD(SendMessage(wnd,WM_BHCMD,WMBH_GETVOLUME,0));
+ result:=word(SendMessage(wnd,WM_BHCMD,WMBH_GETVOLUME,0));
result:=(result shl 16)+(result shr 12);
end;
@@ -103,12 +103,12 @@ end;
function VolDn(wnd:HWND):integer;
begin
- result:=WORD(SendMessage(wnd,WM_BHCMD,WMBH_VOLUMEDOWN,0));
+ result:=word(SendMessage(wnd,WM_BHCMD,WMBH_VOLUMEDOWN,0));
end;
function VolUp(wnd:HWND):integer;
begin
- result:=WORD(SendMessage(wnd,WM_BHCMD,WMBH_VOLUMEUP,0));
+ result:=word(SendMessage(wnd,WM_BHCMD,WMBH_VOLUMEUP,0));
end;
function GetInfo(var SongInfo:tSongInfo;flags:integer):integer;cdecl;
diff --git a/plugins/Watrack/players/pl_bs.pas b/plugins/Watrack/players/pl_bs.pas
index 7fd2e9c5e5..efcd6c26d4 100644
--- a/plugins/Watrack/players/pl_bs.pas
+++ b/plugins/Watrack/players/pl_bs.pas
@@ -36,7 +36,7 @@ const
const
bspwnd:HWND = 0;
-function HiddenWindProc(wnd:HWnd; msg:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;
+function HiddenWindProc(wnd:HWND; msg:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=DefWindowProc(wnd,msg,wParam,lParam);
end;
diff --git a/plugins/Watrack/players/pl_cowon.pas b/plugins/Watrack/players/pl_cowon.pas
index 0977ea4b20..fb2d985038 100644
--- a/plugins/Watrack/players/pl_cowon.pas
+++ b/plugins/Watrack/players/pl_cowon.pas
@@ -69,7 +69,7 @@ const
hostwnd :HWND = 0;
tmpstr :pWideChar=nil;
-function HiddenWindProc(wnd:HWnd; msg:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;
+function HiddenWindProc(wnd:HWND; msg:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
cds:PCOPYDATASTRUCT;
begin
@@ -106,7 +106,7 @@ begin
end;
end;
-function chwnd(awnd:hwnd;param:pdword):boolean; stdcall;
+function chwnd(awnd:HWND;param:pdword):boolean; stdcall;
var
s:array [0..255] of AnsiChar;
begin
diff --git a/plugins/Watrack/players/pl_mpc.pas b/plugins/Watrack/players/pl_mpc.pas
index a2127cea76..bd0fade514 100644
--- a/plugins/Watrack/players/pl_mpc.pas
+++ b/plugins/Watrack/players/pl_mpc.pas
@@ -19,7 +19,7 @@ begin
result:=FindWindowEx(0,wnd,MPCClass98,NIL);
end;
-function chwnd(awnd:hwnd;Param:pdword):boolean; stdcall;
+function chwnd(awnd:HWND;Param:pdword):boolean; stdcall;
var
s:array [0..31] of AnsiChar;
i:integer;
diff --git a/plugins/Watrack/players/pl_mradio.pas b/plugins/Watrack/players/pl_mradio.pas
index 68589eb159..b694fb912c 100644
--- a/plugins/Watrack/players/pl_mradio.pas
+++ b/plugins/Watrack/players/pl_mradio.pas
@@ -75,7 +75,7 @@ begin
CurrentStation:=db_find_first(playername);
while CurrentStation<>0 do
begin
- i:=DBReadWord(CurrentStation,playername,'Status',WORD(-1));
+ i:=DBReadWord(CurrentStation,playername,'Status',word(-1));
if i=ID_STATUS_ONLINE then
begin
result:=1;
diff --git a/plugins/Watrack/players/pl_winamp.pas b/plugins/Watrack/players/pl_winamp.pas
index 254475e09a..e107cb81f6 100644
--- a/plugins/Watrack/players/pl_winamp.pas
+++ b/plugins/Watrack/players/pl_winamp.pas
@@ -96,7 +96,7 @@ var
pid:dword;
op:THANDLE;
buf:array [0..1023] of AnsiChar;
- tmp:{$IFDEF FPC}LongWord{$ELSE}ulong_ptr{$ENDIF};
+ tmp:{$IFDEF FPC}longword{$ELSE}ulong_ptr{$ENDIF};
begin
result:=nil;
if (flags and WAT_OPT_IMPLANTANT)<>0 then
diff --git a/plugins/Watrack/popup/pop_dlg.inc b/plugins/Watrack/popup/pop_dlg.inc
index 865cf94401..2d8c0ce79b 100644
--- a/plugins/Watrack/popup/pop_dlg.inc
+++ b/plugins/Watrack/popup/pop_dlg.inc
@@ -4,7 +4,7 @@
const
DLGPOPUP = 'POPUP';
-function DlgPopupOpt(Dialog:HWnd;hMessage:Uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
+function DlgPopupOpt(Dialog:HWND;hMessage:Uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
dlginit:boolean=false;
var
diff --git a/plugins/Watrack/popup/pop_vars.inc b/plugins/Watrack/popup/pop_vars.inc
index 4a845aaadc..2bbfce178b 100644
--- a/plugins/Watrack/popup/pop_vars.inc
+++ b/plugins/Watrack/popup/pop_vars.inc
@@ -21,7 +21,7 @@ var
hMenuInfo :THANDLE;
ssmi,sic,
plStatusHook:THANDLE;
- PopupPresent:Bool;
+ PopupPresent:bool;
onttbhook,
opthook:THANDLE;
ttbInfo:THANDLE; \ No newline at end of file
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas
index f22a9c44bd..eda32a07ce 100644
--- a/plugins/Watrack/popup/popups.pas
+++ b/plugins/Watrack/popup/popups.pas
@@ -71,7 +71,7 @@ begin
mFreeMem(buf);
end;
-function DumbPopupDlgProc(Wnd:hwnd;msg:uint;wParam:integer;lParam:longint):integer;stdcall;
+function DumbPopupDlgProc(Wnd:HWND;msg:dword;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
si:pSongInfo;
h:HBITMAP;
@@ -312,7 +312,7 @@ end;
procedure regpophotkey;
var
- hkrec:HOTKEYDESC;
+ hkrec:THOTKEYDESC;
begin
if DisablePlugin=dsPermanent then
exit;
diff --git a/plugins/Watrack/proto/i_proto_dlg.inc b/plugins/Watrack/proto/i_proto_dlg.inc
index ebfd6d31c9..5d3b6e2bb4 100644
--- a/plugins/Watrack/proto/i_proto_dlg.inc
+++ b/plugins/Watrack/proto/i_proto_dlg.inc
@@ -2,7 +2,8 @@
procedure SetAllContactStat(hwndList:HWND);
var
- hContact,hItem:THANDLE;
+ hContact:TMCONTACT;
+ hItem:THANDLE;
begin
hContact:=db_find_first();
while hContact<>0 do
@@ -19,7 +20,8 @@ end;
procedure SaveAllContactStat(hwndList:HWND);
var
- hContact,hItem:THANDLE;
+ hContact:TMCONTACT;
+ hItem:THANDLE;
begin
hContact:=db_find_first();
while hContact<>0 do
@@ -75,7 +77,7 @@ begin
if IsDlgButtonChecked(Dlg,IDC_ISEND )<>BST_UNCHECKED then HistMask:=HistMask or hmISend;
end;
-function DlgProcOptions(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
Changed:integer=0;
// hItemAll:THANDLE=0;
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index b26c6dba04..d2b2d8b4d4 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -57,7 +57,7 @@ var
{$include i_proto_opt.inc}
{$include i_proto_dlg.inc}
-procedure AddEvent(hContact:MCONTACT;atype,flag:integer;data:pointer;size:integer;time:dword=0);
+procedure AddEvent(hContact:TMCONTACT;atype,flag:integer;data:pointer;size:integer;time:dword=0);
var
dbeo:TDBEVENTINFO;
begin
@@ -404,7 +404,7 @@ end;
procedure RegisterContacts;
var
- hContact:MCONTACT;
+ hContact:TMCONTACT;
begin
hContact:=db_find_first();
while hContact<>0 do
@@ -445,6 +445,8 @@ begin
desc._type :=PROTOTYPE_TRANSLATION;
CallService(MS_PROTO_REGISTERMODULE,0,lparam(@desc));
+// CreateProtoServiceFunction(PluginShort,PSS_MESSAGE ,@SendMessageProcW);
+// CreateProtoServiceFunction(PluginShort,PSS_MESSAGEW,@SendMessageProcW);
hSRM:=CreateProtoServiceFunction(PluginShort,PSR_MESSAGE ,@ReceiveMessageProcW);
// CreateProtoServiceFunction(PluginShort,PSR_MESSAGEW,@ReceiveMessageProcW);
end;
@@ -500,7 +502,6 @@ begin
result:=1;
ReadOptions;
-
RegisterIcons;
FillChar(mi, sizeof(mi), 0);
@@ -524,6 +525,7 @@ procedure DeInitProc(aSetDisable:boolean);
begin
if aSetDisable then
SetModStatus(0);
+
UnhookEvent(hAddUserHook);
UnhookEvent(contexthook);
UnhookEvent(icchangedhook);
diff --git a/plugins/Watrack/srv_format.pas b/plugins/Watrack/srv_format.pas
index aa892bb7da..58c046c712 100644
--- a/plugins/Watrack/srv_format.pas
+++ b/plugins/Watrack/srv_format.pas
@@ -5,8 +5,8 @@ interface
uses windows,wat_api;
-procedure DefFillFormatList (hwndList:hwnd);
-procedure DefCheckFormatList(hwndList:hwnd);
+procedure DefFillFormatList (hwndList:HWND);
+procedure DefCheckFormatList(hwndList:HWND);
function ProcessFormatLink:integer;
function GetFileFormatInfo(var dst:tSongInfo):integer;
@@ -111,7 +111,7 @@ begin
result:=WAT_RES_NOTFOUND;
end;
-procedure DefFillFormatList(hwndList:hwnd);
+procedure DefFillFormatList(hwndList:HWND);
var
item:LV_ITEMA;
lvc:LV_COLUMN;
@@ -145,7 +145,7 @@ begin
ListView_SetColumnWidth(hwndList,0,LVSCW_AUTOSIZE);
end;
-procedure DefCheckFormatList(hwndList:hwnd);
+procedure DefCheckFormatList(hwndList:HWND);
var
i,j,k:integer;
item:LV_ITEMA;
diff --git a/plugins/Watrack/srv_player.pas b/plugins/Watrack/srv_player.pas
index dff61191b5..be55c6f2a2 100644
--- a/plugins/Watrack/srv_player.pas
+++ b/plugins/Watrack/srv_player.pas
@@ -18,8 +18,8 @@ function SendCommand (wParam:WPARAM;lParam:LPARAM;flags:integer):int_ptr;
procedure ClearPlayers;
// options procedures
-procedure DefFillPlayerList (hwndList:hwnd);
-procedure DefCheckPlayerList(hwndList:hwnd);
+procedure DefFillPlayerList (hwndList:HWND);
+procedure DefCheckPlayerList(hwndList:HWND);
type
MusEnumProc = function(param:PAnsiChar;lParam:LPARAM):bool;stdcall;
@@ -255,7 +255,7 @@ begin
result:=nil;
end;
-procedure DefFillPlayerList(hwndList:hwnd);
+procedure DefFillPlayerList(hwndList:HWND);
var
item:LV_ITEMA;
lvc:TLVCOLUMN;
@@ -293,7 +293,7 @@ begin
// ListView_SetColumnWidth(hwndList,0,LVSCW_AUTOSIZE);
end;
-procedure DefCheckPlayerList(hwndList:hwnd);
+procedure DefCheckPlayerList(hwndList:HWND);
var
i,j,k:integer;
item:LV_ITEMA;
diff --git a/plugins/Watrack/stat/stat_dlg.inc b/plugins/Watrack/stat/stat_dlg.inc
index 6a3747c476..be0887f06d 100644
--- a/plugins/Watrack/stat/stat_dlg.inc
+++ b/plugins/Watrack/stat/stat_dlg.inc
@@ -2,7 +2,7 @@
{$include stat_rc.inc}
-procedure SetReportMask(Dlg:hwnd);
+procedure SetReportMask(Dlg:HWND);
begin
ReportMask:=0;
if IsDlgButtonChecked(Dlg,IDC_FREQART)=BST_CHECKED then
@@ -19,7 +19,7 @@ begin
ReportMask:=ReportMask or stAlbum;
end;
-procedure EnableItems(Dlg:hwnd;enable:boolean);
+procedure EnableItems(Dlg:HWND;enable:boolean);
begin
EnableWindow(GetDlgItem(Dlg,IDC_STATNAME) ,enable);
EnableWindow(GetDlgItem(Dlg,IDC_SNBUTTON) ,enable);
@@ -46,7 +46,7 @@ begin
EnableWindow(GetDlgItem(Dlg,IDC_AUTOSORT) ,enable);
end;
-function DlgProcOptions(Dialog:HWnd; hMessage:dword;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
+function DlgProcOptions(Dialog:HWND; hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
changed:boolean=false;
var
@@ -186,6 +186,7 @@ begin
begin
buf1[0]:=#0;
PathToRelative(buf,buf1);
+// CallService(MS_UTILS_PATHTORELATIVE,TWPARAM(@buf),TLPARAM(@buf1));
StrDup(StatName,buf1);
end;
@@ -195,6 +196,7 @@ begin
begin
buf1[0]:=#0;
PathToRelative(buf,buf1);
+// CallService(MS_UTILS_PATHTORELATIVE,TWPARAM(@buf),TLPARAM(@buf1));
StrDup(ReportName,buf1);
end;
@@ -204,6 +206,7 @@ begin
begin
buf1[0]:=#0;
PathToRelative(buf,buf1);
+// CallService(MS_UTILS_PATHTORELATIVE,TWPARAM(@buf),TLPARAM(@buf1));
StrDup(TmplName,buf1);
end;
diff --git a/plugins/Watrack/status/i_opt_11.inc b/plugins/Watrack/status/i_opt_11.inc
index 1e6e3ab8e9..9cf8cd778d 100644
--- a/plugins/Watrack/status/i_opt_11.inc
+++ b/plugins/Watrack/status/i_opt_11.inc
@@ -31,7 +31,7 @@ var
CurProto,
CurStatus:integer;
-procedure RedrawFields(Dialog:hwnd;proto:integer=-1);
+procedure RedrawFields(Dialog:HWND;proto:integer=-1);
var
wnd1,wnd:HWND;
p:pWideChar;
@@ -110,7 +110,7 @@ begin
Changed:=Changed and not DLGED_INIT;
end;
-procedure SetScreenFull(Dialog:hwnd);
+procedure SetScreenFull(Dialog:HWND);
var
show:integer;
buf:array [0..127] of AnsiChar;
@@ -159,13 +159,13 @@ begin
RedrawFields(Dialog);
end;
-procedure SetTemplate(Dialog:hwnd;idc:integer;Tmpl:tTemplateType);
+procedure SetTemplate(Dialog:HWND;idc:integer;Tmpl:tTemplateType);
begin
SetTemplateStr (GetDlgText(Dialog,ABS(idc)),Tmpl,CurProto,CurStatus);
SetTemplateActive(idc>0 ,Tmpl,CurProto,CurStatus);
end;
-procedure SaveChanges(Dialog:hwnd);
+procedure SaveChanges(Dialog:HWND);
var
i,j:integer;
begin
@@ -213,7 +213,7 @@ begin
end;
end;
-function SaveCBExValue(Dialog:HWnd;direct:boolean):cardinal;
+function SaveCBExValue(Dialog:HWND;direct:boolean):cardinal;
var
wnd:HWND;
i,j,shift:cardinal;
@@ -234,7 +234,7 @@ begin
result:=(i shr (8-shift)) and $FF;
end;
-procedure FillCBType(Dialog:hwnd;proto:pAnsiChar=nil);
+procedure FillCBType(Dialog:HWND;proto:pAnsiChar=nil);
var
wnd:HWND;
j:integer;
@@ -252,7 +252,7 @@ begin
ShowWindow(GetDlgItem(Dialog,aListFields[j]),aShowFields[0][j]);
end;
-function DlgProcOptions11(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions11(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
Item:LV_ITEMA;
buf:array [0..127] of AnsiChar;
diff --git a/plugins/Watrack/status/i_opt_12.inc b/plugins/Watrack/status/i_opt_12.inc
index 7414ecf9d7..507e644546 100644
--- a/plugins/Watrack/status/i_opt_12.inc
+++ b/plugins/Watrack/status/i_opt_12.inc
@@ -1,6 +1,6 @@
{Templates}
-procedure SetScreenLite(Dialog:HWnd);
+procedure SetScreenLite(Dialog:HWND);
var
p:pWideChar;
begin
@@ -18,12 +18,12 @@ begin
Changed:=Changed and not DLGED_INIT;
end;
-procedure SetTemplateLite(Dialog:HWnd;idc:integer;Tmpl:tTemplateType);
+procedure SetTemplateLite(Dialog:HWND;idc:integer;Tmpl:tTemplateType);
begin
SetTemplateStr(GetDlgText(Dialog,idc),Tmpl,0,0);
end;
-procedure SaveChangesLite(Dialog:HWnd);
+procedure SaveChangesLite(Dialog:HWND);
begin
if (Changed and DLGED_BASE)<>0 then
begin
@@ -45,7 +45,7 @@ begin
end;
end;
-function DlgProcOptions12(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lparam; stdcall;
+function DlgProcOptions12(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=0;
case hMessage of
diff --git a/plugins/Watrack/status/i_opt_3.inc b/plugins/Watrack/status/i_opt_3.inc
index 423b7c22c1..432eebcf64 100644
--- a/plugins/Watrack/status/i_opt_3.inc
+++ b/plugins/Watrack/status/i_opt_3.inc
@@ -1,6 +1,6 @@
{format specific}
-function DlgProcOptions3(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptions3(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
dlginit:boolean=false;
var
diff --git a/plugins/Watrack/status/status.pas b/plugins/Watrack/status/status.pas
index 0bdc7cdcb5..6348ecbb72 100644
--- a/plugins/Watrack/status/status.pas
+++ b/plugins/Watrack/status/status.pas
@@ -15,7 +15,7 @@ const
procedure reghotkey;
var
- hkrec:HOTKEYDESC;
+ hkrec:THOTKEYDESC;
begin
// if DisablePlugin=dsPermanent then
// exit;
@@ -68,6 +68,10 @@ begin
reghotkey;
plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
+// mStatus.ModuleStat:=1;
+
+// if ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)<>0 then
+// hLTo:=CreateServiceFunction(MS_LISTENINGTO_GETPARSEDTEXT,@ListenProc);
end;
procedure DeInitProc(aSetDisable:boolean);
@@ -130,6 +134,7 @@ begin
mStatus.AddOption :=@AddOptionsPage;
mStatus.Check :=nil;
mStatus.ModuleName:='Statuses';
+// mStatus.ModuleStat:=0;
ModuleLink :=@mStatus;
end;
diff --git a/plugins/Watrack/templates/i_expkey.inc b/plugins/Watrack/templates/i_expkey.inc
index 960fd1a43e..fd990cda31 100644
--- a/plugins/Watrack/templates/i_expkey.inc
+++ b/plugins/Watrack/templates/i_expkey.inc
@@ -17,7 +17,7 @@ end;
procedure reginshotkey;
var
- hkrec:HOTKEYDESC;
+ hkrec:THOTKEYDESC;
begin
FillChar(hkrec,SizeOf(hkrec),0);
with hkrec do
diff --git a/plugins/Watrack/templates/i_macro.inc b/plugins/Watrack/templates/i_macro.inc
index 68c0be6e33..23d04799a6 100644
--- a/plugins/Watrack/templates/i_macro.inc
+++ b/plugins/Watrack/templates/i_macro.inc
@@ -33,14 +33,14 @@ begin
mFreeMem(vars[i].alias);
end;
-function MacroHelpDlg(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;
+function MacroHelpDlg(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
Changed:bool=false;
var
i:integer;
itemw:LV_ITEMW;
lvc:LV_COLUMN;
- wnd:hwnd;
+ wnd:HWND;
ws:PWideChar;
s:pAnsiChar;
rc:TRECT;
diff --git a/plugins/Watrack/templates/i_tmpl_dlg.inc b/plugins/Watrack/templates/i_tmpl_dlg.inc
index 185f91d608..c5534131ea 100644
--- a/plugins/Watrack/templates/i_tmpl_dlg.inc
+++ b/plugins/Watrack/templates/i_tmpl_dlg.inc
@@ -1,5 +1,5 @@
{}
-function DlgProcOptions(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;
+function DlgProcOptions(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
result:=0;
case hMessage of
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr
index ca63bb7fa8..27d9547c1e 100644
--- a/plugins/Watrack/watrack.dpr
+++ b/plugins/Watrack/watrack.dpr
@@ -37,7 +37,7 @@ uses
const
MenuDisablePos = 500050000;
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
+function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
begin
result:=@PluginInfo;
PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
@@ -585,7 +585,7 @@ begin
IsMultiThread:=true;
// Register WATrack events
- dbetd.cbSize :=DBEVENTTYPEDESCR_SIZE;
+ dbetd.cbSize :=SizeOf(TDBEVENTTYPEDESCR);
dbetd.module :=PluginShort;
dbetd.textService:=nil;
dbetd.iconService:=nil;
diff --git a/plugins/mRadio/i_hotkey.inc b/plugins/mRadio/i_hotkey.inc
index 9fb613fe5f..7ec4cf766b 100644
--- a/plugins/mRadio/i_hotkey.inc
+++ b/plugins/mRadio/i_hotkey.inc
@@ -24,7 +24,7 @@ end;
procedure RegisterHotKey;
var
- hkrec:HOTKEYDESC;
+ hkrec:THOTKEYDESC;
begin
hRadioHotkey:=CreateServiceFunction(MS_RADIO_HOTKEY,@mRadio_Hotkey);
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc
index 34f541689c..dc144b616d 100644
--- a/plugins/mRadio/i_myservice.inc
+++ b/plugins/mRadio/i_myservice.inc
@@ -4,7 +4,7 @@ function Service_RadioPlayStop(wParam:WPARAM;lParam:LPARAM):int;cdecl;
var
p:PAnsiChar;
lnew:bool;
- hContact:MCONTACT;
+ hContact:TMCONTACT;
cni:TCONTACTINFO;
i:integer;
begin
@@ -145,7 +145,7 @@ end;
//----- Import-export -----
-function ImportOneStation(group:PAnsiChar;section:pointer):MCONTACT;
+function ImportOneStation(group:PAnsiChar;section:pointer):TMCONTACT;
var
p:pWideChar;
pc:pAnsiChar;
@@ -218,7 +218,7 @@ begin
end;
end;
-procedure ExportRadioContact(num:integer;fname:PAnsiChar;hContact:MCONTACT);
+procedure ExportRadioContact(num:integer;fname:PAnsiChar;hContact:TMCONTACT);
var
pc:pAnsiChar;
section:array [0..15] of AnsiChar;
@@ -257,7 +257,7 @@ end;
function ExportAll(wParam:WPARAM;lParam:LPARAM):int; cdecl;
var
dst:array [0..MAX_PATH-1] of AnsiChar;
- hContact:MCONTACT;
+ hContact:TMCONTACT;
begin
result:=0;
if lParam<>0 then
diff --git a/plugins/mRadio/i_optdlg.inc b/plugins/mRadio/i_optdlg.inc
index f807d65a22..c09e302e13 100644
--- a/plugins/mRadio/i_optdlg.inc
+++ b/plugins/mRadio/i_optdlg.inc
@@ -96,7 +96,7 @@ begin
SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
end;
-function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOpt(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
DlgInit:integer=1;
var
@@ -379,7 +379,7 @@ begin
SendMessage(wnd,CB_SETCURSEL,def,0);
end;
-function DlgProcOptTech(Dialog:HWnd;hMessage:uint;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOptTech(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
const
DlgInit:integer=1;
var
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc
index f4d21a0955..81e1a00eca 100644
--- a/plugins/mRadio/i_search.inc
+++ b/plugins/mRadio/i_search.inc
@@ -1,5 +1,90 @@
{search station code}
+(*
+procedure SetAvatar(hContact:THANDLE);
+var
+ success:boolean;
+ fname:pAnsiChar;
+ url:pWideChar;
+ buf,buf1,buf2:array [0..MAX_PATH-1] of AnsiChar;
+ ext:array [0..15] of AnsiChar;
+ section:pAnsiChar;
+ pc:pAnsiChar;
+ i:integer;
+begin
+ // get url
+ url:=DBReadUnicode(hContact,PluginName,optStationURL);
+ // translate to Ansi
+ FastWideToAnsiBuf(url,buf);
+ mFreeMem(url);
+
+ // search in INI
+ i:=GetFSize(storage);
+ if i=0 then
+ i:=32767;
+ mGetMem(pc,i+1);
+ pc^:=#0;
+ GetPrivateProfileSectionNamesA(pc,i,storage);
+ section:=pc;
+
+ while section^<>#0 do
+ begin
+ GetPrivateProfileStringA(section,'URL','',buf1,SizeOf(buf1),storage);
+ if StrCmp(@buf,@buf1)=0 then
+ break;
+
+ while section^<>#0 do inc(section);
+ inc(section);
+ end;
+ mFreeMem(pc);
+
+ if section^<>#0 then
+ begin
+ // get avatar link
+ buf[0]:=#0;
+ GetPrivateProfileStringA(section,'Avatar','',buf,SizeOf(buf),storage);
+
+ if buf[0]<>#0 then
+ begin
+ // Here we trying to get Avatar chache directory
+ // (create it if needs)
+ // and copy (load) owr avatars there
+ // in : buf = source avatar path
+ // out: fname = destination (file name in cache)
+ // rule for name is?..
+
+
+ if StrPos(buf,'://')=nil then
+ begin
+ fname:=@buf;
+ success:=FileExists(fname);
+ // need to copy this file to avatar cache
+ end
+ else
+ begin
+ // download file
+{
+ GetTempPathA(MAX_PATH,pAnsiChar(@buf1));
+ pc:=extract(pAnsiChar(@buf),true);
+ StrCat(pAnsiChar(@buf1),pc);
+ mFreeMem(pc);
+}
+ //mrAvt
+
+ GetExt(pAnsiChar(@buf),pAnsiChar(@ext));
+ GetTempPathA(MAX_PATH,pAnsiChar(@buf2));
+ GetTempFileNameA(pAnsiChar(@buf2),'mrAvt',GetCurrentTime,pAnsiChar(@buf1));
+ ChangeExt(pAnsiChar(@buf1),PAnsiChar(@ext));
+ //
+ fname:=@buf1;
+ success:=GetFile(pAnsiChar(@buf),fname);
+ end;
+ if success then
+ CallService(MS_AV_SETAVATAR,hContact,LPARAM(fname));
+ end;
+ end;
+end;
+*)
type
TMySearchFilter = record
lStation,
@@ -19,7 +104,7 @@ var
bitrate:integer;
l:bool;
columns:array [0..3] of TCHAR;
- csr:CUSTOMSEARCHRESULTS;
+ csr:TCUSTOMSEARCHRESULTS;
pc:pAnsiChar;
buf:array [0..127] of AnsiChar;
begin
@@ -84,7 +169,7 @@ end;
procedure ProcessSearch(var filter:TMySearchFilter;ini:PAnsiChar);
var
pc:PAnsiChar;
- csr:CUSTOMSEARCHRESULTS;
+ csr:TCUSTOMSEARCHRESULTS;
columns:array [0..3] of TCHAR;
lstorage,section,list:pointer;
begin
@@ -154,6 +239,7 @@ begin
with filter do
begin
+// CallService(MS_UTILS_PATHTOABSOLUTE,TWPARAM(@ini1),TLPARAM(@ini));
lBitrate:=GetDlgItemInt(wnd,IDC_BITRATE,ltmp,false);
if IsDlgButtonChecked(wnd,IDC_LT)=BST_CHECKED then lBitrateMode:=-1
else if IsDlgButtonChecked(wnd,IDC_EQ)=BST_CHECKED then lBitrateMode:=0
@@ -182,7 +268,7 @@ begin
else
begin
result:=AckHandle;
- mir_forkthread(@BasicSearch,StrDup(PAnsiChar(lParam),PAnsiChar(lParam)));
+ {CloseHandle}(mir_forkthread(@BasicSearch,StrDup(PAnsiChar(lParam),PAnsiChar(lParam))));
end;
end;
@@ -193,13 +279,13 @@ begin
else
begin
result:=AckHandle;
- mir_forkthread(@ExtSearch,pointer(lParam));
+ {CloseHandle}(mir_forkthread(@ExtSearch,pointer(lParam)));
end;
end;
function Service_GetCaps(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl; forward;
-function ExtSearchProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function ExtSearchProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
buf:array [0..MAX_PATH-1] of AnsiChar;
begin
@@ -276,7 +362,7 @@ end;
function Service_AddToList(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl;
var
- hContact:MCONTACT;
+ hContact:TMCONTACT;
p:PWideChar;
lurl:pWideChar;
begin
@@ -292,6 +378,25 @@ begin
if lurl<>nil then
begin
+{
+// find contact
+ hContact:=db_find_first(PluginName);
+ while hContact<>0 do
+ begin
+ p:=DBReadString(hContact,PluginName,optStationURL);
+ l:=StrCmp(p,lurl)=0;
+ mFreeMem(p);
+ if l then
+ begin
+ DBDeleteSetting(hContact,strCList,'NotOnList');
+ DBDeleteSetting(hContact,strCList,'Hidden');
+ result:=hContact;
+ exit;
+ end;
+ hContact:=db_find_next(hContact,PluginName);
+ end;
+// if not found
+}
hContact:=CallService(MS_DB_CONTACT_ADD,0,0);
if hContact<>0 then
begin
diff --git a/plugins/mRadio/i_service.inc b/plugins/mRadio/i_service.inc
index 6473b5e9b2..21271fcd3a 100644
--- a/plugins/mRadio/i_service.inc
+++ b/plugins/mRadio/i_service.inc
@@ -27,7 +27,7 @@ begin
result:=0;
end;
-procedure GetAwayMsgProc(hContact:MCONTACT); cdecl;
+procedure GetAwayMsgProc(hContact:TMCONTACT); cdecl;
var
buf,p:PWideChar;
begin
@@ -99,7 +99,7 @@ begin
if (ccs^.hContact<>0) and (PluginStatus=ID_STATUS_ONLINE) and
(DBReadWord(ccs^.hContact,PluginName,optStatus,ID_STATUS_OFFLINE)=ID_STATUS_ONLINE) then
begin
- {CloseHandle}(mir_forkthread(@GetAwayMsgProc,pointer(ccs^.hContact)));
+ {CloseHandle}(mir_forkthread(@GetAwayMsgProc,pointer(uint_ptr(ccs^.hContact))));
result:=AckHandle;
end
else
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr
index 9600988e0d..de7d7219da 100644
--- a/plugins/mRadio/mradio.dpr
+++ b/plugins/mRadio/mradio.dpr
@@ -27,7 +27,7 @@ uses
{$include i_visual.inc}
{$include i_optdlg.inc}
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
+function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
begin
result:=@PluginInfo;
PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
diff --git a/plugins/mRadio/rbass.pas b/plugins/mRadio/rbass.pas
index 42bc4ffe62..77957f4a46 100644
--- a/plugins/mRadio/rbass.pas
+++ b/plugins/mRadio/rbass.pas
@@ -520,7 +520,7 @@ end;
-procedure StatusProc(buffer:Pointer;len,user:DWORD); stdcall;
+procedure StatusProc(buffer:pointer;len,user:dword); stdcall;
var
pc:pWideChar;
pb:PByte;
@@ -891,7 +891,7 @@ begin
end;
procedure MetaSync(handle:HSYNC;channel,data:dword;user:pointer); stdcall;
-//var tagtype:Integer;
+//var tagtype:integer;
begin
(*
if handle=syncOGG then tagtype:=BASS_TAG_OGG
@@ -964,7 +964,7 @@ end;
procedure OpenURL(url:PWideChar); cdecl;
var
- len,progress:DWORD;
+ len,progress:dword;
flags:dword;
i:integer;
EAXUsed:bool;
diff --git a/plugins/mRadio/rframeapi.pas b/plugins/mRadio/rframeapi.pas
index 471f8ccf71..dd44aaa353 100644
--- a/plugins/mRadio/rframeapi.pas
+++ b/plugins/mRadio/rframeapi.pas
@@ -42,7 +42,7 @@ begin
end;
end;
-function SliderWndProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function SliderWndProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
begin
if hMessage=WM_ERASEBKGND then
result:=1
@@ -70,7 +70,7 @@ begin
SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,tlparam(@ti));
end;
-function RadioFrameProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function RadioFrameProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
urd:TUTILRESIZEDIALOG;
rc:TRECT;
@@ -239,7 +239,7 @@ begin
StrCopy(cid.name ,frm_back);
StrCopy(cid.setting,'frame_back');
- cid.defcolour:=COLOR_3DFACE;
+ cid.defcolour:=GetSysColor(COLOR_3DFACE);
cid.order :=0;
ColourRegister(@cid);
diff --git a/plugins/mRadio/rglobal.pas b/plugins/mRadio/rglobal.pas
index 51caddc63c..313c62015c 100644
--- a/plugins/mRadio/rglobal.pas
+++ b/plugins/mRadio/rglobal.pas
@@ -21,7 +21,7 @@ const
const
chan :HSTREAM = 0;
- ActiveContact:MCONTACT = 0;
+ ActiveContact:TMCONTACT = 0;
ActiveURL :PWideChar = nil;
const
@@ -159,7 +159,7 @@ const
function MakeMessage:pWideChar;
-procedure SetStatus(hContact:MCONTACT;status:integer);
+procedure SetStatus(hContact:TMCONTACT;status:integer);
function GetDefaultRecPath:pWideChar;
function GetStatusText(status:integer;toCList:boolean=false):PWideChar;
@@ -169,7 +169,7 @@ implementation
uses
common, dbsettings;
-procedure SetStatus(hContact:MCONTACT;status:integer);
+procedure SetStatus(hContact:TMCONTACT;status:integer);
begin
// if Status=ID_STATUS_OFFLINE then
// MyStopBass;