Files
CEF4Delphi/demos/Lazarus_Linux_GTK2/SimpleOSRBrowser/SimpleOSRBrowser.lpr
T

37 lines
904 B
ObjectPascal
Raw Normal View History

2019-12-18 15:10:30 +01:00
program SimpleOSRBrowser;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
2020-12-28 18:11:27 +01:00
// "Interfaces" is a custom unit used to initialize the LCL WidgetSet
// We keep the same name to avoid a Lazarus warning.
2019-12-18 15:10:30 +01:00
Interfaces, // this includes the LCL widgetset
Forms, lazmouseandkeyinput, uSimpleOSRBrowser,
2019-12-18 15:10:30 +01:00
{ you can add units after this }
uCEFApplication;
{$R *.res}
begin
CreateGlobalCEFApp;
if GlobalCEFApp.StartMainProcess then
begin
2020-12-28 18:11:27 +01:00
// The LCL Widgetset must be initialized after the CEF initialization and
// only in the browser process.
CustomWidgetSetInitialization;
2019-12-18 15:10:30 +01:00
RequireDerivedFormResource:=True;
Application.Scaled:=True;
2020-12-28 18:11:27 +01:00
Application.Initialize;
2019-12-18 15:10:30 +01:00
Application.CreateForm(TForm1, Form1);
Application.Run;
2020-12-28 18:11:27 +01:00
CustomWidgetSetFinalization;
2019-12-18 15:10:30 +01:00
end;
DestroyGlobalCEFApp;
end.