1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Added TCEFTimerWorkScheduler

- Moved the GlobalCEFWorkScheduler creation after the GlobalCEFApp creation in all demos using it.
- Replaced TCEFWorkScheduler by TCEFTimerWorkScheduler in FMX demos for Linux and MacOS.
- Fixed context menu issue in FMXExternalPumpBrowser2 for Linux
- Fixed stability issues in FMXExternalPumpBrowser for MacOS
- Fixed 32bit build issues in TinyBrowser and ToolBoxBrowser2 demos.
- Added uCEFMacOSInterfaces and uCEFMacOSCustomCocoaTimer.
This commit is contained in:
Salvador Díaz Fau
2021-06-04 15:10:40 +02:00
parent b14abde967
commit 43ab8ef953
67 changed files with 2517 additions and 1406 deletions

View File

@ -50,24 +50,26 @@ interface
uses
System.UITypes,
{$IFDEF MACOS}
FMX.Helpers.Mac, System.Messaging, Macapi.CoreFoundation, Macapi.Foundation,
{$ENDIF}
uCEFMacOSConstants;
{$IFDEF MACOSX}
function KeyToMacOSKeyCode(aKey : Word): integer;
{$IFDEF FMX}
{$ENDIF}
{$IFDEF MACOS}
procedure CopyCEFFramework;
procedure CopyCEFHelpers(const aProjectName : string);
procedure ShowMessageCF(const aHeading, aMessage : string; const aTimeoutInSecs : double = 0);
{$ENDIF}
function NSEventTrackingRunLoopMode: NSString;
{$ENDIF}
implementation
{$IFDEF MACOSX}
{$IFDEF FMX}
{$IFDEF MACOS}
uses
System.SysUtils, System.Types, System.IOUtils, Posix.Stdio, FMX.Types,
Macapi.CoreFoundation,
uCEFMiscFunctions;
const
@ -81,10 +83,10 @@ const
RENDERER_SUBFIX = ' Helper (Renderer)';
{$ENDIF}
{$IFDEF MACOSX}
// Key Code translation following the information found in these documents :
// https://developer.apple.com/library/archive/documentation/mac/pdf/MacintoshToolboxEssentials.pdf
// https://eastmanreference.com/complete-list-of-applescript-key-codes
function KeyToMacOSKeyCode(aKey : Word): integer;
begin
case aKey of
@ -211,8 +213,9 @@ begin
else Result := 0;
end;
end;
{$ENDIF}
{$IFDEF FMX}
{$IFDEF MACOS}
procedure CopyAllFiles(const aSrcPath, aDstPath: string);
var
TempDirectories, TempFiles : TStringDynArray;
@ -383,7 +386,11 @@ begin
CFRelease(TempMessage);
end;
end;
{$ENDIF}
function NSEventTrackingRunLoopMode: NSString;
begin
result := CocoaNSStringConst(libFoundation, 'NSEventTrackingRunLoopMode');
end;
{$ENDIF}
end.