CEF4Delphi/source/uCEFViewsFrameworkEvents.pas

116 lines
7.3 KiB
ObjectPascal
Raw Normal View History

// ************************************************************************
// ***************************** CEF4Delphi *******************************
// ************************************************************************
//
// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based
// browser in Delphi applications.
//
// The original license of DCEF3 still applies to CEF4Delphi.
//
// For more information about CEF4Delphi visit :
// https://www.briskbard.com/index.php?lang=en&pageid=cef
//
2023-01-07 15:53:04 +01:00
// Copyright <20> 2023 Salvador Diaz Fau. All rights reserved.
//
// ************************************************************************
// ************ vvvv Original license and comments below vvvv *************
// ************************************************************************
(*
* Delphi Chromium Embedded 3
*
* Usage allowed under the restrictions of the Lesser GNU General Public License
* or alternatively the restrictions of the Mozilla Public License 1.1
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
* Web site : http://www.progdigy.com
* Repository : http://code.google.com/p/delphichromiumembedded/
* Group : http://groups.google.com/group/delphichromiumembedded
*
* Embarcadero Technologies, Inc is not permitted to use or redistribute
* this source code without explicit permission.
*
*)
unit uCEFViewsFrameworkEvents;
{$IFDEF FPC}
{$MODE OBJFPC}{$H+}
{$ENDIF}
{$I cef.inc}
{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF}
{$MINENUMSIZE 4}
interface
uses
{$IFDEF DELPHI16_UP}
System.Classes,
{$ELSE}
Classes,
{$ENDIF}
uCEFTypes, uCEFInterfaces;
type
// ICefViewDelegate
TOnGetPreferredSizeEvent = procedure(const Sender: TObject; const view: ICefView; var aResult : TCefSize) of object;
TOnGetMinimumSizeEvent = procedure(const Sender: TObject; const view: ICefView; var aResult : TCefSize) of object;
TOnGetMaximumSizeEvent = procedure(const Sender: TObject; const view: ICefView; var aResult : TCefSize) of object;
TOnGetHeightForWidthEvent = procedure(const Sender: TObject; const view: ICefView; width: Integer; var aResult: Integer) of object;
TOnParentViewChangedEvent = procedure(const Sender: TObject; const view: ICefView; added: boolean; const parent: ICefView) of object;
TOnChildViewChangedEvent = procedure(const Sender: TObject; const view: ICefView; added: boolean; const child: ICefView) of object;
2021-04-18 19:36:20 +02:00
TOnWindowChangedEvent = procedure(const Sender: TObject; const view: ICefView; added: boolean) of object;
TOnLayoutChangedEvent = procedure(const Sender: TObject; const view: ICefView; new_bounds: TCefRect) of object;
TOnFocusEvent = procedure(const Sender: TObject; const view: ICefView) of object;
TOnBlurEvent = procedure(const Sender: TObject; const view: ICefView) of object;
// ICefTextfieldDelegate
TOnTextfieldKeyEventEvent = procedure(const Sender: TObject; const textfield: ICefTextfield; const event: TCefKeyEvent; var aResult : boolean) of object;
TOnAfterUserActionEvent = procedure(const Sender: TObject; const textfield: ICefTextfield) of object;
// ICefPanelDelegate
// ICefBrowserViewDelegate
TOnBrowserCreatedEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const browser: ICefBrowser) of object;
TOnBrowserDestroyedEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const browser: ICefBrowser) of object;
TOnGetDelegateForPopupBrowserViewEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate) of object;
TOnPopupBrowserViewCreatedEvent = procedure(const Sender: TObject; const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean) of object;
2021-04-18 19:36:20 +02:00
TOnGetChromeToolbarTypeEvent = procedure(const Sender: TObject; var aChromeToolbarType: TCefChromeToolbarType) of object;
2023-05-29 17:20:32 +02:00
TOnGestureCommandEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; var aResult : boolean) of object;
// ICefButtonDelegate
TOnButtonPressedEvent = procedure(const Sender: TObject; const button: ICefButton) of object;
TOnButtonStateChangedEvent = procedure(const Sender: TObject; const button: ICefButton) of object;
// ICefMenuButtonDelegate
TOnMenuButtonPressedEvent = procedure(const Sender: TObject; const menu_button: ICefMenuButton; const screen_point: TCefPoint; const button_pressed_lock: ICefMenuButtonPressedLock) of object;
// ICefWindowDelegate
2023-04-21 16:05:10 +02:00
TOnWindowCreatedEvent = procedure(const Sender: TObject; const window_: ICefWindow) of object;
TOnWindowClosingEvent = 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;
TOnWindowBoundsChangedEvent = procedure(const Sender: TObject; const window_: ICefWindow; const new_bounds: TCefRect) 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;
TOnGetInitialShowStateEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : TCefShowState) of object;
TOnIsFramelessEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : boolean) of object;
TOnWithStandardWindowButtonsEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : boolean) of object;
TOnGetTitlebarHeightEvent = procedure(const Sender: TObject; const window_: ICefWindow; var titlebar_height: Single; var aResult : boolean) of object;
TOnCanResizeEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : boolean) of object;
TOnCanMaximizeEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : boolean) of object;
TOnCanMinimizeEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : boolean) of object;
TOnCanCloseEvent = procedure(const Sender: TObject; const window_: ICefWindow; var aResult : boolean) of object;
TOnAcceleratorEvent = procedure(const Sender: TObject; const window_: ICefWindow; command_id: Integer; var aResult : boolean) of object;
TOnWindowKeyEventEvent = procedure(const Sender: TObject; const window_: ICefWindow; const event: TCefKeyEvent; var aResult : boolean) of object;
TOnWindowFullscreenTransitionEvent = procedure(const Sender: TObject; const window_: ICefWindow; is_completed: boolean) of object;
implementation
end.