unit UMain;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs;
type
TForm3 =
class(TForm)
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form3: TForm3;
implementation uses uCEFFMXWorkScheduler, UCefApplication;
{$R *.fmx}
procedure GlobalCEFApp_OnScheduleMessagePumpWork(
const aDelayMS: int64);
begin
if (GlobalFMXWorkScheduler <>
nil)
then
GlobalFMXWorkScheduler.ScheduleMessagePumpWork(aDelayMS);
end;
procedure CreateGlobalCEFApp;
begin
if assigned(GlobalCEFApp)
then
exit;
GlobalFMXWorkScheduler := TFMXWorkScheduler.Create(
nil);
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnScheduleMessagePumpWork :=
GlobalCEFApp_OnScheduleMessagePumpWork;
GlobalCEFApp.EnableHighDPISupport := true;
GlobalCEFApp.ExternalMessagePump := true;
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.cache := '
cache';
GlobalCEFApp.StartMainProcess;
end;
initialization
CreateGlobalCEFApp;
finalization
if assigned(GlobalFMXWorkScheduler)
then
GlobalFMXWorkScheduler.StopScheduler;
DestroyGlobalCEFApp;
DestroyGlobalFMXWorkScheduler;
end.