mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-12-14 09:42:54 +02:00
26c6f6696d
- New TCEFServerComponent. The new CEF3 includes a http and websockets server for communication between applications in localhost. - New JSDialogBrowser demo to showhow to use custom forms in javascript dialogs. - New SimpleServer demo which uses TCEFServerComponent. - Removed all the code that could be removed from the DPR files and moved to another units. - Now the GlogalCEFApp checks all the CEF3 binaries and stores the missing files in GlogalCEFApp.MissingLibFiles. The default error message gives a list of missing files. - New GlobalCEFApp.Status property. Use it with GlobalCEFApp.ShowMessageDlg set to False if you want to show customized error messages. - Now TCEFClient only creates the necessary handlers if you use any their events in TChromium. - Fixed a destruction bug in OSRExternalPumpBrowser - Added the procedures to handle WM_ENTERMENULOOP and WM_EXITMENULOOP to all the demos.
385 lines
8.7 KiB
PHP
385 lines
8.7 KiB
PHP
// ************************************************************************
|
|
// ***************************** 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}
|
|
|