mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-16 08:15:55 +01:00
f764c39cc1
Remove the outdated license text. Use the main cef.inc file in all Delphi demos. Fixed issue #493.
40 lines
1.2 KiB
ObjectPascal
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.
|