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-01-28 18:34:03 -05:00
|
|
|
procedure SetDesktopAsClient; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin;
|
|
|
|
CurrThread.Client.IOManager.SetDesktop;
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
function 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-01-28 18:34:03 -05:00
|
|
|
function 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-01-28 18:34:03 -05:00
|
|
|
function 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-01-28 18:34:03 -05:00
|
|
|
procedure SetImageTarget(idx: integer); extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetImageTarget(idx);
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
procedure SetKeyMouseTarget(idx: integer); extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetKeyMouseTarget(idx);
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
function GetImageTarget: integer; extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetImageTarget(result);
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
function GetKeyMouseTarget: integer; extdecl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetKeyMouseTarget(result);
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
procedure 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-01-28 18:34:03 -05:00
|
|
|
procedure GetClientDimensions(out w, h: integer); extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetDimensions(w, h);
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
function 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-01-28 18:34:03 -05:00
|
|
|
function 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-01-28 18:34:03 -05:00
|
|
|
procedure ActivateClient; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.ActivateClient;
|
|
|
|
end;
|
|
|
|
|
2010-01-28 18:34:03 -05:00
|
|
|
function IsTargetValid: boolean; extdecl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
result:= CurrThread.Client.IOManager.TargetValid;
|
|
|
|
end;
|