Skip to content

Commit

Permalink
Fixed incorrect type definitions
Browse files Browse the repository at this point in the history
Fixed TCefCustomStringList.GetHandle return value type
  • Loading branch information
salvadordf committed Jun 14, 2024
1 parent 0ada3d1 commit e02e101
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 40 deletions.
8 changes: 4 additions & 4 deletions demos/Delphi_VCL/MiniBrowserD7/uMiniBrowser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ TMiniBrowserFrm = class(TForm)
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
procedure Chromium1BeforeContextMenu(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel);
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction);
procedure Chromium1ContextMenuCommand(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: Cardinal; out Result: Boolean);
procedure Chromium1ContextMenuCommand(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags; out Result: Boolean);
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer);
procedure Chromium1LoadError(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring);
procedure Chromium1LoadError(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode; const errorText, failedUrl: ustring);
procedure Chromium1StatusMessage(Sender: TObject; const browser: ICefBrowser; const value: ustring);
procedure Chromium1TitleChange(Sender: TObject; const browser: ICefBrowser; const title: ustring);

Expand Down Expand Up @@ -231,7 +231,7 @@ procedure TMiniBrowserFrm.Chromium1Close(Sender: TObject; const browser: ICefBro
procedure TMiniBrowserFrm.Chromium1ContextMenuCommand(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; commandId: Integer;
eventFlags: Cardinal; out Result: Boolean);
eventFlags: TCefEventFlags; out Result: Boolean);
begin
Result := False;

Expand Down Expand Up @@ -271,7 +271,7 @@ procedure TMiniBrowserFrm.Chromium1LoadEnd(Sender: TObject;
end;

procedure TMiniBrowserFrm.Chromium1LoadError(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer;
const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode;
const errorText, failedUrl: ustring);
var
TempString : string;
Expand Down
5 changes: 4 additions & 1 deletion source/uCEFDragAndDropMgr.pas
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ function TCEFDragAndDropMgr.StartDragging : TCefDragOperation;
TempResult : HRESULT;
TempFormatArray : TOLEFormatArray;
TempMediumArray : TOLEMediumArray;
TempDragOps : TCefDragOperations;
i : integer;
begin
Result := DRAG_OPERATION_NONE;
Expand Down Expand Up @@ -711,7 +712,9 @@ function TCEFDragAndDropMgr.StartDragging : TCefDragOperation;
if (TempResult <> DRAGDROP_S_DROP) then TempResEffect := DROPEFFECT_NONE;
FCurrentDragData := nil;

DropEffectToDragOperation(TempResEffect, Result);
TempDragOps := TCefDragOperations(Result);
DropEffectToDragOperation(TempResEffect, TempDragOps);
Result := TCefDragOperation(TempDragOps);
end;
end;
end;
Expand Down
2 changes: 1 addition & 1 deletion source/uCEFInterfaces.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6648,7 +6648,7 @@ TCefMediaSourceInfo = record
/// error text and |failedUrl| is the URL that failed to load. See
/// net\base\net_error_list.h for complete descriptions of the error codes.
/// </summary>
procedure OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring);
procedure OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode; const errorText, failedUrl: ustring);
/// <summary>
/// Custom procedure to clear all references.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions source/uCEFStringList.pas
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TCefCustomStringList = class(TInterfacedObject, ICefStringList)
protected
FHandle : TCefStringList;

function GetHandle: TCefStringMap; virtual;
function GetHandle: TCefStringList; virtual;
/// <summary>
/// Return the number of elements in the string list.
/// </summary>
Expand Down Expand Up @@ -107,7 +107,7 @@ procedure TCefCustomStringList.Clear;
if (FHandle <> nil) then cef_string_list_clear(FHandle);
end;

function TCefCustomStringList.GetHandle: TCefStringMap;
function TCefCustomStringList.GetHandle: TCefStringList;
begin
Result := FHandle;
end;
Expand Down
62 changes: 31 additions & 31 deletions source/uCEFTypes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,15 @@ TCefAcceleratedPaintInfo = record
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_thread_internal.h">CEF source file: /include/internal/cef_thread_internal.h (cef_platform_thread_id_t)</see></para>
/// </remarks>
TCefPlatformThreadId = DWORD;
TCefPlatformThreadId = type DWORD;

