You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Moved uCEFLinkedWinControlBase to the source directory
Fixed build issues in Delphi with uCEFLinkedWinControlBase Fixed GetDeviceScaleFactor for MacOS in FMX Updated Readme
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# CEF4Delphi [](https://twitter.com/intent/tweet?text=Use%20CEF4Delphi%20to%20embed%20Chromium-based%20browsers%20in%20your%20application&url=https://github.com/salvadordf/CEF4Delphi&via=briskbard&hashtags=cef4delphi,delphi,lazarus,fpc)
|
# CEF4Delphi [](https://twitter.com/intent/tweet?text=Use%20CEF4Delphi%20to%20embed%20Chromium-based%20browsers%20in%20your%20application&url=https://github.com/salvadordf/CEF4Delphi&via=briskbard&hashtags=cef4delphi,delphi,lazarus,fpc)
|
||||||
CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with [Delphi](https://www.embarcadero.com/products/delphi/starter) or [Lazarus/FPC](https://www.lazarus-ide.org/) for Windows and Linux.
|
CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with [Delphi](https://www.embarcadero.com/products/delphi/starter) or [Lazarus/FPC](https://www.lazarus-ide.org/) for Windows and Linux.
|
||||||
|
|
||||||
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
||||||
|
|
||||||
CEF4Delphi uses CEF 88.2.9 which includes Chromium 88.0.4324.182.
|
CEF4Delphi uses CEF 88.2.9 which includes Chromium 88.0.4324.182.
|
||||||
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
||||||
|
|||||||
@@ -222,7 +222,8 @@ contains
|
|||||||
uCEFPrintHandler in '..\source\uCEFPrintHandler.pas',
|
uCEFPrintHandler in '..\source\uCEFPrintHandler.pas',
|
||||||
uCEFPrintDialogCallback in '..\source\uCEFPrintDialogCallback.pas',
|
uCEFPrintDialogCallback in '..\source\uCEFPrintDialogCallback.pas',
|
||||||
uCEFPrintJobCallback in '..\source\uCEFPrintJobCallback.pas',
|
uCEFPrintJobCallback in '..\source\uCEFPrintJobCallback.pas',
|
||||||
uCEFWorkSchedulerQueueThread in '..\source\uCEFWorkSchedulerQueueThread.pas';
|
uCEFWorkSchedulerQueueThread in '..\source\uCEFWorkSchedulerQueueThread.pas',
|
||||||
|
uCEFLinkedWinControlBase in '..\source\uCEFLinkedWinControlBase.pas';
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ contains
|
|||||||
uCEFPrintHandler in '..\source\uCEFPrintHandler.pas',
|
uCEFPrintHandler in '..\source\uCEFPrintHandler.pas',
|
||||||
uCEFPrintDialogCallback in '..\source\uCEFPrintDialogCallback.pas',
|
uCEFPrintDialogCallback in '..\source\uCEFPrintDialogCallback.pas',
|
||||||
uCEFPrintJobCallback in '..\source\uCEFPrintJobCallback.pas',
|
uCEFPrintJobCallback in '..\source\uCEFPrintJobCallback.pas',
|
||||||
uCEFWorkSchedulerQueueThread in '..\source\uCEFWorkSchedulerQueueThread.pas';
|
uCEFWorkSchedulerQueueThread in '..\source\uCEFWorkSchedulerQueueThread.pas',
|
||||||
|
uCEFLinkedWinControlBase in '..\source\uCEFLinkedWinControlBase.pas';
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@@ -230,7 +230,8 @@ contains
|
|||||||
uCEFLinuxConstants in '..\source\uCEFLinuxConstants.pas',
|
uCEFLinuxConstants in '..\source\uCEFLinuxConstants.pas',
|
||||||
uCEFLinuxTypes in '..\source\uCEFLinuxTypes.pas',
|
uCEFLinuxTypes in '..\source\uCEFLinuxTypes.pas',
|
||||||
uCEFLinuxFunctions in '..\source\uCEFLinuxFunctions.pas',
|
uCEFLinuxFunctions in '..\source\uCEFLinuxFunctions.pas',
|
||||||
uCEFWorkSchedulerQueueThread in '..\source\uCEFWorkSchedulerQueueThread.pas';
|
uCEFWorkSchedulerQueueThread in '..\source\uCEFWorkSchedulerQueueThread.pas',
|
||||||
|
uCEFLinkedWinControlBase in '..\source\uCEFLinkedWinControlBase.pas';
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
@@ -346,6 +346,7 @@
|
|||||||
<DCCReference Include="..\source\uCEFLinuxTypes.pas"/>
|
<DCCReference Include="..\source\uCEFLinuxTypes.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFLinuxFunctions.pas"/>
|
<DCCReference Include="..\source\uCEFLinuxFunctions.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFWorkSchedulerQueueThread.pas"/>
|
<DCCReference Include="..\source\uCEFWorkSchedulerQueueThread.pas"/>
|
||||||
|
<DCCReference Include="..\source\uCEFLinkedWinControlBase.pas"/>
|
||||||
<BuildConfiguration Include="Base">
|
<BuildConfiguration Include="Base">
|
||||||
<Key>Base</Key>
|
<Key>Base</Key>
|
||||||
</BuildConfiguration>
|
</BuildConfiguration>
|
||||||
|
|||||||
@@ -828,7 +828,7 @@
|
|||||||
<UnitName Value="uCEFWorkSchedulerQueueThread"/>
|
<UnitName Value="uCEFWorkSchedulerQueueThread"/>
|
||||||
</Item197>
|
</Item197>
|
||||||
<Item198>
|
<Item198>
|
||||||
<Filename Value="uCEFLinkedWinControlBase.pas"/>
|
<Filename Value="..\source\uCEFLinkedWinControlBase.pas"/>
|
||||||
<UnitName Value="uCEFLinkedWinControlBase"/>
|
<UnitName Value="uCEFLinkedWinControlBase"/>
|
||||||
</Item198>
|
</Item198>
|
||||||
</Files>
|
</Files>
|
||||||
|
|||||||
@@ -291,7 +291,6 @@ begin
|
|||||||
Result := FUseSetFocus;
|
Result := FUseSetFocus;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// This is a workaround for the CEF issue #2026
|
// This is a workaround for the CEF issue #2026
|
||||||
// https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on
|
// https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on
|
||||||
// We use ChromiumWindow1.OnEnter, ChromiumWindow1.OnExit and
|
// We use ChromiumWindow1.OnEnter, ChromiumWindow1.OnExit and
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, {$ENDIF} System.Classes, Vcl.Controls, Vcl.Graphics,
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages,{$ENDIF} System.Classes, Vcl.Controls, Vcl.Graphics,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows,{$ENDIF} Classes, Controls,
|
{$IFDEF MSWINDOWS}Windows, Messages,{$ENDIF} Classes, Controls,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
LCLProc, LCLType, LCLIntf,
|
LCLProc, LCLType, LCLIntf,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@@ -88,13 +88,12 @@ implementation
|
|||||||
|
|
||||||
{ TCEFLinkedWinControlBase }
|
{ TCEFLinkedWinControlBase }
|
||||||
|
|
||||||
{$IFDEF FPC}
|
|
||||||
|
|
||||||
function TCEFLinkedWinControlBase.GetUseSetFocus: Boolean;
|
function TCEFLinkedWinControlBase.GetUseSetFocus: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF FPC}
|
||||||
procedure TCEFLinkedWinControlBase.SetVisible(Value: Boolean);
|
procedure TCEFLinkedWinControlBase.SetVisible(Value: Boolean);
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
var
|
var
|
||||||
@@ -50,7 +50,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages,{$ENDIF} System.Classes, Vcl.Controls,
|
{$IFDEF MSWINDOWS}WinApi.Windows,{$ENDIF} System.Classes, Vcl.Controls,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows,{$ENDIF} Classes, Forms, Controls, Graphics,
|
{$IFDEF MSWINDOWS}Windows,{$ENDIF} Classes, Forms, Controls, Graphics,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
|
|||||||
@@ -1548,7 +1548,7 @@ begin
|
|||||||
Result := CreateAbsolutePath(Result, GetCurrentDirUTF8);
|
Result := CreateAbsolutePath(Result, GetCurrentDirUTF8);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
if Result.Contains(MAC_APP_POSTFIX + MAC_APP_SUBPATH) then
|
if Result.Contains(MAC_APP_POSTFIX + MAC_APP_SUBPATH) then
|
||||||
Result := Result.Remove(Result.LastIndexOf(MAC_APP_SUBPATH));
|
Result := Result.Remove(Result.IndexOf(MAC_APP_SUBPATH));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
@@ -2210,15 +2210,17 @@ begin
|
|||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
// TODO: Find a way to get the screen scale in Lazarus/FPC for MacOS
|
// TODO: Find a way to get the screen scale in Lazarus/FPC for MacOS
|
||||||
Result := USER_DEFAULT_SCREEN_DPI;
|
Result := USER_DEFAULT_SCREEN_DPI;
|
||||||
{$ELSE}
|
|
||||||
Result := trunc(MainScreen.backingScaleFactor);
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetDeviceScaleFactor : single;
|
function GetDeviceScaleFactor : single;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF MACOS}
|
||||||
|
Result := MainScreen.backingScaleFactor;
|
||||||
|
{$ELSE}
|
||||||
Result := GetScreenDPI / USER_DEFAULT_SCREEN_DPI;
|
Result := GetScreenDPI / USER_DEFAULT_SCREEN_DPI;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList) : boolean;
|
function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList) : boolean;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 262,
|
"InternalVersion" : 263,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "88.2.9.0"
|
"Version" : "88.2.9.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user