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-26 11:51:36 -05:00
|
|
|
procedure SetDesktopAsClient; ps_decl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin;
|
|
|
|
CurrThread.Client.IOManager.SetDesktop;
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
function SetTargetArray(P: Integer; w, h: integer): integer; ps_decl;
|
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-26 11:51:36 -05:00
|
|
|
function SetTargetBitmap(bitmap: Integer): integer; ps_decl;
|
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-26 11:51:36 -05:00
|
|
|
function SetEIOSTarget(name: string; args: Variant): integer; ps_decl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
result:= CurrThread.Client.IOManager.SetTarget(name, @args);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
procedure SetImageTarget(idx: integer); ps_decl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetImageTarget(idx);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
procedure SetKeyMouseTarget(idx: integer); ps_decl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.SetKeyMouseTarget(idx);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
function GetImageTarget: integer; ps_decl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetImageTarget(result);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
function GetKeyMouseTarget: integer; ps_decl;
|
2010-01-26 01:12:49 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetKeyMouseTarget(result);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
procedure FreeTarget(idx: integer); ps_decl;
|
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-26 11:51:36 -05:00
|
|
|
procedure GetClientDimensions(out w, h: integer); ps_decl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.GetDimensions(w, h);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
function Freeze: boolean; ps_decl;
|
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-26 11:51:36 -05:00
|
|
|
function Unfreeze: boolean; ps_decl;
|
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-26 11:51:36 -05:00
|
|
|
procedure ActivateClient; ps_decl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
CurrThread.Client.IOManager.ActivateClient;
|
|
|
|
end;
|
|
|
|
|
2010-01-26 11:51:36 -05:00
|
|
|
function IsTargetValid: boolean; ps_decl;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin
|
|
|
|
result:= CurrThread.Client.IOManager.TargetValid;
|
|
|
|
end;
|