/// <summary>
/// Platform thread handle.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_thread_internal.h">CEF source file: /include/internal/cef_thread_internal.h (cef_platform_thread_handle_t)</see></para>
/// </remarks>
TCefPlatformThreadHandle = DWORD;
TCefPlatformThreadHandle = type DWORD;

/// <summary>
/// Transition type for a request. Made up of one source value and 0 or more
Expand All @@ -502,7 +502,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_transition_type_t)</see></para>
/// </remarks>
TCefTransitionType = Cardinal;
TCefTransitionType = type Cardinal;

/// <summary>
/// 32-bit ARGB color value, not premultiplied. The color components are always
Expand All @@ -511,7 +511,7 @@ TCefAcceleratedPaintInfo = record
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_color_t)</see></para>
/// </remarks>
TCefColor = Cardinal;
TCefColor = type Cardinal;

/// <summary>
/// Supported error code values.
Expand All @@ -533,7 +533,7 @@ TCefAcceleratedPaintInfo = record
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_errorcode_t)</see></para>
/// <para><see href="https://chromium.googlesource.com/chromium/src/+/master/net/base/net_error_list.h">For the complete list of error values see include/base/internal/cef_net_error_list.h which includes this Chromium source file /net/base/net_error_list.h</see></para>
/// </remarks>
TCefErrorCode = Integer;
TCefErrorCode = type Integer;

/// <summary>
/// Supported certificate status code values. See net\cert\cert_status_flags.h
Expand All @@ -544,7 +544,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_cert_status_t)</see></para>
/// </remarks>
TCefCertStatus = Integer;
TCefCertStatus = type Integer;

/// <summary>
/// Supported SSL version values.
Expand All @@ -554,23 +554,23 @@ TCefAcceleratedPaintInfo = record
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_ssl_version_t)</see></para>
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:net/ssl/ssl_connection_status_flags.h">See net/ssl/ssl_connection_status_flags.h for more information.</see></para>
/// </remarks>
TCefSSLVersion = integer;
TCefSSLVersion = type integer;

/// <summary>
/// CEF string maps are a set of key/value string pairs.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_string_list.h">CEF source file: /include/internal/cef_string_list.h (cef_string_list_t)</see></para>
/// </remarks>
TCefStringList = Pointer;
TCefStringList = type Pointer;

/// <summary>
/// CEF string maps are a set of key/value string pairs.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_string_map.h">CEF source file: /include/internal/cef_string_map.h (cef_string_map_t)</see></para>
/// </remarks>
TCefStringMap = Pointer;
TCefStringMap = type Pointer;

/// <summary>
/// CEF string multimaps are a set of key/value string pairs.
Expand All @@ -579,7 +579,7 @@ TCefAcceleratedPaintInfo = record
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_string_multimap.h">CEF source file: /include/internal/cef_string_multimap.h (cef_string_multimap_t)</see></para>
/// </remarks>
TCefStringMultimap = Pointer;
TCefStringMultimap = type Pointer;

/// <summary>
/// URI unescape rules passed to CefURIDecode().
Expand All @@ -588,7 +588,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_uri_unescape_rule_t)</see></para>
/// </remarks>
TCefUriUnescapeRule = Integer;
TCefUriUnescapeRule = type Integer;

/// <summary>
/// DOM event category flags.
Expand All @@ -597,7 +597,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_dom_event_category_t)</see></para>
/// </remarks>
TCefDomEventCategory = Integer;
TCefDomEventCategory = type Integer;

/// <summary>
/// Supported event bit flags.
Expand All @@ -606,7 +606,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_event_flags_t)</see></para>
/// </remarks>
TCefEventFlags = Cardinal;
TCefEventFlags = type Cardinal;

/// <summary>
/// "Verb" of a drag-and-drop operation as negotiated between the source and
Expand All @@ -617,8 +617,8 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_drag_operations_mask_t)</see></para>
/// </remarks>
TCefDragOperations = Cardinal;
TCefDragOperation = Cardinal;
TCefDragOperations = type Cardinal;
TCefDragOperation = type Cardinal;

/// <summary>
/// V8 access control values.
Expand All @@ -627,7 +627,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_v8_accesscontrol_t)</see></para>
/// </remarks>
TCefV8AccessControls = Cardinal;
TCefV8AccessControls = type Cardinal;

