CEF4Delphi/demos/Delphi_VCL/VirtualUIBrowser/uCEFLoader_sp.pas
Salvador Díaz Fau f764c39cc1 Replace the SetPEFlags code
Remove the outdated license text.
Use the main cef.inc file in all Delphi demos.
Fixed issue #493.
2023-11-26 19:28:28 +01:00

40 lines
1.2 KiB
ObjectPascal

unit uCEFLoader_sp;
interface
implementation
uses
uCEFApplicationCore, uCEFTypes, uCEFInterfaces, uCEFConstants, uCEFMiscFunctions,
uVirtualUIBrowserConstants;
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplicationCore.Create;
GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.TouchEvents := STATE_ENABLED;
GlobalCEFApp.EnableGPU := True;
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
// If you need transparency leave the GlobalCEFApp.BackgroundColor property
// with the default value or set the alpha channel to 0
if TRANSPARENT_BROWSER then
GlobalCEFApp.BackgroundColor := CefColorSetARGB($00, $00, $00, $00)
else
GlobalCEFApp.BackgroundColor := CefColorSetARGB($FF, $FF, $FF, $FF);
// This demo uses a different EXE for the subprocesses.
// With this configuration it's not necessary to have the
// GlobalCEFApp.StartMainProcess call in a if..then clause.
GlobalCEFApp.StartSubProcess;
end;
initialization
CreateGlobalCEFApp;
finalization
DestroyGlobalCEFApp;
end.