diff options
Diffstat (limited to 'plugins')
137 files changed, 1198 insertions, 890 deletions
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;
|