diff --git a/lcl/include/application.inc b/lcl/include/application.inc index 5c3479c4a4..0580dc34fd 100644 --- a/lcl/include/application.inc +++ b/lcl/include/application.inc @@ -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 diff --git a/lcl/include/interfacebase.inc b/lcl/include/interfacebase.inc index 02b668f268..7ce0ba49d8 100644 --- a/lcl/include/interfacebase.inc +++ b/lcl/include/interfacebase.inc @@ -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; diff --git a/lcl/interfacebase.pp b/lcl/interfacebase.pp index c8e9be23f6..8d00a5dd0a 100644 --- a/lcl/interfacebase.pp +++ b/lcl/interfacebase.pp @@ -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; diff --git a/lcl/interfaces/cocoa/cocoaint.pas b/lcl/interfaces/cocoa/cocoaint.pas index 277a7c97db..f581b05622 100644 --- a/lcl/interfaces/cocoa/cocoaint.pas +++ b/lcl/interfaces/cocoa/cocoaint.pas @@ -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; diff --git a/lcl/interfaces/cocoa/cocoaobject.inc b/lcl/interfaces/cocoa/cocoaobject.inc index 9792eecc5a..84a747dff6 100644 --- a/lcl/interfaces/cocoa/cocoaobject.inc +++ b/lcl/interfaces/cocoa/cocoaobject.inc @@ -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;