1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Update to CEF 117.1.5

This commit is contained in:
salvadordf
2023-09-29 19:23:38 +02:00
parent fd75f6f65e
commit f423f19168
36 changed files with 2208 additions and 40 deletions

View File

@@ -34,27 +34,88 @@ type
procedure OnBlur(const view: ICefView);
public
/// <summary>
/// Returns a ICefViewDelegate instance using a PCefViewDelegate data pointer.
/// </summary>
class function UnWrap(data: Pointer): ICefViewDelegate;
end;
/// <summary>
/// Implement this interface to handle view events. All size and position values
/// are in density independent pixels (DIP) unless otherwise indicated. The
/// functions of this interface will be called on the browser process UI thread
/// unless otherwise indicated.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_view_delegate_capi.h">CEF source file: /include/capi/views/cef_view_delegate_capi.h (cef_view_delegate_t)</see></para>
/// </remarks>
TCefViewDelegateOwn = class(TCefBaseRefCountedOwn, ICefViewDelegate)
protected
/// <summary>
/// Return the preferred size for |view|. The Layout will use this information
/// to determine the display size.
/// </summary>
procedure OnGetPreferredSize(const view: ICefView; var aResult : TCefSize); virtual;
/// <summary>
/// Return the minimum size for |view|.
/// </summary>
procedure OnGetMinimumSize(const view: ICefView; var aResult : TCefSize); virtual;
/// <summary>
/// Return the maximum size for |view|.
/// </summary>
procedure OnGetMaximumSize(const view: ICefView; var aResult : TCefSize); virtual;
/// <summary>
/// Return the height necessary to display |view| with the provided |width|.
/// If not specified the result of get_preferred_size().height will be used by
/// default. Override if |view|'s preferred height depends upon the width (for
/// example, with Labels).
/// </summary>
procedure OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer); virtual;
/// <summary>
/// Called when the parent of |view| has changed. If |view| is being added to
/// |parent| then |added| will be true (1). If |view| is being removed from
/// |parent| then |added| will be false (0). If |view| is being reparented the
/// remove notification will be sent before the add notification. Do not
/// modify the view hierarchy in this callback.
/// </summary>
procedure OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView); virtual;
/// <summary>
/// Called when a child of |view| has changed. If |child| is being added to
/// |view| then |added| will be true (1). If |child| is being removed from
/// |view| then |added| will be false (0). If |child| is being reparented the
/// remove notification will be sent to the old parent before the add
/// notification is sent to the new parent. Do not modify the view hierarchy
/// in this callback.
/// </summary>
procedure OnChildViewChanged(const view: ICefView; added: boolean; const child: ICefView); virtual;
/// <summary>
/// Called when |view| is added or removed from the ICefWindow.
/// </summary>
procedure OnWindowChanged(const view: ICefView; added: boolean); virtual;
/// <summary>
/// Called when the layout of |view| has changed.
/// </summary>
procedure OnLayoutChanged(const view: ICefView; new_bounds: TCefRect); virtual;
/// <summary>
/// Called when |view| gains focus.
/// </summary>
procedure OnFocus(const view: ICefView); virtual;
/// <summary>
/// Called when |view| loses focus.
/// </summary>
procedure OnBlur(const view: ICefView); virtual;
/// <summary>
/// Links the methods in the internal CEF record data pointer with the methods in this class.
/// </summary>
procedure InitializeCEFMethods; virtual;
public
constructor Create; virtual;
end;
/// <summary>
/// This class handles all the ICefViewDelegate methods which call the ICefViewDelegateEvents methods.
/// ICefViewDelegateEvents will be implemented by the control receiving the ICefViewDelegate events.
/// </summary>
TCustomViewDelegate = class(TCefViewDelegateOwn)
protected
FEvents : Pointer;
@@ -71,6 +132,9 @@ type
procedure OnBlur(const view: ICefView); override;
public
/// <summary>
/// Creates an instance of this class liked to an interface that's implemented by a control receiving the events.
/// </summary>
constructor Create(const events: ICefViewDelegateEvents); reintroduce;
destructor Destroy; override;
end;