From 82e1036aa53826c8858919dd98d71c098a26cac4 Mon Sep 17 00:00:00 2001 From: "John P (Dgby714)" Date: Thu, 23 Dec 2010 11:24:18 -0500 Subject: [PATCH] Simba: TProc(Arr) rename to TSysProc(Arr) --- Units/MMLAddon/PSInc/Wrappers/other.inc | 4 ++-- Units/MMLAddon/PSInc/pscompile.inc | 4 ++-- Units/MMLAddon/PSInc/psexportedmethods.inc | 4 ++-- Units/MMLCore/iomanager.pas | 4 ++-- Units/MMLCore/mufasatypes.pas | 4 ++-- Units/MMLCore/os_linux.pas | 8 ++++---- Units/MMLCore/os_windows.pas | 13 +++++++------ 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Units/MMLAddon/PSInc/Wrappers/other.inc b/Units/MMLAddon/PSInc/Wrappers/other.inc index 2286c93..e0b4f54 100644 --- a/Units/MMLAddon/PSInc/Wrappers/other.inc +++ b/Units/MMLAddon/PSInc/Wrappers/other.inc @@ -285,12 +285,12 @@ begin end; end; -function ps_GetProcesses: TProcArr; +function ps_GetProcesses: TSysProcArr; begin Result := CurrThread.Client.IOManager.GetProcesses; end; -procedure ps_SetTarget(Proc: TProc); +procedure ps_SetTarget(Proc: TSysProc); begin CurrThread.Client.IOManager.SetTargetEx(Proc); end; diff --git a/Units/MMLAddon/PSInc/pscompile.inc b/Units/MMLAddon/PSInc/pscompile.inc index 85d6c56..cf2ab55 100644 --- a/Units/MMLAddon/PSInc/pscompile.inc +++ b/Units/MMLAddon/PSInc/pscompile.inc @@ -65,5 +65,5 @@ AddConstantN('mouse_Right','integer').SetInt(ps_mouse_right); //0 AddConstantN('mouse_Left','integer').SetInt(ps_mouse_left);//1 AddConstantN('mouse_Middle','integer').SetInt(ps_mouse_middle);//2 -AddTypes('TProc', 'record Title: string; Handle: integer; Pid: integer; Width, Height: integer; end;'); -AddTypes('TProcArr', 'array of TProc;'); +AddTypes('TSysProc', 'record Title: string; Handle: integer; Pid: integer; Width, Height: integer; end;'); +AddTypes('TSysProcArr', 'array of TSysProc;'); diff --git a/Units/MMLAddon/PSInc/psexportedmethods.inc b/Units/MMLAddon/PSInc/psexportedmethods.inc index f7f81f5..4c109c7 100644 --- a/Units/MMLAddon/PSInc/psexportedmethods.inc +++ b/Units/MMLAddon/PSInc/psexportedmethods.inc @@ -195,8 +195,8 @@ AddFunction(@ps_messageBox,'function MessageBox(Text, Caption: string; Flags: Lo AddFunction(@ps_MessageDlg,'function MessageDlg(const Caption, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons) : integer;'); AddFunction(@ps_SetClipBoard, 'procedure SetClipBoard(const Data: string);'); AddFunction(@ps_GetClipBoard, 'function GetClipBoard: string;'); -AddFunction(@ps_GetProcesses, 'function GetProcesses: TProcArr;'); -AddFunction(@ps_SetTarget, 'procedure SetTarget(Proc: TProc);'); +AddFunction(@ps_GetProcesses, 'function GetProcesses: TSysProcArr;'); +AddFunction(@ps_SetTarget, 'procedure SetTarget(Proc: TSysProc);'); {$ENDIF} {string} diff --git a/Units/MMLCore/iomanager.pas b/Units/MMLCore/iomanager.pas index b38ad03..03e68d1 100644 --- a/Units/MMLCore/iomanager.pas +++ b/Units/MMLCore/iomanager.pas @@ -317,8 +317,8 @@ interface procedure FreeTarget(idx: integer); procedure SetState(val: Boolean); - function GetProcesses: TProcArr; virtual; abstract; - procedure SetTargetEx(Proc: TProc); virtual; abstract; + function GetProcesses: TSysProcArr; virtual; abstract; + procedure SetTargetEx(Proc: TSysProc); virtual; abstract; protected function SetImageTarget(target: TTarget): integer; function SetKeyMouseTarget(target: TTarget): integer; diff --git a/Units/MMLCore/mufasatypes.pas b/Units/MMLCore/mufasatypes.pas index e21cb46..7580d0b 100644 --- a/Units/MMLCore/mufasatypes.pas +++ b/Units/MMLCore/mufasatypes.pas @@ -106,13 +106,13 @@ type x1, y1, x2, y2: Integer; end; - TProc = record + TSysProc = record Title: string; Handle: integer; Pid: integer; Width, Height: integer; end; - TProcArr = array of TProc; + TSysProcArr = array of TSysProc; const TMDTMPointSize = 5*SizeOf(integer)+Sizeof(boolean); diff --git a/Units/MMLCore/os_linux.pas b/Units/MMLCore/os_linux.pas index dba76b1..e202a60 100644 --- a/Units/MMLCore/os_linux.pas +++ b/Units/MMLCore/os_linux.pas @@ -97,8 +97,8 @@ interface function SetTarget(target: TNativeWindow): integer; overload; procedure SetDesktop; override; - function GetProcesses: TProcArr; override; - procedure SetTargetEx(Proc: TProc); overload; + function GetProcesses: TSysProcArr; override; + procedure SetTargetEx(Proc: TSysProc); overload; private procedure NativeInit; override; procedure NativeFree; override; @@ -513,12 +513,12 @@ implementation SetBothTargets(TWindow.Create(display, screennum, target)) end; - function TIOManager.GetProcesses: TProcArr; + function TIOManager.GetProcesses: TSysProcArr; begin raise Exception.Create('GetProcesses: Not Implemented.'); end; - procedure TIOManager.SetTargetEx(Proc: TProc); + procedure TIOManager.SetTargetEx(Proc: TSysProc); begin raise Exception.Create('SetTargetEx: Not Implemented.'); end; diff --git a/Units/MMLCore/os_windows.pas b/Units/MMLCore/os_windows.pas index 99b56ca..e2fd07d 100644 --- a/Units/MMLCore/os_windows.pas +++ b/Units/MMLCore/os_windows.pas @@ -97,8 +97,9 @@ interface constructor Create(plugin_dir: string); function SetTarget(target: TNativeWindow): integer; overload; procedure SetDesktop; override; - function GetProcesses: TProcArr; override; - procedure SetTargetEx(Proc: TProc); overload; + + function GetProcesses: TSysProcArr; override; + procedure SetTargetEx(Proc: TSysProc); overload; protected DesktopHWND : Hwnd; procedure NativeInit; override; @@ -444,11 +445,11 @@ end; end; threadvar - ProcArr: TProcArr; + ProcArr: TSysProcArr; function EnumProcess(Handle: HWND; Param: LPARAM): WINBOOL; stdcall; var - Proc: TProc; + Proc: TSysProc; I: integer; pPid: DWORD; begin @@ -466,14 +467,14 @@ end; end; end; - function TIOManager.GetProcesses: TProcArr; + function TIOManager.GetProcesses: TSysProcArr; begin SetLength(ProcArr, 0); EnumWindows(@EnumProcess, 0); Result := ProcArr; end; - procedure TIOManager.SetTargetEx(Proc: TProc); + procedure TIOManager.SetTargetEx(Proc: TSysProc); begin SetTarget(Proc.Handle); end;