/// <summary>
/// V8 property attribute values.
Expand All @@ -636,7 +636,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_v8_propertyattribute_t)</see></para>
/// </remarks>
TCefV8PropertyAttributes = Cardinal;
TCefV8PropertyAttributes = type Cardinal;

/// <summary>
/// Flags used to customize the behavior of CefURLRequest.
Expand All @@ -645,7 +645,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_urlrequest_flags_t)</see></para>
/// </remarks>
TCefUrlRequestFlags = Cardinal;
TCefUrlRequestFlags = type Cardinal;

/// <summary>
/// Supported context menu type flags.
Expand All @@ -654,7 +654,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_context_menu_type_flags_t)</see></para>
/// </remarks>
TCefContextMenuTypeFlags = Cardinal;
TCefContextMenuTypeFlags = type Cardinal;

/// <summary>
/// Supported context menu media state bit flags. These constants match their
Expand All @@ -665,7 +665,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_context_menu_media_state_flags_t)</see></para>
/// </remarks>
TCefContextMenuMediaStateFlags = Cardinal;
TCefContextMenuMediaStateFlags = type Cardinal;

/// <summary>
/// Supported context menu edit state bit flags. These constants match their
Expand All @@ -676,7 +676,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_context_menu_edit_state_flags_t)</see></para>
/// </remarks>
TCefContextMenuEditStateFlags = Cardinal;
TCefContextMenuEditStateFlags = type Cardinal;

/// <summary>
/// Options that can be passed to CefWriteJSON.
Expand All @@ -685,7 +685,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_json_writer_options_t)</see></para>
/// </remarks>
TCefJsonWriterOptions = Cardinal;
TCefJsonWriterOptions = type Cardinal;

/// <summary>
/// Supported SSL content status flags. See content/public/common/ssl_status.h
Expand All @@ -695,7 +695,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_ssl_content_status_t)</see></para>
/// </remarks>
TCefSSLContentStatus = Cardinal;
TCefSSLContentStatus = type Cardinal;

/// <summary>
/// Log severity levels.
Expand All @@ -704,7 +704,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_severity_t)</see></para>
/// </remarks>
TCefLogSeverity = Cardinal;
TCefLogSeverity = type Cardinal;

/// <summary>
/// Supported file dialog modes.
Expand All @@ -713,7 +713,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_file_dialog_mode_t)</see></para>
/// </remarks>
TCefFileDialogMode = Cardinal;
TCefFileDialogMode = type Cardinal;

/// <summary>
/// Print job duplex mode values.
Expand All @@ -722,7 +722,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_duplex_mode_t)</see></para>
/// </remarks>
TCefDuplexMode = Integer;
TCefDuplexMode = type Integer;

/// <summary>
/// Configuration options for registering a custom scheme.
Expand All @@ -732,7 +732,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_scheme_options_t)</see></para>
/// </remarks>
TCefSchemeOptions = Integer;
TCefSchemeOptions = type Integer;

/// <summary>
/// Result codes for ICefMediaRouter.CreateRoute. Should be kept in sync with
Expand All @@ -742,7 +742,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_media_route_create_result_t)</see></para>
/// </remarks>
TCefMediaRouterCreateResult = Integer;
TCefMediaRouterCreateResult = type Integer;

/// <summary>
/// Cookie priority values.
Expand All @@ -751,7 +751,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_cookie_priority_t)</see></para>
/// </remarks>
TCefCookiePriority = Integer;
TCefCookiePriority = type Integer;

/// <summary>
/// Represents commands available to TextField.
Expand All @@ -760,7 +760,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_text_field_commands_t)</see></para>
/// </remarks>
TCefTextFieldCommands = Integer;
TCefTextFieldCommands = type Integer;

/// <summary>
/// Chrome toolbar types.
Expand All @@ -769,7 +769,7 @@ TCefAcceleratedPaintInfo = record
/// <para>See the uCEFConstants unit for all possible values.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_chrome_toolbar_type_t)</see></para>
/// </remarks>
TCefChromeToolbarType = Integer;
TCefChromeToolbarType = type Integer;

/// <summary>
/// Docking modes supported by ICefWindow.AddOverlay.
Expand Down
2 changes: 1 addition & 1 deletion update_CEF4Delphi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 612,
"InternalVersion" : 613,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "125.0.22"
}
Expand Down

0 comments on commit e02e101

Please sign in to comment.