1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-25 18:52:15 -05:00

TEIOS_Exported -> TTarget_Exported

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@524 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2010-02-05 19:20:35 +00:00
parent 2cee56c20e
commit 4570a4738d
5 changed files with 52 additions and 52 deletions

View File

@ -61,12 +61,12 @@ begin
CurrThread.Client.IOManager.GetKeyMouseTarget(result); CurrThread.Client.IOManager.GetKeyMouseTarget(result);
end; end;
function ExportImageTarget : TEIOS_Exported; function ExportImageTarget : TTarget_Exported;
begin; begin;
result := CurrThread.Client.IOManager.ExportImageTarget; result := CurrThread.Client.IOManager.ExportImageTarget;
end; end;
function ExportKeyMouseTarget : TEIOS_Exported; function ExportKeyMouseTarget : TTarget_Exported;
begin; begin;
result := CurrThread.Client.IOManager.ExportKeyMouseTarget; result := CurrThread.Client.IOManager.ExportKeyMouseTarget;
end; end;

View File

@ -41,7 +41,7 @@ Sender.Comp.AddTypeS('TPointArrayArray','Array of TPointArray');
Sender.Comp.AddTypeS('TBmpMirrorStyle','(MirrorWidth,MirrorHeight,MirrorLine)'); Sender.Comp.AddTypeS('TBmpMirrorStyle','(MirrorWidth,MirrorHeight,MirrorLine)');
Sender.Comp.AddTypeS('TMask','record White, Black : TPointArray; WhiteHi,BlackHi : integer; W,H : integer;end;'); Sender.Comp.AddTypeS('TMask','record White, Black : TPointArray; WhiteHi,BlackHi : integer; W,H : integer;end;');
Sender.Comp.addtypeS('PPoint','record R,T : extended; end;'); Sender.Comp.addtypeS('PPoint','record R,T : extended; end;');
Sender.Comp.AddTypeS('TEIOS_Exported','record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14:integer; end;'); Sender.Comp.AddTypeS('TTarget_Exported','record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14:integer; end;');
Sender.Comp.AddTypes('TDTMPointDef', 'record x, y, Color, Tolerance, AreaSize, AreaShape: integer; end;'); Sender.Comp.AddTypes('TDTMPointDef', 'record x, y, Color, Tolerance, AreaSize, AreaShape: integer; end;');
Sender.Comp.AddTypes('TDTMPointDefArray', 'Array Of TDTMPointDef;'); Sender.Comp.AddTypes('TDTMPointDefArray', 'Array Of TDTMPointDef;');

View File

@ -79,8 +79,8 @@ AddFunction(@SetImageTarget,'procedure SetImageTarget(idx: integer);');
AddFunction(@SetKeyMouseTarget,'procedure SetKeyMouseTarget(idx: integer);'); AddFunction(@SetKeyMouseTarget,'procedure SetKeyMouseTarget(idx: integer);');
AddFunction(@GetImageTarget,'function GetImageTarget: integer;'); AddFunction(@GetImageTarget,'function GetImageTarget: integer;');
AddFunction(@GetKeyMouseTarget,'function GetKeyMouseTarget: integer;'); AddFunction(@GetKeyMouseTarget,'function GetKeyMouseTarget: integer;');
AddFunction(@ExportImageTarget,'function ExportImageTarget : TEIOS_Exported;'); AddFunction(@ExportImageTarget,'function ExportImageTarget : TTarget_Exported;');
AddFunction(@ExportKeyMouseTarget,'function ExportKeyMouseTarget : TEIOS_Exported;'); AddFunction(@ExportKeyMouseTarget,'function ExportKeyMouseTarget : TTarget_Exported;');
AddFunction(@FreeTarget,'procedure FreeTarget(idx: integer);'); AddFunction(@FreeTarget,'procedure FreeTarget(idx: integer);');
AddFunction(@SetDesktopAsClient,'procedure SetDesktopAsClient'); AddFunction(@SetDesktopAsClient,'procedure SetDesktopAsClient');
AddFunction(@ActivateClient, 'procedure ActivateClient;'); AddFunction(@ActivateClient, 'procedure ActivateClient;');

