2010-01-25 08:59:44 -05:00
|
|
|
{
|
|
|
|
This file is part of the Mufasa Macro Library (MML)
|
|
|
|
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
|
|
|
|
|
|
|
|
MML is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
MML is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with MML. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
See the file COPYING, included in this distribution,
|
|
|
|
for details about the copyright.
|
|
|
|
|
|
|
|
window.inc for the Mufasa Macro Library
|
|
|
|
}
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
procedure ps_SetDesktopAsClient; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin;
|
|
|
|
CurrThread.Client.IOManager.SetDesktop;
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_SetTargetArray(P: Integer; w, h: integer): integer; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
2010-01-26 01:12:49 -05:00
|
|
|
result:= CurrThread.Client.IOManager.SetTarget(PRGB32(P), classes.point(w,h));
|
2010-01-25 08:59:44 -05:00
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_SetTargetBitmap(bitmap: Integer): integer; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin;
|
2010-01-26 01:12:49 -05:00
|
|
|
result:= CurrThread.Client.IOManager.SetTarget(CurrThread.Client.MBitmaps[Bitmap]);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_SetEIOSTarget(name: string; args: Variant): integer; extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
result:= CurrThread.Client.IOManager.SetTarget(name, @args);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
procedure ps_SetImageTarget(idx: integer); extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetImageTarget(idx);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
procedure ps_SetKeyMouseTarget(idx: integer); extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetKeyMouseTarget(idx);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_GetImageTarget: integer; extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetImageTarget(result);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_GetKeyMouseTarget: integer; extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetKeyMouseTarget(result);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_ExportImageTarget : TTarget_Exported;extdecl;
|
2010-02-03 18:13:09 -05:00
|
|
|
begin;
|
|
|
|
result := CurrThread.Client.IOManager.ExportImageTarget;
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_ExportKeyMouseTarget : TTarget_Exported; extdecl;
|
2010-02-03 18:13:09 -05:00
|
|
|
begin;
|
|
|
|
result := CurrThread.Client.IOManager.ExportKeyMouseTarget;
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
procedure ps_FreeTarget(idx: integer); extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.FreeTarget(idx);
|
2010-01-25 08:59:44 -05:00
|
|
|
end;
|
|
|
|
|
2010-04-18 11:14:19 -04:00
|
|
|
procedure ps_GetClientDimensions(var w, h: integer); extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetDimensions(w, h);
|
|
|
|
end;
|
|
|
|
|
2010-10-06 10:50:39 -04:00
|
|
|
procedure ps_GetClientPosition(var left, top: integer); extdecl;
|
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetPosition(left, top);
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_Freeze: boolean; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetFrozen(true);
|
|
|
|
result := true; //dunno what the result is supposed to mean
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_Unfreeze: boolean; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetFrozen(false);
|
|
|
|
result := true; //dunno what the result is supposed to mean
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
procedure ps_ActivateClient; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.ActivateClient;
|
|
|
|
end;
|
|
|
|
|
2010-04-07 17:04:25 -04:00
|
|
|
function ps_IsTargetValid: boolean; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
result:= CurrThread.Client.IOManager.TargetValid;
|
|
|
|
end;
|