Fixed cursor handling in MiniBrowser

This commit is contained in:
Salvador Díaz Fau 2024-08-22 10:52:32 +02:00
parent a6b258d24d
commit ed52c6144c
5 changed files with 8 additions and 29 deletions

View File

@ -300,7 +300,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
OnStatusMessage = Chromium1StatusMessage
OnConsoleMessage = Chromium1ConsoleMessage
OnLoadingProgressChange = Chromium1LoadingProgressChange
OnCursorChange = Chromium1CursorChange
OnMediaAccessChange = Chromium1MediaAccessChange
OnCanDownload = Chromium1CanDownload
OnBeforeDownload = Chromium1BeforeDownload

View File

@ -166,7 +166,6 @@ type
procedure Chromium1ZoomPctAvailable(Sender: TObject; const aZoomPct: Double);
procedure Chromium1DevToolsMethodResult(Sender: TObject; const browser: ICefBrowser; message_id: Integer; success: Boolean; const result: ICefValue);
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 Chromium1CanDownload(Sender: TObject; const browser: ICefBrowser; const url, request_method: ustring; var aResult: Boolean);
procedure Chromium1MediaAccessChange(Sender: TObject; const browser: ICefBrowser; has_video_access, has_audio_access: Boolean);
procedure Chromium1RequestMediaAccessPermission(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const requesting_origin: ustring; requested_permissions: Cardinal; const callback: ICefMediaAccessCallback; var aResult: Boolean);
@ -688,15 +687,6 @@ begin
PostMessage(Handle, MINIBROWSER_COOKIESFLUSHED, 0, 0);
end;
procedure TMiniBrowserFrm.Chromium1CursorChange(Sender: TObject;
const browser: ICefBrowser; cursor_: TCefCursorHandle;
cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo;
var aResult: Boolean);
begin
aResult := True;
CEFWindowParent1.Cursor := CefCursorToWindowsCursor(cursorType);
end;
procedure TMiniBrowserFrm.CookiesFlushedMsg(var aMessage : TMessage);
begin
showmessage('The cookies were flushed successfully');
@ -1448,7 +1438,10 @@ end;
procedure TMiniBrowserFrm.FindText1Click(Sender: TObject);
begin
FindFrm.Show;
if GlobalCEFApp.ChromeRuntime then
Chromium1.ExecuteChromeCommand(IDC_FIND, CEF_WOD_CURRENT_TAB)
else
FindFrm.Show;
end;
procedure TMiniBrowserFrm.Flushcookies1Click(Sender: TObject);

View File

@ -15,7 +15,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
OnDestroy = FormDestroy
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '3.2.0.0'
LCLVersion = '3.4.0.0'
object Splitter1: TSplitter
Left = 1179
Height = 663
@ -118,11 +118,11 @@ object MiniBrowserFrm: TMiniBrowserFrm
TabOrder = 1
object URLCbx: TComboBox
Left = 0
Height = 22
Height = 21
Top = 3
Width = 978
Anchors = [akTop, akLeft, akRight, akBottom]
ItemHeight = 14
ItemHeight = 13
ItemIndex = 0
Items.Strings = (
'https://www.google.com'
@ -264,7 +264,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
OnFullScreenModeChange = Chromium1FullScreenModeChange
OnStatusMessage = Chromium1StatusMessage
OnLoadingProgressChange = Chromium1LoadingProgressChange
OnCursorChange = Chromium1CursorChange
OnMediaAccessChange = Chromium1MediaAccessChange
OnCanDownload = Chromium1CanDownload
OnBeforeDownload = Chromium1BeforeDownload

View File

@ -122,10 +122,6 @@ type
procedure Chromium1CanDownload(Sender: TObject; const browser: ICefBrowser;
const url, request_method: ustring; var aResult: boolean);
procedure Chromium1CookiesFlushed(Sender: TObject);
procedure Chromium1CursorChange(Sender: TObject;
const browser: ICefBrowser; cursor_: TCefCursorHandle;
cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo;
var aResult: boolean);
procedure Chromium1DevToolsMethodResult(Sender: TObject;
const browser: ICefBrowser; message_id: integer; success: boolean;
const result: ICefValue);
@ -1205,14 +1201,6 @@ begin
PostMessage(Handle, MINIBROWSER_COOKIESFLUSHED, 0, 0);
end;
procedure TMiniBrowserFrm.Chromium1CursorChange(Sender: TObject;
const browser: ICefBrowser; cursor_: TCefCursorHandle;
cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo;
var aResult: boolean);
begin
CEFWindowParent1.Cursor := CefCursorToWindowsCursor(cursorType);
end;
procedure TMiniBrowserFrm.Chromium1DevToolsMethodResult(Sender: TObject;
const browser: ICefBrowser; message_id: integer; success: boolean;
const result: ICefValue);

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 642,
"InternalVersion" : 643,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "127.3.5"
}