You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-09-30 21:28:55 +02:00
Added workaround for issue #323
Modified all demos that used the TChromium.OnCursorChange event with the new parameters.
This commit is contained in:
@@ -39,7 +39,7 @@ program SimpleOSRBrowser;
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
uses
|
||||
uses FastMM4,
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
|
@@ -33,7 +33,6 @@ object Form1: TForm1
|
||||
Padding.Right = 5
|
||||
Padding.Bottom = 5
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 988
|
||||
object AddressCb: TComboBox
|
||||
Left = 5
|
||||
Top = 5
|
||||
@@ -67,7 +66,6 @@ object Form1: TForm1
|
||||
BevelOuter = bvNone
|
||||
Padding.Left = 4
|
||||
TabOrder = 1
|
||||
ExplicitLeft = 912
|
||||
object GoBtn: TButton
|
||||
Left = 4
|
||||
Top = 0
|
||||
@@ -130,11 +128,10 @@ object Form1: TForm1
|
||||
OnMouseUp = Panel1MouseUp
|
||||
OnResize = Panel1Resize
|
||||
OnMouseLeave = Panel1MouseLeave
|
||||
ExplicitWidth = 988
|
||||
ExplicitHeight = 638
|
||||
end
|
||||
object chrmosr: TChromium
|
||||
OnTooltip = chrmosrTooltip
|
||||
OnCursorChange = chrmosrCursorChange
|
||||
OnBeforePopup = chrmosrBeforePopup
|
||||
OnAfterCreated = chrmosrAfterCreated
|
||||
OnBeforeClose = chrmosrBeforeClose
|
||||
@@ -144,7 +141,6 @@ object Form1: TForm1
|
||||
OnPopupShow = chrmosrPopupShow
|
||||
OnPopupSize = chrmosrPopupSize
|
||||
OnPaint = chrmosrPaint
|
||||
OnCursorChange = chrmosrCursorChange
|
||||
OnIMECompositionRangeChanged = chrmosrIMECompositionRangeChanged
|
||||
Left = 24
|
||||
Top = 56
|
||||
|
@@ -101,7 +101,7 @@ type
|
||||
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 chrmosrCursorChange(Sender: TObject; const browser: ICefBrowser; cursor: HICON; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean);
|
||||
procedure chrmosrGetViewRect(Sender: TObject; const browser: ICefBrowser; var rect: TCefRect);
|
||||
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);
|
||||
@@ -248,8 +248,8 @@ begin
|
||||
GlobalCEFApp.EnableHighDPISupport := True;
|
||||
GlobalCEFApp.TouchEvents := STATE_ENABLED;
|
||||
//GlobalCEFApp.EnableGPU := True;
|
||||
//GlobalCEFApp.LogFile := 'debug.log';
|
||||
//GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||
GlobalCEFApp.LogFile := 'debug.log';
|
||||
GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
|
||||
|
||||
// If you need transparency leave the GlobalCEFApp.BackgroundColor property
|
||||
// with the default value or set the alpha channel to 0
|
||||
@@ -424,9 +424,11 @@ procedure TForm1.chrmosrCursorChange( Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
cursor : HICON;
|
||||
cursorType : TCefCursorType;
|
||||
const customCursorInfo : PCefCursorInfo);
|
||||
const customCursorInfo : PCefCursorInfo;
|
||||
var aResult : boolean);
|
||||
begin
|
||||
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||
aResult := True;
|
||||
end;
|
||||
|
||||
procedure TForm1.chrmosrGetScreenInfo( Sender : TObject;
|
||||
|
Reference in New Issue
Block a user