mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 11:39:19 +02:00
LCL: fixed compilation
This commit is contained in:
parent
c39225f011
commit
2464831975
@ -417,7 +417,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TApplication.ProcessMessages;
|
||||
var
|
||||
context: TLCLHandle;
|
||||
context: THandle;
|
||||
begin
|
||||
if Self=nil then begin
|
||||
// when the programmer did a mistake, avoid getting strange errors
|
||||
@ -1277,7 +1277,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TApplication.HandleMessage;
|
||||
var
|
||||
context: TLCLHandle;
|
||||
context: THandle;
|
||||
begin
|
||||
context := WidgetSet.BeginMessageProcess;
|
||||
try
|
||||
|
@ -84,12 +84,12 @@ procedure TWidgetSet.AppSetupMainForm(AMainForm: TObject); //e.g. handle widge
|
||||
begin
|
||||
end;
|
||||
|
||||
function TWidgetSet.BeginMessageProcess: TLCLHandle;
|
||||
function TWidgetSet.BeginMessageProcess: THandle;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure TWidgetSet.EndMessageProcess(context: TLCLHandle);
|
||||
procedure TWidgetSet.EndMessageProcess(context: THandle);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
@ -152,8 +152,8 @@ type
|
||||
// resources during message processing.
|
||||
// for example, on Cocoa, it needs to be used to release AutoReleasePool
|
||||
// to avoid resource leaks.
|
||||
function BeginMessageProcess: TLCLHandle; virtual;
|
||||
procedure EndMessageProcess(context: TLCLHandle); virtual;
|
||||
function BeginMessageProcess: THandle; virtual;
|
||||
procedure EndMessageProcess(context: THandle); virtual;
|
||||
|
||||
function LCLPlatform: TLCLPlatform; virtual; abstract;
|
||||
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; virtual;
|
||||
|
@ -201,8 +201,8 @@ type
|
||||
procedure AppSetIcon(const Small, Big: HICON); override;
|
||||
procedure AppSetTitle(const ATitle: string); override;
|
||||
|
||||
function BeginMessageProcess: TLCLHandle; override;
|
||||
procedure EndMessageProcess(context: TLCLHandle); override;
|
||||
function BeginMessageProcess: THandle; override;
|
||||
procedure EndMessageProcess(context: THandle); override;
|
||||
|
||||
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; override;
|
||||
|
||||
|
@ -122,12 +122,12 @@ begin
|
||||
AppRunMessages(true, NSDate.distantFuture);
|
||||
end;
|
||||
|
||||
function TCocoaWidgetSet.BeginMessageProcess: TLCLHandle;
|
||||
function TCocoaWidgetSet.BeginMessageProcess: THandle;
|
||||
begin
|
||||
Result := TLCLHandle(NSAutoreleasePool.alloc.init);
|
||||
Result := THandle(NSAutoreleasePool.alloc.init);
|
||||
end;
|
||||
|
||||
procedure TCocoaWidgetSet.EndMessageProcess(context: TLCLHandle);
|
||||
procedure TCocoaWidgetSet.EndMessageProcess(context: THandle);
|
||||
begin
|
||||
NSAutoreleasePool(context).release;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user