mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-02-02 10:25:26 +02:00
Update to CEF 3.3202.1690.gcd6b88f
- Update to CEF 3.3202.1690.gcd6b88f - Bug fix #71 - Added the TCEFWorkScheduler class to handle the cef_do_message_loop_work calls when you use an external message pump. - Added 2 demos using the "external message pump" mode. - Added a TakeSnapshot function to the TChromium and TCEFWindowParent to take snapshots in non-OSR mode.
This commit is contained in:
parent
24f5a70f4b
commit
751fe924b7
14
demos/ExternalPumpBrowser/00-DeleteDCUs.bat
Normal file
14
demos/ExternalPumpBrowser/00-DeleteDCUs.bat
Normal file
@ -0,0 +1,14 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
del /s /q *.stat
|
||||
del /s /q *.local
|
||||
del /s /q *.~*
|
||||
rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
93
demos/ExternalPumpBrowser/ExternalPumpBrowser.dpr
Normal file
93
demos/ExternalPumpBrowser/ExternalPumpBrowser.dpr
Normal file
@ -0,0 +1,93 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
program ExternalPumpBrowser;
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
System.SysUtils,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
Windows,
|
||||
SysUtils,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uCEFWorkScheduler,
|
||||
uExternalPumpBrowser in 'uExternalPumpBrowser.pas' {ExternalPumpBrowserFrm};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
|
||||
// If you don't add this flag the rederer process will crash when you try to load large images.
|
||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||
|
||||
begin
|
||||
// TCEFWorkScheduler will call cef_do_message_loop_work when
|
||||
// it's told in the GlobalCEFApp.OnScheduleMessagePumpWork event.
|
||||
// GlobalCEFWorkScheduler needs to be created before the
|
||||
// GlobalCEFApp.StartMainProcess call.
|
||||
GlobalCEFWorkScheduler := TCEFWorkScheduler.Create(nil);
|
||||
|
||||
GlobalCEFApp := TCefApplication.Create;
|
||||
GlobalCEFApp.FlashEnabled := False;
|
||||
GlobalCEFApp.FastUnload := True;
|
||||
GlobalCEFApp.ExternalMessagePump := True;
|
||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
|
||||
|
||||
if GlobalCEFApp.StartMainProcess then
|
||||
begin
|
||||
Application.Initialize;
|
||||
{$IFDEF DELPHI11_UP}
|
||||
Application.MainFormOnTaskbar := True;
|
||||
{$ENDIF}
|
||||
Application.CreateForm(TExternalPumpBrowserFrm, ExternalPumpBrowserFrm);
|
||||
Application.Run;
|
||||
|
||||
// The form needs to be destroyed *BEFORE* stopping the scheduler.
|
||||
ExternalPumpBrowserFrm.Free;
|
||||
|
||||
GlobalCEFWorkScheduler.StopScheduler;
|
||||
end;
|
||||
|
||||
FreeAndNil(GlobalCEFApp);
|
||||
FreeAndNil(GlobalCEFWorkScheduler);
|
||||
end.
|
597
demos/ExternalPumpBrowser/ExternalPumpBrowser.dproj
Normal file
597
demos/ExternalPumpBrowser/ExternalPumpBrowser.dproj
Normal file
@ -0,0 +1,597 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{55E00327-9D98-4DA3-A4E1-844942A01C6B}</ProjectGuid>
|
||||
<ProjectVersion>18.2</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<MainSource>ExternalPumpBrowser.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Locale>3082</VerInfo_Locale>
|
||||
<SanitizedProjectName>ExternalPumpBrowser</SanitizedProjectName>
|
||||
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;Componentes;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;Componentes_Int;CEF4Delphi;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;Componentes_UI;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Componentes_Misc;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;Componentes_RTF;DBXInformixDriver;bindcompvcl;frxDB23;Componentes_vCard;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;frx23;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;bindcompvcl;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="uExternalPumpBrowser.pas">
|
||||
<Form>ExternalPumpBrowserFrm</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Application</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">ExternalPumpBrowser.dpr</Source>
|
||||
</Source>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclIPIndyImpl250.bpl">IP Abstraction Indy Implementation Design Time</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="Win32\Debug\SimpleBrowser.exe" Configuration="Debug" Class="ProjectOutput"/>
|
||||
<DeployFile LocalName="..\..\bin\ExternalPumpBrowser.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>ExternalPumpBrowser.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidClassesDexFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidGDBServer">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashImageDef">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStyles">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_DefaultAppIcon">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon144">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon48">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon72">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon96">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage426">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage470">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage640">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage960">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyFramework">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.framework</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyModule">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.dll;.bpl</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="DependencyPackage">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.bpl</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="File">
|
||||
<Platform Name="Android">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1024">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1536">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch2048">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch768">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch320">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640x1136">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectAndroidManifest">
|
||||
<Platform Name="Android">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceResourceRules">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSEntitlements">
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSInfoPList">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSResource">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXEntitlements">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>..\</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXInfoPList">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXResource">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="ProjectOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Linux64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectUWPManifest">
|
||||
<Platform Name="Win32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="UWP_DelphiLogo150">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="UWP_DelphiLogo44">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
</Deployment>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||
</Project>
|
384
demos/ExternalPumpBrowser/cef.inc
Normal file
384
demos/ExternalPumpBrowser/cef.inc
Normal file
@ -0,0 +1,384 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
// The complete list of compiler versions is here :
|
||||
// http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Compiler_Versions
|
||||
|
||||
{$DEFINE DELPHI_VERSION_UNKNOW}
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$DEFINE CEF_MULTI_THREADED_MESSAGE_LOOP}
|
||||
{$DEFINE SUPPORTS_INLINE}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 5
|
||||
{$IFDEF VER130}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 6
|
||||
{$IFDEF VER140}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 7
|
||||
{$IFDEF VER150}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 8
|
||||
{$IFDEF VER160}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2005
|
||||
{$IFDEF VER170}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF VER180}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
// Delphi 2007
|
||||
{$IFDEF VER185}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
// Delphi 2006
|
||||
{$ELSE}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2009
|
||||
{$IFDEF VER200}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$ENDIF}
|
||||
|
||||
//Delphi 2010
|
||||
{$IFDEF VER210}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE
|
||||
{$IFDEF VER220}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE2
|
||||
{$IFDEF VER230}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE3
|
||||
{$IFDEF VER240}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE4
|
||||
{$IFDEF VER250}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE5
|
||||
{$IFDEF VER260}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE6
|
||||
{$IFDEF VER270}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE7
|
||||
{$IFDEF VER280}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE8
|
||||
{$IFDEF VER290}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$ENDIF VER290}
|
||||
|
||||
// Rad Studio 10 - Delphi Seattle
|
||||
{$IFDEF VER300}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Rad Studio 10.1 - Delphi Berlin
|
||||
{$IFDEF VER310}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$DEFINE DELPHI24_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Rad Studio 10.2 - Delphi Tokyo
|
||||
{$IFDEF VER320}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$DEFINE DELPHI24_UP}
|
||||
{$DEFINE DELPHI25_UP}
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
{$IFDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$DEFINE DELPHI24_UP}
|
||||
{$DEFINE DELPHI25_UP}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI9_UP}
|
||||
{$DEFINE SUPPORTS_INLINE}
|
||||
{$ENDIF}
|
||||
|
102
demos/ExternalPumpBrowser/uExternalPumpBrowser.dfm
Normal file
102
demos/ExternalPumpBrowser/uExternalPumpBrowser.dfm
Normal file
@ -0,0 +1,102 @@
|
||||
object ExternalPumpBrowserFrm: TExternalPumpBrowserFrm
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Initializing browser. Please wait...'
|
||||
ClientHeight = 624
|
||||
ClientWidth = 1038
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object AddressPnl: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1038
|
||||
Height = 30
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Enabled = False
|
||||
Padding.Left = 5
|
||||
Padding.Top = 5
|
||||
Padding.Right = 5
|
||||
Padding.Bottom = 5
|
||||
ShowCaption = False
|
||||
TabOrder = 0
|
||||
object GoBtn: TButton
|
||||
Left = 1002
|
||||
Top = 5
|
||||
Width = 31
|
||||
Height = 20
|
||||
Margins.Left = 5
|
||||
Align = alRight
|
||||
Caption = 'Go'
|
||||
TabOrder = 0
|
||||
OnClick = GoBtnClick
|
||||
end
|
||||
object URLCbx: TComboBox
|
||||
Left = 5
|
||||
Top = 5
|
||||
Width = 997
|
||||
Height = 21
|
||||
Align = alClient
|
||||
ItemIndex = 0
|
||||
TabOrder = 1
|
||||
Text = 'https://www.google.com'
|
||||
Items.Strings = (
|
||||
'https://www.google.com'
|
||||
|
||||
'https://www.whatismybrowser.com/detect/what-http-headers-is-my-b' +
|
||||
'rowser-sending'
|
||||
'https://www.w3schools.com/js/tryit.asp?filename=tryjs_win_close'
|
||||
'https://www.w3schools.com/html/html5_video.asp'
|
||||
'http://www.adobe.com/software/flash/about/'
|
||||
'http://isflashinstalled.com/'
|
||||
'chrome://version/'
|
||||
'http://html5test.com/'
|
||||
'https://www.w3schools.com/'
|
||||
'http://webglsamples.org/'
|
||||
'https://get.webgl.org/'
|
||||
'https://www.youtube.com'
|
||||
'https://html5demos.com/drag/'
|
||||
|
||||
'https://developers.google.com/maps/documentation/javascript/exam' +
|
||||
'ples/streetview-embed?hl=fr'
|
||||
|
||||
'https://www.w3schools.com/Tags/tryit.asp?filename=tryhtml_iframe' +
|
||||
'_name'
|
||||
'https://www.browserleaks.com/webrtc'
|
||||
'https://frames-per-second.appspot.com/')
|
||||
end
|
||||
end
|
||||
object CEFWindowParent1: TCEFWindowParent
|
||||
Left = 0
|
||||
Top = 30
|
||||
Width = 1038
|
||||
Height = 594
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
end
|
||||
object Timer1: TTimer
|
||||
Enabled = False
|
||||
Interval = 300
|
||||
OnTimer = Timer1Timer
|
||||
Left = 56
|
||||
Top = 88
|
||||
end
|
||||
object Chromium1: TChromium
|
||||
OnAfterCreated = Chromium1AfterCreated
|
||||
OnBeforeClose = Chromium1BeforeClose
|
||||
OnClose = Chromium1Close
|
||||
Left = 56
|
||||
Top = 152
|
||||
end
|
||||
end
|
187
demos/ExternalPumpBrowser/uExternalPumpBrowser.pas
Normal file
187
demos/ExternalPumpBrowser/uExternalPumpBrowser.pas
Normal file
@ -0,0 +1,187 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
unit uExternalPumpBrowser;
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,
|
||||
{$ELSE}
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics,
|
||||
Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
|
||||
{$ENDIF}
|
||||
uCEFChromium, uCEFWindowParent, uCEFTypes, uCEFConstants, uCEFInterfaces, uCEFWorkScheduler;
|
||||
|
||||
type
|
||||
TExternalPumpBrowserFrm = class(TForm)
|
||||
AddressPnl: TPanel;
|
||||
GoBtn: TButton;
|
||||
Timer1: TTimer;
|
||||
CEFWindowParent1: TCEFWindowParent;
|
||||
Chromium1: TChromium;
|
||||
URLCbx: TComboBox;
|
||||
|
||||
procedure GoBtnClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
|
||||
procedure Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
|
||||
private
|
||||
FCanClose : boolean;
|
||||
FClosing : boolean;
|
||||
|
||||
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEF_AFTERCREATED;
|
||||
procedure BrowserDestroyMsg(var aMessage : TMessage); message CEF_DESTROY;
|
||||
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
ExternalPumpBrowserFrm : TExternalPumpBrowserFrm;
|
||||
GlobalCEFWorkScheduler : TCEFWorkScheduler = nil;
|
||||
|
||||
procedure GlobalCEFApp_OnScheduleMessagePumpWork(const aDelayMS : int64);
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
// This demo has a simple browser with a TChromium + TCEFWindowParent combination
|
||||
// It was necessary to destroy the browser following the destruction sequence described in the MDIBrowser demo.
|
||||
|
||||
procedure GlobalCEFApp_OnScheduleMessagePumpWork(const aDelayMS : int64);
|
||||
begin
|
||||
if (GlobalCEFWorkScheduler <> nil) then GlobalCEFWorkScheduler.ScheduleMessagePumpWork(aDelayMS);
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := False;
|
||||
FClosing := False;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
CanClose := FCanClose;
|
||||
|
||||
if not(FClosing) and AddressPnl.Enabled then
|
||||
begin
|
||||
Visible := False;
|
||||
FClosing := True;
|
||||
AddressPnl.Enabled := False;
|
||||
Chromium1.CloseBrowser(True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
// GlobalCEFApp.GlobalContextInitialized has to be TRUE before creating any browser
|
||||
// If it's not initialized yet, we use a simple timer to create the browser later.
|
||||
if not(Chromium1.CreateBrowser(CEFWindowParent1, '')) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.Chromium1Close(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||
begin
|
||||
PostMessage(Handle, CEF_DESTROY, 0, 0);
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.BrowserCreatedMsg(var aMessage : TMessage);
|
||||
begin
|
||||
Caption := 'External Pump Browser';
|
||||
CEFWindowParent1.UpdateSize;
|
||||
AddressPnl.Enabled := True;
|
||||
GoBtn.Click;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.BrowserDestroyMsg(var aMessage : TMessage);
|
||||
begin
|
||||
CEFWindowParent1.Free;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.GoBtnClick(Sender: TObject);
|
||||
begin
|
||||
Chromium1.LoadURL(URLCbx.Text);
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
Timer1.Enabled := False;
|
||||
if not(Chromium1.CreateBrowser(CEFWindowParent1, '')) and not(Chromium1.Initialized) then
|
||||
Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.WMMove(var aMessage : TWMMove);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (Chromium1 <> nil) then Chromium1.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TExternalPumpBrowserFrm.WMMoving(var aMessage : TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (Chromium1 <> nil) then Chromium1.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
end.
|
@ -137,13 +137,13 @@
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="JSExtension.exe" Configuration="Debug" Class="ProjectOutput"/>
|
||||
<DeployFile LocalName="..\..\..\bin\JSExtensionWithObjectParameter.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>JSExtensionWithObjectParameter.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="JSExtension.exe" Configuration="Debug" Class="ProjectOutput"/>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
|
@ -56,6 +56,7 @@ uses
|
||||
|
||||
begin
|
||||
GlobalCEFApp := TCefApplication.Create;
|
||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||
GlobalCEFApp.FlashEnabled := False;
|
||||
GlobalCEFApp.FastUnload := True; // Enable the fast unload controller, which speeds up tab/window close by running a tab's onunload js handler independently of the GUI
|
||||
|
||||
|
@ -44,11 +44,9 @@ uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
System.SysUtils,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
Windows,
|
||||
SysUtils,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uMiniBrowser in 'uMiniBrowser.pas' {MiniBrowserFrm},
|
||||
|
@ -5,7 +5,7 @@
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<MainSource>MiniBrowser.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
@ -122,6 +122,7 @@
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
|
@ -148,7 +148,8 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
|
||||
'https://www.w3schools.com/Tags/tryit.asp?filename=tryhtml_iframe' +
|
||||
'_name'
|
||||
'https://www.browserleaks.com/webrtc')
|
||||
'https://www.browserleaks.com/webrtc'
|
||||
'https://frames-per-second.appspot.com/')
|
||||
end
|
||||
end
|
||||
object ConfigPnl: TPanel
|
||||
|
@ -61,6 +61,7 @@ const
|
||||
MINIBROWSER_COPYFRAMENAMES = WM_APP + $106;
|
||||
MINIBROWSER_SAVEPREFERENCES = WM_APP + $107;
|
||||
MINIBROWSER_COPYALLTEXT = WM_APP + $108;
|
||||
MINIBROWSER_TAKESNAPSHOT = WM_APP + $109;
|
||||
|
||||
MINIBROWSER_HOMEPAGE = 'https://www.google.com';
|
||||
|
||||
@ -74,6 +75,7 @@ const
|
||||
MINIBROWSER_CONTEXTMENU_COPYFRAMENAMES = MENU_ID_USER_FIRST + 8;
|
||||
MINIBROWSER_CONTEXTMENU_SAVEPREFERENCES = MENU_ID_USER_FIRST + 9;
|
||||
MINIBROWSER_CONTEXTMENU_COPYALLTEXT = MENU_ID_USER_FIRST + 10;
|
||||
MINIBROWSER_CONTEXTMENU_TAKESNAPSHOT = MENU_ID_USER_FIRST + 11;
|
||||
|
||||
type
|
||||
TMiniBrowserFrm = class(TForm)
|
||||
@ -199,6 +201,7 @@ type
|
||||
procedure CopyFramesNamesMsg(var aMessage : TMessage); message MINIBROWSER_COPYFRAMENAMES;
|
||||
procedure ShowResponseMsg(var aMessage : TMessage); message MINIBROWSER_SHOWRESPONSE;
|
||||
procedure SavePreferencesMsg(var aMessage : TMessage); message MINIBROWSER_SAVEPREFERENCES;
|
||||
procedure TakeSnapshotMsg(var aMessage : TMessage); message MINIBROWSER_TAKESNAPSHOT;
|
||||
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
|
||||
|
||||
@ -265,6 +268,8 @@ procedure TMiniBrowserFrm.Chromium1BeforeContextMenu(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const params: ICefContextMenuParams; const model: ICefMenuModel);
|
||||
begin
|
||||
model.AddSeparator;
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_TAKESNAPSHOT, 'Take snapshot...');
|
||||
model.AddSeparator;
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_COPYALLTEXT, 'Copy displayed text to clipboard');
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_COPYHTML, 'Copy HTML to clipboard');
|
||||
@ -368,6 +373,9 @@ begin
|
||||
MINIBROWSER_CONTEXTMENU_SAVEPREFERENCES :
|
||||
PostMessage(Handle, MINIBROWSER_SAVEPREFERENCES, 0, 0);
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_TAKESNAPSHOT :
|
||||
PostMessage(Handle, MINIBROWSER_TAKESNAPSHOT, 0, 0);
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_JSWRITEDOC :
|
||||
if (browser <> nil) and (browser.MainFrame <> nil) then
|
||||
browser.MainFrame.ExecuteJavaScript(
|
||||
@ -780,6 +788,25 @@ begin
|
||||
Chromium1.SavePreferences(SaveDialog1.FileName);
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.TakeSnapshotMsg(var aMessage : TMessage);
|
||||
var
|
||||
TempBitmap : TBitmap;
|
||||
begin
|
||||
TempBitmap := nil;
|
||||
|
||||
try
|
||||
SaveDialog1.DefaultExt := 'bmp';
|
||||
SaveDialog1.Filter := 'Bitmap files (*.bmp)|*.BMP';
|
||||
|
||||
if SaveDialog1.Execute and
|
||||
(length(SaveDialog1.FileName) > 0) and
|
||||
Chromium1.TakeSnapshot(TempBitmap) then
|
||||
TempBitmap.SaveToFile(SaveDialog1.FileName);
|
||||
finally
|
||||
if (TempBitmap <> nil) then FreeAndNil(TempBitmap);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.WMMove(var aMessage : TWMMove);
|
||||
begin
|
||||
inherited;
|
||||
|
14
demos/OSRExternalPumpBrowser/00-DeleteDCUs.bat
Normal file
14
demos/OSRExternalPumpBrowser/00-DeleteDCUs.bat
Normal file
@ -0,0 +1,14 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
del /s /q *.stat
|
||||
del /s /q *.local
|
||||
del /s /q *.~*
|
||||
rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
93
demos/OSRExternalPumpBrowser/OSRExternalPumpBrowser.dpr
Normal file
93
demos/OSRExternalPumpBrowser/OSRExternalPumpBrowser.dpr
Normal file
@ -0,0 +1,93 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
program OSRExternalPumpBrowser;
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
System.SysUtils,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
Windows,
|
||||
SysUtils,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uCEFWorkScheduler,
|
||||
uOSRExternalPumpBrowser in 'uOSRExternalPumpBrowser.pas' {OSRExternalPumpBrowserFrm};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
|
||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||
|
||||
begin
|
||||
// TCEFWorkScheduler will call cef_do_message_loop_work when
|
||||
// it's told in the GlobalCEFApp.OnScheduleMessagePumpWork event.
|
||||
// GlobalCEFWorkScheduler needs to be created before the
|
||||
// GlobalCEFApp.StartMainProcess call.
|
||||
GlobalCEFWorkScheduler := TCEFWorkScheduler.Create(nil);
|
||||
|
||||
GlobalCEFApp := TCefApplication.Create;
|
||||
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
||||
GlobalCEFApp.EnableHighDPISupport := True;
|
||||
GlobalCEFApp.FastUnload := True;
|
||||
GlobalCEFApp.FlashEnabled := False;
|
||||
GlobalCEFApp.ExternalMessagePump := True;
|
||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
|
||||
|
||||
if GlobalCEFApp.StartMainProcess then
|
||||
begin
|
||||
Application.Initialize;
|
||||
{$IFDEF DELPHI11_UP}
|
||||
Application.MainFormOnTaskbar := True;
|
||||
{$ENDIF}
|
||||
Application.CreateForm(TOSRExternalPumpBrowserFrm, OSRExternalPumpBrowserFrm);
|
||||
Application.Run;
|
||||
|
||||
// Unlike the ExternalPumpBrowser, in OSR mode we don't need to destroy the
|
||||
// form before stopping the scheduler.
|
||||
GlobalCEFWorkScheduler.StopScheduler;
|
||||
end;
|
||||
|
||||
FreeAndNil(GlobalCEFApp);
|
||||
FreeAndNil(GlobalCEFWorkScheduler);
|
||||
end.
|
571
demos/OSRExternalPumpBrowser/OSRExternalPumpBrowser.dproj
Normal file
571
demos/OSRExternalPumpBrowser/OSRExternalPumpBrowser.dproj
Normal file
@ -0,0 +1,571 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{7DC52040-59FF-4430-BF65-3A852AB5A6C0}</ProjectGuid>
|
||||
<ProjectVersion>18.2</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<MainSource>OSRExternalPumpBrowser.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<VerInfo_Locale>3082</VerInfo_Locale>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
|
||||
<SanitizedProjectName>OSRExternalPumpBrowser</SanitizedProjectName>
|
||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;Componentes;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;Componentes_Int;CEF4Delphi;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;Componentes_UI;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Componentes_Misc;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;Componentes_RTF;DBXInformixDriver;bindcompvcl;frxDB23;Componentes_vCard;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;frx23;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;bindcompvcl;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
|
||||
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="uOSRExternalPumpBrowser.pas">
|
||||
<Form>OSRExternalPumpBrowserFrm</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Application</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">OSRExternalPumpBrowser.dpr</Source>
|
||||
</Source>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclIPIndyImpl250.bpl">IP Abstraction Indy Implementation Design Time</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="..\..\bin\OSRExternalPumpBrowser.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>OSRExternalPumpBrowser.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="Win32\Debug\SimpleOSRBrowser.exe" Configuration="Debug" Class="ProjectOutput"/>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidClassesDexFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidGDBServer">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashImageDef">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStyles">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_DefaultAppIcon">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon144">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon48">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon72">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon96">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage426">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage470">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage640">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage960">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyFramework">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.framework</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyModule">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.dll;.bpl</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="DependencyPackage">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.bpl</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="File">
|
||||
<Platform Name="Android">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1024">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1536">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch2048">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch768">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch320">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640x1136">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectAndroidManifest">
|
||||
<Platform Name="Android">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceResourceRules">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSEntitlements">
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSInfoPList">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSResource">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXEntitlements">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>..\</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXInfoPList">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXResource">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="ProjectOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Linux64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectUWPManifest">
|
||||
<Platform Name="Win32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="UWP_DelphiLogo150">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="UWP_DelphiLogo44">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win64">
|
||||
<RemoteDir>Assets</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
</Deployment>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||
</Project>
|
384
demos/OSRExternalPumpBrowser/cef.inc
Normal file
384
demos/OSRExternalPumpBrowser/cef.inc
Normal file
@ -0,0 +1,384 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
// The complete list of compiler versions is here :
|
||||
// http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Compiler_Versions
|
||||
|
||||
{$DEFINE DELPHI_VERSION_UNKNOW}
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$DEFINE CEF_MULTI_THREADED_MESSAGE_LOOP}
|
||||
{$DEFINE SUPPORTS_INLINE}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 5
|
||||
{$IFDEF VER130}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 6
|
||||
{$IFDEF VER140}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 7
|
||||
{$IFDEF VER150}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 8
|
||||
{$IFDEF VER160}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2005
|
||||
{$IFDEF VER170}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF VER180}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
// Delphi 2007
|
||||
{$IFDEF VER185}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
// Delphi 2006
|
||||
{$ELSE}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi 2009
|
||||
{$IFDEF VER200}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$ENDIF}
|
||||
|
||||
//Delphi 2010
|
||||
{$IFDEF VER210}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE
|
||||
{$IFDEF VER220}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE2
|
||||
{$IFDEF VER230}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE3
|
||||
{$IFDEF VER240}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE4
|
||||
{$IFDEF VER250}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE5
|
||||
{$IFDEF VER260}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE6
|
||||
{$IFDEF VER270}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE7
|
||||
{$IFDEF VER280}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Delphi XE8
|
||||
{$IFDEF VER290}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$ENDIF VER290}
|
||||
|
||||
// Rad Studio 10 - Delphi Seattle
|
||||
{$IFDEF VER300}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Rad Studio 10.1 - Delphi Berlin
|
||||
{$IFDEF VER310}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$DEFINE DELPHI24_UP}
|
||||
{$ENDIF}
|
||||
|
||||
// Rad Studio 10.2 - Delphi Tokyo
|
||||
{$IFDEF VER320}
|
||||
{$UNDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$DEFINE DELPHI24_UP}
|
||||
{$DEFINE DELPHI25_UP}
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
{$IFDEF DELPHI_VERSION_UNKNOW}
|
||||
{$DEFINE DELPHI5_UP}
|
||||
{$DEFINE DELPHI6_UP}
|
||||
{$DEFINE DELPHI7_UP}
|
||||
{$DEFINE DELPHI8_UP}
|
||||
{$DEFINE DELPHI9_UP}
|
||||
{$DEFINE DELPHI10_UP}
|
||||
{$DEFINE DELPHI11_UP}
|
||||
{$DEFINE DELPHI12_UP}
|
||||
{$DEFINE DELPHI14_UP}
|
||||
{$DEFINE DELPHI15_UP}
|
||||
{$DEFINE DELPHI16_UP}
|
||||
{$DEFINE DELPHI17_UP}
|
||||
{$DEFINE DELPHI18_UP}
|
||||
{$DEFINE DELPHI19_UP}
|
||||
{$DEFINE DELPHI20_UP}
|
||||
{$DEFINE DELPHI21_UP}
|
||||
{$DEFINE DELPHI22_UP}
|
||||
{$DEFINE DELPHI23_UP}
|
||||
{$DEFINE DELPHI24_UP}
|
||||
{$DEFINE DELPHI25_UP}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DELPHI9_UP}
|
||||
{$DEFINE SUPPORTS_INLINE}
|
||||
{$ENDIF}
|
||||
|
157
demos/OSRExternalPumpBrowser/uOSRExternalPumpBrowser.dfm
Normal file
157
demos/OSRExternalPumpBrowser/uOSRExternalPumpBrowser.dfm
Normal file
@ -0,0 +1,157 @@
|
||||
object OSRExternalPumpBrowserFrm: TOSRExternalPumpBrowserFrm
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Initializing browser. Please wait...'
|
||||
ClientHeight = 584
|
||||
ClientWidth = 913
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnHide = FormHide
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object NavControlPnl: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 913
|
||||
Height = 30
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Enabled = False
|
||||
Padding.Left = 5
|
||||
Padding.Top = 5
|
||||
Padding.Right = 5
|
||||
Padding.Bottom = 5
|
||||
ShowCaption = False
|
||||
TabOrder = 0
|
||||
object ComboBox1: TComboBox
|
||||
Left = 5
|
||||
Top = 5
|
||||
Width = 834
|
||||
Height = 21
|
||||
Align = alClient
|
||||
ItemIndex = 0
|
||||
TabOrder = 0
|
||||
Text = 'https://www.google.com'
|
||||
OnEnter = ComboBox1Enter
|
||||
Items.Strings = (
|
||||
'https://www.google.com'
|
||||
'https://html5demos.com/drag'
|
||||
|
||||
'https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_selec' +
|
||||
't_form'
|
||||
'https://www.briskbard.com'
|
||||
'https://frames-per-second.appspot.com/'
|
||||
'https://www.youtube.com')
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 839
|
||||
Top = 5
|
||||
Width = 69
|
||||
Height = 20
|
||||
Margins.Left = 2
|
||||
Margins.Top = 2
|
||||
Margins.Right = 2
|
||||
Margins.Bottom = 2
|
||||
Align = alRight
|
||||
BevelOuter = bvNone
|
||||
Padding.Left = 4
|
||||
ShowCaption = False
|
||||
TabOrder = 1
|
||||
object GoBtn: TButton
|
||||
Left = 4
|
||||
Top = 0
|
||||
Width = 31
|
||||
Height = 20
|
||||
Margins.Left = 5
|
||||
Align = alLeft
|
||||
Caption = 'Go'
|
||||
TabOrder = 0
|
||||
OnClick = GoBtnClick
|
||||
OnEnter = GoBtnEnter
|
||||
end
|
||||
object SnapshotBtn: TButton
|
||||
Left = 38
|
||||
Top = 0
|
||||
Width = 31
|
||||
Height = 20
|
||||
Hint = 'Take snapshot'
|
||||
Margins.Left = 5
|
||||
Align = alRight
|
||||
Caption = #181
|
||||
Font.Charset = SYMBOL_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = 'Webdings'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
OnClick = SnapshotBtnClick
|
||||
OnEnter = SnapshotBtnEnter
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel1: TBufferPanel
|
||||
Left = 0
|
||||
Top = 30
|
||||
Width = 913
|
||||
Height = 554
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
OnClick = Panel1Click
|
||||
OnEnter = Panel1Enter
|
||||
OnExit = Panel1Exit
|
||||
OnMouseDown = Panel1MouseDown
|
||||
OnMouseMove = Panel1MouseMove
|
||||
OnMouseUp = Panel1MouseUp
|
||||
OnResize = Panel1Resize
|
||||
OnMouseLeave = Panel1MouseLeave
|
||||
end
|
||||
object chrmosr: TChromium
|
||||
OnAfterCreated = chrmosrAfterCreated
|
||||
OnBeforeClose = chrmosrBeforeClose
|
||||
OnClose = chrmosrClose
|
||||
OnGetViewRect = chrmosrGetViewRect
|
||||
OnGetScreenPoint = chrmosrGetScreenPoint
|
||||
OnGetScreenInfo = chrmosrGetScreenInfo
|
||||
OnPopupShow = chrmosrPopupShow
|
||||
OnPopupSize = chrmosrPopupSize
|
||||
OnPaint = chrmosrPaint
|
||||
OnCursorChange = chrmosrCursorChange
|
||||
Left = 24
|
||||
Top = 56
|
||||
end
|
||||
object AppEvents: TApplicationEvents
|
||||
OnMessage = AppEventsMessage
|
||||
Left = 24
|
||||
Top = 128
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
DefaultExt = 'bmp'
|
||||
Filter = 'Bitmap files (*.bmp)|*.BMP'
|
||||
Title = 'Save snapshot'
|
||||
Left = 24
|
||||
Top = 278
|
||||
end
|
||||
object Timer1: TTimer
|
||||
Enabled = False
|
||||
Interval = 300
|
||||
OnTimer = Timer1Timer
|
||||
Left = 24
|
||||
Top = 206
|
||||
end
|
||||
end
|
778
demos/OSRExternalPumpBrowser/uOSRExternalPumpBrowser.pas
Normal file
778
demos/OSRExternalPumpBrowser/uOSRExternalPumpBrowser.pas
Normal file
@ -0,0 +1,778 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
unit uOSRExternalPumpBrowser;
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
|
||||
System.SyncObjs, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
|
||||
Vcl.ExtCtrls, Vcl.AppEvnts,
|
||||
{$ELSE}
|
||||
Windows, Messages, SysUtils, Variants, Classes, SyncObjs,
|
||||
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, AppEvnts,
|
||||
{$ENDIF}
|
||||
uCEFChromium, uCEFTypes, uCEFInterfaces, uCEFConstants, uBufferPanel, uCEFWorkScheduler;
|
||||
|
||||
type
|
||||
TOSRExternalPumpBrowserFrm = class(TForm)
|
||||
NavControlPnl: TPanel;
|
||||
chrmosr: TChromium;
|
||||
AppEvents: TApplicationEvents;
|
||||
ComboBox1: TComboBox;
|
||||
Panel2: TPanel;
|
||||
GoBtn: TButton;
|
||||
SnapshotBtn: TButton;
|
||||
SaveDialog1: TSaveDialog;
|
||||
Timer1: TTimer;
|
||||
Panel1: TBufferPanel;
|
||||
|
||||
procedure AppEventsMessage(var Msg: tagMSG; var Handled: Boolean);
|
||||
|
||||
procedure GoBtnClick(Sender: TObject);
|
||||
procedure GoBtnEnter(Sender: TObject);
|
||||
|
||||
procedure Panel1Enter(Sender: TObject);
|
||||
procedure Panel1Exit(Sender: TObject);
|
||||
procedure Panel1Resize(Sender: TObject);
|
||||
procedure Panel1Click(Sender: TObject);
|
||||
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Panel1MouseLeave(Sender: TObject);
|
||||
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormHide(Sender: TObject);
|
||||
procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, NewDPI: Integer);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
|
||||
procedure chrmosrPaint(Sender: TObject; const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
|
||||
procedure chrmosrCursorChange(Sender: TObject; const browser: ICefBrowser; cursor: HICON; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo);
|
||||
procedure chrmosrGetViewRect(Sender: TObject; const browser: ICefBrowser; var rect: TCefRect; out Result: Boolean);
|
||||
procedure chrmosrGetScreenPoint(Sender: TObject; const browser: ICefBrowser; viewX, viewY: Integer; var screenX, screenY: Integer; out Result: Boolean);
|
||||
procedure chrmosrGetScreenInfo(Sender: TObject; const browser: ICefBrowser; var screenInfo: TCefScreenInfo; out Result: Boolean);
|
||||
procedure chrmosrPopupShow(Sender: TObject; const browser: ICefBrowser; show: Boolean);
|
||||
procedure chrmosrPopupSize(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect);
|
||||
procedure chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure chrmosrClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||
procedure chrmosrBeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
|
||||
procedure SnapshotBtnClick(Sender: TObject);
|
||||
procedure SnapshotBtnEnter(Sender: TObject);
|
||||
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
procedure ComboBox1Enter(Sender: TObject);
|
||||
|
||||
protected
|
||||
FPopUpBitmap : TBitmap;
|
||||
FPopUpRect : TRect;
|
||||
FShowPopUp : boolean;
|
||||
FResizing : boolean;
|
||||
FPendingResize : boolean;
|
||||
FCanClose : boolean;
|
||||
FClosing : boolean;
|
||||
FResizeCS : TCriticalSection;
|
||||
|
||||
function getModifiers(Shift: TShiftState): TCefEventFlags;
|
||||
function GetButton(Button: TMouseButton): TCefMouseButtonType;
|
||||
procedure DoResize;
|
||||
|
||||
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
|
||||
procedure WMCaptureChanged(var aMessage : TMessage); message WM_CAPTURECHANGED;
|
||||
procedure WMCancelMode(var aMessage : TMessage); message WM_CANCELMODE;
|
||||
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEF_AFTERCREATED;
|
||||
procedure PendingResizeMsg(var aMessage : TMessage); message CEF_PENDINGRESIZE;
|
||||
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
OSRExternalPumpBrowserFrm : TOSRExternalPumpBrowserFrm;
|
||||
GlobalCEFWorkScheduler : TCEFWorkScheduler = nil;
|
||||
|
||||
// This is a simple browser in OSR mode (off-screen rendering).
|
||||
// It was necessary to destroy the browser following the destruction sequence described in
|
||||
// the MDIBrowser demo but in OSR mode there are some modifications.
|
||||
|
||||
// This is the destruction sequence in OSR mode :
|
||||
// 1- FormCloseQuery sets CanClose to the initial FCanClose value (False) and calls chrmosr.CloseBrowser(True).
|
||||
// 2- chrmosr.CloseBrowser(True) will trigger chrmosr.OnClose and we have to
|
||||
// set "Result" to false and CEF3 will destroy the internal browser immediately.
|
||||
// 3- chrmosr.OnBeforeClose is triggered because the internal browser was destroyed.
|
||||
// Now we set FCanClose to True and send WM_CLOSE to the form.
|
||||
|
||||
procedure GlobalCEFApp_OnScheduleMessagePumpWork(const aDelayMS : int64);
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
System.Math,
|
||||
{$ELSE}
|
||||
Math,
|
||||
{$ENDIF}
|
||||
uCEFMiscFunctions, uCEFApplication;
|
||||
|
||||
procedure GlobalCEFApp_OnScheduleMessagePumpWork(const aDelayMS : int64);
|
||||
begin
|
||||
if (GlobalCEFWorkScheduler <> nil) then GlobalCEFWorkScheduler.ScheduleMessagePumpWork(aDelayMS);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.AppEventsMessage(var Msg: tagMSG; var Handled: Boolean);
|
||||
var
|
||||
TempKeyEvent : TCefKeyEvent;
|
||||
TempMouseEvent : TCefMouseEvent;
|
||||
begin
|
||||
case Msg.message of
|
||||
WM_SYSCHAR :
|
||||
if Panel1.Focused and (Msg.wParam in [VK_BACK..VK_HELP]) then
|
||||
begin
|
||||
TempKeyEvent.kind := KEYEVENT_CHAR;
|
||||
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||
TempKeyEvent.native_key_code := Msg.lParam;
|
||||
TempKeyEvent.is_system_key := ord(True);
|
||||
TempKeyEvent.character := #0;
|
||||
TempKeyEvent.unmodified_character := #0;
|
||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||
|
||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||
Handled := True;
|
||||
end;
|
||||
|
||||
WM_SYSKEYDOWN :
|
||||
if Panel1.Focused and (Msg.wParam in [VK_BACK..VK_HELP]) then
|
||||
begin
|
||||
TempKeyEvent.kind := KEYEVENT_RAWKEYDOWN;
|
||||
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||
TempKeyEvent.native_key_code := Msg.lParam;
|
||||
TempKeyEvent.is_system_key := ord(True);
|
||||
TempKeyEvent.character := #0;
|
||||
TempKeyEvent.unmodified_character := #0;
|
||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||
|
||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||
Handled := True;
|
||||
end;
|
||||
|
||||
WM_SYSKEYUP :
|
||||
if Panel1.Focused and (Msg.wParam in [VK_BACK..VK_HELP]) then
|
||||
begin
|
||||
TempKeyEvent.kind := KEYEVENT_KEYUP;
|
||||
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||
TempKeyEvent.native_key_code := Msg.lParam;
|
||||
TempKeyEvent.is_system_key := ord(True);
|
||||
TempKeyEvent.character := #0;
|
||||
TempKeyEvent.unmodified_character := #0;
|
||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||
|
||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||
Handled := True;
|
||||
end;
|
||||
|
||||
WM_KEYDOWN :
|
||||
if Panel1.Focused and (Msg.wParam in [VK_BACK..VK_HELP]) then
|
||||
begin
|
||||
TempKeyEvent.kind := KEYEVENT_RAWKEYDOWN;
|
||||
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||
TempKeyEvent.native_key_code := Msg.lParam;
|
||||
TempKeyEvent.is_system_key := ord(False);
|
||||
TempKeyEvent.character := #0;
|
||||
TempKeyEvent.unmodified_character := #0;
|
||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||
|
||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||
Handled := True;
|
||||
end;
|
||||
|
||||
WM_KEYUP :
|
||||
if Panel1.Focused and (Msg.wParam in [VK_BACK..VK_HELP]) then
|
||||
begin
|
||||
TempKeyEvent.kind := KEYEVENT_KEYUP;
|
||||
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||
TempKeyEvent.native_key_code := Msg.lParam;
|
||||
TempKeyEvent.is_system_key := ord(False);
|
||||
TempKeyEvent.character := #0;
|
||||
TempKeyEvent.unmodified_character := #0;
|
||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||
|
||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||
Handled := True;
|
||||
end;
|
||||
|
||||
WM_CHAR :
|
||||
if Panel1.Focused then
|
||||
begin
|
||||
TempKeyEvent.kind := KEYEVENT_CHAR;
|
||||
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||
TempKeyEvent.native_key_code := Msg.lParam;
|
||||
TempKeyEvent.is_system_key := ord(False);
|
||||
TempKeyEvent.character := #0;
|
||||
TempKeyEvent.unmodified_character := #0;
|
||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||
|
||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||
Handled := True;
|
||||
end;
|
||||
|
||||
WM_MOUSEWHEEL :
|
||||
if Panel1.Focused and (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
TempMouseEvent.x := Msg.lParam and $FFFF;
|
||||
TempMouseEvent.y := Msg.lParam shr 16;
|
||||
TempMouseEvent.modifiers := GetCefMouseModifiers(Msg.wParam);
|
||||
DeviceToLogical(TempMouseEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||
chrmosr.SendMouseWheelEvent(@TempMouseEvent, 0, int16(Msg.wParam shr 16));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.GoBtnClick(Sender: TObject);
|
||||
begin
|
||||
FResizeCS.Acquire;
|
||||
FResizing := False;
|
||||
FPendingResize := False;
|
||||
FResizeCS.Release;
|
||||
|
||||
chrmosr.LoadURL(ComboBox1.Text);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.GoBtnEnter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrBeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrCursorChange(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
cursor : HICON;
|
||||
cursorType : TCefCursorType;
|
||||
const customCursorInfo : PCefCursorInfo);
|
||||
begin
|
||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrGetScreenInfo(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
var screenInfo : TCefScreenInfo;
|
||||
out Result : Boolean);
|
||||
var
|
||||
TempRect : TCEFRect;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
TempRect.x := 0;
|
||||
TempRect.y := 0;
|
||||
TempRect.width := DeviceToLogical(Panel1.Width, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempRect.height := DeviceToLogical(Panel1.Height, GlobalCEFApp.DeviceScaleFactor);
|
||||
|
||||
screenInfo.device_scale_factor := GlobalCEFApp.DeviceScaleFactor;
|
||||
screenInfo.depth := 0;
|
||||
screenInfo.depth_per_component := 0;
|
||||
screenInfo.is_monochrome := Ord(False);
|
||||
screenInfo.rect := TempRect;
|
||||
screenInfo.available_rect := TempRect;
|
||||
|
||||
Result := True;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrGetScreenPoint(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
viewX : Integer;
|
||||
viewY : Integer;
|
||||
var screenX : Integer;
|
||||
var screenY : Integer;
|
||||
out Result : Boolean);
|
||||
var
|
||||
TempScreenPt, TempViewPt : TPoint;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
TempViewPt.x := LogicalToDevice(viewX, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempViewPt.y := LogicalToDevice(viewY, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempScreenPt := Panel1.ClientToScreen(TempViewPt);
|
||||
screenX := TempScreenPt.x;
|
||||
screenY := TempScreenPt.y;
|
||||
Result := True;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrGetViewRect(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
var rect : TCefRect;
|
||||
out Result : Boolean);
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
rect.x := 0;
|
||||
rect.y := 0;
|
||||
rect.width := DeviceToLogical(Panel1.Width, GlobalCEFApp.DeviceScaleFactor);
|
||||
rect.height := DeviceToLogical(Panel1.Height, GlobalCEFApp.DeviceScaleFactor);
|
||||
Result := True;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrPaint(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
kind : TCefPaintElementType;
|
||||
dirtyRectsCount : NativeUInt;
|
||||
const dirtyRects : PCefRectArray;
|
||||
const buffer : Pointer;
|
||||
width : Integer;
|
||||
height : Integer);
|
||||
var
|
||||
src, dst: PByte;
|
||||
i, j, TempLineSize, TempSrcOffset, TempDstOffset, SrcStride, DstStride : Integer;
|
||||
n : NativeUInt;
|
||||
TempWidth, TempHeight, TempScanlineSize : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
TempForcedResize := False;
|
||||
|
||||
if Panel1.BeginBufferDraw then
|
||||
begin
|
||||
if (kind = PET_POPUP) then
|
||||
begin
|
||||
if (FPopUpBitmap = nil) or
|
||||
(width <> FPopUpBitmap.Width) or
|
||||
(height <> FPopUpBitmap.Height) then
|
||||
begin
|
||||
if (FPopUpBitmap <> nil) then FPopUpBitmap.Free;
|
||||
|
||||
FPopUpBitmap := TBitmap.Create;
|
||||
FPopUpBitmap.PixelFormat := pf32bit;
|
||||
FPopUpBitmap.HandleType := bmDIB;
|
||||
FPopUpBitmap.Width := width;
|
||||
FPopUpBitmap.Height := height;
|
||||
end;
|
||||
|
||||
TempWidth := FPopUpBitmap.Width;
|
||||
TempHeight := FPopUpBitmap.Height;
|
||||
TempScanlineSize := FPopUpBitmap.Width * SizeOf(TRGBQuad);
|
||||
TempBufferBits := FPopUpBitmap.Scanline[pred(FPopUpBitmap.Height)];
|
||||
end
|
||||
else
|
||||
begin
|
||||
TempForcedResize := Panel1.UpdateBufferDimensions(Width, Height) or not(Panel1.BufferIsResized(False));
|
||||
TempWidth := Panel1.BufferWidth;
|
||||
TempHeight := Panel1.BufferHeight;
|
||||
TempScanlineSize := Panel1.ScanlineSize;
|
||||
TempBufferBits := Panel1.BufferBits;
|
||||
end;
|
||||
|
||||
if (TempBufferBits <> nil) then
|
||||
begin
|
||||
SrcStride := Width * SizeOf(TRGBQuad);
|
||||
DstStride := - TempScanlineSize;
|
||||
|
||||
n := 0;
|
||||
|
||||
while (n < dirtyRectsCount) do
|
||||
begin
|
||||
if (dirtyRects[n].x >= 0) and (dirtyRects[n].y >= 0) then
|
||||
begin
|
||||
TempLineSize := min(dirtyRects[n].width, TempWidth - dirtyRects[n].x) * SizeOf(TRGBQuad);
|
||||
|
||||
if (TempLineSize > 0) then
|
||||
begin
|
||||
TempSrcOffset := ((dirtyRects[n].y * Width) + dirtyRects[n].x) * SizeOf(TRGBQuad);
|
||||
TempDstOffset := ((TempScanlineSize * pred(TempHeight)) - (dirtyRects[n].y * TempScanlineSize)) +
|
||||
(dirtyRects[n].x * SizeOf(TRGBQuad));
|
||||
|
||||
src := @PByte(buffer)[TempSrcOffset];
|
||||
dst := @PByte(TempBufferBits)[TempDstOffset];
|
||||
|
||||
i := 0;
|
||||
j := min(dirtyRects[n].height, TempHeight - dirtyRects[n].y);
|
||||
|
||||
while (i < j) do
|
||||
begin
|
||||
Move(src^, dst^, TempLineSize);
|
||||
|
||||
Inc(dst, DstStride);
|
||||
Inc(src, SrcStride);
|
||||
inc(i);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
inc(n);
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
Panel1.InvalidatePanel;
|
||||
|
||||
if (kind = PET_VIEW) then
|
||||
begin
|
||||
if TempForcedResize or FPendingResize then PostMessage(Handle, CEF_PENDINGRESIZE, 0, 0);
|
||||
|
||||
FResizing := False;
|
||||
FPendingResize := False;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
FResizeCS.Release;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrPopupShow(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
show : Boolean);
|
||||
begin
|
||||
if show then
|
||||
FShowPopUp := True
|
||||
else
|
||||
begin
|
||||
FShowPopUp := False;
|
||||
FPopUpRect := rect(0, 0, 0, 0);
|
||||
|
||||
if (chrmosr <> nil) then chrmosr.Invalidate(PET_VIEW);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrPopupSize(Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
const rect : PCefRect);
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
LogicalToDevice(rect^, GlobalCEFApp.DeviceScaleFactor);
|
||||
|
||||
FPopUpRect.Left := rect.x;
|
||||
FPopUpRect.Top := rect.y;
|
||||
FPopUpRect.Right := rect.x + rect.width - 1;
|
||||
FPopUpRect.Bottom := rect.y + rect.height - 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.ComboBox1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
end;
|
||||
|
||||
function TOSRExternalPumpBrowserFrm.getModifiers(Shift: TShiftState): TCefEventFlags;
|
||||
begin
|
||||
Result := EVENTFLAG_NONE;
|
||||
|
||||
if (ssShift in Shift) then Result := Result or EVENTFLAG_SHIFT_DOWN;
|
||||
if (ssAlt in Shift) then Result := Result or EVENTFLAG_ALT_DOWN;
|
||||
if (ssCtrl in Shift) then Result := Result or EVENTFLAG_CONTROL_DOWN;
|
||||
if (ssLeft in Shift) then Result := Result or EVENTFLAG_LEFT_MOUSE_BUTTON;
|
||||
if (ssRight in Shift) then Result := Result or EVENTFLAG_RIGHT_MOUSE_BUTTON;
|
||||
if (ssMiddle in Shift) then Result := Result or EVENTFLAG_MIDDLE_MOUSE_BUTTON;
|
||||
end;
|
||||
|
||||
function TOSRExternalPumpBrowserFrm.GetButton(Button: TMouseButton): TCefMouseButtonType;
|
||||
begin
|
||||
case Button of
|
||||
TMouseButton.mbRight : Result := MBT_RIGHT;
|
||||
TMouseButton.mbMiddle : Result := MBT_MIDDLE;
|
||||
else Result := MBT_LEFT;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.WMMove(var aMessage : TWMMove);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (chrmosr <> nil) then chrmosr.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.WMMoving(var aMessage : TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (chrmosr <> nil) then chrmosr.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.WMCaptureChanged(var aMessage : TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (chrmosr <> nil) then chrmosr.SendCaptureLostEvent;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.WMCancelMode(var aMessage : TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (chrmosr <> nil) then chrmosr.SendCaptureLostEvent;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.BrowserCreatedMsg(var aMessage : TMessage);
|
||||
begin
|
||||
Caption := 'OSR External Pump Browser';
|
||||
NavControlPnl.Enabled := True;
|
||||
GoBtn.Click;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, NewDPI: Integer);
|
||||
begin
|
||||
if (chrmosr <> nil) then
|
||||
begin
|
||||
chrmosr.NotifyScreenInfoChanged;
|
||||
chrmosr.WasResized;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
CanClose := FCanClose;
|
||||
|
||||
if not(FClosing) then
|
||||
begin
|
||||
FClosing := True;
|
||||
NavControlPnl.Enabled := False;
|
||||
chrmosr.CloseBrowser(True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FPopUpBitmap := nil;
|
||||
FPopUpRect := rect(0, 0, 0, 0);
|
||||
FShowPopUp := False;
|
||||
FResizing := False;
|
||||
FPendingResize := False;
|
||||
FCanClose := False;
|
||||
FClosing := False;
|
||||
FResizeCS := TCriticalSection.Create;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
chrmosr.ShutdownDragAndDrop;
|
||||
|
||||
if (FPopUpBitmap <> nil) then FreeAndNil(FPopUpBitmap);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormHide(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.WasHidden(True);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
if chrmosr.Initialized then
|
||||
begin
|
||||
chrmosr.WasHidden(False);
|
||||
chrmosr.SendFocusEvent(True);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// opaque white background color
|
||||
chrmosr.Options.BackgroundColor := CefColorSetARGB($FF, $FF, $FF, $FF);
|
||||
|
||||
if chrmosr.CreateBrowser(nil, '') then
|
||||
chrmosr.InitializeDragAndDrop(Panel1)
|
||||
else
|
||||
Timer1.Enabled := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1Click(Sender: TObject);
|
||||
begin
|
||||
Panel1.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
TempEvent : TCefMouseEvent;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
Panel1.SetFocus;
|
||||
|
||||
TempEvent.x := X;
|
||||
TempEvent.y := Y;
|
||||
TempEvent.modifiers := getModifiers(Shift);
|
||||
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||
chrmosr.SendMouseClickEvent(@TempEvent, GetButton(Button), False, 1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1MouseLeave(Sender: TObject);
|
||||
var
|
||||
TempEvent : TCefMouseEvent;
|
||||
TempPoint : TPoint;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
GetCursorPos(TempPoint);
|
||||
TempPoint := Panel1.ScreenToclient(TempPoint);
|
||||
TempEvent.x := TempPoint.x;
|
||||
TempEvent.y := TempPoint.y;
|
||||
TempEvent.modifiers := GetCefMouseModifiers;
|
||||
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||
chrmosr.SendMouseMoveEvent(@TempEvent, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
TempEvent : TCefMouseEvent;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
TempEvent.x := X;
|
||||
TempEvent.y := Y;
|
||||
TempEvent.modifiers := getModifiers(Shift);
|
||||
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||
chrmosr.SendMouseMoveEvent(@TempEvent, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
TempEvent : TCefMouseEvent;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
TempEvent.x := X;
|
||||
TempEvent.y := Y;
|
||||
TempEvent.modifiers := getModifiers(Shift);
|
||||
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||
chrmosr.SendMouseClickEvent(@TempEvent, GetButton(Button), True, 1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1Resize(Sender: TObject);
|
||||
begin
|
||||
DoResize;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.PendingResizeMsg(var aMessage : TMessage);
|
||||
begin
|
||||
DoResize;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.DoResize;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
|
||||
if FResizing then
|
||||
FPendingResize := True
|
||||
else
|
||||
if Panel1.BufferIsResized then
|
||||
chrmosr.Invalidate(PET_VIEW)
|
||||
else
|
||||
begin
|
||||
FResizing := True;
|
||||
chrmosr.WasResized;
|
||||
end;
|
||||
finally
|
||||
FResizeCS.Release;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(True);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1Exit(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.SnapshotBtnClick(Sender: TObject);
|
||||
begin
|
||||
if SaveDialog1.Execute then Panel1.SaveToFile(SaveDialog1.FileName);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.SnapshotBtnEnter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
Timer1.Enabled := False;
|
||||
|
||||
if chrmosr.CreateBrowser(nil, '') then
|
||||
chrmosr.InitializeDragAndDrop(Panel1)
|
||||
else
|
||||
if not(chrmosr.Initialized) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
end.
|
2
demos/PostDataInspector/PostDataInspector.dproj.local
Normal file
2
demos/PostDataInspector/PostDataInspector.dproj.local
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject/>
|
812
demos/PostDataInspector/PostDataInspector.dsk
Normal file
812
demos/PostDataInspector/PostDataInspector.dsk
Normal file
@ -0,0 +1,812 @@
|
||||
[Closed Files]
|
||||
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,1150,3,1179,0,0,,{1
|
||||
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,63,11,90,0,0,,
|
||||
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Componentes\cache\uBookmarksDBThread.pas',0,1,843,59,875,0,0,,
|
||||
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Componentes\base_components\uWebPanel.pas',0,1,893,80,917,0,0,,
|
||||
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\BriskBard\uBriskBardMainForm.pas',0,1,1,1,1,0,0,,
|
||||
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Componentes\cache\uDatabaseThread.pas',0,1,643,1,665,0,0,,
|
||||
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Componentes\cache\uDownloadManager.pas',0,1,3021,63,3055,0,0,,
|
||||
File_7=TSourceModule,'c:\program files (x86)\embarcadero\studio\19.0\source\rtl\common\System.Classes.pas',0,1,9322,1,9344,0,0,,
|
||||
File_8=TSourceModule,'c:\program files (x86)\embarcadero\studio\19.0\SOURCE\VCL\Vcl.Controls.pas',0,1,12377,1,12401,0,0,,
|
||||
|
||||
[Modules]
|
||||
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas
|
||||
Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas
|
||||
Module2=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\PostDataInspector.dproj
|
||||
Module3=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\uPostDataInspector.pas
|
||||
Module4=default.htm
|
||||
Count=5
|
||||
EditWindowCount=1
|
||||
|
||||
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas]
|
||||
ModuleType=TSourceModule
|
||||
|
||||
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas]
|
||||
ModuleType=TSourceModule
|
||||
|
||||
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\PostDataInspector.dproj]
|
||||
ModuleType=TBaseProject
|
||||
|
||||
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\uPostDataInspector.pas]
|
||||
ModuleType=TSourceModule
|
||||
|
||||
[default.htm]
|
||||
ModuleType=TURLModule
|
||||
|
||||
[EditWindow0]
|
||||
ViewCount=5
|
||||
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas
|
||||
View0=0
|
||||
View1=1
|
||||
View2=2
|
||||
View3=3
|
||||
View4=4
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=10000
|
||||
Height=9423
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=10000
|
||||
ClientHeight=9423
|
||||
DockedToMainForm=1
|
||||
BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
|
||||
TopPanelSize=0
|
||||
LeftPanelSize=0
|
||||
RightPanelSize=2000
|
||||
RightPanelClients=DockSite2
|
||||
RightPanelData=00000800010100000000E91900000000000001D00700000000000001000000009F23000009000000446F636B5369746532FFFFFFFF
|
||||
BottomPanelSize=0
|
||||
BottomPanelClients=DockSite1,MessageView
|
||||
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022006000000000000FFFFFFFF
|
||||
BottomMiddlePanelSize=0
|
||||
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
|
||||
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779F1D00000000000002F706000000000000FFFFFFFF
|
||||
TabDockLeftClients=PropertyInspector=0,DockSite3=1
|
||||
TabDockRightClients=DockSite4=0
|
||||
|
||||
[View0]
|
||||
CustomEditViewType=TWelcomePageView
|
||||
WelcomePageURL=bds:/default.htm
|
||||
|
||||
[View1]
|
||||
CustomEditViewType=TEditView
|
||||
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\uPostDataInspector.pas
|
||||
CursorX=1
|
||||
CursorY=1
|
||||
TopLine=1
|
||||
LeftCol=1
|
||||
Bookmarks=
|
||||
EditViewName=Borland.FormDesignerView
|
||||
|
||||
[View2]
|
||||
CustomEditViewType=TEditView
|
||||
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\PostDataInspector.dpr
|
||||
CursorX=42
|
||||
CursorY=64
|
||||
TopLine=37
|
||||
LeftCol=1
|
||||
Bookmarks=
|
||||
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\PostDataInspector\PostDataInspector.dpr
|
||||
|
||||
[View3]
|
||||
CustomEditViewType=TEditView
|
||||
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas
|
||||
CursorX=40
|
||||
CursorY=293
|
||||
TopLine=261
|
||||
LeftCol=1
|
||||
Bookmarks=
|
||||
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas
|
||||
|
||||
[View4]
|
||||
CustomEditViewType=TEditView
|
||||
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas
|
||||
CursorX=3
|
||||
CursorY=443
|
||||
TopLine=414
|
||||
LeftCol=1
|
||||
Bookmarks=
|
||||
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas
|
||||
|
||||
[UndockedDesigner]
|
||||
Count=0
|
||||
|
||||
[Watches]
|
||||
Count=0
|
||||
|
||||
[WatchWindow]
|
||||
WatchColumnWidth=120
|
||||
WatchShowColumnHeaders=1
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1143
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1143
|
||||
TBDockHeight=211
|
||||
LRDockWidth=13602
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
|
||||
[EmbarcaderoWin32Debugger_AddressBreakpoints]
|
||||
Count=0
|
||||
|
||||
[EmbarcaderoWin64Debugger_AddressBreakpoints]
|
||||
Count=0
|
||||
|
||||
[Main Window]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=0
|
||||
State=2
|
||||
Left=148
|
||||
Top=277
|
||||
Width=8930
|
||||
Height=8524
|
||||
MaxLeft=-8
|
||||
MaxTop=-11
|
||||
MaxWidth=8930
|
||||
MaxHeight=8524
|
||||
ClientWidth=10000
|
||||
ClientHeight=9756
|
||||
BottomPanelSize=9119
|
||||
BottomPanelClients=EditWindow0
|
||||
BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF
|
||||
|
||||
[ProjectManager]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2000
|
||||
Height=8946
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=8946
|
||||
TBDockHeight=5905
|
||||
LRDockWidth=2352
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[MessageView]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2773
|
||||
Height=1421
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2773
|
||||
ClientHeight=1421
|
||||
TBDockHeight=1421
|
||||
LRDockWidth=2773
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ToolForm]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2000
|
||||
Height=4384
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=4384
|
||||
TBDockHeight=7148
|
||||
LRDockWidth=2000
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ClipboardHistory]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=0
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=1906
|
||||
Height=4939
|
||||
MaxLeft=-8
|
||||
MaxTop=-11
|
||||
ClientWidth=1781
|
||||
ClientHeight=4517
|
||||
TBDockHeight=4939
|
||||
LRDockWidth=1906
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ProjectStatistics]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=0
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2062
|
||||
Height=5683
|
||||
MaxLeft=-8
|
||||
MaxTop=-11
|
||||
ClientWidth=1938
|
||||
ClientHeight=5261
|
||||
TBDockHeight=5683
|
||||
LRDockWidth=2062
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ClassBrowserTool]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=-148
|
||||
Top=-133
|
||||
Width=1844
|
||||
Height=3141
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=1844
|
||||
ClientHeight=3141
|
||||
TBDockHeight=3141
|
||||
LRDockWidth=1844
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[MetricsView]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1199
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1199
|
||||
TBDockHeight=4839
|
||||
LRDockWidth=3562
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[QAView]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1199
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1199
|
||||
TBDockHeight=4839
|
||||
LRDockWidth=3562
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[PropertyInspector]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=360
|
||||
Width=1898
|
||||
Height=5427
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=1898
|
||||
ClientHeight=5427
|
||||
TBDockHeight=7236
|
||||
LRDockWidth=1898
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
SplitPos=111
|
||||
|
||||
[frmDesignPreview]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2000
|
||||
Height=6959
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=6959
|
||||
TBDockHeight=5960
|
||||
LRDockWidth=2508
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[TFileExplorerForm]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=-898
|
||||
Top=-133
|
||||
Width=2844
|
||||
Height=6204
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2844
|
||||
ClientHeight=6204
|
||||
TBDockHeight=6204
|
||||
LRDockWidth=2844
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[TemplateView]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=-1026
|
||||
Top=-133
|
||||
Width=273
|
||||
Height=366
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=273
|
||||
ClientHeight=366
|
||||
TBDockHeight=366
|
||||
LRDockWidth=273
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
Name=120
|
||||
Description=334
|
||||
filter=1
|
||||
|
||||
[DebugLogView]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1143
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1143
|
||||
TBDockHeight=411
|
||||
LRDockWidth=4953
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ThreadStatusWindow]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1143
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1143
|
||||
TBDockHeight=211
|
||||
LRDockWidth=7406
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
Column0Width=145
|
||||
Column1Width=100
|
||||
Column2Width=115
|
||||
Column3Width=250
|
||||
|
||||
[LocalVarsWindow]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1143
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1143
|
||||
TBDockHeight=1532
|
||||
LRDockWidth=3484
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[CallStackWindow]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1143
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1143
|
||||
TBDockHeight=2064
|
||||
LRDockWidth=3484
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[PatchForm]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1199
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1199
|
||||
TBDockHeight=2497
|
||||
LRDockWidth=3398
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[FindReferencsForm]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1199
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1199
|
||||
TBDockHeight=2320
|
||||
LRDockWidth=2820
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[RefactoringForm]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1199
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1199
|
||||
TBDockHeight=3208
|
||||
LRDockWidth=2820
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ToDo List]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1199
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1199
|
||||
TBDockHeight=1154
|
||||
LRDockWidth=3680
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
Column0Width=314
|
||||
Column1Width=30
|
||||
Column2Width=150
|
||||
Column3Width=172
|
||||
Column4Width=129
|
||||
SortOrder=4
|
||||
ShowHints=1
|
||||
ShowChecked=1
|
||||
|
||||
[DataExplorerContainer]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2000
|
||||
Height=6959
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=6959
|
||||
TBDockHeight=4883
|
||||
LRDockWidth=7148
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[GraphDrawingModel]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2859
|
||||
Height=3208
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2859
|
||||
ClientHeight=3208
|
||||
TBDockHeight=3208
|
||||
LRDockWidth=2859
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[BreakpointWindow]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1143
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1143
|
||||
TBDockHeight=1543
|
||||
LRDockWidth=8742
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
Column0Width=200
|
||||
Column1Width=75
|
||||
Column2Width=200
|
||||
Column3Width=200
|
||||
Column4Width=200
|
||||
Column5Width=75
|
||||
Column6Width=75
|
||||
|
||||
[StructureView]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=1898
|
||||
Height=9223
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=1898
|
||||
ClientHeight=9223
|
||||
TBDockHeight=3674
|
||||
LRDockWidth=1898
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[ModelViewTool]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2000
|
||||
Height=6959
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=6959
|
||||
TBDockHeight=4883
|
||||
LRDockWidth=5305
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[BorlandEditorCodeExplorer@EditWindow0]
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=0
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=1828
|
||||
Height=6171
|
||||
MaxLeft=-8
|
||||
MaxTop=-11
|
||||
ClientWidth=1703
|
||||
ClientHeight=5749
|
||||
TBDockHeight=6171
|
||||
LRDockWidth=1828
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
|
||||
[DockHosts]
|
||||
DockHostCount=5
|
||||
|
||||
[DockSite0]
|
||||
HostDockSite=DockBottomCenterPanel
|
||||
DockSiteType=1
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=2336
|
||||
Height=1476
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2336
|
||||
ClientHeight=1476
|
||||
TBDockHeight=1476
|
||||
LRDockWidth=2336
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
TabPosition=1
|
||||
ActiveTabID=RefactoringForm
|
||||
TabDockClients=RefactoringForm,PatchForm,FindReferencsForm,ToDo List,MetricsView,QAView
|
||||
|
||||
[DockSite1]
|
||||
HostDockSite=DockBottomPanel
|
||||
DockSiteType=1
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=0
|
||||
Width=3820
|
||||
Height=1421
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=3820
|
||||
ClientHeight=1421
|
||||
TBDockHeight=1421
|
||||
LRDockWidth=3820
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
TabPosition=1
|
||||
ActiveTabID=DebugLogView
|
||||
TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow
|
||||
|
||||
[DockSite2]
|
||||
HostDockSite=DockRightPanel
|
||||
DockSiteType=1
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=1
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=18
|
||||
Width=2000
|
||||
Height=9223
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=9223
|
||||
TBDockHeight=7236
|
||||
LRDockWidth=2000
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
TabPosition=1
|
||||
ActiveTabID=ProjectManager
|
||||
TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm
|
||||
|
||||
[DockSite3]
|
||||
HostDockSite=LeftDockTabSet
|
||||
DockSiteType=1
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=18
|
||||
Width=1898
|
||||
Height=9223
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=1898
|
||||
ClientHeight=9223
|
||||
TBDockHeight=7236
|
||||
LRDockWidth=1898
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
TabPosition=1
|
||||
ActiveTabID=StructureView
|
||||
TabDockClients=StructureView,ClassBrowserTool
|
||||
|
||||
[DockSite4]
|
||||
HostDockSite=RightTabDock
|
||||
DockSiteType=1
|
||||
PercentageSizes=1
|
||||
Create=1
|
||||
Visible=0
|
||||
Docked=1
|
||||
State=0
|
||||
Left=0
|
||||
Top=454
|
||||
Width=2000
|
||||
Height=4384
|
||||
MaxLeft=-1
|
||||
MaxTop=-1
|
||||
ClientWidth=2000
|
||||
ClientHeight=4384
|
||||
TBDockHeight=7236
|
||||
LRDockWidth=2000
|
||||
Dockable=1
|
||||
StayOnTop=0
|
||||
TabPosition=1
|
||||
ActiveTabID=ToolForm
|
||||
TabDockClients=ToolForm,TemplateView
|
||||
|
BIN
demos/PostDataInspector/PostDataInspector.identcache
Normal file
BIN
demos/PostDataInspector/PostDataInspector.identcache
Normal file
Binary file not shown.
10
demos/PostDataInspector/PostDataInspector.stat
Normal file
10
demos/PostDataInspector/PostDataInspector.stat
Normal file
@ -0,0 +1,10 @@
|
||||
[Stats]
|
||||
EditorSecs=334
|
||||
DesignerSecs=4
|
||||
InspectorSecs=1
|
||||
CompileSecs=1
|
||||
OtherSecs=6
|
||||
StartTime=03/12/2017 15:51:34
|
||||
RealKeys=0
|
||||
EffectiveKeys=0
|
||||
DebugSecs=1
|
@ -59,6 +59,8 @@ begin
|
||||
GlobalCEFApp.EnableHighDPISupport := True;
|
||||
GlobalCEFApp.FastUnload := True;
|
||||
|
||||
//GlobalCEFApp.AddCustomCommandLine('--show-fps-counter');
|
||||
|
||||
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.
|
||||
{
|
||||
GlobalCEFApp.FrameworkDirPath := 'cef';
|
||||
|
@ -49,7 +49,8 @@ object Form1: TForm1
|
||||
|
||||
'https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_selec' +
|
||||
't_form'
|
||||
'https://www.briskbard.com')
|
||||
'https://www.briskbard.com'
|
||||
'https://frames-per-second.appspot.com/')
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 726
|
||||
@ -108,6 +109,7 @@ object Form1: TForm1
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
OnClick = Panel1Click
|
||||
OnEnter = Panel1Enter
|
||||
OnExit = Panel1Exit
|
||||
|
@ -346,11 +346,11 @@ procedure TForm1.chrmosrGetViewRect(Sender : TObject;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
rect.x := 0;
|
||||
rect.y := 0;
|
||||
rect.width := DeviceToLogical(Panel1.Width, GlobalCEFApp.DeviceScaleFactor);
|
||||
rect.height := DeviceToLogical(Panel1.Height, GlobalCEFApp.DeviceScaleFactor);
|
||||
Result := True;
|
||||
rect.x := 0;
|
||||
rect.y := 0;
|
||||
rect.width := DeviceToLogical(Panel1.Width, GlobalCEFApp.DeviceScaleFactor);
|
||||
rect.height := DeviceToLogical(Panel1.Height, GlobalCEFApp.DeviceScaleFactor);
|
||||
Result := True;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
@ -619,6 +619,8 @@ var
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
Panel1.SetFocus;
|
||||
|
||||
TempEvent.x := X;
|
||||
TempEvent.y := Y;
|
||||
TempEvent.modifiers := getModifiers(Shift);
|
||||
|
@ -9,22 +9,23 @@ package CEF4Delphi;
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS OFF}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$OPTIMIZATION OFF}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO OFF}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DEFINE RELEASE}
|
||||
{$DEFINE DEBUG}
|
||||
{$ENDIF IMPLICITBUILDING}
|
||||
{$DESCRIPTION 'CEF4Delphi'}
|
||||
{$IMPLICITBUILD OFF}
|
||||
|
||||
requires
|
||||
@ -157,7 +158,8 @@ contains
|
||||
uCEFExtension in 'uCEFExtension.pas',
|
||||
uCEFExtensionHandler in 'uCEFExtensionHandler.pas',
|
||||
uBufferPanel in 'uBufferPanel.pas',
|
||||
uCEFApp in 'uCEFApp.pas';
|
||||
uCEFApp in 'uCEFApp.pas',
|
||||
uCEFWorkScheduler in 'uCEFWorkScheduler.pas';
|
||||
|
||||
end.
|
||||
|
||||
|
@ -250,6 +250,7 @@
|
||||
<DCCReference Include="uCEFExtensionHandler.pas"/>
|
||||
<DCCReference Include="uBufferPanel.pas"/>
|
||||
<DCCReference Include="uCEFApp.pas"/>
|
||||
<DCCReference Include="uCEFWorkScheduler.pas"/>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
|
@ -57,7 +57,7 @@ uses
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3202;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1686;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1690;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 62;
|
||||
@ -136,31 +136,32 @@ type
|
||||
FRenderProcessHandler : ICefRenderProcessHandler;
|
||||
|
||||
// ICefBrowserProcessHandler
|
||||
FOnContextInitializedEvent : TOnContextInitializedEvent;
|
||||
FOnBeforeChildProcessLaunchEvent : TOnBeforeChildProcessLaunchEvent;
|
||||
FOnRenderProcessThreadCreatedEvent : TOnRenderProcessThreadCreatedEvent;
|
||||
FOnScheduleMessagePumpWorkEvent : TOnScheduleMessagePumpWorkEvent;
|
||||
FOnContextInitialized : TOnContextInitializedEvent;
|
||||
FOnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent;
|
||||
FOnRenderProcessThreadCreated : TOnRenderProcessThreadCreatedEvent;
|
||||
FOnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent;
|
||||
|
||||
// ICefResourceBundleHandler
|
||||
FOnGetLocalizedStringEvent : TOnGetLocalizedStringEvent;
|
||||
FOnGetDataResourceEvent : TOnGetDataResourceEvent;
|
||||
FOnGetDataResourceForScaleEvent : TOnGetDataResourceForScaleEvent;
|
||||
FOnGetLocalizedString : TOnGetLocalizedStringEvent;
|
||||
FOnGetDataResource : TOnGetDataResourceEvent;
|
||||
FOnGetDataResourceForScale : TOnGetDataResourceForScaleEvent;
|
||||
|
||||
// ICefRenderProcessHandler
|
||||
FOnRenderThreadCreated : TOnRenderThreadCreatedEvent;
|
||||
FOnWebKitInitialized : TOnWebKitInitializedEvent;
|
||||
FOnBrowserCreated : TOnBrowserCreatedEvent;
|
||||
FOnBrowserDestroyed : TOnBrowserDestroyedEvent;
|
||||
FOnBeforeNavigation : TOnBeforeNavigationEvent;
|
||||
FOnContextCreated : TOnContextCreatedEvent;
|
||||
FOnContextReleased : TOnContextReleasedEvent;
|
||||
FOnUncaughtException : TOnUncaughtExceptionEvent;
|
||||
FOnFocusedNodeChanged : TOnFocusedNodeChangedEvent;
|
||||
FOnProcessMessageReceived : TOnProcessMessageReceivedEvent;
|
||||
FOnRenderThreadCreated : TOnRenderThreadCreatedEvent;
|
||||
FOnWebKitInitialized : TOnWebKitInitializedEvent;
|
||||
FOnBrowserCreated : TOnBrowserCreatedEvent;
|
||||
FOnBrowserDestroyed : TOnBrowserDestroyedEvent;
|
||||
FOnBeforeNavigation : TOnBeforeNavigationEvent;
|
||||
FOnContextCreated : TOnContextCreatedEvent;
|
||||
FOnContextReleased : TOnContextReleasedEvent;
|
||||
FOnUncaughtException : TOnUncaughtExceptionEvent;
|
||||
FOnFocusedNodeChanged : TOnFocusedNodeChangedEvent;
|
||||
FOnProcessMessageReceived : TOnProcessMessageReceivedEvent;
|
||||
|
||||
procedure SetFrameworkDirPath(const aValue : ustring);
|
||||
procedure SetResourcesDirPath(const aValue : ustring);
|
||||
procedure SetLocalesDirPath(const aValue : ustring);
|
||||
procedure SetOsmodalLoop(aValue : boolean);
|
||||
|
||||
function GetChromeVersion : string;
|
||||
function GetLibCefPath : string;
|
||||
@ -235,6 +236,10 @@ type
|
||||
procedure AddCustomCommandLine(const aCommandLine : string; const aValue : string = '');
|
||||
function StartMainProcess : boolean;
|
||||
function StartSubProcess : boolean;
|
||||
|
||||
procedure DoMessageLoopWork;
|
||||
procedure RunMessageLoop;
|
||||
procedure QuitMessageLoop;
|
||||
procedure UpdateDeviceScaleFactor;
|
||||
|
||||
// Internal procedures. Only TInternalApp, TCefCustomBrowserProcessHandler,
|
||||
@ -332,19 +337,20 @@ type
|
||||
property ResourceBundleHandler : ICefResourceBundleHandler read FResourceBundleHandler write FResourceBundleHandler;
|
||||
property BrowserProcessHandler : ICefBrowserProcessHandler read FBrowserProcessHandler write FBrowserProcessHandler;
|
||||
property RenderProcessHandler : ICefRenderProcessHandler read FRenderProcessHandler write FRenderProcessHandler;
|
||||
property OsmodalLoop : boolean write SetOsmodalLoop;
|
||||
|
||||
property OnRegCustomSchemes : TOnRegisterCustomSchemes read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
||||
|
||||
// ICefBrowserProcessHandler
|
||||
property OnContextInitialized : TOnContextInitializedEvent read FOnContextInitializedEvent write FOnContextInitializedEvent;
|
||||
property OnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent read FOnBeforeChildProcessLaunchEvent write FOnBeforeChildProcessLaunchEvent;
|
||||
property OnRenderProcessThreadCreated : TOnRenderProcessThreadCreatedEvent read FOnRenderProcessThreadCreatedEvent write FOnRenderProcessThreadCreatedEvent;
|
||||
property OnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent read FOnScheduleMessagePumpWorkEvent write FOnScheduleMessagePumpWorkEvent;
|
||||
property OnContextInitialized : TOnContextInitializedEvent read FOnContextInitialized write FOnContextInitialized;
|
||||
property OnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent read FOnBeforeChildProcessLaunch write FOnBeforeChildProcessLaunch;
|
||||
property OnRenderProcessThreadCreated : TOnRenderProcessThreadCreatedEvent read FOnRenderProcessThreadCreated write FOnRenderProcessThreadCreated;
|
||||
property OnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent read FOnScheduleMessagePumpWork write FOnScheduleMessagePumpWork;
|
||||
|
||||
// ICefResourceBundleHandler
|
||||
property OnGetLocalizedString : TOnGetLocalizedStringEvent read FOnGetLocalizedStringEvent write FOnGetLocalizedStringEvent;
|
||||
property OnGetDataResource : TOnGetDataResourceEvent read FOnGetDataResourceEvent write FOnGetDataResourceEvent;
|
||||
property OnGetDataResourceForScale : TOnGetDataResourceForScaleEvent read FOnGetDataResourceForScaleEvent write FOnGetDataResourceForScaleEvent;
|
||||
property OnGetLocalizedString : TOnGetLocalizedStringEvent read FOnGetLocalizedString write FOnGetLocalizedString;
|
||||
property OnGetDataResource : TOnGetDataResourceEvent read FOnGetDataResource write FOnGetDataResource;
|
||||
property OnGetDataResourceForScale : TOnGetDataResourceForScaleEvent read FOnGetDataResourceForScale write FOnGetDataResourceForScale;
|
||||
|
||||
// ICefRenderProcessHandler
|
||||
property OnRenderThreadCreated : TOnRenderThreadCreatedEvent read FOnRenderThreadCreated write FOnRenderThreadCreated;
|
||||
@ -440,27 +446,27 @@ begin
|
||||
FRenderProcessHandler := nil;
|
||||
|
||||
// ICefBrowserProcessHandler
|
||||
FOnContextInitializedEvent := nil;
|
||||
FOnBeforeChildProcessLaunchEvent := nil;
|
||||
FOnRenderProcessThreadCreatedEvent := nil;
|
||||
FOnScheduleMessagePumpWorkEvent := nil;
|
||||
FOnContextInitialized := nil;
|
||||
FOnBeforeChildProcessLaunch := nil;
|
||||
FOnRenderProcessThreadCreated := nil;
|
||||
FOnScheduleMessagePumpWork := nil;
|
||||
|
||||
// ICefResourceBundleHandler
|
||||
FOnGetLocalizedStringEvent := nil;
|
||||
FOnGetDataResourceEvent := nil;
|
||||
FOnGetDataResourceForScaleEvent := nil;
|
||||
FOnGetLocalizedString := nil;
|
||||
FOnGetDataResource := nil;
|
||||
FOnGetDataResourceForScale := nil;
|
||||
|
||||
// ICefRenderProcessHandler
|
||||
FOnRenderThreadCreated := nil;
|
||||
FOnWebKitInitialized := nil;
|
||||
FOnBrowserCreated := nil;
|
||||
FOnBrowserDestroyed := nil;
|
||||
FOnBeforeNavigation := nil;
|
||||
FOnContextCreated := nil;
|
||||
FOnContextReleased := nil;
|
||||
FOnUncaughtException := nil;
|
||||
FOnFocusedNodeChanged := nil;
|
||||
FOnProcessMessageReceived := nil;
|
||||
FOnRenderThreadCreated := nil;
|
||||
FOnWebKitInitialized := nil;
|
||||
FOnBrowserCreated := nil;
|
||||
FOnBrowserDestroyed := nil;
|
||||
FOnBeforeNavigation := nil;
|
||||
FOnContextCreated := nil;
|
||||
FOnContextReleased := nil;
|
||||
FOnUncaughtException := nil;
|
||||
FOnFocusedNodeChanged := nil;
|
||||
FOnProcessMessageReceived := nil;
|
||||
|
||||
UpdateDeviceScaleFactor;
|
||||
|
||||
@ -481,7 +487,14 @@ end;
|
||||
|
||||
destructor TCefApplication.Destroy;
|
||||
begin
|
||||
ShutDown;
|
||||
if FMustShutDown then ShutDown;
|
||||
|
||||
if (FLibHandle <> 0) then
|
||||
begin
|
||||
FreeLibrary(FLibHandle);
|
||||
FLibHandle := 0;
|
||||
FLibLoaded := False;
|
||||
end;
|
||||
|
||||
if (FCustomCommandLines <> nil) then FreeAndNil(FCustomCommandLines);
|
||||
if (FCustomCommandLineValues <> nil) then FreeAndNil(FCustomCommandLineValues);
|
||||
@ -615,78 +628,92 @@ function TCefApplication.CheckCEFLibrary : boolean;
|
||||
var
|
||||
TempString, TempPath : string;
|
||||
begin
|
||||
Result := False;
|
||||
if FCheckCEFFiles then
|
||||
Result := False
|
||||
else
|
||||
begin
|
||||
Result := True;
|
||||
exit;
|
||||
end;
|
||||
|
||||
if not(FCheckCEFFiles) then
|
||||
|
||||
if not(CheckDLLs(FFrameworkDirPath)) then
|
||||
begin
|
||||
TempString := 'CEF framework files missing !' + CRLF + CRLF;
|
||||
|
||||
if GetAbsoluteDirPath(FFrameworkDirPath, TempPath) then
|
||||
begin
|
||||
if (length(TempPath) = 0) then TempPath := GetModulePath;
|
||||
TempString := TempString +
|
||||
'Make sure all the CEF framework files can be found in this directory :' +
|
||||
CRLF + SplitLongString(TempPath);
|
||||
end
|
||||
else
|
||||
TempString := TempString +
|
||||
'The CEF framework directory doesn' + #39 +'t exist!' +
|
||||
CRLF + SplitLongString(FFrameworkDirPath);
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
if not(CheckResources(FResourcesDirPath, FCheckDevToolsResources)) then
|
||||
begin
|
||||
TempString := 'CEF resources missing !' + CRLF + CRLF;
|
||||
|
||||
if GetAbsoluteDirPath(FResourcesDirPath, TempPath) then
|
||||
begin
|
||||
if (length(TempPath) = 0) then TempPath := GetModulePath;
|
||||
TempString := TempString +
|
||||
'Make sure all the CEF resources can be found in this directory :' +
|
||||
CRLF + SplitLongString(TempPath);
|
||||
end
|
||||
else
|
||||
TempString := TempString +
|
||||
'The CEF resources directory doesn' + #39 +'t exist!' +
|
||||
CRLF + SplitLongString(FResourcesDirPath);
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
if not(CheckLocales(FLocalesDirPath, FLocalesRequired)) then
|
||||
begin
|
||||
TempString := 'CEF locale files missing !' + CRLF + CRLF;
|
||||
|
||||
if GetAbsoluteDirPath(FLocalesDirPath, TempPath) then
|
||||
begin
|
||||
if (length(TempPath) = 0) then TempPath := GetModulePath + 'locales';
|
||||
TempString := TempString +
|
||||
'Make sure all the CEF locale files can be found in this directory :' +
|
||||
CRLF + SplitLongString(TempPath);
|
||||
end
|
||||
else
|
||||
TempString := TempString +
|
||||
'The CEF locales directory doesn' + #39 +'t exist!' +
|
||||
CRLF + SplitLongString(FLocalesDirPath);
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
if CheckDLLVersion(LibCefPath,
|
||||
CEF_SUPPORTED_VERSION_MAJOR,
|
||||
CEF_SUPPORTED_VERSION_MINOR,
|
||||
CEF_SUPPORTED_VERSION_RELEASE,
|
||||
CEF_SUPPORTED_VERSION_BUILD) then
|
||||
Result := True
|
||||
else
|
||||
begin
|
||||
if not(CheckDLLs(FFrameworkDirPath)) then
|
||||
begin
|
||||
TempString := 'CEF framework files missing !' + CRLF + CRLF;
|
||||
TempString := 'Unsupported CEF version !' +
|
||||
CRLF + CRLF +
|
||||
'Use only the CEF3 binaries specified in the CEF4Delphi Readme.md file at ' +
|
||||
CRLF + CEF4DELPHI_URL;
|
||||
|
||||
if GetAbsoluteDirPath(FFrameworkDirPath, TempPath) then
|
||||
begin
|
||||
if (length(TempPath) = 0) then TempPath := GetModulePath;
|
||||
TempString := TempString + 'Make sure all the CEF framework files can be found in this directory :' + CRLF + SplitLongString(TempPath);
|
||||
end
|
||||
else
|
||||
TempString := TempString + 'The CEF framework directory doesn' + #39 +'t exist!' + CRLF + SplitLongString(FFrameworkDirPath);
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
if not(CheckResources(FResourcesDirPath, FCheckDevToolsResources)) then
|
||||
begin
|
||||
TempString := 'CEF resources missing !' + CRLF + CRLF;
|
||||
|
||||
if GetAbsoluteDirPath(FResourcesDirPath, TempPath) then
|
||||
begin
|
||||
if (length(TempPath) = 0) then TempPath := GetModulePath;
|
||||
TempString := TempString + 'Make sure all the CEF resources can be found in this directory :' + CRLF + SplitLongString(TempPath);
|
||||
end
|
||||
else
|
||||
TempString := TempString + 'The CEF resources directory doesn' + #39 +'t exist!' + CRLF + SplitLongString(FResourcesDirPath);
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
if not(CheckLocales(FLocalesDirPath, FLocalesRequired)) then
|
||||
begin
|
||||
TempString := 'CEF locale files missing !' + CRLF + CRLF;
|
||||
|
||||
if GetAbsoluteDirPath(FLocalesDirPath, TempPath) then
|
||||
begin
|
||||
if (length(TempPath) = 0) then TempPath := GetModulePath + 'locales';
|
||||
TempString := TempString + 'Make sure all the CEF locale files can be found in this directory :' + CRLF + SplitLongString(TempPath);
|
||||
end
|
||||
else
|
||||
TempString := TempString + 'The CEF locales directory doesn' + #39 +'t exist!' + CRLF + SplitLongString(FLocalesDirPath);
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
if CheckDLLVersion(LibCefPath,
|
||||
CEF_SUPPORTED_VERSION_MAJOR,
|
||||
CEF_SUPPORTED_VERSION_MINOR,
|
||||
CEF_SUPPORTED_VERSION_RELEASE,
|
||||
CEF_SUPPORTED_VERSION_BUILD) then
|
||||
Result := True
|
||||
else
|
||||
begin
|
||||
TempString := 'Unsupported CEF version !' +
|
||||
CRLF + CRLF +
|
||||
'Use only the CEF3 binaries specified in the CEF4Delphi Readme.md file at ' +
|
||||
CRLF + CEF4DELPHI_URL;
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
end;
|
||||
ShowErrorMessageDlg(TempString);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -716,6 +743,35 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.DoMessageLoopWork;
|
||||
begin
|
||||
if FLibLoaded and
|
||||
not(FMultiThreadedMessageLoop) and
|
||||
FExternalMessagePump then
|
||||
cef_do_message_loop_work;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.RunMessageLoop;
|
||||
begin
|
||||
if FLibLoaded and
|
||||
not(FMultiThreadedMessageLoop) and
|
||||
not(FExternalMessagePump) then
|
||||
cef_run_message_loop;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.QuitMessageLoop;
|
||||
begin
|
||||
if FLibLoaded and
|
||||
not(FMultiThreadedMessageLoop) and
|
||||
FExternalMessagePump then
|
||||
cef_quit_message_loop;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.SetOsmodalLoop(aValue : boolean);
|
||||
begin
|
||||
if FLibLoaded then cef_set_osmodal_loop(Ord(aValue));
|
||||
end;
|
||||
|
||||
procedure TCefApplication.UpdateDeviceScaleFactor;
|
||||
begin
|
||||
FDeviceScaleFactor := GetDeviceScaleFactor;
|
||||
@ -724,13 +780,7 @@ end;
|
||||
procedure TCefApplication.ShutDown;
|
||||
begin
|
||||
try
|
||||
if (FLibHandle <> 0) then
|
||||
begin
|
||||
if FMustShutDown then cef_shutdown;
|
||||
|
||||
FreeLibrary(FLibHandle);
|
||||
FLibHandle := 0;
|
||||
end;
|
||||
cef_shutdown;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TCefApplication.ShutDown', e) then raise;
|
||||
@ -948,43 +998,43 @@ begin
|
||||
InitializeCookies;
|
||||
FGlobalContextInitialized := True;
|
||||
|
||||
if assigned(FOnContextInitializedEvent) then FOnContextInitializedEvent;
|
||||
if assigned(FOnContextInitialized) then FOnContextInitialized;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.Internal_OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine);
|
||||
begin
|
||||
if assigned(FOnBeforeChildProcessLaunchEvent) then FOnBeforeChildProcessLaunchEvent(commandLine);
|
||||
if assigned(FOnBeforeChildProcessLaunch) then FOnBeforeChildProcessLaunch(commandLine);
|
||||
end;
|
||||
|
||||
procedure TCefApplication.Internal_OnRenderProcessThreadCreated(const extraInfo: ICefListValue);
|
||||
begin
|
||||
if assigned(FOnRenderProcessThreadCreatedEvent) then FOnRenderProcessThreadCreatedEvent(extraInfo);
|
||||
if assigned(FOnRenderProcessThreadCreated) then FOnRenderProcessThreadCreated(extraInfo);
|
||||
end;
|
||||
|
||||
procedure TCefApplication.Internal_OnScheduleMessagePumpWork(const delayMs: Int64);
|
||||
begin
|
||||
if assigned(FOnScheduleMessagePumpWorkEvent) then FOnScheduleMessagePumpWorkEvent(delayMs);
|
||||
if assigned(FOnScheduleMessagePumpWork) then FOnScheduleMessagePumpWork(delayMs);
|
||||
end;
|
||||
|
||||
function TCefApplication.Internal_GetLocalizedString(stringid: Integer; var stringVal: ustring) : boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if assigned(FOnGetLocalizedStringEvent) then FOnGetLocalizedStringEvent(stringId, stringVal, Result);
|
||||
if assigned(FOnGetLocalizedString) then FOnGetLocalizedString(stringId, stringVal, Result);
|
||||
end;
|
||||
|
||||
function TCefApplication.Internal_GetDataResource(resourceId: Integer; var data: Pointer; var dataSize: NativeUInt) : boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if assigned(FOnGetDataResourceEvent) then FOnGetDataResourceEvent(resourceId, data, dataSize, Result);
|
||||
if assigned(FOnGetDataResource) then FOnGetDataResource(resourceId, data, dataSize, Result);
|
||||
end;
|
||||
|
||||
function TCefApplication.Internal_GetDataResourceForScale(resourceId: Integer; scaleFactor: TCefScaleFactor; var data: Pointer; var dataSize: NativeUInt) : boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if assigned(FOnGetDataResourceForScaleEvent) then FOnGetDataResourceForScaleEvent(resourceId, scaleFactor, data, dataSize, Result);
|
||||
if assigned(FOnGetDataResourceForScale) then FOnGetDataResourceForScale(resourceId, scaleFactor, data, dataSize, Result);
|
||||
end;
|
||||
|
||||
procedure TCefApplication.Internal_OnRenderThreadCreated(const extraInfo: ICefListValue);
|
||||
@ -1155,9 +1205,9 @@ begin
|
||||
Result := not(HasResourceBundleHandler) and
|
||||
(FSingleProcess or
|
||||
((FProcessType = ptBrowser) and
|
||||
(assigned(FOnGetLocalizedStringEvent) or
|
||||
assigned(FOnGetDataResourceEvent) or
|
||||
assigned(FOnGetDataResourceForScaleEvent))));
|
||||
(assigned(FOnGetLocalizedString) or
|
||||
assigned(FOnGetDataResource) or
|
||||
assigned(FOnGetDataResourceForScale))));
|
||||
end;
|
||||
|
||||
function TCefApplication.GetMustCreateBrowserProcessHandler : boolean;
|
||||
|
@ -445,6 +445,7 @@ type
|
||||
procedure SavePreferences(const aFileName : string);
|
||||
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
|
||||
procedure ResolveHost(const aURL : ustring);
|
||||
function TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
||||
|
||||
procedure ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl);
|
||||
procedure CloseDevTools(const aDevTools : TWinControl = nil);
|
||||
@ -784,7 +785,7 @@ begin
|
||||
if (FHandler = nil) then
|
||||
begin
|
||||
FIsOSR := aIsOsr;
|
||||
FHandler := TVCLClientHandler.Create(Self, FIsOSR);
|
||||
FHandler := TCustomClientHandler.Create(Self, FIsOSR);
|
||||
Result := True;
|
||||
end;
|
||||
except
|
||||
@ -2023,6 +2024,42 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TChromium.TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
||||
var
|
||||
TempHWND : HWND;
|
||||
TempDC : HDC;
|
||||
TempRect : TRect;
|
||||
TempWidth : Integer;
|
||||
TempHeight : Integer;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not(FIsOSR) then
|
||||
begin
|
||||
TempHWND := GetWindowHandle;
|
||||
|
||||
if (TempHWND <> 0) then
|
||||
begin
|
||||
Winapi.Windows.GetClientRect(TempHWND, TempRect);
|
||||
|
||||
TempDC := GetDC(TempHWND);
|
||||
TempWidth := TempRect.Right - TempRect.Left;
|
||||
TempHeight := TempRect.Bottom - TempRect.Top;
|
||||
|
||||
if (aBitmap <> nil) then FreeAndNil(aBitmap);
|
||||
|
||||
aBitmap := TBitmap.Create;
|
||||
aBitmap.Height := TempHeight;
|
||||
aBitmap.Width := TempWidth;
|
||||
|
||||
Result := BitBlt(aBitmap.Canvas.Handle, 0, 0, TempWidth, TempHeight,
|
||||
TempDC, 0, 0, SRCCOPY);
|
||||
|
||||
ReleaseDC(TempHWND, TempDC);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChromium.SimulateMouseWheel(aDeltaX, aDeltaY : integer);
|
||||
var
|
||||
TempEvent : TCefMouseEvent;
|
||||
|
@ -137,24 +137,6 @@ type
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
TVCLClientHandler = class(TCustomClientHandler)
|
||||
protected
|
||||
function GetMultithreadApp : boolean;
|
||||
function GetExternalMessagePump : boolean;
|
||||
|
||||
public
|
||||
constructor Create(const crm: IChromiumEvents; renderer: Boolean); reintroduce;
|
||||
destructor Destroy; override;
|
||||
|
||||
property MultithreadApp : boolean read GetMultithreadApp;
|
||||
property ExternalMessagePump : boolean read GetExternalMessagePump;
|
||||
end;
|
||||
|
||||
var
|
||||
CefInstances : Integer = 0;
|
||||
|
||||
procedure CefDoMessageLoopWork;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -169,11 +151,8 @@ uses
|
||||
uCEFLifeSpanHandler, uCEFRequestHandler, uCEFRenderHandler, uCEFDragHandler,
|
||||
uCEFFindHandler, uCEFConstants, uCEFApplication;
|
||||
|
||||
var
|
||||
looping : Boolean = False;
|
||||
CefTimer : UINT = 0;
|
||||
|
||||
// ******************************************************
|
||||
// ******************************************************
|
||||
// ****************** TCefClientRef *********************
|
||||
// ******************************************************
|
||||
|
||||
@ -265,26 +244,6 @@ end;
|
||||
// ****************** TCefClientOwn *********************
|
||||
// ******************************************************
|
||||
|
||||
procedure CefDoMessageLoopWork;
|
||||
begin
|
||||
if looping then Exit;
|
||||
|
||||
if (CefInstances > 0) then
|
||||
begin
|
||||
looping := True;
|
||||
|
||||
try
|
||||
cef_do_message_loop_work;
|
||||
finally
|
||||
looping := False;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TimerProc(hwnd: HWND; uMsg: UINT; idEvent: Pointer; dwTime: DWORD); stdcall;
|
||||
begin
|
||||
CefDoMessageLoopWork;
|
||||
end;
|
||||
|
||||
function cef_client_own_get_context_menu_handler(self: PCefClient): PCefContextMenuHandler; stdcall;
|
||||
begin
|
||||
@ -607,68 +566,4 @@ begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
|
||||
// ******************************************************
|
||||
// **************** TVCLClientHandler *******************
|
||||
// ******************************************************
|
||||
|
||||
|
||||
constructor TVCLClientHandler.Create(const crm: IChromiumEvents; renderer : Boolean);
|
||||
begin
|
||||
inherited Create(crm, renderer);
|
||||
|
||||
if not(MultithreadApp) and not(ExternalMessagePump) then
|
||||
begin
|
||||
if (CefInstances = 0) then CefTimer := SetTimer(0, 0, CEF_USER_TIMER_MINIMUM, @TimerProc);
|
||||
InterlockedIncrement(CefInstances);
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TVCLClientHandler.Destroy;
|
||||
begin
|
||||
try
|
||||
try
|
||||
if not(MultithreadApp) and not(ExternalMessagePump) then
|
||||
begin
|
||||
InterlockedDecrement(CefInstances);
|
||||
|
||||
if (CefInstances = 0) and (CefTimer <> 0) then
|
||||
begin
|
||||
KillTimer(0, CefTimer);
|
||||
CefTimer := 0;
|
||||
end;
|
||||
end;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TVCLClientHandler.Destroy', e) then raise;
|
||||
end;
|
||||
finally
|
||||
inherited Destroy;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TVCLClientHandler.GetMultithreadApp : boolean;
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
try
|
||||
if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.MultiThreadedMessageLoop;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TVCLClientHandler.GetMultithreadApp', e) then raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TVCLClientHandler.GetExternalMessagePump : boolean;
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
try
|
||||
if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.ExternalMessagePump;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TVCLClientHandler.GetExternalMessagePump', e) then raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -361,9 +361,13 @@ const
|
||||
CEF_STARTDRAGGING = WM_APP + $A02;
|
||||
CEF_AFTERCREATED = WM_APP + $A03;
|
||||
CEF_PENDINGRESIZE = WM_APP + $A04;
|
||||
CEF_PUMPHAVEWORK = WM_APP + $A05;
|
||||
CEF_DESTROY = WM_APP + $A06;
|
||||
|
||||
CEF_USER_TIMER_MINIMUM = $0000000A;
|
||||
CEF_USER_TIMER_MAXIMUM = $7FFFFFFF;
|
||||
CEF_TIMER_MINIMUM = $0000000A;
|
||||
CEF_TIMER_MAXIMUM = $7FFFFFFF;
|
||||
CEF_TIMER_MAXDELAY = 1000 div 30; // 30fps
|
||||
CEF_TIMER_DELAY_PLACEHOLDER = high(integer);
|
||||
|
||||
CEF4DELPHI_URL = 'https://github.com/salvadordf/CEF4Delphi';
|
||||
CRLF = #13 + #10;
|
||||
|
@ -301,7 +301,7 @@ type
|
||||
function IsReadOnly: Boolean;
|
||||
function HasExcludedElements: Boolean;
|
||||
function GetCount: NativeUInt;
|
||||
function GetElements(Count: NativeUInt): IInterfaceList; // ICefPostDataElement
|
||||
function GetElements(Count: NativeUInt): IInterfaceList; // list of ICefPostDataElement
|
||||
function RemoveElement(const element: ICefPostDataElement): Integer;
|
||||
function AddElement(const element: ICefPostDataElement): Integer;
|
||||
procedure RemoveElements;
|
||||
|
@ -53,11 +53,11 @@ uses
|
||||
{$ELSE}
|
||||
Classes,
|
||||
{$ENDIF}
|
||||
uCEFChromium, uCEFWindowParent, uCEFChromiumWindow, uBufferPanel;
|
||||
uCEFChromium, uCEFWindowParent, uCEFChromiumWindow, uBufferPanel, uCEFWorkScheduler;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Chromium', [TChromium, TCEFWindowParent, TChromiumWindow, TBufferPanel]);
|
||||
RegisterComponents('Chromium', [TChromium, TCEFWindowParent, TChromiumWindow, TBufferPanel, TCEFWorkScheduler]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -48,9 +48,9 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
WinApi.Windows, WinApi.Messages, System.Classes, Vcl.Controls,
|
||||
WinApi.Windows, WinApi.Messages, System.Classes, Vcl.Controls, Vcl.Graphics,
|
||||
{$ELSE}
|
||||
Windows, Messages, Classes, Controls,
|
||||
Windows, Messages, Classes, Controls, Graphics,
|
||||
{$ENDIF}
|
||||
uCEFTypes, uCEFInterfaces;
|
||||
|
||||
@ -64,6 +64,8 @@ type
|
||||
|
||||
public
|
||||
procedure UpdateSize;
|
||||
function TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
||||
|
||||
property ChildWindowHandle : THandle read GetChildWindowHandle;
|
||||
|
||||
published
|
||||
@ -144,4 +146,33 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCEFWindowParent.TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
||||
var
|
||||
TempHWND : HWND;
|
||||
TempDC : HDC;
|
||||
TempRect : TRect;
|
||||
TempWidth : Integer;
|
||||
TempHeight : Integer;
|
||||
begin
|
||||
Result := False;
|
||||
TempHWND := ChildWindowHandle;
|
||||
|
||||
if (TempHWND <> 0) then
|
||||
begin
|
||||
Winapi.Windows.GetClientRect(TempHWND, TempRect);
|
||||
TempDC := GetDC(TempHWND);
|
||||
TempWidth := TempRect.Right - TempRect.Left;
|
||||
TempHeight := TempRect.Bottom - TempRect.Top;
|
||||
|
||||
aBitmap := TBitmap.Create;
|
||||
aBitmap.Height := TempHeight;
|
||||
aBitmap.Width := TempWidth;
|
||||
|
||||
Result := BitBlt(aBitmap.Canvas.Handle, 0, 0, TempWidth, TempHeight,
|
||||
TempDC, 0, 0, SRCCOPY);
|
||||
|
||||
ReleaseDC(TempHWND, TempDC);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
266
source/uCEFWorkScheduler.pas
Normal file
266
source/uCEFWorkScheduler.pas
Normal file
@ -0,0 +1,266 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2017 Salvador Díaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
unit uCEFWorkScheduler;
|
||||
|
||||
{$IFNDEF CPUX64}
|
||||
{$ALIGN ON}
|
||||
{$MINENUMSIZE 4}
|
||||
{$ENDIF}
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
WinApi.Windows, WinApi.Messages, System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms,
|
||||
{$ELSE}
|
||||
Windows, Messages, Classes, Controls, Graphics, Forms,
|
||||
{$ENDIF}
|
||||
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFMiscFunctions, uCEFConstants;
|
||||
|
||||
const
|
||||
TIMER_NIDEVENT = 1;
|
||||
TIMER_DEPLETEWORK_CYCLES = 10;
|
||||
TIMER_DEPLETEWORK_DELAY = 50;
|
||||
|
||||
type
|
||||
TCEFWorkScheduler = class(TComponent)
|
||||
protected
|
||||
FCompHandle : HWND;
|
||||
FDepleteWorkCycles : cardinal;
|
||||
FDepleteWorkDelay : cardinal;
|
||||
FTimerPending : boolean;
|
||||
FIsActive : boolean;
|
||||
FReentrancyDetected : boolean;
|
||||
FStopped : boolean;
|
||||
|
||||
procedure WndProc(var aMessage: TMessage);
|
||||
function SendCompMessage(aMsg, wParam : cardinal; lParam : integer) : boolean;
|
||||
procedure CreateTimer(const delay_ms : int64);
|
||||
procedure TimerTimeout;
|
||||
procedure DoWork;
|
||||
procedure ScheduleWork(const delay_ms : int64);
|
||||
procedure DoMessageLoopWork;
|
||||
function PerformMessageLoopWork : boolean;
|
||||
procedure DestroyTimer;
|
||||
procedure DeallocateWindowHandle;
|
||||
procedure DepleteWork;
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure AfterConstruction; override;
|
||||
procedure ScheduleMessagePumpWork(const delay_ms : int64);
|
||||
procedure StopScheduler;
|
||||
|
||||
property IsTimerPending : boolean read FTimerPending;
|
||||
|
||||
published
|
||||
property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default TIMER_DEPLETEWORK_CYCLES;
|
||||
property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default TIMER_DEPLETEWORK_DELAY;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
System.SysUtils, System.Math,
|
||||
{$ELSE}
|
||||
SysUtils, Math,
|
||||
{$ENDIF}
|
||||
uCEFApplication;
|
||||
|
||||
|
||||
constructor TCEFWorkScheduler.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
FCompHandle := 0;
|
||||
FTimerPending := False;
|
||||
FIsActive := False;
|
||||
FReentrancyDetected := False;
|
||||
FStopped := False;
|
||||
FDepleteWorkCycles := TIMER_DEPLETEWORK_CYCLES;
|
||||
FDepleteWorkDelay := TIMER_DEPLETEWORK_DELAY;
|
||||
end;
|
||||
|
||||
destructor TCEFWorkScheduler.Destroy;
|
||||
begin
|
||||
DestroyTimer;
|
||||
DeallocateWindowHandle;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.AfterConstruction;
|
||||
begin
|
||||
inherited AfterConstruction;
|
||||
|
||||
if not(csDesigning in ComponentState) then
|
||||
FCompHandle := AllocateHWnd(WndProc);
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.WndProc(var aMessage: TMessage);
|
||||
begin
|
||||
case aMessage.Msg of
|
||||
WM_TIMER : TimerTimeout;
|
||||
CEF_PUMPHAVEWORK : ScheduleWork(aMessage.lParam);
|
||||
else aMessage.Result := DefWindowProc(FCompHandle, aMessage.Msg, aMessage.WParam, aMessage.LParam);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCEFWorkScheduler.SendCompMessage(aMsg, wParam : cardinal; lParam : integer) : boolean;
|
||||
begin
|
||||
Result := not(FStopped) and (FCompHandle <> 0) and PostMessage(FCompHandle, aMsg, wParam, lParam);
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.CreateTimer(const delay_ms : int64);
|
||||
begin
|
||||
if not(FTimerPending) and
|
||||
not(FStopped) and
|
||||
(delay_ms > 0) and
|
||||
(SetTimer(FCompHandle, TIMER_NIDEVENT, cardinal(delay_ms), nil) <> 0) then
|
||||
FTimerPending := True;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.DestroyTimer;
|
||||
begin
|
||||
if FTimerPending and KillTimer(FCompHandle, TIMER_NIDEVENT) then FTimerPending := False;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.DeallocateWindowHandle;
|
||||
begin
|
||||
if (FCompHandle <> 0) then
|
||||
begin
|
||||
DeallocateHWnd(FCompHandle);
|
||||
FCompHandle := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.DepleteWork;
|
||||
var
|
||||
i : cardinal;
|
||||
begin
|
||||
i := FDepleteWorkCycles;
|
||||
|
||||
while (i > 0) do
|
||||
begin
|
||||
DoMessageLoopWork;
|
||||
Sleep(FDepleteWorkDelay);
|
||||
dec(i);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.ScheduleMessagePumpWork(const delay_ms : int64);
|
||||
begin
|
||||
SendCompMessage(CEF_PUMPHAVEWORK, 0, LPARAM(delay_ms));
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.StopScheduler;
|
||||
begin
|
||||
FStopped := True;
|
||||
DestroyTimer;
|
||||
DepleteWork;
|
||||
DeallocateWindowHandle;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.TimerTimeout;
|
||||
begin
|
||||
if not(FStopped) then
|
||||
begin
|
||||
DestroyTimer;
|
||||
DoWork;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.DoWork;
|
||||
var
|
||||
TempWasReentrant : boolean;
|
||||
begin
|
||||
TempWasReentrant := PerformMessageLoopWork;
|
||||
|
||||
if TempWasReentrant then
|
||||
ScheduleMessagePumpWork(0)
|
||||
else
|
||||
if not(IsTimerPending) then
|
||||
ScheduleMessagePumpWork(CEF_TIMER_DELAY_PLACEHOLDER);
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.ScheduleWork(const delay_ms : int64);
|
||||
begin
|
||||
if FStopped or
|
||||
((delay_ms = CEF_TIMER_DELAY_PLACEHOLDER) and IsTimerPending) then
|
||||
exit;
|
||||
|
||||
DestroyTimer;
|
||||
|
||||
if (delay_ms <= 0) then
|
||||
DoWork
|
||||
else
|
||||
if (delay_ms > CEF_TIMER_MAXDELAY) then
|
||||
CreateTimer(CEF_TIMER_MAXDELAY)
|
||||
else
|
||||
CreateTimer(delay_ms);
|
||||
end;
|
||||
|
||||
procedure TCEFWorkScheduler.DoMessageLoopWork;
|
||||
begin
|
||||
if (GlobalCEFApp <> nil) then GlobalCEFApp.DoMessageLoopWork;
|
||||
end;
|
||||
|
||||
function TCEFWorkScheduler.PerformMessageLoopWork : boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if FIsActive then
|
||||
begin
|
||||
FReentrancyDetected := True;
|
||||
exit;
|
||||
end;
|
||||
|
||||
FReentrancyDetected := False;
|
||||
|
||||
FIsActive := True;
|
||||
DoMessageLoopWork;
|
||||
FIsActive := False;
|
||||
|
||||
Result := FReentrancyDetected;
|
||||
end;
|
||||
|
||||
end.
|
Loading…
x
Reference in New Issue
Block a user