View File

@ -174,7 +174,7 @@ uses
uPSC_extctrls, //Compile-libs uPSC_extctrls, //Compile-libs
uPSUtils, uPSUtils,
fontloader, fontloader,
IOmanager,//TEIOS_Exported IOmanager,//TTarget_Exported
IniFiles,//Silly INI files IniFiles,//Silly INI files
uPSR_std, uPSR_controls,uPSR_classes,uPSR_graphics,uPSR_stdctrls,uPSR_forms, uPSR_std, uPSR_controls,uPSR_classes,uPSR_graphics,uPSR_stdctrls,uPSR_forms,
uPSR_extctrls, //Runtime-libs uPSR_extctrls, //Runtime-libs

View File

@ -209,7 +209,7 @@ interface
{Basically like TEIOS_Client, only this is exported to some plugin, whilst TEIOS_Client is Imported {Basically like TEIOS_Client, only this is exported to some plugin, whilst TEIOS_Client is Imported
Not all functions have to be 'set', it depends on the kind of target (Image/KeyMouse) } Not all functions have to be 'set', it depends on the kind of target (Image/KeyMouse) }
TEIOS_Exported = packed record TTarget_Exported = packed record
Target : Pointer; Target : Pointer;
GetTargetDimensions: procedure(target: pointer; var w, h: integer); stdcall; GetTargetDimensions: procedure(target: pointer; var w, h: integer); stdcall;
@ -277,8 +277,8 @@ interface
function GetImageTarget: TTarget; overload; function GetImageTarget: TTarget; overload;
function GetKeyMouseTarget: TTarget; overload; function GetKeyMouseTarget: TTarget; overload;
function ExportImageTarget : TEIOS_Exported; overload; function ExportImageTarget : TTarget_Exported; overload;
function ExportKeyMouseTarget : TEIOS_Exported; overload; function ExportKeyMouseTarget : TTarget_Exported; overload;
procedure GetImageTarget(var idx: integer); overload; procedure GetImageTarget(var idx: integer); overload;
procedure GetKeyMouseTarget(var idx: integer); overload; procedure GetKeyMouseTarget(var idx: integer); overload;
@ -309,22 +309,22 @@ interface
property Stopping: Boolean Read FStopping write SetState; property Stopping: Boolean Read FStopping write SetState;
end; end;
{These wrappers are for an exported TEIOS_Exported. This is done so a plugin can acces the current target and use its methodes} {These wrappers are for an exported TTarget_Exported. This is done so a plugin can acces the current target and use its methodes}
procedure TEIOS_Exported_GetTargetDimensions(target: pointer; var w, h: integer); stdcall; procedure TTarget_Exported_GetTargetDimensions(target: pointer; var w, h: integer); stdcall;
function TEIOS_Exported_GetColor (target: pointer;x,y : integer) : integer; stdcall; function TTarget_Exported_GetColor (target: pointer;x,y : integer) : integer; stdcall;
function TEIOS_Exported_ReturnData (target: pointer;xs, ys, width, height: Integer): TRetData; stdcall; function TTarget_Exported_ReturnData (target: pointer;xs, ys, width, height: Integer): TRetData; stdcall;
procedure TEIOS_Exported_FreeReturnData(target: pointer); stdcall; procedure TTarget_Exported_FreeReturnData(target: pointer); stdcall;
procedure TEIOS_Exported_GetMousePosition(target: pointer; var x,y: integer); stdcall; procedure TTarget_Exported_GetMousePosition(target: pointer; var x,y: integer); stdcall;
procedure TEIOS_Exported_MoveMouse(target: pointer; x,y: integer); stdcall; procedure TTarget_Exported_MoveMouse(target: pointer; x,y: integer); stdcall;
procedure TEIOS_Exported_HoldMouse(target: pointer; x,y: integer; left: boolean); stdcall; procedure TTarget_Exported_HoldMouse(target: pointer; x,y: integer; left: boolean); stdcall;
procedure TEIOS_Exported_ReleaseMouse(target: pointer; x,y: integer; left: boolean); stdcall; procedure TTarget_Exported_ReleaseMouse(target: pointer; x,y: integer; left: boolean); stdcall;
procedure TEIOS_Exported_SendString(target: pointer; str: PChar); stdcall; procedure TTarget_Exported_SendString(target: pointer; str: PChar); stdcall;
procedure TEIOS_Exported_HoldKey(target: pointer; key: integer); stdcall; procedure TTarget_Exported_HoldKey(target: pointer; key: integer); stdcall;
procedure TEIOS_Exported_ReleaseKey(target: pointer; key: integer); stdcall; procedure TTarget_Exported_ReleaseKey(target: pointer; key: integer); stdcall;
function TEIOS_Exported_IsKeyHeld(target: pointer; key: integer): boolean; stdcall; function TTarget_Exported_IsKeyHeld(target: pointer; key: integer): boolean; stdcall;
function TEIOS_Exported_GetKeyCode(target : pointer; C : char) : integer; stdcall; function TTarget_Exported_GetKeyCode(target : pointer; C : char) : integer; stdcall;
implementation implementation
@ -434,34 +434,34 @@ begin
result := keymouse; result := keymouse;
end; end;
function TIOManager_Abstract.ExportImageTarget: TEIOS_Exported; function TIOManager_Abstract.ExportImageTarget: TTarget_Exported;
begin begin
FillChar(result,sizeof(TEIOS_Exported),0); FillChar(result,sizeof(TTarget_Exported),0);
with result do with result do
begin begin
Target:= image; Target:= image;
GetTargetDimensions:= @TEIOS_Exported_GetTargetDimensions; GetTargetDimensions:= @TTarget_Exported_GetTargetDimensions;
GetColor:= @TEIOS_Exported_GetColor; GetColor:= @TTarget_Exported_GetColor;
ReturnData := @TEIOS_Exported_ReturnData; ReturnData := @TTarget_Exported_ReturnData;
FreeReturnData:= @TEIOS_Exported_FreeReturnData; FreeReturnData:= @TTarget_Exported_FreeReturnData;
end; end;
end; end;
function TIOManager_Abstract.ExportKeyMouseTarget: TEIOS_Exported; function TIOManager_Abstract.ExportKeyMouseTarget: TTarget_Exported;
begin begin
with result do with result do
begin begin
Target:= KeyMouse; Target:= KeyMouse;
GetMousePosition := @TEIOS_Exported_GetMousePosition; GetMousePosition := @TTarget_Exported_GetMousePosition;
MoveMouse := @TEIOS_Exported_MoveMouse; MoveMouse := @TTarget_Exported_MoveMouse;
HoldMouse := @TEIOS_Exported_HoldMouse; HoldMouse := @TTarget_Exported_HoldMouse;
ReleaseMouse := @TEIOS_Exported_ReleaseMouse; ReleaseMouse := @TTarget_Exported_ReleaseMouse;
SendString := @TEIOS_Exported_SendString; SendString := @TTarget_Exported_SendString;
HoldKey := @TEIOS_Exported_HoldKey; HoldKey := @TTarget_Exported_HoldKey;
ReleaseKey := @TEIOS_Exported_ReleaseKey; ReleaseKey := @TTarget_Exported_ReleaseKey;
IsKeyHeld := @TEIOS_Exported_IsKeyHeld; IsKeyHeld := @TTarget_Exported_IsKeyHeld;
GetKeyCode := @TEIOS_Exported_GetKeyCode; GetKeyCode := @TTarget_Exported_GetKeyCode;
end; end;
end; end;
@ -919,41 +919,41 @@ end;
//***implementation*** TEIS_Exported wrappers //***implementation*** TEIS_Exported wrappers
procedure TEIOS_Exported_GetTargetDimensions(target: pointer; var w, procedure TTarget_Exported_GetTargetDimensions(target: pointer; var w,
h: integer); stdcall; h: integer); stdcall;
begin begin
TTarget(Target).GetTargetDimensions(w,h); TTarget(Target).GetTargetDimensions(w,h);
end; end;
function TEIOS_Exported_GetColor(target: pointer;x, y: integer): integer; stdcall; function TTarget_Exported_GetColor(target: pointer;x, y: integer): integer; stdcall;
begin begin
result := TTarget(Target).GetColor(x,y); result := TTarget(Target).GetColor(x,y);
end; end;
function TEIOS_Exported_ReturnData(target: pointer;xs, ys, width, height: Integer): TRetData; function TTarget_Exported_ReturnData(target: pointer;xs, ys, width, height: Integer): TRetData;
stdcall; stdcall;
begin begin
result := TTarget(Target).ReturnData(xs,ys,width,height); result := TTarget(Target).ReturnData(xs,ys,width,height);
end; end;
procedure TEIOS_Exported_FreeReturnData(target: pointer); stdcall; procedure TTarget_Exported_FreeReturnData(target: pointer); stdcall;
begin begin
TTarget(target).FreeReturnData; TTarget(target).FreeReturnData;
end; end;
procedure TEIOS_Exported_GetMousePosition(target: pointer; var x, y: integer procedure TTarget_Exported_GetMousePosition(target: pointer; var x, y: integer
); stdcall; ); stdcall;
begin begin
TTarget(Target).GetMousePosition(x,y); TTarget(Target).GetMousePosition(x,y);
end; end;
procedure TEIOS_Exported_MoveMouse(target: pointer; x, y: integer); stdcall; procedure TTarget_Exported_MoveMouse(target: pointer; x, y: integer); stdcall;
begin begin
TTarget(Target).MoveMouse(x,y); TTarget(Target).MoveMouse(x,y);
end; end;
procedure TEIOS_Exported_HoldMouse(target: pointer; x, y: integer; procedure TTarget_Exported_HoldMouse(target: pointer; x, y: integer;
left: boolean); stdcall; left: boolean); stdcall;
begin begin
if left then if left then
@ -962,7 +962,7 @@ begin
TTarget(Target).HoldMouse(x,y,mouse_right); TTarget(Target).HoldMouse(x,y,mouse_right);
end; end;
procedure TEIOS_Exported_ReleaseMouse(target: pointer; x, y: integer; procedure TTarget_Exported_ReleaseMouse(target: pointer; x, y: integer;
left: boolean); stdcall; left: boolean); stdcall;
begin begin
if left then if left then
@ -971,28 +971,28 @@ begin
TTarget(Target).ReleaseMouse(x,y,mouse_right); TTarget(Target).ReleaseMouse(x,y,mouse_right);
end; end;
procedure TEIOS_Exported_SendString(target: pointer; str: PChar); stdcall; procedure TTarget_Exported_SendString(target: pointer; str: PChar); stdcall;
begin begin
TTarget(Target).SendString(str); TTarget(Target).SendString(str);
end; end;
procedure TEIOS_Exported_HoldKey(target: pointer; key: integer); stdcall; procedure TTarget_Exported_HoldKey(target: pointer; key: integer); stdcall;
begin begin
TTarget(Target).HoldKey(key); TTarget(Target).HoldKey(key);
end; end;
procedure TEIOS_Exported_ReleaseKey(target: pointer; key: integer); stdcall; procedure TTarget_Exported_ReleaseKey(target: pointer; key: integer); stdcall;
begin begin
TTarget(Target).ReleaseKey(key); TTarget(Target).ReleaseKey(key);
end; end;
function TEIOS_Exported_IsKeyHeld(target: pointer; key: integer): boolean; function TTarget_Exported_IsKeyHeld(target: pointer; key: integer): boolean;
stdcall; stdcall;
begin begin
result := TTarget(Target).IsKeyHeld(key); result := TTarget(Target).IsKeyHeld(key);
end; end;
function TEIOS_Exported_GetKeyCode(target: pointer; C: char): integer; function TTarget_Exported_GetKeyCode(target: pointer; C: char): integer;
stdcall; stdcall;
begin begin
result := TTarget(target).GetKeyCode(c); result := TTarget(target).GetKeyCode(c);