You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Update to CEF 102.0.8
This commit is contained in:
18
README.md
18
README.md
@ -3,18 +3,18 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
|
|||||||
|
|
||||||
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 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 101.0.18 which includes Chromium 101.0.4951.67.
|
CEF4Delphi uses CEF 102.0.8 which includes Chromium 102.0.5005.61.
|
||||||
|
|
||||||
The CEF binaries used by CEF4Delphi are available for download at Spotify :
|
The CEF binaries used by CEF4Delphi are available for download at Spotify :
|
||||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_windows32.tar.bz2)
|
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_windows32.tar.bz2)
|
||||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_windows64.tar.bz2)
|
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_windows64.tar.bz2)
|
||||||
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_linux32.tar.bz2)
|
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_linux32.tar.bz2)
|
||||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_linux64.tar.bz2)
|
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_linux64.tar.bz2)
|
||||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_linuxarm.tar.bz2)
|
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_linuxarm.tar.bz2)
|
||||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_linuxarm64.tar.bz2)
|
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_linuxarm64.tar.bz2)
|
||||||
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_101.0.18%2Bg367b4a0%2Bchromium-101.0.4951.67_macosx64.tar.bz2)
|
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_102.0.8%2Bg60bd108%2Bchromium-102.0.5005.61_macosx64.tar.bz2)
|
||||||
|
|
||||||
CEF4Delphi was developed and tested on Delphi 11.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.0/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
CEF4Delphi was developed and tested on Delphi 11.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.2/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||||
|
|
||||||
CEF4Delphi demos have been tested in Windows 7, Windows 10, Windows 11, Linux Mint 20.3 and Raspberry Pi OS.
|
CEF4Delphi demos have been tested in Windows 7, Windows 10, Windows 11, Linux Mint 20.3 and Raspberry Pi OS.
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ type
|
|||||||
procedure Chromium1CookiesFlushed(Sender: TObject);
|
procedure Chromium1CookiesFlushed(Sender: TObject);
|
||||||
procedure Chromium1ZoomPctAvailable(Sender: TObject; const aZoomPct: Double);
|
procedure Chromium1ZoomPctAvailable(Sender: TObject; const aZoomPct: Double);
|
||||||
procedure Chromium1DevToolsMethodResult(Sender: TObject; const browser: ICefBrowser; message_id: Integer; success: Boolean; const result: ICefValue);
|
procedure Chromium1DevToolsMethodResult(Sender: TObject; const browser: ICefBrowser; message_id: Integer; success: Boolean; const result: ICefValue);
|
||||||
procedure Chromium1FileDialog(Sender: TObject; const browser: ICefBrowser; mode: Cardinal; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback; out Result: Boolean);
|
procedure Chromium1FileDialog(Sender: TObject; const browser: ICefBrowser; mode: Cardinal; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback; var Result: Boolean);
|
||||||
procedure Chromium1SelectClientCertificate(Sender: TObject; const browser: ICefBrowser; isProxy: Boolean; const host: ustring; port: Integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback; var aResult: Boolean);
|
procedure Chromium1SelectClientCertificate(Sender: TObject; const browser: ICefBrowser; isProxy: Boolean; const host: ustring; port: Integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback; var aResult: Boolean);
|
||||||
procedure Chromium1CursorChange(Sender: TObject; const browser: ICefBrowser; cursor_: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult: Boolean);
|
procedure Chromium1CursorChange(Sender: TObject; const browser: ICefBrowser; cursor_: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult: Boolean);
|
||||||
procedure Chromium1CanDownload(Sender: TObject; const browser: ICefBrowser; const url, request_method: ustring; var aResult: Boolean);
|
procedure Chromium1CanDownload(Sender: TObject; const browser: ICefBrowser; const url, request_method: ustring; var aResult: Boolean);
|
||||||
@ -313,6 +313,7 @@ begin
|
|||||||
GlobalCEFApp.EnableGPU := True;
|
GlobalCEFApp.EnableGPU := True;
|
||||||
GlobalCEFApp.LogFile := 'debug.log';
|
GlobalCEFApp.LogFile := 'debug.log';
|
||||||
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||||
|
//GlobalCEFApp.ChromeRuntime := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
||||||
@ -663,16 +664,14 @@ procedure TMiniBrowserFrm.Chromium1FileDialog( Sender : TOb
|
|||||||
const title : ustring;
|
const title : ustring;
|
||||||
const defaultFilePath : ustring;
|
const defaultFilePath : ustring;
|
||||||
const acceptFilters : TStrings;
|
const acceptFilters : TStrings;
|
||||||
selectedAcceptFilter : Integer;
|
|
||||||
const callback : ICefFileDialogCallback;
|
const callback : ICefFileDialogCallback;
|
||||||
out Result : Boolean);
|
var Result : Boolean);
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
FFileDialogInfo.Mode := mode;
|
FFileDialogInfo.Mode := mode;
|
||||||
FFileDialogInfo.Title := title;
|
FFileDialogInfo.Title := title;
|
||||||
FFileDialogInfo.DefaultFilePath := defaultFilePath;
|
FFileDialogInfo.DefaultFilePath := defaultFilePath;
|
||||||
FFileDialogInfo.SelectedAcceptFilter := selectedAcceptFilter;
|
|
||||||
FFileDialogInfo.Callback := callback;
|
FFileDialogInfo.Callback := callback;
|
||||||
FFileDialogInfo.AcceptFilters := acceptFilters;
|
FFileDialogInfo.AcceptFilters := acceptFilters;
|
||||||
|
|
||||||
@ -691,12 +690,9 @@ begin
|
|||||||
TempDialog.Title := FFileDialogInfo.Title;
|
TempDialog.Title := FFileDialogInfo.Title;
|
||||||
TempDialog.InitialDir := FFileDialogInfo.DefaultFilePath;
|
TempDialog.InitialDir := FFileDialogInfo.DefaultFilePath;
|
||||||
TempDialog.Filter := FFileDialogInfo.DialogFilter;
|
TempDialog.Filter := FFileDialogInfo.DialogFilter;
|
||||||
TempDialog.FilterIndex := FFileDialogInfo.SelectedAcceptFilter;
|
|
||||||
TempOptions := TempDialog.Options;
|
TempOptions := TempDialog.Options;
|
||||||
|
|
||||||
if aMultiple then include(TempOptions, ofAllowMultiSelect);
|
if aMultiple then include(TempOptions, ofAllowMultiSelect);
|
||||||
if FFileDialogInfo.OverwritePrompt then include(TempOptions, ofOverwritePrompt);
|
|
||||||
if FFileDialogInfo.HideReadOnly then include(TempOptions, ofHideReadOnly);
|
|
||||||
|
|
||||||
TempDialog.Options := TempOptions;
|
TempDialog.Options := TempOptions;
|
||||||
|
|
||||||
@ -707,8 +703,6 @@ begin
|
|||||||
else
|
else
|
||||||
aFilePaths.Add(TempDialog.FileName);
|
aFilePaths.Add(TempDialog.FileName);
|
||||||
|
|
||||||
FFileDialogInfo.SelectedAcceptFilter := TempDialog.FilterIndex;
|
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -745,14 +739,10 @@ begin
|
|||||||
TempDialog := TSaveDialog.Create(Application.MainForm);
|
TempDialog := TSaveDialog.Create(Application.MainForm);
|
||||||
TempDialog.Title := FFileDialogInfo.Title;
|
TempDialog.Title := FFileDialogInfo.Title;
|
||||||
TempDialog.Filter := FFileDialogInfo.DialogFilter;
|
TempDialog.Filter := FFileDialogInfo.DialogFilter;
|
||||||
TempDialog.FilterIndex := FFileDialogInfo.SelectedAcceptFilter;
|
|
||||||
TempDialog.FileName := ExtractFileName(FFileDialogInfo.DefaultFilePath);
|
TempDialog.FileName := ExtractFileName(FFileDialogInfo.DefaultFilePath);
|
||||||
TempDialog.InitialDir := ExtractFileDir(FFileDialogInfo.DefaultFilePath);
|
TempDialog.InitialDir := ExtractFileDir(FFileDialogInfo.DefaultFilePath);
|
||||||
TempOptions := TempDialog.Options;
|
TempOptions := TempDialog.Options;
|
||||||
|
|
||||||
if FFileDialogInfo.OverwritePrompt then include(TempOptions, ofOverwritePrompt);
|
|
||||||
if FFileDialogInfo.HideReadOnly then include(TempOptions, ofHideReadOnly);
|
|
||||||
|
|
||||||
TempDialog.Options := TempOptions;
|
TempDialog.Options := TempOptions;
|
||||||
|
|
||||||
if TempDialog.Execute(Handle) and
|
if TempDialog.Execute(Handle) and
|
||||||
@ -781,7 +771,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if TempResult then
|
if TempResult then
|
||||||
FFileDialogInfo.Callback.Cont(FFileDialogInfo.SelectedAcceptFilter, TempFilePaths)
|
FFileDialogInfo.Callback.Cont(TempFilePaths)
|
||||||
else
|
else
|
||||||
FFileDialogInfo.Callback.Cancel;
|
FFileDialogInfo.Callback.Cancel;
|
||||||
|
|
||||||
@ -1266,6 +1256,10 @@ begin
|
|||||||
// if TChromium.MultiBrowserMode is enabled then we have to close all
|
// if TChromium.MultiBrowserMode is enabled then we have to close all
|
||||||
// stored browsers and not only the main browser.
|
// stored browsers and not only the main browser.
|
||||||
Chromium1.CloseAllBrowsers;
|
Chromium1.CloseAllBrowsers;
|
||||||
|
|
||||||
|
// Workaround for the missing TChormium.OnClose event when "Chrome runtime" is enabled.
|
||||||
|
if GlobalCEFApp.ChromeRuntime then
|
||||||
|
CEFWindowParent1.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -78,6 +78,9 @@
|
|||||||
</SyntaxOptions>
|
</SyntaxOptions>
|
||||||
</Parsing>
|
</Parsing>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<DebugInfoType Value="dsDwarf2Set"/>
|
||||||
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
<GraphicApplication Value="True"/>
|
<GraphicApplication Value="True"/>
|
||||||
|
@ -61,6 +61,9 @@
|
|||||||
</SyntaxOptions>
|
</SyntaxOptions>
|
||||||
</Parsing>
|
</Parsing>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<DebugInfoType Value="dsDwarf2Set"/>
|
||||||
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
<GraphicApplication Value="True"/>
|
<GraphicApplication Value="True"/>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
||||||
<License Value="MPL 1.1"/>
|
<License Value="MPL 1.1"/>
|
||||||
<Version Major="101" Release="18"/>
|
<Version Major="102" Release="8"/>
|
||||||
<Files Count="202">
|
<Files Count="202">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||||
|
@ -66,15 +66,15 @@ uses
|
|||||||
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar;
|
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar;
|
||||||
|
|
||||||
const
|
const
|
||||||
CEF_SUPPORTED_VERSION_MAJOR = 101;
|
CEF_SUPPORTED_VERSION_MAJOR = 102;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 0;
|
CEF_SUPPORTED_VERSION_MINOR = 0;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 18;
|
CEF_SUPPORTED_VERSION_RELEASE = 8;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = 101;
|
CEF_CHROMEELF_VERSION_MAJOR = 101;
|
||||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||||
CEF_CHROMEELF_VERSION_RELEASE = 4951;
|
CEF_CHROMEELF_VERSION_RELEASE = 5005;
|
||||||
CEF_CHROMEELF_VERSION_BUILD = 67;
|
CEF_CHROMEELF_VERSION_BUILD = 61;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
LIBCEF_DLL = 'libcef.dll';
|
LIBCEF_DLL = 'libcef.dll';
|
||||||
|
@ -97,8 +97,8 @@ type
|
|||||||
function GetRequestContext: ICefRequestContext;
|
function GetRequestContext: ICefRequestContext;
|
||||||
function GetZoomLevel: Double;
|
function GetZoomLevel: Double;
|
||||||
procedure SetZoomLevel(const zoomLevel: Double);
|
procedure SetZoomLevel(const zoomLevel: Double);
|
||||||
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefRunFileDialogCallback);
|
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefRunFileDialogCallback);
|
||||||
procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: TCefRunFileDialogCallbackProc);
|
procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: TCefRunFileDialogCallbackProc);
|
||||||
procedure StartDownload(const url: ustring);
|
procedure StartDownload(const url: ustring);
|
||||||
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback);
|
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback);
|
||||||
procedure DownloadImageProc(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: TOnDownloadImageFinishedProc);
|
procedure DownloadImageProc(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: TOnDownloadImageFinishedProc);
|
||||||
@ -458,7 +458,6 @@ procedure TCefBrowserHostRef.RunFileDialog( mode : TCefFile
|
|||||||
const title : ustring;
|
const title : ustring;
|
||||||
const defaultFilePath : ustring;
|
const defaultFilePath : ustring;
|
||||||
const acceptFilters : TStrings;
|
const acceptFilters : TStrings;
|
||||||
selectedAcceptFilter : Integer;
|
|
||||||
const callback : ICefRunFileDialogCallback);
|
const callback : ICefRunFileDialogCallback);
|
||||||
var
|
var
|
||||||
TempTitle, TempPath : TCefString;
|
TempTitle, TempPath : TCefString;
|
||||||
@ -476,7 +475,6 @@ begin
|
|||||||
@TempTitle,
|
@TempTitle,
|
||||||
@TempPath,
|
@TempPath,
|
||||||
TempAcceptFilters.Handle,
|
TempAcceptFilters.Handle,
|
||||||
selectedAcceptFilter,
|
|
||||||
CefGetData(callback));
|
CefGetData(callback));
|
||||||
finally
|
finally
|
||||||
TempAcceptFilters := nil;
|
TempAcceptFilters := nil;
|
||||||
@ -487,10 +485,9 @@ procedure TCefBrowserHostRef.RunFileDialogProc( mode : TCef
|
|||||||
const title : ustring;
|
const title : ustring;
|
||||||
const defaultFilePath : ustring;
|
const defaultFilePath : ustring;
|
||||||
const acceptFilters : TStrings;
|
const acceptFilters : TStrings;
|
||||||
selectedAcceptFilter : Integer;
|
|
||||||
const callback : TCefRunFileDialogCallbackProc);
|
const callback : TCefRunFileDialogCallbackProc);
|
||||||
begin
|
begin
|
||||||
RunFileDialog(mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, TCefFastRunFileDialogCallback.Create(callback));
|
RunFileDialog(mode, title, defaultFilePath, acceptFilters, TCefFastRunFileDialogCallback.Create(callback));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefBrowserHostRef.AddWordToDictionary(const word: ustring);
|
procedure TCefBrowserHostRef.AddWordToDictionary(const word: ustring);
|
||||||
|
@ -580,7 +580,7 @@ type
|
|||||||
function doCanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean; virtual;
|
function doCanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean; virtual;
|
||||||
|
|
||||||
// ICefDialogHandler
|
// ICefDialogHandler
|
||||||
function doOnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean; virtual;
|
function doOnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback): Boolean; virtual;
|
||||||
|
|
||||||
// ICefRenderHandler
|
// ICefRenderHandler
|
||||||
procedure doOnGetAccessibilityHandler(var aAccessibilityHandler : ICefAccessibilityHandler); virtual;
|
procedure doOnGetAccessibilityHandler(var aAccessibilityHandler : ICefAccessibilityHandler); virtual;
|
||||||
@ -5499,14 +5499,12 @@ function TChromiumCore.doOnFileDialog(const browser : ICefBrowser;
|
|||||||
const title : ustring;
|
const title : ustring;
|
||||||
const defaultFilePath : ustring;
|
const defaultFilePath : ustring;
|
||||||
const acceptFilters : TStrings;
|
const acceptFilters : TStrings;
|
||||||
selectedAcceptFilter : Integer;
|
|
||||||
const callback : ICefFileDialogCallback): Boolean;
|
const callback : ICefFileDialogCallback): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
if assigned(FOnFileDialog) then
|
if assigned(FOnFileDialog) then
|
||||||
FOnFileDialog(Self, browser, mode, title, defaultFilePath, acceptFilters,
|
FOnFileDialog(Self, browser, mode, title, defaultFilePath, acceptFilters, callback, Result);
|
||||||
selectedAcceptFilter, callback, Result);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChromiumCore.doOnFindResult(const browser : ICefBrowser;
|
procedure TChromiumCore.doOnFindResult(const browser : ICefBrowser;
|
||||||
|
@ -136,7 +136,7 @@ type
|
|||||||
TOnCanSaveCookie = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie; var aResult : boolean) of object;
|
TOnCanSaveCookie = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie; var aResult : boolean) of object;
|
||||||
|
|
||||||
// ICefDialogHandler
|
// ICefDialogHandler
|
||||||
TOnFileDialog = procedure(Sender: TObject; const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback; out Result: Boolean) of Object;
|
TOnFileDialog = procedure(Sender: TObject; const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback; var Result: Boolean) of Object;
|
||||||
|
|
||||||
// ICefRenderHandler
|
// ICefRenderHandler
|
||||||
TOnGetAccessibilityHandler = procedure(Sender: TObject; var aAccessibilityHandler : ICefAccessibilityHandler) of Object;
|
TOnGetAccessibilityHandler = procedure(Sender: TObject; var aAccessibilityHandler : ICefAccessibilityHandler) of Object;
|
||||||
|
@ -475,9 +475,6 @@ const
|
|||||||
FILE_DIALOG_OPEN_MULTIPLE = $00000001;
|
FILE_DIALOG_OPEN_MULTIPLE = $00000001;
|
||||||
FILE_DIALOG_OPEN_FOLDER = $00000002;
|
FILE_DIALOG_OPEN_FOLDER = $00000002;
|
||||||
FILE_DIALOG_SAVE = $00000003;
|
FILE_DIALOG_SAVE = $00000003;
|
||||||
FILE_DIALOG_TYPE_MASK = $000000FF;
|
|
||||||
FILE_DIALOG_OVERWRITEPROMPT_FLAG = $01000000;
|
|
||||||
FILE_DIALOG_HIDEREADONLY_FLAG = $02000000;
|
|
||||||
|
|
||||||
// /include/internal/cef_types.h (cef_uri_unescape_rule_t)
|
// /include/internal/cef_types.h (cef_uri_unescape_rule_t)
|
||||||
UU_NONE = 0;
|
UU_NONE = 0;
|
||||||
|
@ -59,7 +59,7 @@ uses
|
|||||||
type
|
type
|
||||||
TCefDialogHandlerOwn = class(TCefBaseRefCountedOwn, ICefDialogHandler)
|
TCefDialogHandlerOwn = class(TCefBaseRefCountedOwn, ICefDialogHandler)
|
||||||
protected
|
protected
|
||||||
function OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean; virtual;
|
function OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback): Boolean; virtual;
|
||||||
|
|
||||||
procedure RemoveReferences; virtual;
|
procedure RemoveReferences; virtual;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ type
|
|||||||
protected
|
protected
|
||||||
FEvents : Pointer;
|
FEvents : Pointer;
|
||||||
|
|
||||||
function OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title: ustring; const defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean; override;
|
function OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title: ustring; const defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback): Boolean; override;
|
||||||
|
|
||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
@ -96,7 +96,6 @@ function cef_dialog_handler_on_file_dialog(self : PCefDialogH
|
|||||||
const title : PCefString;
|
const title : PCefString;
|
||||||
const default_file_path : PCefString;
|
const default_file_path : PCefString;
|
||||||
accept_filters : TCefStringList;
|
accept_filters : TCefStringList;
|
||||||
selected_accept_filter : Integer;
|
|
||||||
callback : PCefFileDialogCallback): Integer; stdcall;
|
callback : PCefFileDialogCallback): Integer; stdcall;
|
||||||
var
|
var
|
||||||
TempSL : TStringList;
|
TempSL : TStringList;
|
||||||
@ -121,7 +120,6 @@ begin
|
|||||||
CefString(title),
|
CefString(title),
|
||||||
CefString(default_file_path),
|
CefString(default_file_path),
|
||||||
TempSL,
|
TempSL,
|
||||||
selected_accept_filter,
|
|
||||||
TCefFileDialogCallbackRef.UnWrap(callback)));
|
TCefFileDialogCallbackRef.UnWrap(callback)));
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
@ -145,7 +143,6 @@ function TCefDialogHandlerOwn.OnFileDialog(const browser : ICefBr
|
|||||||
const title : ustring;
|
const title : ustring;
|
||||||
const defaultFilePath : ustring;
|
const defaultFilePath : ustring;
|
||||||
const acceptFilters : TStrings;
|
const acceptFilters : TStrings;
|
||||||
selectedAcceptFilter : Integer;
|
|
||||||
const callback : ICefFileDialogCallback): Boolean;
|
const callback : ICefFileDialogCallback): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -182,15 +179,14 @@ function TCustomDialogHandler.OnFileDialog(const browser : ICefBrow
|
|||||||
const title : ustring;
|
const title : ustring;
|
||||||
const defaultFilePath : ustring;
|
const defaultFilePath : ustring;
|
||||||
const acceptFilters : TStrings;
|
const acceptFilters : TStrings;
|
||||||
selectedAcceptFilter : Integer;
|
|
||||||
const callback : ICefFileDialogCallback): Boolean;
|
const callback : ICefFileDialogCallback): Boolean;
|
||||||
begin
|
begin
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
Result := IChromiumEvents(FEvents).doOnFileDialog(browser, mode, title, defaultFilePath,
|
Result := IChromiumEvents(FEvents).doOnFileDialog(browser, mode, title, defaultFilePath,
|
||||||
acceptFilters, selectedAcceptFilter, callback)
|
acceptFilters, callback)
|
||||||
else
|
else
|
||||||
Result := inherited OnFileDialog(browser, mode, title, defaultFilePath,
|
Result := inherited OnFileDialog(browser, mode, title, defaultFilePath,
|
||||||
acceptFilters, selectedAcceptFilter, callback);
|
acceptFilters, callback);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -59,7 +59,7 @@ uses
|
|||||||
type
|
type
|
||||||
TCefFileDialogCallbackRef = class(TCefBaseRefCountedRef, ICefFileDialogCallback)
|
TCefFileDialogCallbackRef = class(TCefBaseRefCountedRef, ICefFileDialogCallback)
|
||||||
protected
|
protected
|
||||||
procedure Cont(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
procedure Cont(const filePaths: TStrings);
|
||||||
procedure Cancel;
|
procedure Cancel;
|
||||||
public
|
public
|
||||||
class function UnWrap(data: Pointer): ICefFileDialogCallback;
|
class function UnWrap(data: Pointer): ICefFileDialogCallback;
|
||||||
@ -75,7 +75,7 @@ begin
|
|||||||
PCefFileDialogCallback(FData)^.cancel(FData);
|
PCefFileDialogCallback(FData)^.cancel(FData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefFileDialogCallbackRef.Cont(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
procedure TCefFileDialogCallbackRef.Cont(const filePaths: TStrings);
|
||||||
var
|
var
|
||||||
TempSL : ICefStringList;
|
TempSL : ICefStringList;
|
||||||
begin
|
begin
|
||||||
@ -84,7 +84,6 @@ begin
|
|||||||
TempSL.AddStrings(filePaths);
|
TempSL.AddStrings(filePaths);
|
||||||
|
|
||||||
PCefFileDialogCallback(FData)^.cont(PCefFileDialogCallback(FData),
|
PCefFileDialogCallback(FData)^.cont(PCefFileDialogCallback(FData),
|
||||||
selectedAcceptFilter,
|
|
||||||
TempSL.Handle);
|
TempSL.Handle);
|
||||||
finally
|
finally
|
||||||
TempSL := nil;
|
TempSL := nil;
|
||||||
|
@ -63,7 +63,6 @@ type
|
|||||||
FTitle : ustring;
|
FTitle : ustring;
|
||||||
FDefaultFilePath : ustring;
|
FDefaultFilePath : ustring;
|
||||||
FAcceptFilters : TStrings;
|
FAcceptFilters : TStrings;
|
||||||
FSelectedAcceptFilter : Integer;
|
|
||||||
FCallback : ICefFileDialogCallback;
|
FCallback : ICefFileDialogCallback;
|
||||||
FDefaultAudioFileDesc : ustring;
|
FDefaultAudioFileDesc : ustring;
|
||||||
FDefaultVideoFileDesc : ustring;
|
FDefaultVideoFileDesc : ustring;
|
||||||
@ -72,8 +71,6 @@ type
|
|||||||
FDefaultAllFileDesc : ustring;
|
FDefaultAllFileDesc : ustring;
|
||||||
FDefaultUnknownFileDesc : ustring;
|
FDefaultUnknownFileDesc : ustring;
|
||||||
|
|
||||||
function GetOverwritePrompt : boolean;
|
|
||||||
function GetHideReadonly : boolean;
|
|
||||||
function GetDialogFilter : ustring; virtual;
|
function GetDialogFilter : ustring; virtual;
|
||||||
function GetDialogType : TCEFDialogType;
|
function GetDialogType : TCEFDialogType;
|
||||||
|
|
||||||
@ -91,10 +88,7 @@ type
|
|||||||
property Title : ustring read FTitle write FTitle;
|
property Title : ustring read FTitle write FTitle;
|
||||||
property DefaultFilePath : ustring read FDefaultFilePath write FDefaultFilePath;
|
property DefaultFilePath : ustring read FDefaultFilePath write FDefaultFilePath;
|
||||||
property AcceptFilters : TStrings write SetAcceptFilters;
|
property AcceptFilters : TStrings write SetAcceptFilters;
|
||||||
property SelectedAcceptFilter : Integer read FSelectedAcceptFilter write FSelectedAcceptFilter;
|
|
||||||
property Callback : ICefFileDialogCallback read FCallback write FCallback;
|
property Callback : ICefFileDialogCallback read FCallback write FCallback;
|
||||||
property OverwritePrompt : boolean read GetOverwritePrompt;
|
|
||||||
property HideReadonly : boolean read GetHideReadonly;
|
|
||||||
property DialogFilter : ustring read GetDialogFilter;
|
property DialogFilter : ustring read GetDialogFilter;
|
||||||
property DialogType : TCEFDialogType read GetDialogType;
|
property DialogType : TCEFDialogType read GetDialogType;
|
||||||
property DefaultAudioFileDesc : ustring read FDefaultAudioFileDesc write FDefaultAudioFileDesc;
|
property DefaultAudioFileDesc : ustring read FDefaultAudioFileDesc write FDefaultAudioFileDesc;
|
||||||
@ -117,7 +111,6 @@ begin
|
|||||||
FMode := 0;
|
FMode := 0;
|
||||||
FTitle := '';
|
FTitle := '';
|
||||||
FDefaultFilePath := '';
|
FDefaultFilePath := '';
|
||||||
FSelectedAcceptFilter := 0;
|
|
||||||
FCallback := nil;
|
FCallback := nil;
|
||||||
FAcceptFilters := nil;
|
FAcceptFilters := nil;
|
||||||
FDefaultAudioFileDesc := 'Audio files';
|
FDefaultAudioFileDesc := 'Audio files';
|
||||||
@ -143,26 +136,15 @@ begin
|
|||||||
FMode := 0;
|
FMode := 0;
|
||||||
FTitle := '';
|
FTitle := '';
|
||||||
FDefaultFilePath := '';
|
FDefaultFilePath := '';
|
||||||
FSelectedAcceptFilter := 0;
|
|
||||||
FCallback := nil;
|
FCallback := nil;
|
||||||
|
|
||||||
if assigned(FAcceptFilters) then
|
if assigned(FAcceptFilters) then
|
||||||
FAcceptFilters.Clear;
|
FAcceptFilters.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEFFileDialogInfo.GetOverwritePrompt : boolean;
|
|
||||||
begin
|
|
||||||
Result := ((FMode and FILE_DIALOG_OVERWRITEPROMPT_FLAG) <> 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TCEFFileDialogInfo.GetHideReadonly : boolean;
|
|
||||||
begin
|
|
||||||
Result := ((FMode and FILE_DIALOG_HIDEREADONLY_FLAG) <> 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TCEFFileDialogInfo.GetDialogType : TCEFDialogType;
|
function TCEFFileDialogInfo.GetDialogType : TCEFDialogType;
|
||||||
begin
|
begin
|
||||||
case (FMode and FILE_DIALOG_TYPE_MASK) of
|
case FMode of
|
||||||
FILE_DIALOG_OPEN : Result := dtOpen;
|
FILE_DIALOG_OPEN : Result := dtOpen;
|
||||||
FILE_DIALOG_OPEN_MULTIPLE : Result := dtOpenMultiple;
|
FILE_DIALOG_OPEN_MULTIPLE : Result := dtOpenMultiple;
|
||||||
FILE_DIALOG_OPEN_FOLDER : Result := dtOpenFolder;
|
FILE_DIALOG_OPEN_FOLDER : Result := dtOpenFolder;
|
||||||
|
@ -241,7 +241,7 @@ type
|
|||||||
TCefDomVisitorProc2 = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser : ICefBrowser; const frame: ICefFrame; const document: ICefDomDocument);
|
TCefDomVisitorProc2 = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser : ICefBrowser; const frame: ICefFrame; const document: ICefDomDocument);
|
||||||
TCefDomVisitorProc3 = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser : ICefBrowser; const frame: ICefFrame; const document: ICefDomDocument; const aValue : ustring);
|
TCefDomVisitorProc3 = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser : ICefBrowser; const frame: ICefFrame; const document: ICefDomDocument; const aValue : ustring);
|
||||||
TCefStringVisitorProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const str: ustring);
|
TCefStringVisitorProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const str: ustring);
|
||||||
TCefRunFileDialogCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
TCefRunFileDialogCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const filePaths: TStrings);
|
||||||
TCefCompletionCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure();
|
TCefCompletionCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure();
|
||||||
TCefSetCookieCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(success: Boolean);
|
TCefSetCookieCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(success: Boolean);
|
||||||
TCefDeleteCookiesCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(numDeleted: Integer);
|
TCefDeleteCookiesCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(numDeleted: Integer);
|
||||||
@ -389,7 +389,7 @@ type
|
|||||||
function doCanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean;
|
function doCanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean;
|
||||||
|
|
||||||
// ICefDialogHandler
|
// ICefDialogHandler
|
||||||
function doOnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean;
|
function doOnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback): Boolean;
|
||||||
|
|
||||||
// ICefRenderHandler
|
// ICefRenderHandler
|
||||||
procedure doOnGetAccessibilityHandler(var aAccessibilityHandler : ICefAccessibilityHandler);
|
procedure doOnGetAccessibilityHandler(var aAccessibilityHandler : ICefAccessibilityHandler);
|
||||||
@ -562,7 +562,7 @@ type
|
|||||||
// /include/capi/cef_browser_capi.h (cef_run_file_dialog_callback_t)
|
// /include/capi/cef_browser_capi.h (cef_run_file_dialog_callback_t)
|
||||||
ICefRunFileDialogCallback = interface(ICefBaseRefCounted)
|
ICefRunFileDialogCallback = interface(ICefBaseRefCounted)
|
||||||
['{59FCECC6-E897-45BA-873B-F09586C4BE47}']
|
['{59FCECC6-E897-45BA-873B-F09586C4BE47}']
|
||||||
procedure OnFileDialogDismissed(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
procedure OnFileDialogDismissed(const filePaths: TStrings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TCefNavigationEntryVisitor
|
// TCefNavigationEntryVisitor
|
||||||
@ -600,8 +600,8 @@ type
|
|||||||
function GetRequestContext: ICefRequestContext;
|
function GetRequestContext: ICefRequestContext;
|
||||||
function GetZoomLevel: Double;
|
function GetZoomLevel: Double;
|
||||||
procedure SetZoomLevel(const zoomLevel: Double);
|
procedure SetZoomLevel(const zoomLevel: Double);
|
||||||
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefRunFileDialogCallback);
|
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefRunFileDialogCallback);
|
||||||
procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: TCefRunFileDialogCallbackProc);
|
procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: TCefRunFileDialogCallbackProc);
|
||||||
procedure StartDownload(const url: ustring);
|
procedure StartDownload(const url: ustring);
|
||||||
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback);
|
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback);
|
||||||
procedure Print;
|
procedure Print;
|
||||||
@ -2050,7 +2050,7 @@ type
|
|||||||
// /include/capi/cef_dialog_handler_capi.h (cef_dialog_handler_t)
|
// /include/capi/cef_dialog_handler_capi.h (cef_dialog_handler_t)
|
||||||
ICefDialogHandler = interface(ICefBaseRefCounted)
|
ICefDialogHandler = interface(ICefBaseRefCounted)
|
||||||
['{7763F4B2-8BE1-4E80-AC43-8B825850DC67}']
|
['{7763F4B2-8BE1-4E80-AC43-8B825850DC67}']
|
||||||
function OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean;
|
function OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefFileDialogCallback): Boolean;
|
||||||
|
|
||||||
procedure RemoveReferences; // custom procedure to clear all references
|
procedure RemoveReferences; // custom procedure to clear all references
|
||||||
end;
|
end;
|
||||||
@ -2146,7 +2146,7 @@ type
|
|||||||
// /include/capi/cef_dialog_handler_capi.h (cef_file_dialog_callback_t)
|
// /include/capi/cef_dialog_handler_capi.h (cef_file_dialog_callback_t)
|
||||||
ICefFileDialogCallback = interface(ICefBaseRefCounted)
|
ICefFileDialogCallback = interface(ICefBaseRefCounted)
|
||||||
['{1AF659AB-4522-4E39-9C52-184000D8E3C7}']
|
['{1AF659AB-4522-4E39-9C52-184000D8E3C7}']
|
||||||
procedure Cont(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
procedure Cont(const filePaths: TStrings);
|
||||||
procedure Cancel;
|
procedure Cancel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2944,6 +2944,7 @@ type
|
|||||||
['{52D4EE2C-303B-42B6-A35F-30D03834A23F}']
|
['{52D4EE2C-303B-42B6-A35F-30D03834A23F}']
|
||||||
procedure OnWindowCreated(const window: ICefWindow);
|
procedure OnWindowCreated(const window: ICefWindow);
|
||||||
procedure OnWindowDestroyed(const window: ICefWindow);
|
procedure OnWindowDestroyed(const window: ICefWindow);
|
||||||
|
procedure OnWindowActivationChanged(const window: ICefWindow; active: boolean);
|
||||||
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
|
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
|
||||||
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState);
|
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState);
|
||||||
@ -2960,6 +2961,7 @@ type
|
|||||||
['{05C19A41-E75D-459E-AD4D-C8A0CA4A49D3}']
|
['{05C19A41-E75D-459E-AD4D-C8A0CA4A49D3}']
|
||||||
procedure doOnWindowCreated(const window: ICefWindow);
|
procedure doOnWindowCreated(const window: ICefWindow);
|
||||||
procedure doOnWindowDestroyed(const window: ICefWindow);
|
procedure doOnWindowDestroyed(const window: ICefWindow);
|
||||||
|
procedure doOnWindowActivationChanged(const window: ICefWindow; active: boolean);
|
||||||
procedure doOnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure doOnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
procedure doOnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
|
procedure doOnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
|
||||||
procedure doOnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState);
|
procedure doOnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState);
|
||||||
|
@ -1266,8 +1266,6 @@ begin
|
|||||||
TempList.Add(TempDir + 'vulkan-1.dll');
|
TempList.Add(TempDir + 'vulkan-1.dll');
|
||||||
TempList.Add(TempDir + 'libEGL.dll');
|
TempList.Add(TempDir + 'libEGL.dll');
|
||||||
TempList.Add(TempDir + 'libGLESv2.dll');
|
TempList.Add(TempDir + 'libGLESv2.dll');
|
||||||
TempList.Add(TempDir + 'swiftshader\libEGL.dll');
|
|
||||||
TempList.Add(TempDir + 'swiftshader\libGLESv2.dll');
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
TempList.Add(TempDir + 'libEGL.so');
|
TempList.Add(TempDir + 'libEGL.so');
|
||||||
@ -1275,8 +1273,6 @@ begin
|
|||||||
TempList.Add(TempDir + 'libvk_swiftshader.so');
|
TempList.Add(TempDir + 'libvk_swiftshader.so');
|
||||||
TempList.Add(TempDir + 'vk_swiftshader_icd.json');
|
TempList.Add(TempDir + 'vk_swiftshader_icd.json');
|
||||||
TempList.Add(TempDir + 'libvulkan.so.1');
|
TempList.Add(TempDir + 'libvulkan.so.1');
|
||||||
TempList.Add(TempDir + 'swiftshader/libEGL.so');
|
|
||||||
TempList.Add(TempDir + 'swiftshader/libGLESv2.so');
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
TempList.Add(TempDir + 'icudtl.dat');
|
TempList.Add(TempDir + 'icudtl.dat');
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ uses
|
|||||||
type
|
type
|
||||||
TCefRunFileDialogCallbackOwn = class(TCefBaseRefCountedOwn, ICefRunFileDialogCallback)
|
TCefRunFileDialogCallbackOwn = class(TCefBaseRefCountedOwn, ICefRunFileDialogCallback)
|
||||||
protected
|
protected
|
||||||
procedure OnFileDialogDismissed(selectedAcceptFilter: Integer; const filePaths: TStrings); virtual;
|
procedure OnFileDialogDismissed(const filePaths: TStrings); virtual;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
@ -69,7 +69,7 @@ type
|
|||||||
protected
|
protected
|
||||||
FCallback: TCefRunFileDialogCallbackProc;
|
FCallback: TCefRunFileDialogCallbackProc;
|
||||||
|
|
||||||
procedure OnFileDialogDismissed(selectedAcceptFilter: Integer; const filePaths: TStrings); override;
|
procedure OnFileDialogDismissed(const filePaths: TStrings); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(callback: TCefRunFileDialogCallbackProc); reintroduce; virtual;
|
constructor Create(callback: TCefRunFileDialogCallbackProc); reintroduce; virtual;
|
||||||
@ -81,7 +81,6 @@ uses
|
|||||||
uCEFTypes, uCEFMiscFunctions, uCEFLibFunctions, uCEFStringList;
|
uCEFTypes, uCEFMiscFunctions, uCEFLibFunctions, uCEFStringList;
|
||||||
|
|
||||||
procedure cef_run_file_dialog_callback_on_file_dialog_dismissed(self : PCefRunFileDialogCallback;
|
procedure cef_run_file_dialog_callback_on_file_dialog_dismissed(self : PCefRunFileDialogCallback;
|
||||||
selected_accept_filter : Integer;
|
|
||||||
file_paths : TCefStringList); stdcall;
|
file_paths : TCefStringList); stdcall;
|
||||||
var
|
var
|
||||||
TempSL : TStringList;
|
TempSL : TStringList;
|
||||||
@ -99,7 +98,7 @@ begin
|
|||||||
TempCefSL := TCefStringListRef.Create(file_paths);
|
TempCefSL := TCefStringListRef.Create(file_paths);
|
||||||
TempCefSL.CopyToStrings(TempSL);
|
TempCefSL.CopyToStrings(TempSL);
|
||||||
|
|
||||||
TCefRunFileDialogCallbackOwn(TempObject).OnFileDialogDismissed(selected_accept_filter, TempSL);
|
TCefRunFileDialogCallbackOwn(TempObject).OnFileDialogDismissed(TempSL);
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
on e : exception do
|
on e : exception do
|
||||||
@ -116,20 +115,19 @@ constructor TCefRunFileDialogCallbackOwn.Create;
|
|||||||
begin
|
begin
|
||||||
inherited CreateData(SizeOf(TCefRunFileDialogCallback));
|
inherited CreateData(SizeOf(TCefRunFileDialogCallback));
|
||||||
|
|
||||||
with PCefRunFileDialogCallback(FData)^ do
|
PCefRunFileDialogCallback(FData)^.on_file_dialog_dismissed := {$IFDEF FPC}@{$ENDIF}cef_run_file_dialog_callback_on_file_dialog_dismissed;
|
||||||
on_file_dialog_dismissed := {$IFDEF FPC}@{$ENDIF}cef_run_file_dialog_callback_on_file_dialog_dismissed;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefRunFileDialogCallbackOwn.OnFileDialogDismissed(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
procedure TCefRunFileDialogCallbackOwn.OnFileDialogDismissed(const filePaths: TStrings);
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TCefFastRunFileDialogCallback
|
// TCefFastRunFileDialogCallback
|
||||||
|
|
||||||
procedure TCefFastRunFileDialogCallback.OnFileDialogDismissed(selectedAcceptFilter: Integer; const filePaths: TStrings);
|
procedure TCefFastRunFileDialogCallback.OnFileDialogDismissed(const filePaths: TStrings);
|
||||||
begin
|
begin
|
||||||
FCallback(selectedAcceptFilter, filePaths);
|
FCallback(filePaths);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCefFastRunFileDialogCallback.Create(callback: TCefRunFileDialogCallbackProc);
|
constructor TCefFastRunFileDialogCallback.Create(callback: TCefRunFileDialogCallbackProc);
|
||||||
|
@ -821,7 +821,8 @@ type
|
|||||||
CEF_CHANNEL_LAYOUT_DISCRETE,
|
CEF_CHANNEL_LAYOUT_DISCRETE,
|
||||||
CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC,
|
CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC,
|
||||||
CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE,
|
CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE,
|
||||||
CEF_CHANNEL_LAYOUT_BITSTREAM // CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_BITSTREAM
|
CEF_CHANNEL_LAYOUT_BITSTREAM,
|
||||||
|
CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX // CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX
|
||||||
);
|
);
|
||||||
|
|
||||||
// /include/internal/cef_types.h (cef_cookie_same_site_t)
|
// /include/internal/cef_types.h (cef_cookie_same_site_t)
|
||||||
@ -1520,14 +1521,14 @@ type
|
|||||||
// /include/capi/cef_dialog_handler_capi.h (cef_file_dialog_callback_t)
|
// /include/capi/cef_dialog_handler_capi.h (cef_file_dialog_callback_t)
|
||||||
TCefFileDialogCallback = record
|
TCefFileDialogCallback = record
|
||||||
base : TCefBaseRefCounted;
|
base : TCefBaseRefCounted;
|
||||||
cont : procedure(self: PCefFileDialogCallback; selected_accept_filter: Integer; file_paths: TCefStringList); stdcall;
|
cont : procedure(self: PCefFileDialogCallback; file_paths: TCefStringList); stdcall;
|
||||||
cancel : procedure(self: PCefFileDialogCallback); stdcall;
|
cancel : procedure(self: PCefFileDialogCallback); stdcall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// /include/capi/cef_dialog_handler_capi.h (cef_dialog_handler_t)
|
// /include/capi/cef_dialog_handler_capi.h (cef_dialog_handler_t)
|
||||||
TCefDialogHandler = record
|
TCefDialogHandler = record
|
||||||
base : TCefBaseRefCounted;
|
base : TCefBaseRefCounted;
|
||||||
on_file_dialog : function(self: PCefDialogHandler; browser: PCefBrowser; mode: TCefFileDialogMode; const title, default_file_path: PCefString; accept_filters: TCefStringList; selected_accept_filter: Integer; callback: PCefFileDialogCallback): Integer; stdcall;
|
on_file_dialog : function(self: PCefDialogHandler; browser: PCefBrowser; mode: TCefFileDialogMode; const title, default_file_path: PCefString; accept_filters: TCefStringList; callback: PCefFileDialogCallback): Integer; stdcall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// /include/capi/cef_display_handler_capi.h (cef_display_handler_t)
|
// /include/capi/cef_display_handler_capi.h (cef_display_handler_t)
|
||||||
@ -2144,7 +2145,7 @@ type
|
|||||||
// /include/capi/cef_browser_capi.h (cef_run_file_dialog_callback_t)
|
// /include/capi/cef_browser_capi.h (cef_run_file_dialog_callback_t)
|
||||||
TCefRunFileDialogCallback = record
|
TCefRunFileDialogCallback = record
|
||||||
base : TCefBaseRefCounted;
|
base : TCefBaseRefCounted;
|
||||||
on_file_dialog_dismissed : procedure(self: PCefRunFileDialogCallback; selected_accept_filter: Integer; file_paths: TCefStringList); stdcall;
|
on_file_dialog_dismissed : procedure(self: PCefRunFileDialogCallback; file_paths: TCefStringList); stdcall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// /include/capi/cef_browser_capi.h (cef_download_image_callback_t)
|
// /include/capi/cef_browser_capi.h (cef_download_image_callback_t)
|
||||||
@ -2867,7 +2868,7 @@ type
|
|||||||
get_request_context : function(self: PCefBrowserHost): PCefRequestContext; stdcall;
|
get_request_context : function(self: PCefBrowserHost): PCefRequestContext; stdcall;
|
||||||
get_zoom_level : function(self: PCefBrowserHost): Double; stdcall;
|
get_zoom_level : function(self: PCefBrowserHost): Double; stdcall;
|
||||||
set_zoom_level : procedure(self: PCefBrowserHost; zoomLevel: Double); stdcall;
|
set_zoom_level : procedure(self: PCefBrowserHost; zoomLevel: Double); stdcall;
|
||||||
run_file_dialog : procedure(self: PCefBrowserHost; mode: TCefFileDialogMode; const title, default_file_path: PCefString; accept_filters: TCefStringList; selected_accept_filter: Integer; callback: PCefRunFileDialogCallback); stdcall;
|
run_file_dialog : procedure(self: PCefBrowserHost; mode: TCefFileDialogMode; const title, default_file_path: PCefString; accept_filters: TCefStringList; callback: PCefRunFileDialogCallback); stdcall;
|
||||||
start_download : procedure(self: PCefBrowserHost; const url: PCefString); stdcall;
|
start_download : procedure(self: PCefBrowserHost; const url: PCefString); stdcall;
|
||||||
download_image : procedure(self: PCefBrowserHost; const image_url: PCefString; is_favicon: Integer; max_image_size: Cardinal; bypass_cache: Integer; callback: PCefDownloadImageCallback); stdcall;
|
download_image : procedure(self: PCefBrowserHost; const image_url: PCefString; is_favicon: Integer; max_image_size: Cardinal; bypass_cache: Integer; callback: PCefDownloadImageCallback); stdcall;
|
||||||
print : procedure(self: PCefBrowserHost); stdcall;
|
print : procedure(self: PCefBrowserHost); stdcall;
|
||||||
@ -3360,6 +3361,7 @@ type
|
|||||||
base : TCefPanelDelegate;
|
base : TCefPanelDelegate;
|
||||||
on_window_created : procedure(self: PCefWindowDelegate; window: PCefWindow); stdcall;
|
on_window_created : procedure(self: PCefWindowDelegate; window: PCefWindow); stdcall;
|
||||||
on_window_destroyed : procedure(self: PCefWindowDelegate; window: PCefWindow); stdcall;
|
on_window_destroyed : procedure(self: PCefWindowDelegate; window: PCefWindow); stdcall;
|
||||||
|
on_window_activation_changed : procedure(self: PCefWindowDelegate; window: PCefWindow; active: integer); stdcall;
|
||||||
get_parent_window : function(self: PCefWindowDelegate; window: PCefWindow; is_menu, can_activate_menu: PInteger): PCefWindow; stdcall;
|
get_parent_window : function(self: PCefWindowDelegate; window: PCefWindow; is_menu, can_activate_menu: PInteger): PCefWindow; stdcall;
|
||||||
get_initial_bounds : function(self: PCefWindowDelegate; window: PCefWindow): TCefRect; stdcall;
|
get_initial_bounds : function(self: PCefWindowDelegate; window: PCefWindow): TCefRect; stdcall;
|
||||||
get_initial_show_state : function(self: PCefWindowDelegate; window: PCefWindow): TCefShowState; stdcall;
|
get_initial_show_state : function(self: PCefWindowDelegate; window: PCefWindow): TCefShowState; stdcall;
|
||||||
|
@ -92,6 +92,7 @@ type
|
|||||||
// ICefWindowDelegate
|
// ICefWindowDelegate
|
||||||
TOnWindowCreatedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
|
TOnWindowCreatedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
|
||||||
TOnWindowDestroyedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
|
TOnWindowDestroyedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
|
||||||
|
TOnWindowActivationChangedEvent = procedure(const Sender: TObject; const window: ICefWindow; active: boolean) of object;
|
||||||
TOnGetParentWindowEvent = procedure(const Sender: TObject; const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow) of object;
|
TOnGetParentWindowEvent = procedure(const Sender: TObject; const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow) of object;
|
||||||
TOnGetInitialBoundsEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : TCefRect) of object;
|
TOnGetInitialBoundsEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : TCefRect) of object;
|
||||||
TOnGetInitialShowStateEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : TCefShowState) of object;
|
TOnGetInitialShowStateEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : TCefShowState) of object;
|
||||||
|
@ -69,6 +69,7 @@ type
|
|||||||
// ICefWindowDelegateEvents
|
// ICefWindowDelegateEvents
|
||||||
FOnWindowCreated : TOnWindowCreatedEvent;
|
FOnWindowCreated : TOnWindowCreatedEvent;
|
||||||
FOnWindowDestroyed : TOnWindowDestroyedEvent;
|
FOnWindowDestroyed : TOnWindowDestroyedEvent;
|
||||||
|
FOnWindowActivationChanged : TOnWindowActivationChangedEvent;
|
||||||
FOnGetParentWindow : TOnGetParentWindowEvent;
|
FOnGetParentWindow : TOnGetParentWindowEvent;
|
||||||
FOnGetInitialBounds : TOnGetInitialBoundsEvent;
|
FOnGetInitialBounds : TOnGetInitialBoundsEvent;
|
||||||
FOnGetInitialShowState : TOnGetInitialShowStateEvent;
|
FOnGetInitialShowState : TOnGetInitialShowStateEvent;
|
||||||
@ -109,6 +110,7 @@ type
|
|||||||
// ICefWindowDelegateEvents
|
// ICefWindowDelegateEvents
|
||||||
procedure doOnWindowCreated(const window_: ICefWindow);
|
procedure doOnWindowCreated(const window_: ICefWindow);
|
||||||
procedure doOnWindowDestroyed(const window_: ICefWindow);
|
procedure doOnWindowDestroyed(const window_: ICefWindow);
|
||||||
|
procedure doOnWindowActivationChanged(const window_: ICefWindow; active: boolean);
|
||||||
procedure doOnGetParentWindow(const window_: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure doOnGetParentWindow(const window_: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
procedure doOnGetInitialBounds(const window_: ICefWindow; var aResult : TCefRect);
|
procedure doOnGetInitialBounds(const window_: ICefWindow; var aResult : TCefRect);
|
||||||
procedure doOnGetInitialShowState(const window_: ICefWindow; var aResult : TCefShowState);
|
procedure doOnGetInitialShowState(const window_: ICefWindow; var aResult : TCefShowState);
|
||||||
@ -162,6 +164,7 @@ type
|
|||||||
published
|
published
|
||||||
property OnWindowCreated : TOnWindowCreatedEvent read FOnWindowCreated write FOnWindowCreated;
|
property OnWindowCreated : TOnWindowCreatedEvent read FOnWindowCreated write FOnWindowCreated;
|
||||||
property OnWindowDestroyed : TOnWindowDestroyedEvent read FOnWindowDestroyed write FOnWindowDestroyed;
|
property OnWindowDestroyed : TOnWindowDestroyedEvent read FOnWindowDestroyed write FOnWindowDestroyed;
|
||||||
|
property OnWindowActivationChanged : TOnWindowActivationChangedEvent read FOnWindowActivationChanged write FOnWindowActivationChanged;
|
||||||
property OnGetParentWindow : TOnGetParentWindowEvent read FOnGetParentWindow write FOnGetParentWindow;
|
property OnGetParentWindow : TOnGetParentWindowEvent read FOnGetParentWindow write FOnGetParentWindow;
|
||||||
property OnGetInitialBounds : TOnGetInitialBoundsEvent read FOnGetInitialBounds write FOnGetInitialBounds;
|
property OnGetInitialBounds : TOnGetInitialBoundsEvent read FOnGetInitialBounds write FOnGetInitialBounds;
|
||||||
property OnGetInitialShowState : TOnGetInitialShowStateEvent read FOnGetInitialShowState write FOnGetInitialShowState;
|
property OnGetInitialShowState : TOnGetInitialShowStateEvent read FOnGetInitialShowState write FOnGetInitialShowState;
|
||||||
@ -218,6 +221,7 @@ begin
|
|||||||
FWindowDlg := nil;
|
FWindowDlg := nil;
|
||||||
FOnWindowCreated := nil;
|
FOnWindowCreated := nil;
|
||||||
FOnWindowDestroyed := nil;
|
FOnWindowDestroyed := nil;
|
||||||
|
FOnWindowActivationChanged := nil;
|
||||||
FOnGetParentWindow := nil;
|
FOnGetParentWindow := nil;
|
||||||
FOnGetInitialBounds := nil;
|
FOnGetInitialBounds := nil;
|
||||||
FOnGetInitialShowState := nil;
|
FOnGetInitialShowState := nil;
|
||||||
@ -300,6 +304,12 @@ begin
|
|||||||
FWindow := nil;
|
FWindow := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEFWindowComponent.doOnWindowActivationChanged(const window_: ICefWindow; active: boolean);
|
||||||
|
begin
|
||||||
|
if assigned(FOnWindowActivationChanged) then
|
||||||
|
FOnWindowActivationChanged(self, window_, active);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEFWindowComponent.doOnGetParentWindow(const window_: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure TCEFWindowComponent.doOnGetParentWindow(const window_: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
begin
|
begin
|
||||||
if assigned(FOnGetParentWindow) then
|
if assigned(FOnGetParentWindow) then
|
||||||
|
@ -61,6 +61,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure OnWindowCreated(const window: ICefWindow);
|
procedure OnWindowCreated(const window: ICefWindow);
|
||||||
procedure OnWindowDestroyed(const window: ICefWindow);
|
procedure OnWindowDestroyed(const window: ICefWindow);
|
||||||
|
procedure OnWindowActivationChanged(const window: ICefWindow; active: boolean);
|
||||||
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
|
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
|
||||||
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState);
|
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState);
|
||||||
@ -80,6 +81,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure OnWindowCreated(const window: ICefWindow); virtual;
|
procedure OnWindowCreated(const window: ICefWindow); virtual;
|
||||||
procedure OnWindowDestroyed(const window: ICefWindow); virtual;
|
procedure OnWindowDestroyed(const window: ICefWindow); virtual;
|
||||||
|
procedure OnWindowActivationChanged(const window: ICefWindow; active: boolean); virtual;
|
||||||
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow); virtual;
|
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow); virtual;
|
||||||
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect); virtual;
|
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect); virtual;
|
||||||
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState); virtual;
|
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState); virtual;
|
||||||
@ -116,6 +118,7 @@ type
|
|||||||
// ICefWindowDelegate
|
// ICefWindowDelegate
|
||||||
procedure OnWindowCreated(const window: ICefWindow); override;
|
procedure OnWindowCreated(const window: ICefWindow); override;
|
||||||
procedure OnWindowDestroyed(const window: ICefWindow); override;
|
procedure OnWindowDestroyed(const window: ICefWindow); override;
|
||||||
|
procedure OnWindowActivationChanged(const window: ICefWindow; active: boolean); override;
|
||||||
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow); override;
|
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow); override;
|
||||||
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect); override;
|
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect); override;
|
||||||
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState); override;
|
procedure OnGetInitialShowState(const window: ICefWindow; var aResult : TCefShowState); override;
|
||||||
@ -151,6 +154,11 @@ begin
|
|||||||
PCefWindowDelegate(FData)^.on_window_destroyed(PCefWindowDelegate(FData), CefGetData(window));
|
PCefWindowDelegate(FData)^.on_window_destroyed(PCefWindowDelegate(FData), CefGetData(window));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCefWindowDelegateRef.OnWindowActivationChanged(const window: ICefWindow; active: boolean);
|
||||||
|
begin
|
||||||
|
PCefWindowDelegate(FData)^.on_window_activation_changed(PCefWindowDelegate(FData), CefGetData(window), ord(active));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCefWindowDelegateRef.OnGetParentWindow(const window : ICefWindow;
|
procedure TCefWindowDelegateRef.OnGetParentWindow(const window : ICefWindow;
|
||||||
var is_menu : boolean;
|
var is_menu : boolean;
|
||||||
var can_activate_menu : boolean;
|
var can_activate_menu : boolean;
|
||||||
@ -246,6 +254,17 @@ begin
|
|||||||
TCefWindowDelegateOwn(TempObject).OnWindowDestroyed(TCefWindowRef.UnWrap(window));
|
TCefWindowDelegateOwn(TempObject).OnWindowDestroyed(TCefWindowRef.UnWrap(window));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure cef_window_delegate_on_window_activation_changed(self: PCefWindowDelegate; window: PCefWindow; active: integer); stdcall;
|
||||||
|
var
|
||||||
|
TempObject : TObject;
|
||||||
|
begin
|
||||||
|
TempObject := CefGetObject(self);
|
||||||
|
|
||||||
|
if (TempObject <> nil) and (TempObject is TCefWindowDelegateOwn) then
|
||||||
|
TCefWindowDelegateOwn(TempObject).OnWindowActivationChanged(TCefWindowRef.UnWrap(window),
|
||||||
|
active <> 0);
|
||||||
|
end;
|
||||||
|
|
||||||
function cef_window_delegate_get_parent_window(self : PCefWindowDelegate;
|
function cef_window_delegate_get_parent_window(self : PCefWindowDelegate;
|
||||||
window : PCefWindow;
|
window : PCefWindow;
|
||||||
is_menu : PInteger;
|
is_menu : PInteger;
|
||||||
@ -424,6 +443,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
on_window_created := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_on_window_created;
|
on_window_created := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_on_window_created;
|
||||||
on_window_destroyed := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_on_window_destroyed;
|
on_window_destroyed := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_on_window_destroyed;
|
||||||
|
on_window_activation_changed := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_on_window_activation_changed;
|
||||||
get_parent_window := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_get_parent_window;
|
get_parent_window := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_get_parent_window;
|
||||||
get_initial_bounds := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_get_initial_bounds;
|
get_initial_bounds := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_get_initial_bounds;
|
||||||
get_initial_show_state := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_get_initial_show_state;
|
get_initial_show_state := {$IFDEF FPC}@{$ENDIF}cef_window_delegate_get_initial_show_state;
|
||||||
@ -447,6 +467,11 @@ begin
|
|||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCefWindowDelegateOwn.OnWindowActivationChanged(const window: ICefWindow; active: boolean);
|
||||||
|
begin
|
||||||
|
//
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCefWindowDelegateOwn.OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure TCefWindowDelegateOwn.OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
@ -641,6 +666,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomWindowDelegate.OnWindowActivationChanged(const window: ICefWindow; active: boolean);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
if (FEvents <> nil) then
|
||||||
|
ICefWindowDelegateEvents(FEvents).doOnWindowActivationChanged(window, active);
|
||||||
|
except
|
||||||
|
on e : exception do
|
||||||
|
if CustomExceptionHandler('TCustomWindowDelegate.OnWindowActivationChanged', e) then raise;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomWindowDelegate.OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
procedure TCustomWindowDelegate.OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 395,
|
"InternalVersion" : 396,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "101.0.18.0"
|
"Version" : "102.0.8.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpdatePackageData" : {
|
"UpdatePackageData" : {
|
||||||
|
Reference in New Issue
Block a user