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