From 9fa1b689d3a17ae75647bf94592e20f4d81d58de Mon Sep 17 00:00:00 2001 From: salvadordf Date: Tue, 8 Aug 2023 18:55:10 +0200 Subject: [PATCH] Added more XML documentation --- source/uCEFInterfaces.pas | 1327 +++++++++++++++++++++++++++++++++++-- update_CEF4Delphi.json | 2 +- 2 files changed, 1269 insertions(+), 60 deletions(-) diff --git a/source/uCEFInterfaces.pas b/source/uCEFInterfaces.pas index 512980af..02901d59 100644 --- a/source/uCEFInterfaces.pas +++ b/source/uCEFInterfaces.pas @@ -844,7 +844,7 @@ type procedure SetFocus(focus: Boolean); /// /// Retrieve the window handle (if any) for this browser. If this browser is - /// wrapped in a cef_browser_view_t this function should be called on the + /// wrapped in a ICefBrowserView this function should be called on the /// browser process UI thread and it will return the handle for the top-level /// native window. /// @@ -852,12 +852,12 @@ type /// /// Retrieve the window handle (if any) of the browser that opened this /// browser. Will return NULL for non-popup browsers or if this browser is - /// wrapped in a cef_browser_view_t. This function can be used in combination + /// wrapped in a ICefBrowserView. This function can be used in combination /// with custom handling of modal windows. /// function GetOpenerWindowHandle: TCefWindowHandle; /// - /// Returns true (1) if this browser is wrapped in a cef_browser_view_t. + /// Returns true (1) if this browser is wrapped in a ICefBrowserView. /// function HasView: Boolean; /// @@ -1280,13 +1280,13 @@ type procedure SetAccessibilityState(accessibilityState: TCefState); /// /// Enable notifications of auto resize via - /// cef_display_handler_t::OnAutoResize. Notifications are disabled by + /// ICefDisplayHandler.OnAutoResize. Notifications are disabled by /// default. |min_size| and |max_size| define the range of allowed sizes. /// procedure SetAutoResizeEnabled(enabled: boolean; const min_size, max_size: PCefSize); /// /// Returns the extension hosted in this browser or NULL if no extension is - /// hosted. See cef_request_context_t::LoadExtension for details. + /// hosted. See ICefRequestContext.LoadExtension for details. /// function GetExtension : ICefExtension; /// @@ -1409,7 +1409,7 @@ type ['{BA003C2E-CF15-458F-9D4A-FE3CEFCF3EEF}'] /// /// True if this object is currently valid. This will return false (0) after - /// cef_life_span_handler_t::OnBeforeClose is called. + /// ICefLifeSpanHandler.OnBeforeClose is called. /// function IsValid: boolean; /// @@ -3013,7 +3013,7 @@ type ICefThread = interface(ICefBaseRefCounted) ['{26B30EA5-F44A-4C40-97DF-67FD9E73A4FF}'] /// - /// Returns the cef_task_runner_t that will execute code on this thread's + /// Returns the ICefTaskRunner that will execute code on this thread's /// message loop. This function is safe to call from any thread. /// function GetTaskRunner : ICefTaskRunner; @@ -3262,8 +3262,8 @@ type function SetValueByIndex(index: Integer; const value: ICefv8Value): Boolean; /// /// Registers an identifier and returns true (1) on success. Access to the - /// identifier will be forwarded to the cef_v8accessor_t instance passed to - /// cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this + /// identifier will be forwarded to the ICefV8Accessor instance passed to + /// cef_v8value_create_object(). Returns false (0) if this /// function is called incorrectly or an exception is thrown. For read-only /// values this function will return true (1) even though assignment failed. /// @@ -3292,7 +3292,7 @@ type /// Adjusts the amount of registered external memory for the object. Used to /// give V8 an indication of the amount of externally allocated memory that is /// kept alive by JavaScript objects. V8 uses this information to decide when - /// to perform global garbage collection. Each cef_v8value_t tracks the amount + /// to perform global garbage collection. Each ICefv8Value tracks the amount /// of external memory associated with it and automatically decreases the /// global total by the appropriate amount on its destruction. /// |change_in_bytes| specifies the number of bytes to adjust by. This @@ -3313,7 +3313,7 @@ type /// Prevent the ArrayBuffer from using it's memory block by setting the length /// to zero. This operation cannot be undone. If the ArrayBuffer was created /// with CreateArrayBuffer then - /// cef_v8array_buffer_release_callback_t::ReleaseBuffer will be called to + /// ICefv8ArrayBufferReleaseCallback.ReleaseBuffer will be called to /// release the underlying buffer. /// function NeuterArrayBuffer : boolean; @@ -3327,9 +3327,9 @@ type function GetFunctionHandler: ICefv8Handler; /// /// Execute the function using the current V8 context. This function should - /// only be called from within the scope of a cef_v8handler_t or - /// cef_v8accessor_t callback, or in combination with calling enter() and - /// exit() on a stored cef_v8context_t reference. |object| is the receiver + /// only be called from within the scope of a ICefv8Handler or + /// ICefV8Accessor callback, or in combination with calling enter() and + /// exit() on a stored ICefv8Context reference. |object| is the receiver /// ('this' object) of the function. If |object| is NULL the current context's /// global object will be used. |arguments| is the list of arguments that will /// be passed to the function. Returns the function return value on success. @@ -3348,18 +3348,18 @@ type function ExecuteFunctionWithContext(const context: ICefv8Context; const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value; /// /// Resolve the Promise using the current V8 context. This function should - /// only be called from within the scope of a cef_v8handler_t or - /// cef_v8accessor_t callback, or in combination with calling enter() and - /// exit() on a stored cef_v8context_t reference. |arg| is the argument passed + /// only be called from within the scope of a ICefv8Handler or + /// ICefV8Accessor callback, or in combination with calling enter() and + /// exit() on a stored ICefv8Context reference. |arg| is the argument passed /// to the resolved promise. Returns true (1) on success. Returns false (0) if /// this function is called incorrectly or an exception is thrown. /// function ResolvePromise(const arg: ICefv8Value): boolean; /// /// Reject the Promise using the current V8 context. This function should only - /// be called from within the scope of a cef_v8handler_t or cef_v8accessor_t + /// be called from within the scope of a ICefv8Handler or ICefV8Accessor /// callback, or in combination with calling enter() and exit() on a stored - /// cef_v8context_t reference. Returns true (1) on success. Returns false (0) + /// ICefv8Context reference. Returns true (1) on success. Returns false (0) /// if this function is called incorrectly or an exception is thrown. /// function RejectPromise(const errorMsg: ustring): boolean; @@ -4667,8 +4667,8 @@ type /// Provides an opportunity to view and/or modify command-line arguments /// before processing by CEF and Chromium. The |process_type| value will be /// NULL for the browser process. Do not keep a reference to the - /// cef_command_line_t object passed to this function. The - /// cef_settings_t.command_line_args_disabled value can be used to start with + /// ICefCommandLine object passed to this function. The + /// TCefSettings.command_line_args_disabled value can be used to start with /// an NULL command-line object. Any values specified in CefSettings that /// equate to command-line arguments will be set before this function is /// called. Be cautious when using this function to modify command-line @@ -4685,7 +4685,7 @@ type procedure OnRegisterCustomSchemes(const registrar: TCefSchemeRegistrarRef); /// /// Return the handler for resource bundle events. If - /// cef_settings_t.pack_loading_disabled is true (1) a handler must be + /// TCefSettings.pack_loading_disabled is true (1) a handler must be /// returned. If no handler is returned resources will be loaded from pack /// files. This function is called by the browser and render processes on /// multiple threads. @@ -6350,11 +6350,11 @@ type /// /// Returns the absolute path to the extension directory on disk. This value /// will be prefixed with PK_DIR_RESOURCES if a relative path was passed to - /// cef_request_context_t::LoadExtension. + /// ICefRequestContext.LoadExtension. /// function GetPath : ustring; /// - /// Returns the extension manifest contents as a cef_dictionary_value_t + /// Returns the extension manifest contents as a ICefDictionaryValue /// object. See https://developer.chrome.com/extensions/manifest for details. /// function GetManifest : ICefDictionaryValue; @@ -6367,13 +6367,13 @@ type /// /// Returns the handler for this extension. Will return NULL for internal /// extensions or if no handler was passed to - /// cef_request_context_t::LoadExtension. + /// ICefRequestContext.LoadExtension. /// function GetHandler : ICefExtensionHandler; /// /// Returns the request context that loaded this extension. Will return NULL /// for internal extensions or if the extension has been unloaded. See the - /// cef_request_context_t::LoadExtension documentation for more information + /// ICefRequestContext.LoadExtension documentation for more information /// about loader contexts. Must be called on the browser process UI thread. /// function GetLoaderContext : ICefRequestContext; @@ -6385,7 +6385,7 @@ type /// /// Unload this extension if it is not an internal extension and is currently /// loaded. Will result in a call to - /// cef_extension_handler_t::OnExtensionUnloaded on success. + /// ICefExtensionHandler.OnExtensionUnloaded on success. /// procedure unload; function GetBrowserActionPopup : ustring; @@ -6405,24 +6405,24 @@ type /// /// Returns the absolute path to the extension directory on disk. This value /// will be prefixed with PK_DIR_RESOURCES if a relative path was passed to - /// cef_request_context_t::LoadExtension. + /// ICefRequestContext.LoadExtension. /// property Path : ustring read GetPath; /// - /// Returns the extension manifest contents as a cef_dictionary_value_t + /// Returns the extension manifest contents as a ICefDictionaryValue /// object. See https://developer.chrome.com/extensions/manifest for details. /// property Manifest : ICefDictionaryValue read GetManifest; /// /// Returns the handler for this extension. Will return NULL for internal /// extensions or if no handler was passed to - /// cef_request_context_t::LoadExtension. + /// ICefRequestContext.LoadExtension. /// property Handler : ICefExtensionHandler read GetHandler; /// /// Returns the request context that loaded this extension. Will return NULL /// for internal extensions or if the extension has been unloaded. See the - /// cef_request_context_t::LoadExtension documentation for more information + /// ICefRequestContext.LoadExtension documentation for more information /// about loader contexts. Must be called on the browser process UI thread. /// property LoaderContext : ICefRequestContext read GetLoaderContext; @@ -6817,7 +6817,7 @@ type function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean; /// /// Called when auto-resize is enabled via - /// cef_browser_host_t::SetAutoResizeEnabled and the contents have auto- + /// ICefBrowserHost.SetAutoResizeEnabled and the contents have auto- /// resized. |new_size| will be the desired size in view coordinates. Return /// true (1) if the resize was handled or false (0) for default handling. /// @@ -7088,7 +7088,7 @@ type /// /// Called to execute a command selected from the context menu. Return true /// (1) if the command was handled or false (0) for the default - /// implementation. See cef_menu_id_t for the command ids that have default + /// implementation. See TCefMenuId for the command ids that have default /// implementations. All user-defined command ids should be between /// MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same /// values as what was passed to on_before_context_menu(). Do not keep a @@ -7113,7 +7113,7 @@ type /// /// Called to execute a command selected from the quick menu for a windowless /// browser. Return true (1) if the command was handled or false (0) for the - /// default implementation. See cef_menu_id_t for command IDs that have + /// default implementation. See TCefMenuId for command IDs that have /// default implementations. /// function OnQuickMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; command_id: integer; event_flags: TCefEventFlags): boolean; @@ -7367,8 +7367,8 @@ type /// procedure GetFocusHandler(var aHandler : ICefFocusHandler); /// - /// Return the handler for events related to cef_frame_t lifespan. This - /// function will be called once during cef_browser_t creation and the result + /// Return the handler for events related to ICefFrame lifespan. This + /// function will be called once during ICefBrowser creation and the result /// will be cached for performance reasons. /// procedure GetFrameHandler(var aHandler : ICefFrameHandler); @@ -7686,7 +7686,7 @@ type procedure SetFragmentBaseUrl(const baseUrl: ustring); /// /// Reset the file contents. You should do this before calling - /// cef_browser_host_t::DragTargetDragEnter as the web view does not allow us + /// ICefBrowserHost.DragTargetDragEnter as the web view does not allow us /// to drag in this kind of data. /// procedure ResetFileContents; @@ -7947,7 +7947,7 @@ type /// will be ignored for non-standard schemes. If |scheme_name| is a built-in /// scheme and no handler is returned by |factory| then the built-in scheme /// handler factory will be called. If |scheme_name| is a custom scheme then - /// you must also implement the cef_app_t::on_register_custom_schemes() + /// you must also implement the ICefApp.OnRegisterCustomSchemes() /// function in all processes. This function may be called multiple times to /// change or remove the factory that matches the specified |scheme_name| and /// optional |domain_name|. Returns false (0) if an error occurs. This @@ -7992,8 +7992,8 @@ type /// If extension resources will be read from disk using the default load /// implementation then |root_directory| should be the absolute path to the /// extension resources directory and |manifest| should be NULL. If extension - /// resources will be provided by the client (e.g. via cef_request_handler_t - /// and/or cef_extension_handler_t) then |root_directory| should be a path + /// resources will be provided by the client (e.g. via ICefRequestHandler + /// and/or ICefExtensionHandler) then |root_directory| should be a path /// component unique to the extension (if not absolute this will be internally /// prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the /// contents that would otherwise be read from the "manifest.json" file on @@ -8003,20 +8003,20 @@ type /// storage (HasExtension returns true (1)). However, only the context on /// which this function was called is considered the loader (DidLoadExtension /// returns true (1)) and only the loader will receive - /// cef_request_context_handler_t callbacks for the extension. + /// ICefRequestContextHandler callbacks for the extension. /// - /// cef_extension_handler_t::OnExtensionLoaded will be called on load success - /// or cef_extension_handler_t::OnExtensionLoadFailed will be called on load + /// ICefExtensionHandler.OnExtensionLoaded will be called on load success + /// or ICefExtensionHandler.OnExtensionLoadFailed will be called on load /// failure. /// /// If the extension specifies a background script via the "background" - /// manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will + /// manifest key then ICefExtensionHandler.OnBeforeBackgroundBrowser will /// be called to create the background browser. See that function for /// additional information about background scripts. /// /// For visible extension views the client application should evaluate the /// manifest to determine the correct extension URL to load and then pass that - /// URL to the cef_browser_host_t::CreateBrowser* function after the extension + /// URL to the ICefBrowserHost.CreateBrowser* function after the extension /// has loaded. For example, the client can look for the "browser_action" /// manifest key as documented at /// https://developer.chrome.com/extensions/browserAction. Extension URLs take @@ -8644,13 +8644,13 @@ type /// function GetLocalizedString(stringId: Integer): ustring; /// - /// Returns a cef_binary_value_t containing the decompressed contents of the + /// Returns a ICefBinaryValue containing the decompressed contents of the /// specified scale independent |resource_id| or NULL if not found. Include /// cef_pack_resources.h for a listing of valid resource ID values. /// function GetDataResource(resourceId: Integer): ICefBinaryValue; /// - /// Returns a cef_binary_value_t containing the decompressed contents of the + /// Returns a ICefBinaryValue containing the decompressed contents of the /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale /// independent resources or call GetDataResource instead.Include @@ -8732,7 +8732,7 @@ type /// |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type| /// and |alpha_type| values specify the desired output pixel format. /// |pixel_width| and |pixel_height| are the output representation size in - /// pixel coordinates. Returns a cef_binary_value_t containing the pixel data + /// pixel coordinates. Returns a ICefBinaryValue containing the pixel data /// on success or NULL on failure. /// function GetAsBitmap(scaleFactor: Single; colorType: TCefColorType; alphaType: TCefAlphaType; var pixelWidth, pixelHeight: Integer): ICefBinaryValue; @@ -8741,7 +8741,7 @@ type /// If |with_transparency| is true (1) any alpha transparency in the image /// will be represented in the resulting PNG data. |pixel_width| and /// |pixel_height| are the output representation size in pixel coordinates. - /// Returns a cef_binary_value_t containing the PNG image data on success or + /// Returns a ICefBinaryValue containing the PNG image data on success or /// NULL on failure. /// function GetAsPng(scaleFactor: Single; withTransparency: Boolean; var pixelWidth, pixelHeight: Integer): ICefBinaryValue; @@ -8751,7 +8751,7 @@ type /// highest. The JPEG format does not support alpha transparency and the alpha /// channel, if any, will be discarded. |pixel_width| and |pixel_height| are /// the output representation size in pixel coordinates. Returns a - /// cef_binary_value_t containing the JPEG image data on success or NULL on + /// ICefBinaryValue containing the JPEG image data on success or NULL on /// failure. /// function GetAsJpeg(scaleFactor: Single; quality: Integer; var pixelWidth, pixelHeight: Integer): ICefBinaryValue; @@ -9163,7 +9163,7 @@ type /// function Memory: pointer; /// - /// Creates a new cef_process_message_t from the data provided to the builder. + /// Creates a new ICefProcessMessage from the data provided to the builder. /// Returns nullptr for invalid instances. Invalidates the builder instance. /// function Build: ICefProcessMessage; @@ -9189,18 +9189,65 @@ type /// ICefDisplay = interface(ICefBaseRefCounted) ['{EC2D3606-DB4C-4894-8D38-B8F99E091965}'] + /// + /// Returns the unique identifier for this Display. + /// function GetID : int64; + /// + /// Returns this Display's device pixel scale factor. This specifies how much + /// the UI should be scaled when the actual output has more pixels than + /// standard displays (which is around 100~120dpi). The potential return + /// values differ by platform. + /// function GetDeviceScaleFactor : Single; + /// + /// Convert |point| from DIP coordinates to pixel coordinates using this + /// Display's device scale factor. + /// procedure ConvertPointToPixels(var point: TCefPoint); + /// + /// Convert |point| from pixel coordinates to DIP coordinates using this + /// Display's device scale factor. + /// procedure ConvertPointFromPixels(var point: TCefPoint); + /// + /// Returns this Display's bounds in DIP screen coordinates. This is the full + /// size of the display. + /// function GetBounds : TCefRect; + /// + /// Returns this Display's work area in DIP screen coordinates. This excludes + /// areas of the display that are occupied with window manager toolbars, etc. + /// function GetWorkArea : TCefRect; + /// + /// Returns this Display's rotation in degrees. + /// function GetRotation : Integer; - + /// + /// Returns the unique identifier for this Display. + /// property ID : int64 read GetID; + /// + /// Returns this Display's device pixel scale factor. This specifies how much + /// the UI should be scaled when the actual output has more pixels than + /// standard displays (which is around 100~120dpi). The potential return + /// values differ by platform. + /// property DeviceScaleFactor : Single read GetDeviceScaleFactor; + /// + /// Returns this Display's bounds in DIP screen coordinates. This is the full + /// size of the display. + /// property Bounds : TCefRect read GetBounds; + /// + /// Returns this Display's work area in DIP screen coordinates. This excludes + /// areas of the display that are occupied with window manager toolbars, etc. + /// property WorkArea : TCefRect read GetWorkArea; + /// + /// Returns this Display's rotation in degrees. + /// property Rotation : Integer read GetRotation; end; @@ -9215,8 +9262,17 @@ type /// ICefLayout = interface(ICefBaseRefCounted) ['{0EC7AE4B-1672-4D0B-B617-0BDA72F3C7F4}'] + /// + /// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout. + /// function AsBoxLayout : ICefBoxLayout; + /// + /// Returns this Layout as a FillLayout or NULL if this is not a FillLayout. + /// function AsFillLayout : ICefFillLayout; + /// + /// Returns true (1) if this Layout is valid. + /// function IsValid : boolean; property Valid : boolean read IsValid; @@ -9236,7 +9292,18 @@ type /// ICefBoxLayout = interface(ICefLayout) ['{E59FCCAE-A371-4C21-98D3-93D3217016AE}'] + /// + /// Set the flex weight for the given |view|. Using the preferred size as the + /// basis, free space along the main axis is distributed to views in the ratio + /// of their flex weights. Similarly, if the views will overflow the parent, + /// space is subtracted in these ratios. A flex of 0 means this view is not + /// resized. Flex values must not be negative. + /// procedure SetFlexForView(const view: ICefView; flex: Integer); + /// + /// Clears the flex for the given |view|, causing it to use the default flex + /// specified via TCefBoxLayoutSettings.default_flex. + /// procedure ClearFlexForView(const view: ICefView); end; @@ -9266,34 +9333,169 @@ type /// ICefOverlayController = interface(ICefBaseRefCounted) ['{13E1F3D2-32FF-4D30-A30E-D67B6A4846AB}'] + /// + /// Returns true (1) if this object is valid. + /// function IsValid: boolean; + /// + /// Returns true (1) if this object is the same as |that| object. + /// function IsSame(const that: ICefOverlayController): boolean; + /// + /// Returns the contents View for this overlay. + /// function GetContentsView: ICefView; + /// + /// Returns the top-level Window hosting this overlay. Use this function + /// instead of calling get_window() on the contents View. + /// function GetWindow: ICefWindow; + /// + /// Returns the docking mode for this overlay. + /// function GetDockingMode: TCefDockingMode; + /// + /// Destroy this overlay. + /// procedure DestroyOverlay; + /// + /// Sets the bounds (size and position) of this overlay. This will set the + /// bounds of the contents View to match and trigger a re-layout if necessary. + /// |bounds| is in parent coordinates and any insets configured on this + /// overlay will be ignored. Use this function only for overlays created with + /// a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes + /// modify the insets of this overlay and/or layout of the contents View and + /// call size_to_preferred_size() instead to calculate the new size and re- + /// position the overlay if necessary. + /// procedure SetBounds(const bounds: TCefRect); + /// + /// Returns the bounds (size and position) of this overlay in parent + /// coordinates. + /// function GetBounds: TCefRect; + /// + /// Returns the bounds (size and position) of this overlay in DIP screen + /// coordinates. + /// function GetBoundsInScreen: TCefRect; + /// + /// Sets the size of this overlay without changing the position. This will set + /// the size of the contents View to match and trigger a re-layout if + /// necessary. |size| is in parent coordinates and any insets configured on + /// this overlay will be ignored. Use this function only for overlays created + /// with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking + /// modes modify the insets of this overlay and/or layout of the contents View + /// and call size_to_preferred_size() instead to calculate the new size and + /// re-position the overlay if necessary. + /// procedure SetSize(const size: TCefSize); + /// + /// Returns the size of this overlay in parent coordinates. + /// function GetSize: TCefSize; + /// + /// Sets the position of this overlay without changing the size. |position| is + /// in parent coordinates and any insets configured on this overlay will be + /// ignored. Use this function only for overlays created with a docking mode + /// value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the + /// insets of this overlay and/or layout of the contents View and call + /// size_to_preferred_size() instead to calculate the new size and re-position + /// the overlay if necessary. + /// procedure SetPosition(const position: TCefPoint); + /// + /// Returns the position of this overlay in parent coordinates. + /// function GetPosition: TCefPoint; + /// + /// Sets the insets for this overlay. |insets| is in parent coordinates. Use + /// this function only for overlays created with a docking mode value other + /// than CEF_DOCKING_MODE_CUSTOM. + /// procedure SetInsets(const insets: TCefInsets); + /// + /// Returns the insets for this overlay in parent coordinates. + /// function GetInsets: TCefInsets; + /// + /// Size this overlay to its preferred size and trigger a re-layout if + /// necessary. The position of overlays created with a docking mode value of + /// CEF_DOCKING_MODE_CUSTOM will not be modified by calling this function. + /// With other docking modes this function may re-position the overlay if + /// necessary to accommodate the new size and any insets configured on the + /// contents View. + /// procedure SizeToPreferredSize; + /// + /// Sets whether this overlay is visible. Overlays are hidden by default. If + /// this overlay is hidden then it and any child Views will not be drawn and, + /// if any of those Views currently have focus, then focus will also be + /// cleared. Painting is scheduled as needed. + /// procedure SetVisible(visible: boolean); + /// + /// Returns whether this overlay is visible. A View may be visible but still + /// not drawn in a Window if any parent Views are hidden. Call is_drawn() to + /// determine whether this overlay and all parent Views are visible and will + /// be drawn. + /// function IsVisible: boolean; + /// + /// Returns whether this overlay is visible and drawn in a Window. A View is + /// drawn if it and all parent Views are visible. To determine if the + /// containing Window is visible to the user on-screen call is_visible() on + /// the Window. + /// function IsDrawn: boolean; + /// + /// Returns the contents View for this overlay. + /// property ContentsView : ICefView read GetContentsView; + /// + /// Returns the top-level Window hosting this overlay. Use this function + /// instead of calling get_window() on the contents View. + /// property Window : ICefWindow read GetWindow; + /// + /// Returns the docking mode for this overlay. + /// property DockingMode : TCefDockingMode read GetDockingMode; + /// + /// Returns the bounds (size and position) of this overlay in parent + /// coordinates. + /// property Bounds : TCefRect read GetBounds write SetBounds; + /// + /// Returns the bounds (size and position) of this overlay in DIP screen + /// coordinates. + /// property BoundsInScreen : TCefRect read GetBoundsInScreen; + /// + /// Returns the size of this overlay in parent coordinates. + /// property Size : TCefSize read GetSize write SetSize; + /// + /// Returns the position of this overlay in parent coordinates. + /// property Position : TCefPoint read GetPosition write SetPosition; + /// + /// Returns the insets for this overlay in parent coordinates. + /// property Insets : TCefInsets read GetInsets write SetInsets; + /// + /// Returns whether this overlay is visible. A View may be visible but still + /// not drawn in a Window if any parent Views are hidden. Call is_drawn() to + /// determine whether this overlay and all parent Views are visible and will + /// be drawn. + /// property Visible : boolean read IsVisible write SetVisible; + /// + /// Returns whether this overlay is visible and drawn in a Window. A View is + /// drawn if it and all parent Views are visible. To determine if the + /// containing Window is visible to the user on-screen call is_visible() on + /// the Window. + /// property Drawn : boolean read IsDrawn; end; @@ -9309,78 +9511,381 @@ type /// ICefView = interface(ICefBaseRefCounted) ['{E9AF950A-F4E8-420C-BD1F-F26F4FDFA48D}'] + /// + /// Returns this View as a BrowserView or NULL if this is not a BrowserView. + /// function AsBrowserView : ICefBrowserView; + /// + /// Returns this View as a Button or NULL if this is not a Button. + /// function AsButton : ICefButton; + /// + /// Returns this View as a Panel or NULL if this is not a Panel. + /// function AsPanel : ICefPanel; + /// + /// Returns this View as a ScrollView or NULL if this is not a ScrollView. + /// function AsScrollView : ICefScrollView; + /// + /// Returns this View as a Textfield or NULL if this is not a Textfield. + /// function AsTextfield : ICefTextfield; + /// + /// Returns the type of this View as a string. Used primarily for testing + /// purposes. + /// function GetTypeString : ustring; + /// + /// Returns a string representation of this View which includes the type and + /// various type-specific identifying attributes. If |include_children| is + /// true (1) any child Views will also be included. Used primarily for testing + /// purposes. + /// function ToStringEx(include_children: boolean): ustring; + /// + /// Returns true (1) if this View is valid. + /// function IsValid : boolean; + /// + /// Returns true (1) if this View is currently attached to another View. A + /// View can only be attached to one View at a time. + /// function IsAttached : boolean; + /// + /// Returns true (1) if this View is the same as |that| View. + /// function IsSame(const that: ICefView): boolean; + /// + /// Returns the delegate associated with this View, if any. + /// function GetDelegate : ICefViewDelegate; + /// + /// Returns the top-level Window hosting this View, if any. + /// function GetWindow : ICefWindow; + /// + /// Returns the ID for this View. + /// function GetID : Integer; + /// + /// Sets the ID for this View. ID should be unique within the subtree that you + /// intend to search for it. 0 is the default ID for views. + /// procedure SetID(id_: Integer); + /// + /// Returns the group id of this View, or -1 if not set. + /// function GetGroupID : Integer; + /// + /// A group id is used to tag Views which are part of the same logical group. + /// Focus can be moved between views with the same group using the arrow keys. + /// The group id is immutable once it's set. + /// procedure SetGroupID(group_id: Integer); + /// + /// Returns the View that contains this View, if any. + /// function GetParentView : ICefView; + /// + /// Recursively descends the view tree starting at this View, and returns the + /// first child that it encounters with the given ID. Returns NULL if no + /// matching child view is found. + /// function GetViewForID(id_: Integer): ICefView; + /// + /// Sets the bounds (size and position) of this View. |bounds| is in parent + /// coordinates, or DIP screen coordinates if there is no parent. + /// procedure SetBounds(const bounds_: TCefRect); + /// + /// Returns the bounds (size and position) of this View in parent coordinates, + /// or DIP screen coordinates if there is no parent. + /// function GetBounds : TCefRect; + /// + /// Returns the bounds (size and position) of this View in DIP screen + /// coordinates. + /// function GetBoundsInScreen : TCefRect; + /// + /// Sets the size of this View without changing the position. |size| in parent + /// coordinates, or DIP screen coordinates if there is no parent. + /// procedure SetSize(const size_: TCefSize); + /// + /// Returns the size of this View in parent coordinates, or DIP screen + /// coordinates if there is no parent. + /// function GetSize : TCefSize; + /// + /// Sets the position of this View without changing the size. |position| is in + /// parent coordinates, or DIP screen coordinates if there is no parent. + /// procedure SetPosition(const position_: TCefPoint); + /// + /// Returns the position of this View. Position is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// function GetPosition : TCefPoint; + /// + /// Sets the insets for this View. |insets| is in parent coordinates, or DIP + /// screen coordinates if there is no parent. + /// procedure SetInsets(const insets: TCefInsets); + /// + /// Returns the insets for this View in parent coordinates, or DIP screen + /// coordinates if there is no parent. + /// function GetInsets: TCefInsets; + /// + /// Returns the size this View would like to be if enough space is available. + /// Size is in parent coordinates, or DIP screen coordinates if there is no + /// parent. + /// function GetPreferredSize : TCefSize; + /// + /// Size this View to its preferred size. Size is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// procedure SizeToPreferredSize; + /// + /// Returns the minimum size for this View. Size is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// function GetMinimumSize : TCefSize; + /// + /// Returns the maximum size for this View. Size is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// function GetMaximumSize : TCefSize; + /// + /// Returns the height necessary to display this View with the provided width. + /// function GetHeightForWidth(width: Integer): Integer; + /// + /// Indicate that this View and all parent Views require a re-layout. This + /// ensures the next call to layout() will propagate to this View even if the + /// bounds of parent Views do not change. + /// procedure InvalidateLayout; + /// + /// Sets whether this View is visible. Windows are hidden by default and other + /// views are visible by default. This View and any parent views must be set + /// as visible for this View to be drawn in a Window. If this View is set as + /// hidden then it and any child views will not be drawn and, if any of those + /// views currently have focus, then focus will also be cleared. Painting is + /// scheduled as needed. If this View is a Window then calling this function + /// is equivalent to calling the Window show() and hide() functions. + /// procedure SetVisible(visible_: boolean); + /// + /// Returns whether this View is visible. A view may be visible but still not + /// drawn in a Window if any parent views are hidden. If this View is a Window + /// then a return value of true (1) indicates that this Window is currently + /// visible to the user on-screen. If this View is not a Window then call + /// is_drawn() to determine whether this View and all parent views are visible + /// and will be drawn. + /// function IsVisible : boolean; + /// + /// Returns whether this View is visible and drawn in a Window. A view is + /// drawn if it and all parent views are visible. If this View is a Window + /// then calling this function is equivalent to calling is_visible(). + /// Otherwise, to determine if the containing Window is visible to the user + /// on-screen call is_visible() on the Window. + /// function IsDrawn : boolean; + /// + /// Set whether this View is enabled. A disabled View does not receive + /// keyboard or mouse inputs. If |enabled| differs from the current value the + /// View will be repainted. Also, clears focus if the focused View is + /// disabled. + /// procedure SetEnabled(enabled_: boolean); + /// + /// Returns whether this View is enabled. + /// function IsEnabled : boolean; + /// + /// Sets whether this View is capable of taking focus. It will clear focus if + /// the focused View is set to be non-focusable. This is false (0) by default + /// so that a View used as a container does not get the focus. + /// procedure SetFocusable(focusable_: boolean); + /// + /// Returns true (1) if this View is focusable, enabled and drawn. + /// function IsFocusable : boolean; + /// + /// Return whether this View is focusable when the user requires full keyboard + /// access, even though it may not be normally focusable. + /// function IsAccessibilityFocusable : boolean; + /// + /// Request keyboard focus. If this View is focusable it will become the + /// focused View. + /// procedure RequestFocus; + /// + /// Sets the background color for this View. + /// procedure SetBackgroundColor(color: TCefColor); + /// + /// Returns the background color for this View. + /// function GetBackgroundColor : TCefColor; + /// + /// Convert |point| from this View's coordinate system to DIP screen + /// coordinates. This View must belong to a Window when calling this function. + /// Returns true (1) if the conversion is successful or false (0) otherwise. + /// Use ICefDisplay.ConvertPointToPixels() after calling this function + /// if further conversion to display-specific pixel coordinates is desired. + /// function ConvertPointToScreen(var point: TCefPoint): boolean; + /// + /// Convert |point| to this View's coordinate system from DIP screen + /// coordinates. This View must belong to a Window when calling this function. + /// Returns true (1) if the conversion is successful or false (0) otherwise. + /// Use ICefDisplay.ConvertPointFromPixels() before calling this + /// function if conversion from display-specific pixel coordinates is + /// necessary. + /// function ConvertPointFromScreen(var point: TCefPoint): boolean; + /// + /// Convert |point| from this View's coordinate system to that of the Window. + /// This View must belong to a Window when calling this function. Returns true + /// (1) if the conversion is successful or false (0) otherwise. + /// function ConvertPointToWindow(var point: TCefPoint): boolean; + /// + /// Convert |point| to this View's coordinate system from that of the Window. + /// This View must belong to a Window when calling this function. Returns true + /// (1) if the conversion is successful or false (0) otherwise. + /// function ConvertPointFromWindow(var point: TCefPoint): boolean; + /// + /// Convert |point| from this View's coordinate system to that of |view|. + /// |view| needs to be in the same Window but not necessarily the same view + /// hierarchy. Returns true (1) if the conversion is successful or false (0) + /// otherwise. + /// function ConvertPointToView(const view : ICefView; var point: TCefPoint): boolean; + /// + /// Convert |point| to this View's coordinate system from that |view|. |view| + /// needs to be in the same Window but not necessarily the same view + /// hierarchy. Returns true (1) if the conversion is successful or false (0) + /// otherwise. + /// function ConvertPointFromView(const view : ICefView; var point: TCefPoint): boolean; - + /// + /// Returns true (1) if this View is valid. + /// property Valid : boolean read IsValid; + /// + /// Returns true (1) if this View is currently attached to another View. A + /// View can only be attached to one View at a time. + /// property Attached : boolean read IsAttached; + /// + /// Returns the delegate associated with this View, if any. + /// property Delegate : ICefViewDelegate read GetDelegate; + /// + /// Returns the top-level Window hosting this View, if any. + /// property Window : ICefWindow read GetWindow; + /// + /// Returns the View that contains this View, if any. + /// property ParentView : ICefView read GetParentView; + /// + /// Returns the bounds (size and position) of this View in DIP screen + /// coordinates. + /// property BoundsInScreen : TCefRect read GetBoundsInScreen; + /// + /// Returns the size this View would like to be if enough space is available. + /// Size is in parent coordinates, or DIP screen coordinates if there is no + /// parent. + /// property PreferredSize : TCefSize read GetPreferredSize; + /// + /// Returns the minimum size for this View. Size is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// property MinimumSize : TCefSize read GetMinimumSize; + /// + /// Returns the maximum size for this View. Size is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// property MaximumSize : TCefSize read GetMaximumSize; + /// + /// Returns whether this View is visible. A view may be visible but still not + /// drawn in a Window if any parent views are hidden. If this View is a Window + /// then a return value of true (1) indicates that this Window is currently + /// visible to the user on-screen. If this View is not a Window then call + /// is_drawn() to determine whether this View and all parent views are visible + /// and will be drawn. + /// property Visible : boolean read IsVisible write SetVisible; + /// + /// Returns whether this View is visible and drawn in a Window. A view is + /// drawn if it and all parent views are visible. If this View is a Window + /// then calling this function is equivalent to calling is_visible(). + /// Otherwise, to determine if the containing Window is visible to the user + /// on-screen call is_visible() on the Window. + /// property Drawn : boolean read IsDrawn; + /// + /// Returns whether this View is enabled. + /// property Enabled : boolean read IsEnabled write SetEnabled; + /// + /// Returns true (1) if this View is focusable, enabled and drawn. + /// property Focusable : boolean read IsFocusable write SetFocusable; + /// + /// Return whether this View is focusable when the user requires full keyboard + /// access, even though it may not be normally focusable. + /// property AccessibilityFocusable : boolean read IsAccessibilityFocusable; + /// + /// Returns the background color for this View. + /// property BackgroundColor : TCefColor read GetBackgroundColor write SetBackgroundColor; + /// + /// Returns the ID for this View. + /// property ID : integer read GetID write SetID; + /// + /// Returns the group id of this View, or -1 if not set. + /// property GroupID : integer read GetGroupID write SetGroupID; + /// + /// Returns the bounds (size and position) of this View in parent coordinates, + /// or DIP screen coordinates if there is no parent. + /// property Bounds : TCefRect read GetBounds write SetBounds; + /// + /// Returns the size of this View in parent coordinates, or DIP screen + /// coordinates if there is no parent. + /// property Size : TCefSize read GetSize write SetSize; + /// + /// Returns the position of this View. Position is in parent coordinates, or + /// DIP screen coordinates if there is no parent. + /// property Position : TCefPoint read GetPosition write SetPosition; + /// + /// Returns the insets for this View in parent coordinates, or DIP screen + /// coordinates if there is no parent. + /// property Insets : TCefInsets read GetInsets write SetInsets; + /// + /// Returns the type of this View as a string. Used primarily for testing + /// purposes. + /// property TypeString : ustring read GetTypeString; end; @@ -9396,15 +9901,58 @@ type /// ICefViewDelegate = interface(ICefBaseRefCounted) ['{5F900206-B969-4E51-B56C-0FF38D749C72}'] + /// + /// Return the preferred size for |view|. The Layout will use this information + /// to determine the display size. + /// procedure OnGetPreferredSize(const view: ICefView; var aResult : TCefSize); + /// + /// Return the minimum size for |view|. + /// procedure OnGetMinimumSize(const view: ICefView; var aResult : TCefSize); + /// + /// Return the maximum size for |view|. + /// procedure OnGetMaximumSize(const view: ICefView; var aResult : TCefSize); + /// + /// 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). + /// procedure OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer); + /// + /// 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. + /// procedure OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView); + /// + /// 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. + /// procedure OnChildViewChanged(const view: ICefView; added: boolean; const child: ICefView); + /// + /// Called when |view| is added or removed from the ICefWindow. + /// procedure OnWindowChanged(const view: ICefView; added: boolean); + /// + /// Called when the layout of |view| has changed. + /// procedure OnLayoutChanged(const view: ICefView; new_bounds: TCefRect); + /// + /// Called when |view| gains focus. + /// procedure OnFocus(const view: ICefView); + /// + /// Called when |view| loses focus. + /// procedure OnBlur(const view: ICefView); end; @@ -9419,45 +9967,181 @@ type /// ICefTextfield = interface(ICefView) ['{B5E30155-DEA5-4CBF-BC9D-578CBCA586D9}'] + /// + /// Sets whether the text will be displayed as asterisks. + /// procedure SetPasswordInput(password_input: boolean); + /// + /// Returns true (1) if the text will be displayed as asterisks. + /// function IsPasswordInput : boolean; + /// + /// Sets whether the text will read-only. + /// procedure SetReadOnly(read_only: boolean); + /// + /// Returns true (1) if the text is read-only. + /// function IsReadOnly : boolean; + /// + /// Returns the currently displayed text. + /// function GetText : ustring; + /// + /// Sets the contents to |text|. The cursor will be moved to end of the text + /// if the current position is outside of the text range. + /// procedure SetText(const text_: ustring); + /// + /// Appends |text| to the previously-existing text. + /// procedure AppendText(const text_: ustring); + /// + /// Inserts |text| at the current cursor position replacing any selected text. + /// procedure InsertOrReplaceText(const text_: ustring); + /// + /// Returns true (1) if there is any selected text. + /// function HasSelection : boolean; + /// + /// Returns the currently selected text. + /// function GetSelectedText : ustring; + /// + /// Selects all text. If |reversed| is true (1) the range will end at the + /// logical beginning of the text; this generally shows the leading portion of + /// text that overflows its display area. + /// procedure SelectAll(reversed: boolean); + /// + /// Clears the text selection and sets the caret to the end. + /// procedure ClearSelection; + /// + /// Returns the selected logical text range. + /// function GetSelectedRange : TCefRange; + /// + /// Selects the specified logical text range. + /// procedure SelectRange(const range: TCefRange); + /// + /// Returns the current cursor position. + /// function GetCursorPosition : NativeUInt; + /// + /// Sets the text color. + /// procedure SetTextColor(color: TCefColor); + /// + /// Returns the text color. + /// function GetTextColor : TCefColor; + /// + /// Sets the selection text color. + /// procedure SetSelectionTextColor(color: TCefColor); + /// + /// Returns the selection text color. + /// function GetSelectionTextColor : TCefColor; + /// + /// Sets the selection background color. + /// procedure SetSelectionBackgroundColor(color: TCefColor); + /// + /// Returns the selection background color. + /// function GetSelectionBackgroundColor : TCefColor; + /// + /// Sets the font list. The format is ",[STYLES] ", + /// where: - FONT_FAMILY_LIST is a comma-separated list of font family names, + /// - STYLES is an optional space-separated list of style names (case- + /// sensitive + /// "Bold" and "Italic" are supported), and + /// - SIZE is an integer font size in pixels with the suffix "px". + /// + /// Here are examples of valid font description strings: - "Arial, Helvetica, + /// Bold Italic 14px" - "Arial, 14px" + /// procedure SetFontList(const font_list: ustring); + /// + /// Applies |color| to the specified |range| without changing the default + /// color. If |range| is NULL the color will be set on the complete text + /// contents. + /// procedure ApplyTextColor(color: TCefColor; const range: TCefRange); + /// + /// Applies |style| to the specified |range| without changing the default + /// style. If |add| is true (1) the style will be added, otherwise the style + /// will be removed. If |range| is NULL the style will be set on the complete + /// text contents. + /// procedure ApplyTextStyle(style: TCefTextStyle; add: boolean; const range: TCefRange); + /// + /// Returns true (1) if the action associated with the specified command id is + /// enabled. See additional comments on execute_command(). + /// function IsCommandEnabled(command_id: TCefTextFieldCommands): boolean; + /// + /// Performs the action associated with the specified command id. + /// procedure ExecuteCommand(command_id: TCefTextFieldCommands); + /// + /// Clears Edit history. + /// procedure ClearEditHistory; + /// + /// Sets the placeholder text that will be displayed when the Textfield is + /// NULL. + /// procedure SetPlaceholderText(const text_: ustring); + /// + /// Returns the placeholder text that will be displayed when the Textfield is + /// NULL. + /// function GetPlaceholderText : ustring; + /// + /// Sets the placeholder text color. + /// procedure SetPlaceholderTextColor(color: TCefColor); + /// + /// Set the accessible name that will be exposed to assistive technology (AT). + /// procedure SetAccessibleName(const name: ustring); - + /// + /// Returns true (1) if the text will be displayed as asterisks. + /// property PasswordInput : boolean read IsPasswordInput write SetPasswordInput; + /// + /// Returns true (1) if the text is read-only. + /// property ReadOnly : boolean read IsReadOnly write SetReadOnly; + /// + /// Returns the currently displayed text. + /// property Text : ustring read GetText write SetText; + /// + /// Returns the currently selected text. + /// property SelectedText : ustring read GetSelectedText; + /// + /// Returns the text color. + /// property TextColor : TCefColor read GetTextColor write SetTextColor; + /// + /// Returns the selection text color. + /// property SelectionTextColor : TCefColor read GetSelectionTextColor write SetSelectionTextColor; + /// + /// Returns the selection background color. + /// property SelectionBackgroundColor : TCefColor read GetSelectionBackgroundColor write SetSelectionBackgroundColor; + /// + /// Returns the placeholder text that will be displayed when the Textfield is + /// NULL. + /// property PlaceholderText : ustring read GetPlaceholderText write SetPlaceholderText; end; @@ -9472,7 +10156,15 @@ type /// ICefTextfieldDelegate = interface(ICefViewDelegate) ['{72612994-92BB-4DE9-BB38-6F49FB45F94B}'] + /// + /// Called when |textfield| recieves a keyboard event. |event| contains + /// information about the keyboard event. Return true (1) if the keyboard + /// event was handled or false (0) otherwise for default handling. + /// procedure OnKeyEvent(const textfield: ICefTextfield; const event: TCefKeyEvent; var aResult : boolean); + /// + /// Called after performing a user action that may change |textfield|. + /// procedure OnAfterUserAction(const textfield: ICefTextfield); end; @@ -9487,17 +10179,50 @@ type /// ICefScrollView = interface(ICefView) ['{55DF2883-0574-4F10-B6F5-DE4730964B5B}'] + /// + /// Set the content View. The content View must have a specified size (e.g. + /// via ICefView.SetBounds or ICefViewDelegate.GetPreferredSize). + /// procedure SetContentView(const view: ICefView); + /// + /// Returns the content View. + /// function GetContentView : ICefView; + /// + /// Returns the visible region of the content View. + /// function GetVisibleContentRect : TCefRect; + /// + /// Returns true (1) if the horizontal scrollbar is currently showing. + /// function HasHorizontalScrollbar : boolean; + /// + /// Returns the height of the horizontal scrollbar. + /// function GetHorizontalScrollbarHeight : Integer; + /// + /// Returns true (1) if the vertical scrollbar is currently showing. + /// function HasVerticalScrollbar : boolean; + /// + /// Returns the width of the vertical scrollbar. + /// function GetVerticalScrollbarWidth : Integer; - + /// + /// Returns the content View. + /// property ContentView : ICefView read GetContentView write SetContentView; + /// + /// Returns the visible region of the content View. + /// property VisibleContentRect : TCefRect read GetVisibleContentRect; + /// + /// Returns the height of the horizontal scrollbar. + /// property HorizontalScrollbarHeight : Integer read GetHorizontalScrollbarHeight; + /// + /// Returns the width of the vertical scrollbar. + /// property VerticalScrollbarWidth : Integer read GetVerticalScrollbarWidth; end; @@ -9512,19 +10237,61 @@ type /// ICefPanel = interface(ICefView) ['{6F2F680A-3637-4438-81B8-79AD6C02252D}'] + /// + /// Returns this Panel as a Window or NULL if this is not a Window. + /// function GetAsWindow : ICefWindow; + /// + /// Set this Panel's Layout to FillLayout and return the FillLayout object. + /// function SetToFillLayout : ICefFillLayout; + /// + /// Set this Panel's Layout to BoxLayout and return the BoxLayout object. + /// function SetToBoxLayout(const settings: TCefBoxLayoutSettings): ICefBoxLayout; + /// + /// Get the Layout. + /// function GetLayout : ICefLayout; + /// + /// Lay out the child Views (set their bounds based on sizing heuristics + /// specific to the current Layout). + /// procedure Layout; + /// + /// Add a child View. + /// procedure AddChildView(const view: ICefView); + /// + /// Add a child View at the specified |index|. If |index| matches the result + /// of GetChildCount() then the View will be added at the end. + /// procedure AddChildViewAt(const view: ICefView; index: Integer); + /// + /// Move the child View to the specified |index|. A negative value for |index| + /// will move the View to the end. + /// procedure ReorderChildView(const view: ICefView; index: Integer); + /// + /// Remove a child View. The View can then be added to another Panel. + /// procedure RemoveChildView(const view: ICefView); + /// + /// Remove all child Views. The removed Views will be deleted if the client + /// holds no references to them. + /// procedure RemoveAllChildViews; + /// + /// Returns the number of child Views. + /// function GetChildViewCount : NativeUInt; + /// + /// Returns the child View at the specified |index|. + /// function GetChildViewAt(index: Integer): ICefView; - + /// + /// Returns this Panel as a Window or NULL if this is not a Window. + /// property AsWindow : ICefWindow read GetAsWindow; end; @@ -9551,8 +10318,29 @@ type /// ICefBrowserView = interface(ICefView) ['{A617EE5D-B933-4E14-9FC0-7E88E9B6C051}'] + /// + /// Returns the ICefBrowser hosted by this BrowserView. Will return NULL if + /// the browser has not yet been created or has already been destroyed. + /// function GetBrowser : ICefBrowser; + /// + /// Returns the Chrome toolbar associated with this BrowserView. Only + /// supported when using the Chrome runtime. The ICefBrowserViewDelegate.get_chrome_toolbar_type() + /// function must return a value other than + /// CEF_CTT_NONE and the toolbar will not be available until after this + /// BrowserView is added to a ICefWindow and + /// ICefViewDelegate.OnWindowChanged() has been called. + /// function GetChromeToolbar : ICefView; + /// + /// Sets whether accelerators registered with ICefWindow.SetAccelerator are + /// triggered before or after the event is sent to the ICefBrowser. If + /// |prefer_accelerators| is true (1) then the matching accelerator will be + /// triggered immediately and the event will not be sent to the ICefBrowser. + /// If |prefer_accelerators| is false (0) then the matching accelerator will + /// only be triggered if the event is not handled by web content or by + /// ICefKeyboardHandler. The default value is false (0). + /// procedure SetPreferAccelerators(prefer_accelerators: boolean); end; @@ -9567,13 +10355,57 @@ type /// ICefBrowserViewDelegate = interface(ICefViewDelegate) ['{578A0DD4-2E7D-4061-B4DB-7C3CDC7A90C0}'] + /// + /// Called when |browser| associated with |browser_view| is created. This + /// function will be called after ICefLifeSpanHandler.OnAfterCreated() + /// is called for |browser| and before OnPopupBrowserViewCreated() is + /// called for |browser|'s parent delegate if |browser| is a popup. + /// procedure OnBrowserCreated(const browser_view: ICefBrowserView; const browser: ICefBrowser); + /// + /// Called when |browser| associated with |browser_view| is destroyed. Release + /// all references to |browser| and do not attempt to execute any functions on + /// |browser| after this callback returns. This function will be called before + /// ICefLifeSpanHandler.OnBeforeClose() is called for |browser|. + /// procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); + /// + /// Called before a new popup BrowserView is created. The popup originated + /// from |browser_view|. |settings| and |client| are the values returned from + /// ICefLifeSpanHandler.OnBeforePopup(). |is_devtools| will be true (1) + /// if the popup will be a DevTools browser. Return the delegate that will be + /// used for the new popup BrowserView. + /// procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); + /// + /// Called after |popup_browser_view| is created. This function will be called + /// after ICefLifeSpanHandler.OnAfterCreated() and OnBrowserCreated() + /// are called for the new popup browser. The popup originated from + /// |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools + /// browser. Optionally add |popup_browser_view| to the views hierarchy + /// yourself and return true (1). Otherwise return false (0) and a default + /// ICefWindow will be created for the popup. + /// procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); + /// + /// Returns the Chrome toolbar type that will be available via + /// ICefBrowserView.GetChromeToolbar(). See that function for related + /// documentation. + /// function GetChromeToolbarType: TCefChromeToolbarType; + /// + /// Called when |browser_view| receives a gesture command. Return true (1) to + /// handle (or disable) a |gesture_command| or false (0) to propagate the + /// gesture to the browser for default handling. This function will only be + /// called with the Alloy runtime. To handle these commands with the Chrome + /// runtime implement ICefCommandHandler.OnChromeCommand instead. + /// procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); - + /// + /// Returns the Chrome toolbar type that will be available via + /// ICefBrowserView.GetChromeToolbar(). See that function for related + /// documentation. + /// property ChromeToolbarType: TCefChromeToolbarType read GetChromeToolbarType; end; @@ -9588,11 +10420,31 @@ type /// ICefButton = interface(ICefView) ['{D3D2E8A0-9F9C-4BD8-B495-655976534281}'] + /// + /// Returns this Button as a LabelButton or NULL if this is not a LabelButton. + /// function AsLabelButton : ICefLabelButton; + /// + /// Sets the current display state of the Button. + /// procedure SetState(state_: TCefButtonState); + /// + /// Returns the current display state of the Button. + /// function GetState : TCefButtonState; + /// + /// Sets the Button will use an ink drop effect for displaying state changes. + /// procedure SetInkDropEnabled(enabled_: boolean); + /// + /// Sets the tooltip text that will be displayed when the user hovers the + /// mouse cursor over the Button. + /// procedure SetTooltipText(const tooltip_text: ustring); + /// + /// Sets the accessible name that will be exposed to assistive technology + /// (AT). + /// procedure SetAccessibleName(const name: ustring); property State : TCefButtonState read GetState write SetState; @@ -9609,7 +10461,13 @@ type /// ICefButtonDelegate = interface(ICefViewDelegate) ['{EA1EB5A4-DFB0-4A13-A23B-54FAF9401B39}'] + /// + /// Called when |button| is pressed. + /// procedure OnButtonPressed(const button: ICefButton); + /// + /// Called when the state of |button| changes. + /// procedure OnButtonStateChanged(const button: ICefButton); end; @@ -9623,18 +10481,67 @@ type /// ICefLabelButton = interface(ICefButton) ['{A99FD4F3-7EE6-4796-8BF6-EC367D51EED8}'] + /// + /// Returns this LabelButton as a MenuButton or NULL if this is not a + /// MenuButton. + /// function AsMenuButton : ICefMenuButton; + /// + /// Sets the text shown on the LabelButton. By default |text| will also be + /// used as the accessible name. + /// procedure SetText(const text_: ustring); + /// + /// Returns the text shown on the LabelButton. + /// function GetText : ustring; + /// + /// Sets the image shown for |button_state|. When this Button is drawn if no + /// image exists for the current state then the image for + /// CEF_BUTTON_STATE_NORMAL, if any, will be shown. + /// procedure SetImage(button_state: TCefButtonState; const image: ICefImage); + /// + /// Returns the image shown for |button_state|. If no image exists for that + /// state then the image for CEF_BUTTON_STATE_NORMAL will be returned. + /// function GetImage(button_state: TCefButtonState): ICefImage; + /// + /// Sets the text color shown for the specified button |for_state| to |color|. + /// procedure SetTextColor(for_state: TCefButtonState; color: TCefColor); + /// + /// Sets the text colors shown for the non-disabled states to |color|. + /// procedure SetEnabledTextColors(color: TCefColor); + /// + /// Sets the font list. The format is ",[STYLES] ", + /// where: - FONT_FAMILY_LIST is a comma-separated list of font family names, + /// - STYLES is an optional space-separated list of style names (case- + /// sensitive + /// "Bold" and "Italic" are supported), and + /// - SIZE is an integer font size in pixels with the suffix "px". + /// + /// Here are examples of valid font description strings: - "Arial, Helvetica, + /// Bold Italic 14px" - "Arial, 14px" + /// procedure SetFontList(const font_list: ustring); + /// + /// Sets the horizontal alignment; reversed in RTL. Default is + /// CEF_HORIZONTAL_ALIGNMENT_CENTER. + /// procedure SetHorizontalAlignment(alignment: TCefHorizontalAlignment); + /// + /// Reset the minimum size of this LabelButton to |size|. + /// procedure SetMinimumSize(const size_: TCefSize); + /// + /// Reset the maximum size of this LabelButton to |size|. + /// procedure SetMaximumSize(const size_: TCefSize); - + /// + /// Returns the text shown on the LabelButton. + /// property Text : ustring read GetText write SetText; end; @@ -9651,7 +10558,17 @@ type /// ICefMenuButton = interface(ICefLabelButton) ['{62BFE81A-7810-400B-83C6-76D1DF133710}'] + /// + /// Show a menu with contents |menu_model|. |screen_point| specifies the menu + /// position in screen coordinates. |anchor_position| specifies how the menu + /// will be anchored relative to |screen_point|. This function should be + /// called from ICefMenuButtonDelegate.OnMenuButtonPressed(). + /// procedure ShowMenu(const menu_model: ICefMenuModel; const screen_point: TCefPoint; anchor_position: TCefMenuAnchorPosition); + /// + /// Show the menu for this button. Results in a call to + /// ICefMenuButtonDelegate.OnMenuButtonPressed(). + /// procedure TriggerMenu; end; @@ -9677,6 +10594,12 @@ type /// ICefMenuButtonDelegate = interface(ICefButtonDelegate) ['{D0E89A75-463A-4766-8701-BD8D24B11E9F}'] + /// + /// Called when |button| is pressed. Call ICefMenuButton.ShowMenu() to + /// show a popup menu at |screen_point|. When showing a custom popup such as a + /// window keep a reference to |button_pressed_lock| until the popup is hidden + /// to maintain the pressed button state. + /// procedure OnMenuButtonPressed(const menu_button: ICefMenuButton; const screen_point: TCefPoint; const button_pressed_lock: ICefMenuButtonPressedLock); end; @@ -9693,50 +10616,245 @@ type /// ICefWindow = interface(ICefPanel) ['{C450C974-BF0A-4968-A6BE-153CEAD10DA6}'] + /// + /// Show the Window. + /// procedure Show; + /// + /// Show the Window as a browser modal dialog relative to |browser_view|. A + /// parent Window must be returned via + /// ICefWindowDelegate.GetParentWindow() and |browser_view| must belong + /// to that parent Window. While this Window is visible, |browser_view| will + /// be disabled while other controls in the parent Window remain enabled. + /// Navigating or destroying the |browser_view| will close this Window + /// automatically. Alternately, use show() and return true (1) from + /// ICefWindowDelegate.IsWindowModalDialog() for a window modal dialog + /// where all controls in the parent Window are disabled. + /// procedure ShowAsBrowserModalDialog(const browser_view: ICefBrowserView); + /// + /// Hide the Window. + /// procedure Hide; + /// + /// Sizes the Window to |size| and centers it in the current display. + /// procedure CenterWindow(const size_: TCefSize); + /// + /// Close the Window. + /// procedure Close; + /// + /// Returns true (1) if the Window has been closed. + /// function IsClosed : boolean; + /// + /// Activate the Window, assuming it already exists and is visible. + /// procedure Activate; + /// + /// Deactivate the Window, making the next Window in the Z order the active + /// Window. + /// procedure Deactivate; + /// + /// Returns whether the Window is the currently active Window. + /// function IsActive : boolean; + /// + /// Bring this Window to the top of other Windows in the Windowing system. + /// procedure BringToTop; + /// + /// Set the Window to be on top of other Windows in the Windowing system. + /// procedure SetAlwaysOnTop(on_top: boolean); + /// + /// Returns whether the Window has been set to be on top of other Windows in + /// the Windowing system. + /// function IsAlwaysOnTop : boolean; + /// + /// Maximize the Window. + /// procedure Maximize; + /// + /// Minimize the Window. + /// procedure Minimize; + /// + /// Restore the Window. + /// procedure Restore; + /// + /// Set fullscreen Window state. + /// procedure SetFullscreen(fullscreen: boolean); + /// + /// Returns true (1) if the Window is maximized. + /// function IsMaximized : boolean; + /// + /// Returns true (1) if the Window is minimized. + /// function IsMinimized : boolean; + /// + /// Returns true (1) if the Window is fullscreen. + /// function IsFullscreen : boolean; + /// + /// Set the Window title. + /// procedure SetTitle(const title_: ustring); + /// + /// Get the Window title. + /// function GetTitle : ustring; + /// + /// Set the Window icon. This should be a 16x16 icon suitable for use in the + /// Windows's title bar. + /// procedure SetWindowIcon(const image: ICefImage); + /// + /// Get the Window icon. + /// function GetWindowIcon : ICefImage; + /// + /// Set the Window App icon. This should be a larger icon for use in the host + /// environment app switching UI. On Windows, this is the ICON_BIG used in + /// Alt-Tab list and Windows taskbar. The Window icon will be used by default + /// if no Window App icon is specified. + /// procedure SetWindowAppIcon(const image: ICefImage); + /// + /// Get the Window App icon. + /// function GetWindowAppIcon : ICefImage; + /// + /// Add a View that will be overlayed on the Window contents with absolute + /// positioning and high z-order. Positioning is controlled by |docking_mode| + /// as described below. The returned ICefOverlayController object is used + /// to control the overlay. Overlays are hidden by default. + /// + /// With CEF_DOCKING_MODE_CUSTOM: + /// 1. The overlay is initially hidden, sized to |view|'s preferred size, + /// and positioned in the top-left corner. + /// 2. Optionally change the overlay position and/or size by calling + /// CefOverlayController methods. + /// 3. Call ICefOverlayController.SetVisible(true) to show the overlay. + /// 4. The overlay will be automatically re-sized if |view|'s layout + /// changes. Optionally change the overlay position and/or size when + /// OnLayoutChanged is called on the Window's delegate to indicate a + /// change in Window bounds. + /// + /// With other docking modes: + /// 1. The overlay is initially hidden, sized to |view|'s preferred size, + /// and positioned based on |docking_mode|. + /// 2. Call ICefOverlayController.SetVisible(true) to show the overlay. + /// 3. The overlay will be automatically re-sized if |view|'s layout changes + /// and re-positioned as appropriate when the Window resizes. + /// + /// Overlays created by this function will receive a higher z-order then any + /// child Views added previously. It is therefore recommended to call this + /// function last after all other child Views have been added so that the + /// overlay displays as the top-most child of the Window. + /// function AddOverlayView(const view: ICefView; docking_mode: TCefDockingMode): ICefOverlayController; + /// + /// Show a menu with contents |menu_model|. |screen_point| specifies the menu + /// position in screen coordinates. |anchor_position| specifies how the menu + /// will be anchored relative to |screen_point|. + /// procedure ShowMenu(const menu_model: ICefMenuModel; const screen_point: TCefPoint; anchor_position : TCefMenuAnchorPosition); + /// + /// Cancel the menu that is currently showing, if any. + /// procedure CancelMenu; + /// + /// Returns the Display that most closely intersects the bounds of this + /// Window. May return NULL if this Window is not currently displayed. + /// function GetDisplay : ICefDisplay; + /// + /// Returns the bounds (size and position) of this Window's client area. + /// Position is in screen coordinates. + /// function GetClientAreaBoundsInScreen : TCefRect; + /// + /// Set the regions where mouse events will be intercepted by this Window to + /// support drag operations. Call this function with an NULL vector to clear + /// the draggable regions. The draggable region bounds should be in window + /// coordinates. + /// procedure SetDraggableRegions(regionsCount: NativeUInt; const regions: PCefDraggableRegionArray); + /// + /// Retrieve the platform window handle for this Window. + /// function GetWindowHandle : TCefWindowHandle; + /// + /// Simulate a key press. |key_code| is the VKEY_* value from Chromium's + /// ui/events/keycodes/keyboard_codes.h header (VK_* values on Windows). + /// |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN, + /// EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This function is exposed + /// primarily for testing purposes. + /// procedure SendKeyPress(key_code: Integer; event_flags: cardinal); + /// + /// Simulate a mouse move. The mouse cursor will be moved to the specified + /// (screen_x, screen_y) position. This function is exposed primarily for + /// testing purposes. + /// procedure SendMouseMove(screen_x, screen_y: Integer); + /// + /// Simulate mouse down and/or mouse up events. |button| is the mouse button + /// type. If |mouse_down| is true (1) a mouse down event will be sent. If + /// |mouse_up| is true (1) a mouse up event will be sent. If both are true (1) + /// a mouse down event will be sent followed by a mouse up event (equivalent + /// to clicking the mouse button). The events will be sent using the current + /// cursor position so make sure to call send_mouse_move() first to position + /// the mouse. This function is exposed primarily for testing purposes. + /// procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean); + /// + /// Set the keyboard accelerator for the specified |command_id|. |key_code| + /// can be any virtual key or character value. + /// ICefWindowDelegate.OnAccelerator will be called if the keyboard + /// combination is triggered while this window has focus. + /// procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed: boolean); + /// + /// Remove the keyboard accelerator for the specified |command_id|. + /// procedure RemoveAccelerator(command_id: Integer); + /// + /// Remove all keyboard accelerators. + /// procedure RemoveAllAccelerators; - + /// + /// Get the Window title. + /// property Title : ustring read GetTitle write SetTitle; + /// + /// Get the Window icon. + /// property WindowIcon : ICefImage read GetWindowIcon write SetWindowIcon; + /// + /// Get the Window App icon. + /// property WindowAppIcon : ICefImage read GetWindowAppIcon write SetWindowAppIcon; + /// + /// Returns the Display that most closely intersects the bounds of this + /// Window. May return NULL if this Window is not currently displayed. + /// property Display : ICefDisplay read GetDisplay; + /// + /// Returns the bounds (size and position) of this Window's client area. + /// Position is in screen coordinates. + /// property ClientAreaBoundsInScreen : TCefRect read GetClientAreaBoundsInScreen; + /// + /// Retrieve the platform window handle for this Window. + /// property WindowHandle : TCefWindowHandle read GetWindowHandle; end; @@ -9751,24 +10869,115 @@ type /// ICefWindowDelegate = interface(ICefPanelDelegate) ['{52D4EE2C-303B-42B6-A35F-30D03834A23F}'] + /// + /// Called when |window| is created. + /// procedure OnWindowCreated(const window_: ICefWindow); + /// + /// Called when |window| is closing. + /// procedure OnWindowClosing(const window_: ICefWindow); + /// + /// Called when |window| is destroyed. Release all references to |window| and + /// do not attempt to execute any functions on |window| after this callback + /// returns. + /// procedure OnWindowDestroyed(const window_: ICefWindow); + /// + /// Called when |window| is activated or deactivated. + /// procedure OnWindowActivationChanged(const window_: ICefWindow; active: boolean); + /// + /// Called when |window| bounds have changed. |new_bounds| will be in DIP + /// screen coordinates. + /// procedure OnWindowBoundsChanged(const window_: ICefWindow; const new_bounds: TCefRect); + /// + /// Return the parent for |window| or NULL if the |window| does not have a + /// parent. Windows with parents will not get a taskbar button. Set |is_menu| + /// to true (1) if |window| will be displayed as a menu, in which case it will + /// not be clipped to the parent window bounds. Set |can_activate_menu| to + /// false (0) if |is_menu| is true (1) and |window| should not be activated + /// (given keyboard focus) when displayed. + /// procedure OnGetParentWindow(const window_: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow); + /// + /// Return true (1) if |window| should be created as a window modal dialog. + /// Only called when a Window is returned via get_parent_window() with + /// |is_menu| set to false (0). All controls in the parent Window will be + /// disabled while |window| is visible. This functionality is not supported by + /// all Linux window managers. Alternately, use + /// ICefWindow.ShowAsBrowserModalDialog() for a browser modal dialog + /// that works on all platforms. + /// procedure OnIsWindowModalDialog(const window_: ICefWindow; var aResult: boolean); + /// + /// Return the initial bounds for |window| in density independent pixel (DIP) + /// coordinates. If this function returns an NULL CefRect then + /// GetPreferredSize() will be called to retrieve the size, and the window + /// will be placed on the screen with origin (0,0). This function can be used + /// in combination with ICefView.GetBoundsInScreen() to restore the + /// previous window bounds. + /// procedure OnGetInitialBounds(const window_: ICefWindow; var aResult : TCefRect); + /// + /// Return the initial show state for |window|. + /// procedure OnGetInitialShowState(const window_: ICefWindow; var aResult : TCefShowState); + /// + /// Return true (1) if |window| should be created without a frame or title + /// bar. The window will be resizable if can_resize() returns true (1). Use + /// ICefWindow.SetDraggableRegions() to specify draggable regions. + /// procedure OnIsFrameless(const window_: ICefWindow; var aResult : boolean); + /// + /// Return true (1) if |window| should be created with standard window buttons + /// like close, minimize and zoom. This function is only supported on macOS. + /// procedure OnWithStandardWindowButtons(const window_: ICefWindow; var aResult : boolean); + /// + /// Return whether the titlebar height should be overridden, and sets the + /// height of the titlebar in |titlebar_height|. On macOS, it can also be used + /// to adjust the vertical position of the traffic light buttons in frameless + /// windows. The buttons will be positioned halfway down the titlebar at a + /// height of |titlebar_height| / 2. + /// procedure OnGetTitlebarHeight(const window_: ICefWindow; var titlebar_height: Single; var aResult : boolean); + /// + /// Return true (1) if |window| can be resized. + /// procedure OnCanResize(const window_: ICefWindow; var aResult : boolean); + /// + /// Return true (1) if |window| can be maximized. + /// procedure OnCanMaximize(const window_: ICefWindow; var aResult : boolean); + /// + /// Return true (1) if |window| can be minimized. + /// procedure OnCanMinimize(const window_: ICefWindow; var aResult : boolean); + /// + /// Return true (1) if |window| can be closed. This will be called for user- + /// initiated window close actions and when ICefWindow.close() is called. + /// procedure OnCanClose(const window_: ICefWindow; var aResult : boolean); + /// + /// Called when a keyboard accelerator registered with + /// ICefWindow.SetAccelerator is triggered. Return true (1) if the + /// accelerator was handled or false (0) otherwise. + /// procedure OnAccelerator(const window_: ICefWindow; command_id: Integer; var aResult : boolean); + /// + /// Called after all other controls in the window have had a chance to handle + /// the event. |event| contains information about the keyboard event. Return + /// true (1) if the keyboard event was handled or false (0) otherwise. + /// procedure OnKeyEvent(const window_: ICefWindow; const event: TCefKeyEvent; var aResult : boolean); + /// + /// Called when the |window| is transitioning to or from fullscreen mode. The + /// transition occurs in two stages, with |is_competed| set to false (0) when + /// the transition starts and true (1) when the transition completes. This + /// function is only supported on macOS. + /// procedure OnWindowFullscreenTransition(const window_: ICefWindow; is_completed: boolean); end; diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 66b9835f..b574454c 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 500, + "InternalVersion" : 501, "Name" : "cef4delphi_lazarus.lpk", "Version" : "115.3.13" }