mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-22 23:38:50 -05:00
Complication fix.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@12 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
ba1e0833b0
commit
50ce4db8b4
@ -1,377 +1,385 @@
|
||||
unit Window;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, mufasatypes{$IFDEF MSWINDOWS},windows {$ENDIF}, graphics,
|
||||
LCLType
|
||||
|
||||
{$IFDEF LINUX}, xlib, x, xutil, ctypes{$ENDIF};
|
||||
|
||||
type
|
||||
|
||||
{ TMWindow }
|
||||
|
||||
TMWindow = class(TObject)
|
||||
function ReturnData(xs, ys, width, height: Integer): PRGB32;
|
||||
procedure FreeReturnData;
|
||||
procedure GetDimensions(var W, H: Integer);
|
||||
function CopyClientToBitmap(xs, ys, xe, ye: integer): TBitmap;
|
||||
procedure ActivateClient;
|
||||
{$IFDEF LINUX}
|
||||
function SetTarget(XWindow: x.TWindow): integer; overload;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
function UpdateDrawBitmap:boolean;
|
||||
{$ENDIF}
|
||||
function SetTarget(Window: THandle; NewType: TTargetWindowMode): integer; overload;
|
||||
function SetTarget(ArrPtr: PRGB32): integer; overload;
|
||||
|
||||
constructor Create(Client: TObject);
|
||||
destructor Destroy; override;
|
||||
public
|
||||
// Reference to client.
|
||||
Client: TObject;
|
||||
|
||||
// Target Window Mode.
|
||||
TargetMode: TTargetWindowMode;
|
||||
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
//Target handle; HWND
|
||||
TargetHandle : Hwnd;
|
||||
DrawBmpDataPtr : PRGB32;
|
||||
|
||||
//Works on linux as well, test it out
|
||||
TargetDC : HDC;
|
||||
DrawBitmap : TBitmap;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF LINUX}
|
||||
// X Display
|
||||
XDisplay: PDisplay;
|
||||
|
||||
// Connection Number
|
||||
XConnectionNumber: Integer;
|
||||
|
||||
// X Window
|
||||
CurWindow: x.TWindow;
|
||||
|
||||
// Desktop Window
|
||||
DesktopWindow: x.TWindow;
|
||||
|
||||
// X Screen
|
||||
XScreen: PScreen;
|
||||
|
||||
// X Screen Number
|
||||
XScreenNum: Integer;
|
||||
|
||||
// The X Image pointer.
|
||||
XWindowImage: PXImage;
|
||||
|
||||
{$IFDEF M_MEMORY_DEBUG}
|
||||
// XImageFreed should be True if there is currently no
|
||||
// XImage loaded. If one is loaded, XImageFreed is true.
|
||||
|
||||
// If ReturnData is called while XImageFreed is false,
|
||||
// we throw an exception.
|
||||
// Same for FreeReturnData with XImageFreed true.
|
||||
XImageFreed: Boolean;
|
||||
{$ENDIF}
|
||||
|
||||
{$ELSE}
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Client, // For the Client Class
|
||||
windowutil, // For utilities such as XImageToRawImage
|
||||
GraphType // For TRawImage
|
||||
;
|
||||
|
||||
constructor TMWindow.Create(Client: TObject);
|
||||
begin
|
||||
inherited Create;
|
||||
Self.Client := Client;
|
||||
{$IFDEF MSWINDOWS}
|
||||
Self.DrawBitmap := TBitmap.Create;
|
||||
Self.TargetMode:= w_Window;
|
||||
Self.TargetHandle:= windows.GetDesktopWindow;
|
||||
Self.TargetDC:= GetWindowDC(Self.TargetHandle);
|
||||
Self.UpdateDrawBitmap;
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
Self.TargetMode := w_XWindow;
|
||||
|
||||
Self.XDisplay := XOpenDisplay(nil);
|
||||
if Self.XDisplay = nil then
|
||||
begin
|
||||
// throw Exception
|
||||
end;
|
||||
Self.XConnectionNumber:= ConnectionNumber(Self.XDisplay);
|
||||
Self.XScreen := XDefaultScreenOfDisplay(Self.XDisplay);
|
||||
Self.XScreenNum:= DefaultScreen(Self.XDisplay);
|
||||
|
||||
// The Root Window is the Desktop. :-)
|
||||
Self.DesktopWindow:= RootWindow(Self.XDisplay, Self.XScreenNum);
|
||||
Self.CurWindow:= Self.DesktopWindow;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
end;
|
||||
|
||||
destructor TMWindow.Destroy;
|
||||
begin
|
||||
|
||||
{$IFDEF LINUX}
|
||||
XCloseDisplay(Self.XDisplay);
|
||||
{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}
|
||||
if TargetMode = w_Window then
|
||||
ReleaseDC(TargetHandle,TargetDC);
|
||||
DrawBitmap.Free;
|
||||
{$ENDIF}
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TMWindow.ReturnData(xs, ys, width, height: Integer): PRGB32;
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
Old_Handler: TXErrorHandler;
|
||||
{$ENDIF}
|
||||
begin
|
||||
case Self.TargetMode of
|
||||
w_Window:
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
BitBlt(Self.DrawBitmap.Canvas.Handle,0,0, width, height, Self.TargetDC, xs,ys, SRCCOPY);
|
||||
Result := Self.DrawBmpDataPtr;
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
{ Should be this. }
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
|
||||
Self.XWindowImage := XGetImage(Self.XDisplay, Self.curWindow, xs, ys, width, height, AllPlanes, ZPixmap);
|
||||
if QWord(Self.XWindowImage) = 0 then
|
||||
begin
|
||||
Writeln('ReturnData: XGetImage Error. Dumping data now:');
|
||||
Writeln('xs, ys, width, height: ' + inttostr(xs) + ', ' + inttostr(ys) +
|
||||
', ' + inttostr(width) + ', ' + inttostr(height));
|
||||
Result := nil;
|
||||
XSetErrorHandler(Old_Handler);
|
||||
Exit;
|
||||
end;
|
||||
WriteLn(IntToStr(Self.XWindowImage^.width) + ', ' + IntToStr(Self.XWindowImage^.height));
|
||||
Result := PRGB32(Self.XWindowImage^.data);
|
||||
|
||||
XSetErrorHandler(Old_Handler);
|
||||
{$ELSE}
|
||||
WriteLn('Windows doesn''t support XImage');
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMWindow.FreeReturnData;
|
||||
begin
|
||||
if Self.TargetMode <> w_XWindow then
|
||||
begin
|
||||
// throw exception.
|
||||
exit;
|
||||
end;
|
||||
{$IFDEF LINUX}
|
||||
if(QWord(Self.XWindowImage) <> 0) then // 0, nil?
|
||||
begin
|
||||
XDestroyImage(Self.XWindowImage);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TMWindow.CopyClientToBitmap(xs, ys, xe, ye: integer): TBitmap;
|
||||
var
|
||||
w,h : Integer;
|
||||
ww, hh: Integer;
|
||||
{$IFDEF LINUX}
|
||||
Old_Handler: TXErrorHandler;
|
||||
Img: PXImage;
|
||||
Raw: TRawImage;
|
||||
Bmp: TBitmap;
|
||||
{$ENDIF}
|
||||
|
||||
begin
|
||||
Self.GetDimensions(w, h);
|
||||
writeln(inttostr(xs) + ', ' + inttostr(ys) + ' : ' + inttostr(xe) + ', ' +
|
||||
inttostr(ye));
|
||||
ww := xe-xs;
|
||||
hh := ye-ys;
|
||||
|
||||
case Self.TargetMode Of
|
||||
w_Window:
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
if(xs < 0) or (ys < 0) or (xe > W) or (ye > H) then
|
||||
Writeln('pervet');
|
||||
Result := TBitmap.Create;
|
||||
Result.SetSize(ww+1,hh+1);
|
||||
BitBlt(result.canvas.handle,0,0,ww+1,hh+1,
|
||||
self.TargetDC,xs,ys, SRCCOPY);
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
|
||||
if(xs < 0) or (ys < 0) or (xe > W) or (ye > H) then
|
||||
begin
|
||||
writeln('Faulty coordinates');
|
||||
XSetErrorHandler(Old_Handler);
|
||||
exit;
|
||||
end;
|
||||
|
||||
Img := XGetImage(Self.XDisplay, Self.curWindow, xs, ys, ww, hh, AllPlanes, ZPixmap);
|
||||
XImageToRawImage(Img, Raw);
|
||||
|
||||
Bmp := TBitmap.Create;
|
||||
Bmp.LoadFromRawImage(Raw, False);
|
||||
Result := Bmp;
|
||||
|
||||
{
|
||||
If you want to use some internal Bitmap system, BitBlt to it here.
|
||||
Don't forget to free Bmp!
|
||||
}
|
||||
//lclintf.BitBlt(Bmps[bitmap].Canvas.Handle, 0, 0, ww + 1, hh + 1, Bmp.Canvas.Handle, xs, ys, SRCCOPY);
|
||||
//Bmp.Free;
|
||||
|
||||
XDestroyImage(Img);
|
||||
XSetErrorHandler(Old_Handler);
|
||||
{$ELSE}
|
||||
writeln('Windows and tXWindow');
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMWindow.ActivateClient;
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
SetForegroundWindow(Self.TargetHandle);
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
XSetInputFocus(Self.XDisplay,Self.CurWindow,RevertToParent,CurrentTime);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
||||
{$IFDEF MSWINDOWS} //Probably need one for Linux as well
|
||||
function TMWindow.UpdateDrawBitmap :boolean;
|
||||
var
|
||||
w,h : integer;
|
||||
BmpInfo : Windows.TBitmap;
|
||||
begin
|
||||
GetDimensions(w,h);
|
||||
DrawBitmap.SetSize(w,h);
|
||||
GetObject(DrawBitmap.Handle, SizeOf(BmpInfo), @BmpInfo);
|
||||
DrawBmpDataPtr := BmpInfo.bmBits;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TMWindow.GetDimensions(var W, H: Integer);
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
Attrib: TXWindowAttributes;
|
||||
newx,newy : integer;
|
||||
childwindow : x.TWindow;
|
||||
Old_Handler: TXErrorHandler;
|
||||
{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}
|
||||
var
|
||||
Rect : TRect;
|
||||
{$ENDIF}
|
||||
begin
|
||||
case TargetMode of
|
||||
w_Window:
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
GetWindowRect(Self.TargetHandle, Rect);
|
||||
w:= Rect.Right - Rect.left + 1;
|
||||
h:= Rect.Bottom - Rect.Top + 1;
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
if XGetWindowAttributes(Self.XDisplay, Self.CurWindow, @Attrib) <> 0 Then
|
||||
begin
|
||||
XTranslateCoordinates(Self.XDisplay, Self.CurWindow, Self.DesktopWindow, 0,0, @newx, @newy, @childwindow);
|
||||
W := Attrib.Width;
|
||||
H := Attrib.Height;
|
||||
end else
|
||||
begin
|
||||
W := -1;
|
||||
H := -1;
|
||||
end;
|
||||
XSetErrorHandler(Old_Handler);
|
||||
{$ELSE}
|
||||
WriteLn('You dummy! How are you going to use w_XWindow on non Linux systems?');
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_ArrayPtr:
|
||||
begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF LINUX}
|
||||
function TMWindow.SetTarget(XWindow: x.TWindow): integer; overload;
|
||||
var
|
||||
Old_Handler: TXErrorHandler;
|
||||
begin
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
Self.CurWindow := XWindow;
|
||||
Self.TargetMode:= w_XWindow;
|
||||
XSetErrorHandler(Old_Handler);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function TMWindow.SetTarget(Window: THandle; NewType: TTargetWindowMode): integer; overload;
|
||||
begin
|
||||
if NewType in [ w_XWindow, w_ArrayPtr ] then
|
||||
begin
|
||||
// throw exception
|
||||
Exit;
|
||||
end;
|
||||
case NewType of
|
||||
w_Window :
|
||||
begin;
|
||||
ReleaseDC(Self.TargetHandle,Self.TargetDC);
|
||||
Self.TargetHandle := Window;
|
||||
Self.TargetDC := GetWindowDC(Window);
|
||||
end;
|
||||
end;
|
||||
{$IFDEF MSWINDOWS}
|
||||
UpdateDrawBitmap;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TMWindow.SetTarget(ArrPtr: PRGB32): integer; overload;
|
||||
begin
|
||||
|
||||
Self.TargetMode:= w_ArrayPtr;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
unit Window;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, mufasatypes
|
||||
{$IFDEF MSWINDOWS}
|
||||
,windows // For windows API
|
||||
{$ENDIF}
|
||||
, graphics,
|
||||
LCLType,
|
||||
LCLIntf // for ReleaseDC and such
|
||||
|
||||
{$IFDEF LINUX}, xlib, x, xutil, ctypes{$ENDIF};
|
||||
|
||||
type
|
||||
|
||||
{ TMWindow }
|
||||
|
||||
TMWindow = class(TObject)
|
||||
function ReturnData(xs, ys, width, height: Integer): PRGB32;
|
||||
procedure FreeReturnData;
|
||||
procedure GetDimensions(var W, H: Integer);
|
||||
function CopyClientToBitmap(xs, ys, xe, ye: integer): TBitmap;
|
||||
procedure ActivateClient;
|
||||
{$IFDEF LINUX}
|
||||
function SetTarget(XWindow: x.TWindow): integer; overload;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
function UpdateDrawBitmap:boolean;
|
||||
{$ENDIF}
|
||||
function SetTarget(Window: THandle; NewType: TTargetWindowMode): integer; overload;
|
||||
function SetTarget(ArrPtr: PRGB32): integer; overload;
|
||||
|
||||
constructor Create(Client: TObject);
|
||||
destructor Destroy; override;
|
||||
public
|
||||
// Reference to client.
|
||||
Client: TObject;
|
||||
|
||||
// Target Window Mode.
|
||||
TargetMode: TTargetWindowMode;
|
||||
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
//Target handle; HWND
|
||||
TargetHandle : Hwnd;
|
||||
DrawBmpDataPtr : PRGB32;
|
||||
|
||||
//Works on linux as well, test it out
|
||||
TargetDC : HDC;
|
||||
DrawBitmap : TBitmap;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF LINUX}
|
||||
// X Display
|
||||
XDisplay: PDisplay;
|
||||
|
||||
// Connection Number
|
||||
XConnectionNumber: Integer;
|
||||
|
||||
// X Window
|
||||
CurWindow: x.TWindow;
|
||||
|
||||
// Desktop Window
|
||||
DesktopWindow: x.TWindow;
|
||||
|
||||
// X Screen
|
||||
XScreen: PScreen;
|
||||
|
||||
// X Screen Number
|
||||
XScreenNum: Integer;
|
||||
|
||||
// The X Image pointer.
|
||||
XWindowImage: PXImage;
|
||||
|
||||
{$IFDEF M_MEMORY_DEBUG}
|
||||
// XImageFreed should be True if there is currently no
|
||||
// XImage loaded. If one is loaded, XImageFreed is true.
|
||||
|
||||
// If ReturnData is called while XImageFreed is false,
|
||||
// we throw an exception.
|
||||
// Same for FreeReturnData with XImageFreed true.
|
||||
XImageFreed: Boolean;
|
||||
{$ENDIF}
|
||||
|
||||
{$ELSE}
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Client, // For the Client Class
|
||||
windowutil, // For utilities such as XImageToRawImage
|
||||
GraphType // For TRawImage
|
||||
;
|
||||
|
||||
constructor TMWindow.Create(Client: TObject);
|
||||
begin
|
||||
inherited Create;
|
||||
Self.Client := Client;
|
||||
{$IFDEF MSWINDOWS}
|
||||
Self.DrawBitmap := TBitmap.Create;
|
||||
Self.TargetMode:= w_Window;
|
||||
Self.TargetHandle:= windows.GetDesktopWindow;
|
||||
Self.TargetDC:= GetWindowDC(Self.TargetHandle);
|
||||
Self.UpdateDrawBitmap;
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
Self.TargetMode := w_XWindow;
|
||||
|
||||
Self.XDisplay := XOpenDisplay(nil);
|
||||
if Self.XDisplay = nil then
|
||||
begin
|
||||
// throw Exception
|
||||
end;
|
||||
Self.XConnectionNumber:= ConnectionNumber(Self.XDisplay);
|
||||
Self.XScreen := XDefaultScreenOfDisplay(Self.XDisplay);
|
||||
Self.XScreenNum:= DefaultScreen(Self.XDisplay);
|
||||
|
||||
// The Root Window is the Desktop. :-)
|
||||
Self.DesktopWindow:= RootWindow(Self.XDisplay, Self.XScreenNum);
|
||||
Self.CurWindow:= Self.DesktopWindow;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
end;
|
||||
|
||||
destructor TMWindow.Destroy;
|
||||
begin
|
||||
|
||||
{$IFDEF LINUX}
|
||||
XCloseDisplay(Self.XDisplay);
|
||||
{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}
|
||||
if TargetMode = w_Window then
|
||||
ReleaseDC(TargetHandle,TargetDC);
|
||||
DrawBitmap.Free;
|
||||
{$ENDIF}
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TMWindow.ReturnData(xs, ys, width, height: Integer): PRGB32;
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
Old_Handler: TXErrorHandler;
|
||||
{$ENDIF}
|
||||
begin
|
||||
case Self.TargetMode of
|
||||
w_Window:
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
BitBlt(Self.DrawBitmap.Canvas.Handle,0,0, width, height, Self.TargetDC, xs,ys, SRCCOPY);
|
||||
Result := Self.DrawBmpDataPtr;
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
{ Should be this. }
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
|
||||
Self.XWindowImage := XGetImage(Self.XDisplay, Self.curWindow, xs, ys, width, height, AllPlanes, ZPixmap);
|
||||
if QWord(Self.XWindowImage) = 0 then
|
||||
begin
|
||||
Writeln('ReturnData: XGetImage Error. Dumping data now:');
|
||||
Writeln('xs, ys, width, height: ' + inttostr(xs) + ', ' + inttostr(ys) +
|
||||
', ' + inttostr(width) + ', ' + inttostr(height));
|
||||
Result := nil;
|
||||
XSetErrorHandler(Old_Handler);
|
||||
Exit;
|
||||
end;
|
||||
WriteLn(IntToStr(Self.XWindowImage^.width) + ', ' + IntToStr(Self.XWindowImage^.height));
|
||||
Result := PRGB32(Self.XWindowImage^.data);
|
||||
|
||||
XSetErrorHandler(Old_Handler);
|
||||
{$ELSE}
|
||||
WriteLn('Windows doesn''t support XImage');
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMWindow.FreeReturnData;
|
||||
begin
|
||||
if Self.TargetMode <> w_XWindow then
|
||||
begin
|
||||
// throw exception.
|
||||
exit;
|
||||
end;
|
||||
{$IFDEF LINUX}
|
||||
if(QWord(Self.XWindowImage) <> 0) then // 0, nil?
|
||||
begin
|
||||
XDestroyImage(Self.XWindowImage);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TMWindow.CopyClientToBitmap(xs, ys, xe, ye: integer): TBitmap;
|
||||
var
|
||||
w,h : Integer;
|
||||
ww, hh: Integer;
|
||||
{$IFDEF LINUX}
|
||||
Old_Handler: TXErrorHandler;
|
||||
Img: PXImage;
|
||||
Raw: TRawImage;
|
||||
Bmp: TBitmap;
|
||||
{$ENDIF}
|
||||
|
||||
begin
|
||||
Self.GetDimensions(w, h);
|
||||
writeln(inttostr(xs) + ', ' + inttostr(ys) + ' : ' + inttostr(xe) + ', ' +
|
||||
inttostr(ye));
|
||||
ww := xe-xs;
|
||||
hh := ye-ys;
|
||||
|
||||
case Self.TargetMode Of
|
||||
w_Window:
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
if(xs < 0) or (ys < 0) or (xe > W) or (ye > H) then
|
||||
Writeln('pervet');
|
||||
Result := TBitmap.Create;
|
||||
Result.SetSize(ww+1,hh+1);
|
||||
BitBlt(result.canvas.handle,0,0,ww+1,hh+1,
|
||||
self.TargetDC,xs,ys, SRCCOPY);
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
|
||||
if(xs < 0) or (ys < 0) or (xe > W) or (ye > H) then
|
||||
begin
|
||||
writeln('Faulty coordinates');
|
||||
XSetErrorHandler(Old_Handler);
|
||||
exit;
|
||||
end;
|
||||
|
||||
Img := XGetImage(Self.XDisplay, Self.curWindow, xs, ys, ww, hh, AllPlanes, ZPixmap);
|
||||
XImageToRawImage(Img, Raw);
|
||||
|
||||
Bmp := TBitmap.Create;
|
||||
Bmp.LoadFromRawImage(Raw, False);
|
||||
Result := Bmp;
|
||||
|
||||
{
|
||||
If you want to use some internal Bitmap system, BitBlt to it here.
|
||||
Don't forget to free Bmp!
|
||||
}
|
||||
//lclintf.BitBlt(Bmps[bitmap].Canvas.Handle, 0, 0, ww + 1, hh + 1, Bmp.Canvas.Handle, xs, ys, SRCCOPY);
|
||||
//Bmp.Free;
|
||||
|
||||
XDestroyImage(Img);
|
||||
XSetErrorHandler(Old_Handler);
|
||||
{$ELSE}
|
||||
writeln('Windows and tXWindow');
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMWindow.ActivateClient;
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
SetForegroundWindow(Self.TargetHandle);
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
XSetInputFocus(Self.XDisplay,Self.CurWindow,RevertToParent,CurrentTime);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
||||
{$IFDEF MSWINDOWS} //Probably need one for Linux as well
|
||||
function TMWindow.UpdateDrawBitmap :boolean;
|
||||
var
|
||||
w,h : integer;
|
||||
BmpInfo : Windows.TBitmap;
|
||||
begin
|
||||
GetDimensions(w,h);
|
||||
DrawBitmap.SetSize(w,h);
|
||||
GetObject(DrawBitmap.Handle, SizeOf(BmpInfo), @BmpInfo);
|
||||
DrawBmpDataPtr := BmpInfo.bmBits;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TMWindow.GetDimensions(var W, H: Integer);
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
Attrib: TXWindowAttributes;
|
||||
newx,newy : integer;
|
||||
childwindow : x.TWindow;
|
||||
Old_Handler: TXErrorHandler;
|
||||
{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}
|
||||
var
|
||||
Rect : TRect;
|
||||
{$ENDIF}
|
||||
begin
|
||||
case TargetMode of
|
||||
w_Window:
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
GetWindowRect(Self.TargetHandle, Rect);
|
||||
w:= Rect.Right - Rect.left + 1;
|
||||
h:= Rect.Bottom - Rect.Top + 1;
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
if XGetWindowAttributes(Self.XDisplay, Self.CurWindow, @Attrib) <> 0 Then
|
||||
begin
|
||||
XTranslateCoordinates(Self.XDisplay, Self.CurWindow, Self.DesktopWindow, 0,0, @newx, @newy, @childwindow);
|
||||
W := Attrib.Width;
|
||||
H := Attrib.Height;
|
||||
end else
|
||||
begin
|
||||
W := -1;
|
||||
H := -1;
|
||||
end;
|
||||
XSetErrorHandler(Old_Handler);
|
||||
{$ELSE}
|
||||
WriteLn('You dummy! How are you going to use w_XWindow on non Linux systems?');
|
||||
{$ENDIF}
|
||||
end;
|
||||
w_ArrayPtr:
|
||||
begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF LINUX}
|
||||
function TMWindow.SetTarget(XWindow: x.TWindow): integer; overload;
|
||||
var
|
||||
Old_Handler: TXErrorHandler;
|
||||
begin
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
Self.CurWindow := XWindow;
|
||||
Self.TargetMode:= w_XWindow;
|
||||
XSetErrorHandler(Old_Handler);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function TMWindow.SetTarget(Window: THandle; NewType: TTargetWindowMode): integer; overload;
|
||||
begin
|
||||
if NewType in [ w_XWindow, w_ArrayPtr ] then
|
||||
begin
|
||||
// throw exception
|
||||
Exit;
|
||||
end;
|
||||
case NewType of
|
||||
w_Window :
|
||||
begin;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
ReleaseDC(Self.TargetHandle,Self.TargetDC);
|
||||
Self.TargetHandle := Window;
|
||||
Self.TargetDC := GetWindowDC(Window);
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
{$IFDEF MSWINDOWS}
|
||||
UpdateDrawBitmap;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TMWindow.SetTarget(ArrPtr: PRGB32): integer; overload;
|
||||
begin
|
||||
|
||||
Self.TargetMode:= w_ArrayPtr;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
848
project1.lpi
848
project1.lpi
@ -1,440 +1,408 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="7"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="10"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="33">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="1" Y="19"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="48"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="33" Y="57"/>
|
||||
<TopLine Value="32"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="client.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Client"/>
|
||||
<CursorPos X="18" Y="34"/>
|
||||
<TopLine Value="10"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
|
||||
<UnitName Value="CompTypes"/>
|
||||
<CursorPos X="13" Y="531"/>
|
||||
<TopLine Value="523"/>
|
||||
<UsageCount Value="22"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="mufasatypes.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="52" Y="20"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="window.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="4" Y="100"/>
|
||||
<TopLine Value="85"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../Documents/fpc/rtl/inc/systemh.inc"/>
|
||||
<CursorPos X="3" Y="261"/>
|
||||
<TopLine Value="246"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="input.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Input"/>
|
||||
<CursorPos X="5" Y="20"/>
|
||||
<TopLine Value="15"/>
|
||||
<UsageCount Value="47"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compinput.pas"/>
|
||||
<UnitName Value="CompInput"/>
|
||||
<CursorPos X="43" Y="250"/>
|
||||
<TopLine Value="236"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="Units/MMLCore/client.pas"/>
|
||||
<UnitName Value="Client"/>
|
||||
<CursorPos X="27" Y="16"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="Units/MMLCore/input.pas"/>
|
||||
<UnitName Value="Input"/>
|
||||
<CursorPos X="52" Y="241"/>
|
||||
<TopLine Value="234"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="Units/MMLCore/mufasatypes.pas"/>
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="20" Y="3"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="14" Y="329"/>
|
||||
<TopLine Value="185"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="Units/MMLCore/windowutil.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="windowutil"/>
|
||||
<CursorPos X="45" Y="13"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="40"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../Documents/lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="15" Y="1287"/>
|
||||
<TopLine Value="1272"/>
|
||||
<UsageCount Value="17"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compbitmaps.pas"/>
|
||||
<UnitName Value="CompBitmaps"/>
|
||||
<CursorPos X="1" Y="109"/>
|
||||
<TopLine Value="92"/>
|
||||
<UsageCount Value="17"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../Documents/lazarus/lcl/include/rasterimage.inc"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="691"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../Documents/fpc/packages/x11/src/xlib.pp"/>
|
||||
<UnitName Value="xlib"/>
|
||||
<CursorPos X="47" Y="1272"/>
|
||||
<TopLine Value="1257"/>
|
||||
<UsageCount Value="12"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="34" Y="61"/>
|
||||
<TopLine Value="50"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="17"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compcolors.pas"/>
|
||||
<UnitName Value="CompColors"/>
|
||||
<CursorPos X="44" Y="914"/>
|
||||
<TopLine Value="897"/>
|
||||
<UsageCount Value="15"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="../Documents/fpc/packages/x11/src/x.pp"/>
|
||||
<UnitName Value="x"/>
|
||||
<CursorPos X="4" Y="179"/>
|
||||
<TopLine Value="164"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="../Documents/fpc/rtl/unix/aliasctp.inc"/>
|
||||
<CursorPos X="63" Y="45"/>
|
||||
<TopLine Value="30"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compdragger.pas"/>
|
||||
<UnitName Value="CompDragger"/>
|
||||
<CursorPos X="33" Y="14"/>
|
||||
<TopLine Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="../Documents/lazarus/lcl/lcltype.pp"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<CursorPos X="9" Y="99"/>
|
||||
<TopLine Value="83"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="testunit.lfm"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<SyntaxHighlighter Value="LFM"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="../Documents/fpc/rtl/unix/unix.pp"/>
|
||||
<UnitName Value="Unix"/>
|
||||
<CursorPos X="63" Y="63"/>
|
||||
<TopLine Value="56"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compinput.pas"/>
|
||||
<UnitName Value="CompInput"/>
|
||||
<CursorPos X="6" Y="462"/>
|
||||
<TopLine Value="449"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="../FPC/FPCCheckout/rtl/win/wininc/func.inc"/>
|
||||
<CursorPos X="10" Y="663"/>
|
||||
<TopLine Value="635"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<UnitName Value="CompTypes"/>
|
||||
<CursorPos X="13" Y="418"/>
|
||||
<TopLine Value="402"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compcolors.pas"/>
|
||||
<UnitName Value="CompColors"/>
|
||||
<CursorPos X="12" Y="603"/>
|
||||
<TopLine Value="573"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="../lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="15" Y="1283"/>
|
||||
<TopLine Value="1270"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="../lazarus/lcl/include/rasterimage.inc"/>
|
||||
<CursorPos X="20" Y="351"/>
|
||||
<TopLine Value="339"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="../lazarus/lcl/intfgraphics.pas"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<CursorPos X="3" Y="3251"/>
|
||||
<TopLine Value="3245"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit32>
|
||||
</Units>
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<Position1>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<Caret Line="174" Column="9" TopLine="146"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<Caret Line="177" Column="19" TopLine="146"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<Caret Line="324" Column="19" TopLine="296"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compinput.pas"/>
|
||||
<Caret Line="7" Column="140" TopLine="1"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="18" Column="30" TopLine="1"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<Caret Line="11" Column="138" TopLine="6"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="156" Column="10" TopLine="146"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="58" Column="34" TopLine="43"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="28" Column="59" TopLine="1"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="16" Column="60" TopLine="1"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="19" Column="1" TopLine="1"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="50" Column="42" TopLine="35"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="62" Column="32" TopLine="59"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="57" Column="22" TopLine="41"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<Caret Line="5" Column="109" TopLine="1"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="18" Column="27" TopLine="14"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="169" Column="16" TopLine="159"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="170" Column="16" TopLine="159"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="176" Column="14" TopLine="159"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="180" Column="17" TopLine="171"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="181" Column="16" TopLine="171"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="210" Column="16" TopLine="205"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="215" Column="10" TopLine="205"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="225" Column="19" TopLine="215"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="239" Column="19" TopLine="229"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="261" Column="17" TopLine="251"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="68" Column="20" TopLine="53"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compinput.pas"/>
|
||||
<Caret Line="9" Column="20" TopLine="1"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compinput.pas"/>
|
||||
<Caret Line="40" Column="52" TopLine="29"/>
|
||||
</Position29>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)/"/>
|
||||
<OtherUnitFiles Value="$(ProjPath)/Units/MMLCore/"/>
|
||||
</SearchPaths>
|
||||
<Other>
|
||||
<CustomOptions Value="-dUseCThreads"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="7"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="3"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="33">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="1" Y="19"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="48"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="33" Y="57"/>
|
||||
<TopLine Value="32"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="client.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Client"/>
|
||||
<CursorPos X="18" Y="34"/>
|
||||
<TopLine Value="10"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
|
||||
<UnitName Value="CompTypes"/>
|
||||
<CursorPos X="13" Y="531"/>
|
||||
<TopLine Value="523"/>
|
||||
<UsageCount Value="22"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="mufasatypes.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="52" Y="20"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="window.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="4" Y="100"/>
|
||||
<TopLine Value="85"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../Documents/fpc/rtl/inc/systemh.inc"/>
|
||||
<CursorPos X="3" Y="261"/>
|
||||
<TopLine Value="246"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="input.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Input"/>
|
||||
<CursorPos X="5" Y="20"/>
|
||||
<TopLine Value="15"/>
|
||||
<UsageCount Value="47"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compinput.pas"/>
|
||||
<UnitName Value="CompInput"/>
|
||||
<CursorPos X="43" Y="250"/>
|
||||
<TopLine Value="236"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="Units/MMLCore/client.pas"/>
|
||||
<UnitName Value="Client"/>
|
||||
<CursorPos X="27" Y="16"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="Units/MMLCore/input.pas"/>
|
||||
<UnitName Value="Input"/>
|
||||
<CursorPos X="52" Y="241"/>
|
||||
<TopLine Value="222"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="Units/MMLCore/mufasatypes.pas"/>
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="20" Y="3"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="9" Y="370"/>
|
||||
<TopLine Value="353"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="Units/MMLCore/windowutil.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="windowutil"/>
|
||||
<CursorPos X="45" Y="13"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="40"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../Documents/lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="15" Y="1287"/>
|
||||
<TopLine Value="1272"/>
|
||||
<UsageCount Value="17"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compbitmaps.pas"/>
|
||||
<UnitName Value="CompBitmaps"/>
|
||||
<CursorPos X="1" Y="109"/>
|
||||
<TopLine Value="92"/>
|
||||
<UsageCount Value="17"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../Documents/lazarus/lcl/include/rasterimage.inc"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="691"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../Documents/fpc/packages/x11/src/xlib.pp"/>
|
||||
<UnitName Value="xlib"/>
|
||||
<CursorPos X="47" Y="1272"/>
|
||||
<TopLine Value="1257"/>
|
||||
<UsageCount Value="12"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="44" Y="67"/>
|
||||
<TopLine Value="50"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="17"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compcolors.pas"/>
|
||||
<UnitName Value="CompColors"/>
|
||||
<CursorPos X="44" Y="914"/>
|
||||
<TopLine Value="897"/>
|
||||
<UsageCount Value="15"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="../Documents/fpc/packages/x11/src/x.pp"/>
|
||||
<UnitName Value="x"/>
|
||||
<CursorPos X="4" Y="179"/>
|
||||
<TopLine Value="164"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="../Documents/fpc/rtl/unix/aliasctp.inc"/>
|
||||
<CursorPos X="63" Y="45"/>
|
||||
<TopLine Value="30"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../cogat/Units/CogatUnits/compdragger.pas"/>
|
||||
<UnitName Value="CompDragger"/>
|
||||
<CursorPos X="33" Y="14"/>
|
||||
<TopLine Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="../Documents/lazarus/lcl/lcltype.pp"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<CursorPos X="9" Y="99"/>
|
||||
<TopLine Value="83"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="testunit.lfm"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<SyntaxHighlighter Value="LFM"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="../Documents/fpc/rtl/unix/unix.pp"/>
|
||||
<UnitName Value="Unix"/>
|
||||
<CursorPos X="63" Y="63"/>
|
||||
<TopLine Value="56"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compinput.pas"/>
|
||||
<UnitName Value="CompInput"/>
|
||||
<CursorPos X="6" Y="462"/>
|
||||
<TopLine Value="449"/>
|
||||
<UsageCount Value="12"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="../FPC/FPCCheckout/rtl/win/wininc/func.inc"/>
|
||||
<CursorPos X="10" Y="663"/>
|
||||
<TopLine Value="635"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/comptypes.pas"/>
|
||||
<UnitName Value="CompTypes"/>
|
||||
<CursorPos X="13" Y="418"/>
|
||||
<TopLine Value="402"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="../Compilertje/Units/CogatUnits/compcolors.pas"/>
|
||||
<UnitName Value="CompColors"/>
|
||||
<CursorPos X="12" Y="603"/>
|
||||
<TopLine Value="573"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="../lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="15" Y="1283"/>
|
||||
<TopLine Value="1270"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="../lazarus/lcl/include/rasterimage.inc"/>
|
||||
<CursorPos X="20" Y="351"/>
|
||||
<TopLine Value="339"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="../lazarus/lcl/intfgraphics.pas"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<CursorPos X="3" Y="3251"/>
|
||||
<TopLine Value="3245"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit32>
|
||||
</Units>
|
||||
<JumpHistory Count="24" HistoryIndex="23">
|
||||
<Position1>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="18" Column="30" TopLine="1"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="156" Column="10" TopLine="146"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="58" Column="34" TopLine="43"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="28" Column="59" TopLine="1"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="16" Column="60" TopLine="1"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="19" Column="1" TopLine="1"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="50" Column="42" TopLine="35"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="62" Column="32" TopLine="59"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="57" Column="22" TopLine="41"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="18" Column="27" TopLine="14"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="169" Column="16" TopLine="159"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="170" Column="16" TopLine="159"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="176" Column="14" TopLine="159"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="180" Column="17" TopLine="171"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="181" Column="16" TopLine="171"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="210" Column="16" TopLine="205"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="215" Column="10" TopLine="205"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="225" Column="19" TopLine="215"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="239" Column="19" TopLine="229"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="261" Column="17" TopLine="251"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="68" Column="20" TopLine="53"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="329" Column="14" TopLine="298"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="10" Column="10" TopLine="1"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="Units/MMLCore/window.pas"/>
|
||||
<Caret Line="367" Column="46" TopLine="353"/>
|
||||
</Position24>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)/"/>
|
||||
<OtherUnitFiles Value="$(ProjPath)/Units/MMLCore/"/>
|
||||
</SearchPaths>
|
||||
<Other>
|
||||
<CustomOptions Value="-dUseCThreads"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
|
Loading…
Reference in New Issue
Block a user