mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-12 14:17:59 -05:00
Added TMWindow.SetWindow to pass the GUI's set client data.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@79 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
0299c4e641
commit
9ffbcc2234
@ -49,11 +49,12 @@ type
|
||||
{ private declarations }
|
||||
public
|
||||
Window: TMWindow;
|
||||
{ public declarations }
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
Form1: TForm1;
|
||||
|
||||
|
||||
implementation
|
||||
uses
|
||||
@ -70,6 +71,11 @@ begin
|
||||
MMLPSThread := TMMLPSThread.Create(True);
|
||||
MMLPSThread.SetPSScript(Form1.SynEdit1.Lines.Text);
|
||||
MMLPSThread.SetDebug(Form1.Memo1);
|
||||
|
||||
// This doesn't actually set the Client's MWindow to the passed window, it
|
||||
// only copies the current set window handle.
|
||||
MMLPSThread.Client.MWindow.SetWindow(Form1.Window);
|
||||
|
||||
MMLPSThread.Resume;
|
||||
end;
|
||||
|
||||
|
@ -36,6 +36,8 @@ type
|
||||
function SetTarget(Window: THandle; NewType: TTargetWindowMode): integer; overload;
|
||||
function SetTarget(ArrPtr: PRGB32; Size: TPoint): integer; overload;
|
||||
|
||||
procedure SetWindow(Window: TMWindow);
|
||||
|
||||
{
|
||||
Freeze Client Feature.
|
||||
This will force the MWindow unit to Store the current Client's
|
||||
@ -180,6 +182,30 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TMWindow.SetWindow(Window: TMWindow);
|
||||
begin
|
||||
case Window.TargetMode of
|
||||
w_BMP, w_Window, w_HDC:
|
||||
{$IFDEF WINDOWS}
|
||||
Self.SetTarget(Window.TargetDC, Window.TargetMode);
|
||||
{$ELSE}
|
||||
writeln('TMWindow.SetWindow - HDC not supported');
|
||||
{$ENDIF}
|
||||
|
||||
// I don't think array can ever be set at this point.
|
||||
// Let's just add it anyway. ;)
|
||||
w_ArrayPtr:
|
||||
Self.SetTarget(Window.ArrayPtr, Window.ArraySize);
|
||||
|
||||
w_XWindow:
|
||||
{$IFDEF LINUX}
|
||||
Self.SetTarget(Window.CurWindow);
|
||||
{$ELSE}
|
||||
writeln('TMWindow.SetWindow - XImage not supported');
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
function TMWindow.GetColor(x, y: integer): TColor;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
|
Loading…
Reference in New Issue
Block a user