LCL: fixed compilation

This commit is contained in:
Maxim Ganetsky 2023-08-27 23:25:20 +03:00
parent c39225f011
commit 2464831975
5 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;