1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-21 08:45:06 -05:00

Simba: TProc(Arr) rename to TSysProc(Arr)

This commit is contained in:
John P (Dgby714) 2010-12-23 11:24:18 -05:00
parent 58faccf182
commit 82e1036aa5
7 changed files with 21 additions and 20 deletions

View File

@ -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;

View File

@ -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;');

View File

@ -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}

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;